Aller au contenu

Photo

Alignment changes problematic?


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 655 messages
Hi everyone. I have a lot of alignment changes and dialogue options going on through dialogues in my campaign. Sometime I use ga_alignment, sometimes ga_align_good_evil or law_chaos.
As I was testing, I noticed that when I talk to an NPC and I choose the line to speak, sometimes I get no notification that my alignment changed.
Everytime the line spoken is in the end of the dialogue it works fine, but when it's somewhere in the middle there's no message. Now, I can't recall from the OC if that was the case, or if I used something wrongly.
When the dialogue is over, and I scroll up in chat to see if anything is mentioned, I see no message that anything has changed.
So to sup up : Playing as a neutral character, choosing an evil option, I get no " Your alignment has shifted towards evil". This happened through playtesting so I didn't check which script I was using in that particular dialogue. Does any of these scripts not working properly? Or it's just no message whilst through the dialogue and not in the end?

#2
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

andysks wrote...

Hi everyone. I have a lot of alignment changes and dialogue options going on through dialogues in my campaign. Sometime I use ga_alignment, sometimes ga_align_good_evil or law_chaos.
As I was testing, I noticed that when I talk to an NPC and I choose the line to speak, sometimes I get no notification that my alignment changed.
Everytime the line spoken is in the end of the dialogue it works fine, but when it's somewhere in the middle there's no message. Now, I can't recall from the OC if that was the case, or if I used something wrongly.
When the dialogue is over, and I scroll up in chat to see if anything is mentioned, I see no message that anything has changed.
So to sup up : Playing as a neutral character, choosing an evil option, I get no " Your alignment has shifted towards evil". This happened through playtesting so I didn't check which script I was using in that particular dialogue. Does any of these scripts not working properly? Or it's just no message whilst through the dialogue and not in the end?


Hi andysks,

Alignment shifting can be a little confusing when first used in scripting (because it works in "boundaries"), especially when dealing with neutral starting point. Check out this link from the wiki: http://nwn2.wikia.com/wiki/Alignment

This Lexicon page may also be useful for you: http://www.nwnlexico...AdjustAlignment See the remarks about "boundaries".

It may be that your changes are not significant enough (to make the comment about the change show) until the changes that come at the end of the conversation.

If these links don't help (or I have misunderstood your issue), then I apologise.

Cheers,
Lance.


EDIT: That all said, I ended up writing my own alignment functions due to the confusion I was having. Here is an example of the Evil and Chaotic version. The Good / Law version is similar. Alter/Edit for your own needs if it helps:-

NOTE: This is a cut down version of my own function

///////////////////////////////////////////////////////////////////////////////////////////////////
// Function    : EvilChaoticActivity By Lance Botelle (Part of the Real Life System)
// Description : Alters alignment of all party PCs for an evil or chaotic activity. (E.g. Illegal looting.)
///////////////////////////////////////////////////////////////////////////////////////////////////
void EvilChaoticActivity(object oPC, int Evil = 10, int Chaos = 10);
void EvilChaoticActivity(object oPC, int Evil = 10, int Chaos = 10)
{
 
 object oFM = GetFirstFactionMember(oPC, FALSE);
 
 while(oFM != OBJECT_INVALID)
 { 
 if(Evil > 0){AdjustAlignment(oFM, ALIGNMENT_EVIL, Evil);}
 if(Chaos > 0){AdjustAlignment(oFM, ALIGNMENT_CHAOTIC, Chaos);}
 
 oFM = GetNextFactionMember(oPC, FALSE);
 } 
 
}

Modifié par Lance Botelle, 21 août 2013 - 05:54 .


#3
andysks

andysks
  • Members
  • 1 655 messages
Well yes it is quite confusing the way it's described. I did some tests now and I think I figured it out. Thanks for the reply Lance.