Difference between revisions of "Script/World"

From SF3
Jump to: navigation, search
(Created page with "==class World== (Script Name: @c World) The main interface for interacting with the level the player is currently in. === Class Methods === {| border='0' style ='border:solid...")
 
(World Map / Travel)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==class World==
 
==class World==
(Script Name: @c World) The main interface for interacting with the level the player is currently in.
+
The main interface for interacting with the global game state, persistent across all levels.
 +
 
 
=== Class Methods ===
 
=== Class Methods ===
 +
==== World Map / Travel ====
 
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''IsTravelAllowed''' () const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''is travelling (leaving the level/fast travelling) currently allowed?''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''AllowTravel''' (const [[../BasicDataTypes|bool]] ''_bAllow'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set whether the player is allowed to leave the current level or fast travel within it.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetWorldMapId''' () const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''get current world map id''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetWorldMapId''' (const [[../BasicDataTypes|uint]] ''_uMapId'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set id of the map to which to travel when pressing the world map button''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''IsMapAccessible''' (const [[../BasicDataTypes|uint]] ''_uMapId'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''is the given level currently accessible?''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetMapAccessible''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|bool]] ''_bAccessible'' = true, const [[../BasicDataTypes|uint8]] ''_uSetting'' = uint8 ( - 1 ))
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set whether the given map is accessible by the player from the world map.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''IsRaceSelectionAllowed''' (const [[../BasicDataTypes|uint]] ''_uMapId'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''is the player allowed to choose an RTS race to control upon entering this map?''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetRaceSelectionAllowed''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|bool]] ''_bAllow'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set whether the player is allowed to choose an RTS race to control upon entering the map.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''AreHeroesAllowedToSpawn''' (const [[../BasicDataTypes|uint]] ''_uMapId'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''should heroes be spawned when entering the given map.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''AllowHeroesToSpawn''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|bool]] ''_bAllow'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set whether heroes should be spawned when entering the given map.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''IsUpdatingHeroesToSpawnAllowed''' (const [[../BasicDataTypes|uint]] ''_uMapId'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''should heroes to spawn be updated while within the given map.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''AllowUpdatingHeroesToSpawn''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|bool]] ''_bAllow'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set whether heroes to spawn should be updated while within the given map.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''ShowFinalChoice''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|bool]] ''_bShow'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''show final choice when selecting the given map.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''AllowFullPartyManagement''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|uint8]] ''_uSetting'', const [[../BasicDataTypes|bool]] ''_bAllow'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set whether the player is allowed to manage ALL of their owned heroes on the given map in the given setting.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint8]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetCurrentMapSetting''' (const [[../BasicDataTypes|uint]] ''_uMapId'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''get the current setting for the given map''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetMapSetting''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|uint8]] ''_uSetting'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set the active setting for the given map. the setting change will only take effect the next time the level is visited.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetMapEntryPoint''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|string]]&in ''_sEntryPoint'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set the entry point for _uMapId. will be used when the player travels to the map the next time.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../string|string[]@]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetRequiredHeroes''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|uint8]] ''_uSetting'' = uint8 ( - 1 )) const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''get technical names of heroes required to be selected on the given map in the given setting (defaults to current setting)''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetRequiredHeroes''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|uint8]] ''_uSetting'', const [[../string|string[]]]&in ''_HeroNames'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set list of technical names of heroes required to be selected on the given map in the given setting''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''TravelToMap''' (const [[../BasicDataTypes|uint]] ''_uMapId'', const [[../BasicDataTypes|uint8]] ''_uSetting'' = uint8 ( - 1 ), const [[../BasicDataTypes|string]]&in ''_sEntryPoint'' = "")
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''go to the given map in the given setting (or current setting, if not specified)''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''EndGame''' ()
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''quit the game and return to main menu''
 +
|-
 +
|}
 +
 +
==== Blueprints ====
 +
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''IsBlueprintUnlocked''' (const [[../BasicDataTypes|string]]&in ''_sBlueprintName'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''is the given blueprint currently unlocked?''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''UnlockBlueprint''' (const [[../BasicDataTypes|string]]&in ''_sBlueprintName'', const [[../BasicDataTypes|bool]] ''_bTemporary'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''unlock the blueprint of this name for the player (if _bTemporary is true, the blueprint will be re-locked as soon as the player leaves the current level)''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''IsBlueprintUpgradeUnlocked''' (const [[../BasicDataTypes|string]]&in ''_sBlueprintName'', const [[../BasicDataTypes|string]]&in ''_sUpgradeName'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''is the given upgrade for the given blueprint currently unlocked?''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''UnlockBlueprintUpgrade''' (const [[../BasicDataTypes|string]]&in ''_sBlueprintName'', const [[../BasicDataTypes|string]]&in ''_sUpgradeName'', const [[../BasicDataTypes|bool]] ''_bTemporary'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''unlock the given blueprint upgrade (if _bTemporary is true, the upgrade will be re-locked as soon as the player leaves the current level)''
 +
|}
 +
 +
==== Glossary ====
 +
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''UnlockGlossaryEntry''' (const [[../BasicDataTypes|string]]&in ''_sTechnicalName'', const [[../BasicDataTypes|uint]] ''_uStage'' = 0)
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''unlock the given glossary entry (if the entry has multiple stages, 0 unlocks the basic entry with the first paragraph, 1 the second, and so on)''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''UnlockGlossaryTargetParagraph''' (const [[../BasicDataTypes|string]]&in ''_sTechnicalName'', const [[../BasicDataTypes|string]]&in ''_sTargetName'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''unlock the target paragraph of glossary entry _sTechnicalName pertaining to _sTargetName''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''UnlockAllGlossaryTargetParagraphs''' (const [[../BasicDataTypes|string]]&in ''_sTechnicalName'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''unlock all target paragraphs of the glossary entry _sTechnicalName''
 +
|-
 +
|}
 +
 +
==== Dialogues ====
 +
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''DoesDialogueContainerExist''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''check whether the given dialogue container exists''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''DoesDialogueTopicExist''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''check whether the given dialogue topic exists''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|string[]@]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetEnabledTopics''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''get all currently enabled topics within the given container.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|string[]@]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetValidTopics''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''get all topics in the given container which are enabled and can be initiated at this very moment (checks script conditions, required participants, range, etc.).''
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
Line 8: Line 216:
 
|-
 
|-
 
|
 
|
| style = 'color: #505050; line-height: 0.5;' |''get the random number generator''
+
| style = 'color: #505050; line-height: 0.5;' |''enable or disable the given dialogue topic''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''EnableDialogueTopicGlobal''' (const [[../BasicDataTypes|string]]&in ''_sFileName'', const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'', const [[../BasicDataTypes|bool]] ''_bEnabled'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''enable/disable a dialogue topic that may not present in this level''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''IsDialogueTopicEnabled''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''is the given dialogue topic currently enabled?''
 
|-
 
|-
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]  
 
| style='color: black; width: 90%; line-height: 0.8;' | '''BlockDialogueTopicNode''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sNodeName'')
 
| style='color: black; width: 90%; line-height: 0.8;' | '''BlockDialogueTopicNode''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sNodeName'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''disable a dialogue topic node''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''BlockDialogueTopicNodeGlobal''' (const [[../BasicDataTypes|string]]&in ''_sFileName'', const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sNodeName'')
 
|-
 
|-
 
|
 
|
Line 21: Line 247:
 
|
 
|
 
| style = 'color: #505050; line-height: 0.5;' |''enable a dialogue topic node''
 
| style = 'color: #505050; line-height: 0.5;' |''enable a dialogue topic node''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''UnblockDialogueTopicNodeGlobal''' (const [[../BasicDataTypes|string]]&in ''_sFileName'', const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sNodeName'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''enable a dialogue topic node''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetDialogueTopicImportant''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'', const [[../BasicDataTypes|bool]] ''_bImportant'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set whether the given dialogue topic is considered important''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''IsDialogueTopicImportant''' (const [[../BasicDataTypes|string]]&in ''_sContainerName'', const [[../BasicDataTypes|string]]&in ''_sTopicName'') const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''is the given dialogue topic important?''
 +
|-
 +
|}
 +
 +
