Add NPC to party WITHOUT making a full companion?
#1
Posté 18 juillet 2013 - 05:22
After eons in PW-land, I'm laying the groundwork for making a module, and need to know how one would add an NPC to a team's roster *without* making them a full companion NPC (aka, so that they can be issued commands, but they don't get to level up).
I'm just past the noob stage in terms of scripting (PW I used to be with had a dedicated scripter, so I did custom content instead, much of which I hope to integrate into said module) and working with the various tuts. If I've overlooked an obvious link please excuse my ignorance.
#2
Posté 18 juillet 2013 - 05:39
#3
Posté 18 juillet 2013 - 06:24
#4
Posté 18 juillet 2013 - 11:39
Another approach would be to give them a custom hearbeat script that constantly sets their XP to zero.
#5
Posté 19 juillet 2013 - 11:28
#6
Posté 19 juillet 2013 - 03:19
Thanks, gents! Seriously doubt I'll get this out by Halloween as I want to (it's horror-based, but will use a lot of CC in it), but that's just a HUGE help.
#7
Posté 19 juillet 2013 - 03:33
#8
Posté 19 juillet 2013 - 03:48
#9
Posté 19 juillet 2013 - 06:55
ga_henchman_remove to remove him/her from your party
ga_henchman_replace to replace one henchman by another
ga_henchman_setmax should you need more than one henchman in your party.
Caution :
- Don't forget to associate the henchman scripts to your henchman (import properties ... group of scripts) or force them when using ga_henchman_add (there is a parameter).
- A henchman can't move to another module of your campaign. Your party must stay is the same module while s/he is in the party. If you need a henchman to follow the party in another module, you must create a new instance of the henchman in the second module and add him/her to the party by script.
#10
Posté 19 juillet 2013 - 07:33
#11
Posté 19 juillet 2013 - 08:26
#12
Posté 19 juillet 2013 - 11:35
I remember from an older module (fergit th' name) there were like 8 or 9 monks and soldiers following my party into a fight with a dragon.
I s'pose it might be limited according to interface realestate - but I have this idea of acquiring a lot of henchman to follow him/her whilst outdoors.
#13
Posté 19 juillet 2013 - 11:42
#14
Posté 20 juillet 2013 - 07:33
Claudius33 wrote...
No, as far as I know. Use globals variables to move variables from instance #1 module 1 to instance #2 module 2. BTW, in that case you don't need to attach variables to the henchman. Globals are always available whatever the module.
Be careful with global variables and campaign variables. AFAIK, they are stored in an xml file and can be accessed from any module. That also means that they are not persistent with regards to a save, i.e. if you load an older savegame, you might end up with the variable values of your last game. You can use them to transfer information from one module to the next on a module transition in your campaign, but write them immediately before leaving module A, and read them immediately after loading module B and store them into local variables again.
#15
Posté 20 juillet 2013 - 08:45
diophant wrote...
Be careful with global variables and campaign variables. AFAIK, they are stored in an xml file and can be accessed from any module. That also means that they are not persistent with regards to a save, i.e. if you load an older savegame, you might end up with the variable values of your last game.
Globals are consistent regarding the saves. There is one global.xml file in each save folder, i.e. if you load an older savegame, the globals will be in the state they were at the time of the save.
For instance that is how the only one time conversation nodes in a campaign companion conversation are handled.
Actually globals and local varioables attached to the PC or a companion work the same way except that in a save folder, you find the corresponding variables in :
- global.xml for globals
- playerlist.ifo for local variables attached to the PC (including the journal), VarTable section
- rostername_of_a companion.ros for the locals variables attached to a companion.
Modifié par Claudius33, 20 juillet 2013 - 11:01 .
#16
Posté 20 juillet 2013 - 09:45
Claudius33 wrote...
diophant wrote...
Be careful with global variables and campaign variables. AFAIK, they are stored in an xml file and can be accessed from any module. That also means that they are not persistent with regards to a save, i.e. if you load an older savegame, you might end up with the variable values of your last game.
Globals are consistent regarding the saves. There is one global.xml in each save folder, i.e. if you load an older savegame, the globals will be in the state they were at the time of the save.
For instance that is how the only one time conversation nodes in a campaign companion conversation are handled.
Actually globals and local varioables attached to the PC or a companion work the same way except that in a save folder, you find the cooresponding variables in :You find an instance of these files in every save folder consisent with the time of the save.
- global.xml for globals
- playerlist.ifo for local variables attached to the PC (including the journal), VarTable section
- rostername_of_a companion.ros for the locals variables attached to a companion.
Good to know, thanks for the info :-)
#17
Posté 20 juillet 2013 - 11:10
#18
Posté 20 juillet 2013 - 12:15
what you were saying *is* true for campaign variables ... they get stored in the /database folder. hence an older save game would pick up their most recent, 'persistent' state.





Retour en haut







