# Add Player Talent
Grammar — Add Talent talent to Player player.
Flags —Native|Action
Adds the specified Talent to the Player. Validators and triggers can then test whether the player has the talent.
# Arguments
int— Playerstring<gamelink::Talent> — Talent
Returns — void
native void PlayerAddTalent(int inPlayer, string inTalent);
# Related
Category: Player / Player Settings
- Modify Player Property (Integer) —
void— PlayerModifyPropertyInt - Modify Player Property (Real) —
void— PlayerModifyPropertyFixed - Player Property (Integer) —
int— PlayerGetPropertyInt - Player Property (Real) —
fixed— PlayerGetPropertyFixed - Modify Player Score (Integer) —
void— PlayerScoreValueSetFromInt - Modify Player Score (Real) —
void— PlayerScoreValueSetFromFixed - Player Score Value (Integer) —
int— PlayerScoreValueGetAsInt - Player Score Value (Real) —
fixed— PlayerScoreValueGetAsFixed - Turn Player Flag On/Off —
void— PlayerSetState - Player Flag Check —
bool— PlayerGetState - Player License Check —
bool— PlayerHasLicense - Player Access Check —
bool— PlayerHasAccessTo - Player Has Reward —
bool— PlayerHasReward - Player Has Talent —
bool— PlayerHasTalent - Name Of Player —
text— PlayerName - Handle Of Player —
string— PlayerHandle - Race Of Player —
string<gamelink::Race> — PlayerRace - Hero Of Player —
string<gamelink::Hero> — PlayerHero - Skin Of Player —
string<gamelink::Skin> — PlayerSkin - Mount Of Player —
string<gamelink::Mount> — PlayerMount - Spray Of Player —
string<gamelink::Spray> — PlayerSpray - Artifact Of Player —
string<gamelink::Artifact> — PlayerArtifact - Artifact Rank Of Player —
int— PlayerArtifactRank - Commander Of Player —
string<gamelink::Commander> — PlayerCommander - Commander Level Of Player —
int— PlayerCommanderLevel - Commander Mastery Level Of Player —
int— PlayerCommanderMasteryLevel - Commander Mastery Talent Rank Of Player —
int— PlayerCommanderMasteryTalentRank - Commander Selected Prestige Of Player —
int— PlayerCommanderSelectedPrestige - Brutal Plus Difficulty of Player —
int— PlayerBrutalPlusDifficulty - Retry Mutation Index of Player —
int— PlayerRetryMutation - Allied Commander Enemy Wave Type —
int— PlayerACEnemyWaveType - Start Location Of Player —
point— PlayerStartLocation - Controller Of Player —
int<preset::PlayerController> — PlayerType - Status Of Player —
int<preset::PlayerStatus> — PlayerStatus - Set Player Color —
void— PlayerSetColorIndex - Set Player Race —
void— PlayerSetRace - Set Player Hero —
void— PlayerSetHero - Set Player Skin —
void— PlayerSetSkin - Set Player Console Skin —
void— PlayerSetConsoleSkin - Apply Player Skin —
void— PlayerApplySkin - Apply Player Skin (Replacing Existing Unit) —
void— libNtve_gf_PlayerApplySkinReplacingExistingUnit - Set Player Mount —
void— PlayerSetMount - Set Player Spray —
void— PlayerSetSpray - Set Player Commander —
void— PlayerSetCommander - Set Player Commander Level —
void— PlayerSetCommanderLevel - Set Player Commander Mastery Level —
void— PlayerSetCommanderMasteryLevel - Set Player Death Timer —
void— PlayerSetDeathTimer - Set Player Bounds —
void— PlayerSetBounds - Add Player Talent —
void— PlayerAddTalent - Remove Player Talent —
void— PlayerRemoveTalent - Add Player Response —
void— PlayerAddResponse - Remove Player Response —
void— PlayerRemoveResponse - Clear Player Response —
void— PlayerClearResponse - Player Color —
int<playercolor> — PlayerGetColorIndex - Override Player Option —
void— PlayerOptionOverride - Player Hotkey Profile —
string— PlayerGetHotkeyProfile - Player Property Changed —
void— TriggerAddEventPlayerPropChange - Player Joins Game —
void— TriggerAddEventPlayerJoin - Player Leaves Game —
void— TriggerAddEventPlayerLeft - Triggering Player —
int— EventPlayer - Triggering Player Property —
int<preset::Player_Property_Get> — EventPlayerProperty - Triggering Player Property Change (Integer) —
int— EventPlayerPropertyChangeInt - Triggering Player Property Change (Real) —
fixed— EventPlayerPropertyChangeFixed - Player Add Label —
void— PlayerAddLabel - Player Remove Label —
void— PlayerRemoveLabel - Player Remove All Labels —
void— PlayerRemoveAllLabels - Player Has Label —
bool— PlayerHasLabel - Player Add Reward —
void— PlayerAddReward
# Examples
mods/heroesbrawlmods/arenamodemods/arenashared.stormmod — base.stormdata/LibMArS.galaxy:42
if ((UnitGetType(lv_arenaHero) == "HeroMonk")) {
if ((UnitHasBehavior2(lv_arenaHero, "Ultimate1Unlocked") == true)) {
PlayerAddTalent(UnitGetOwner(lv_arenaHero), "MonkIronFists");
UnitBehaviorAdd(lv_arenaHero, "MonkIronFistsCarryBehavior", lv_arenaHero, 1);
}
mods/heroesbrawlmods/arenamodemods/arenashared.stormmod — base.stormdata/LibMArS.galaxy:46
}
else {
PlayerAddTalent(UnitGetOwner(lv_arenaHero), "MonkTranscendence");
UnitBehaviorAdd(lv_arenaHero, "MonkTranscendenceCarryBehavior", lv_arenaHero, 1);
}
mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod — base.stormdata/LibPEB1.galaxy:714
// Implementation
CatalogFieldValueSet(c_gameCatalogAbil, "DiabloShadowCharge", "Range", lp_playerIndex, FixedToString((CatalogFieldValueGetAsFixed(c_gameCatalogAbil, "DiabloShadowCharge", "Range", 0) * CatalogFieldValueGetAsFixed(c_gameCatalogTalent, "DiabloMasteryFromTheShadowsShadowCharge", "AbilityModificationArray[" + IntToString(0) + "].Modifications[" + IntToString(0) + "].Value", 0)), c_fixedPrecisionAny));
PlayerAddTalent(lp_playerIndex, "DiabloTalentDominationOverpower");
if ((libPVEM_gf_PvEGameDifficulty() == libPVEM_ge_PvEGameDifficulty_PvEGameDifficulty_Heroic)) {
CatalogFieldValueModifyFixed(c_gameCatalogEffect, "DiabloLightningBreathOffsetPersistent", "PeriodicOffsetArray[" + IntToString(0) + "]", lp_playerIndex, 2.25, c_upgradeOperationSubtract);
mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod — base.stormdata/LibPEB1.galaxy:771
// Implementation
if ((libPVEM_gf_PvEGameDifficulty() == libPVEM_ge_PvEGameDifficulty_PvEGameDifficulty_Heroic)) {
PlayerAddTalent(lp_playerIndex, "StukovPushComesToShove");
PlayerAddTalent(lp_playerIndex, "StukovPushComesToShove");
CatalogFieldValueModifyFixed(c_gameCatalogBehavior, "StukovMassiveShovePeriodicForce", "Modification.MoveSpeedMinimum", lp_playerIndex, 5.5, c_upgradeOperationAdd);
mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod — base.stormdata/LibPEB1.galaxy:772
if ((libPVEM_gf_PvEGameDifficulty() == libPVEM_ge_PvEGameDifficulty_PvEGameDifficulty_Heroic)) {
PlayerAddTalent(lp_playerIndex, "StukovPushComesToShove");
PlayerAddTalent(lp_playerIndex, "StukovPushComesToShove");
CatalogFieldValueModifyFixed(c_gameCatalogBehavior, "StukovMassiveShovePeriodicForce", "Modification.MoveSpeedMinimum", lp_playerIndex, 5.5, c_upgradeOperationAdd);
CatalogFieldValueModifyFixed(c_gameCatalogBehavior, "StukovMassiveShovePeriodicForce", "Modification.MoveSpeedMaximum", lp_playerIndex, 5.5, c_upgradeOperationAdd);
mods/heroesbrawlmods/brawlmapmods/coop/escapefrombraxis.stormmod — base.stormdata/LibPEB1.galaxy:700
// Automatic Variable Declarations
// Implementation
PlayerAddTalent(lp_playerIndex, "DiabloTalentDominationOverpower");
if ((libPVEB_gf_PVEDifficultyValueInt(0, 1) == 1)) {
CatalogFieldValueModifyFixed(c_gameCatalogEffect, "DiabloLightningBreathOffsetPersistent", "PeriodicOffsetArray[" + IntToString(0) + "]", lp_playerIndex, 2.25, c_upgradeOperationSubtract);
mods/heroesbrawlmods/brawlmapmods/coop/escapefrombraxis.stormmod — base.stormdata/LibPEB1.galaxy:757
if ((libPVEB_gf_PVEDifficultyValueInt(0, 1) == 1)) {
PlayerAddTalent(lp_playerIndex, "StitchesMasteryShishKabobHook");
}
mods/heroesbrawlmods/brawlmapmods/coop/escapefrombraxis.stormmod — base.stormdata/LibPEB1.galaxy:775
// Implementation
if ((libPVEB_gf_PVEDifficultyValueInt(0, 1) == 1)) {
PlayerAddTalent(lp_playerIndex, "StukovPushComesToShove");
CatalogFieldValueModifyFixed(c_gameCatalogBehavior, "StukovMassiveShovePeriodicForce", "Modification.MoveSpeedMinimum", lp_playerIndex, 5.5, c_upgradeOperationAdd);
CatalogFieldValueModifyFixed(c_gameCatalogBehavior, "StukovMassiveShovePeriodicForce", "Modification.MoveSpeedMaximum", lp_playerIndex, 5.5, c_upgradeOperationAdd);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:11824
StatEventAddDataString(StatEventLastCreated(), "PurchaseName", (libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_talentCatalogLink));
StatEventSend(StatEventLastCreated());
PlayerAddTalent(lp_player, libGame_gv_talents_TalentChoices[lp_player][lp_tierIndex].lv_talentData[lp_buttonIndex].lv_talentCatalogLink);
TalentTreeSetSelectedHeroTalent(lp_player, lp_tierIndex, lp_buttonIndex);
libGame_gf_TalentsUpdateChoicePanelForPlayer(lp_player);
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:1638
// Implementation
if ((CatalogEntryIsValid(c_gameCatalogTalent, lp_talent) == true)) {
PlayerAddTalent(lp_player, lp_talent);
lv_abilLink = (CatalogFieldValueGet(c_gameCatalogTalent, lp_talent, "Abil", c_playerAny));
if ((CatalogEntryIsValid(c_gameCatalogAbil, lv_abilLink) == true)) {