==== Global Variables ====
 +
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetGlobalBool''' (const [[../BasicDataTypes|string]]&in ''_sVarName'', const [[../BasicDataTypes|bool]] ''_bDefault'' = false) const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''get global variable of type bool''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|int]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetGlobalInt''' (const [[../BasicDataTypes|string]]&in ''_sVarName'', const [[../BasicDataTypes|int]] ''_iDefault'' = - 1) const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''get global variable of type integer''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetGlobalBool''' (const [[../BasicDataTypes|string]]&in ''_sVarName'', const [[../BasicDataTypes|bool]] ''_bValue'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set global variable of type bool''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''SetGlobalInt''' (const [[../BasicDataTypes|string]]&in ''_sVarName'', const [[../BasicDataTypes|int]] ''_iValue'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''set global variable of type integer''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''RemoveGlobalVar''' (const [[../BasicDataTypes|string]]&in ''_sVarName'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''remove the given global variable''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../string|string[]@]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetGlobalVarNamesInCategory''' (const [[../BasicDataTypes|string]]&in ''_sCategoryName'', const [[../BasicDataTypes|bool]] ''_bFullVarNames'' = true) const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''get a list of all variable names in the given category. if _bFullVarNames is false, the returned names will not contain the "_sCategoryName." prefix.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../dictionary|dictionary@]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''GetGlobalVarsInCategory''' (const [[../BasicDataTypes|string]]&in ''_sCategoryName'', const [[../BasicDataTypes|bool]] ''_bFullVarNames'' = true) const
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 1.0;' |''get a dictionary mapping all variable names in the given category to their respective values (all represented as integers).
 +
if _bFullVarNames is false, the key names will not contain the "_sCategoryName." prefix.''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''ClearGlobalVarCategory''' (const [[../BasicDataTypes|string]]&in ''_sCategoryName'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''remove all global variables in the given category''
 +
|}
 +
 +
==== Creature Drop Lists ====
 +
{| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding='7'
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''AddItemToCreatureDrops''' (const [[../BasicDataTypes|string]]&in ''_sCreatureDescriptionName'', const [[../BasicDataTypes|string]]&in ''_sItemName'', const [[../BasicDataTypes|uint]] ''_uAmount'', const [[../BasicDataTypes|uint8]] ''_uPercentChance'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''add a chance to drop the given item to any creature with the given description name''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''RemoveItemFromCreatureDrops''' (const [[../BasicDataTypes|string]]&in ''_sCreatureDescriptionName'', const [[../BasicDataTypes|string]]&in ''_sItemName'', const [[../BasicDataTypes|uint]] ''_uAmount'', const [[../BasicDataTypes|uint8]] ''_uPercentChance'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''remove a specific previously added entry from the given creature's list of drops''
 +
|-
 +
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]]
 +
| style='color: black; width: 90%; line-height: 1.0;' | '''RemoveItemFromCreatureDrops''' (const [[../BasicDataTypes|string]]&in ''_sCreatureDescriptionName'', const [[../BasicDataTypes|string]]&in ''_sItemName'')
 +
|-
 +
|
 +
| style = 'color: #505050; line-height: 0.5;' |''remove any previously added entry with the given item from the given creature's list of drops''
 
|}
 
