SHOUT.BCS broken AI behavior
swit
Member, Translator (NDA) Posts: 495
I see that there are quite a few changes done to the SHOUT.BCS script. The most important one is changing how the innocents reacts to Shout 99. Instead of turning to "enemy" like in BG1 and BG2:EE, they stay "blue" after hearing that someone is attacked and triggers RunAwayFromNoLeaveArea (run away from the specified creature, for the specified time, without leaving the current area).
This causes beyond ridicules situations in which no one really reacts hostile to your actions. And you can still speak to creatures that are running away from you like nothing really happened. Here is an example:
1. Start a new game with the any pregen character
2. C: MoveToArea("AR2301")
3. Attack any innocent character there
4. Watch the famous Bentley Mirrorshade run away from you instead of protecting his Inn like in BG1. Talk to any character that are running away from you (you should not be able to do that).
This is just an example. This behavior is true in most areas due to how common shout.bcs is used. In original game (and in BG2:EE) not every innocent class person will run away (of course most will), some will fight you if they hear shout 99. Not sure if this is change done in the latest 1.3 beta, but just in case I summon @Dee
btw. if you are going to keep some improvements in SHOUT.BCS script (things like STATE_STONE_DEATH and STATE_FROZEN_DEATH, more realistic AI reaction dependent on the Alignment etc.), or any other common script, the same changes should be done to BG2:EE, imo. Currently almost all these common scripts that have been updated in BG:EE use the vanilla BG2 versions in BG2:EE.
edit: I've attached a fix that brings back BG1 behavior while still keeping the AI improvements. Added 2 blocks that will turn Innocent class creature hostile if the innocent cre is evil and you attack someone with evil aligement, and if the innocent cre is not evil and you attack someone with good or neutral aligement. Otherwise they will run while keeping blue status, like in current version. Innocent class will never "MoveToObject(LastHeardBy(Myself))" like other classes. If they don't have anything else in thier scripts to control thier behavior, they will run even while being hostile (like BG1 and BG2:EE). There is also BG2:EE version attached with all improvements from BG:EE (the only difference is additional shout 57 and to shorten it up I've used OR trigger for both shouts). Using BG2:EE version in both games may be a good idea since that additional shout spreads the shout range (only by non innocent classes that have been turned to hostile) which is a more realistic approach, imo. Of course this need to be tested becouse I don't know what was the reason for changing the default behavior.
This causes beyond ridicules situations in which no one really reacts hostile to your actions. And you can still speak to creatures that are running away from you like nothing really happened. Here is an example:
1. Start a new game with the any pregen character
2. C: MoveToArea("AR2301")
3. Attack any innocent character there
4. Watch the famous Bentley Mirrorshade run away from you instead of protecting his Inn like in BG1. Talk to any character that are running away from you (you should not be able to do that).
This is just an example. This behavior is true in most areas due to how common shout.bcs is used. In original game (and in BG2:EE) not every innocent class person will run away (of course most will), some will fight you if they hear shout 99. Not sure if this is change done in the latest 1.3 beta, but just in case I summon @Dee
btw. if you are going to keep some improvements in SHOUT.BCS script (things like STATE_STONE_DEATH and STATE_FROZEN_DEATH, more realistic AI reaction dependent on the Alignment etc.), or any other common script, the same changes should be done to BG2:EE, imo. Currently almost all these common scripts that have been updated in BG:EE use the vanilla BG2 versions in BG2:EE.
edit: I've attached a fix that brings back BG1 behavior while still keeping the AI improvements. Added 2 blocks that will turn Innocent class creature hostile if the innocent cre is evil and you attack someone with evil aligement, and if the innocent cre is not evil and you attack someone with good or neutral aligement. Otherwise they will run while keeping blue status, like in current version. Innocent class will never "MoveToObject(LastHeardBy(Myself))" like other classes. If they don't have anything else in thier scripts to control thier behavior, they will run even while being hostile (like BG1 and BG2:EE). There is also BG2:EE version attached with all improvements from BG:EE (the only difference is additional shout 57 and to shorten it up I've used OR trigger for both shouts). Using BG2:EE version in both games may be a good idea since that additional shout spreads the shout range (only by non innocent classes that have been turned to hostile) which is a more realistic approach, imo. Of course this need to be tested becouse I don't know what was the reason for changing the default behavior.
Post edited by swit on
0
Comments
For most innocents (e.g., townsfolk), the BGEE version of the SHOUT script is very reasonable. They'll fight if they are directly attacked, but run for cover in a generally hostile situation.
Also, it's not like you see somebody murdering another person in the street and because of that you turn hostile toward the killer (well, according to the game engine, you won't).
If one doesn't want to make everyone red-circled, but still wants to stop the fleeing npcs from talking to you, you could add the "DialogInterrupt(FALSE)" command to SHOUT.BCS. This state isn't saved, so after the PCs left and came back, the townsfolk would talk to you again.
So what about BG2:EE? Is it going to be implemented there too?
Again, though, this all happened about two years ago, so I could be misremembering the details of why it happened.