View previous topic :: View next topic |
Author |
Message |
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Thu Jul 31, 2008 16:13 Post subject: Node ID numbers |
|
|
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 |
|
|
SpiderX
Joined: 14 Aug 2007 Posts: 12
|
Posted: Fri Aug 01, 2008 10:52 Post subject: |
|
|
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 |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Fri Aug 01, 2008 17:58 Post subject: |
|
|
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 |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Fri Aug 01, 2008 18:04 Post subject: |
|
|
Are you saying that this is built into the simtools? Because i am using your system |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Fri Aug 01, 2008 18:51 Post subject: |
|
|
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 |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Fri Aug 01, 2008 19:55 Post subject: |
|
|
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 |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Sat Aug 02, 2008 2:36 Post subject: |
|
|
By checking to see if it has the scripts I named.
Funky |
|
Back to top |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Sat Aug 02, 2008 2:38 Post subject: |
|
|
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 |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Sat Aug 02, 2008 2:41 Post subject: |
|
|
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 |
|
|
Extreme
Joined: 28 Nov 2007 Posts: 135
|
Posted: Sat Aug 02, 2008 2:43 Post subject: |
|
|
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 |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Sat Aug 02, 2008 5:24 Post subject: |
|
|
I suggest you try them all so you see the differences.
Funky |
|
Back to top |
|
|
|