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

NameValueBrief Description
X0_DATABASE_DEFAULTnw_campaign_db_default
X0_DATABASE_XP1nw_campaign_db_xp1

Functions

NameBrief Description
DeleteCampaignDBVariableDelete a campaign variable.
GetCampaignDBFloatGet a campaign float on a player in the default database for this module.
GetCampaignDBIntGet a campaign integer on a player in the default database for this module.
GetCampaignDBLocationGet a campaign location on a player in the default database for this module.
GetCampaignDBNameReturn the name of the campaign database that should be used for this module (or a default value if none).
GetCampaignDBStringGet a campaign string on a player in the default database for this module.
GetCampaignDBVectorGet a campaign vector on a player in the default database for this module.
RetrieveCampaignDBObjectGet 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.
SetCampaignDBFloatSet a campaign float on a player in the default database for this module.
SetCampaignDBIntSet a campaign int on a player in the default database for this module.
SetCampaignDBLocationSet a campaign location on a player in the default database for this module.
SetCampaignDBStringSet a campaign string on a player in the default database for this module.
SetCampaignDBVectorSet a campaign vector on a player in the default database for this module.
StoreCampaignDBObjectStore a campaign object on a player in the default database for this module.


  author: Mistress