Any advice for building multi-module campaigns?
#1
Posté 19 mai 2012 - 07:07
#2
Posté 21 mai 2012 - 11:11
I tend to build my databases by name, that way I can access info across multiple modules.
For instance, for the Persistent Storage I Just named the database...
"GEN_STORAGE"
For the Gold Bank I simply name it "GEN_GP_BANK"
Etc etc...
If you use the Player's CD Key (make sure you check for online/offline mode) for the variable name, then it's stored for all characters with that CD Key (just use OBJECT_INVALID for the object in the last part of the function to store info to the database)
If you use oPC as the object, then only that PC can access the information stored in the database.
Example...
SetCampaignInt("GEN_XP_BANK", sCDKEY, nXP, OBJECT_INVALID);
For Module Specific Database Storage..
SetCampaignInt(GetName(GetModule()), sVarName, nInt, oPC); // oPC is used because only info on THIS character is used, instead of any character the PC uses...
Very simple really...
Modifié par _Guile, 21 mai 2012 - 11:13 .
#3
Posté 24 mai 2012 - 10:54
#4
Posté 24 mai 2012 - 04:25
One thing that I like to do is to store PC focused data directly on the PC's skin. To learn more about this look at the script include "x3_inc_skin" and its associated functions.
http://palmergames.c...3_inc_skin.html
#5
Posté 24 mai 2012 - 11:17
One thing I did find and was never able to get around, though, was that henchmen transferred through the database seemed to have their faction permanently contaminated in some way. They were fine when they were hired into the party right away at the beginning, but if they were ever removed from it they immediately became hostile. Perhaps there's a simple solution to this that I just didn't know about, but I ended up re-creating them from fresh blueprints in each new module (after script-transferring items to their new selves).
henesua wrote...
There are many ways to store data in NWN.
One thing that I like to do is to store PC focused data directly on the PC's skin. To learn more about this look at the script include "x3_inc_skin" and its associated functions.
http://palmergames.c...3_inc_skin.html
That sounds intriguing. I'll have to check that out.
#6
Posté 11 juin 2012 - 03:02
Is there definitely no workaround? That's kind of a problem if the player gets to choose how the henchman levels up.AndarianTD wrote...
I do this using the campaign database. If you want to see a working example, check out my first module, and look over the script "sa_start_chap2" to see how data is saved for transfer to the next chapter. Then look in my second module at the script "sa2_start_ch2" to see how that data is retrieved from the database.
One thing I did find and was never able to get around, though, was that henchmen transferred through the database seemed to have their faction permanently contaminated in some way. They were fine when they were hired into the party right away at the beginning, but if they were ever removed from it they immediately became hostile. Perhaps there's a simple solution to this that I just didn't know about, but I ended up re-creating them from fresh blueprints in each new module (after script-transferring items to their new selves).henesua wrote...
There are many ways to store data in NWN.
One thing that I like to do is to store PC focused data directly on the PC's skin. To learn more about this look at the script include "x3_inc_skin" and its associated functions.
http://palmergames.c...3_inc_skin.html
That sounds intriguing. I'll have to check that out.
#7
Posté 29 décembre 2012 - 02:54
Thanks all!
#8
Posté 06 janvier 2013 - 08:21
You can create your own player skin and manage it yourself. The x3_inc_skin routines simply make it easier by providing you with pre-made scripts for handling skins.
I've never tried to transfer henchmen via a database. I can only guess that the problem with henchies turning hostile is because they're based on a blueprint which is hostile by default and saving to a database automatically reverts a blueprint to its base faction.
I'd guess that the solution would be to create your own henchmen blueprints, not based on any existing blueprints (since that would cause the same problem), and make sure their faction is "defender" or something else non-hostile by default.
I hope that this info is useful.





Retour en haut






