# Modify Player Score (Integer)

Grammar — Modify player p prop: Set To val
FlagsNative | Action

Modifies player score such as units killed.

# Arguments

  • int — Player
  • string<gamelink::ScoreValue> — Score
  • int — Value

Returns — void

native void PlayerScoreValueSetFromInt(
	int player,
	string value,
	int amount,
);

Category: Player / Player Settings

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:1704

            UnitCreateEffectUnit(auto332CD45C_var, "LostVikingsVikingBriberyIncreaseVisualTokenCounter", auto332CD45C_var);
        }
        PlayerScoreValueSetFromInt(lp_killingPlayer, "LostVikingsVikingBriberyStackScore", UnitBehaviorCount(lv_vikingUnit, "LostVikingsVikingBriberyStacks"));
        if ((ModI(UnitBehaviorCount(lv_vikingUnit, "LostVikingsVikingBriberyStacks"), 40) == 0)) {
            PlayerAddChargeUsed(lp_killingPlayer, "Abil/LostVikingsVikingBribery", -1.0);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:5770

                lv_evolutionCompleteStacks = PlayerScoreValueGetAsInt(lv_abathurPlayer, "EvolutionCompleteStacks");
                lv_evolutionCompleteStacks += 1;
                PlayerScoreValueSetFromInt(lv_abathurPlayer, "EvolutionCompleteStacks", lv_evolutionCompleteStacks);
            }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:10751


    UnitBehaviorAdd(lv_unit, "ImprovedIceBlock", lv_unit, 1);
    PlayerScoreValueSetFromInt(lv_player, "JainaFrostbiteDamage", 0);
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:10792

    }

    PlayerScoreValueSetFromInt(lv_player, "JainaFrostbiteDamage", 0);
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:10835

    if ((UnitFilterMatch(lv_unit, lv_owner, UnitFilter((1 << c_targetFilterHeroic), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly), 0)) == true)) {
        if ((PlayerScoreValueGetAsInt(lv_owner, "JainaFrostbiteDamage") < libGDHL_gv_heroJainaFrostbiteConstant)) {
            PlayerScoreValueSetFromInt(lv_owner, "JainaFrostbiteDamage", (PlayerScoreValueGetAsInt(lv_owner, "JainaFrostbiteDamage") + FixedToInt(lv_damageValue)));
            UnitSetTokenCount(libGame_gv_players[lv_owner].lv_heroUnit, "JainaFrostbiteTokenCounter", IntToFixed(PlayerScoreValueGetAsInt(lv_owner, "JainaFrostbiteDamage")), libGame_gv_players[lv_owner].lv_heroUnit);
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:10898

    }

    PlayerScoreValueSetFromInt(lv_player, "JainaFrostbiteDamage", libGDHL_gv_heroJainaFrostbiteConstant);
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:12225

    lv_killingPlayer = EventPlayerEffectUsedUnitOwner(c_effectPlayerTarget);
    libGDHL_gv_hero_Leoric_Undying_Dead_Time_Saved[lv_leoricPlayer] = 0.0;
    PlayerScoreValueSetFromInt(lv_leoricPlayer, "DeadHeroLastKnownHealth", FixedToInt(UnitGetPropertyFixed(lv_leoric, c_unitPropLife, c_unitPropCurrent)));
    if ((TechTreeUnitCount(lv_leoricPlayer, "LeoricWraithWalkUnit", c_techCountCompleteOnly) >= 1)) {
        if (((libGDHL_gv_hero_Leoric_WraithWalk_Unit[lv_leoricPlayer] == null) || (UnitIsAlive(libGDHL_gv_hero_Leoric_WraithWalk_Unit[lv_leoricPlayer]) == false))) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:12339

    libGDHL_gf_LeoricUIShowHideCustomDeathOverlay(false, lv_leoricPlayer);
    UnitBehaviorRemove(lv_leoric, "SuppressRegeneration", 1);
    PlayerScoreValueSetFromInt(lv_leoricPlayer, "DeadHeroLastKnownHealth", 0);
    libGame_gf_HeroDeathEnableDisableDeadSoundStateForPlayer(false, lv_leoricPlayer);
    libSond_gf_HeroVOPlayHeroLine(libCore_ge_HeroVOEvents_Revive, lv_leoricPlayer, libCore_gv_playerGroupFromPlayer[lv_leoricPlayer]);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:12681

        UnitCreateEffectUnit(auto03293D7A_var, "LostVikingsVikingBriberyDecreaseVisualTokenCounter", auto03293D7A_var);
    }
    PlayerScoreValueSetFromInt(EventPlayerEffectUsedUnitOwner(c_effectPlayerCaster), "LostVikingsVikingBriberyStackScore", UnitBehaviorCount(lv_vikingUnit, "LostVikingsVikingBriberyStacks"));
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:12702

    }

    PlayerScoreValueSetFromInt(UnitGetOwner(EventUnit()), "LostVikingsVikingBriberyStackScore", 0);
    return true;
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:11224

    // Automatic Variable Declarations
    // Implementation
    PlayerScoreValueSetFromInt(lp_player, lp_score, lp_value);
    TextExpressionSetToken("Param/Expression/lib_Game_B600485F", "D", TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetElapsed(libGame_gv_gameTimer))));
    TextExpressionSetToken("Param/Expression/lib_Game_B600485F", "A", IntToText(lp_player));

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:4306

    lv_itPlayer = 1;
    for ( ; ( (auto2A10C238_ai >= 0 && lv_itPlayer <= auto2A10C238_ae) || (auto2A10C238_ai < 0 && lv_itPlayer >= auto2A10C238_ae) ) ; lv_itPlayer += auto2A10C238_ai ) {
        PlayerScoreValueSetFromInt(lv_itPlayer, "BalanceProbe", 0);
    }
    return true;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:4359

    lv_itPlayer = 1;
    for ( ; ( (autoFF35C5E8_ai >= 0 && lv_itPlayer <= autoFF35C5E8_ae) || (autoFF35C5E8_ai < 0 && lv_itPlayer >= autoFF35C5E8_ae) ) ; lv_itPlayer += autoFF35C5E8_ai ) {
        PlayerScoreValueSetFromInt(lv_itPlayer, "BalanceProbe", 0);
    }
    libSprt_gv_dEBUGBalanceProbeTimerDuration = lv_duration;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6044

    for ( ; lv_playerIterator <= auto9131CD3C_ae ; lv_playerIterator += 1 ) {
        if ((((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0))) && (libGame_gv_onFireHighlightforHeroDamager[lv_playerIterator] == true)) {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightHeroDamageBoolean", 1);
        }
        else {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6047

        }
        else {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightHeroDamageBoolean", 0);
        }
        if ((libGame_gv_onFireHighlightforHealing[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6050

        }
        if ((libGame_gv_onFireHighlightforHealing[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightHealingBoolean", 1);
        }
        else {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6053

        }
        else {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightHealingBoolean", 0);
        }
        if ((libGame_gv_onFireHighlightforDamageTaken[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6056

        }
        if ((libGame_gv_onFireHighlightforDamageTaken[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightDamageTakenBoolean", 1);
        }
        else {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6059

        }
        else {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightDamageTakenBoolean", 0);
        }
        if ((libGame_gv_onFireHighlightforSiegeDamage[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6062

        }
        if ((libGame_gv_onFireHighlightforSiegeDamage[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightSiegeDamageBoolean", 1);
        }
        else {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6065

        }
        else {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightSiegeDamageBoolean", 0);
        }
        if ((libGame_gv_onFireHighlightforXPContributoronTeam[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6068

        }
        if ((libGame_gv_onFireHighlightforXPContributoronTeam[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightXPContributionBoolean", 1);
        }
        else {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:6071

        }
        else {
            PlayerScoreValueSetFromInt(lv_playerIterator, "OnFireHighlightXPContributionBoolean", 0);
        }
        if ((libGame_gv_onFireHighlightforAssists[lv_playerIterator] == true) && (((libGame_gv_onFireScores[1].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[1].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[2].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[2].lv_fireLevel > 0)) || ((libGame_gv_onFireScores[3].lv_player == lv_playerIterator) && (libGame_gv_onFireScores[3].lv_fireLevel > 0)))) {

mods/heromods/chogall.stormmodbase.stormdata/LibHCHO.galaxy:1364

    libGDHL_gv_chogallPairs[lv_choGallTeamID].lv_gallPlayer = lv_initialChoPlayerID;
    UnitCreateEffectUnit(libGDHL_gv_chogallPairs[lv_choGallTeamID].lv_gallUnit, "ChoGallLinkUnitsDummyEffect", lv_choUnit);
    PlayerScoreValueSetFromInt(lv_initialChoPlayerID, "GenericHeroTalentStackCounter", PlayerScoreValueGetAsInt(lv_initialGallPlayerID, "GenericHeroTalentStackCounter"));
    PlayerScoreValueSetFromInt(lv_initialGallPlayerID, "GenericHeroTalentStackCounter", 0);
    libGame_gf_TalentsRespecHeroForPlayer(lv_initialGallPlayerID);

mods/heromods/chogall.stormmodbase.stormdata/LibHCHO.galaxy:1365

    UnitCreateEffectUnit(libGDHL_gv_chogallPairs[lv_choGallTeamID].lv_gallUnit, "ChoGallLinkUnitsDummyEffect", lv_choUnit);
    PlayerScoreValueSetFromInt(lv_initialChoPlayerID, "GenericHeroTalentStackCounter", PlayerScoreValueGetAsInt(lv_initialGallPlayerID, "GenericHeroTalentStackCounter"));
    PlayerScoreValueSetFromInt(lv_initialGallPlayerID, "GenericHeroTalentStackCounter", 0);
    libGame_gf_TalentsRespecHeroForPlayer(lv_initialGallPlayerID);
    libGame_gf_TalentsRespecHeroForPlayer(lv_initialChoPlayerID);

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

        libCOOC_gv_cC_MissionScoreValues[lv_scoreIndex][lp_player] = lp_score;
    }
    PlayerScoreValueSetFromInt(lp_player, lp_scoreType, FixedToInt((libCOOC_gv_cC_MissionScoreValues[lv_scoreIndex][lp_player] * libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player), 1.0, 1.2, 1.5, 2.0, 2.0, 2.0))));
    PlayerScoreValueSetFromInt(lp_player, "TotalMissionScore", FixedToInt((lv_totalScore * libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player), 1.0, 1.2, 1.5, 2.0, 2.0, 2.0))));
}

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

    }
    PlayerScoreValueSetFromInt(lp_player, lp_scoreType, FixedToInt((libCOOC_gv_cC_MissionScoreValues[lv_scoreIndex][lp_player] * libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player), 1.0, 1.2, 1.5, 2.0, 2.0, 2.0))));
    PlayerScoreValueSetFromInt(lp_player, "TotalMissionScore", FixedToInt((lv_totalScore * libCOMI_gf_DifficultyValueFixed2(libCOMI_gf_DifficultyLevelForPlayerCoop(lp_player), 1.0, 1.2, 1.5, 2.0, 2.0, 2.0))));
}

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

    }

    PlayerScoreValueSetFromInt(lp_player, "MetaExperience", lv_totalXP);
    PlayerScoreValueSetFromInt(lp_player, "BonusObjectiveXP", lv_objectiveXP);
    PlayerScoreValueSetFromInt(lp_player, "MissionXP", lv_baseXP);

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


    PlayerScoreValueSetFromInt(lp_player, "MetaExperience", lv_totalXP);
    PlayerScoreValueSetFromInt(lp_player, "BonusObjectiveXP", lv_objectiveXP);
    PlayerScoreValueSetFromInt(lp_player, "MissionXP", lv_baseXP);
    PlayerScoreValueSetFromInt(lp_player, "UnitsKilledPoints", 0);

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

    PlayerScoreValueSetFromInt(lp_player, "MetaExperience", lv_totalXP);
    PlayerScoreValueSetFromInt(lp_player, "BonusObjectiveXP", lv_objectiveXP);
    PlayerScoreValueSetFromInt(lp_player, "MissionXP", lv_baseXP);
    PlayerScoreValueSetFromInt(lp_player, "UnitsKilledPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "UnitsMadePoints", 0);

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

    PlayerScoreValueSetFromInt(lp_player, "BonusObjectiveXP", lv_objectiveXP);
    PlayerScoreValueSetFromInt(lp_player, "MissionXP", lv_baseXP);
    PlayerScoreValueSetFromInt(lp_player, "UnitsKilledPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "UnitsMadePoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "TechnologyPoints", 0);

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

    PlayerScoreValueSetFromInt(lp_player, "MissionXP", lv_baseXP);
    PlayerScoreValueSetFromInt(lp_player, "UnitsKilledPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "UnitsMadePoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "TechnologyPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "StructuresKilledPoints", 0);

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

    PlayerScoreValueSetFromInt(lp_player, "UnitsKilledPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "UnitsMadePoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "TechnologyPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "StructuresKilledPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "StructuresMadePoints", 0);

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

    PlayerScoreValueSetFromInt(lp_player, "UnitsMadePoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "TechnologyPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "StructuresKilledPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "StructuresMadePoints", 0);
}

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

    PlayerScoreValueSetFromInt(lp_player, "TechnologyPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "StructuresKilledPoints", 0);
    PlayerScoreValueSetFromInt(lp_player, "StructuresMadePoints", 0);
}