BioWare Atari
BioWare Info BioWare Spiele Support Foren Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home

NWN 1: Scripting

Neues Thema    Antwort posten


    Zu meinen Themen hinzufügen

   Zum Ende springen

Autor Trouble with text appears when script in convo
Grymlorde
Game Owner
Profil: GrymlordeNWN
NWN: SoU
NWN: HotU


Beigetreten: 03 Mai 2002
Von: Grymlorde
Gepostet: Samstag, 07 November 2009 02:22
For my generic henchman conversation, I'd like for the first line to appear if the NPC's alignment is diametrically opposed to the PC (e.g. Chaotic Evil v. Lawful Good). That first line would be "Bug off" or something.

The issue is the conditional script for the Text Appears When. I'm trying to have the condition be "If Lawful Good PC is talking to Chaotic Evil NPC."I've tried several versions of this script and can't get it to compile. What am I doing wrong? Any help would be much appreciated!
NWScript:

View Post/Code in separate window


_________________
The Grymlorde™
--------------
Christmas Placeables and NPCs by Nethy and the Grymlorde™
  Profil: Grymlorde   Nachricht verschicken an: Grymlorde
DM-Taino
Game Owner
Profil: DM-TainoNWN
NWN: SoU
NWN: HotU
NWN 2


Beigetreten: 03 Nov 2005
Gepostet: Samstag, 07 November 2009 03:15
By using the Script Generator I came up with this for you. If the PC talking with the NPC is LG, he will say Bugger off. If the PC is CE, there greeted with open arms. And if they are not either alignment then s/he won't speak with them.

It compiles and hopes it works for you.
NWScript:

View Post/Code in separate window




DMT
  Profil: DM-Taino   Nachricht verschicken an: DM-Taino
Grymlorde
Game Owner
Profil: GrymlordeNWN
NWN: SoU
NWN: HotU


Beigetreten: 03 Mai 2002
Von: Grymlorde
Gepostet: Samstag, 07 November 2009 04:32
Quote: Posted 11/07/09 03:15 (GMT) by DM-Taino

By using the Script Generator I came up with this for you. If the PC talking with the NPC is LG, he will say Bugger off. If the PC is CE, there greeted with open arms. And if they are not either alignment then s/he won't speak with them.

It compiles and hopes it works for you.

DMT
Thanks DM-Taino, but not quite what I had in mind. I guess I didn't do a good job explaining what I'm trying to accomplish.

I'm building a generic henchman conversation dialog. The very first node will only appear if the potential henchman's (a NPC at this point) alignment is diametrically opposed to the PC. For example, a LG PC talking to a CE NPC will see a conversation node of 'Bug off' whereas all other aligned PCs who talk to the henchman will not get that node and thus will be able to acquire the henchman.

Naturally for that node to be conditional, I have to have a script in the TextAppearsWhen field (which you knew already). Ideally, I would like only one script to check all possible alignments so that I don't have to write 9 different nodes (or customize the generic convo for each NPC). From what I understand, the TextAppearsWhen field scripts are all conditional, i.e. start with "int StartingConditional()" and end with return TRUE or return FALSE.

Since Bioware checks separately for Law/Chaos and Good/Evil, I don't know a good way to set a single condition for PC == Lawful && Good && NPC == Chaotic && Evil. And of course replicate it for NG/NE, CG/LE, etc. I had thought the logic would be something like

NWScript:

View Post/Code in separate window


I couldn't figure that one out so I tried switch case statements and that didn't either.

Any other suggestions? Thanks in advance!
_________________
The Grymlorde™
--------------
Christmas Placeables and NPCs by Nethy and the Grymlorde™
  Profil: Grymlorde   Nachricht verschicken an: Grymlorde
Axe Murderer
Game Owner
Profil: Axe MurdererNWN
NWN: SoU
NWN: HotU


Beigetreten: 16 Jun 2003
Von: California U S A Red, White, & Bluuu
Gepostet: Samstag, 07 November 2009 09:26
NWScript:

