# User Data (User Instance)

Grammar — User Data (userType, instance, field, index)
FlagsNative | 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 Type
  • string<userinstance> — Instance
  • string<userfield> — Field
  • int — Index

Returns — string<userinstance>

native string UserDataGetUserInstance(
	string inType,
	string inInstance,
	string inField,
	int inIndex,
);

Category: User Data / Get Value

# Examples

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:8391

    }

    return UserDataGetUserInstance("TechUnit", libSwaC_gf_ZS_TechUnitOfArmyCategory(lp_armyCategory), "CalloutAttachment", 1);
}

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:3668

        }
    }
    if (((UserDataGetUserInstance("AmbientScenes", lib281DEC45_gv_zSS_AmbientSceneInstance[lp_sceneIndex], "Sequence Scene", 1) == null) || ((UserDataGetInt("AmbientScenes", lib281DEC45_gv_zSS_AmbientSceneInstance[lp_sceneIndex], "Sequence From Start", 1) == 1) && (TimerGetRemaining(lib281DEC45_gv_zSS_AmbientSceneTimer[lp_sceneIndex][0]) == 0.0)))) {
        lib281DEC45_gv_zSS_AmbientSceneStatus[lp_sceneIndex] = lib281DEC45_ge_ZSS_AmbientSceneStatusType_ZSS_AmbientSceneUnused;
        lib281DEC45_gv_zSS_AmbientSceneCount -= 1;

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:5710

    }
    lib281DEC45_gv_zSS_ActiveConvoBookmarkToken = UserDataGetString("ScriptedScenes", lp_scene, "ConversationToken", 1);
    lib281DEC45_gv_zSS_CurrentConvoChar = UserDataGetUserInstance("ScriptedScenes", lp_scene, "ConvoCharacter", 1);
    lib281DEC45_gf_StartStoryActivity(lib281DEC45_ge_StoryActivities_ScriptedScene);
    UserDataSetInt("ScriptedScenes", lp_scene, "Started", 1, 1);

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:8625

                else {
                }
                lib281DEC45_gf_ZSS_AmbientScenePlay(UserDataGetUserInstance("AmbientScenes", lib281DEC45_gv_zSS_AmbientSceneInstance[lv_index], "Sequence Scene", 1));
                return true;
            }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5092

    // Automatic Variable Declarations
    // Implementation
    return UserDataGetUserInstance("TechUnit", libVoiC_gf_PC_TechUnitOfArmyUnit(lp_armyUnit), "Faction", 1);
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:5656

    // Automatic Variable Declarations
    // Implementation
    return UserDataGetUserInstance("CampaignPerk", lp_campaignPerk, "Group", 1);
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:2824

    lv_eventIndex = 1;
    for ( ; ( (auto054CD9AB_ai >= 0 && lv_eventIndex <= auto054CD9AB_ae) || (auto054CD9AB_ai < 0 && lv_eventIndex >= auto054CD9AB_ae) ) ; lv_eventIndex += auto054CD9AB_ai ) {
        if ((UserDataGetUserInstance("AmbientScenes", lp_scene, "AmbientEvents", lv_eventIndex) != null)) {
            libVCST_gf_PS_AmbientEventPlay(lp_room, lv_sceneIndex, lv_eventIndex, UserDataGetUserInstance("AmbientScenes", lp_scene, "AmbientEvents", lv_eventIndex));
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:2825

    for ( ; ( (auto054CD9AB_ai >= 0 && lv_eventIndex <= auto054CD9AB_ae) || (auto054CD9AB_ai < 0 && lv_eventIndex >= auto054CD9AB_ae) ) ; lv_eventIndex += auto054CD9AB_ai ) {
        if ((UserDataGetUserInstance("AmbientScenes", lp_scene, "AmbientEvents", lv_eventIndex) != null)) {
            libVCST_gf_PS_AmbientEventPlay(lp_room, lv_sceneIndex, lv_eventIndex, UserDataGetUserInstance("AmbientScenes", lp_scene, "AmbientEvents", lv_eventIndex));
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:2854

    // Implementation
    if ((libVCST_gf_PS_AmbientSceneWaitForEventsToFinish(libVCST_gv_pS_AmbientSceneInstance[lp_room][lp_scene]) == true)) {
        if ((UserDataGetUserInstance("AmbientScenes", libVCST_gv_pS_AmbientSceneInstance[lp_room][lp_scene], "NextScene", 1) != null)) {
            libVCST_gv_pS_AmbientSceneStatus[lp_room][lp_scene] = libVCST_ge_PS_AmbientSceneStatusType_PS_AmbientSceneFinished;
            TimerStart(libVCST_gv_pS_AmbientSceneTimer[lp_room][lp_scene], UserDataGetFixed("AmbientScenes", libVCST_gv_pS_AmbientSceneInstance[lp_room][lp_scene], "NextSceneDelay", 1), false, c_timeReal);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:4525

    libVoiC_gv_pC_SceneStatEvent = StatEventLastCreated();
    UserDataSetInt("Scenes", lp_scene, "Played", 1, 1);
    if ((UserDataGetUserInstance("Scenes", lp_scene, "Type", 1) == "Prerender")) {
        libVCST_gf_StartStoryActivity(libVCST_ge_StoryActivities_Cinematic);
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:4894

    if ((libVCST_gv_pS_DebugStoryListType[libVCST_gv_pS_DebugStorySelectedIndex] == "Conversations")) {
        libVCST_gf_PS_DebugStoryCheatHide();
        libVCST_gf_ClickableSetType(UserDataGetUserInstance("Conversations", libVCST_gv_pS_DebugStoryListInstance[libVCST_gv_pS_DebugStorySelectedIndex], "PrimaryCharacter", 1), libVCST_ge_ClickableType_Conversation);
        libVoiC_gf_DispatchCampaignEvent(libVoiC_ge_PC_Event_StoryStoryCheatPlay, "", "", false);
        libVCST_gf_ChangeRoom(libVCST_gf_PS_DebugRoomFromString(UserDataGetString("Conversations", libVCST_gv_pS_DebugStoryListInstance[libVCST_gv_pS_DebugStorySelectedIndex], "Room", 1)));

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:4898

        libVCST_gf_ChangeRoom(libVCST_gf_PS_DebugRoomFromString(UserDataGetString("Conversations", libVCST_gv_pS_DebugStoryListInstance[libVCST_gv_pS_DebugStorySelectedIndex], "Room", 1)));
        UISetWorldVisible(PlayerGroupAll(), true);
        libVCST_gf_PS_ConversationPlayClickable(UserDataGetUserInstance("Conversations", libVCST_gv_pS_DebugStoryListInstance[libVCST_gv_pS_DebugStorySelectedIndex], "PrimaryCharacter", 1));
        libVCST_gf_EnterRoom(libVCST_ge_Rooms_StoryRoomDebugStoryCheat);
        return true;

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:5699

        for ( ; ( (autoF9C823BA_ai >= 0 && lv_indexScene <= autoF9C823BA_ae) || (autoF9C823BA_ai < 0 && lv_indexScene >= autoF9C823BA_ae) ) ; lv_indexScene += autoF9C823BA_ai ) {
            if ((libVCST_gv_pS_AmbientSceneTimer[lv_indexRoom][lv_indexScene] == EventTimer())) {
                lv_nextAmbientScene = UserDataGetUserInstance("AmbientScenes", libVCST_gv_pS_AmbientSceneInstance[lv_indexRoom][lv_indexScene], "NextScene", 1);
                if ((libVCST_gv_pS_AmbientSceneStatus[lv_indexRoom][lv_indexScene] == libVCST_ge_PS_AmbientSceneStatusType_PS_AmbientSceneFinished)) {
                    libVCST_gf_PS_AmbientSceneRemove(lv_indexRoom, lv_indexScene);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:944

    lv_abilityIndex = 1;
    for ( ; ( (auto4949E9FE_ai >= 0 && lv_abilityIndex <= auto4949E9FE_ae) || (auto4949E9FE_ai < 0 && lv_abilityIndex >= auto4949E9FE_ae) ) ; lv_abilityIndex += auto4949E9FE_ai ) {
        if ((UserDataGetUserInstance("TechUnit", lp_campaignTechUnit, "ArmyInfoAbilities", lv_abilityIndex) != null)) {
            lv_ability = UserDataGetUserInstance("TechUnit", lp_campaignTechUnit, "ArmyInfoAbilities", lv_abilityIndex);
            DialogControlSetVisible(libVCUI_gv_pU_ArmyInfoAbility2[lv_abilityIndex], PlayerGroupAll(), true);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:945

    for ( ; ( (auto4949E9FE_ai >= 0 && lv_abilityIndex <= auto4949E9FE_ae) || (auto4949E9FE_ai < 0 && lv_abilityIndex >= auto4949E9FE_ae) ) ; lv_abilityIndex += auto4949E9FE_ai ) {
        if ((UserDataGetUserInstance("TechUnit", lp_campaignTechUnit, "ArmyInfoAbilities", lv_abilityIndex) != null)) {
            lv_ability = UserDataGetUserInstance("TechUnit", lp_campaignTechUnit, "ArmyInfoAbilities", lv_abilityIndex);
            DialogControlSetVisible(libVCUI_gv_pU_ArmyInfoAbility2[lv_abilityIndex], PlayerGroupAll(), true);
            libNtve_gf_SetDialogItemImage(libVCUI_gv_pU_ArmyInfoAbility[lv_abilityIndex], UserDataGetImagePath("CampaignUnitAbilities", lv_ability, "Icon", 1), PlayerGroupAll());

mods/missionpacks/campaigncommon.sc2modbase.sc2data/LibComC.galaxy:1633

    for ( ; ( (autoF75EEEC7_ai >= 0 && lv_index <= autoF75EEEC7_ae) || (autoF75EEEC7_ai <= 0 && lv_index >= autoF75EEEC7_ae) ) ; lv_index += autoF75EEEC7_ai ) {
        lv_sceneTimestamp = UserDataInstance("Timestamps", lv_index);
        if ((UserDataGetUserInstance("Timestamps", lv_sceneTimestamp, "Scene", 1) == lp_scene)) {
            if ((UserDataGetInt("Timestamps", lv_sceneTimestamp, "FromBookmark", 1) == 1) && (lp_fromBookmark == false)) {
                return ;

mods/missionpacks/campaigncommon.sc2modbase.sc2data/LibComC.galaxy:2729

string libComC_gf_CC_PerkGroupOfPerk (string lp_campaignPerk) {
    // Implementation
    return UserDataGetUserInstance("CampaignPerk", lp_campaignPerk, "Group", 1);
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:2473

    lv_eventIndex = 1;
    for ( ; ( (auto054CD9AB_ai >= 0 && lv_eventIndex <= auto054CD9AB_ae) || (auto054CD9AB_ai <= 0 && lv_eventIndex >= auto054CD9AB_ae) ) ; lv_eventIndex += auto054CD9AB_ai ) {
        if ((UserDataGetUserInstance("AmbientScenes", lp_scene, "AmbientEvents", lv_eventIndex) != null)) {
            libNCST_gf_NS_AmbientEventPlay(lp_room, lv_sceneIndex, lv_eventIndex, UserDataGetUserInstance("AmbientScenes", lp_scene, "AmbientEvents", lv_eventIndex));
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:2474

    for ( ; ( (auto054CD9AB_ai >= 0 && lv_eventIndex <= auto054CD9AB_ae) || (auto054CD9AB_ai <= 0 && lv_eventIndex >= auto054CD9AB_ae) ) ; lv_eventIndex += auto054CD9AB_ai ) {
        if ((UserDataGetUserInstance("AmbientScenes", lp_scene, "AmbientEvents", lv_eventIndex) != null)) {
            libNCST_gf_NS_AmbientEventPlay(lp_room, lv_sceneIndex, lv_eventIndex, UserDataGetUserInstance("AmbientScenes", lp_scene, "AmbientEvents", lv_eventIndex));
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:2504

    // Implementation
    if ((libNCST_gf_NS_AmbientSceneWaitForEventsToFinish(libNCST_gv_nS_AmbientSceneInstance[lp_room][lp_scene]) == true)) {
        if ((UserDataGetUserInstance("AmbientScenes", libNCST_gv_nS_AmbientSceneInstance[lp_room][lp_scene], "NextScene", 1) != null)) {
            libNCST_gv_nS_AmbientSceneStatus[lp_room][lp_scene] = libNCST_ge_NS_AmbientSceneStatusType_NS_AmbientSceneFinished;
            TimerStart(libNCST_gv_nS_AmbientSceneTimer[lp_room][lp_scene], UserDataGetFixed("AmbientScenes", libNCST_gv_nS_AmbientSceneInstance[lp_room][lp_scene], "NextSceneDelay", 1), false, c_timeReal);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:3879


    UserDataSetInt("Scenes", lp_scene, "Played", 1, 1);
    if ((UserDataGetUserInstance("Scenes", lp_scene, "Type", 1) == "Prerender")) {
        libNCST_gf_StartStoryActivity(libNCST_ge_StoryActivities_Cinematic);
    }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:4264

    if ((libNCST_gv_nS_DebugStoryListType[libNCST_gv_nS_DebugStorySelectedIndex] == "Conversations")) {
        libNCST_gf_NS_DebugStoryCheatHide();
        libNCST_gf_ClickableSetType(UserDataGetUserInstance("Conversations", libNCST_gv_nS_DebugStoryListInstance[libNCST_gv_nS_DebugStorySelectedIndex], "PrimaryCharacter", 1), libNCST_ge_ClickableType_Conversation);
        libComC_gf_CC_EventDispatch(libNovC_ge_NC_Event_StoryStoryCheatPlay, "", "", false);
        libNCST_gf_ChangeRoom(libNCST_gf_NS_DebugRoomFromString(UserDataGetString("Conversations", libNCST_gv_nS_DebugStoryListInstance[libNCST_gv_nS_DebugStorySelectedIndex], "Room", 1)));

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:4268

        libNCST_gf_ChangeRoom(libNCST_gf_NS_DebugRoomFromString(UserDataGetString("Conversations", libNCST_gv_nS_DebugStoryListInstance[libNCST_gv_nS_DebugStorySelectedIndex], "Room", 1)));
        UISetWorldVisible(PlayerGroupAll(), true);
        libNCST_gf_NS_ConversationPlayClickable(UserDataGetUserInstance("Conversations", libNCST_gv_nS_DebugStoryListInstance[libNCST_gv_nS_DebugStorySelectedIndex], "PrimaryCharacter", 1));
        libNCST_gf_EnterRoom(libNCST_ge_Rooms_StoryRoomDebugStoryCheat);
        return true;

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:4870

        for ( ; ( (autoF9C823BA_ai >= 0 && lv_indexScene <= autoF9C823BA_ae) || (autoF9C823BA_ai <= 0 && lv_indexScene >= autoF9C823BA_ae) ) ; lv_indexScene += autoF9C823BA_ai ) {
            if ((libNCST_gv_nS_AmbientSceneTimer[lv_indexRoom][lv_indexScene] == EventTimer())) {
                lv_nextAmbientScene = UserDataGetUserInstance("AmbientScenes", libNCST_gv_nS_AmbientSceneInstance[lv_indexRoom][lv_indexScene], "NextScene", 1);
                if ((libNCST_gv_nS_AmbientSceneStatus[lv_indexRoom][lv_indexScene] == libNCST_ge_NS_AmbientSceneStatusType_NS_AmbientSceneFinished)) {
                    libNCST_gf_NS_AmbientSceneRemove(lv_indexRoom, lv_indexScene);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:997

    }
    else {
        lv_aIPlayerRace = (CatalogFieldValueGet(c_gameCatalogUnit, UserDataGetUnit("CoopAICommanderTiers", UserDataGetUserInstance("CoopAICommanders", libCOMI_gv_cM_CoopAIPlayer_CommanderShared, "UnitTiers", 1), "PhaseUnits", 1), "Race", lp_player));
    }
    PlayerSetRace(lp_player, lv_aIPlayerRace);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:1190

        lv_tierIndex = 7;
    }
    lv_commanderUnitTier = UserDataGetUserInstance("CoopAICommanders", libCOMI_gv_cM_CoopAIPlayer_Commander[lp_player], "UnitTiers", lv_tierIndex);
    if ((lv_commanderUnitTier == null)) {
        auto4F71B072_ae = libCOMI_ge_CoopAITechLevelBuckets__1Early;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:1195

        lv_tierIndex = libCOMI_ge_CoopAITechLevelBuckets_TechLevel07;
        for ( ; ( (auto4F71B072_ai >= 0 && lv_tierIndex <= auto4F71B072_ae) || (auto4F71B072_ai < 0 && lv_tierIndex >= auto4F71B072_ae) ) ; lv_tierIndex += auto4F71B072_ai ) {
            lv_commanderUnitTier = UserDataGetUserInstance("CoopAICommanders", libCOMI_gv_cM_CoopAIPlayer_Commander[lp_player], "UnitTiers", (lv_tierIndex + 1));
            if ((lv_commanderUnitTier != null)) {
                break;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3271

            lv_exclusiveCommanderIter = 1;
            for ( ; ( (auto3A3C35EB_ai >= 0 && lv_exclusiveCommanderIter <= auto3A3C35EB_ae) || (auto3A3C35EB_ai < 0 && lv_exclusiveCommanderIter >= auto3A3C35EB_ae) ) ; lv_exclusiveCommanderIter += auto3A3C35EB_ai ) {
                if (((UserDataGetUserInstance("CoopAIUpgrade", UserDataInstance("CoopAIUpgrade", lv_upgradeIter), "ExclusiveToCommander", lv_exclusiveCommanderIter) == "None") || (UserDataGetUserInstance("CoopAIUpgrade", UserDataInstance("CoopAIUpgrade", lv_upgradeIter), "ExclusiveToCommander", lv_exclusiveCommanderIter) == libCOMI_gv_cM_CoopAIPlayer_Commander[lp_player]))) {
                    TechTreeUpgradeAddLevel(lp_player, lv_upgrade, 1);
                    break;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3271

            lv_exclusiveCommanderIter = 1;
            for ( ; ( (auto3A3C35EB_ai >= 0 && lv_exclusiveCommanderIter <= auto3A3C35EB_ae) || (auto3A3C35EB_ai < 0 && lv_exclusiveCommanderIter >= auto3A3C35EB_ae) ) ; lv_exclusiveCommanderIter += auto3A3C35EB_ai ) {
                if (((UserDataGetUserInstance("CoopAIUpgrade", UserDataInstance("CoopAIUpgrade", lv_upgradeIter), "ExclusiveToCommander", lv_exclusiveCommanderIter) == "None") || (UserDataGetUserInstance("CoopAIUpgrade", UserDataInstance("CoopAIUpgrade", lv_upgradeIter), "ExclusiveToCommander", lv_exclusiveCommanderIter) == libCOMI_gv_cM_CoopAIPlayer_Commander[lp_player]))) {
                    TechTreeUpgradeAddLevel(lp_player, lv_upgrade, 1);
                    break;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:5013

        for ( ; auto8F99D9A7_i <= UserDataInstanceCount(auto8F99D9A7_userType) ; auto8F99D9A7_i += 1 ) {
            lv_itInstanceStat = UserDataInstance(auto8F99D9A7_userType, auto8F99D9A7_i);
            lv_itStatFaction = UserDataGetUserInstance(libCOMI_gv_cM_HornerStatUserType, lv_itInstanceStat, "Faction", 1);
            if ((lv_itStatFaction == lv_itInstanceFaction)) {
                lv_itStatUnitType = UserDataGetUnit(libCOMI_gv_cM_HornerStatUserType, lv_itInstanceStat, "Unit", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:5049

            for ( ; auto9045C56D_i <= UserDataInstanceCount(auto9045C56D_userType) ; auto9045C56D_i += 1 ) {
                lv_itInstanceStat = UserDataInstance(auto9045C56D_userType, auto9045C56D_i);
                lv_itStatFaction = UserDataGetUserInstance(libCOMI_gv_cM_HornerStatUserType, lv_itInstanceStat, "Faction", 1);
                if ((lv_itStatFaction != lv_itInstanceFaction)) {
                    lv_itStatUnitType = UserDataGetUnit(libCOMI_gv_cM_HornerStatUserType, lv_itInstanceStat, "Unit", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:12522

    for ( ; autoFD293270_i <= UserDataInstanceCount(autoFD293270_userType) ; autoFD293270_i += 1 ) {
        lv_itPlayerInstance = UserDataInstance(autoFD293270_userType, autoFD293270_i);
        lv_itIsCommander = UserDataGetUserInstance(lv_playerUserType, lv_itPlayerInstance, "Is Commander", 1);
        lv_itPlayerId = UserDataGetInt(lv_playerUserType, lv_itPlayerInstance, "Player Id", 1);
        lv_itPresetTeam = UserDataGetUserInstance(lv_playerUserType, lv_itPlayerInstance, "Preset Team", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:12524

        lv_itIsCommander = UserDataGetUserInstance(lv_playerUserType, lv_itPlayerInstance, "Is Commander", 1);
        lv_itPlayerId = UserDataGetInt(lv_playerUserType, lv_itPlayerInstance, "Player Id", 1);
        lv_itPresetTeam = UserDataGetUserInstance(lv_playerUserType, lv_itPlayerInstance, "Preset Team", 1);
        if ((lv_itIsCommander == "True")) {
            libNtve_gf_SetUpgradeLevelForPlayer(lv_itPlayerId, "PlayerCommander", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:4797

            for ( ; autoB22E283B_i <= UserDataInstanceCount(autoB22E283B_userType) ; autoB22E283B_i += 1 ) {
                lv_mutationabominationinstance = UserDataInstance(autoB22E283B_userType, autoB22E283B_i);
                if ((UserDataGetInt("MutationAbominations", lv_mutationabominationinstance, "Points", 1) == lv_pointindexiter) && (libCOMU_gf_MutatorIsEnabled(UserDataGetUserInstance("MutationAbominations", lv_mutationabominationinstance, "Mutator", 1)) == false)) {
                    lv_mutatorsconsideredcount += 1;
                    if ((RandomInt(1, lv_mutatorsconsideredcount) == lv_mutatorsconsideredcount)) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:4800

                    lv_mutatorsconsideredcount += 1;
                    if ((RandomInt(1, lv_mutatorsconsideredcount) == lv_mutatorsconsideredcount)) {
                        libCOMU_gv_cT_MAbomination_Mutators[lv_mutatorindexiter] = UserDataGetUserInstance("MutationAbominations", lv_mutationabominationinstance, "Mutator", 1);
                    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:4975


    libCOMU_gv_cT_MAbomination_ConsideredMutatorsCount = lp_depthLevel;
    libCOMU_gv_cT_MAbomination_ConsideredMutators[lp_depthLevel] = UserDataGetUserInstance("MutationAbominations", UserDataInstance("MutationAbominations", lp_mutationAbominationIndex), "Mutator", 1);
    if ((lv_newpointtotal >= libCOMU_gv_cT_MAbomination_MinPoints) && (lp_depthLevel >= libCOMU_gv_cT_MAbomination_MinMutators)) {
        libCOMU_gv_cT_MAbomination_CombosCounted += 1;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5131

        for ( ; autoC845F325_i <= UserDataInstanceCount(autoC845F325_userType) ; autoC845F325_i += 1 ) {
            lv_countweightinstance = UserDataInstance(autoC845F325_userType, autoC845F325_i);
            if ((UserDataGetInt("MutationDifficultyCountTargets", lv_countweightinstance, "MutatorCount", 1) == lv_countiter) && (libNtve_gf_UserDataInstanceGetIndex("MutationDifficultyLevels", UserDataGetUserInstance("MutationDifficultyCountTargets", lv_countweightinstance, "MinDifficulty", 1)) > lv_bestdifficultymatch)) {
                lv_bestdifficultymatch = libNtve_gf_UserDataInstanceGetIndex("MutationDifficultyLevels", UserDataGetUserInstance("MutationDifficultyCountTargets", lv_countweightinstance, "MinDifficulty", 1));
                lv_bestdifficultymatchtargetweight = UserDataGetFixed("MutationDifficultyCountTargets", lv_countweightinstance, "TargetWeight", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5132

            lv_countweightinstance = UserDataInstance(autoC845F325_userType, autoC845F325_i);
            if ((UserDataGetInt("MutationDifficultyCountTargets", lv_countweightinstance, "MutatorCount", 1) == lv_countiter) && (libNtve_gf_UserDataInstanceGetIndex("MutationDifficultyLevels", UserDataGetUserInstance("MutationDifficultyCountTargets", lv_countweightinstance, "MinDifficulty", 1)) > lv_bestdifficultymatch)) {
                lv_bestdifficultymatch = libNtve_gf_UserDataInstanceGetIndex("MutationDifficultyLevels", UserDataGetUserInstance("MutationDifficultyCountTargets", lv_countweightinstance, "MinDifficulty", 1));
                lv_bestdifficultymatchtargetweight = UserDataGetFixed("MutationDifficultyCountTargets", lv_countweightinstance, "TargetWeight", 1);
                if ((lv_countiter == lp_count)) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:5268

    for ( ; auto55757824_i <= UserDataInstanceCount(auto55757824_userType) ; auto55757824_i += 1 ) {
        lv_mutabominstance = UserDataInstance(auto55757824_userType, auto55757824_i);
        if ((UserDataGetUserInstance("MutationAbominations", lv_mutabominstance, "Mutator", 1) == lp_mutator)) {
            return lv_mutabominstance;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:716

        auto9A82478A_ac = UserDataGetInt("MasteryUpgrades", UserDataInstance("MasteryUpgrades", auto9A82478A_ai), "Category", 1);
        if( auto9A82478A_ac == lp_categoryIndex &&
        libCOOC_gf_ActiveCommanderForPlayer(lp_player) == UserDataGetUserInstance("MasteryUpgrades",UserDataInstance("MasteryUpgrades", auto9A82478A_ai),"Commander",1) ) {
            lv_indexMasteryUpgrade = UserDataInstance("MasteryUpgrades", auto9A82478A_ai);
            lv_pointsSpent += libCOOC_gf_CC_PlayerMasteryUpgradeLevel(lp_player, lv_indexMasteryUpgrade);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:739

    // Automatic Variable Declarations
    // Implementation
    return UserDataGetUserInstance("MasteryUpgrades", lp_masteryUpgrade, "Commander", 1);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:868

        auto37349ADB_ai = auto37349ADB_ai+1;
        auto37349ADB_ac = UserDataGetInt("MasteryUpgrades", UserDataInstance("MasteryUpgrades", auto37349ADB_ai), "Category", 1);
        if( libCOOC_gf_ActiveCommanderForPlayer(lp_player) == UserDataGetUserInstance("MasteryUpgrades",UserDataInstance("MasteryUpgrades", auto37349ADB_ai),"Commander",1) ) {
            lv_indexMasteryUpgrade = UserDataInstance("MasteryUpgrades", auto37349ADB_ai);
            if ((libCOOC_gf_CC_PlayerMasteryUpgradeData(lv_indexMasteryUpgrade) != null)) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:958

    // Implementation
    if ((lv_commander != null)) {
        return UserDataGetUserInstance("PlayerCommanders", lv_commander, "Prestige", libCOOC_gf_CC_PlayerActivePrestigeIndex(lp_player));
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1096

    lv_index = 1;
    for ( ; ( (autoAF2781D7_ai >= 0 && lv_index <= autoAF2781D7_ae) || (autoAF2781D7_ai < 0 && lv_index >= autoAF2781D7_ae) ) ; lv_index += autoAF2781D7_ai ) {
        libCOOC_gf_CC_ApplyUpgradeSupplemental(lp_player, UserDataGetUserInstance("PlayerPrestige", lp_prestige, "UpgradeSupplements", lv_index));
    }
    lv_upgrade = UserDataGetGameLink("PlayerPrestige", lp_prestige, "PrimaryUpgrade", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1127

    lv_index = 1;
    for ( ; ( (autoE6A4272A_ai >= 0 && lv_index <= autoE6A4272A_ae) || (autoE6A4272A_ai < 0 && lv_index >= autoE6A4272A_ae) ) ; lv_index += autoE6A4272A_ai ) {
        libCOOC_gf_CC_PlayerResponseEnable(lp_player, UserDataGetUserInstance("PlayerPrestige", lp_prestige, "PlayerResponses", lv_index), true);
    }
    PlayerApplySkin(lp_player, UserDataGetGameLink("PlayerPrestige", lp_prestige, "Skin", 1), true);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1210

    // Automatic Variable Declarations
    // Implementation
    return UserDataGetUserInstance("PlayerLevels", lp_playerLevel, "Commander", 1);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:1663

    lv_index = 1;
    for ( ; ( (auto0D63B996_ai >= 0 && lv_index <= auto0D63B996_ae) || (auto0D63B996_ai < 0 && lv_index >= auto0D63B996_ae) ) ; lv_index += auto0D63B996_ai ) {
        if ((UserDataGetUserInstance(lp_userType, lp_userInstance, "Commander", lv_index) == lp_commander)) {
            return UserDataGetInt(lp_userType, lp_userInstance, lp_userField, lv_index);
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:2308

        auto7EBF509E_ai = auto7EBF509E_ai+1;
        auto7EBF509E_al = UserDataGetInt("PlayerLevels",lv_indexLevel,"Level",1);
        if( libCOOC_gf_ActiveCommanderForPlayer(lp_player) == UserDataGetUserInstance("PlayerLevels",lv_indexLevel,"Commander",1) &&
        auto7EBF509E_al >= lp_startLevel && auto7EBF509E_al <= lp_endLevel ) {
            lv_totalLife += UserDataGetInt("PlayerLevels", lv_indexLevel, "Life", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOOC.galaxy:2336

        autoEE6697D5_ai = autoEE6697D5_ai+1;
        autoEE6697D5_al = UserDataGetInt("PlayerLevels",lv_indexLevel,"Level",1);
        if( libCOOC_gf_ActiveCommanderForPlayer(lp_player) == UserDataGetUserInstance("PlayerLevels",lv_indexLevel,"Commander",1) &&
        autoEE6697D5_al >= lp_startLevel && autoEE6697D5_al <= lp_endLevel ) {
            lv_totalEnergy += UserDataGetInt("PlayerLevels", lv_indexLevel, "Energy", 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:1429

        autoE4006FE8_ai = autoE4006FE8_ai+1;
        autoE4006FE8_ac = UserDataGetInt("MasteryUpgrades", UserDataInstance("MasteryUpgrades", autoE4006FE8_ai), "Category", 1);
        if( libCOOC_gf_ActiveCommanderForPlayer(lp_player) == UserDataGetUserInstance("MasteryUpgrades",UserDataInstance("MasteryUpgrades", autoE4006FE8_ai),"Commander",1) ) {
            lv_indexMasteryUpgrade = UserDataInstance("MasteryUpgrades", autoE4006FE8_ai);
            lv_masteryIndex = libCOOC_gf_CC_PlayerMasteryInternalIndex(lv_indexMasteryUpgrade);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:6970

        lv_challengeMutatorIndex = 1;
        for ( ; ( (auto2F8A2574_ai >= 0 && lv_challengeMutatorIndex <= auto2F8A2574_ae) || (auto2F8A2574_ai < 0 && lv_challengeMutatorIndex >= auto2F8A2574_ae) ) ; lv_challengeMutatorIndex += auto2F8A2574_ai ) {
            if ((UserDataGetUserInstance("MutatorChallenges", lv_selectedChallenge, "Mutators", lv_challengeMutatorIndex) != null)) {
                libCOMU_gf_EnableDisableMutator(true, UserDataGetUserInstance("MutatorChallenges", lv_selectedChallenge, "Mutators", lv_challengeMutatorIndex));
            }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOUI.galaxy:6971

        for ( ; ( (auto2F8A2574_ai >= 0 && lv_challengeMutatorIndex <= auto2F8A2574_ae) || (auto2F8A2574_ai < 0 && lv_challengeMutatorIndex >= auto2F8A2574_ae) ) ; lv_challengeMutatorIndex += auto2F8A2574_ai ) {
            if ((UserDataGetUserInstance("MutatorChallenges", lv_selectedChallenge, "Mutators", lv_challengeMutatorIndex) != null)) {
                libCOMU_gf_EnableDisableMutator(true, UserDataGetUserInstance("MutatorChallenges", lv_selectedChallenge, "Mutators", lv_challengeMutatorIndex));
            }
            else {

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2039

    for ( ; auto65265E94_i <= UserDataInstanceCount(auto65265E94_userType) ; auto65265E94_i += 1 ) {
        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);
        }

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2042

            TechTreeAbilityAllow(lp_legendPlayer, UserDataGetAbilCmd("LegendAbilityReplacements", lv_abilityReplacementInstance, "AbilityToReplace", 1), false);
        }
        else if ((UserDataGetUserInstance("LegendAbilityReplacements", lv_abilityReplacementInstance, "Legend", 1) == libWCdr_gf_GetLegendInstanceForPlayer(lp_legendPlayer))) {
            CatalogLinkReplace(lp_legendPlayer, c_gameCatalogAbil, (UserDataGetGameLink("LegendAbilityReplacements", lv_abilityReplacementInstance, "AbilityToReplace", 1)), (UserDataGetGameLink("LegendAbilityReplacements", lv_abilityReplacementInstance, "AbilityReplacement", 1)));
        }

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2527

    // Automatic Variable Declarations
    // Implementation
    return (UserDataGetUserInstance("LegionDifficultyScaling", lp_difficultyScalingInstance, "GameMode", 1) == libWCdr_gv_legends.lv_gameMode);
}

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2533

    // Automatic Variable Declarations
    // Implementation
    return (UserDataGetUserInstance("LegionDifficultyPresets", lp_difficultyScalingInstance, "GameMode", 1) == libWCdr_gv_legends.lv_gameMode);
}

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2583

        lv_difficultyscalingmaxlevel = UserDataGetInt("LegionDifficultyScaling", lv_difficultyscalinginstance, "MaxLevel", 1);
        lv_difficultyscalingvalue = UserDataGetFixed("LegionDifficultyScaling", lv_difficultyscalinginstance, "Value", 1);
        if ((UserDataGetUserInstance("LegionDifficultyScaling", lv_difficultyscalinginstance, "Modifier", 1) == lp_difficultyType) && (libWCdr_gf_DifficultyScalingAppliestoCurrentGameMode(lv_difficultyscalinginstance) == true) && (lp_difficultyLevel >= lv_difficultyscalingminlevel)) {
            lv_totalmultiplier += ((MinI(lp_difficultyLevel, lv_difficultyscalingmaxlevel) - lv_difficultyscalingminlevel + 1) * lv_difficultyscalingvalue);
        }

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2613

        lv_difficultyscalingmaxlevel = UserDataGetInt("LegionDifficultyScaling", lv_difficultyscalinginstance, "MaxLevel", 1);
        lv_difficultyscalingvalue = RoundI(UserDataGetFixed("LegionDifficultyScaling", lv_difficultyscalinginstance, "Value", 1));
        if ((UserDataGetUserInstance("LegionDifficultyScaling", lv_difficultyscalinginstance, "Modifier", 1) == lp_difficultyType) && (libWCdr_gf_DifficultyScalingAppliestoCurrentGameMode(lv_difficultyscalinginstance) == true) && (lp_difficultyLevel >= lv_difficultyscalingminlevel) && (lp_difficultyLevel <= lv_difficultyscalingmaxlevel)) {
            lv_sum += lv_difficultyscalingvalue;
            PlayerModifyPropertyFixed(1, c_playerPropSuppliesLimit, c_playerPropOperSetTo, 200.0);

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2765

        lv_waveinstance = UserDataInstance(auto51E6C0CF_userType, auto51E6C0CF_i);
        lv_wavetechlevel = UserDataGetInt("LegionWaves", lv_waveinstance, "TechLevel", 1);
        if ((UserDataGetUserInstance("LegionWaves", lv_waveinstance, "Army", 1) == lp_army) && (lv_wavetechlevel <= lp_techTier) && (lv_wavetechlevel > lv_currentbesttechlevel)) {
            lv_currentbesttechlevel = lv_wavetechlevel;
            lv_potentialwaves[0] = lv_waveinstance;

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:2770

            lv_numberofwaveoptionsattechlevel = 1;
        }
        else if ((lv_numberofwaveoptionsattechlevel < libWCdr_gv_mAX_WAVES_PER_TECH_TIER) && (UserDataGetUserInstance("LegionWaves", lv_waveinstance, "Army", 1) == lp_army) && (lv_wavetechlevel <= lp_techTier) && (lv_wavetechlevel == lv_currentbesttechlevel)) {
            lv_potentialwaves[lv_numberofwaveoptionsattechlevel] = lv_waveinstance;
            lv_numberofwaveoptionsattechlevel += 1;

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:3802

        lv_legendplayer = PlayerGroupNextPlayer(autoED8CE00C_g, lv_legendplayer);
        if (lv_legendplayer < 0) { break; }
        lv_heroitemcategory = UserDataGetUserInstance("PlayableLegends", libWCdr_gf_GetLegendInstanceForPlayer(lv_legendplayer), "HeroItemCategory", 1);
        auto6E4006F1_userType = "LootDropLevels";
        auto6E4006F1_i = 1;

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:3807

        for ( ; auto6E4006F1_i <= UserDataInstanceCount(auto6E4006F1_userType) ; auto6E4006F1_i += 1 ) {
            lv_lootlevelinstance = UserDataInstance(auto6E4006F1_userType, auto6E4006F1_i);
            if ((lv_heroitemcategory == UserDataGetUserInstance("LootDropLevels", lv_lootlevelinstance, "HeroItemCategory", 1)) && (lv_triggeringeffect == UserDataGetGameLink("LootDropLevels", lv_lootlevelinstance, "LootEffect", 1))) {
                UnitLootDropPoint(lv_legendplayer, EventPlayerEffectUsedPoint(c_effectLocationCasterUnit), UserDataGetGameLink("LootDropLevels", lv_lootlevelinstance, "LootDrop", 1), lv_legendplayer);
                autoD6406425_g = UnitLootLastCreatedGroup();