# User Data (Ability Command)
Grammar — User Data (userType, instance, field, index)
Flags —Native
|Function
Returns a value from user data for the given type, instance, and field. User data is defined in the Data module.
# Arguments
string
<gamelink::User> — User Typestring
<userinstance> — Instancestring
<userfield> — Fieldint
— Index
Returns — abilcmd
native abilcmd UserDataGetAbilCmd(
string inType,
string inInstance,
string inField,
int inIndex,
);
# Related
Category: User Data / Get Value
- Load User Data Value Into Variable
- User Data (Ability Command) —
abilcmd
— UserDataGetAbilCmd - User Data (Actor) —
string
<gamelink::Actor> — UserDataGetActor - User Data (Color) —
color
— UserDataGetColor - User Data (Compare) —
int
<preset::UserDataCompare> — UserDataGetCompare - User Data (Game Link) —
string
<gamelink> — UserDataGetGameLink - User Data (Image) —
string
<filepath> — UserDataGetImagePath - User Data (Image Edge) —
int
<preset::TextTagEdge> — UserDataGetImageEdge - User Data (Image Attach) —
string
<preset::AttachPoints> — UserDataGetImageAttachPoint - User Data (Integer) —
int
— UserDataGetInt - User Data (Model) —
string
<gamelink::Model> — UserDataGetModel - User Data (Movie) —
string
<filepath> — UserDataGetMovie - User Data (Real) —
fixed
— UserDataGetFixed - User Data (Sound) —
string
<gamelink::Sound> — UserDataGetSound - User Data (String) —
string
— UserDataGetString - User Data (Text) —
text
— UserDataGetText - User Data (Unit) —
string
<gamelink::Unit> — UserDataGetUnit - User Data (Upgrade) —
string
<gamelink::Upgrade> — UserDataGetUpgrade - User Data (User Type) —
string
<gamelink::User> — UserDataGetUserType - User Data (User Instance) —
string
<userinstance> — UserDataGetUserInstance
# Examples
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5511
lv_indexTech = 1;
for ( ; ( (auto4087A5D1_ai >= 0 && lv_indexTech <= auto4087A5D1_ae) || (auto4087A5D1_ai < 0 && lv_indexTech >= auto4087A5D1_ae) ) ; lv_indexTech += auto4087A5D1_ai ) {
if ((UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", lv_indexTech) != null)) {
TechTreeAbilityAllow(libVoiC_gv_pCC_SoAPlayerSlot, UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", lv_indexTech), lv_allowDisallow);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5512
for ( ; ( (auto4087A5D1_ai >= 0 && lv_indexTech <= auto4087A5D1_ae) || (auto4087A5D1_ai < 0 && lv_indexTech >= auto4087A5D1_ae) ) ; lv_indexTech += auto4087A5D1_ai ) {
if ((UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", lv_indexTech) != null)) {
TechTreeAbilityAllow(libVoiC_gv_pCC_SoAPlayerSlot, UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", lv_indexTech), lv_allowDisallow);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5589
// Implementation
if ((AbilityCommandGetAbility(UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", 1)) != null)) {
return TechTreeAbilityIsAllowed(1, UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", 1));
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5590
// Implementation
if ((AbilityCommandGetAbility(UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", 1)) != null)) {
return TechTreeAbilityIsAllowed(1, UserDataGetAbilCmd("CampaignPerk", lp_ability, "AbilityCommand", 1));
}
else {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5719
// Automatic Variable Declarations
// Implementation
return libVoiC_gf_CostOfAbility(AbilityCommandGetAbility(UserDataGetAbilCmd("CampaignPerk", lp_campaignPerk, "AbilityCommand", 1)), "Energy");
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:4973
auto51705059_ai = auto51705059_ai+1;
if( libVoiC_gf_PC_PerkGroupOfPerk(lv_indexPerk) == lv_indexPerkGroup ) {
lv_indexCommand = UserDataGetAbilCmd("CampaignPerk", lv_indexPerk, "AbilityCommand", 1);
if ((UnitAbilityCheck(libVCUI_gv_pU_GPUnit, AbilityCommandGetAbility(lv_indexCommand), true) == true) && (UnitCheckAbilCmdState(libVCUI_gv_pU_GPUnit, lv_indexCommand, c_cmdStateDisabled) == false)) {
UISetButtonHighlighted(PlayerGroupAll(), lv_indexCommand, lp_onOff);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:17944
lv_instance = UserDataInstance(libGame_gv_wheelCmdUserType, lv_i);
lv_pingIndex = UserDataGetInt(libGame_gv_wheelCmdUserType, lv_instance, "PingIndex", 1);
lv_cmd = UserDataGetAbilCmd("TheWheelOfCommand", lv_instance, "Command", 1);
lv_dummyEffect = UserDataGetGameLink(libGame_gv_wheelCmdUserType, lv_instance, "WheelDiffEffect", 1);
lv_maxPingIndex = MaxI(lv_maxPingIndex, lv_pingIndex);
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:2654
lv_commandIndex = 1;
for ( ; ( (autoA574F886_ai >= 0 && lv_commandIndex <= autoA574F886_ae) || (autoA574F886_ai <= 0 && lv_commandIndex >= autoA574F886_ae) ) ; lv_commandIndex += autoA574F886_ai ) {
if ((UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_commandIndex) != null)) {
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_commandIndex), lv_allowDisallow);
}
mods/missionpacks/campaigncommon.sc2mod — base.sc2data/LibComC.galaxy:2655
for ( ; ( (autoA574F886_ai >= 0 && lv_commandIndex <= autoA574F886_ae) || (autoA574F886_ai <= 0 && lv_commandIndex >= autoA574F886_ae) ) ; lv_commandIndex += autoA574F886_ai ) {
if ((UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_commandIndex) != null)) {
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_commandIndex), lv_allowDisallow);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNovC.galaxy:1842
lv_abilityIndex = 1;
for ( ; ( (autoE0B1E26B_ai >= 0 && lv_abilityIndex <= autoE0B1E26B_ae) || (autoE0B1E26B_ai <= 0 && lv_abilityIndex >= autoE0B1E26B_ae) ) ; lv_abilityIndex += autoE0B1E26B_ai ) {
if ((UserDataGetAbilCmd("CampaignPerk", lp_equipment, "AbilityCommand", lv_abilityIndex) != null)) {
TechTreeAbilityAllow(libNovC_gv_nCC_NovaPlayerSlot, UserDataGetAbilCmd("CampaignPerk", lp_equipment, "AbilityCommand", lv_abilityIndex), lv_allowDisallow);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNovC.galaxy:1843
for ( ; ( (autoE0B1E26B_ai >= 0 && lv_abilityIndex <= autoE0B1E26B_ae) || (autoE0B1E26B_ai <= 0 && lv_abilityIndex >= autoE0B1E26B_ae) ) ; lv_abilityIndex += autoE0B1E26B_ai ) {
if ((UserDataGetAbilCmd("CampaignPerk", lp_equipment, "AbilityCommand", lv_abilityIndex) != null)) {
TechTreeAbilityAllow(libNovC_gv_nCC_NovaPlayerSlot, UserDataGetAbilCmd("CampaignPerk", lp_equipment, "AbilityCommand", lv_abilityIndex), lv_allowDisallow);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1065
lv_index = 1;
for ( ; ( (autoFFFE3F17_ai >= 0 && lv_index <= autoFFFE3F17_ae) || (autoFFFE3F17_ai < 0 && lv_index >= autoFFFE3F17_ae) ) ; lv_index += autoFFFE3F17_ai ) {
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("PlayerPrestige", lp_prestige, "DisableAbil", lv_index), false);
}
auto2AF6D99E_ae = UserDataFieldValueCount("PlayerPrestige", "EnableAbil");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1070
lv_index = 1;
for ( ; ( (auto2AF6D99E_ai >= 0 && lv_index <= auto2AF6D99E_ae) || (auto2AF6D99E_ai < 0 && lv_index >= auto2AF6D99E_ae) ) ; lv_index += auto2AF6D99E_ai ) {
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("PlayerPrestige", lp_prestige, "EnableAbil", lv_index), true);
}
auto8173B652_ae = UserDataFieldValueCount("PlayerPrestige", "SuppressUpgrade");
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:1686
// Automatic Variable Declarations
// Implementation
return UserDataGetAbilCmd("PlayerCommanders", lp_commander, "ReviveAbilityCommand", 1);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:2110
lv_indexTech = 1;
for ( ; ( (autoDA1B9A8E_ai >= 0 && lv_indexTech <= autoDA1B9A8E_ae) || (autoDA1B9A8E_ai < 0 && lv_indexTech >= autoDA1B9A8E_ae) ) ; lv_indexTech += autoDA1B9A8E_ai ) {
if ((UserDataGetAbilCmd("PlayerCommanders", lv_playerCommander, "DefaultAbilityCommands", lv_indexTech) != null)) {
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("PlayerCommanders", lv_playerCommander, "DefaultAbilityCommands", lv_indexTech), true);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:2111
for ( ; ( (autoDA1B9A8E_ai >= 0 && lv_indexTech <= autoDA1B9A8E_ae) || (autoDA1B9A8E_ai < 0 && lv_indexTech >= autoDA1B9A8E_ae) ) ; lv_indexTech += autoDA1B9A8E_ai ) {
if ((UserDataGetAbilCmd("PlayerCommanders", lv_playerCommander, "DefaultAbilityCommands", lv_indexTech) != null)) {
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("PlayerCommanders", lv_playerCommander, "DefaultAbilityCommands", lv_indexTech), true);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3371
lv_indexTech = 1;
for ( ; ( (auto4087A5D1_ai >= 0 && lv_indexTech <= auto4087A5D1_ae) || (auto4087A5D1_ai < 0 && lv_indexTech >= auto4087A5D1_ae) ) ; lv_indexTech += auto4087A5D1_ai ) {
if ((UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_indexTech) != null)) {
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_indexTech), lv_allowDisallow);
if ((libCOOC_gv_cC_DebugTechSuperSpam == true)) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3372
for ( ; ( (auto4087A5D1_ai >= 0 && lv_indexTech <= auto4087A5D1_ae) || (auto4087A5D1_ai < 0 && lv_indexTech >= auto4087A5D1_ae) ) ; lv_indexTech += auto4087A5D1_ai ) {
if ((UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_indexTech) != null)) {
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_indexTech), lv_allowDisallow);
if ((libCOOC_gv_cC_DebugTechSuperSpam == true)) {
TextExpressionSetToken("Param/Expression/lib_COOC_94AB0648", "A", StringToText((AbilityCommandGetAbility(UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_indexTech)))));
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:3374
TechTreeAbilityAllow(lp_player, UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_indexTech), lv_allowDisallow);
if ((libCOOC_gv_cC_DebugTechSuperSpam == true)) {
TextExpressionSetToken("Param/Expression/lib_COOC_94AB0648", "A", StringToText((AbilityCommandGetAbility(UserDataGetAbilCmd("CampaignPerk", lp_perk, "AbilityCommand", lv_indexTech)))));
TextExpressionSetToken("Param/Expression/lib_COOC_94AB0648", "B", libNtve_gf_ConvertBooleanToText(lv_allowDisallow));
TriggerDebugOutput(1, TextExpressionAssemble("Param/Expression/lib_COOC_94AB0648"), true);
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2040
lv_abilityReplacementInstance = UserDataInstance(auto65265E94_userType, auto65265E94_i);
if ((UserDataGetUserInstance("LegendAbilityReplacements", lv_abilityReplacementInstance, "Legend", 1) == libWCdr_gf_GetLegendInstanceForPlayer(lp_legendPlayer)) && (UserDataGetGameLink("LegendAbilityReplacements", lv_abilityReplacementInstance, "AbilityReplacement", 1) == "")) {
TechTreeAbilityAllow(lp_legendPlayer, UserDataGetAbilCmd("LegendAbilityReplacements", lv_abilityReplacementInstance, "AbilityToReplace", 1), false);
}
else if ((UserDataGetUserInstance("LegendAbilityReplacements", lv_abilityReplacementInstance, "Legend", 1) == libWCdr_gf_GetLegendInstanceForPlayer(lp_legendPlayer))) {