View Post/Code in separate window

  Profil: Axe Murderer   Nachricht verschicken an: Axe Murderer
Grymlorde
Game Owner
Profil: GrymlordeNWN
NWN: SoU
NWN: HotU


Beigetreten: 03 Mai 2002
Von: Grymlorde
Gepostet: Samstag, 07 November 2009 09:56
Quote: Posted 11/07/09 09:26 (GMT) by Axe Murderer

NWScript:

View Post/Code in separate window

Thanks a bunch! However, the script didn't compile. "(4): ERROR: NO RIGHT BRACKET ON EXPRESSION" For the life of me, I can't see a missing right bracket. Could there be a different reason for not compiling?
_________________
The Grymlorde™
--------------
Christmas Placeables and NPCs by Nethy and the Grymlorde™
  Profil: Grymlorde   Nachricht verschicken an: Grymlorde
Fester Pot
Game Owner
Profil: Fester PotNWN
NWN: HotU
NWN 2
NWN 2: MotB


Beigetreten: 14 Jul 2004
Gepostet: Samstag, 07 November 2009 10:39
Line #3.

Quote: 
switch( GetAlignmentGoodEvil( oPC)

should be -

Quote: 
switch( GetAlignmentGoodEvil( oPC) )

FP!
_________________
Almraiven
Shadewood
Fate of the Auren
  Profil: Fester Pot   Nachricht verschicken an: Fester Pot
Grymlorde
Game Owner
Profil: GrymlordeNWN
NWN: SoU
NWN: HotU


Beigetreten: 03 Mai 2002
Von: Grymlorde
Gepostet: Samstag, 07 November 2009 11:51
Quote: Posted 11/07/09 22:39 (GMT) by Fester Pot

Line #3.

Quote: 
switch( GetAlignmentGoodEvil( oPC)

should be -

Quote: 
switch( GetAlignmentGoodEvil( oPC) )

FP!
Yep, that was the fix for lines 3, 5, 12, and 17. Thanks for spotting that!

And a big thanks to Axe and Fester for responding so quickly! You guys rock!
_________________
The Grymlorde™
--------------
Christmas Placeables and NPCs by Nethy and the Grymlorde™
  Profil: Grymlorde   Nachricht verschicken an: Grymlorde

Neues Thema    Antwort posten

Was bedeuten diese Symbole?
Wo kann ich mehr über die Benutzung der Foren erfahren?

Jump To:

Foren durchsuchen | Häufige Fragen zu Foren | Foren-Archive

 

 

BioWare Store
Neverwinter Nights 2 Forums
Anzeigen/Verbergen

English
Deutsch
Français
Español
Italiano

Anzeigen/Verbergen

Neueste Bildschirmfotos anzeigen 

Neueste Bildschirmfotos anzeigen
Anzeigen/Verbergen

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Aktuelle Uhrzeit: (Zeit einstellen)
So, 22 November 2009 03:03

Anzeigen/Verbergen

Buy Premium Modules

Top NWN: HotU Modules:
1. Good vs Evil III
2. More...

Top NWN: SoU Modules:
1. Good vs Evil III
2. More...

Top CEP Modules:
1. The Lord of Terror The Diablo Campa...
2. More...

Top Modules - NWVault:
1. Hall of Fame
2. More...

Total Modules: 4423

Anzeigen/Verbergen

5,049,964 BioWare-Benutzer:
  52 Eingeloggt
  0 Verborgen
  209 Gäste

1351 Playing Online
  100% NWN
  101% NWN: SoU
  101% NWN: HotU

447 Registered Guilds

8,768,603 Einträge in den Foren

Neueste Themen in den Foren:
1. 2 newb problems: Lever puzzle, a... (NWN2: Builders - NWN2 Scripting)

2. Vorcha + Krogans o_0 (Mass Effect 2 General Discussion (No Spoilers Allowed))

3. Video games? (NWN 1: General Discussion (No Spoilers Allowed))

4. How to Change the Death Message (NWN 1: Toolset)

5. Toolset work with Vista? (NWN2: Builders - NWN2 Toolset)