New Forums

Please go vote on the new forums now. Let's get this shipped.

You are here

Hostile NPC glitch

13 posts / 0 new
Last post
Dimy
Hostile NPC glitch

So the last time I loaded the game I got this weird glitch. Every NPC (traders, guards, commoners etc) at the location turned hostile all of a sudden. Seems like glitch in reputation but I have no idea how to fix it.

Any ideas how to make all NPCs friendly again? Thanks for any help!


  • up
    50%
  • down
    50%
Greenman6220
What Module were you playing? What were you doing right before they became hostile?

Greenman6220

  • up
    50%
  • down
    50%
Dimy
It was just the main campaign. I was attacked by a bunch of bladelings in the Port of Newerwinter. After killing them I saved the game and left it. When I loaded it next day, everybody at the location went crazy and became hostile to me! Even Duncan is trying to kill me.... Other locations work fine though, but when I try to come back to the Port all the NPCs are still hostile.
  • up
    50%
  • down
    50%
Greenman6220
Sometimes all you have to do is go to an earlier save. Just save the game again a little later. Also sometimes if you Debug in the wrong place the game will go hostile.
  • up
    50%
  • down
    50%
Dimy
Thanks! I was just thinking that its possible to fix it somehow through dm_setfactionreputation command
  • up
    50%
  • down
    50%
kevL's

if you can upload and link me to your saved game (preferably in Neverwinter City where things are borked) i'll have a look,


otherwise there's "too many variables" ...

  • up
    50%
  • down
    50%
Dimy

I would really appreciate! Here is a link to my saved game: https://files.fm/u/gvs63vxx

 

 

  • up
    50%
  • down
    50%
kevL's

ok got it.

 

yea, that's not right, all the citizens are friggin hostile ...

 

 

man, what did you do lol. Every *custom faction* in the module hates your party - not only that, they all appear to have changed to STANDARD_FACTION_HOSTILE (which hates everybody anyway.)

 

the file Repute.FAC is corrupt inside the save.

I'll try to swap it with one from an old save i have here,

  • up
    50%
  • down
    50%
kevL's

here's a download of the (hopefully fixed) save

https://drive.google.com/open?id=1Gu88F0X7rIFNHXnshApALRwDNqoNKLL8


with no small amount of luck and persistence I got it working on my machine. I don't know what the cause was, but the file Repute.FAC inside the Neverwinter City module basically got blanked somehow, so i inserted a good one from an old save i have (at about the same point in the game). That re-enabled the OC's custom factions, which then let me script all sorts of instanced creatures neutral again. I almost missed Sand ... there may well be others hanging around that are still hostile.

(FactionHostile is the first entry in the default faction table, so that's what everything changed into.)

I noticed what looks like cyrillic in one of the saved files:
{1000}Квартал Доков

The fault *might* have been caused by an incompatability among the language, Nwn2, and the OS.

or another possiblity is that your system security settings simply didn't allow that file to write to the harddrive when it had to ... but i'm still guessing that it was a language-issue.


On the good side, I glanced at the Repute.FAC files in the other saved modules and they all look okay. If you come across another hostile who should be friendly, or a friendly who should be hostile, I can give you a script to run from the console that should take care of it; but if a bigger problem persists you'd do much better to find another way. (eg, English version) but i really don't know what caused it

hopefully it works on your end too,

  • up
    100%
  • down
    0%
Dimy

OMG that works just fine, thank you so much!! I almost lost any hope, but you made things work again! Every NPC in the area behaves normally now. The only character that is still hostile to me is an injured wolf-druid. I don’t think he is critical to the game, but if you could give me a script I will fix it too.

And I think your theory about language issue is right. I use Russian version of NWN 2 as it’s my native language and my laptop and Windows are Canadian. I already had issues with language incompatibility while using some other software, so it can really be the reason. This is the first time I got such thing in NWN tho and hopefully will not experience it in future :)

  • up
    50%
  • down
    50%
kevL's

can you compile a script ..?

 

// 'stophostile'
//
// Put this script in your \Override folder and compile it.
//
// Right-click target a non PC-faction creature and execute this script from the
// console, while controlling your main character.
//
// `
// DebugMode 1
// RunScript stophostile
// DebugMode 0
// `


// Changes player's current target to the standard COMMONER faction.
void main()
{
    object oTarget = GetPlayerCurrentTarget(OBJECT_SELF);
    if (GetIsObjectValid(oTarget)
        && GetObjectType(oTarget) == OBJECT_TYPE_CREATURE
        && !GetIsObjectValid(GetFactionLeader(oTarget)))
    {
        SendMessageToPC(OBJECT_SELF, "<c=blue>stophostile :</c> " + GetName(oTarget)
                + " ( " + GetTag(oTarget) + " ) is now a member of the Commoner faction.");

        ChangeToStandardFaction(oTarget, STANDARD_FACTION_COMMONER);
        AssignCommand(oTarget, ClearAllActions(TRUE));
    }
    else
        SendMessageToPC(OBJECT_SELF, "<c=blue>stophostile :</c> <c=red>ERROR : </c> target a non-party creature");
}

 

  • up
    100%
  • down
    0%
Dimy

Yes, now everything works perfect. Thank you so much for your help!!!

  • up
    50%
  • down
    50%
kevL's

/cheers !

  • up
    50%
  • down
    50%