x0_i0_campaign
Library for setting variables solely for specific campaigns. These use the "Campaign" variable functions.
General idea: check the module for a local string variable called "X0_CAMPAIGN_DB". Use the value of this variable as the database name.
Attention module makers:
- To give your module a custom database, just add a line like this to the "OnModuleLoad" event script for your module:
SetLocalString(GetModule(), "X0_CAMPAIGN_DB", "name_for_your_db_here");
- You can then use all of the XP1 scripts with no other changes needed.
- Do NOT modify this library, as you would have to recompile ALL of the scripts that use this include file either directly or indirectly for the changes to actually work.
If no such variable is set, check to see if the module tag matches a 'known module' tag (this is for official expansions only!) and attempt to set the variable. If no known variable found, set it to a default value.
Constants
Name | Value | Brief Description | X0_DATABASE_DEFAULT | nw_campaign_db_default | X0_DATABASE_XP1 | nw_campaign_db_xp1 |
---|
Functions
Name | Brief Description |
---|---|
DeleteCampaignDBVariable | Delete a campaign variable. |
GetCampaignDBFloat | Get a campaign float on a player in the default database for this module. |
GetCampaignDBInt | Get a campaign integer on a player in the default database for this module. |
GetCampaignDBLocation | Get a campaign location on a player in the default database for this module. |
GetCampaignDBName | Return the name of the campaign database that should be used for this module (or a default value if none). |
GetCampaignDBString | Get a campaign string on a player in the default database for this module. |
GetCampaignDBVector | Get a campaign vector on a player in the default database for this module. |
RetrieveCampaignDBObject | Get a campaign object stored on a player in the default database for this module. You should use DeleteCampaignDBVariable to remove the object once you are done retrieving it, or else the database will bloat. |
SetCampaignDBFloat | Set a campaign float on a player in the default database for this module. |
SetCampaignDBInt | Set a campaign int on a player in the default database for this module. |
SetCampaignDBLocation | Set a campaign location on a player in the default database for this module. |
SetCampaignDBString | Set a campaign string on a player in the default database for this module. |
SetCampaignDBVector | Set a campaign vector on a player in the default database for this module. |
StoreCampaignDBObject | Store a campaign object on a player in the default database for this module. |
author: Mistress