|}

Latest revision as of 10:55, 16 January 2018

class World

The main interface for interacting with the global game state, persistent across all levels.

Class Methods

World Map / Travel

bool IsTravelAllowed () const
is travelling (leaving the level/fast travelling) currently allowed?
void AllowTravel (const bool _bAllow)
set whether the player is allowed to leave the current level or fast travel within it.
uint GetWorldMapId () const
get current world map id
void SetWorldMapId (const uint _uMapId)
set id of the map to which to travel when pressing the world map button
bool IsMapAccessible (const uint _uMapId) const
is the given level currently accessible?
void SetMapAccessible (const uint _uMapId, const bool _bAccessible = true, const uint8 _uSetting = uint8 ( - 1 ))
set whether the given map is accessible by the player from the world map.
bool IsRaceSelectionAllowed (const uint _uMapId) const
is the player allowed to choose an RTS race to control upon entering this map?
void SetRaceSelectionAllowed (const uint _uMapId, const bool _bAllow)
set whether the player is allowed to choose an RTS race to control upon entering the map.
bool AreHeroesAllowedToSpawn (const uint _uMapId) const
should heroes be spawned when entering the given map.
void AllowHeroesToSpawn (const uint _uMapId, const bool _bAllow)
set whether heroes should be spawned when entering the given map.
bool IsUpdatingHeroesToSpawnAllowed (const uint _uMapId) const
should heroes to spawn be updated while within the given map.
void AllowUpdatingHeroesToSpawn (const uint _uMapId, const bool _bAllow)
set whether heroes to spawn should be updated while within the given map.
void ShowFinalChoice (const uint _uMapId, const bool _bShow)
show final choice when selecting the given map.
void AllowFullPartyManagement (const uint _uMapId, const uint8 _uSetting, const bool _bAllow)
set whether the player is allowed to manage ALL of their owned heroes on the given map in the given setting.
uint8 GetCurrentMapSetting (const uint _uMapId) const
get the current setting for the given map
void SetMapSetting (const uint _uMapId, const uint8 _uSetting)
set the active setting for the given map. the setting change will only take effect the next time the level is visited.
void SetMapEntryPoint (const uint _uMapId, const string&in _sEntryPoint)
set the entry point for _uMapId. will be used when the player travels to the map the next time.
string[]@ GetRequiredHeroes (const uint _uMapId, const uint8 _uSetting = uint8 ( - 1 )) const
get technical names of heroes required to be selected on the given map in the given setting (defaults to current setting)
void SetRequiredHeroes (const uint _uMapId, const uint8 _uSetting, const string[]&in _HeroNames)
set list of technical names of heroes required to be selected on the given map in the given setting
void TravelToMap (const uint _uMapId, const uint8 _uSetting = uint8 ( - 1 ), const string&in _sEntryPoint = "")
go to the given map in the given setting (or current setting, if not specified)
void EndGame ()
quit the game and return to main menu

