Player
Classes¶
Player
¶
Bases: AoE2Object
A class for handling all player information.
Source code in AoE2ScenarioParser/objects/data_objects/player/player.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
Attributes¶
Attribute | Type | ||
---|---|---|---|
|
Optional[bool]
|
||
|
int | Civilization
|
||
|
Optional[int]
|
||
|
int | Civilization
|
||
|
int
|
||
|
Optional[List[int]]
|
||
|
Optional[List[int]]
|
||
|
Optional[List[int]]
|
||
|
Optional[List[int]]
|
||
|
int
|
||
|
int
|
||
|
bool
|
||
|
Optional[int]
|
||
|
Optional[int]
|
||
|
bool
|
||
|
Optional[int]
|
||
|
int
|
||
|
int
|
||
|
Optional[int]
|
||
|
Optional[str]
|
||
|
int
|
||
|
|||
Read-only value if this player is active or not Source code in
|
107 108 109 |
|
player_id
property
¶
Read-only value of the player ID
Source code in AoE2ScenarioParser/objects/data_objects/player/player.py
102 103 104 |
|
Functions¶
def __init__(...)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
player_id |
int
|
- | required |
starting_age |
int
|
- | required |
lock_civ |
int
|
- | required |
food |
int
|
- | required |
wood |
int
|
- | required |
gold |
int
|
- | required |
stone |
int
|
- | required |
color |
int
|
- | required |
active |
bool
|
- | required |
human |
bool
|
- | required |
civilization |
int
|
- | required |
architecture_set |
int
|
- | required |
population_cap |
Optional[int]
|
- |
None
|
diplomacy |
Optional[List[int]]
|
- |
None
|
initial_camera_x |
Optional[int]
|
- |
None
|
initial_camera_y |
Optional[int]
|
- |
None
|
allied_victory |
Optional[int]
|
- |
None
|
disabled_techs |
Optional[List[int]]
|
- |
None
|
disabled_buildings |
Optional[List[int]]
|
- |
None
|
disabled_units |
Optional[List[int]]
|
- |
None
|
tribe_name |
Optional[str]
|
- |
None
|
base_priority |
Optional[int]
|
- |
None
|
string_table_name_id |
Optional[int]
|
- |
None
|
kwargs |
? | - |
{}
|
Source code in AoE2ScenarioParser/objects/data_objects/player/player.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
def set_player_diplomacy(...)
¶
Set the diplomacy of this player to other players.
This sets the player diplomacy ONE WAY!
This does NOT set the other player's diplomacy to this player to the same diplomacy
Parameters:
Name | Type | Description | Default |
---|---|---|---|
players |
PlayerId | int | List[PlayerId | int]
|
The player(s) to change |
required |
diplomacy |
DiplomacyState
|
The diplomacy setting to set the player to |
required |
Source code in AoE2ScenarioParser/objects/data_objects/player/player.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|