Sure, just give the Database a Unique Name, which is used by code in all modules...
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 .