logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Node ID numbers

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Thu Jul 31, 2008 16:13    Post subject: Node ID numbers Reply with quote

Code:
int GetCurrentNodeType();
int GetCurrentNodeID();
int GetCurrentAbsoluteNodeID();
string GetCurrentNodeText(int nLangID = LANGUAGE_ENGLISH, int nGender = GENDER_MALE);
void SetCurrentNodeText(string sText, int nLangID = LANGUAGE_ENGLISH, int nGender = GENDER_MALE);
int GetSelectedNodeID();
int GetSelectedAbsoluteNodeID();
string GetSelectedNodeText(int nLangID = LANGUAGE_ENGLISH, int nGender = GENDER_MALE);


i want to use the functions above to be able to create one script to handle certain conversations. But i dont fully understand how to use the above commands.

i want to do a switch on the node numbers, but am not sure which command to use as there are a few to use
Back to top
View user's profile Send private message
SpiderX



Joined: 14 Aug 2007
Posts: 12

PostPosted: Fri Aug 01, 2008 10:52    Post subject: Reply with quote

You can see how I do it.
This is not actually what you want, but this may give you an idea how to do what you want.
This system gives a possibility to have 1 script file instead of 1 conversation resource and lots of script files to make this conversation work.
So 1 conversation = 1 script file.
It`s based on the great ZZ-Dialog system (you can search for it on the nwvault).

If you want to try in game how it works, you`ll need a 1.69, nwnx_events and nwnx_hashset plugins.
Also you have to change following line in your nwnx2.ini file
Code:

[EVENTS]
event_script=global_events
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Fri Aug 01, 2008 17:58    Post subject: Reply with quote

If you're using z-dialogue/zz-dialogue you don't need this function, since that tracks nodes in a psuedoarray. Z-dialogue does have its limits, however, because of a biobug that causes conversation lines to appear blank at times. If you want an example of these functions being used in normal bioware conversations, look at the linux version of SIMTools, which features command popup windows using the nodes (you don't need linux to open the mod in the toolset).

Funky
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Fri Aug 01, 2008 18:04    Post subject: Reply with quote

Are you saying that this is built into the simtools? Because i am using your system
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Fri Aug 01, 2008 18:51    Post subject: Reply with quote

Yes, it's built into the linux version, in the command popup system. The conditional script is fky_chat_cn_cond, and the action script is fky_chat_cn_act. The .so comes in the linux package on the SIMTools page on the Vault.

Funky
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Fri Aug 01, 2008 19:55    Post subject: Reply with quote

it is very posible that the SimTools i have is from when i was still running a windows box. This sounds like i might want to check this tho.

How can i tell by looking thru the scripts if the SimTools install was a linux or windows platform. Because i may be able to answer some questions that way. Tho i work from windows at home and linux by server, but it just means i cant test at home
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Sat Aug 02, 2008 2:36    Post subject: Reply with quote

By checking to see if it has the scripts I named.

Funky
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Sat Aug 02, 2008 2:38    Post subject: Reply with quote

well i do so i do have the right version. I looked thru that script and one question i have is how they are numbed. Can you just start at the root and just hit the down key and count them.

I would like to be able to simple say if the node number is this {}
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Sat Aug 02, 2008 2:41    Post subject: Reply with quote

They start from the bottom up, but reverse for branches. I'm not even going to try to describe it in more detail that that. Just set up a player or module SpeakString of the node numbers at the beginning of the action taken script, and you'll get a feel for it. One word of warning, it makes changing the conversationg tricky, because you have to recalculate nodes every time you do.

Funky
Back to top
View user's profile Send private message
Extreme



Joined: 28 Nov 2007
Posts: 135

PostPosted: Sat Aug 02, 2008 2:43    Post subject: Reply with quote

i understand and can imagine that much.

ok so this is to be a action taken and not a TAW?
and exactly what command would be used for it? GetSelectedAbsoluteNodeID?
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Sat Aug 02, 2008 5:24    Post subject: Reply with quote

I suggest you try them all so you see the differences.

Funky
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group