• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Another bug related to all the "stunned, non-hostile" NPC

smrtwhkd

Master Mariner
I am doing the Mayan Temple quest. As you can see in the picture, some of the native warrior become "stunned" NPC. If you kill them, your rep get wrecked. If you don't kill them, they follow you around like ghosts. They don't attacked as if they were stunned or something. I believe this bug is related to "stunned, non-hostile" thing created by pocket-picking logics.
 

Attachments

  • bug3.png
    bug3.png
    4.4 MB · Views: 265
  • Native ghosts.rar
    884.8 KB · Views: 153
  • compile.log
    25.8 KB · Views: 155
  • error.log
    1.1 KB · Views: 151
  • system.log
    3.6 KB · Views: 155
I suspect this is something to do with the new code for Indian weapons. I noticed the same thing a while ago and reported it then. We never did find a solution.

Interesting lines in that "error.log":
Code:
RUNTIME ERROR - file: Loc_ai\LAi_events.c; line: 2967
Using reference variable without initializing
RUNTIME ERROR - file: Loc_ai\LAi_events.c; line: 2967
null ap
RUNTIME ERROR - file: Loc_ai\LAi_events.c; line: 2967
null ap
RUNTIME ERROR - file: Loc_ai\LAi_events.c; line: 2967
no rAP data
Line 2967 is this:
Code:
               if(CheckAttribute(enemy, "chr_ai.group") && enemy.chr_ai.group==LAI_GROUP_PLAYER)
               {
                   if(sti(mainCh.skill.Leadership)>sti(enemy.skill.Leadership)) bPlayer = true;
               }
               else
               {
                   if(sti(mainCh.skill.Leadership)<sti(enemy.skill.Leadership)) bPlayer = true; // <----  This is line 2967
               }
'mainCh' is the player and must have the "Leadership" skill. 'enemy' is the other character, might not have "Leadership" - and on this occasion, probably doesn't. I'll have to try replaying that part of the story (or just going to the temple at any other time as the Indians surrounding it weren't put there by the story so they should always be there), and see if making this change to "LAi_events.c" makes any difference:
Code:
if(sti(mainCh.skill.Leadership)<sti(GetAttribute(enemy, "skill.Leadership"))) bPlayer = true;
 
That correction, while worthwhile for the sake of preventing error messages, does not cure the problem. Experimenting shows that:
  • It is not limited to the "Ardent" storyline. I ran a FreePlay, made my way to the temple and managed to find some unarmed Indians.
  • It seems to be related to saving and reloading games. If I can fight my way through the Indians at the temple in one go without saving and reloading, none are disarmed.
  • I can't reproduce it reliably. Sometimes I can save and reload, and the Indians are all still armed.
Since I can't reproduce the problem consistently, I can't say whether it also applies to Indians inside the temple or to random Indian attacks at night in the jungle.

Meanwhile, a workaround might be to save game before going to the temple area. If you reload from there - or if you reload from a savegame in the temple area, then go back down the path to the jungle and return to the temple, the Indians are re-armed.
 
Sounds like one of the problems with Mysterious Plants. In that instance some of the indians were (inconsistently) coming up unarmed when created and therefore didn't fight. I just hacked the code to give each one a tomahawk (or blade) after their creation. This often meant they had two but at least none were unarmed. So it seems to be a problem with LAi_CreateFantomCharacterExOtAt in that case.
 
I don't think it is the same problem. The Indians do have weapons, they just seem to forget this sometimes after you save and reload a game. If you hit one with a thief's knife, you can look at his inventory and he does have both bow and tomahawk, though no arrows. After that, he behaves like any random walker whom you've mugged - if you stole the tomahawk and bow then he runs away, if you left them then he notices that he has a tomahawk and hits you with it.

You can check this for yourself easily enough. File "Native ghosts.rar" in the first post is a savegame with Helen Ardent looking at several apparently unarmed Indians and she has a thief's knife in her inventory, so you can try mugging them.
 
I don't think it is the same problem. The Indians do have weapons, they just seem to forget this sometimes after you save and reload a game. You can check this for yourself easily enough. File "Native ghosts.rar" in the first post is a savegame with Helen Ardent looking at several apparently unarmed Indians and she has a thief's knife in her inventory, so you can try mugging them.


OK I'll look at that (not that I don't believe you) a consistent case might make tracking it possible. I actually don't remember if I checked out the indians I looked at for weapons per se - just that they were inconsistently not fighting (or fighting) and the bug reports suggested they were unarmed and what I tried seemed to work - so yes it might be a different issue but I may revisit that too. It would be nice to pin down why but if it changes inconsistently after a save it might be just too difficult to isolate without a lot of effort. You seem to suggest in your experiments and workround that a location reset always reminded them they have weapons?
 
I believe so, yes. They're probably temporary fantom characters, so leaving and re-entering the location does not remind the Indians that they have weapons, it creates a new set of Indians all ready to attack you.
 
Back
Top