Blueprints

bool IsBlueprintUnlocked (const string&in _sBlueprintName) const
is the given blueprint currently unlocked?
void UnlockBlueprint (const string&in _sBlueprintName, const bool _bTemporary)
unlock the blueprint of this name for the player (if _bTemporary is true, the blueprint will be re-locked as soon as the player leaves the current level)
bool IsBlueprintUpgradeUnlocked (const string&in _sBlueprintName, const string&in _sUpgradeName) const
is the given upgrade for the given blueprint currently unlocked?
void UnlockBlueprintUpgrade (const string&in _sBlueprintName, const string&in _sUpgradeName, const bool _bTemporary)
unlock the given blueprint upgrade (if _bTemporary is true, the upgrade will be re-locked as soon as the player leaves the current level)

Glossary

void UnlockGlossaryEntry (const string&in _sTechnicalName, const uint _uStage = 0)
unlock the given glossary entry (if the entry has multiple stages, 0 unlocks the basic entry with the first paragraph, 1 the second, and so on)
void UnlockGlossaryTargetParagraph (const string&in _sTechnicalName, const string&in _sTargetName)
unlock the target paragraph of glossary entry _sTechnicalName pertaining to _sTargetName
void UnlockAllGlossaryTargetParagraphs (const string&in _sTechnicalName)
unlock all target paragraphs of the glossary entry _sTechnicalName

Dialogues

