Editing Mod API Reference:GamePlayer
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 38: | Line 38: | ||
== Functions == | == Functions == | ||
− | * '''DisplayName'''('''standingOpt''' ''[[Mod API Reference:GameStanding|GameStanding]]'', '''includeAIWas''' ''boolean'') returns string: Gets the name of a player. Typically you will just pass nil and false to the two arguments. | + | * '''DisplayName'''('''standingOpt''' ''[[Mod API Reference:GameStanding|GameStanding]]'', '''includeAIWas''' ''boolean'') returns string: Gets the name of a player. Typically you will just pass nil and false to the two arguments. Note that this function should only ever be called from Client hooks, as the server does not load player names. Keep in mind that players can change their names, so a mod should never depend on a player having the same name from one turn to the next. |
* '''Income'''('''armiesFromReinforcementCards''' ''integer'', '''standing''' ''[[Mod API Reference:GameStanding|GameStanding]]'', '''bypassArmyCap''' ''boolean'', '''ignoreSanctionCards''' ''boolean'') returns [[Mod API Reference:PlayerIncome|PlayerIncome]]: Determine's a player's income (number of armies they receive per turn.) | * '''Income'''('''armiesFromReinforcementCards''' ''integer'', '''standing''' ''[[Mod API Reference:GameStanding|GameStanding]]'', '''bypassArmyCap''' ''boolean'', '''ignoreSanctionCards''' ''boolean'') returns [[Mod API Reference:PlayerIncome|PlayerIncome]]: Determine's a player's income (number of armies they receive per turn.) | ||
Line 45: | Line 45: | ||
** bypassArmyCap: If this game has the army cap enabled, pass true here to bypass it and get what their income would be if the army cap didn't exist. | ** bypassArmyCap: If this game has the army cap enabled, pass true here to bypass it and get what their income would be if the army cap didn't exist. | ||
** ignoreSanctionCards: If this game has sanction cards, and the player is being affected by them, pass true here to bypass them and get what their income would be if they weren't affected by sanction cards. | ** ignoreSanctionCards: If this game has sanction cards, and the player is being affected by them, pass true here to bypass them and get what their income would be if they weren't affected by sanction cards. | ||
− |