Difference between revisions of "Script/HeroParty"
From SF3
(Created page with "==class HeroParty== === Class Methods === {| border='0' style ='border:solid 1px #eeeedd; color: black; width: 1200px;background-color: #ffffcc;' cellspacing='0' cellpadding=...") |
(→Class Methods) |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==class HeroParty== | ==class HeroParty== | ||
− | + | An interface which can be used to interact with a player's hero characters. | |
+ | |||
=== Class Methods === | === Class Methods === | ||
{| 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;' | '''AreAutoAttacksEnabled''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''are auto attacks currently enabled for the hero party?'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''EnableAutoAttacks''' (const [[../BasicDataTypes|bool]] ''_bEnable'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''enable or disable auto attacks for the hero party'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''EnableExperienceGain''' (const [[../BasicDataTypes|bool]] ''_bEnable'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''enable experience gain'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetLevel''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get current hero party level'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../string|string[]@]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetAllItems''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get a list of all items in the party's inventory (does not include items currently equipped by heroes; duplicate items will not be included)'' | ||
|- | |- | ||
| 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;' | '''AddItems''' (const [[../BasicDataTypes|string]]&in ''_sItemTechnicalName'', const [[../BasicDataTypes|uint]] ''_uAmount'') | | style='color: black; width: 90%; line-height: 0.8;' | '''AddItems''' (const [[../BasicDataTypes|string]]&in ''_sItemTechnicalName'', const [[../BasicDataTypes|uint]] ''_uAmount'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''add an item to the hero party's inventory'' | ||
|- | |- | ||
| 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;' | '''RemoveItems''' (const [[../BasicDataTypes|string]]&in ''_sItemTechnicalName'', const [[../BasicDataTypes|uint]] ''_uAmount'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RemoveItems''' (const [[../BasicDataTypes|string]]&in ''_sItemTechnicalName'', const [[../BasicDataTypes|uint]] ''_uAmount'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''remove the given amount of the given item from the hero party's inventory'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''HasItems''' (const [[../BasicDataTypes|string]]&in ''_sItemTechnicalName'', const [[../BasicDataTypes|uint]] ''_uAmount'') const | | style='color: black; width: 90%; line-height: 0.8;' | '''HasItems''' (const [[../BasicDataTypes|string]]&in ''_sItemTechnicalName'', const [[../BasicDataTypes|uint]] ''_uAmount'') const | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''check whether the hero party has at least _uAmount of the given item in their inventory'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetItemAmount''' (const [[../BasicDataTypes|string]]&in ''_sItemTechnicalName'') const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get the number of items of the given type currently in the party inventory'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''AddGold''' (const [[../BasicDataTypes|uint]] ''_uAmount'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''add the given amount of gold coins to the party's coin pouch'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''RemoveGold''' (const [[../BasicDataTypes|uint]] ''_uAmount'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''remove up to _uAmount of gold coins from the party's coin pouch (may be less if there is not enough available). returns actual amount removed.'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetGold''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get current amount of gold in the party's coin pouch'' | ||
|- | |- | ||
| style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
| style='color: black; width: 90%; line-height: 0.8;' | '''IsMember''' (const [[../Creature|Creature]]&in ''_Creature'') const | | style='color: black; width: 90%; line-height: 0.8;' | '''IsMember''' (const [[../Creature|Creature]]&in ''_Creature'') const | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''check whether the given creature is currently a member of the hero party'' | ||
|- | |- | ||
| 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;' | '''AddMember''' (const [[../Creature|Creature]]&in ''_Creature'') | | style='color: black; width: 90%; line-height: 0.8;' | '''AddMember''' (const [[../Creature|Creature]]&in ''_Creature'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''add creature to hero party'' | ||
|- | |- | ||
| 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;' | '''RemoveMember''' (const [[../Creature|Creature]]&in ''_Creature'') | | style='color: black; width: 90%; line-height: 0.8;' | '''RemoveMember''' (const [[../Creature|Creature]]&in ''_Creature'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''remove creature from hero party'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../Creature|Creature[]@]] | ||
+ | | style='color: black; width: 90%; line-height: 0.8;' | '''GetMembers''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get all current members of the party'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''SetHeroOwned''' (const [[../BasicDataTypes|string]]&in ''_sHeroTechnicalName'', const [[../BasicDataTypes|bool]] ''_bAdjustLevel'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''set hero owned'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''IsGathered''' (const [[../BasicDataTypes|bool]] ''_bShowGatherNotification'') const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''check whether the hero party is currently gathered (if _bShowGatherNotification is true, a notification telling the player to gather their party will be shown)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|bool]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''IsGathered''' (const [[../Entity|Entity]]&in ''_Target'', const [[../BasicDataTypes|bool]] ''_bShowGatherNotification'') const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''check whether the hero party is currently gathered at the target's position. | ||
+ | (if _bShowGatherNotification is true, a notification telling the player to gather their party will be shown)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''Gather''' (const [[../Entity|Entity]]&in ''_Target'' = Entity ( )) | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''forcibly gather the hero party around the target and revive them if necessary (if not target is provided, they will be gathered around the party leader)'' | ||
|- | |- | ||
| 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;' | '''AddExperience''' (const [[../BasicDataTypes|uint]] ''_uAmount'') | | style='color: black; width: 90%; line-height: 0.8;' | '''AddExperience''' (const [[../BasicDataTypes|uint]] ''_uAmount'') | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''award experience to the hero party'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ModifyHeroAttribute''' (const [[../Creature|Creature]]&in ''_Creature'', const [[../LogicEnums#ECreatureAttribute|ECreatureAttribute]] ''_Attribute'', const [[../BasicDataTypes|int8]] ''_iValue'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''modify attribute of the given hero by the given value (note: this will only work when enough attribute points are available)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ResetHeroAttributes''' (const [[../Creature|Creature]]&in ''_Creature'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''reset hero attributes (returning spent attribute points)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''SetAbilityUnavailable''' (const [[../Creature|Creature]]&in ''_Creature'', const [[../BasicDataTypes|string]]&in ''_sAbilityName'', const [[../BasicDataTypes|bool]] ''_bUnavailable'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''set the given ability for the given hero as unavailable'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''UnlockHeroAbility''' (const [[../Creature|Creature]]&in ''_Creature'', const [[../BasicDataTypes|string]]&in ''_sAbilityName'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''unlock the given ability for the given hero, provided the hero has enough ability points available'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''PrepareHeroAbility''' (const [[../Creature|Creature]]&in ''_Creature'', const [[../BasicDataTypes|string]]&in ''_sAbilityName'', const [[../BasicDataTypes|uint]] ''_uSlot'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''prepare the given ability for the given hero, provided the hero has learned this ability'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ResetHeroAbilities''' (const [[../Creature|Creature]]&in ''_Creature'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''reset hero abilities (returning spent ability points)'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''SelectAvatarAbilityTree''' (const [[../BasicDataTypes|string]]&in ''_sAbilityTreeName'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''select avatar ability tree'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''DeselectAvatarAbilityTree''' (const [[../BasicDataTypes|string]]&in ''_sAbilityTreeName'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''deselect avatar ability tree'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''DeselectAllAvatarAbilityTrees''' () | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''deselect all avatar ability trees'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetCurrentRevivalCharges''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get current number of available revival charges'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|uint]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''GetMaxRevivalCharges''' () const | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''get maximum number of revival charges the party can have'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ModifyCurrentRevivalCharges''' (const [[../BasicDataTypes|int]] ''_iCharges'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''modify number of available revival charges by the given value'' | ||
+ | |- | ||
+ | | style='color: blue; width: 10%; text-align:right;line-height: 0.8;' | [[../BasicDataTypes|void]] | ||
+ | | style='color: black; width: 90%; line-height: 1.0;' | '''ModifyMaxRevivalCharges''' (const [[../BasicDataTypes|int]] ''_iCharges'') | ||
+ | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''modify maximum number of revival charges by the given value'' | ||
|- | |- | ||
| 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;' | '''Stop''' () | | style='color: black; width: 90%; line-height: 0.8;' | '''Stop''' () | ||
|- | |- | ||
+ | | | ||
+ | | style = 'color: #505050; line-height: 0.5;' |''stop the entire hero party dead in their tracks.'' | ||
|} | |} |
Latest revision as of 21:52, 8 December 2017
class HeroParty
An interface which can be used to interact with a player's hero characters.
Class Methods
bool | AreAutoAttacksEnabled () const |
are auto attacks currently enabled for the hero party? | |
void | EnableAutoAttacks (const bool _bEnable) |
enable or disable auto attacks for the hero party | |
void | EnableExperienceGain (const bool _bEnable) |
enable experience gain | |
uint | GetLevel () const |
get current hero party level | |
string[]@ | GetAllItems () const |
get a list of all items in the party's inventory (does not include items currently equipped by heroes; duplicate items will not be included) | |
void | AddItems (const string&in _sItemTechnicalName, const uint _uAmount) |
add an item to the hero party's inventory | |
void | RemoveItems (const string&in _sItemTechnicalName, const uint _uAmount) |
remove the given amount of the given item from the hero party's inventory | |
bool | HasItems (const string&in _sItemTechnicalName, const uint _uAmount) const |
check whether the hero party has at least _uAmount of the given item in their inventory | |
uint | GetItemAmount (const string&in _sItemTechnicalName) const |
get the number of items of the given type currently in the party inventory | |
void | AddGold (const uint _uAmount) |
add the given amount of gold coins to the party's coin pouch | |
uint | RemoveGold (const uint _uAmount) |
remove up to _uAmount of gold coins from the party's coin pouch (may be less if there is not enough available). returns actual amount removed. | |
uint | GetGold () const |
get current amount of gold in the party's coin pouch | |
bool | IsMember (const Creature&in _Creature) const |
check whether the given creature is currently a member of the hero party | |
void | AddMember (const Creature&in _Creature) |
add creature to hero party | |
void | RemoveMember (const Creature&in _Creature) |
remove creature from hero party | |
Creature[]@ | GetMembers () const |
get all current members of the party | |
void | SetHeroOwned (const string&in _sHeroTechnicalName, const bool _bAdjustLevel) |
set hero owned | |
bool | IsGathered (const bool _bShowGatherNotification) const |
check whether the hero party is currently gathered (if _bShowGatherNotification is true, a notification telling the player to gather their party will be shown) | |
bool | IsGathered (const Entity&in _Target, const bool _bShowGatherNotification) const |
check whether the hero party is currently gathered at the target's position.
(if _bShowGatherNotification is true, a notification telling the player to gather their party will be shown) | |
void | Gather (const Entity&in _Target = Entity ( )) |
forcibly gather the hero party around the target and revive them if necessary (if not target is provided, they will be gathered around the party leader) | |
void | AddExperience (const uint _uAmount) |
award experience to the hero party | |
void | ModifyHeroAttribute (const Creature&in _Creature, const ECreatureAttribute _Attribute, const int8 _iValue) |
modify attribute of the given hero by the given value (note: this will only work when enough attribute points are available) | |
void | ResetHeroAttributes (const Creature&in _Creature) |
reset hero attributes (returning spent attribute points) | |
void | SetAbilityUnavailable (const Creature&in _Creature, const string&in _sAbilityName, const bool _bUnavailable) |
set the given ability for the given hero as unavailable | |
void | UnlockHeroAbility (const Creature&in _Creature, const string&in _sAbilityName) |
unlock the given ability for the given hero, provided the hero has enough ability points available | |
void | PrepareHeroAbility (const Creature&in _Creature, const string&in _sAbilityName, const uint _uSlot) |
prepare the given ability for the given hero, provided the hero has learned this ability | |
void | ResetHeroAbilities (const Creature&in _Creature) |
reset hero abilities (returning spent ability points) | |
void | SelectAvatarAbilityTree (const string&in _sAbilityTreeName) |
select avatar ability tree | |
void | DeselectAvatarAbilityTree (const string&in _sAbilityTreeName) |
deselect avatar ability tree | |
void | DeselectAllAvatarAbilityTrees () |
deselect all avatar ability trees | |
uint | GetCurrentRevivalCharges () const |
get current number of available revival charges | |
uint | GetMaxRevivalCharges () const |
get maximum number of revival charges the party can have | |
void | ModifyCurrentRevivalCharges (const int _iCharges) |
modify number of available revival charges by the given value | |
void | ModifyMaxRevivalCharges (const int _iCharges) |
modify maximum number of revival charges by the given value | |
void | Stop () |
stop the entire hero party dead in their tracks. |