PlayerData
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 135 136 |
|
Attributes¶
allied_victory: Optional[bool] = bool(allied_victory) if allied_victory is not None else None
instance-attribute
¶
Type:
Value:
Optional[bool]
Value:
bool(allied_victory) if allied_victory is not None else None
architecture_set: int | Civilization = dataset_or_value(Civilization, architecture_set)
instance-attribute
¶
Type:
Value:
int | Civilization
Value:
dataset_or_value(Civilization, architecture_set)
base_priority: Optional[int] = base_priority
instance-attribute
¶
Type:
Value:
Optional[int]
Value:
base_priority
civilization: int | Civilization = dataset_or_value(Civilization, civilization)
instance-attribute
¶
Type:
Value:
int | Civilization
Value:
dataset_or_value(Civilization, civilization)
diplomacy: Optional[List[int]] = diplomacy
instance-attribute
¶
Type:
Value:
Optional[List[int]]
Value:
diplomacy
disabled_buildings: Optional[List[int]] = disabled_buildings
instance-attribute
¶
Type:
Value:
Optional[List[int]]
Value:
disabled_buildings
disabled_techs: Optional[List[int]] = disabled_techs
instance-attribute
¶
Type:
Value:
Optional[List[int]]
Value:
disabled_techs
disabled_units: Optional[List[int]] = disabled_units
instance-attribute
¶
Type:
Value:
Optional[List[int]]
Value:
disabled_units
initial_camera_x: Optional[int] = initial_camera_x
instance-attribute
¶
Type:
Value:
Optional[int]
Value:
initial_camera_x
initial_camera_y: Optional[int] = initial_camera_y
instance-attribute
¶
Type:
Value:
Optional[int]
Value:
initial_camera_y
lock_personality: bool = bool(lock_personality)
instance-attribute
¶
Type:
Value:
bool
Value:
bool(lock_personality)
population_cap: Optional[int] = population_cap
instance-attribute
¶
Type:
Value:
Optional[int]
Value:
population_cap
starting_age: int = dataset_or_value(StartingAge, starting_age)
instance-attribute
¶
Type:
Value:
int
Value:
dataset_or_value(StartingAge, starting_age)
string_table_name_id: Optional[int] = string_table_name_id
instance-attribute
¶
Type:
Value:
Optional[int]
Value:
string_table_name_id
Functions¶
def __init__(...)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
player_id |
int
|
- | required |
starting_age |
int
|
- | required |
lock_civ |
int
|
- | required |
lock_personality |
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 100 101 |
|
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
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|