bool DoesDialogueContainerExist (const string&in _sContainerName) const
check whether the given dialogue container exists
bool DoesDialogueTopicExist (const string&in _sContainerName, const string&in _sTopicName) const
check whether the given dialogue topic exists
string[]@ GetEnabledTopics (const string&in _sContainerName) const
get all currently enabled topics within the given container.
string[]@ GetValidTopics (const string&in _sContainerName) const
get all topics in the given container which are enabled and can be initiated at this very moment (checks script conditions, required participants, range, etc.).
void EnableDialogueTopic (const string&in _sContainerName, const string&in _sTopicName, const bool _bEnabled)
enable or disable the given dialogue topic
void EnableDialogueTopicGlobal (const string&in _sFileName, const string&in _sContainerName, const string&in _sTopicName, const bool _bEnabled)
enable/disable a dialogue topic that may not present in this level
bool IsDialogueTopicEnabled (const string&in _sContainerName, const string&in _sTopicName) const
is the given dialogue topic currently enabled?
void BlockDialogueTopicNode (const string&in _sContainerName, const string&in _sNodeName)
disable a dialogue topic node
void BlockDialogueTopicNodeGlobal (const string&in _sFileName, const string&in _sContainerName, const string&in _sNodeName)
disable a dialogue topic node
void UnblockDialogueTopicNode (const string&in _sContainerName, const string&in _sNodeName)
enable a dialogue topic node
void UnblockDialogueTopicNodeGlobal (const string&in _sFileName, const string&in _sContainerName, const string&in _sNodeName)
enable a dialogue topic node
void SetDialogueTopicImportant (const string&in _sContainerName, const string&in _sTopicName, const bool _bImportant)
set whether the given dialogue topic is considered important
bool IsDialogueTopicImportant (const string&in _sContainerName, const string&in _sTopicName) const
is the given dialogue topic important?

Global Variables

bool GetGlobalBool (const string&in _sVarName, const bool _bDefault = false) const
get global variable of type bool
int GetGlobalInt (const string&in _sVarName, const int _iDefault = - 1) const
get global variable of type integer
void SetGlobalBool (const string&in _sVarName, const bool _bValue)
set global variable of type bool
void SetGlobalInt (const string&in _sVarName, const int _iValue)
set global variable of type integer
void RemoveGlobalVar (const string&in _sVarName)
remove the given global variable
string[]@ GetGlobalVarNamesInCategory (const string&in _sCategoryName, const bool _bFullVarNames = true) const
get a list of all variable names in the given category. if _bFullVarNames is false, the returned names will not contain the "_sCategoryName." prefix.
dictionary@ GetGlobalVarsInCategory (const string&in _sCategoryName, const bool _bFullVarNames = true) const
get a dictionary mapping all variable names in the given category to their respective values (all represented as integers).

if _bFullVarNames is false, the key names will not contain the "_sCategoryName." prefix.

void ClearGlobalVarCategory (const string&in _sCategoryName)
remove all global variables in the given category

Creature Drop Lists

void AddItemToCreatureDrops (const string&in _sCreatureDescriptionName, const string&in _sItemName, const uint _uAmount, const uint8 _uPercentChance)
add a chance to drop the given item to any creature with the given description name
void RemoveItemFromCreatureDrops (const string&in _sCreatureDescriptionName, const string&in _sItemName, const uint _uAmount, const uint8 _uPercentChance)
remove a specific previously added entry from the given creature's list of drops
void RemoveItemFromCreatureDrops (const string&in _sCreatureDescriptionName, const string&in _sItemName)
remove any previously added entry with the given item from the given creature's list of drops

class World

(Script Name: @c World) The main interface for interacting with the level the player is currently in.

Class Methods

void EnableDialogueTopic (const string&in _sContainerName, const string&in _sTopicName, const bool _bEnabled)
get the random number generator
void BlockDialogueTopicNode (const string&in _sContainerName, const string&in _sNodeName)
disable a dialogue topic node
void UnblockDialogueTopicNode (const string&in _sContainerName, const string&in _sNodeName)
enable a dialogue topic node