Posted by: rreinier
« on: May 23, 2004, 03:08:50 PM »OK, I'll test it as soon as possible. I'll warn you beforehand that I have my finals the coming week, but I'll try to test it as soon as possible
Shouldn't that be ";_; ;_; ;_; ;_; ;_;"?
It doesn't use less variables, but you've got less script running at any one time.I think the only constantly running script that my method needs is a check if reputation has just changed.
Looping scripts are even less healthy, as they mean it takes ages to do anything.That wouldn't really matter, I think, since the script only plays when you initiate dialog with an NPC. It's not playing constantly...
I'm not sure how your method uses less variables. It also seems to use one for each NPC...It doesn't use less variables, but you've got less script running at any one time. In theory. Except it probably wouldn't anyway. A tenner says your way works far better.
I think it would be possible by making a loop in the script, which keeps playing until the "old reputation" and the "current reputation" are the same, and adds one to both the "old reputation" and the "NPC happiness" each time...Looping scripts are even less healthy, as they mean it takes ages to do anything.
EDIT: a problem that occured to me with your method: The happiness variable of an NPC would change only after he/she joins the party, which would mean that it would be possible for him/her to join a party which acts completely contrary to his/her beliefs, making the NPC leave immediately after. My method allows the NPC to check his/her happiness in the "d'you want to join us (again)"-dialog, allowing them to decline if they're not happy about the party.Having the happiness variable set to reputation initially isn't a problem.
- When an NPC rejoins, the current reputation variable is compared with the reputation variable set when they left. The difference is added to their happiness. This is hard because calculations like this are tricky in the IE.I think it would be possible by making a loop in the script, which keeps playing until the "old reputation" and the "current reputation" are the same, and adds one to both the "old reputation" and the "NPC happiness" each time...
Next question: how do we display the happiness of each NPC for the player to see?To answer your question with a question: DO we display the happiness of each NPC for the player to see? I'd say no, because the player can always hear the "unhappy" sounds of the NPC, so he/she would know anyway if he's getting close to the edge. Also, this variable wouldn't work the same for each NPC. For good NPC's, a high value would be good, while for evil ones, a low one would be best.
I worry it may look daft to have potentially 5 NPCs leaving all at once. Although on consideration, it's probably not such an unreasonable proposition. Any idea how Bioware did it? I have a feeling with Virtue you'll never hear the breaking point voice clips...did you in vanilla BG2?I thought the ultimate point of virtue was repercussions for your actions - the best way to tell anyone you disagree with them, so resoundly, is to leave in that fashion. It's too ..thoughtful to have other hoops to jump through; the PC should know - they killed that last peasant, Aerie didn't like that too much.