Game data¶
The items data: typed tables, lookups by name, and the generated id enums.
gamedata.data¶
Static game data from the GGE items payload.
The client builds its combat maths from items_v{version}.json on the GGE
CDN. That file is ~20 MB: GameData.require loads it on the first use of an
API that needs it, and GameData.load (or EmpireClient.load_game_data)
loads it up front.
What is parsed is trimmed to the combat-relevant tables, the tables the
id enums name and the rewards, and cached on disk per version, so the download happens once
per game patch.
GameData.load is the only loader: troop counts and the id generator
read the same process-wide copy, so one process downloads the items once.
Classes:
| Name | Description |
|---|---|
GameData |
The combat-relevant tables for one items version. |
CACHE_FILENAME_TEMPLATE
module-attribute
¶
BERIMOND_INVASION_CAMP_TABLE
module-attribute
¶
CAMP_TABLES
module-attribute
¶
CAMP_TABLES = ('nomadCamps', 'samuraiCamps', BERIMOND_INVASION_CAMP_TABLE, 'allianceInvasionCamps')
RAW_TABLES
module-attribute
¶
RAW_TABLES = ('bossdungeons', 'eventAutoScalingUnitPairings', 'eventAutoScalingToolPairings', 'mainquests')
Tables kept verbatim. The client parses no bossdungeons, pairing or mainquests rows, so their
meaning is the server's.
GameData
pydantic-model
¶
Bases: EmpireModel
The combat-relevant tables for one items version.
Load it explicitly:
data = GameData.load()
data.units[Unit.MEAD_RANGER_L6].range_attack
data.buildings[Building.KEEP_L1].might_value
data.general("Toril").general_id
The tables the id enums name are keyed by their enum: a row whose id the enum lacks (items newer than the enums) is keyed by its plain int, and as the enums are IntEnums, a plain id from a packet indexes every table.
The tables keyed by an id enum or an id type (RewardId, PackageId, TreasureMapNodeId, ...) are
read-only Table mappings that validate a row the first time it is read,
so loading costs no validation for them.
Fields:
-
version(str) -
schema_fingerprint(str) -
effect_caps(dict[int, EffectCapDef]) -
relic_effects(dict[int, RelicEffectDef]) -
equipment_sets(dict[int, list[EquipmentSetDef]]) -
fortifications(dict[GameDataId['Building'], FortificationDef]) -
alliance_buffs(dict[int, AllianceBuffDef]) -
attack_slots(dict[int, AttackSlotDef]) -
tool_categories(dict[int, ToolCategoryDef]) -
default_commanders(dict[int, DefaultCommanderDef]) -
vip_levels(dict[int, VipLevelDef]) -
level_boosters(list[LevelBoosterDef]) -
monument_levels(dict[int, MonumentLevelDef]) -
laboratory_levels(list[LaboratoryLevelDef]) -
dungeons(list[DungeonDefence]) -
camps(dict[str, list[NpcCampDefence]]) -
league_brackets(list[LeagueBracketDef]) -
raw_tables(dict[str, list[Any]])
schema_fingerprint
pydantic-field
¶
schema_fingerprint: str = ''
Hash of the table fields, so a cache from older tables is not reused.
equipment_sets
pydantic-field
¶
equipment_sets: dict[int, list[EquipmentSetDef]]
Each equipment set's threshold rows by set id, in the order listed.
level_boosters
pydantic-field
¶
level_boosters: list[LevelBoosterDef]
The King's Market boosters bought in levels, a row per booster and level, in the order listed.
monument_levels
pydantic-field
¶
monument_levels: dict[int, MonumentLevelDef]
The monument levels by level; of two rows for one level, the last.
laboratory_levels
pydantic-field
¶
laboratory_levels: list[LaboratoryLevelDef]
The laboratory levels of every kingdom, in the order listed.
units
cached
property
¶
units: Table[GameDataId['Unit'], UnitStats]
Combat units by Unit: the units rows without slotTypes.
tools
cached
property
¶
tools: Table[GameDataId['Tool'], ToolStats]
Siege and defence tools by Tool: the units rows with slotTypes.
effect_types
cached
property
¶
effect_types: Table[GameDataId['EffectType'], EffectTypeDef]
Effect types by EffectType.
construction_items
cached
property
¶
construction_items: Table[GameDataId['ConstructionItem'], ConstructionItemDef]
Construction items by ConstructionItem.
global_effects
cached
property
¶
global_effects: Table[GameDataId['GlobalEffect'], GlobalEffectDef]
Global effects by GlobalEffect.
general_skills
cached
property
¶
general_skills: Table[GameDataId['GeneralSkill'], GeneralSkillDef]
General skill levels by GeneralSkill.
legendary_skills
cached
property
¶
legendary_skills: Table[GameDataId['LegendarySkill'], LegendarySkillDef]
Legendary skill levels by LegendarySkill.
general_abilities
cached
property
¶
general_abilities: Table[GameDataId['GeneralAbility'], GeneralAbilityDef]
General ability levels by GeneralAbility.
gem_colors
cached
property
¶
gem_colors: Table[GameDataId['GemColor'], GemColorDef]
Gem colours by GemColor.
general_rarities
cached
property
¶
general_rarities: Table[GameDataId['GeneralRarity'], GeneralRarityDef]
General rarities by GeneralRarity, with what unlocking and stars cost.
generals_hub_characters
cached
property
¶
generals_hub_characters: Table[GameDataId['GeneralsHubCharacter'], GeneralsHubCharacterDef]
The generals hub's characters by GeneralsHubCharacter.
currencies
cached
property
¶
currencies: Table[GameDataId['CurrencyId'], CurrencyDef]
Currencies by CurrencyId; coins and rubies are not in it.
raid_bosses
cached
property
¶
raid_bosses: Table[GameDataId['RaidBoss'], RaidBossDef]
Alliance raid bosses by RaidBoss.
buildings
cached
property
¶
buildings: Table[GameDataId['Building'], BuildingDef]
Buildings, towers, gates, moats and decorations by Building.
researches
cached
property
¶
researches: Table[GameDataId['Research'], ResearchDef]
Research levels by Research, each with what it costs.
loot_boxes
cached
property
¶
loot_boxes: Table[GameDataId['LootBox'], LootBoxDef]
Loot boxes by LootBox.
loot_box_types
cached
property
¶
loot_box_types: Table[GameDataId['LootBoxType'], LootBoxTypeDef]
Loot box types by LootBoxType.
equipment_groups
cached
property
¶
equipment_groups: Table[GameDataId['EquipmentGroup'], EquipmentGroupDef]
Equipment item groups by EquipmentGroup.
difficulty_types
cached
property
¶
difficulty_types: Table[GameDataId['DifficultyType'], DifficultyTypeDef]
Event difficulty types by DifficultyType.
daily_quests
cached
property
¶
daily_quests: Table[GameDataId['DailyQuestId'], DailyQuestDef]
Daily quests by DailyQuestId.
sceat_skills
cached
property
¶
sceat_skills: Table[GameDataId['SceatSkill'], SceatSkillDef]
Sceat skill levels by SceatSkill.
sceat_skill_trees
cached
property
¶
sceat_skill_trees: Table[int, SceatSkillTreeDef]
Sceat skill trees by their SceatSkill.skill_tree_id, with the Hall of Legends tab each shows in.
feasts
cached
property
¶
feasts: Table[GameDataId['Feast'], FeastDef]
Feasts by Feast: their price, recruitment speed bonus, duration and levels.
horses
cached
property
¶
horses: Table[GameDataId['Horse'], HorseStats]
Travel boosters by Horse, the value movements send as HBW.
achievements
cached
property
¶
achievements: Table[GameDataId['Achievement'], AchievementDef]
Achievement series steps by Achievement.
alliance_crest_colors
cached
property
¶
alliance_crest_colors: Table[GameDataId['AllianceCrestColor'], AllianceCrestColorDef]
Alliance crest colours by AllianceCrestColor.
alliance_crest_layouts
cached
property
¶
alliance_crest_layouts: Table[GameDataId['AllianceCrestLayout'], AllianceCrestLayoutDef]
Alliance crest layouts by AllianceCrestLayout.
construction_item_recipes
cached
property
¶
construction_item_recipes: Table[ConstructionItemRecipeId, ConstructionItemRecipeDef]
The constructionItemRecipes rows, by the recipe id a blueprint research unlocks.
scaling_camps
cached
property
¶
scaling_camps: Table[ScalingCampId, ScalingCampDef]
The eventAutoScalingCamps rows, by the scaling camp id a map row names.
coat_of_arms_symbols
cached
property
¶
coat_of_arms_symbols: Table[CoatOfArmsSymbolId, CoatOfArmsSymbolDef]
The crestsymbols rows, by the symbol id a coat of arms names.
packages
cached
property
¶
packages: Table[PackageId, PackageDef]
The packages rows, by the package id a shop or a gift package names.
player_name_changes
cached
property
¶
player_name_changes: Table[int, PlayerNameChangeDef]
The playerNameChanges rows, by the number of the player name change they price.
prebuilt_castles
cached
property
¶
prebuilt_castles: Table[GameDataId['PrebuiltCastle'], PrebuiltCastleDef]
The castles and camps a kingdom, a season event's map or a special server starts with, by PrebuiltCastle.
Client: PrebuiltCastleData.parsePreBuiltCastles (bundle line 142274)
outer_realms_prebuilt_castles
cached
property
¶
outer_realms_prebuilt_castles: Table[GameDataId['PrebuiltCastle'], SpecialServerPrebuiltCastleDef]
The Outer Realms' castle selection (tempServerPreBuiltCastles), by PrebuiltCastle.
horizon_prebuilt_castles
cached
property
¶
horizon_prebuilt_castles: Table[GameDataId['PrebuiltCastle'], SpecialServerPrebuiltCastleDef]
Beyond the Horizon's castle selection (allianceBattleGroundPreBuiltCastles), by PrebuiltCastle.
storm_islands_prebuilt_castles
cached
property
¶
storm_islands_prebuilt_castles: Table[GameDataId['PrebuiltCastle'], SpecialServerPrebuiltCastleDef]
The Storm Islands' castle selection (islandPreBuiltCastles), by PrebuiltCastle.
start_resources
cached
property
¶
start_resources: Table[StartResourcesId, StartResourcesDef]
The goods a special server's prebuilt castle starts with, by the id its row names.
private_villages
cached
property
¶
private_villages: Table[GameDataId['PrivateVillageType'], PrivateVillageDef]
Private resource villages by PrivateVillageType, one row per type, kingdom and level.
crafting_recipes
cached
property
¶
crafting_recipes: Table[CraftingRecipeId, CraftingRecipeDef]
The craftingRecipes rows, by the recipe id a crafting slot names.
crafting_queues
cached
property
¶
crafting_queues: Table[CraftingQueueId, CraftingQueueDef]
The craftingQueues rows, by the queue id a crafting building's queue is sent with.
fusion_systems
cached
property
¶
fusion_systems: Table[GameDataId['FusionForgeId'], FusionSystemDef]
The fusion forges' energy and fusion rules (fusionSystems), by FusionForgeId.
fusion_forges
cached
property
¶
fusion_forges: Table[GameDataId['FusionForgeId'], FusionForgeDef]
The fusion forges' dust and minute skips (fusionForges), by FusionForgeId.
judgements
cached
property
¶
judgements: Table[GameDataId['Judgement'], JudgementDef]
Citizen judgements by Judgement.
daimyo_castle_contracts
cached
property
¶
daimyo_castle_contracts: Table[DaimyoContractId, DaimyoContractDef]
The daimyo castles' alliance contracts by id, in the items' order.
Client: SamuraiDaimyoDataXml.daimyoCastleAllianceContracts (bundle line 13914)
daimyo_township_contracts
cached
property
¶
daimyo_township_contracts: Table[DaimyoContractId, DaimyoContractDef]
The daimyo townships' alliance contracts by id, in the items' order.
Client: SamuraiDaimyoDataXml.daimyoTownshipAllianceContracts (bundle line 13914)
treasure_maps
cached
property
¶
treasure_maps: Table[GameDataId['TreasureMapId'], TreasureMapDef]
Treasure maps by TreasureMapId: the season events' maps and the treasure hunt's.
treasure_map_nodes
cached
property
¶
treasure_map_nodes: Table[TreasureMapNodeId, TreasureMapNodeDef]
The tmapnodes rows, by the node id a treasure map names.
part_pay_prices
cached
property
¶
part_pay_prices: Table[PartPayPriceId, PartPayPriceDef]
The partpayprices rows, by the id an obstacle, a treasure map node or a slum level is priced by.
Client: PartpaypriceVO.fillFromParamXml (bundle line 142257)
donation_items
cached
property
¶
donation_items: Table[DonationItemId, DonationItemDef]
The donationItems rows, by the item id a donation names.
donation_settings
cached
property
¶
donation_settings: Table[DonationSettingId, DonationSettingDef]
The donationSettings rows, by the setting id a running donation event names.
training_programs
cached
property
¶
training_programs: Table[TrainingProgramId, TrainingProgramDef]
The officers' school's training programs (officersSchoolEffects), by the program id gtp names.
event_difficulties
cached
property
¶
event_difficulties: Table[EventDifficultyId, EventDifficultyDef]
The eventAutoScalingDifficulties rows, by the difficulty id an event is played at.
gachas
cached
property
¶
The gachaEvents rows, the gacha events' levels, by the gacha id a pull names.
wheel_of_fortune_reward_sets
cached
property
¶
wheel_of_fortune_reward_sets: Table[WheelOfFortuneRewardSetId, WheelOfFortuneRewardSetDef]
The Wheel of Fortune's jackpot sets (luckywheelrewardsets), by the set id a wheel reply names.
wheel_of_fortune_win_classes
cached
property
¶
wheel_of_fortune_win_classes: Table[WheelOfFortuneWinClassId, WheelOfFortuneWinClassDef]
The Wheel of Fortune's win classes (luckywheelclasses), by the win class a wheel reply names.
outer_realms_settings
cached
property
¶
outer_realms_settings: Table[OuterRealmsSettingId, OuterRealmsSettingDef]
The Outer Realms' run settings (tempServerSettings), by setting id.
horizon_settings
cached
property
¶
horizon_settings: Table[HorizonSettingId, HorizonSettingDef]
Beyond the Horizon's run settings (allianceBattleGroundSettings), by setting id.
alliance_tower_effects
cached
property
¶
alliance_tower_effects: Table[GameDataId['AllianceTowerEffect'], AllianceTowerEffectDef]
Beyond the Horizon's alliance tower effects by AllianceTowerEffect.
oasis_settlements
cached
property
¶
oasis_settlements: Table[OasisSettlementId, OasisSettlementDef]
Beyond the Horizon's Oasis Settlements (tradingCamps), one row per level, by settlement id.
oasis_trades
cached
property
¶
oasis_trades: Table[OasisTradeId, OasisTradeDef]
The trades Oasis Settlements offer (trades), by trade id.
citadel_levels
cached
property
¶
citadel_levels: Table[CitadelLevelId, CitadelLevelDef]
The alliance Citadel's levels in Beyond the Horizon's Jade Desert (allianceCitadels), by row id.
alliance_invasion_camps
cached
property
¶
alliance_invasion_camps: Table[AllianceInvasionCampId, AllianceInvasionCampDef]
The allianceInvasionCamps rows by camp id: the camp an aic push names while its event scales no
difficulty; with a difficulty chosen, the push names a scaling_camps row.
rewards
cached
property
¶
The rewards by id, each with the collectables it gives.
Client: CastleRewardData.parseXml (bundle line 142323)
equipment_effects
cached
property
¶
equipment_effects: Table[GameDataId['EquipmentEffect'], EquipmentEffectDef]
The bonuses equipment can roll by EquipmentEffect, the id an item's bonus names.
Client: EquipmentXml.parseXml (bundle line 144227)
daimyo_castles
cached
property
¶
daimyo_castles: Table[GameDataId['DaimyoCastle'], DaimyoCastleDef]
The Legion of the Daimyos' daimyo castles by DaimyoCastle, a row per rank and level.
Client: DaimyoCastleXmlData (bundle line 141378)
daimyo_townships
cached
property
¶
daimyo_townships: Table[GameDataId['DaimyoTownship'], DaimyoTownshipDef]
The Legion of the Daimyos' townships by DaimyoTownship, a row per rank and level.
Client: DaimyoTownshipXmlData (bundle line 141400)
berimond_special_camps
cached
property
¶
berimond_special_camps: Table[GameDataId['BerimondSpecialCamp'], BerimondSpecialCampDef]
The Battle for Berimond's watchtowers, capitals and resource village (specialcamps) by
BerimondSpecialCamp.
Client: FactionEventVO.parseAdditionalXmlFromRoot (bundle line 7398)
league_type_events
cached
property
¶
league_type_events: Table[LeagueTypeEventId, LeagueTypeEventDef]
Each league's points thresholds and rewards per event and reward set (leaguetypeevents), by row id;
league_type_event finds an event's.
leaderboard_rewards
cached
property
¶
leaderboard_rewards: Table[LeaderboardRewardId, LeaderboardRewardDef]
Each leaderboard rank band's rewards (leaderboardRewards), by row id; leaderboard_reward_bands
finds an event's.
league_type_event
¶
league_type_event(event_id: int, league_type_id: int, *, sub_type: int = 0, reward_set_id: int = 0) -> LeagueTypeEventDef | None
A league's rewards in an event: the first row of the event, sub type and league whose set is
reward_set_id, any set when that is 0 or less; None for none, where the client raises.
Client: ALeagueTypeScoreEventVO.parseAdditionalXmlFromRoot (bundle lines 10268-10276)
leaderboard_reward_bands
¶
leaderboard_reward_bands(event_id: int, reward_set_id: LeaderboardRewardSetId, league_type_id: int = -1) -> tuple[LeaderboardRewardDef, ...]
An event's leaderboard rank bands in a reward set, in table order; league_type_id=-1 takes every
league's.
Client: CastleLeaderBoardRewardsData.getRewardListForDialogList (bundle line 112015)
reward_list
¶
reward_list(reward_ids: Iterable[int], *, combine: bool = False) -> tuple[Collectable, ...]
What the rewards give, one after the other: a campaign's reward_ids, a title's reward_id.
An id with no reward (-1, or one the items lack) gives nothing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reward_ids
|
Iterable[int]
|
The rewards, in order |
required |
combine
|
bool
|
Add up the duplicates the client adds up, as some of its dialogs ask for |
False
|
Client: CastleRewardData.getListByIdArray (bundle line 142344)
unit_asset_path
¶
The unit's versioned bundle path.
Unknown IDs or missing assets raise KeyError. An omitted index loads lazily.
Client: WodPicHelper.addUnitPic (bundle lines 2249–2251),
BasicUnitVO.getShopIconURL (bundle line 19316).
tool_asset_path
¶
The tool's versioned bundle path, with the client's ToolUnitVO fallback.
A missing ToolUnitVO asset resolves to Unknown_Unit_Tools; other row
classes do not use that fallback. Unknown IDs or a missing final asset raise
KeyError. An omitted index loads lazily.
Client: ToolUnitVO.getVisualClassName (bundle lines 6537–6538),
BasicUnitVO.getShopIconURL (bundle line 19316).
is_unit
¶
Whether the ID is a combat unit rather than a tool or boost item.
unit_sort_key
¶
A sort key putting units and tools in the client's order: sorted(army.courtyard(), key=data.unit_sort_key).
Soldiers come first by sort_order from the highest, then tools from the lowest
(sorts_as_tool decides which is which). Stacks
that tie keep their order, as Python's and the client's sorts are both stable.
An id with no unit or tool row sorts as a soldier without a sort_order, logged once per
id; the client fails there instead (UnitInventoryList.addUnit throws, bundle line 21826).
Client: ClientConstSort.sortByUnitSortOrder (bundle line 3108), with _unitSortOrderNormal
and _unitSortOrderInvert (bundle lines 3162-3163)
units_by_role
¶
Every unit of one role (SoldierUnitVO.role, bundle line 12590).
berimond_lane_towers
¶
berimond_lane_towers(lane: BerimondLane) -> list[BerimondSpecialCampDef]
A Battle for Berimond lane's watchtowers, by id.
Client: FactionEventVO.getTowersByLane (bundle line 7473)
get_default_commander
¶
get_default_commander(commander_id: int) -> DefaultCommanderDef | None
A default commander, i.e. one of the negative LID sentinels.
vip_level
¶
vip_level(points: int) -> VipLevelDef | None
The VIP level points VIP points reach: the one whose range holds them, else the
top one when points are above 0, else None.
Client: CastleVIPData.getVIPLevelInfoVOByPoints (bundle line 47531)
monument_level
¶
monument_level(points: int) -> MonumentLevelDef | None
The level a monument with points upgrade points stands at: counting up from level 1, the last whose
required points it holds, up to the first level missing from the table. None when it holds none of them.
Client: CastleMonumentData.getLevelInfoByPointsAchieved (split.js line 239099), which ignores the kingdom
laboratory_level
¶
laboratory_level(points: int, kingdom: Kingdom) -> LaboratoryLevelDef | None
The level a laboratory in kingdom with points upgrade points stands at, counted as
monument_level counts among that kingdom's levels.
Client: CastleLaboratoryData.getLevelInfoByPointsAchieved (split.js line 672219)
booster_levels
¶
booster_levels(booster: BoosterId) -> dict[int, LevelBoosterDef]
A King's Market booster's rows by level; of two rows for one level, the last.
Client: CastlePremiumBoostData.parseXML (bundle line 81350)
returning_speed_percent
¶
The return speed booster's bonus in percent at level: 0 past the last level.
Raises:
| Type | Description |
|---|---|
KeyError
|
the table has no row for a level up to its row count, where the client fails too. |
Client: CastlePremiumBoostData.getBoostForReturningSpeedLevel (bundle line 81686)
caravan_overloader_percent
¶
The caravan overloader's bonus in percent at level.
Raises:
| Type | Description |
|---|---|
KeyError
|
the table has no row for |
Client: CastlePremiumBoostData.getResourcesTransportablePerCarriage (bundle line 81705)
scaling_camp_level
¶
scaling_camp_level(scaling_camp_id: ScalingCampId) -> int | None
The level an event's difficulty scaling gives a camp.
A map row that names a scaling camp overrides every other level source, which is how a chosen difficulty raises a camp for one player only.
berimond_invasion_camp
¶
berimond_invasion_camp(level: int, faction_id: BerimondFaction | int) -> NpcCampDefence | None
A Berimond invasion camp's row: the one for its level and its owner's faction.
The table has a row per faction at each level, its count_victory being the
camp's level; any faction but BerimondFaction.URSIDAE (blue) reads as red. A camp's wall, gate
and cooldown come from this row.
Client: CastleFactionInvasionCampData.parseXML and getFactionInvasion
(bundle lines 111903-111912), used by FactionInvasionCampMapObjectVO (bundle lines 76367-76380)
event_base_camp_level
¶
Where an invasion event's camps start for a player of this level.
Each event sorts players into level bands and gives every band its own victory range; a camp's base level is the bottom of that range, which is why the same camp is harder for a higher-level player.
league_type
¶
league_type(league_type_id: int, event_id: int = -1, *, sub_type: int = 0) -> LeagueBracketDef | None
A league by the LID a highscore reply names, within its event.
The same id is a different level band in every event, and within an
event in every sub type, so both are part of the key; event_id=-1
finds the rows of no event.
Client: AScoreEventVO.generateLeagueLevelsList (bundle line 14971)
resolve_relic_effect
¶
The plain effect a relic bonus id points at.
Relic bonuses index the relic effect table, which then names a normal effect; the two id spaces overlap and disagree.
effect_type_name
¶
Resolve an effect ID to its effect type's name.
dungeon_defense
¶
dungeon_defense(victories: int, kingdom_id: Kingdom | int = GREEN) -> DungeonDefence | None
The robber baron camp's defense for a victory count in a kingdom.
A count past the kingdom's highest row reads that row; one below its
lowest, or a kingdom with no rows, finds None, where the client gets
undefined. A treasure map dungeon is looked up by its node's own
countVictories and its map's kID, as
TreasureDungeonMapObjectVO.skipCooldownCostC2 does (bundle line 22007).
Client: CastleDungeonData.getDungeon (bundle lines 111765-111766)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
victories
|
int
|
The robber baron camp's victory count, from |
required |
kingdom_id
|
Kingdom | int
|
The robber baron camp's kingdom, or a treasure map's |
GREEN
|
general_ability
¶
general_ability(name: str, level: int) -> GeneralAbilityDef | None
A general's ability at one level, e.g. ("PowerSurge", 1).
general_skill
¶
general_skill(general_id: int, name: str, level: int) -> GeneralSkillDef | None
One level of a general's skill; the general's id comes from general.
Skill names repeat across generals, so the general is part of the key.
legendary_skill
¶
legendary_skill(tree_id: int, group_id: int, level: int) -> LegendarySkillDef | None
A Legendary skill by its tree, group and level.
Its effectType is no key: the same effect sits in more than one tree.
currency
¶
currency(json_key: str) -> CurrencyDef | None
A currency by its JSONKey, e.g. "KT" for khan tablets.
C1 and C2 (coins and rubies) are not in this table.
Client: CurrencyData.getXmlCurrencyByKey (bundle line 141194)
effect_type
¶
effect_type(name: str) -> EffectTypeDef | None
An effect type by name, e.g. "fameDefenseBonus".
raid_boss
¶
raid_boss(name: str) -> RaidBossDef | None
An alliance raid boss by name, e.g. "Necromancer".
global_effect
¶
global_effect(name: str) -> GlobalEffectDef | None
A global effect by name.
Names are not quite unique: "SpeedBoost" is two effects of
different strength, and asking for it raises with both ids.
unit
¶
A unit by its type and, optionally, level.
Units have no unique name. A type repeats across levels, and event
variants of one unit share its type, often with no level to tell them
apart (Ogermace is both 68 and 7), so a lookup that still matches
several units raises rather than picking one. A row without a level
has level -1, as the client reads it, so level=-1 finds those and
level=0 only a row whose level is 0.
tool
¶
A tool by its type and, optionally, level; see unit for why it can be ambiguous.
Event copies of a tool share its type (EliteComboRam is both 113 and 564).
parse
classmethod
¶
Trim a full items payload down to the combat-relevant tables.
load
classmethod
¶
The game data for the current items version, downloaded at most once per version.
The version file is checked on every call, so a game patch invalidates
the cache on its own. The data is kept for the process and every caller
gets the same instance while the version holds: it is shared, so treat
it as read-only and never change its tables or rows. Without a kept copy
for the version, the disk cache is tried, and only a miss downloads the
full payload. Concurrent loads, in threads or processes sharing
cache_dir, make one download between them.
When the CDN cannot be reached, the data already kept is returned (with
a warning), even if a newer version could not be fetched. Only a load
with nothing kept, or with refresh=True, raises. After a failed fetch
the CDN is not asked again for five minutes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
refresh
|
bool
|
Ignore the kept and cached copies and any failure backoff, and re-download |
False
|
cache_dir
|
str | Path | None
|
Where to keep trimmed data (default: XDG cache dir). It is read and
written only when the kept copy is not current, so a call that finds it
current returns it whatever |
None
|
Raises:
| Type | Description |
|---|---|
NetworkError
|
Nothing is kept (or |
loaded
classmethod
¶
The data the last load in this process gave, or None; never touches the network.
It is the instance load hands every caller, so treat it as read-only.
require
classmethod
¶
The data loaded in this process, loading it on first use: what the APIs that need game data read.
loaded when there is data, without touching the network; otherwise
load, which reads the disk cache when present and downloads only on a
miss. Threads that call it at once share one download. After a failed load
it raises without another request for five minutes, as load does.
Raises:
| Type | Description |
|---|---|
GameDataNotLoadedError
|
Nothing is loaded and the game data cannot be loaded |
gamedata.models¶
Typed rows from the GGE items payload.
Values arrive as strings, so every numeric field relies on pydantic coercion.
Tables whose meaning is not yet established are kept raw by
GameData instead of being modeled here on
a guess.
Classes:
| Name | Description |
|---|---|
UnitStats |
A combat unit. |
ToolStats |
A siege or defense tool. |
EffectDef |
An effect, e.g. |
EffectTypeDef |
An effect type, e.g. |
EffectCapDef |
The ceiling a group of effects stacks up to. |
EffectValue |
One bonus of an items row: an effect and its value, an |
EquipmentEffectValue |
One bonus of an equipment set or default commander: an equipment effect id and its value. |
EffectSpecRow |
Base for tables whose bonuses are an |
EquipmentEffectSpecRow |
Base for tables whose |
ConstructionItemDef |
A construction item - the decorations placed on castle buildings. |
AllianceBuffDef |
One alliance buff level and its alliance treasury cost. |
GlobalEffectDef |
A global (event) effect, active for everyone while its event runs. |
SceatSkillDef |
One level of a sceat skill, from the Hall of Legends trees. |
SceatSkillTreeDef |
A Hall of Legends sceat skill tree and the tab it shows in. |
GeneralSkillDef |
One level of a general's skill. |
FortificationDef |
A wall, gate or moat building and the protection it gives. |
RelicEffectDef |
A relic effect, which is a different id space from a plain effect. |
EquipmentEffectDef |
A bonus an equipment item can roll. |
GemDef |
A gem that can be slotted into an equipment item. |
EquipmentSetDef |
One threshold of an equipment set: the bonuses worn items of the set grant from |
LegendarySkillDef |
One level of a Legendary skill, e.g. |
AttackSlotDef |
An attack-screen slot and what unlocking it costs. |
ToolCategoryDef |
A tool category, e.g. |
HorseStats |
A travel booster - the value behind the |
DefaultCommanderDef |
A default commander, one of the negative commander ids. |
GeneralAbilityDef |
One level of a general's ability, the value |
CurrencyDef |
A currency; |
RaidBossDef |
An alliance raid boss. |
GeneralDef |
A general, the hero assigned to a commander. |
DungeonDefence |
What defends a robber baron camp, or a treasure map dungeon, at a given victory count. |
NpcCampDefence |
An event camp's defense, shared shape across the camp tables. |
DaimyoCastleDef |
A |
DaimyoTownshipDef |
A |
LeagueBracketDef |
A league: the level band an event sorts a player into, a row of |
Functions:
| Name | Description |
|---|---|
parse_stacks |
Parse the |
parse_ids |
Parse a comma-separated ID list. |
Attributes:
| Name | Type | Description |
|---|---|---|
FIGHT_TYPE_OFFENSIVE |
|
|
FIGHT_TYPE_DEFENSIVE |
|
|
ECONOMY_SORT_CATEGORY |
|
READING_CACHE
module-attribute
¶
READING_CACHE: ContextVar[bool] = ContextVar('reading_game_data_cache', default=False)
True while GameData reads its own cache, whose ints are already parsed values.
UnitStats
pydantic-model
¶
Bases: _UnitRow
A combat unit.
GameData.parse takes the units rows without slotTypes as
units. The client picks a row's class from name and group
instead (CastleWodData.getClassName, bundle line 2057): Barracks,
Eventunit, Keep, Kingdomunit and QuickAttack rows are SoldierUnitVOs,
while an Unknown row is a bare BasicUnitVO that reads no soldier
columns.
Client: SoldierUnitVO.parseXmlNode (bundle line 12531), after BasicUnitVO.parseXmlNode (bundle line 19211)
Fields:
-
source(str) -
group(str) -
level(int) -
speed(int) -
fight_type(int) -
cost_rubies(int) -
outer_realms_cost_rubies(int) -
sort_order(float) -
wod_id(GameDataId['Unit']) -
unit_type(str) -
role(GameDataKey[UnitRole]) -
melee_attack(int) -
range_attack(int) -
melee_defense(int) -
range_defense(int) -
loot_value(int) -
mead_supply(int) -
beef_supply(int) -
food_supply(int) -
healing_cost_coins(int) -
healing_cost_rubies(int) -
hybrid(bool)
Validators:
-
_int_attribute→wod_id -
_parse_int→level,speed,fight_type,cost_rubies,outer_realms_cost_rubies -
_sort_order→sort_order -
_string_attribute→source,group -
_parse_int_column→melee_attack,range_attack,melee_defense,range_defense,loot_value,mead_supply,beef_supply,food_supply,healing_cost_coins,healing_cost_rubies -
_type→unit_type -
_role→role -
_hybrid→hybrid
unit_type
pydantic-field
¶
unit_type: str = ''
Wire key type
Unit type, e.g. MeadRanger; shared across levels
melee_defense
pydantic-field
¶
melee_defense: int = 0
Wire key meleeDefence
Base defence against melee
range_defense
pydantic-field
¶
range_defense: int = 0
Wire key rangeDefence
Base defence against ranged
food_supply
pydantic-field
¶
food_supply: int = 0
Wire key foodSupply
Food upkeep, before the global food-consumption effect
healing_cost_coins
pydantic-field
¶
healing_cost_coins: int = 0
Wire key healingCostC1
Coin cost to heal one, before cost effects
healing_cost_rubies
pydantic-field
¶
healing_cost_rubies: int = 0
Wire key healingCostC2
Ruby cost to heal one
asset_name
property
¶
asset_name: str
The class name the client draws it by, e.g. Barracks_Unit_Speerman.
<name>_<group>, then _<type> when the type is not empty:
AVisualVO.getVisualClassName (bundle line 17795), which
WodPicHelper.addUnitPic (bundle line 2248) loads. The full asset
path comes from the client's versioned item map (ItemVersions, in
ggs.dll); GameData.unit_asset_path resolves that map lazily.
name_text_id
property
¶
name_text_id: str
The text id of its name, <type>_name in lower case: BasicUnitVO.getNameString (bundle line 19219).
is_allround
property
¶
is_allround: bool
A hybrid unit, which fits either flank (BasicUnitVO.isAllround, bundle line 19318).
ToolStats
pydantic-model
¶
Bases: _UnitRow
A siege or defense tool.
GameData.parse takes the units rows with slotTypes as tools;
the client's ToolUnitVO rows are those named Workshop, Dworkshop,
Elitetool, Eventtool and SceatTools. effects name plain effect ids; resolve them through
effects.
The raw_*_bonus columns are percentages. The client scales them by
0.01 as it parses, so the fractions are the properties of the same name
without raw_: scaling in a validator would scale again on every cache
round trip.
Client: ToolUnitVO.parseXmlNode (bundle line 6538), after BasicUnitVO.parseXmlNode (bundle line 19211);
ToolUnitVO.parseEffects (bundle line 6644); EventtoolUnitVO.parseXmlNode (bundle line 118914)
Fields:
-
source(str) -
group(str) -
level(int) -
speed(int) -
fight_type(int) -
cost_rubies(int) -
outer_realms_cost_rubies(int) -
sort_order(float) -
wod_id(GameDataId['Tool']) -
tool_type(str) -
category(GameDataKey[ToolSide]) -
slot_types(tuple[int, ...]) -
raw_allowed_to_attack(str) -
tool_category(GameDataKey[ToolCategory]) -
used_for_events(tuple[GameDataId['Event'], ...]) -
amount_per_wave(int) -
can_attack_npc(bool) -
effects(tuple[EffectValue, ...]) -
raw_wall_bonus(int) -
raw_gate_bonus(int) -
raw_moat_bonus(int) -
raw_def_range_bonus(int) -
raw_def_melee_bonus(int) -
raw_off_range_bonus(int) -
raw_off_melee_bonus(int)
Validators:
-
_int_attribute→wod_id -
_parse_int→level,speed,fight_type,cost_rubies,outer_realms_cost_rubies -
_sort_order→sort_order -
_string_attribute→source,group -
_parse_int_column→amount_per_wave,raw_wall_bonus,raw_gate_bonus,raw_moat_bonus,raw_def_range_bonus,raw_def_melee_bonus,raw_off_range_bonus,raw_off_melee_bonus -
_type→tool_type -
_used_for_events→used_for_events -
_category→category -
_string_column→raw_allowed_to_attack -
_slot_types→slot_types -
_effects→effects -
_tool_category→tool_category -
_can_attack_npc→can_attack_npc
tool_type
pydantic-field
¶
tool_type: str = ''
Wire key type
Tool type, e.g. Ladder; shared across levels, keys the per-wave limit
category
pydantic-field
¶
category: GameDataKey[ToolSide] = '0'
Wire key typ
Attack or defence; "0" when the row has none
slot_types
pydantic-field
¶
Wire key slotTypes
Attack-screen slot types it fits
raw_allowed_to_attack
pydantic-field
¶
raw_allowed_to_attack: str = ''
Wire key allowedToAttack
space+areaType pairs joined by #; see allowed_targets
tool_category
pydantic-field
¶
tool_category: GameDataKey[ToolCategory] = ''
Wire key toolCategory
Tool category, e.g. basic; empty for none
used_for_events
pydantic-field
¶
used_for_events: tuple[GameDataId['Event'], ...] = ()
Wire key clientUsageEventID
Events an event tool is used in; empty for none
amount_per_wave
pydantic-field
¶
amount_per_wave: int = -1
Wire key amountPerWave
The row's per-wave limit; -1 when absent. per_wave_limit is the limit that applies
can_attack_npc
pydantic-field
¶
can_attack_npc: bool = True
Wire key canBeUsedToAttackNPC
Usable against an NPC target
raw_wall_bonus
pydantic-field
¶
raw_wall_bonus: int = 0
Wire key wallBonus
Wall protection cancelled, in percent
raw_gate_bonus
pydantic-field
¶
raw_gate_bonus: int = 0
Wire key gateBonus
Gate protection cancelled, in percent
raw_moat_bonus
pydantic-field
¶
raw_moat_bonus: int = 0
Wire key moatBonus
Moat protection cancelled, in percent
raw_def_range_bonus
pydantic-field
¶
raw_def_range_bonus: int = 0
Wire key defRangeBonus
Defender ranged strength cancelled, in percent
raw_def_melee_bonus
pydantic-field
¶
raw_def_melee_bonus: int = 0
Wire key defMeleeBonus
Defender melee strength cancelled, in percent
raw_off_range_bonus
pydantic-field
¶
raw_off_range_bonus: int = 0
Wire key offRangeBonus
Ranged attack added, in percent
raw_off_melee_bonus
pydantic-field
¶
raw_off_melee_bonus: int = 0
Wire key offMeleeBonus
Melee attack added, in percent
asset_name
property
¶
asset_name: str
The class name the client draws it by, e.g. Workshop_Unit_Ram.
<name>_<group>, then _<type> when the type is not empty:
AVisualVO.getVisualClassName (bundle line 17795), which
WodPicHelper.addUnitPic (bundle line 2248) loads.
ToolUnitVO.getVisualClassName (bundle line 6539) draws
Unknown_Unit_Tools instead when that name has no versioned asset;
that check, and the full asset path, need the client's versioned item
map (ItemVersions, in ggs.dll). GameData.tool_asset_path resolves
that map and applies the fallback; this property is the original name.
name_text_id
property
¶
name_text_id: str
The text id of its name, <type>_name in lower case: BasicUnitVO.getNameString (bundle line 19219).
def_range_bonus
property
¶
def_range_bonus: float
Defender ranged strength this tool cancels, as a fraction.
def_melee_bonus
property
¶
def_melee_bonus: float
Defender melee strength this tool cancels, as a fraction.
allowed_targets
property
¶
(space_id, area_type) pairs this tool may attack.
An empty list means no restriction, and -1 in either position means
"any". A position with no leading integer is None, the client's NaN:
that pair matches no target but still makes the list a restriction.
Client: BasicUnitVO.parseSpaceIdAreaTypeValues (bundle line 19214)
per_wave_limit
property
¶
per_wave_limit: int
How many of this tool one wave may carry; 0 or less means no limit.
An offence support tool - one that fits slot type 10 - is always limited to one, whatever the column says.
Client: ToolUnitVO.amountPerWave (bundle line 6658)
is_allowed_by_attack_target
¶
Whether the tool may attack this target; no list means allowed anywhere.
None for the space or area type means it is unknown and matches any pair; a pair holding the client's NaN matches nothing.
Client: BasicUnitVO.checkIfTargetIsInArray (bundle line 19324)
EffectDef
pydantic-model
¶
Bases: _Row
An effect, e.g. relicOffensiveMeleeBonus.
An effect names which bonus an item grants; the effect type says what it modifies, and the cap says what it stacks with.
Fields:
-
effect_id(GameDataId['Effect']) -
name(str) -
effect_type_id(GameDataId['EffectType']) -
cap_id(int | None) -
area_type_ids(tuple[GameDataId[MapItemType], ...]) -
is_pvp_fight(bool) -
is_pve_fight(bool) -
space_ids(tuple[GameDataId[Kingdom], ...]) -
player_relation(GameDataKey[PlayerRelation]) -
raid_boss_ids(tuple[GameDataId['RaidBoss'], ...])
Validators:
-
_id_lists→area_type_ids,space_ids,raid_boss_ids
effect_type_id
pydantic-field
¶
effect_type_id: GameDataId['EffectType'] = 0
Wire key effectTypeID
The effect type it modifies
area_type_ids
pydantic-field
¶
area_type_ids: tuple[GameDataId[MapItemType], ...] = ()
Wire key areaTypeID
Area types it applies to; empty for every area
space_ids
pydantic-field
¶
space_ids: tuple[GameDataId[Kingdom], ...] = ()
Wire key spaceIDs
Kingdoms it applies in, as the client compares them with the area's spaceId; empty for every one
player_relation
pydantic-field
¶
player_relation: GameDataKey[PlayerRelation] = ''
Wire key playerRelation
The relationship to the target it needs; empty for any
raid_boss_ids
pydantic-field
¶
raid_boss_ids: tuple[GameDataId['RaidBoss'], ...] = ()
Wire key raidBossID
Raid bosses it is tied to; empty for none in particular
applies_to_area
¶
Whether the effect counts against a target of this area type; None or below 0 is every area.
Client: BonusVO.matchesConditions (bundle line 5708) checks the area type only above -1
applies_to_space
¶
Whether the effect counts in this castle space; None or below 0 is every space.
Client: BonusVO.matchesConditions (bundle line 5708) checks the space only above -1
applies_to_relation
¶
applies_to_relation(relation: PlayerRelation | str | None) -> bool
Whether the effect counts given the relationship to the target.
An unconditioned effect always counts; passing None leaves conditioned ones in, since the relationship is unknown rather than absent.
is_for_raid_boss
¶
Whether the effect counts against this raid boss.
Client: EffectVO.isForRaidBoss (bundle line 41705).
applies_to_raid_boss
¶
Whether the effect counts against this raid boss; None keeps every effect.
Client: EffectVO.isForRaidBoss (bundle line 41705) once a boss is
known.
EffectTypeDef
pydantic-model
¶
Bases: _Row
An effect type, e.g. fameDefenseBonus.
Fields:
-
effect_type_id(GameDataId['EffectType']) -
name(str) -
sort_category(int | None) -
combat_type(int | None)
effect_type_id
pydantic-field
¶
effect_type_id: GameDataId['EffectType']
Wire key effectTypeID
The effect type
EffectCapDef
pydantic-model
¶
Bases: _Row
The ceiling a group of effects stacks up to.
A row without maxTotalBonus - cap 99 among them - is uncapped, which is
why the field is optional rather than defaulting to zero.
Fields:
-
cap_id(int) -
max_total_bonus(float | None)
EffectValue
pydantic-model
¶
Bases: _EffectEntry
One bonus of an items row: an effect and its value, an effectID&value entry of the effects column.
The client reads the value with the class its effect's type names (BonusVO.parseFromValueString,
bundle line 5706): one number (EffectValueSimple, bundle line 17751), wodID+value pairs joined
by # (EffectValueWodID and EffectValueMap, bundle lines 17699 and 31617) or ids joined by
# (EffectValueIdList, bundle line 62242). Which one applies needs the effect types table, so
values keeps the numbers in that structure: 10 is ((10,),), 686+30#687+30 is
((686, 30), (687, 30)) and 1#2 is ((1,), (2,)).
The numbers stay plain even where they are ids: the key of a wodID+value pair is a wod id
(EffectValueWodID reads Number of it), and an id list names whatever its effect type
unlocks, so which table they index depends on the effect type, not on the column.
Fields:
EquipmentEffectValue
pydantic-model
¶
Bases: _EffectEntry
One bonus of an equipment set or default commander: an equipment effect id and its value.
The id indexes GameData.equipment_effects, not the effects table.
Client: EquipmentBonusVO.parseEquipmentFromValueString (bundle line 20940)
Fields:
-
values(tuple[tuple[int | float | None, ...], ...]) -
equipment_effect_id(GameDataId['EquipmentEffect'])
equipment_effect_id
pydantic-field
¶
equipment_effect_id: GameDataId['EquipmentEffect']
The equipment effect
EffectSpecRow
pydantic-model
¶
Bases: _Row
Base for tables whose bonuses are an effects column of effectID&value entries, comma separated.
Construction items, alliance buffs, global effects, sceat skills, general skills and gems name plain
effect ids this way, each parsed with BonusVO.parseFromValueString (bundle line 5706): construction
items in ConstructionItemVO.parseBoni (bundle line 47721), alliance buffs in
AllianceBuffVO.fillFromParamXml (bundle line 70575), global effects in GlobalEffectVO.parseXml
(bundle line 143698), sceat skills in CastleSceatSkillVO.parseBoni (bundle line 23075), general
skills in GeneralSkillVO.parseXML (bundle line 113368) and gems in CastleGemVO.parseXML (bundle
line 28295).
Fields:
-
effects(tuple[EffectValue, ...])
Validators:
-
_effects→effects
EquipmentEffectSpecRow
pydantic-model
¶
Bases: _Row
Base for tables whose effects column names equipment effect ids: equipment sets and default commanders.
Client: XmlEquipmentSetVO.addEffect (bundle line 144229), DefaultLordVO.parseFromXml (bundle line
102001)
Fields:
-
effects(tuple[EquipmentEffectValue, ...])
Validators:
-
_effects→effects
CastleEffectValue
pydantic-model
¶
Bases: _Row
One fixed bonus of a construction item: a column named after the bonus, and its value.
Client: CastleEffectVO.createFromXML (bundle line 79059)
Fields:
-
effect(CastleEffect) -
value(float)
ConstructionItemDef
pydantic-model
¶
Bases: EffectSpecRow
A construction item - the decorations placed on castle buildings.
Their bonuses are real combat bonuses: the flank unit limit item grants
+2% per level, so a level 15 one is the +30% a player sees on the flanks.
Besides effects, many rows grant fixed bonuses in columns of their own
(castle_effects), which the game lists first.
Client: ConstructionItemVO.fillFromParamXML (bundle line 47718)
Fields:
-
effects(tuple[EffectValue, ...]) -
construction_item_id(GameDataId['ConstructionItem']) -
name(str) -
group_id(int) -
level(int) -
rareness_id(int) -
slot_type_id(int) -
effect_group_id(int) -
duration_seconds(int) -
is_premium(bool) -
castle_effects(tuple[CastleEffectValue, ...])
Validators:
-
_effects→effects -
_castle_effect_columns -
_premium→is_premium
construction_item_id
pydantic-field
¶
construction_item_id: GameDataId['ConstructionItem']
Wire key constructionItemID
The construction item
duration_seconds
pydantic-field
¶
duration_seconds: int = 0
Wire key duration
Temporary item lifetime; 0 for permanent
is_premium
pydantic-field
¶
is_premium: bool = False
Wire key isPremium
A premium item; any text in the column counts
castle_effects
pydantic-field
¶
castle_effects: tuple[CastleEffectValue, ...] = ()
The fixed bonuses, one per bonus column with text in it
AllianceBuffDef
pydantic-model
¶
Bases: EffectSpecRow
One alliance buff level and its alliance treasury cost.
Client: AllianceBuffVO.fillFromParamXml (bundle lines 70591–70593), AllianceBuffData.getCosts (27731–27732).
Fields:
-
effects(tuple[EffectValue, ...]) -
alliance_buff_id(int) -
series_id(GameDataId[AllianceBuffType]) -
level(int) -
max_level(int) -
duration_seconds(int) -
required_buff_id(int) -
costs(tuple[Collectable, ...])
Validators:
alliance_buff_id
pydantic-field
¶
alliance_buff_id: int
Wire key allianceBuffID
Individual buff level row
series_id
pydantic-field
¶
series_id: GameDataId[AllianceBuffType] = 0
Wire key allianceBuffSeriesID
The upgrade or boost the level belongs to
duration_seconds
pydantic-field
¶
duration_seconds: int = -1
Wire key duration
Boost duration; -1 is permanent
GlobalEffectDef
pydantic-model
¶
Bases: EffectSpecRow
A global (event) effect, active for everyone while its event runs.
Fields:
-
effects(tuple[EffectValue, ...]) -
global_effect_id(GameDataId['GlobalEffect']) -
name(str) -
boost_value(float) -
min_level(int) -
max_level(int)
Validators:
-
_effects→effects
global_effect_id
pydantic-field
¶
global_effect_id: GameDataId['GlobalEffect']
Wire key globalEffectID
The global effect
SceatSkillDef
pydantic-model
¶
Bases: EffectSpecRow
One level of a sceat skill, from the Hall of Legends trees.
Fields:
-
effects(tuple[EffectValue, ...]) -
skill_id(GameDataId['SceatSkill']) -
skill_group_id(int) -
level(int) -
skill_tree_id(int) -
tier(int)
Validators:
-
_effects→effects
SceatSkillTreeDef
pydantic-model
¶
Bases: _Row
A Hall of Legends sceat skill tree and the tab it shows in.
Client: CastleLegendSkillData.parseXML (split.js line 576514) skips a row without a skillTreeID and files
the tree under its tabID in sceatTreeTabMap
Fields:
Validators:
-
_id→skill_tree_id -
_tab→tab_id
skill_tree_id
pydantic-field
¶
skill_tree_id: int
Wire key skillTreeID
The tree, a SceatSkill.skill_tree_id
tab_id
pydantic-field
¶
tab_id: GameDataId[SceatSkillTab] = -1
Wire key tabID
The tab it shows in; -1 for none
GeneralSkillDef
pydantic-model
¶
Bases: EffectSpecRow
One level of a general's skill.
Fields:
-
effects(tuple[EffectValue, ...]) -
skill_id(GameDataId['GeneralSkill']) -
general_id(GameDataId['General']) -
name(str) -
skill_group_id(int) -
level(int) -
tier(int)
Validators:
-
_effects→effects
general_id
pydantic-field
¶
general_id: GameDataId['General'] = 0
Wire key generalID
The general it belongs to
FortificationDef
pydantic-model
¶
Bases: _Row
A wall, gate or moat building and the protection it gives.
The bonuses are the items columns, i.e. percentages: a level 3 castle wall reads 70 and protects by 0.70 once scaled.
Fields:
-
wod_id(GameDataId['Building']) -
label(str) -
level(int) -
wall_bonus(float) -
gate_bonus(float) -
moat_bonus(float)
RelicEffectDef
pydantic-model
¶
Bases: _Row
A relic effect, which is a different id space from a plain effect.
A relic item's bonus ids index this table, not effects: id 4 is
perceptionBonus as a plain effect but gateReduction as a relic
effect. Resolving in the wrong space yields a plausible, wrong answer.
Fields:
-
relic_effect_id(int) -
effect_id(GameDataId['Effect']) -
minimum_value(float) -
maximum_value(float) -
relic_effect_type(GameDataKey[RelicEffectType])
effect_id
pydantic-field
¶
effect_id: GameDataId['Effect'] = 0
Wire key effectID
The effect it resolves to
relic_effect_type
pydantic-field
¶
relic_effect_type: GameDataKey[RelicEffectType] = ''
Wire key relicEffectType
Its kind; empty for none
EquipmentEffectDef
pydantic-model
¶
Bases: _Row
A bonus an equipment item can roll.
Client: XmlEquipmentEffectVO.parseXml (bundle line 144158)
Fields:
-
equipment_effect_id(GameDataId['EquipmentEffect']) -
effect_id(GameDataId['Effect']) -
bonus(int) -
wearer_id(GameDataId[WearerType]) -
item_group_ids(tuple[GameDataId['EquipmentGroup'], ...]) -
ignore_cap(bool)
Validators:
-
_int_attribute→bonus -
_client_boolean→ignore_cap -
_item_groups→item_group_ids
equipment_effect_id
pydantic-field
¶
equipment_effect_id: GameDataId['EquipmentEffect']
Wire key equipmentEffectID
The id an item's bonus row names
effect_id
pydantic-field
¶
effect_id: GameDataId['Effect'] = -1
Wire key effectID
The effect it resolves to; -1 when unset
item_group_ids
pydantic-field
¶
item_group_ids: tuple[GameDataId['EquipmentGroup'], ...] = ()
Wire key itemGroupID
The item groups that can roll it
GemDef
pydantic-model
¶
Bases: EffectSpecRow
A gem that can be slotted into an equipment item.
Its effects name plain effect ids.
Client: CastleGemVO.parseXML (bundle lines 28287-28291)
Fields:
-
effects(tuple[EffectValue, ...]) -
gem_id(GameDataId['Gem']) -
level(int) -
reuse_asset_of_gem_id(GameDataId['Gem']) -
set_id(int) -
trigger_chance(int)
Validators:
-
_effects→effects
reuse_asset_of_gem_id
pydantic-field
¶
reuse_asset_of_gem_id: GameDataId['Gem'] = -1
Wire key reuseAssetOfGemID
The gem whose look and name it shares; -1 for its own
EquipmentSetDef
pydantic-model
¶
Bases: EquipmentEffectSpecRow
One threshold of an equipment set: the bonuses worn items of the set grant from needed_items on.
Its effects name equipment effect ids.
Client: EquipmentXml.parseEquipmentSets (bundle line 144122) groups the
rows by setID; XmlEquipmentSetVO.addEffect (bundle line 144227)
parses each effect with EquipmentBonusVO.parseEquipmentFromValueString
(bundle line 20940).
Fields:
-
effects(tuple[EquipmentEffectValue, ...]) -
row_id(int) -
set_id(int) -
needed_items(int)
Validators:
-
_effects→effects
LegendarySkillDef
pydantic-model
¶
Bases: _Row
One level of a Legendary skill, e.g. gateReduction.
Client: CastleLegendSkillVO.parseXML (bundle line 48652); isMaxLevel (bundle line 48717)
Fields:
-
skill_id(GameDataId['LegendarySkill']) -
level(int) -
tier(int) -
skill_tree_id(int) -
skill_group_id(int) -
effect_type(str) -
total_effect_value(float) -
total_cost_skill_points(int) -
cost_skill_points(int) -
required_skill_id(GameDataId['LegendarySkill'] | None) -
previous_skill_id(GameDataId['LegendarySkill'] | None) -
following_skill_id(GameDataId['LegendarySkill'] | None)
Validators:
-
_zero_is_none→required_skill_id,previous_skill_id,following_skill_id -
_previous_defaults_to_required
skill_id
pydantic-field
¶
skill_id: GameDataId['LegendarySkill']
Wire key skillID
The Legendary skill
total_cost_skill_points
pydantic-field
¶
total_cost_skill_points: int = 0
Wire key totalCostSkillPoints
cost_skill_points
pydantic-field
¶
cost_skill_points: int = 0
Wire key costSkillPoints
Skill points this level costs over the one before
required_skill_id
pydantic-field
¶
required_skill_id: GameDataId['LegendarySkill'] | None = None
Wire key requiredSkillID
The skill this level needs; None for none
previous_skill_id
pydantic-field
¶
previous_skill_id: GameDataId['LegendarySkill'] | None = None
Wire key previousSkillID
The level this one replaces when bought; the required skill when the row names none
following_skill_id
pydantic-field
¶
following_skill_id: GameDataId['LegendarySkill'] | None = None
Wire key followingSkillID
The next level; None at the last
AttackSlotDef
pydantic-model
¶
ToolCategoryDef
pydantic-model
¶
HorseStats
pydantic-model
¶
Bases: _Row
A travel booster - the value behind the HBW field on movements.
The game names a horse only by its button's place in the travel dialog, the
tooltip text horse<n> (ACastlePostActionDialog.calculateTooltip, bundle
line 27269), not by its row, so the Horse enum is named from the two designer labels.
Client: HorseTravelboosterVO.parseXmlNode (bundle line 118814) after
AVisualVO.parseXmlNode (bundle line 17800), read from the horses table
Fields:
-
wod_id(GameDataId['Horse']) -
source(str) -
group(str) -
label(str) -
building_label(str) -
horse_type(str) -
unit_boost(int) -
market_boost(int) -
spy_boost(int) -
cost_factor_c1(float) -
cost_factor_c2(float) -
is_instant_spy_horse(bool)
Validators:
-
_wod_id→wod_id -
_string_attribute→source,group,label,building_label -
_type→horse_type -
_boost→unit_boost,market_boost,spy_boost -
_cost_factor→cost_factor_c1,cost_factor_c2 -
_instant_spy→is_instant_spy_horse
label
pydantic-field
¶
label: str = ''
Wire key comment2
Designer label the game does not read, e.g. Warhorse or Fast Ship
building_label
pydantic-field
¶
building_label: str = ''
Wire key comment1
Designer label the game does not read, e.g. Stable1 or Harbor3
unit_boost
pydantic-field
¶
unit_boost: int = 0
Wire key unitBoost
Travel speed bonus percent for troops
market_boost
pydantic-field
¶
market_boost: int = 0
Wire key marketBoost
Travel speed bonus percent for traders
spy_boost
pydantic-field
¶
spy_boost: int = 0
Wire key spyBoost
Travel speed bonus percent for spies
cost_factor_c1
pydantic-field
¶
cost_factor_c1: float = 0
Wire key costFactorC1
Coin cost multiplier; 0 when not paid in coins
DefaultCommanderDef
pydantic-model
¶
Bases: EquipmentEffectSpecRow
A default commander, one of the negative commander ids.
-14 is the bought premium commander, -15 the commander of a robber baron
attack, -21 the NPC that holds a camp, and so on. Its effects name
equipment effect ids.
Client: DefaultLordVO.parseFromXml (bundle line 101999) parses each
effect with EquipmentBonusVO.parseEquipmentFromValueString.
Fields:
-
effects(tuple[EquipmentEffectValue, ...]) -
commander_id(int) -
commander_type(str) -
wearer_id(GameDataId[WearerType])
Validators:
-
_effects→effects
GeneralAbilityDef
pydantic-model
¶
Bases: _Row
One level of a general's ability, the value set_abilities sends per slot.
Client: GeneralAbilityXmlVO.fillFromParamXml (bundle line 113203), keyed by
abilityID in GeneralsData (bundle line 113021)
Fields:
-
ability_id(GameDataId['GeneralAbility']) -
name(str) -
ability_group_id(int) -
level(int) -
ability_trigger_id(int) -
trigger_per_wave(int) -
ability_attack_effect_id(int) -
ability_defense_effect_id(int)
Validators:
-
_parse_int→ability_id,ability_group_id,level,ability_trigger_id,trigger_per_wave,ability_attack_effect_id,ability_defense_effect_id
ability_id
pydantic-field
¶
ability_id: GameDataId['GeneralAbility'] = 0
Wire key abilityID
The ability, the value set_abilities sends
ability_group_id
pydantic-field
¶
ability_group_id: int = 0
Wire key abilityGroupID
The group the levels share
ability_trigger_id
pydantic-field
¶
ability_trigger_id: int = 0
Wire key abilityTriggerID
What triggers the ability
trigger_per_wave
pydantic-field
¶
trigger_per_wave: int = 0
Wire key triggerPerWave
Triggers per wave
CurrencyDef
pydantic-model
¶
Bases: _Row
A currency; json_key is the key the server uses for it in currency lists.
The caps, rareness and hidden flags the client reads from other tables are not parsed.
Client: XmlCurrencyVO.parseXml (bundle line 141282), read from the
currencies table by CurrencyData.parseXml (bundle line 141151)
Fields:
-
currency_id(GameDataId['CurrencyId']) -
name(str) -
json_key(str) -
asset_name(str)
Validators:
-
_parse_int→currency_id
currency_id
pydantic-field
¶
currency_id: GameDataId['CurrencyId'] = -1
Wire key currencyID
The currency; -1 when unset
VipLevelDef
pydantic-model
¶
Bases: _Row
A VIP level: the VIP points it spans, the premium commanders it gives free each day and its attack speed bonus.
The other bonuses the client reads from the row are not parsed.
Client: VIPLevelInfoVO.parseConfigXML and inPointRange (bundle lines 400638, 400754),
read from the viplevels table by CastleVIPData.parseVIPLevels (bundle line 245583)
Fields:
-
vip_level_id(int) -
min_points(int) -
max_points(int) -
free_premium_commanders_per_day(int) -
attack_speed_bonus(int)
Validators:
-
_parse_int→vip_level_id,min_points,max_points,free_premium_commanders_per_day,attack_speed_bonus
min_points
pydantic-field
¶
min_points: int = 0
Wire key thresholdMin
The fewest VIP points at this level
max_points
pydantic-field
¶
max_points: int = 0
Wire key thresholdMax
The most VIP points at this level
free_premium_commanders_per_day
pydantic-field
¶
free_premium_commanders_per_day: int = 0
Wire key freePremiumGeneralsPerDay
Premium commanders a day that cost no rubies while VIP time runs
LevelBoosterDef
pydantic-model
¶
Bases: _Row
One level of a King's Market booster bought in levels: the caravan overloader or the return speed booster.
Client: CastlePremiumBoostData.parseXML (bundle line 81350), read from the levelBoosters table
Fields:
-
booster(GameDataId[BoosterId]) -
level(int) -
boost_percent(int) -
cost_rubies(int)
Validators:
-
_parse_int→booster,level,boost_percent,cost_rubies
MonumentLevelDef
pydantic-model
¶
Bases: _Row
A monument level: the glory bonus it gives and the upgrade points that reach it.
A row without a readable level is left out: the client keys it as NaN, which no lookup reaches.
Client: MonumentLevelInfoVO.parseXML (split.js line 375127), read from the monuments table by
CastleMonumentData.parseXML (split.js line 239069), which keys the rows by level
Fields:
-
level(int) -
glory_bonus(int | None) -
required_points(int | None)
Validators:
-
_level→level -
_number→glory_bonus,required_points
LaboratoryLevelDef
pydantic-model
¶
Bases: _Row
A laboratory level in one kingdom: the production bonus it gives and the upgrade points that reach it.
A row without a readable level or kingdom is left out: the client keys it as NaN, which no lookup reaches.
Client: LaboratoryLevelInfoVO.parseXML and landmarkBonus (split.js lines 672286, 672323), read from
the laboratories table by CastleLaboratoryData.parseXML (split.js line 672181), which keys the rows
by kingdom and level
Fields:
-
level(int) -
kingdom(GameDataId[Kingdom]) -
iron_bonus(int) -
charcoal_bonus(int) -
olive_oil_bonus(int) -
glass_bonus(int) -
required_points(int | None)
Validators:
-
_level→level -
_kingdom→kingdom -
_bonus→iron_bonus,charcoal_bonus,olive_oil_bonus,glass_bonus -
_required_points→required_points
kingdom
pydantic-field
¶
kingdom: GameDataId[Kingdom] = Kingdom.GREEN
Wire key kID
The kingdom whose laboratories have this level
iron_bonus
pydantic-field
¶
iron_bonus: int = 0
Wire key ironAllianceBoost
Percent production bonus on iron ore
charcoal_bonus
pydantic-field
¶
charcoal_bonus: int = 0
Wire key charcoalAllianceBoost
Percent production bonus on charcoal
olive_oil_bonus
pydantic-field
¶
olive_oil_bonus: int = 0
Wire key oliveOilAllianceBoost
Percent production bonus on olive oil
glass_bonus
pydantic-field
¶
glass_bonus: int = 0
Wire key glassAllianceBoost
Percent production bonus on glass
RaidBossDef
pydantic-model
¶
Bases: _Row
An alliance raid boss.
Client: AllianceRaidbossVO.parseXML (bundle line 113835), read from the
raidBosses table by RaidBossData (bundle line 113671)
Fields:
-
raid_boss_id(GameDataId['RaidBoss']) -
name(str) -
rarity(int)
Validators:
-
_parse_int→raid_boss_id,rarity
GeneralDef
pydantic-model
¶
Bases: _Row
A general, the hero assigned to a commander.
Client: GeneralXmlVO.fillFromParamXml (bundle line 33102)
Fields:
-
general_id(GameDataId['General']) -
name(str) -
raw_attack_slots(str) -
raw_defense_slots(str) -
rarity_id(GameDataId['GeneralRarity']) -
max_level(int) -
max_star_level(int) -
unlock_currency_id(GameDataId['CurrencyId']) -
upgrade_currency_ids(tuple[GameDataId['CurrencyId'], ...]) -
is_preview(bool)
Validators:
-
_parse_int→rarity_id,unlock_currency_id -
_id_lists→upgrade_currency_ids -
_preview→is_preview
rarity_id
pydantic-field
¶
rarity_id: GameDataId['GeneralRarity'] = 2
Wire key generalRarityID
Its rarity, which prices unlocking and stars
unlock_currency_id
pydantic-field
¶
unlock_currency_id: GameDataId['CurrencyId'] = 0
Wire key unlockCurrencyID
The shard that unlocks it; 0 for none
upgrade_currency_ids
pydantic-field
¶
upgrade_currency_ids: tuple[GameDataId['CurrencyId'], ...] = ()
Wire key upgradeCurrencyIDs
The shards that raise its star level
is_preview
pydantic-field
¶
is_preview: bool = False
Wire key isPreview
Shown ahead of its release; it cannot be unlocked
DungeonDefence
pydantic-model
¶
Bases: _Row
What defends a robber baron camp, or a treasure map dungeon, at a given victory count.
The client reads only kID, countVictories and skipCosts of a row
(CastleDungeonData.generateData, bundle line 111754); it never reads the
defenders or the commander. SpyArmy.from_robber_baron_camp lays the defenders out as
a spy report would.
Fields:
-
count_victories(int) -
kingdom_id(GameDataId[Kingdom]) -
commander(DefaultCommanderDef | None) -
skip_costs(int) -
raw_units_left(str) -
raw_units_middle(str) -
raw_units_right(str) -
raw_units_keep(str) -
raw_tools_left(str) -
raw_tools_middle(str) -
raw_tools_right(str)
Validators:
-
_commander→commander
kingdom_id
pydantic-field
¶
kingdom_id: GameDataId[Kingdom] = 0
Wire key kID
The kingdom; a treasure map's camp has its map's kID
commander
pydantic-field
¶
commander: DefaultCommanderDef | None = None
Wire key lordID
The default commander holding the camp, from the lords table
NpcCampDefence
pydantic-model
¶
Bases: _Row
An event camp's defense, shared shape across the camp tables.
Covers the nomad, samurai, Berimond invasion and alliance invasion camps.
Client: CastleInvasionCampNodeVO.parseXML (bundle line 39701)
Fields:
-
count_victory(int) -
def_strength(int) -
raw_defense_units(str) -
raw_defense_tools(str) -
wall_bonus(float) -
gate_bonus(float) -
commander_id(int) -
guards(int) -
unit_wall_count(int) -
cool_down(int) -
dungeon_level(int) -
faction_id(GameDataId[BerimondFaction])
faction_id
pydantic-field
¶
faction_id: GameDataId[BerimondFaction] = BerimondFaction.URSIDAE
Wire key factionID
The Berimond faction a Berimond invasion camp row is for
DaimyoCastleDef
pydantic-model
¶
Bases: _DaimyoAreaRow
A daimyoCastles row, by the id a daimyo castle's map row names.
Client: DaimyoCastleXmlData.getDaimyoCastleByID (bundle line 141388)
Fields:
-
rank(int) -
level(int) -
wall_bonus(float) -
gate_bonus(float) -
moat_bonus(float) -
guards(int) -
unit_wall_count(int) -
camp_id(GameDataId['DaimyoCastle'])
DaimyoTownshipDef
pydantic-model
¶
Bases: _DaimyoAreaRow
A daimyoTownships row, by the id a township's map row names.
Client: DaimyoTownshipXmlData.getDaimyoTownshipByID (bundle line 141410)
Fields:
-
rank(int) -
level(int) -
wall_bonus(float) -
gate_bonus(float) -
moat_bonus(float) -
guards(int) -
unit_wall_count(int) -
camp_id(GameDataId['DaimyoTownship'])
LeagueBracketDef
pydantic-model
¶
Bases: _Row
A league: the level band an event sorts a player into, a row of leaguetypes.
Its league_type_id is the LID of the highscore commands. Ids repeat
across events, and within an event across sub types. An invasion camp's
base level is the band's lower victory count, so this is also what says how
hard the samurai camps are for a player of a given level.
Client: AScoreEventVO.generateLeagueLevelsList (bundle line 14971),
LeagueTypeVO.parseXML (bundle line 91460)
Fields:
-
league_type_id(GameDataId['LeagueType'] | None) -
event_id(GameDataId['Event'] | None) -
sub_type(int) -
min_level(int) -
max_level(int) -
victory_min(int) -
victory_max(int)
Validators:
-
_parse_int_or_none→league_type_id,event_id -
_parse_int→sub_type,min_level,max_level,victory_min,victory_max
league_type_id
pydantic-field
¶
league_type_id: GameDataId['LeagueType'] | None = None
Wire key leaguetypeID
League type id; None when the row has none
event_id
pydantic-field
¶
event_id: GameDataId['Event'] | None = None
Wire key eventID
The event it belongs to; -1 for none, None when the row has none
parse_stacks
¶
Parse the wodID+count#wodID+count encoding used for camp defenses.
Unparseable segments are skipped rather than failing the row.
gamedata.tables¶
Typed rows of the items tables the generated id enums name: buildings, researches, events, loot boxes, equipment groups, difficulty types, quests, daily quests, titles, achievements and alliance crest layouts and colours, plus difficulty scaling camps and the rewards.
Each model reads the columns its client value object reads, with the same defaults. The rewards
rows are read into collectables (CollectableParserX2CRewards, bundle line 62897); the costs and
other collectable columns the client reads with CollectableParserX2CList (bundle line 62874) from
other tables are not read yet.
Classes:
| Name | Description |
|---|---|
BuildingDef |
A building: what every building, tower, gate, moat and decoration row has in common. |
ResearchDef |
One level of a research. |
EventDef |
An event: who sees it and where. |
LootBoxDef |
A loot box. |
LootBoxTypeDef |
A loot box type, whose keys count toward a free box. |
GeneralRarityDef |
A general rarity: the shards that unlock a general of it and raise its stars, and the xp of each level. |
GeneralsHubCharacterDef |
A character of the generals hub's inn, who spins a tombola for an offering. |
GemColorDef |
A gem colour, by which the auto-sell rules sell gems. |
EquipmentGroupDef |
An equipment item group, as equipment effects name them. |
DifficultyTypeDef |
An event difficulty type, e.g. easyPlus. |
QuestCondition |
One thing a quest counts: a |
QuestDef |
A quest: where it shows, what unlocks it and what it counts. |
DailyQuestDef |
A daily quest. |
TitleDef |
A title of the glory, Berimond or Storm Islands title systems. |
AchievementCondition |
One thing an achievement counts: a |
AchievementDef |
One step of an achievement series. |
AllianceCrestColorDef |
A colour an alliance crest can use. |
AllianceCrestLayoutDef |
A layout an alliance crest can use, and the bonuses it grants. |
ConstructionItemRecipeDef |
A recipe that crafts a construction item, one of a blueprint's. |
PrebuiltCastleDef |
A castle or camp you start a kingdom, a season event's map or a special server with, and its price. |
SpecialServerPrebuiltCastleDef |
A prebuilt castle as a special server's castle selection offers it: the Outer Realms, Beyond the Horizon or |
StartResourcesDef |
The goods a special server's prebuilt castle starts with. |
PrivateVillageDef |
One level of a private resource village, bought with resource village tokens. |
CraftingRecipeDef |
A recipe a crafting queue crafts. |
CraftingQueueDef |
A crafting queue's slots: those it always has, and the temporary ones coins unlock for a while. |
FusionSystemDef |
A fusion forge's energy and fusion rules. |
FusionForgeDef |
A fusion forge's dust and daily minute skips. |
JudgementDef |
A citizen judgement: where it appears, and what each verdict asks and gives. |
CoatOfArmsSymbolDef |
A symbol for a coat of arms. One with a required achievement is a premium symbol: that achievement |
PackageDef |
An event package: what a shop sells for a fixed price, and what a gift package holds. |
PlayerNameChangeDef |
The ruby price of one of your player name changes, by its number. |
ScalingCampDef |
A camp of an event's difficulty scaling: the level and costs a chosen difficulty gives it. |
DaimyoContractDef |
An alliance contract of the daimyo event: one level of a contract rank. |
RewardDef |
One reward of the items: what it gives, and to whom. |
TreasureMapDef |
A treasure map: a season event's map or one of the treasure hunt's, with its nodes and prices. |
TreasureMapNodeDef |
A node of a treasure map: a camp, an obstacle or a port, and the nodes that unlock it. |
PartPayPriceDef |
A price paid in parts: a season map's obstacle, a treasure map node's or a slum level's. |
DonationItemDef |
What a donation event takes, and the points it gives. Its set, donation type and resource are not read. |
DonationSettingDef |
A donation event's run settings: which donation items it takes and which rewards it gives. |
TrainingProgramDef |
A training program of the officers' school: the bonus it gives against one event's targets, and its prices. |
EventDifficultyDef |
A difficulty an event offers, and what unlocking a locked one costs. |
GachaDef |
A level of a gacha event: the pulls it covers and how many one buy may make. |
WheelOfFortuneRewardSetDef |
A Wheel of Fortune jackpot set: the rewards a jackpot spin can win. |
WheelOfFortuneWinClassDef |
A Wheel of Fortune win class: the spins to the next class, the rubies a skipped spin costs, and the previews. |
OuterRealmsSettingDef |
An Outer Realms run's settings. Only some columns are read: the presets and rewards are not. |
HorizonSettingDef |
A Beyond the Horizon run's settings. Only some columns are read: the presets, map and rewards are not. |
FeastDef |
A feast you can hold for faster recruitment in every castle: its price, bonus, duration and the levels it is |
AllianceTowerEffectDef |
An alliance tower effect of Beyond the Horizon: the bonus it gives, and how its price and strength grow per level. |
AllianceInvasionCampDef |
An alliance invasion camp, by the id an |
OasisSettlementDef |
One level of a Beyond the Horizon Oasis Settlement: the trades it offers, its cooldown and the army it takes. |
OasisTradeDef |
A trade an Oasis Settlement offers: the materials one trade costs and what it brings. |
CitadelLevelDef |
One level of the alliance Citadel in Beyond the Horizon's Jade Desert: its reach, defence and upgrade price. |
LeagueTypeEventDef |
One league's points thresholds and rewards in one event, for one reward set. |
LeaderboardRewardDef |
The rewards of one rank band of an event's leaderboard, in one reward set. |
BerimondSpecialCampDef |
A Battle for Berimond special camp: a watchtower, a capital or the resource village, by the id map rows and the |
Functions:
| Name | Description |
|---|---|
row_id |
The row's own id, |
is_cost_column |
Whether an items column is a |
Attributes:
| Name | Type | Description |
|---|---|---|
RewardId |
The id of a |
|
CoatOfArmsSymbolId |
The id of a |
|
PackageId |
The id of a |
|
ConstructionItemRecipeId |
The id of a |
|
TreasureMapNodeId |
The id of a |
|
CraftingRecipeId |
The id of a |
|
CraftingQueueId |
The |
|
StartResourcesId |
The id of a |
|
PartPayPriceId |
The id of a |
|
DonationItemId |
The id of a |
|
DonationSettingId |
The id of a |
|
TrainingProgramId |
The id of an |
|
EventDifficultyId |
The id of an |
|
GachaId |
The id of a |
|
WheelOfFortuneRewardSetId |
The id of a |
|
WheelOfFortuneWinClassId |
The id of a |
|
OuterRealmsSettingId |
The id of a |
|
HorizonSettingId |
The id of an |
|
OasisSettlementId |
The id of a |
|
OasisTradeId |
The id of a |
|
CitadelLevelId |
The id of an |
|
DaimyoContractId |
The id of a daimyo alliance contract, a row of |
|
ScalingCampId |
The id of an |
|
AllianceInvasionCampId |
The id of an |
|
RewardSetId |
The reward set a league score event's |
|
LeagueTypeEventId |
The id of a |
|
LeaderboardRewardSetId |
The reward set a score event's |
|
LeaderboardRewardId |
The id of a |
RewardId
module-attribute
¶
The id of a rewards row, whose collectables GameData.reward_list gives.
The rows have no name, so no generated enum names them; this type marks the id space instead.
CoatOfArmsSymbolId
module-attribute
¶
The id of a crestsymbols row, a coat of arms symbol that GameData.coat_of_arms_symbols describes.
The rows have no name, so no generated enum names them; this type marks the id space instead.
PackageId
module-attribute
¶
The id of a packages row, an event package that GameData.packages describes.
The rows have no name the game shows, so no generated enum names them; this type marks the id space instead.
ConstructionItemRecipeId
module-attribute
¶
The id of a constructionItemRecipes row, a recipe that GameData.construction_item_recipes describes.
The rows have no name, so no generated enum names them; this type marks the id space instead.
TreasureMapNodeId
module-attribute
¶
The id of a tmapnodes row, a node of a treasure map that GameData.treasure_map_nodes describes.
The rows have no name, so no generated enum names them; this type marks the id space instead.
CraftingRecipeId
module-attribute
¶
The id of a craftingRecipes row, a recipe that GameData.crafting_recipes describes.
The rows have no name, so no generated enum names them; this type marks the id space instead.
CraftingQueueId
module-attribute
¶
The queueTypeId of a craftingQueues row, the crafting queue GameData.crafting_queues describes.
The rows have no name, so no generated enum names them; this type marks the id space instead.
StartResourcesId
module-attribute
¶
The id of a startResources row, the goods GameData.start_resources gives a special server's castle.
The rows have no name, so no generated enum names them; this type marks the id space instead.
PartPayPriceId
module-attribute
¶
The id of a partpayprices row, a price paid in parts that GameData.part_pay_prices describes.
DonationItemId
module-attribute
¶
The id of a donationItems row, what a donation event takes, that GameData.donation_items describes.
DonationSettingId
module-attribute
¶
The id of a donationSettings row, a donation event's run settings, that GameData.donation_settings
describes.
TrainingProgramId
module-attribute
¶
The id of an officersSchoolEffects row, a training program that GameData.training_programs describes.
EventDifficultyId
module-attribute
¶
The id of an eventAutoScalingDifficulties row, an event difficulty that GameData.event_difficulties
describes.
GachaId
module-attribute
¶
The id of a gachaEvents row, a gacha level that GameData.gachas describes.
WheelOfFortuneRewardSetId
module-attribute
¶
The id of a luckywheelrewardsets row, a Wheel of Fortune jackpot set that
GameData.wheel_of_fortune_reward_sets describes.
WheelOfFortuneWinClassId
module-attribute
¶
The id of a luckywheelclasses row, a Wheel of Fortune win class that
GameData.wheel_of_fortune_win_classes describes; the classes count up from 1.
OuterRealmsSettingId
module-attribute
¶
The id of a tempServerSettings row, an Outer Realms run's settings that GameData.outer_realms_settings
describes.
HorizonSettingId
module-attribute
¶
The id of an allianceBattleGroundSettings row, a Beyond the Horizon run's settings that
GameData.horizon_settings describes.
OasisSettlementId
module-attribute
¶
The id of a tradingCamps row, a Beyond the Horizon Oasis Settlement level that
GameData.oasis_settlements describes.
OasisTradeId
module-attribute
¶
The id of a trades row, a trade an Oasis Settlement offers that GameData.oasis_trades describes.
CitadelLevelId
module-attribute
¶
The id of an allianceCitadels row, a level of the alliance Citadel that GameData.citadel_levels
describes.
DaimyoContractId
module-attribute
¶
The id of a daimyo alliance contract, a row of GameData.daimyo_castle_contracts or
GameData.daimyo_township_contracts: each table counts its own.
ScalingCampId
module-attribute
¶
The id of an eventAutoScalingCamps row, a camp of an event's difficulty scaling that
GameData.scaling_camps describes.
AllianceInvasionCampId
module-attribute
¶
The id of an allianceInvasionCamps row, an alliance invasion camp that GameData.alliance_invasion_camps
describes.
RewardSetId
module-attribute
¶
The reward set a league score event's RSID names: which GameData.league_type_events rows give its
leagues' rewards. Not a rewards row; 0 picks no set.
LeagueTypeEventId
module-attribute
¶
The id of a leaguetypeevents row, a league's rewards in one event that GameData.league_type_events
describes.
LeaderboardRewardSetId
module-attribute
¶
The reward set a score event's LRSI names: which GameData.leaderboard_rewards rows give its leaderboard's
rank rewards. Not a rewards row.
LeaderboardRewardId
module-attribute
¶
The id of a leaderboardRewards row, one rank band's rewards that GameData.leaderboard_rewards
describes.
PACKAGE_TYPE_BUNDLE
module-attribute
¶
A package that gives the rewards of the packages it names.
Client: ClientConstPackages.PACKAGE_TYPE_BUNDLE (split.js line 27633)
BuildingDef
pydantic-model
¶
Bases: EffectSpecRow
A building: what every building, tower, gate, moat and decoration row has in common.
The per-building columns the client's building subclasses read on top (storage, production,
hospital capacity, ...) are not read; fortifications has the walls, gates and moats. Nor are the
collectable lists AShopVO.parseXmlNode reads with its items parsers: the cost* columns
(costs) other than costC2, the sell* columns other than sellC1 (the sell list) and
tempServerCostWood and tempServerCostStone (Outer Realms repair costs).
Client: AVisualVO.parseXmlNode (bundle line 17800), AShopVO.parseXmlNode (bundle lines
31713-31715), ABasicBuildingVO.parseXmlNode, parseEffects and
parseAreaSpecificEffects (bundle lines 17842-17864)
Fields:
-
effects(tuple[EffectValue, ...]) -
building_id(GameDataId['Building']) -
name(str) -
group(GameDataKey[BuildingGroup]) -
building_type(str) -
level(int) -
required_level(int) -
required_legendary_level(int) -
early_unlock_required_level(int) -
upgrade_building_id(GameDataId['Building']) -
downgrade_building_id(GameDataId['Building']) -
shop_category(str) -
xp(int) -
might_value(int) -
storeable(bool) -
maximum_count(int) -
destructable(bool) -
outer_realms_destructable(bool) -
horizon_only(bool) -
never_on_horizon(bool) -
slum_level_needed(int) -
needs_construction_expert(bool) -
sell_coins(int) -
cost_rubies(int) -
sort_order(float) -
only_in_area_types(tuple[GameDataId[MapItemType], ...]) -
only_in_kingdoms(tuple[GameDataId[Kingdom], ...]) -
only_in_event_ids(tuple[GameDataId['Event'], ...]) -
available_in_map_ids(tuple[GameDataId['TreasureMapId'], ...]) -
sceat_skill_id(GameDataId['SceatSkill']) -
construction_item_group_ids(tuple[int, ...]) -
low_level_build_durations(tuple[int, ...]) -
low_level_main_castle_cost_rubies(tuple[int, ...]) -
effect_locked(bool) -
wall_bonus(int) -
moat_bonus(int) -
build_duration(int) -
building_ground_type(GameDataKey[BuildingGroundType]) -
district_type_id(int) -
is_district(bool) -
is_relic_building(bool) -
area_specific_effects(tuple[EffectValue, ...])
Validators:
-
_effects→effects -
_id→building_id -
_int_column→level,required_level,required_legendary_level,early_unlock_required_level,upgrade_building_id,downgrade_building_id,xp,might_value,maximum_count,slum_level_needed,sell_coins,cost_rubies,wall_bonus,moat_bonus,build_duration,district_type_id -
_bool_column→storeable,destructable,outer_realms_destructable,horizon_only,never_on_horizon,needs_construction_expert,effect_locked,is_district,is_relic_building -
_list_column→only_in_area_types,only_in_kingdoms,only_in_event_ids -
_int_list_column→available_in_map_ids,low_level_build_durations,low_level_main_castle_cost_rubies -
_construction_item_groups→construction_item_group_ids -
_sceat_skill→sceat_skill_id -
_sort_order→sort_order -
_text_column→name,group,shop_category,building_ground_type -
_area_effects→area_specific_effects -
_type→building_type
group
pydantic-field
¶
group: GameDataKey[BuildingGroup] = ''
Building group, e.g. Building or Tower
building_type
pydantic-field
¶
building_type: str = ''
Wire key type
Building type, e.g. Level1; empty for none
required_level
pydantic-field
¶
required_level: int = 0
Wire key requiredLevel
Player level needed to build it
required_legendary_level
pydantic-field
¶
required_legendary_level: int = 0
Wire key requiredLegendLevel
Legendary level needed to build it
early_unlock_required_level
pydantic-field
¶
early_unlock_required_level: int = 0
Wire key earlyUnlockRequiredLevel
Player level from which it can be unlocked early
upgrade_building_id
pydantic-field
¶
upgrade_building_id: GameDataId['Building'] = 0
Wire key upgradeWodID
The building it upgrades to; 0 for none
downgrade_building_id
pydantic-field
¶
downgrade_building_id: GameDataId['Building'] = 0
Wire key downgradeWodID
The building it downgrades to; 0 for none
shop_category
pydantic-field
¶
shop_category: str = 'NOT_IN_SHOP'
Wire key shopCategory
Build menu category; NOT_IN_SHOP for none
maximum_count
pydantic-field
¶
maximum_count: int = 1000000
Wire key maximumCount
How many a castle may have
outer_realms_destructable
pydantic-field
¶
outer_realms_destructable: bool = True
Wire key tempServerDestructable
It can be torn down on the Outer Realms
horizon_only
pydantic-field
¶
horizon_only: bool = False
Wire key isBattleGround
Built in Beyond the Horizon only
never_on_horizon
pydantic-field
¶
never_on_horizon: bool = False
Wire key isNotBattleGround
Never built in Beyond the Horizon
slum_level_needed
pydantic-field
¶
slum_level_needed: int = 0
Wire key slumLevelNeeded
Slum level needed to build it
needs_construction_expert
pydantic-field
¶
needs_construction_expert: bool = False
Wire key constructionExpert
Building it needs the construction expert
cost_rubies
pydantic-field
¶
cost_rubies: int = 0
Wire key costC2
Rubies it costs to build or upgrade to
sort_order
pydantic-field
¶
sort_order: float = 1000000
Wire key sortOrder
Order in the build menu; a value that is no number sorts last
only_in_area_types
pydantic-field
¶
only_in_area_types: tuple[GameDataId[MapItemType], ...] = ()
Wire key onlyInAreaTypes
The castle types it may be built in; empty for any
only_in_kingdoms
pydantic-field
¶
only_in_kingdoms: tuple[GameDataId[Kingdom], ...] = ()
Wire key kIDs
The kingdoms it may be built in; empty for every kingdom
only_in_event_ids
pydantic-field
¶
only_in_event_ids: tuple[GameDataId['Event'], ...] = ()
Wire key eventIDs
The events it may be built in; empty for none in particular
available_in_map_ids
pydantic-field
¶
available_in_map_ids: tuple[GameDataId['TreasureMapId'], ...] = ()
Wire key mapIDs
The season event maps it may be built on; empty for any
sceat_skill_id
pydantic-field
¶
sceat_skill_id: GameDataId['SceatSkill'] = 0
Wire key sceatSkillLocked
The sceat skill that unlocks it; 0 for none
construction_item_group_ids
pydantic-field
¶
Wire key constructionItemGroupIDs
The construction item groups it takes
low_level_build_durations
pydantic-field
¶
Wire key lowLevelBuildDuration
Build times in seconds at the lowest player levels
low_level_main_castle_cost_rubies
pydantic-field
¶
Wire key lowLevelMainCastleCostC2
Ruby costs in the main castle at the lowest player levels
effect_locked
pydantic-field
¶
effect_locked: bool = False
Wire key effectLocked
Its effects need unlocking
build_duration
pydantic-field
¶
build_duration: int = 0
Wire key buildDuration
Build time in seconds
building_ground_type
pydantic-field
¶
building_ground_type: GameDataKey[BuildingGroundType] = BuildingGroundType.NONE
Wire key buildingGroundType
The ground it stands on
district_type_id
pydantic-field
¶
district_type_id: int = 0
Wire key districtTypeID
The district type it belongs to
is_relic_building
pydantic-field
¶
is_relic_building: bool = False
Wire key isRelicBuilding
It is a relic building
area_specific_effects
pydantic-field
¶
area_specific_effects: tuple[EffectValue, ...] = ()
Wire key areaSpecificEffects
Bonuses that count only where their effect's conditions hold
rubies_to_build
¶
The rubies it costs to build, before cost effects: low_level_main_castle_cost_rubies for the
player's level when it names one, else cost_rubies, and 0 at level 0. With the level unknown,
the most either could be.
Client: ABasicBuildingVO.costC2 (bundle lines 17950-17953)
ResearchDef
pydantic-model
¶
Bases: EffectSpecRow
One level of a research.
costs and outer_realms_costs read every cost column of the row (see
Collectable.from_columns), a currency named by its Name (costLegendaryToken) by the
currency names GameData passes in as validation context (currency_ids).
Client: AResearchVO.fillFromParamXML (bundle lines 61502-61516); getBaseCosts (bundle line
61530) picks outer_realms_costs on the Outer Realms, and getFinalCosts (bundle line 61531)
applies discounts to them
Fields:
-
effects(tuple[EffectValue, ...]) -
research_id(GameDataId['Research']) -
label(str) -
group_id(int) -
level(int) -
prerequisite_ids(tuple[GameDataId['Research'], ...]) -
min_research_tower_level(int) -
required_level(int) -
required_legendary_level(int) -
research_duration(int) -
outer_realms_research_duration(int) -
only_with_research_expert(bool) -
cost_rubies(int) -
costs(tuple[Collectable, ...]) -
outer_realms_costs(tuple[Collectable, ...])
Validators:
-
_effects→effects -
_read_costs -
_id→research_id -
_int_column→group_id,level,min_research_tower_level,required_level,required_legendary_level,research_duration,outer_realms_research_duration,cost_rubies -
_prerequisites→prerequisite_ids -
_expert→only_with_research_expert -
_text_column→label
label
pydantic-field
¶
label: str = ''
Wire key comment2
Designer label the game does not read, e.g. recruitment speed
prerequisite_ids
pydantic-field
¶
prerequisite_ids: tuple[GameDataId['Research'], ...] = ()
Wire key prerequisiteIDs
Researches it needs first
min_research_tower_level
pydantic-field
¶
min_research_tower_level: int = 1
Wire key minResearchTowerLevel
Research tower level it needs
required_level
pydantic-field
¶
required_level: int = 0
Wire key requiredLevel
Player level it needs
required_legendary_level
pydantic-field
¶
required_legendary_level: int = 0
Wire key requiredLegendLevel
Legendary level it needs
research_duration
pydantic-field
¶
research_duration: int = 0
Wire key researchDuration
Research time in seconds
outer_realms_research_duration
pydantic-field
¶
outer_realms_research_duration: int = 0
Wire key globalServerResearchDuration
Research time on the Outer Realms
only_with_research_expert
pydantic-field
¶
only_with_research_expert: bool = False
Wire key onlyWithResearchExpert
It needs the research expert
costs
pydantic-field
¶
costs: tuple[Collectable, ...] = ()
What it costs, in the items' order: resources, coins, rubies, tokens, ...
outer_realms_costs
pydantic-field
¶
outer_realms_costs: tuple[Collectable, ...] = ()
What it costs on the Outer Realms
EventDef
pydantic-model
¶
Bases: _Row
An event: who sees it and where.
Client: ASpecialEventVO.parseBasicsFromXmlNode (bundle lines 2959-2974); a season event's own map is the
first of mapID (ASeasonEventVO.parseEventXmlNode, bundle line 31385); a shop's packages are
packageIDs (BuyPackagesEventVO.parseEventXmlNode, split.js line 33778)
Fields:
-
event_id(GameDataId['Event']) -
event_type(str) -
min_level(int) -
max_level(int) -
open_with_login(bool) -
sort_order(int) -
crossplay_min_level(int) -
extension_unlock(int) -
kingdoms(tuple[GameDataId[Kingdom], ...]) -
area_types(tuple[GameDataId[MapItemType], ...]) -
map_ids(tuple[GameDataId['TreasureMapId'], ...]) -
package_ids(tuple[PackageId, ...])
Validators:
-
_id→event_id -
_int_column→min_level,max_level,sort_order,crossplay_min_level,extension_unlock -
_open_with_login→open_with_login -
_kingdoms→kingdoms -
_area_types→area_types -
_map_ids→map_ids -
_package_ids→package_ids -
_text_column→event_type
open_with_login
pydantic-field
¶
open_with_login: bool = False
Wire key openWithLogin
Its dialog opens on login
crossplay_min_level
pydantic-field
¶
crossplay_min_level: int = -1
Wire key crossplayMinLevel
Lowest level on a crossplay server; -1 for none
extension_unlock
pydantic-field
¶
extension_unlock: int = 0
Wire key eventExtensionUnlock
Its extension unlock
kingdoms
pydantic-field
¶
kingdoms: tuple[GameDataId[Kingdom], ...] = (Kingdom.GREEN,)
Wire key kIDs
The kingdoms it runs in
area_types
pydantic-field
¶
area_types: tuple[GameDataId[MapItemType], ...] = (MapItemType.CASTLE,)
Wire key areaTypes
The castle types it counts in
map_ids
pydantic-field
¶
map_ids: tuple[GameDataId['TreasureMapId'], ...] = ()
Wire key mapID
The treasure maps it runs on, e.g. a season event's, whose first is its own map
LootBoxDef
pydantic-model
¶
Bases: _Row
A loot box.
Client: LootBoxVO.parseXML (bundle line 112502)
Fields:
-
loot_box_id(GameDataId['LootBox']) -
name(str) -
loot_box_type_id(GameDataId['LootBoxType']) -
tombola_id(int) -
key_tombola_id(int) -
rarity(int) -
draws(int) -
sort_order(int)
Validators:
-
_id→loot_box_id -
_int_column→loot_box_type_id,tombola_id,key_tombola_id,rarity,draws,sort_order -
_text_column→name
loot_box_type_id
pydantic-field
¶
loot_box_type_id: GameDataId['LootBoxType'] = 0
Wire key lootBoxTypeID
Its type
LootBoxTypeDef
pydantic-model
¶
Bases: _Row
A loot box type, whose keys count toward a free box.
Client: LootBoxTypeVO.parseXML (bundle line 58900)
Fields:
-
loot_box_type_id(GameDataId['LootBoxType']) -
theme(str) -
key_payout_threshold(int)
Validators:
-
_id→loot_box_type_id -
_int_column→key_payout_threshold -
_text_column→theme
loot_box_type_id
pydantic-field
¶
loot_box_type_id: GameDataId['LootBoxType']
Wire key lootBoxTypeID
The loot box type
GeneralRarityDef
pydantic-model
¶
Bases: _Row
A general rarity: the shards that unlock a general of it and raise its stars, and the xp of each level.
Client: GeneralRarityXmlVO.fillFromParamXml (bundle line 113254), keyed by generalRarityID in
GeneralsData (bundle line 113035)
Fields:
-
rarity_id(GameDataId['GeneralRarity']) -
name(str) -
max_star_level(int) -
unlock_cost(int) -
upgrade_costs(tuple[int, ...]) -
xp_requirements(tuple[int, ...]) -
universal_shards_per_hundred(int)
Validators:
-
_id→rarity_id -
_int_column→max_star_level,unlock_cost,universal_shards_per_hundred -
_int_lists→upgrade_costs,xp_requirements -
_text_column→name
rarity_id
pydantic-field
¶
rarity_id: GameDataId['GeneralRarity']
Wire key generalRarityID
The rarity
max_star_level
pydantic-field
¶
max_star_level: int = 0
Wire key maxStarLevel
The highest star level
upgrade_costs
pydantic-field
¶
Wire key upgradeCosts
Shards that raise a general from each star level
xp_requirements
pydantic-field
¶
Wire key xpRequirements
The total xp each level starts at
universal_shards_per_hundred
pydantic-field
¶
universal_shards_per_hundred: int = 0
Wire key universalShardsPerHundred
Universal shards per hundred shards
star_upgrade_cost
¶
Shards that raise a general from star_level; 0 past the last, where the client offers none.
Client: GeneralRarityXmlVO.getRequiredShards (bundle line 113278)
GeneralsHubCharacterDef
pydantic-model
¶
Bases: _Row
A character of the generals hub's inn, who spins a tombola for an offering.
Client: GeneralsHubQuestVO.fillFromParamXml (bundle line 47005), keyed by characterID in
GeneralsData (bundle line 113011)
Fields:
-
character_id(GameDataId['GeneralsHubCharacter']) -
name(str) -
cooldown_seconds(int) -
max_free_openings(int) -
offering_currency_ids(tuple[GameDataId['CurrencyId'], ...])
Validators:
-
_id→character_id -
_int_column→cooldown_seconds,max_free_openings -
_offerings→offering_currency_ids -
_text_column→name
character_id
pydantic-field
¶
character_id: GameDataId['GeneralsHubCharacter']
Wire key characterID
The character
cooldown_seconds
pydantic-field
¶
cooldown_seconds: int = 0
Wire key coolDownInSeconds
Seconds from the last free spin to the next
max_free_openings
pydantic-field
¶
max_free_openings: int = 0
Wire key maxFreeOpenings
Free spins that can wait at once
offering_currency_ids
pydantic-field
¶
offering_currency_ids: tuple[GameDataId['CurrencyId'], ...] = ()
Wire key tombolas
The offerings its tombolas take, one per tombola
GemColorDef
pydantic-model
¶
Bases: _Row
A gem colour, by which the auto-sell rules sell gems.
Client: GemColorVO.parseXml (bundle line 144489), read by CastleGemData.parseGemColors (bundle line
144298)
Fields:
-
color_id(GameDataId['GemColor']) -
color_code(str)
Validators:
-
_id→color_id -
_text_column→color_code
EquipmentGroupDef
pydantic-model
¶
Bases: _Row
An equipment item group, as equipment effects name them.
Client: XmlEquipmentGroupVO.parseXml (bundle line 144187)
Fields:
-
group_id(GameDataId['EquipmentGroup']) -
name(str) -
wearer_id(GameDataId[WearerType]) -
slot_id(GameDataId[EquipmentSlot]) -
pic_id(int) -
drop_rate(int)
Validators:
group_id
pydantic-field
¶
group_id: GameDataId['EquipmentGroup']
Wire key itemGroupID
The item group
wearer_id
pydantic-field
¶
wearer_id: GameDataId[WearerType] = -1
Wire key wearerID
Who wears it; -1 for any
slot_id
pydantic-field
¶
slot_id: GameDataId[EquipmentSlot] = -1
Wire key slotID
The slot it goes in
DifficultyTypeDef
pydantic-model
¶
Bases: _Row
An event difficulty type, e.g. easyPlus.
Client: EventAutoScalingDifficultyTypeVO.parseXML (bundle line 38258)
Fields:
-
difficulty_type_id(GameDataId['DifficultyType']) -
name(str) -
sort_order(int)
Validators:
-
_id→difficulty_type_id -
_int_column→sort_order -
_text_column→name
QuestCondition
pydantic-model
¶
Bases: _Row
One thing a quest counts: a type+amount+data part of its conditions.
Client: ABasicQuestConditionVO.loadFromParamArray (bundle line 52833)
Fields:
condition_type
pydantic-field
¶
condition_type: GameDataKey[QuestConditionType]
What it counts, e.g. buyRubies
raw_data
pydantic-field
¶
raw_data: str = ''
Its |-separated parameters, which mean something different for each type
parse_list
classmethod
¶
parse_list(value: object) -> list[QuestCondition] | object
Each #-separated condition of a conditions column; an empty part is left out.
Client: CastleQuestVO.parseConditions (bundle line 52467), DailyQuestVO.fillFromParamXML (bundle
line 134125)
QuestDef
pydantic-model
¶
Bases: _Row
A quest: where it shows, what unlocks it and what it counts.
Client: CastleQuestVO.fillFromParamXML (bundle lines 52452-52454)
Fields:
-
quest_id(GameDataId['QuestId']) -
series_id(int) -
series_number(int) -
quests_in_series(int) -
shown_kingdom(GameDataId[Kingdom]) -
trigger_kingdom(GameDataId[Kingdom]) -
hidden(bool) -
map_id(GameDataId['TreasureMapId']) -
required_level(int) -
required_legendary_level(int) -
required_quest_id(GameDataId['QuestId']) -
quest_giver_id(int) -
event_id(GameDataId['Event']) -
duration(int) -
objective_type(int) -
auto_show(bool) -
sort_priority(int | None) -
cost_rubies(int) -
questbook_tab_id(int) -
conditions(tuple[QuestCondition, ...])
Validators:
-
_id→quest_id -
_int_column→series_id,series_number,quests_in_series,trigger_kingdom,map_id,required_level,required_legendary_level,required_quest_id,quest_giver_id,event_id,duration,objective_type,cost_rubies,questbook_tab_id -
_shown_kingdom→shown_kingdom -
_flag→hidden,auto_show -
_sort_priority→sort_priority -
_conditions→conditions
series_number
pydantic-field
¶
series_number: int = 1
Wire key questSeriesNumber
Its place in the series
quests_in_series
pydantic-field
¶
quests_in_series: int = 0
Wire key numberOfQuestsInSeries
Quests in the series
shown_kingdom
pydantic-field
¶
shown_kingdom: GameDataId[Kingdom] = Kingdom.GREEN
Wire key shownKingdomID
The kingdom it is shown in
trigger_kingdom
pydantic-field
¶
trigger_kingdom: GameDataId[Kingdom] = Kingdom.GREEN
Wire key triggerKingdomID
The kingdom it counts in, as the row has it
map_id
pydantic-field
¶
map_id: GameDataId['TreasureMapId'] = -1
Wire key mapID
The season event map it belongs to; -1 for none
required_level
pydantic-field
¶
required_level: int = 0
Wire key requiredLevel
Player level it needs
required_legendary_level
pydantic-field
¶
required_legendary_level: int = 0
Wire key requiredLegendLevel
Legendary level it needs
required_quest_id
pydantic-field
¶
required_quest_id: GameDataId['QuestId'] = -1
Wire key requiredQuestID
The quest it needs first; -1 for none
quest_giver_id
pydantic-field
¶
quest_giver_id: int = 0
Wire key questGiverID
The character who gives it
event_id
pydantic-field
¶
event_id: GameDataId['Event'] = 0
Wire key eventID
The event it belongs to; 0 for none
sort_priority
pydantic-field
¶
sort_priority: int | None = None
Wire key sortPriority
Order in the quest book; None sorts last
DailyQuestDef
pydantic-model
¶
Bases: _Row
A daily quest.
Client: DailyQuestVO.fillFromParamXML (bundle lines 134124-134131)
Fields:
-
quest_id(GameDataId['DailyQuestId']) -
trigger_kingdom(GameDataId[Kingdom]) -
is_outer_realms_quest(bool) -
daily_task_points(int) -
level_calculated(bool) -
conditions(tuple[QuestCondition, ...])
Validators:
-
_id→quest_id -
_int_column→trigger_kingdom,daily_task_points -
_outer_realms→is_outer_realms_quest -
_level_calculated→level_calculated -
_conditions→conditions
quest_id
pydantic-field
¶
quest_id: GameDataId['DailyQuestId']
Wire key dailyQuestID
The daily quest
trigger_kingdom
pydantic-field
¶
trigger_kingdom: GameDataId[Kingdom] = Kingdom.GREEN
Wire key triggerKingdomID
The kingdom it counts in; -1 for any
is_outer_realms_quest
pydantic-field
¶
is_outer_realms_quest: bool = False
Wire key isTempServerQuest
It runs on the Outer Realms
daily_task_points
pydantic-field
¶
daily_task_points: int = 0
Wire key addDailyDutyPoints
Daily task points it gives
TitleDef
pydantic-model
¶
Bases: EffectSpecRow
A title of the glory, Berimond or Storm Islands title systems.
Client: TitleVO.parseXml (bundle lines 62705-62713)
Fields:
-
effects(tuple[EffectValue, ...]) -
title_id(GameDataId['Title']) -
title_system(GameDataKey[TitleSystem]) -
threshold(int) -
display_type(GameDataKey[TitleDisplayType]) -
forced(bool) -
decay(int) -
is_positive(bool) -
top_x(int) -
previous_title_id(GameDataId['Title']) -
reward_id(RewardId) -
might_value(int)
Validators:
-
_effects→effects -
_id→title_id -
_int_column→threshold,decay,top_x,previous_title_id,reward_id,might_value -
_flag→forced,is_positive -
_text_column→title_system,display_type
title_system
pydantic-field
¶
title_system: GameDataKey[TitleSystem] = '-1'
Wire key type
Its title system
display_type
pydantic-field
¶
display_type: GameDataKey[TitleDisplayType] = '-1'
Wire key displayType
Whether it goes before or after the name
top_x
pydantic-field
¶
top_x: int = -1
Wire key topX
The top ranks that hold it; -1 or 0 for a points title
previous_title_id
pydantic-field
¶
previous_title_id: GameDataId['Title'] = -1
Wire key previousTitleID
The title below it in its system; -1 for the first
reward_id
pydantic-field
¶
Wire key rewardID
Its reward, whose collectables GameData.reward_list gives; -1 for none
rewards
¶
rewards(*, game_data: GameData | None = None) -> tuple[Collectable, ...]
What holding the title gives; nothing when it has no reward.
Client: CastleTitleSystemHelper.getTitleRewardText reads getListById(rewardID) when it is
above -1 (bundle line 4444)
AchievementCondition
pydantic-model
¶
Bases: _Row
One thing an achievement counts: a type+amount+params part of its conditions.
Client: AchievementConditionVO (bundle line 92956)
Fields:
params
pydantic-field
¶
Its further parameters, which differ for each type
parse_list
classmethod
¶
parse_list(value: object) -> list[AchievementCondition] | object
Each #-separated condition of a conditions column; an empty part is left out.
Client: AchievementVO.fillFromParamXML (bundle lines 92883-92887)
AchievementDef
pydantic-model
¶
Bases: _Row
One step of an achievement series.
Client: AchievementVO.fillFromParamXML (bundle lines 92882-92887) and
AchievementSerieVO.fillFromParamXML (bundle line 92817), grouped by series in
CastleAchievementData (bundle lines 29820-29827)
Fields:
-
achievement_id(GameDataId['Achievement']) -
series_id(int) -
series_number(int) -
achievements_in_series(int) -
required_achievement_id(GameDataId['Achievement']) -
achievement_points(int) -
category(str) -
conditions(tuple[AchievementCondition, ...])
Validators:
-
_id→achievement_id -
_int_column→series_id,series_number,achievements_in_series,required_achievement_id,achievement_points -
_text_column→category -
_conditions→conditions
achievement_id
pydantic-field
¶
achievement_id: GameDataId['Achievement']
Wire key achievementID
The achievement
series_id
pydantic-field
¶
series_id: int = 0
Wire key achievementSeriesID
The series it is a step of
series_number
pydantic-field
¶
series_number: int = 0
Wire key achievementSeriesNumber
Its step in the series
achievements_in_series
pydantic-field
¶
achievements_in_series: int = 0
Wire key numberOfAchievementsInSeries
Steps in the series
required_achievement_id
pydantic-field
¶
required_achievement_id: GameDataId['Achievement'] = 0
Wire key requiredAchievementID
The step before it; -1 or 0 for none
AllianceCrestColorDef
pydantic-model
¶
Bases: _Row
A colour an alliance crest can use.
Client: AllianceCrestColorVO.parseXML (bundle line 111012), keyed by id in
CastleAllianceCrestData.parseXML (bundle lines 110965-110970)
Fields:
-
color_id(GameDataId['AllianceCrestColor']) -
color(str)
Validators:
color_id
pydantic-field
¶
color_id: GameDataId['AllianceCrestColor']
Wire key allianceCoatColorID
The colour
AllianceCrestLayoutDef
pydantic-model
¶
Bases: EffectSpecRow
A layout an alliance crest can use, and the bonuses it grants.
Client: AllianceCrestLayoutVO.parseXML and parseEffects (bundle lines 111024-111032), keyed by id
in CastleAllianceCrestData.parseXML (bundle lines 110958-110963)
Fields:
-
effects(tuple[EffectValue, ...]) -
layout_id(GameDataId['AllianceCrestLayout']) -
color_count(int) -
event_id(GameDataId['Event']) -
max_duration(int) -
effect_icon_id(int) -
label(str)
Validators:
-
_effects→effects -
_id→layout_id -
_int_column→color_count,event_id,max_duration,effect_icon_id -
_text_column→label
layout_id
pydantic-field
¶
layout_id: GameDataId['AllianceCrestLayout']
Wire key allianceCoatLayoutID
The layout
event_id
pydantic-field
¶
event_id: GameDataId['Event'] = 0
Wire key eventID
The event that awards it; 0 for none
max_duration
pydantic-field
¶
max_duration: int = 0
Wire key maxDuration
Seconds it is held once won; 0 for a layout that does not expire
ConstructionItemRecipeDef
pydantic-model
¶
Bases: _Row
A recipe that crafts a construction item, one of a blueprint's.
Client: ConstructionItemRecipeVO.parseFromXml (bundle line 141060), grouped into blueprints by
ConstructionItemBlueprintData.parseFromXml (bundle line 141026)
Fields:
-
recipe_id(ConstructionItemRecipeId) -
blueprint_id(int) -
construction_item_id(GameDataId['ConstructionItem'])
Validators:
-
_int_column→recipe_id,blueprint_id,construction_item_id
recipe_id
pydantic-field
¶
recipe_id: ConstructionItemRecipeId
Wire key constructionItemRecipeID
The recipe, as a research unlocks it
blueprint_id
pydantic-field
¶
blueprint_id: int = 0
Wire key blueprintID
The blueprint it belongs to
construction_item_id
pydantic-field
¶
construction_item_id: GameDataId['ConstructionItem'] = 0
Wire key constructionItemID
The construction item it crafts
PrebuiltCastleDef
pydantic-model
¶
Bases: _Row
A castle or camp you start a kingdom, a season event's map or a special server with, and its price.
costs are its non-zero goods cost columns: resources, coins and rubies; the client reads no other.
Client: PrebuiltCastleItemVO.parseXML and parseCosts (bundle lines 142341-142342), keyed by id
and by space in PrebuiltCastleData.parsePreBuiltCastles (bundle line 142274)
Fields:
-
prebuilt_castle_id(GameDataId['PrebuiltCastle']) -
space_ids(tuple[GameDataId[Kingdom, 'TreasureMapId'], ...]) -
min_level(int) -
shown_discount(int) -
is_main_castle_copy(bool) -
costs(tuple[Collectable, ...]) -
area_label(str) -
label(str)
Validators:
-
_read_costs -
_text_column→area_label,label -
_id→prebuilt_castle_id -
_spaces→space_ids -
_int_column→min_level,shown_discount -
_flag→is_main_castle_copy
prebuilt_castle_id
pydantic-field
¶
prebuilt_castle_id: GameDataId['PrebuiltCastle']
Wire key preBuiltCastleID
The prebuilt castle
space_ids
pydantic-field
¶
space_ids: tuple[GameDataId[Kingdom, 'TreasureMapId'], ...] = ()
Wire key spaceIDs
Where it is offered: a kingdom, or a season event's map; Kingdom.GREEN for a special server's
shown_discount
pydantic-field
¶
shown_discount: int = 0
Wire key shownDiscount
The discount in percent its offer shows
is_main_castle_copy
pydantic-field
¶
is_main_castle_copy: bool = False
Wire key isMainCastleCopy
It copies your main castle's buildings, as the Outer Realms castle transport does
area_label
pydantic-field
¶
area_label: str = ''
Wire key comment1
Designer label the game does not read, e.g. Underworld
label
pydantic-field
¶
label: str = ''
Wire key comment2
Designer label the game does not read, e.g. C2Camp
is_free
property
¶
is_free: bool
Whether it costs nothing. Client: PrebuiltCastleItemVO.isFree (bundle line 142353)
is_premium
property
¶
is_premium: bool
Whether rubies are its only price. Client: PrebuiltCastleItemVO.isPremium (bundle line 142354)
primary_costs
property
¶
primary_costs: tuple[Collectable, ...]
What it costs bought without its ruby price: all of a premium castle's costs, else those but the rubies.
Client: PrebuiltCastleItemVO.primaryCosts (bundle line 142357)
SpecialServerPrebuiltCastleDef
pydantic-model
¶
Bases: _Row
A prebuilt castle as a special server's castle selection offers it: the Outer Realms, Beyond the Horizon or the Storm Islands, each with a table of its own.
costs are its cost columns, rubies or castle passage tokens; selection_costs is what the
selection charges. The questsToFinish column is not read: the client reads it nowhere.
Client: SpecialServerPreBuiltCastleVO.parseXML (bundle line 40289), keyed by id in
CastleTempServerData (bundle line 140201), CastleAllianceBattleGroundData (bundle line 144847)
and CastleKingdomData (bundle line 134581)
Fields:
-
prebuilt_castle_id(GameDataId['PrebuiltCastle']) -
start_resources_id(StartResourcesId) -
start_level(int) -
start_legendary_level(int) -
passage_token_package_id(PackageId) -
costs(tuple[Collectable, ...])
Validators:
-
_read_costs -
_id→prebuilt_castle_id -
_int_column→start_resources_id,start_level,start_legendary_level,passage_token_package_id
prebuilt_castle_id
pydantic-field
¶
prebuilt_castle_id: GameDataId['PrebuiltCastle']
Wire key preBuiltCastleID
The prebuilt castle
start_resources_id
pydantic-field
¶
start_resources_id: StartResourcesId = StartResourcesId(0)
Wire key startResourceID
The resources you start with
start_legendary_level
pydantic-field
¶
start_legendary_level: int = 0
Wire key startPlayerLegendLevel
Your legendary level there; 0 for none
passage_token_package_id
pydantic-field
¶
Wire key castlePassageTokenPackageID
The package that sells the castle passage tokens it costs; 0 for none
costs
pydantic-field
¶
costs: tuple[Collectable, ...] = ()
What it costs; empty when the row names none
selection_costs
¶
selection_costs(castle: PrebuiltCastleDef) -> tuple[Collectable, ...]
What the castle selection charges for it: its own costs; with none, the castle's primary costs, or else 0 rubies, which the client keeps as the price of a free castle.
Client: SpecialServerPreBuiltCastleVO.parseXML (bundle line 40289) with
CollectableParserX2CEventPackages.createCostList (bundle line 62852)
is_ruby_castle
¶
is_ruby_castle(castle: PrebuiltCastleDef) -> bool
Whether its selection is sent as bought with rubies (OC2): its selection costs hold rubies, even
the 0 rubies of a free castle.
Client: CastleSpecialServerPreBuildCastleSelectionDialog.onConfirmed (bundle line 27954),
CollectableList.containsType (bundle line 1830)
cost_rubies
¶
cost_rubies(castle: PrebuiltCastleDef) -> int
The rubies its selection costs; 0 when it costs none.
StartResourcesDef
pydantic-model
¶
Bases: _Row
The goods a special server's prebuilt castle starts with.
Client: StartResourcesVO.parseXML (bundle line 145059), keyed by id in
CastleAllianceBattleGroundData (bundle line 144845)
Fields:
Validators:
-
_read_resources -
_id→start_resources_id
start_resources_id
pydantic-field
¶
start_resources_id: StartResourcesId
Wire key startResourceID
The start resources
PrivateVillageDef
pydantic-model
¶
Bases: EffectSpecRow
One level of a private resource village, bought with resource village tokens.
Client: PrivateResourceVillageInfoVO.fillFromParamXML (bundle line 143715), keyed by id in
CastlePrivateResourceVillageData.parse (bundle line 143686)
Fields:
-
effects(tuple[EffectValue, ...]) -
village_type_id(GameDataId['PrivateVillageType']) -
resource(str) -
level(int) -
kingdom(GameDataId[Kingdom]) -
token_cost(int) -
total_token_cost(int)
Validators:
-
_effects→effects -
_id→village_type_id -
_int_column→level,kingdom,token_cost,total_token_cost -
_text_column→resource
village_type_id
pydantic-field
¶
village_type_id: GameDataId['PrivateVillageType']
Wire key villageID
The village type and level
CraftingRecipeDef
pydantic-model
¶
Bases: _Row
A recipe a crafting queue crafts.
The table keeps every row; the client, when it loads the table, drops a recipe whose rewards give nothing.
Client: CraftingRecipeVO.fillFromParamXml (bundle line 111526), kept by id in CastleCraftingData
(bundle line 111386) only when its output is not empty
Fields:
-
recipe_id(CraftingRecipeId) -
queue_id(CraftingQueueId) -
recipe_group_id(int) -
research_group_id(int) -
level(int) -
recipe_type(str) -
crafting_seconds(int) -
skip_cost_rubies(int) -
costs(tuple[Collectable, ...]) -
reward_ids(tuple[RewardId, ...]) -
required_buildings(tuple[GameDataId['Building'], ...])
Validators:
-
_read_costs -
_id→recipe_id -
_int_column→queue_id,recipe_group_id,research_group_id,level,crafting_seconds,skip_cost_rubies -
_type→recipe_type -
_ids→reward_ids,required_buildings
queue_id
pydantic-field
¶
queue_id: CraftingQueueId = CraftingQueueId(0)
Wire key queueTypeId
The crafting queue it is crafted in
recipe_group_id
pydantic-field
¶
recipe_group_id: int = 0
Wire key recipeGroupID
The group the recipe's levels share
research_group_id
pydantic-field
¶
research_group_id: int = 0
Wire key researchGroupID
The research group that unlocks it; 0 for none
crafting_seconds
pydantic-field
¶
crafting_seconds: int = 0
Wire key craftingDuration
Seconds it crafts
skip_cost_rubies
pydantic-field
¶
skip_cost_rubies: int = 0
Wire key skipCostC2
Rubies that finish it
required_buildings
pydantic-field
¶
required_buildings: tuple[GameDataId['Building'], ...] = ()
Wire key requiredCraftingBuildings
The buildings it needs
CraftingQueueDef
pydantic-model
¶
Bases: _Row
A crafting queue's slots: those it always has, and the temporary ones coins unlock for a while.
Client: CraftingQueueXML.fillFromParamXml (bundle line 111498), keyed by queueTypeId in
CastleCraftingData (bundle line 111381), the CQID a queue is sent with
Fields:
-
queue_id(CraftingQueueId) -
permanent_production_slots(int) -
production_slot_unlock_coins(tuple[int, ...]) -
production_slot_unlock_seconds(int) -
permanent_queue_slots(int) -
queue_slot_unlock_coins(tuple[int, ...]) -
queue_slot_unlock_seconds(int)
Validators:
-
_id→queue_id -
_int_column→permanent_production_slots,production_slot_unlock_seconds,permanent_queue_slots,queue_slot_unlock_seconds -
_coins→production_slot_unlock_coins,queue_slot_unlock_coins
permanent_production_slots
pydantic-field
¶
permanent_production_slots: int = 0
Wire key permanentProductionSlots
Slots that always craft
production_slot_unlock_coins
pydantic-field
¶
Wire key productionSlotUnlockCostC1
Coins each temporary crafting slot unlocks for, one per slot
production_slot_unlock_seconds
pydantic-field
¶
production_slot_unlock_seconds: int = 0
Wire key productionSlotUnlockDuration
Seconds a temporary crafting slot stays unlocked
permanent_queue_slots
pydantic-field
¶
permanent_queue_slots: int = 0
Wire key permanentQueueSlots
Waiting slots it always has
queue_slot_unlock_coins
pydantic-field
¶
Wire key queueSlotUnlockCostC1
Coins each temporary waiting slot unlocks for, one per slot
FusionSystemDef
pydantic-model
¶
Bases: _Row
A fusion forge's energy and fusion rules.
The client builds one forge per row, with the row's id (FusionForgeData.init, bundle line 141977),
and looks both tables up by that id (FusionConst.DECORATION_FORGE_ID, bundle lines 24974, 78008, 78074).
Client: XmlFusionSystemVO.parseXml (bundle line 142170)
Fields:
-
forge_id(GameDataId['FusionForgeId']) -
energy_recharge_seconds(int) -
assemble_catalyst_energy(int) -
disassemble_catalyst_energy(int) -
base_bonus_xp_chance(int) -
premium_bonus_xp_chance(int) -
refill_cost_rubies(int) -
refill_cost_factor(float)
Validators:
-
_id→forge_id -
_int_column→energy_recharge_seconds,assemble_catalyst_energy,disassemble_catalyst_energy,base_bonus_xp_chance,premium_bonus_xp_chance,refill_cost_rubies -
_factor→refill_cost_factor
energy_recharge_seconds
pydantic-field
¶
energy_recharge_seconds: int = 0
Wire key energyRechargeIntervalInSeconds
Seconds between energy recharges
assemble_catalyst_energy
pydantic-field
¶
assemble_catalyst_energy: int = 0
Wire key assembleCatalystEnergyCost
Energy one assembled catalyst takes
disassemble_catalyst_energy
pydantic-field
¶
disassemble_catalyst_energy: int = 0
Wire key disassembleCatalystEnergyCost
Energy one disassembled catalyst takes
base_bonus_xp_chance
pydantic-field
¶
base_bonus_xp_chance: int = 0
Wire key baseBonusFusionXPChance
Percent chance of bonus fusion XP
premium_bonus_xp_chance
pydantic-field
¶
premium_bonus_xp_chance: int = 0
Wire key premiumBonusFusionXPChance
Percent chance of bonus fusion XP with a premium catalyst
FusionForgeDef
pydantic-model
¶
Bases: _Row
A fusion forge's dust and daily minute skips.
Client: XmlFusionForgeVO.parseXml (bundle line 142155)
Fields:
-
forge_id(GameDataId['FusionForgeId']) -
dust_currency_id(GameDataId['CurrencyId']) -
minute_skips_per_day(int)
Validators:
-
_id→forge_id -
_int_column→dust_currency_id,minute_skips_per_day
dust_currency_id
pydantic-field
¶
dust_currency_id: GameDataId['CurrencyId'] = 0
Wire key dustCurrencyID
The dust its fusions and level-ups spend
JudgementDef
pydantic-model
¶
Bases: _Row
A citizen judgement: where it appears, and what each verdict asks and gives.
The requirements and rewards are the kinds of goods the client looks up, e.g. units or wood.
Client: JudgementVO.fillFromParamXML (bundle line 134514), keyed by id in CastleJudgementData
(bundle line 134451)
Fields:
-
judgement_id(GameDataId['Judgement']) -
visual_name(str) -
spawn_spot(str) -
option_a_requirements(tuple[str, ...]) -
option_b_requirements(tuple[str, ...]) -
option_a_rewards(tuple[str, ...]) -
option_b_rewards(tuple[str, ...])
Validators:
-
_id→judgement_id -
_text_column→visual_name,spawn_spot -
_kinds→option_a_requirements,option_b_requirements,option_a_rewards,option_b_rewards
judgement_id
pydantic-field
¶
judgement_id: GameDataId['Judgement']
Wire key judgementID
The judgement
visual_name
pydantic-field
¶
visual_name: str = ''
Wire key visualName
The figure it shows, e.g. wolfs
option_a_requirements
pydantic-field
¶
Wire key conditionTypeA
What verdict A asks for
option_b_requirements
pydantic-field
¶
Wire key conditionTypeB
What verdict B asks for
option_a_rewards
pydantic-field
¶
Wire key rewardTypeA
What verdict A gives
CoatOfArmsSymbolDef
pydantic-model
¶
Bases: _Row
A symbol for a coat of arms. One with a required achievement is a premium symbol: that achievement earns it, and it is unlocked for its coin or ruby price.
Client: CastleCrestSymbolData.parseXML (bundle line 111588), PremiumCrestSymbolVO.parseXML
(bundle line 111660)
Fields:
-
symbol_id(CoatOfArmsSymbolId) -
required_achievement_id(GameDataId['Achievement']) -
cost_coins(int) -
cost_rubies(int)
Validators:
-
_id→symbol_id -
_int_column→required_achievement_id,cost_coins,cost_rubies
symbol_id
pydantic-field
¶
symbol_id: CoatOfArmsSymbolId
Wire key crestSymbolID
The symbol, as a coat of arms names it
required_achievement_id
pydantic-field
¶
required_achievement_id: GameDataId['Achievement'] = 0
Wire key requiredAchievementID
The achievement that earns it; 0 for a standard symbol, free to use
PackageDef
pydantic-model
¶
Bases: _Row
An event package: what a shop sells for a fixed price, and what a gift package holds.
costs are its price before discounts, in the order the client shows it, and rewards what it gives; a
bundle's rewards add up those of the packages it names (GameData.packages passes their rows in).
Client: EventPackageVO.fillFromParamXML (split.js line 177696), read by
CastleEventPackageData.parseXml (split.js line 670335), which reads a bundle's rewards again once every
package is read
Fields:
-
package_id(PackageId) -
package_type(str) -
is_gift_package(bool) -
costs(tuple[Collectable, ...]) -
rewards(tuple[Collectable, ...]) -
min_level(int) -
max_level(int) -
min_legend_level(int) -
max_legend_level(int) -
sort_order(float) -
stock(int) -
not_rebuyable(bool) -
fill_up_resource_storage(bool) -
fill_all_storages(bool) -
is_banner_package(bool) -
max_buy_per_click(int) -
bundle_package_ids(tuple[PackageId, ...])
Validators:
-
_read_costs_and_rewards -
_id→package_id -
_text_column→package_type -
_flag→is_gift_package,not_rebuyable,fill_up_resource_storage,fill_all_storages,is_banner_package -
_zero_default→min_level,min_legend_level -
_max_level→max_level -
_max_legend_level→max_legend_level -
_stock→stock -
_max_buy_per_click→max_buy_per_click -
_sort_order→sort_order -
_bundle→bundle_package_ids
package_type
pydantic-field
¶
package_type: str = '0'
Wire key packageType
What it holds, e.g. tool, currency or item
is_gift_package
pydantic-field
¶
is_gift_package: bool = False
Wire key isGiftPackage
Whether it is a gift package you may send
max_level
pydantic-field
¶
max_level: int = 99
Wire key maxLevel
Highest player level it is shown to
min_legend_level
pydantic-field
¶
min_legend_level: int = 0
Wire key minLegendLevel
Lowest legendary level it is shown to
max_legend_level
pydantic-field
¶
max_legend_level: int = _LEGEND_LEVEL_CAP
Wire key maxLegendLevel
Highest legendary level it is shown to
stock
pydantic-field
¶
stock: int = -1
Wire key stock
How many you may buy in all; 0 or less for no limit
not_rebuyable
pydantic-field
¶
not_rebuyable: bool = False
Wire key notRebuyable
Whether you may buy it only once
fill_up_resource_storage
pydantic-field
¶
fill_up_resource_storage: bool = False
Wire key fillUpResourceStorage
Whether it fills the castle's storage, priced by the free space
fill_all_storages
pydantic-field
¶
fill_all_storages: bool = False
Wire key fillAllStorages
Whether it fills the storages of all your kingdoms, at a price the server names
is_banner_package
pydantic-field
¶
is_banner_package: bool = False
Wire key isBannerPackage
Whether a shop shows it as its banner
max_buy_per_click
pydantic-field
¶
max_buy_per_click: int = _MAX_BUY_PER_CLICK
Wire key maxBuyPerClick
Most you may buy at once of a package without a stock
bundle_package_ids
pydantic-field
¶
Wire key packageIDs
The packages a bundle gives
has_custom_price
property
¶
has_custom_price: bool
Whether its price depends on your storages, so the client names it when buying.
Client: EventPackageVO.hasCustomPrice (split.js line 178359)
is_stock_limited
property
¶
is_stock_limited: bool
Whether you may buy it only so often: once, or up to its stock.
Client: EventPackageVO.isStockLimited (split.js line 177877)
shown_reward
property
¶
shown_reward: Collectable | None
The reward a shop shows for it: its one reward, or None where it shows the package itself, for several rewards, a random one, or more than one random equipment, hero equipment or gem.
Client: EventPackageVO.reward and usePackageIcon (split.js lines 178430, 178148)
places_building
property
¶
places_building: bool
Whether buying it places a building, so the client names the castle it goes to.
Client: AMerchantBuyDialog.onBtnOkClick (split.js line 214956) checks reward.itemType
remaining_stock
¶
How many you may still buy, having bought bought; max_buy_per_click for a package without a stock.
Client: EventPackageVO.remainingStock (split.js line 177884)
may_be_bought_in_bulk
¶
Whether more than one may be bought at once, having bought bought; the client offers one only otherwise.
Client: EventPackageVO.mayBeBoughtInBulk (split.js line 178329), which shows the amount slider of
CastleGenericSliderBuyDialog (split.js line 34317)
PlayerNameChangeDef
pydantic-model
¶
Bases: _Row
The ruby price of one of your player name changes, by its number.
Client: ChangePlayerNameData.parseXml (bundle line 145454)
Fields:
Validators:
-
_id→name_change_id -
_int_column→cost_rubies
ScalingCampDef
pydantic-model
¶
Bases: _Row
A camp of an event's difficulty scaling: the level and costs a chosen difficulty gives it.
Client: DifficultyScalingCampXmlVO.parseXML (bundle line 145227), keyed by id in
CastleEventDifficultyScalingData (bundle line 145211)
Fields:
-
scaling_camp_id(ScalingCampId) -
rank(int) -
level(int) -
cool_down(int) -
event_id(GameDataId['Event']) -
cooldown_increase(int) -
cooldown_increase_cap(int) -
skip_cost(int) -
skip_cost_increase(int) -
skip_cost_increase_cap(int) -
wall_bonus(int) -
gate_bonus(int) -
moat_bonus(int) -
unit_capacity(int) -
shogun_points_needed_for_level_up(int) -
player_rage_cap(int) -
rage_needed_for_level_up(int) -
normal_def_strength_boost_min(int) -
normal_def_strength_boost_max(int) -
premium_def_strength_boost_min(int) -
premium_def_strength_boost_max(int)
Validators:
-
_id→scaling_camp_id -
_int_column→rank,level,cool_down,event_id,cooldown_increase,cooldown_increase_cap,skip_cost,skip_cost_increase,skip_cost_increase_cap,wall_bonus,gate_bonus,moat_bonus,unit_capacity,shogun_points_needed_for_level_up,player_rage_cap,rage_needed_for_level_up,normal_def_strength_boost_min,normal_def_strength_boost_max,premium_def_strength_boost_min,premium_def_strength_boost_max
scaling_camp_id
pydantic-field
¶
scaling_camp_id: ScalingCampId
Wire key eventAutoScalingCampID
The scaling camp, as map rows name it
event_id
pydantic-field
¶
event_id: GameDataId['Event'] = 0
Wire key eventID
The event it belongs to
cooldown_increase
pydantic-field
¶
cooldown_increase: int = 0
Wire key cooldownIncrease
Cooldown added per attack
cooldown_increase_cap
pydantic-field
¶
cooldown_increase_cap: int = 0
Wire key cooldownIncreaseCap
Most cooldown added
skip_cost_increase
pydantic-field
¶
skip_cost_increase: int = 0
Wire key skipCostIncrease
Skip cost added per attack
skip_cost_increase_cap
pydantic-field
¶
skip_cost_increase_cap: int = 0
Wire key skipCostIncreaseCap
Most skip cost added
shogun_points_needed_for_level_up
pydantic-field
¶
shogun_points_needed_for_level_up: int = -1
Wire key shogunPointsNeededForLevelUp
Shogun points to the next level; -1 for none
player_rage_cap
pydantic-field
¶
player_rage_cap: int = -1
Wire key playerRageCap
Most rage a player builds; -1 for none
rage_needed_for_level_up
pydantic-field
¶
rage_needed_for_level_up: int = -1
Wire key rageNeededForLevelUp
Rage to the next level; -1 for none
normal_def_strength_boost_min
pydantic-field
¶
normal_def_strength_boost_min: int = 0
Wire key normalDiffDefStrengthBoostMinDefense
Least defence boost, normal difficulty
normal_def_strength_boost_max
pydantic-field
¶
normal_def_strength_boost_max: int = 0
Wire key normalDiffDefStrengthBoostMaxDefense
Most defence boost, normal difficulty
DaimyoContractDef
pydantic-model
¶
Bases: _Row
An alliance contract of the daimyo event: one level of a contract rank.
The contracts of one rank, in the table's order, are that rank's levels.
Client: XmlSamuraiDaimyoContractVO.parseXml (bundle line 66377), keyed by id in
SamuraiDaimyoDataXml.parseXml (bundle line 13914)
Fields:
-
contract_id(DaimyoContractId) -
rank(int) -
enable_on_start(bool) -
next_contract_id(DaimyoContractId) -
shogun_points(int) -
war_effort_points(int)
Validators:
-
_id→contract_id -
_int_column→rank,next_contract_id,shogun_points,war_effort_points -
_enabled→enable_on_start
enable_on_start
pydantic-field
¶
enable_on_start: bool = False
Wire key enableOnStart
Open from the event's start, not after another contract
next_contract_id
pydantic-field
¶
next_contract_id: DaimyoContractId = DaimyoContractId(-1)
Wire key nextContract
The contract after it; -1 for none
RewardDef
pydantic-model
¶
Bases: _Row
One reward of the items: what it gives, and to whom.
collectables reads every collectable column of the row (see Collectable.from_reward_row),
each add<currency name> column by the currency names GameData passes in as validation context
(currency_ids); read without them, such a column is kept as OTHER.
Client: RewardVO.fillFromParamXml (bundle line 142368), read from the rewards table by
CastleRewardData.parseXml (bundle line 142323)
Fields:
-
reward_id(RewardId) -
grant_type(GameDataId[RewardGrantType]) -
collectables(tuple[Collectable, ...])
Validators:
-
_read_collectables -
_id→reward_id -
_grant_type→grant_type
grant_type
pydantic-field
¶
grant_type: GameDataId[RewardGrantType] = RewardGrantType.PLAYER
Wire key grantType
Who it goes to
collectables
pydantic-field
¶
collectables: tuple[Collectable, ...] = ()
What it gives, in the client's order
TreasureMapDef
pydantic-model
¶
Bases: _Row
A treasure map: a season event's map or one of the treasure hunt's, with its nodes and prices.
Client: TreasureMapVO.fillFromParamXML (bundle line 140567), keyed by mapID in
CastleTreasureMapData.parseTreasureMapXML (bundle line 140439)
Fields:
-
map_id(GameDataId['TreasureMapId']) -
label(str) -
note(str) -
node_ids(tuple[TreasureMapNodeId, ...]) -
end_node_id(TreasureMapNodeId) -
map_type(GameDataId[TreasureMapType]) -
kingdom(GameDataId[Kingdom]) -
total_pieces(int) -
piece_cost_rubies(int) -
travel_seconds(int) -
skip_cost_rubies(int) -
package_ids(tuple[PackageId, ...])
Validators:
-
_id→map_id -
_text_column→label,note -
_ids→node_ids,package_ids -
_int_column→end_node_id,map_type,kingdom,total_pieces,piece_cost_rubies,travel_seconds,skip_cost_rubies
label
pydantic-field
¶
label: str = ''
Wire key comment1
Designer label the game does not read, e.g. hardmode
note
pydantic-field
¶
note: str = ''
Wire key comment2
Designer note the game does not read, e.g. Thornking
node_ids
pydantic-field
¶
node_ids: tuple[TreasureMapNodeId, ...] = ()
Wire key tmapnodeIDs
Its nodes, besides the start node
end_node_id
pydantic-field
¶
end_node_id: TreasureMapNodeId = TreasureMapNodeId(0)
Wire key endNodeID
The node that ends the map
map_type
pydantic-field
¶
map_type: GameDataId[TreasureMapType] = TreasureMapType.SEASON
Wire key maptype
What the map is for
kingdom
pydantic-field
¶
kingdom: GameDataId[Kingdom] = Kingdom.GREEN
Wire key kID
The kingdom a treasure hunt's map lies in
piece_cost_rubies
pydantic-field
¶
piece_cost_rubies: int = 0
Wire key costpiece
Rubies a missing piece costs
travel_seconds
pydantic-field
¶
travel_seconds: int = 0
Wire key travelTime
Seconds a transfer to a season map travels
TreasureMapNodeDef
pydantic-model
¶
Bases: _Row
A node of a treasure map: a camp, an obstacle or a port, and the nodes that unlock it.
Client: TMapNodeVO.fillFromParamXML (bundle line 26934), keyed by tmapnodeID in
CastleTreasureMapData.parseTreasureMapXML (bundle line 140431)
Fields:
-
node_id(TreasureMapNodeId) -
node_type(str) -
unlocked_by_any(tuple[TreasureMapNodeId, ...]) -
unlocked_by_all(tuple[TreasureMapNodeId, ...]) -
count_victories(int) -
part_price_id(PartPayPriceId | None) -
position(int) -
dungeon_level(int) -
cool_down(int) -
wall_bonus(int) -
gate_bonus(int)
Validators:
-
_id→node_id -
_text_column→node_type -
_ids→unlocked_by_any,unlocked_by_all -
_price→part_price_id -
_int_column→count_victories,position,dungeon_level,cool_down,wall_bonus,gate_bonus
node_type
pydantic-field
¶
node_type: str = 'DUNGEON'
Wire key type
What it is, e.g. DUNGEON or BRIDGE
unlocked_by_any
pydantic-field
¶
unlocked_by_any: tuple[TreasureMapNodeId, ...] = (TreasureMapNodeId(0),)
Wire key orUnlockIDs
Any of these nodes unlocks it
unlocked_by_all
pydantic-field
¶
unlocked_by_all: tuple[TreasureMapNodeId, ...] = (TreasureMapNodeId(0),)
Wire key andUnlockIDs
All of these nodes unlock it
count_victories
pydantic-field
¶
count_victories: int = 1
Wire key countVictories
The victory count its camp is looked up by
part_price_id
pydantic-field
¶
part_price_id: PartPayPriceId | None = None
Wire key partPayPriceID
The price its obstacle is paid in parts; None for none
PartPayPriceDef
pydantic-model
¶
Bases: _Row
A price paid in parts: a season map's obstacle, a treasure map node's or a slum level's.
costs reads the row's goods as a reward row's (see Collectable.from_reward_row).
Client: PartpaypriceVO.fillFromParamXml (bundle line 142257)
Fields:
-
part_price_id(PartPayPriceId) -
costs(tuple[Collectable, ...])
Validators:
-
_read_costs -
_id→part_price_id
DonationItemDef
pydantic-model
¶
Bases: _Row
What a donation event takes, and the points it gives. Its set, donation type and resource are not read.
Client: DonationItemsVO.parseXmlNode (bundle line 111715), keyed by id in
CastleDonationEventData.parseXml (bundle line 58843)
Fields:
-
donation_item_id(DonationItemId) -
currency_id(GameDataId['CurrencyId']) -
ratio(int) -
max_point_limit(int)
Validators:
-
_id→donation_item_id -
_int_column→currency_id,ratio,max_point_limit
currency_id
pydantic-field
¶
currency_id: GameDataId['CurrencyId'] = -1
Wire key currencyID
The currency donated; -1 for a resource
DonationSettingDef
pydantic-model
¶
Bases: _Row
A donation event's run settings: which donation items it takes and which rewards it gives.
The items and rewards are named by set: the donationItems rows and the donationRewards rows that
share the set id.
Client: DonationSettingVO.parseXmlNode (bundle line 111773), keyed by id in
CastleDonationEventData.parseXml (bundle line 58833)
Fields:
Validators:
-
_id→setting_id -
_int_column→item_set_id,reward_set_id
TrainingProgramDef
pydantic-model
¶
Bases: _Row
A training program of the officers' school: the bonus it gives against one event's targets, and its prices.
Client: OfficersSchoolEffectVO.parseXml (bundle line 144770), keyed by id in OfficersSchoolData
(bundle line 144668)
Fields:
-
program_id(TrainingProgramId) -
effect_id(GameDataId['Effect']) -
event_id(GameDataId['Event']) -
cost_coins(int) -
cost_rubies(int)
Validators:
-
_id→program_id -
_int_column→effect_id,event_id,cost_coins,cost_rubies
effect_id
pydantic-field
¶
effect_id: GameDataId['Effect'] = -1
Wire key effectID
The bonus it gives
EventDifficultyDef
pydantic-model
¶
Bases: _Row
A difficulty an event offers, and what unlocking a locked one costs.
Client: EventAutoScalingDifficultyVO.parseXML (bundle line 145390)
Fields:
-
difficulty_id(EventDifficultyId) -
event_id(GameDataId['Event']) -
difficulty_type(GameDataId['DifficultyType']) -
is_locked(bool) -
unlock_rubies(int)
Validators:
-
_id→difficulty_id -
_int_column→event_id,difficulty_type,unlock_rubies -
_flag→is_locked
difficulty_id
pydantic-field
¶
difficulty_id: EventDifficultyId
Wire key difficultyID
The difficulty
difficulty_type
pydantic-field
¶
difficulty_type: GameDataId['DifficultyType'] = 0
Wire key difficultyTypeID
Its type, e.g. easyPlus
GachaDef
pydantic-model
¶
Bases: _Row
A level of a gacha event: the pulls it covers and how many one buy may make.
Client: GachaXmlVO.init (bundle line 113936), keyed by gachaID in GachaData.init (bundle line 113911)
Fields:
-
gacha_id(GachaId) -
event_id(GameDataId['Event']) -
level(int) -
min_pulls(int) -
max_pulls(int) -
multi_pull_max(int)
Validators:
WheelOfFortuneRewardSetDef
pydantic-model
¶
Bases: _Row
A Wheel of Fortune jackpot set: the rewards a jackpot spin can win.
Client: LuckyWheelData.parseXml and createRewardItemsMappedToSetID (bundle lines 17571, 17583)
Fields:
Validators:
-
_id→reward_set_id -
_ids→reward_ids
reward_set_id
pydantic-field
¶
reward_set_id: WheelOfFortuneRewardSetId
Wire key luckyWheelRewardSetID
The jackpot set
WheelOfFortuneWinClassDef
pydantic-model
¶
Bases: _Row
A Wheel of Fortune win class: the spins to the next class, the rubies a skipped spin costs, and the previews.
Client: LuckyWheelData.parseXml (bundle lines 17571-17576)
Fields:
-
win_class_id(WheelOfFortuneWinClassId) -
spins_to_next_class(int) -
rubies_per_skipped_spin(float) -
preview_reward_ids(tuple[RewardId, ...]) -
pro_mode_preview_reward_ids(tuple[RewardId, ...])
Validators:
-
_id→win_class_id -
_int_column→spins_to_next_class -
_number→rubies_per_skipped_spin -
_ids→preview_reward_ids,pro_mode_preview_reward_ids
win_class_id
pydantic-field
¶
win_class_id: WheelOfFortuneWinClassId
Wire key luckyWheelClassID
The win class
spins_to_next_class
pydantic-field
¶
spins_to_next_class: int = 0
Wire key neededSpinsForNextClass
Spins that reach the next class
rubies_per_skipped_spin
pydantic-field
¶
rubies_per_skipped_spin: float = 0.0
Wire key C2PerSkippedSpin
Rubies each spin skipped to the next class costs
preview_reward_ids
pydantic-field
¶
Wire key normalPreview
The rewards the wheel previews
OuterRealmsSettingDef
pydantic-model
¶
Bases: _Row
An Outer Realms run's settings. Only some columns are read: the presets and rewards are not.
Client: TempServerConfigurationVO.parseXML (bundle line 14448), keyed by settingID in
CastleTempServerData (bundle line 140189)
Fields:
-
setting_id(OuterRealmsSettingId) -
peace_mode(bool) -
scoring_system(str) -
start_currency_amount(int) -
currency_id(GameDataId['CurrencyId']) -
booster_package_id(PackageId)
Validators:
-
_id→setting_id -
_flag→peace_mode -
_text_column→scoring_system -
_int_column→start_currency_amount,currency_id,booster_package_id
scoring_system
pydantic-field
¶
scoring_system: str = '0'
Wire key scoringSystem
How it scores, e.g. might
start_currency_amount
pydantic-field
¶
start_currency_amount: int = -1
Wire key startCurrencyAmount
The currency you start with; -1 for none
currency_id
pydantic-field
¶
currency_id: GameDataId['CurrencyId'] = 0
Wire key currencyID
The run's currency; 0 for none
HorizonSettingDef
pydantic-model
¶
Bases: _Row
A Beyond the Horizon run's settings. Only some columns are read: the presets, map and rewards are not.
Client: AllianceBattleGroundConfigurationVO.parseXML (bundle line 145025), keyed by settingID in
CastleAllianceBattleGroundData (bundle line 144859)
Fields:
-
setting_id(HorizonSettingId) -
max_alliance_size(int) -
currency_id(GameDataId['CurrencyId']) -
alliance_currency_id(GameDataId['CurrencyId']) -
booster_package_id(PackageId) -
tower_effects(tuple[GameDataId['AllianceTowerEffect'], ...])
Validators:
-
_id→setting_id -
_int_column→max_alliance_size,currency_id,alliance_currency_id,booster_package_id -
_ids→tower_effects
max_alliance_size
pydantic-field
¶
max_alliance_size: int = 0
Wire key maxAllianceSize
Most members an alliance takes in
currency_id
pydantic-field
¶
currency_id: GameDataId['CurrencyId'] = 0
Wire key currencyID
The players' currency; 0 for none
alliance_currency_id
pydantic-field
¶
alliance_currency_id: GameDataId['CurrencyId'] = 0
Wire key allianceCurrencyID
The alliances' currency; 0 for none
booster_package_id
pydantic-field
¶
Wire key boosterCurrencyPackageID
The package that sells its booster currency; 0 for none
tower_effects
pydantic-field
¶
tower_effects: tuple[GameDataId['AllianceTowerEffect'], ...] = ()
Wire key allianceTowerEffectIDs
The alliance tower effects on offer
FeastDef
pydantic-model
¶
Bases: _Row
A feast you can hold for faster recruitment in every castle: its price, bonus, duration and the levels it is offered at.
Client: CastlePremiumMarketCollectionData.parseXML (split.js line 34586) reads the feasts rows into
PremiumFestivalItemVO (split.js line 333225); getFestivalItemsByLevel (split.js line 34651) offers those
from minLevel to maxLevel
Fields:
-
feast_id(GameDataId['Feast']) -
min_level(int) -
max_level(int) -
duration_seconds(int) -
recruitment_speed_bonus(int) -
cost_food(int) -
cost_rubies(int) -
feast_type(str) -
sort_order(int)
Validators:
-
_id→feast_id -
_int_column→min_level,max_level,duration_seconds,recruitment_speed_bonus,cost_food,cost_rubies -
_text_column→feast_type -
_sort_order→sort_order
recruitment_speed_bonus
pydantic-field
¶
recruitment_speed_bonus: int = 0
Wire key productionBoost
Recruitment speed bonus in percent
cost_food
pydantic-field
¶
cost_food: int = 0
Wire key costFood
Food it costs before the feast cost reduction; 0 for a ruby feast
cost_rubies
pydantic-field
¶
cost_rubies: int = 0
Wire key costC2
Rubies it costs; 0 for a food feast
is_ruby_priced
property
¶
is_ruby_priced: bool
Whether it costs rubies rather than food (hasC2Costs).
AllianceTowerEffectDef
pydantic-model
¶
Bases: _Row
An alliance tower effect of Beyond the Horizon: the bonus it gives, and how its price and strength grow per level.
Client: ABGAllianceTowerEffectXmlVO.parseXML (bundle line 145007)
Fields:
-
tower_effect_id(GameDataId['AllianceTowerEffect']) -
effect_id(GameDataId['Effect']) -
base_price(int) -
max_level(int) -
start_value(float) -
increase(float)
Validators:
-
_id→tower_effect_id -
_int_column→effect_id,base_price,max_level -
_number→start_value,increase
tower_effect_id
pydantic-field
¶
tower_effect_id: GameDataId['AllianceTowerEffect']
Wire key allianceTowerEffectID
The tower effect
base_price
pydantic-field
¶
base_price: int = 0
Wire key effectBasePrice
The price its levels grow from
AllianceInvasionCampDef
pydantic-model
¶
Bases: _Row
An alliance invasion camp, by the id an aic push names it with while its event scales no difficulty; with a
difficulty chosen, that id is a scaling camp's (GameData.scaling_camps).
The camp's defence, as the combat code reads it, is in GameData.camps["allianceInvasionCamps"].
Client: CastleAllianceInvasionCampNodeVO.parseXML (bundle line 111195), keyed by id in
CastleAllianceInvasionCampData (bundle line 111180), whose getAllianceCamp (bundle line 111182) looks up
a scaling camp instead when the event's difficulty scaling is on (AICCommand.executeCommand, bundle line
128192)
Fields:
-
camp_id(AllianceInvasionCampId) -
event_id(GameDataId['Event']) -
dungeon_level(int) -
rage_needed_for_level_up(int) -
player_rage_cap(int) -
wall_bonus(int) -
gate_bonus(int) -
count_victory(int)
Validators:
-
_id→camp_id -
_int_column→event_id,dungeon_level,rage_needed_for_level_up,player_rage_cap,wall_bonus,gate_bonus,count_victory
OasisSettlementDef
pydantic-model
¶
Bases: _Row
One level of a Beyond the Horizon Oasis Settlement: the trades it offers, its cooldown and the army it takes.
Its allianceBattleGroundScoringID is not read: the scorings table is not loaded.
Client: TradingCampVO.parseXML (split.js line 717363), keyed by tradingCampID in
ABGJadeCampData.parseXML (split.js line 717136)
Fields:
-
settlement_id(OasisSettlementId) -
name(str) -
settlement_type_id(int) -
level(int) -
max_level(int) -
trade_group_id(int) -
cooldown_seconds(int) -
resource_limit(int) -
max_army_size(int) -
travel_cost_multiplier(float) -
speed_multiplier(float)
Validators:
-
_id→settlement_id -
_text_column→name -
_int_column→settlement_type_id,level,max_level,trade_group_id,cooldown_seconds,resource_limit,max_army_size -
_number→travel_cost_multiplier,speed_multiplier
settlement_id
pydantic-field
¶
settlement_id: OasisSettlementId
Wire key tradingCampID
The settlement level
settlement_type_id
pydantic-field
¶
settlement_type_id: int = 0
Wire key tradingCampTypeID
The settlement kind its levels share
trade_group_id
pydantic-field
¶
trade_group_id: int = 0
Wire key tradeGroupID
The group of oasis_trades it offers
cooldown_seconds
pydantic-field
¶
cooldown_seconds: int = 0
Wire key cooldownSeconds
Seconds before it trades again
resource_limit
pydantic-field
¶
resource_limit: int = 0
Wire key resourceLimit
Troops it holds to trade
max_army_size
pydantic-field
¶
max_army_size: int = 0
Wire key maxArmySize
Most units one trade sends
travel_cost_multiplier
pydantic-field
¶
travel_cost_multiplier: float = 1.0
Wire key travelCostMultiplier
Factor on the travel cost to it
OasisTradeDef
pydantic-model
¶
Bases: _Row
A trade an Oasis Settlement offers: the materials one trade costs and what it brings.
Client: TradingCampTradeVO.parseXML (split.js line 717304), keyed by tradeID in
ABGJadeCampData.parseXML (split.js line 717136); a settlement offers the trades of its tradeGroupID
(getTradesForCamp, split.js line 717204)
Fields:
-
trade_id(OasisTradeId) -
trade_group_id(int) -
main_reward_id(RewardId) -
secondary_reward_id(RewardId) -
resource_consumed(int) -
loot_capacity_cost(int) -
costs(tuple[Collectable, ...])
Validators:
-
_read_costs -
_id→trade_id -
_int_column→trade_group_id,main_reward_id,secondary_reward_id,resource_consumed,loot_capacity_cost
trade_group_id
pydantic-field
¶
trade_group_id: int = 0
Wire key tradeGroupID
The group the settlements offering it name
main_reward_id
pydantic-field
¶
Wire key mainRewardID
What one trade brings
secondary_reward_id
pydantic-field
¶
Wire key secondaryRewardID
What one trade brings besides
resource_consumed
pydantic-field
¶
resource_consumed: int = 0
Wire key resourceConsumed
The settlement's troops one trade uses up
CitadelLevelDef
pydantic-model
¶
Bases: _Row
One level of the alliance Citadel in Beyond the Horizon's Jade Desert: its reach, defence and upgrade price.
A citadel stands at the highest level whose radius its current radius reaches
(getAllianceCitadelVOByRadius, split.js line 715794).
Client: ABGAllianceCitadelVO.parseXML (split.js line 134851), read from allianceCitadels by
CastleAllianceBattleGroundData (split.js line 715564); its costs keep only amounts above 0
Fields:
-
citadel_level_id(CitadelLevelId) -
level(int) -
radius(int) -
exposed_statuettes_percent(int) -
scatter_weights(tuple[int, ...]) -
early_conversion_ratio(int) -
protection_mode_seconds(int) -
unit_wall_count(int) -
wall_bonus(int) -
gate_bonus(int) -
moat_bonus(int) -
wall_level(int) -
gate_level(int) -
moat_level(int) -
keep_level(int) -
guards(int) -
costs(tuple[Collectable, ...])
Validators:
-
_read_costs -
_id→citadel_level_id -
_int_column→level,radius,exposed_statuettes_percent,early_conversion_ratio,protection_mode_seconds,unit_wall_count,wall_bonus,gate_bonus,moat_bonus,wall_level,gate_level,moat_level,keep_level,guards -
_ints→scatter_weights
citadel_level_id
pydantic-field
¶
citadel_level_id: CitadelLevelId
Wire key allianceCitadelID
The row
exposed_statuettes_percent
pydantic-field
¶
exposed_statuettes_percent: int = 0
Wire key exposedStatuettesPercentage
Percent of its Ancient Jade Statuettes attackers can take
scatter_weights
pydantic-field
¶
Wire key scatterWeights
Weights of where taken statuettes scatter
early_conversion_ratio
pydantic-field
¶
early_conversion_ratio: int = 0
Wire key earlyConversionRatio
Ancient Jade Statuettes per Restored Jade Statuette before the event ends
protection_mode_seconds
pydantic-field
¶
protection_mode_seconds: int = 0
Wire key protectionModeDuration
Seconds of protection after an upgrade
LeagueTypeEventDef
pydantic-model
¶
Bases: _Row
One league's points thresholds and rewards in one event, for one reward set.
A league score event takes the first row of its event, sub type and league whose set is its RSID
(any set while that is 0 or less).
Client: ALeagueTypeScoreEventVO.parseAdditionalXmlFromRoot and parseLeagueTypeEventElement (bundle lines
10268-10289); FactionEventVO.parseData (bundle line 7352) reads Berimond's rows by league and set
Fields:
-
league_type_event_id(LeagueTypeEventId) -
event_id(GameDataId['Event']) -
league_type_id(GameDataId['LeagueType']) -
sub_type(int) -
reward_set_id(RewardSetId) -
needed_points(tuple[int, ...]) -
reward_ids(tuple[tuple[RewardId, ...], ...]) -
top_x(tuple[int, ...]) -
hard_mode_start(int) -
alliance_reward_threshold_points(int)
Validators:
-
_id→league_type_event_id -
_int_column→event_id,league_type_id,sub_type,reward_set_id,hard_mode_start,alliance_reward_threshold_points -
_ints→needed_points,top_x -
_rewards→reward_ids
league_type_event_id
pydantic-field
¶
league_type_event_id: LeagueTypeEventId
Wire key leaguetypeEventsID
The row
league_type_id
pydantic-field
¶
league_type_id: GameDataId['LeagueType'] = 0
Wire key leaguetypeID
The league it rewards
reward_set_id
pydantic-field
¶
reward_set_id: RewardSetId = RewardSetId(0)
Wire key rewardSetID
The reward set it belongs to
needed_points
pydantic-field
¶
Wire key neededPointsForRewards
The points each reward tier needs, before the event's point scale
reward_ids
pydantic-field
¶
Wire key rewardIDs
One reward list per , part, in the row's order
top_x
pydantic-field
¶
Wire key topXValue
The ranks the top-rank rewards go to
hard_mode_start
pydantic-field
¶
hard_mode_start: int = 0
Wire key hardModeStart
Points above which the tiers are hard mode's; 0 for none
alliance_reward_threshold_points
pydantic-field
¶
alliance_reward_threshold_points: int = 0
Wire key allianceRewardThresholdPoints
Points a player needs for the alliance rewards
rewards
¶
rewards(*, game_data: GameData | None = None) -> tuple[tuple[Collectable, ...], ...]
What each tier gives, in the order of reward_ids.
Client: createListsFromRewardIdsString (bundle line 40529) builds each list with
rewardData.getListById
LeaderboardRewardDef
pydantic-model
¶
Bases: _Row
The rewards of one rank band of an event's leaderboard, in one reward set.
Client: LeaderboardRewardVO.fillFromParamXML (bundle line 112034), keyed by id in
CastleLeaderBoardRewardsData (bundle line 112005)
Fields:
-
leaderboard_reward_id(LeaderboardRewardId) -
event_id(GameDataId['Event']) -
reward_set_id(LeaderboardRewardSetId) -
max_rank(int) -
reward_ids(tuple[RewardId, ...]) -
league_type_id(GameDataId['LeagueType'])
Validators:
-
_id→leaderboard_reward_id -
_int_column→event_id,reward_set_id,max_rank -
_league→league_type_id -
_ids→reward_ids
leaderboard_reward_id
pydantic-field
¶
leaderboard_reward_id: LeaderboardRewardId
Wire key leaderboardRewardID
The row
event_id
pydantic-field
¶
event_id: GameDataId['Event'] = 0
Wire key eventTypeID
The event it is for
reward_set_id
pydantic-field
¶
reward_set_id: LeaderboardRewardSetId = LeaderboardRewardSetId(0)
Wire key leaderboardRewardSetID
The reward set it belongs to
league_type_id
pydantic-field
¶
league_type_id: GameDataId['LeagueType'] = -1
Wire key leagueID
The league it is for; -1 for every league
rewards
¶
rewards(*, game_data: GameData | None = None) -> tuple[Collectable, ...]
What the band gives.
Client: rewardData.getListByIdArray(rewardIDs) (CastleLeaderBoardRewardsData.getRewardListForDialogList,
bundle line 112017)
BerimondSpecialCampDef
pydantic-model
¶
Bases: _Row
A Battle for Berimond special camp: a watchtower, a capital or the resource village, by the id map rows and the
afd targets name it with.
Client: FactionEventVO.parseAdditionalXmlFromRoot (bundle line 7398) reads specialcampID, type and
distance, FactionTowerInfoVO.parseXML and FactionCapitalInfoVO.parseXML (bundle lines 88030, 88004)
the lane, position, villages and unlocks. The level, attacks and loot columns are the server's: the client never
reads them.
Fields:
-
special_camp_id(GameDataId['BerimondSpecialCamp']) -
camp_type(GameDataKey[BerimondSpecialCampType]) -
distance(int) -
lane_id(GameDataId[BerimondLane]) -
village_count(int) -
sector_x(int) -
sector_y(int) -
unlock_ids(tuple[GameDataId['BerimondSpecialCamp'], ...]) -
level(int) -
attacks_until_destroyed(int) -
loot_coins(int) -
loot_rubies(int) -
loot_wood(int) -
loot_stone(int) -
loot_food(int) -
loot_mead(int) -
loot_beef(int)
Validators:
-
_id→special_camp_id -
_int_column→distance,lane_id,village_count,sector_x,sector_y,level,attacks_until_destroyed,loot_coins,loot_rubies,loot_wood,loot_stone,loot_food,loot_mead,loot_beef -
_text_column→camp_type -
_ids→unlock_ids
special_camp_id
pydantic-field
¶
special_camp_id: GameDataId['BerimondSpecialCamp']
Wire key specialcampID
The camp
camp_type
pydantic-field
¶
camp_type: GameDataKey[BerimondSpecialCampType] = ''
Wire key type
What it is; empty for none
lane_id
pydantic-field
¶
lane_id: GameDataId[BerimondLane] = 0
Wire key laneID
The lane it stands on; 0 for the resource village
unlock_ids
pydantic-field
¶
unlock_ids: tuple[GameDataId['BerimondSpecialCamp'], ...] = ()
Wire key unlockIDs
A capital's camps, as the client lists them
row_id
¶
The row's own id, parseInt of it; a row without one is skipped, as nothing can look it up.
is_research_cost_column
¶
Whether a researches column is a cost: cost<name> or globalServerCost<name>.
gamedata.table¶
A game-data table: rows keyed by id, each validated the first time it is read.
Loading the game data then costs no row validation at all: a table holds the items rows as the file has them, trimmed to the columns its model reads, and validates a row when it is asked for.
Classes:
| Name | Description |
|---|---|
Table |
One items table by id, read-only. |
Table
¶
Table(model: type[R], id_field: str, rows: Mapping[int, dict[str, Any]], *, name: str = '', context: dict[str, Any] | None = None)
Bases: Mapping[K, R], Generic[K, R]
One items table by id, read-only.
Reading a row by id (table[Building.KEEP_L1], table.get(171), 171 in table)
validates that row alone. Iterating, len() or comparing validates every row once, and keys
come back as the rows' ids: the enum member, or the plain int of an id the enum lacks. A row
that does not fit its model is left out, as if the table did not have it, with a warning the
first time it is read. A table is shared by every thread that reads the game data: each row
is validated once, so table[k] is table[k] holds across threads. context is passed to
each row's validation, for a model that reads a row by another table.
gamedata.collectables¶
Collectables: one reward, cost or lot of goods, typed by kind, as the client's single parser reads them.
The server sends collectables in two layouts, which the client reads with one key table:
- rows,
[[key, entry, amount?], ...](a mission's rewards, goods on their way):CollectableRows - an object,
{key: [entry, ...], "SO": sort order}(the login bonus):CollectableObject
Each entry's layout depends on its kind ([unit_id, amount] under U, an amount under C1,
{"ID": booster id, "D": seconds} under B, ...); Collectable reads it into item,
amount and duration_seconds. An entry under a key the client has no type for is kept as
CollectableKind.OTHER with its key and value, where the client drops it.
Classes:
| Name | Description |
|---|---|
Collectable |
One collectable: a reward, a cost or a lot of goods, typed by its kind. |
Attributes:
| Name | Type | Description |
|---|---|---|
CollectableItem |
|
|
MINUTE_SKIP_FIRST_ID |
The start of the minute skips' currency id range: items |
|
CollectableRows |
A model field read from collectable rows, |
|
CollectableObject |
A model field read from a reward object, |
|
CurrencyIdRows |
A model field read from |
|
CurrencyAmounts |
Currencies by id and amount, sent as |
CollectableItem
module-attribute
¶
CollectableItem = Unit | Tool | Building | ConstructionItem | Currency | LootBox | Gem | AllianceCrestLayout | BoosterId | Rareness | int | str
MINUTE_SKIP_KEY
module-attribute
¶
A minute skip sent as ["MS<n>", amount]: the currency MINUTE_SKIP_FIRST_ID + n.
MINUTE_SKIP_FIRST_ID
module-attribute
¶
The start of the minute skips' currency id range: items currencyTypes row MinuteSkip ("1000-1999").
Client: CollectableHelper.getTypeByServerKey (bundle lines 1604-1605), XmlCurrencyRangeVO.parseXml
(bundle line 141268)
PACKAGE_REWARD_COLUMNS
module-attribute
¶
PACKAGE_REWARD_COLUMNS = frozenset({*_PACKAGE_COLUMNS, 'packageIDs', 'lootBox', 'buildingAmount', 'unitAmount', 'specialHeroOfRarenessID', 'constructionItemAmount', 'equipmentIDs', 'enchantedEquipmentIDs', 'specialEquipmentOfRarenessID', 'gemIDs', 'specialGemOfLevelID'})
Every column the switch of createRewardList reads.
CollectableRows
module-attribute
¶
CollectableRows = Annotated[tuple[Collectable, ...], BeforeValidator(_collectables(Collectable.from_rows))]
A model field read from collectable rows, [[key, entry, amount?], ...] (see Collectable.from_rows).
CollectableObject
module-attribute
¶
CollectableObject = Annotated[tuple[Collectable, ...], BeforeValidator(_collectables(Collectable.from_object))]
A model field read from a reward object, {key: [entry, ...]} (see Collectable.from_object).
CurrencyIdRows
module-attribute
¶
CurrencyIdRows = Annotated[tuple[Collectable, ...], BeforeValidator(_currency_id_rows)]
A model field read from [[currency_id, amount], ...] rows, one currency collectable per row, as sent.
Unlike CurrencyAmounts, rows are not added up and an amount keeps its sign.
Client: CollectableItemGenericCurrencyVO(e[0], e[1]) per row (bundle line 138308)
CurrencyAmounts
module-attribute
¶
CurrencyAmounts = Annotated[dict[EnumOrInt['CurrencyId'], int], BeforeValidator(_currency_rows), PlainSerializer(_rows_of)]
Currencies by id and amount, sent as [[currency_id, amount], ...] in insertion order.
Unlike CollectableRows, the rows name the currency by its currencyID, not a server key.
Client: CastleFightScreenVO.addCollectorBooster (bundle line 30584) pushes [currency_id, amount]
Collectable
pydantic-model
¶
Bases: EmpireModel
One collectable: a reward, a cost or a lot of goods, typed by its kind.
item is what the entry names, for the kinds that name one: the unit or tool for
UNITS, the Currency for CURRENCY, the BoosterId for a booster, the loot box,
building, construction item, gem or crest layout, the rareness of a random equipment, or the
id of an equipment, crest symbol, gift package or material bag, which no enum names.
amount is how many; an entry that names an item without a count is 1.
Client: CollectableHelper.getTypeByServerKey and createVO (bundle lines 1603-1629),
then the item class's parseServerObject
Fields:
-
kind(CollectableKind) -
key(str) -
amount(int | float) -
item(CollectableItem | None) -
duration_seconds(int | float | None) -
value(Any)
key
pydantic-field
¶
key: str
The server key it came under, as sent (for a game-data reward, its kind's or currency's); the only name an OTHER entry has
item
pydantic-field
¶
item: CollectableItem | None = None
What the entry names; None for a kind that names nothing
duration_seconds
pydantic-field
¶
How long it lasts, for a booster, VIP time or crest layout; None otherwise
value
pydantic-field
¶
value: Any = None
The entry as sent, for an OTHER entry and a kind whose layout is not read here (relics, equipment sent whole, alliance gifts); None otherwise
send_key
property
¶
send_key: str
The key the client sends for this collectable, as when the login bonus reward is picked.
A currency goes as its own key, anything else as its kind's key: a booster with a kind of
its own as that kind's (PG, XPB, ...), a hero random equipment as RE.
Raises:
| Type | Description |
|---|---|
ValueError
|
An OTHER entry, which the client never offers, or a currency whose key is unknown |
Client: CollectableHelper.getServerKeyByCollectable (bundle line 1646)
from_entry
classmethod
¶
from_entry(key: str, entry: Any, amount: Any = None) -> Collectable
One entry under its server key; amount is the third place of a row, where it has one.
Client: CollectableParserS2CParamList.createByParamListMethod (bundle line 40569),
LostAndFoundListItemVO.parseData (bundle line 144545)
from_object
classmethod
¶
from_object(value: Any) -> tuple[Collectable, ...]
A reward object {key: [entry, ...], "SO": sort order} as its collectables, in the order sent.
A key whose value is no list is skipped, as the client skips a null one; SO only sorts the display.
Client: CollectableParserS2CParamObject.createList and parseSortOrder (bundle lines 62810-62818)
from_rows
classmethod
¶
from_rows(value: Any) -> tuple[Collectable, ...]
Collectable rows [[key, entry, amount?], ...], a list of such lists, or an old-style goods list.
An old-style list holds amounts in a fixed order of goods and currencies, a 0 for none.
Client: CollectableParserS2CParamList.createList and createByParamListMethod (bundle lines
40560-40573), CollectableParserS2COldGoods.createByParamListOldGoods (bundle line 62797)
of_currency
classmethod
¶
of_currency(currency_id: int, amount: int | float = 1) -> Collectable
A currency named by its currencyID, under its server key (the id itself where the key is unknown).
Client: CollectableItemGenericCurrencyVO (bundle line 5258) takes the id and amount
from_reward_row
classmethod
¶
What one rewards row of the items gives, in the client's order.
Each column of a kind holds #-separated parts, read as the kind's item class reads them;
then each add<name> column adds one more, of the kind name names or else the currency
whose Name it is (currency_ids, by name); duplicates the client adds up are added up.
An add column naming neither is kept as OTHER, where the client drops it. A random
equipment of a hero rareness reads as HERO_RANDOM, as a packet's does. The columns no
parser reads (comment1, hiddenFood, ignore* and the like) give nothing.
Client: CollectableParserX2CRewards.createList (bundle line 62897) and
CollectableParserX2CList.createList (bundle line 62874) with
CurrencyData.getXmlCurrencyByName (bundle line 141193)
from_columns
classmethod
¶
from_columns(row: Mapping[str, Any], prefix: str, currency_ids: Mapping[str, int]) -> tuple[Collectable, ...]
One collectable per <prefix><name> column of an items row, in the row's order: a research's
cost columns, a reward's add columns.
name is a kind's items key (C2, Wood) or else the Name of a currency
(LegendaryToken, by currency_ids). A column naming neither is kept as OTHER, where
the client drops it.
Client: CollectableParserX2CList.createList (bundle lines 62874-62881) with
CurrencyData.getXmlCurrencyByName (bundle line 141193)
package_costs
classmethod
¶
What an event package row costs before discounts: each goods' packagePrice<name> above 0, in the
client's goods order, then its cost columns; rubies 0 for a row with neither.
A column naming no kind or currency is dropped, as the client drops it.
Client: CollectableParserX2CEventPackages.createCostList (split.js line 325525),
CollectableHelper.getGoodsKeySuffix (split.js line 9426)
package_rewards
classmethod
¶
package_rewards(row: Mapping[str, Any], currency_ids: Mapping[str, int], bundled: Mapping[int, tuple[Collectable, ...]] | None = None) -> tuple[Collectable, ...]
What an event package row gives: its add, amount and kind or currency columns, each pass added up
with the ones before, then the columns the client reads one by one, in the row's order.
bundled are the rewards of the packages a bundle's packageIDs names, by package id; a package
it lacks gives nothing, as in the client. A column naming no kind or currency is dropped.
Client: CollectableParserX2CEventPackages.createRewardList (split.js line 325561) with
CollectableParserX2CList.createList (split.js line 325769)
merged
staticmethod
¶
merged(collectables: Iterable[Collectable]) -> tuple[Collectable, ...]
The collectables with the duplicates the client adds up added up, each into the first it adds up with.
Most kinds add up by kind; currencies, units, buildings, construction items, material bags and crest layouts only for the same item; boosters, equipment, gems, relics and the other one-off kinds never. VIP time, dungeon protection and crest layouts add their durations, the others their amounts. Two different loot boxes add up into the first one's box, as in the client. The client also requires the same grant type, which a collectable does not carry: the collectables of one reward share theirs, so merge only collectables of one grant type.
Client: CollectableList.combineDuplicatedItems (bundle line 1887), isCombineAbleWith and
combineWith of ACollectableItemVO (bundle lines 3569, 3558) and its overrides
is_reward_column
¶
Whether a rewards row column holds a collectable: a kind's items column or an add column.
gamedata.lenient¶
Lenient id fields: the enum member for an id the enum knows, the plain value for one it does not.
A client release can send an id the generated enums do not have yet. A field typed
EnumOrInt[Kingdom] keeps such an id as its int instead of failing the packet, and logs a
warning once per id. EnumOrInt[Unit, Tool] takes a member of either, for an id from a
table two enums share. Name a generated enum by its name in quotes (EnumOrInt["QuestId"], the
enum imported under TYPE_CHECKING) so its module loads only when a value arrives; the
largest of them hold thousands of members.
Inside the items tables GameDataId[E] and GameDataKey[E] do the same without the warning:
loading items newer than the enums already warns once for the whole version.
Classes:
| Name | Description |
|---|---|
LenientEnum |
The validator behind the lenient types: reads the id, then looks its member up. |
EnumOrInt |
|
EnumOrStr |
|
GameDataId |
|
GameDataKey |
|
Functions:
| Name | Description |
|---|---|
known |
The member of the first of |
LenientEnum
¶
LenientEnum(enum: type[Enum] | str | tuple[type[Enum] | str, ...], base: type[int] | type[str], *, warn: bool = True)
EnumOrInt
¶
EnumOrInt[E]: a member of the IntEnum E, or the plain int of an id E lacks.
EnumOrInt[E, F] looks the id up in E, then in F.
EnumOrStr
¶
EnumOrStr[E]: a member of the str Enum E, or the plain str of a key E lacks.
GameDataId
¶
GameDataId[E]: EnumOrInt[E] for an id inside the items tables, kept without a warning.
GameDataId[E, F] looks the id up in E, then in F.
GameDataKey
¶
GameDataKey[E]: EnumOrStr[E] for a fixed text column of the items tables, kept without a warning.
gamedata.effect_texts¶
An effect with its value, described the way the game's tooltips describe it.
Usage
from empire_core.gamedata import EffectTemplate, describe_construction_item, describe_effect
item = game_data.construction_items[ConstructionItem.BARRACKS_COST_G1_L1]
describe_construction_item(item) # "-2% recruitment costs"
describe_effect(gem.effects[0], EffectTemplate.EQUIPMENT, trigger_chance=gem.trigger_chance)
The text comes from the language file (empire_core.texts), fetched on first use
and cached; the game data names the effect and how its value reads.
Functions:
| Name | Description |
|---|---|
describe_effect |
One bonus as the game describes it in |
describe_effects |
Each bonus as |
describe_construction_item |
A construction item's bonuses as its tooltip lists them, one per line: the fixed bonuses of its own |
describe_building |
A decoration's effects as its info lists them, its |
Replacements
module-attribute
¶
Replacements = Callable[[EffectValue, 'GameData', str], list[object]]
describe_effect
¶
describe_effect(effect: EffectValue | EquipmentEffectValue, template: EffectTemplate = CONSTRUCTION_ITEM, *, trigger_chance: int = 100, lang: str = 'en', game_data: GameData | None = None) -> str | None
One bonus as the game describes it in lang: "-5% recruitment costs".
The text is the template's for the effect, filled with the value as the effect's type
reads it (one number, the value of the first unit it names, the ids it unlocks, ...). An
equipment effect resolves to its effect and always reads as equipment. A gem that does not
always trigger (GemDef.trigger_chance below 100) reads gem_effect_description_<gem
type> with the chance first. Fetches the language file on first use (empire_core.texts.text).
Returns:
| Type | Description |
|---|---|
str | None
|
The description; None when |
Client: EffectTypeEnum registrations (bundle line 1322) choose the value class, whose
textReplacements fill the text
describe_effects
¶
describe_effects(effects: Iterable[EffectValue], template: EffectTemplate = CONSTRUCTION_ITEM, *, lang: str = 'en', game_data: GameData | None = None) -> list[str]
Each bonus as describe_effect describes it; an effect game_data lacks is left out.
describe_construction_item
¶
describe_construction_item(item: ConstructionItemDef, *, lang: str = 'en', game_data: GameData | None = None) -> str
A construction item's bonuses as its tooltip lists them, one per line: the fixed bonuses of its own
columns (ci_effect_<column>, the value as it is), then its effects; ci_effect_NA for none.
Client: ConstructionItemVO.effectText (bundle line 47766), the fixed bonuses' text from
CastleEffectVO.constructionItemTextId (bundle line 79073)
describe_building
¶
describe_building(building: BuildingDef, *, lang: str = 'en', game_data: GameData | None = None) -> list[str]
A decoration's effects as its info lists them, its effects then its area_specific_effects, each with
its cap.
Client: ABasicBuildingVO.allBuildingEffects (bundle line 18113) and
ADecoBuildingVO.createAdditionalEffectItems (bundle line 11897)
gamedata.troops¶
Telling troops from equipment in a unit dict, by the loaded game data.
Troops are the units rows without slotTypes, which GameData keeps
as its units; the rows with them are tools. The ids come from
GameData.load, so they share its one download, cache and failure backoff.
With no game data loaded, a CDN outage makes get_troop_ids raise
NetworkError rather than return an empty set,
so callers can tell "metadata unavailable" apart from "no troop IDs".
count_troops still degrades to counting every unit in that case, which
inflates the count; see its docstring.
Functions:
| Name | Description |
|---|---|
troop_data_available |
Whether game data is loaded in this process, i.e. whether troop counts are exact. |
get_troop_ids |
The |
count_troops |
Count only actual troops in a unit dict, excluding equipment. |
troop_data_available
¶
troop_data_available() -> bool
Whether game data is loaded in this process, i.e. whether troop counts are exact.
Returns:
| Type | Description |
|---|---|
bool
|
True once a |
bool
|
|
bool
|
|
bool
|
every unit. This does not touch the network. |
get_troop_ids
¶
The wodID of every troop: the ids of the loaded game data's units.
Uses the game data already loaded in the process (GameData.loaded,
which client.game_data reads too), and loads it through
GameData.load when there is none.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
force_refresh
|
bool
|
Load the game data again, past its cache and failure backoff |
False
|
Returns:
| Type | Description |
|---|---|
set[int]
|
Set of wodID values for valid troops. An empty set means the CDN data |
set[int]
|
genuinely listed no troops - a fetch failure raises instead. |
Raises:
| Type | Description |
|---|---|
NetworkError
|
The game data is not loaded and could not be. Within five minutes of a failed fetch this is raised without another request. |
count_troops
¶
Count only actual troops in a unit dict, excluding equipment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
units
|
dict[int, int]
|
Dict of {unit_id: count} |
required |
troop_ids
|
set[int] | None
|
Explicit set of valid troop IDs. Taken from the game data (loading it if needed) when omitted. An explicitly empty set counts nothing, since it means "no unit ID is a troop". |
None
|
Returns:
| Type | Description |
|---|---|
int
|
Total count of actual troops. |
int
|
Degraded fallback: when |
int
|
cannot be loaded, every unit is counted - including equipment - so the |
int
|
result can be inflated. The fallback warns (throttled to once per |
int
|
retry interval); callers that need to know whether a count is exact |
int
|
should check |
int
|
|
gamedata.cdn¶
The items payload on the GGE CDN, fetched without any caching.
GameData.load is the one
place that calls these, caches the result and backs off after a failure;
everything else reads the game data through it.
Functions:
| Name | Description |
|---|---|
get_items_version |
The current items version, from |
fetch_items_data |
The full |
get_items_version
¶
get_items_version() -> str
The current items version, from ItemsVersion.properties.
Client: BasicFrameOne.loadItemVersionXML loads {baseURL}/ItemsVersion.properties
(ggs.dll lines 3928 and 32238) and onVersionPropertiesLoaded keeps the text after the
first =, trimmed (ggs.dll line 32240).
Raises:
| Type | Description |
|---|---|
ValueError
|
The text is not dotted digits ( |
Generated ids¶
One enum per items table, generated for one items version (ITEMS_VERSION). Only the classes are shown here; their members are in the source and in your editor's autocomplete.
Game-data ids as enums, so they autocomplete.
One enum per items table, each member named from the row in UPPER_SNAKE;
where two rows would share a name, both carry their id (SPEED_BOOST_2).
Currencies and researches are named from the game's English text
(Currency.SKIP_5_MINUTES is "MS2"), where the row has its own.
Members are plain ints (Currency members plain strs), so they go on the
wire and into models as their value.
Most members also carry their row's fixed id and number columns, e.g.
Unit.MEAD_RANGER_L6.role and .level or Tool.X.category, so
[t for t in Tool if t.category == "Defence"] works without game data.
Anything a balance patch can change is not baked in: for the full row, load a
GameData (nothing here downloads it) and index its table with the
member, e.g. game_data.units[Unit.MEAD_RANGER_L6].
Enums whose rows the game names by a text (units, tools, currencies,
researches, generals, Legendary and sceat skills, events, gems, achievements,
titles, crest layouts, main quests, prebuilt castles, private villages,
fusion forges, judgements, treasure maps, league types, feasts) have display_name(lang="en"), the
name the game shows: Unit.MEAD_RANGER_L6.display_name("de"). It reads the
language file, fetched on first use and cached (empire_core.texts).
ITEMS_VERSION is the items version they were generated from, and
is_current says whether a loaded GameData is that version. For
anything newer, use the named lookups on GameData.
Relic effects and alliance buffs have no enum, as the game names none of
their rows; look them up by id on GameData (relic_effects,
alliance_buffs). Equipment effects, which the game names by nothing but the
effect they give, are named from that effect, their bonus and their wearer. Nor
do the 27,000 rewards have one: the game shows no text for one, and the notes
some rows carry name where it is given, not the reward.
Regenerate with uv run python scripts/generate_gamedata_ids.py.
Modules:
| Name | Description |
|---|---|
achievements |
|
alliance_crests |
|
alliance_tower_effects |
|
berimond_special_camps |
|
buildings |
|
construction_items |
|
currencies |
|
daily_quests |
|
daimyo_camps |
|
difficulty_types |
|
effect_types |
|
effects |
|
equipment_effects |
|
equipment_groups |
|
events |
|
feasts |
|
fusion_forges |
|
gem_colors |
|
gems |
|
general_abilities |
|
general_rarities |
|
general_skills |
|
generals |
|
generals_hub_characters |
|
global_effects |
|
horses |
|
judgements |
|
league_types |
|
legendary_skills |
|
loot_box_types |
|
loot_boxes |
|
main_quests |
|
prebuilt_castles |
|
private_villages |
|
quests |
|
raid_bosses |
|
researches |
|
sceat_skills |
|
titles |
|
tools |
|
treasure_maps |
|
units |
|
Classes:
| Name | Description |
|---|---|
Achievement |
Achievement ids from the |
AllianceCrestColor |
Alliance crest colour ids from the |
AllianceCrestLayout |
Alliance crest layout ids from the |
AllianceTowerEffect |
Beyond the Horizon's alliance tower effect ids from the |
BerimondSpecialCamp |
Battle for Berimond special camp ids from the |
Building |
Building |
ConstructionItem |
Construction item ids from the |
Currency |
Currency keys from the |
CurrencyId |
Currency ids from the |
DailyQuestId |
Daily quest ids from the |
DaimyoCastle |
Daimyo castle ids from the |
DaimyoTownship |
Township ids from the |
DifficultyType |
Event difficulty type ids from the |
EffectType |
Effect type ids from the |
Effect |
Effect ids from the |
EquipmentEffect |
Equipment effect ids from the |
EquipmentGroup |
Equipment item group ids from the |
Event |
Event ids from the |
Feast |
Feast ids from the |
FusionForgeId |
Fusion forge ids from the |
GemColor |
Gem colour ids from the |
Gem |
Gem ids from the |
GeneralAbility |
General ability ids from the |
GeneralRarity |
General rarity ids from the |
GeneralSkill |
General skill ids from the |
General |
General ids from the |
GeneralsHubCharacter |
Generals hub character ids from the |
GlobalEffect |
Global effect ids from the |
Horse |
Travel booster |
Judgement |
Citizen judgement ids from the |
LeagueType |
League type ids, the |
LegendarySkill |
Legendary skill ids from the |
LootBoxType |
Loot box type ids from the |
LootBox |
Loot box ids from the |
MainQuest |
Main quest ids from the |
PrebuiltCastle |
Prebuilt castle ids from the |
PrivateVillageType |
Private resource village ids from the |
QuestId |
Quest ids from the |
RaidBoss |
Alliance raid boss ids from the |
Research |
Research ids from the |
SceatSkill |
Sceat skill ids from the |
Title |
Title ids from the |
Tool |
Tool |
TreasureMapId |
Treasure map ids from the |
Unit |
Unit |
Functions:
| Name | Description |
|---|---|
is_current |
Whether |
Achievement
¶
Bases: IntEnum
Achievement ids from the achievements table, named from the series' English name and the step as its level; the
main series from what it counts.
Client: AchievementVO.fillFromParamXML (bundle line 92882); names from AchievementSerieVO.nameString (bundle
line 92822)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
series_id |
int
|
The series it is a step of. |
series_number |
int
|
Its step in the series. |
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text achievementName_<series_id>.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: AchievementSerieVO.nameString (bundle line 92822)
AllianceCrestColor
¶
AllianceCrestLayout
¶
Bases: IntEnum
Alliance crest layout ids from the allianceCoatLayouts table, named from the game's English name, else the
comment1 note.
Client: AllianceCrestLayoutVO.parseXML (bundle line 111024); names from
CollectableItemAllianceCrestLayoutVO.getNameTextId (bundle line 89359)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
color_count |
int
|
Colours it takes. |
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text allianceCoat_Layout_name_<value>.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: CollectableItemAllianceCrestLayoutVO.getNameTextId (bundle line 89359)
AllianceTowerEffect
¶
Bases: IntEnum
Beyond the Horizon's alliance tower effect ids from the allianceTowerEffects table, named from the game's
English name, else the effect each gives.
Client: ABGAllianceTowerEffectXmlVO.parseXML (bundle line 145007); names from
CastleABGTowerEffectsDialogItem.fill (bundle line 71074)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text dialog_beyondTheHorizon_AllianceTower_<effect name>_name; None
for a row without one.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: CastleABGTowerEffectsDialogItem.fill (bundle line 71074)
BerimondSpecialCamp
¶
Bases: IntEnum
Battle for Berimond special camp ids from the specialcamps table: watchtowers, capitals and the resource
village, named from the lane's faction and place and the camp's English name.
Client: FactionEventVO.parseAdditionalXmlFromRoot (bundle line 7398); names from areaNameString of the
faction map objects (bundle lines 22840, 22792, 28559), lanes from FactionCapitalInfoVO (bundle line 88021)
Attributes:
| Name | Type | Description |
|---|---|---|
camp_type |
str
|
What it is, a |
lane_id |
int
|
Its lane, a |
Building
¶
Bases: IntEnum
Building wodID values from the buildings table, named name, type (for decorations) and level.
Client: AVisualVO.parseXmlNode (bundle line 17800) reads name, group and type, AShopVO.parseXmlNode (bundle
line 31713) the level
Attributes:
| Name | Type | Description |
|---|---|---|
group |
str
|
The |
level |
int
|
Upgrade level; -1 when the row has none. |
ConstructionItem
¶
Bases: IntEnum
Construction item ids from the constructionItems table, named name, group and level.
Client: ConstructionItemVO.parseBasicValues (bundle line 47719)
Attributes:
| Name | Type | Description |
|---|---|---|
group_id |
int
|
The |
level |
int
|
Upgrade level; -1 when the row has none. |
rareness_id |
int
|
The |
Currency
¶
Currency keys from the currencies table, the key the server uses, named from the game's English name; coins and
rubies are not in it.
Client: CurrencyData.getXmlCurrencyByKey (bundle line 141194); names from currency_name_<assetName or Name>
(CollectableItemGenericCurrencyVO.getNameTextId, bundle line 5267)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
currency_id |
int
|
The currency's id, as other tables reference it. |
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text currency_name_<assetName or Name>.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: CollectableItemGenericCurrencyVO.getNameTextId (bundle line 5267)
CurrencyId
¶
Bases: IntEnum
Currency ids from the currencies table, as other tables reference them; names match Currency.
Client: XmlCurrencyVO.parseXml (bundle line 141282)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
json_key |
str
|
The key the server uses for it, a |
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text currency_name_<assetName or Name>.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: CollectableItemGenericCurrencyVO.getNameTextId (bundle line 5267)
DailyQuestId
¶
Bases: IntEnum
Daily quest ids from the dailyactivities table, named from what the first condition counts. Named DailyQuestId,
as empire_core.quests.DailyQuest is today's quest.
Client: CastleDailyQuestData.createXmlQuestDic (bundle line 134082), DailyQuestVO.fillFromParamXML (bundle
line 134124)
Attributes:
| Name | Type | Description |
|---|---|---|
trigger_kingdom_id |
int
|
The kingdom the quest counts in, a |
DaimyoCastle
¶
Bases: IntEnum
Daimyo castle ids from the daimyoCastles table, named from the rank the game names the area by and the level:
the Legion of the Daimyos' daimyo castles.
Client: DaimyoXmlVO.parseXML (bundle line 61663), read by DaimyoCastleXmlData (bundle line 141378)
Attributes:
| Name | Type | Description |
|---|---|---|
rank |
int
|
Its rank. |
level |
int
|
Upgrade level; -1 when the row has none. |
DaimyoTownship
¶
Bases: IntEnum
Township ids from the daimyoTownships table, named from the rank the game names the area by and the level: the
Legion of the Daimyos' townships.
Client: DaimyoXmlVO.parseXML (bundle line 61663), read by DaimyoTownshipXmlData (bundle line 141400)
Attributes:
| Name | Type | Description |
|---|---|---|
rank |
int
|
Its rank. |
level |
int
|
Upgrade level; -1 when the row has none. |
DifficultyType
¶
Bases: IntEnum
Event difficulty type ids from the eventAutoScalingDifficultyTypes table.
Client: EventAutoScalingDifficultyTypeVO.parseXML (bundle line 38258)
EffectType
¶
Bases: IntEnum
Effect type ids from the effecttypes table.
Client: CastleEffectTypeVO (bundle line 111835)
Effect
¶
Bases: IntEnum
Effect ids from the effects table.
Client: EffectVO.parseXML (bundle line 41702)
Attributes:
| Name | Type | Description |
|---|---|---|
effect_type_id |
int
|
The effect type it modifies, an |
EquipmentEffect
¶
Bases: IntEnum
Equipment effect ids from the equipment_effects table, the bonuses equipment rolls, named from the effect each
gives, its bonus and who wears it.
Client: XmlEquipmentEffectVO.parseXml (bundle line 144264)
Attributes:
| Name | Type | Description |
|---|---|---|
effect_id |
int
|
The effect it gives, an |
bonus |
int
|
Its bonus. |
wearer_id |
int
|
Who wears it, a |
EquipmentGroup
¶
Bases: IntEnum
Equipment item group ids from the equipment_groups table, as equipment effects name them.
Client: XmlEquipmentGroupVO.parseXml (bundle line 144187)
Attributes:
| Name | Type | Description |
|---|---|---|
wearer_id |
int
|
Who wears it, a |
slot_id |
int
|
The slot it goes in, an |
Event
¶
Bases: IntEnum
Event ids from the events table, named from the title players see, else eventType.
Client: CastleSpecialEventData.storeXmlEvents (bundle line 139777) keys rows by eventID,
ASpecialEventVO.parseBasicsFromXmlNode (bundle line 2959) reads eventType
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text event_title_<value>; None when the language file has no such
text.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: "event_title_" + eventID, as the reward hub, alliance quests and season events name an event (bundle
lines 54451, 111097 and 31389)
Feast
¶
Bases: IntEnum
Feast ids from the feasts table, named from the game's English name.
Client: CastlePremiumMarketCollectionData.parseXML (split.js line 34586); names from
PremiumFestivalItemVO.nameTextID (split.js line 333269)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text dialog_festival_<type>Event.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: PremiumFestivalItemVO.nameTextID (split.js line 333269)
FusionForgeId
¶
Bases: IntEnum
Fusion forge ids from the fusionSystems table, which the fusionForges table shares, named from the game's
English name. Named FusionForgeId, as FusionForge is a forge's level and energy.
Client: FusionForgeData.init (bundle line 141977) builds a forge per fusionSystems row; names from
FusionForgeHubDialogMainItem.getNameTextId (bundle line 78081)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text dialog_fusionHub_fusionForges_deco; None for a row without one.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: FusionForgeHubDialogMainItem.getNameTextId (bundle line 78081)
GemColor
¶
Bases: IntEnum
Gem colour ids from the gemColors table, named from the game's English tooltip for the colour.
Client: GemColorVO.parseXml (bundle line 144489)
Gem
¶
Bases: IntEnum
Gem ids from the gems table, named from the game's English name and, unless unique, level.
Client: CastleGemVO.parseXML (bundle line 28287); names from CastleGemVO.nameString (bundle line 28321)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
level |
int
|
Gem level; 0 for a unique gem. |
set_id |
int
|
Its set; -1 for none. |
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text gem_unique_<reuseAssetOfGemID> or gem_effect_name_<gem type>,
its {0} filled with the level.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: CastleGemVO.nameString (bundle line 28321)
GeneralAbility
¶
Bases: IntEnum
General ability ids from the generalAbilities table, one per level.
Client: GeneralAbilityXmlVO.fillFromParamXml (bundle line 113203)
Attributes:
| Name | Type | Description |
|---|---|---|
ability_group_id |
int
|
The group the ability's levels share. |
level |
int
|
Upgrade level; -1 when the row has none. |
GeneralRarity
¶
Bases: IntEnum
General rarity ids from the generalRarities table, named from name; the client's colours call the third epic
(GeneralVO.GENERAL_COLOR_EPIC, bundle line 26790).
Client: GeneralRarityXmlVO.fillFromParamXml (bundle line 113254)
GeneralSkill
¶
Bases: IntEnum
General skill ids from the generalSkills table, named general, skill and level.
Client: GeneralSkillVO.parseXML (bundle line 113363)
Attributes:
| Name | Type | Description |
|---|---|---|
general_id |
int
|
The general it belongs to, a |
level |
int
|
Upgrade level; -1 when the row has none. |
General
¶
Bases: IntEnum
General ids from the generals table.
Client: GeneralXmlVO.fillFromParamXml (bundle line 33102)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
rarity_id |
int
|
The |
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text generals_characters_<value>_name; None when the language file
has no such text.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: GeneralXmlVO.nameTextID (bundle line 33105)
GeneralsHubCharacter
¶
Bases: IntEnum
Generals hub character ids from the characters table, named from name; the client's constants are
ID_FAT_KING, ID_KNIGHT and ID_PRINCESS (GeneralsHubQuestVO, bundle line 47051).
Client: GeneralsHubQuestVO.fillFromParamXml (bundle line 47005)
GlobalEffect
¶
Bases: IntEnum
Global effect ids from the globalEffects table.
Client: GlobalEffectVO.parseXml (bundle line 143690)
Horse
¶
Bases: IntEnum
Travel booster wodID values from the horses table, the HBW movements send, named from the comment2
and comment1 notes: the game names a horse only by its button's place in the travel dialog, the tooltip text
horse<n>.
Client: HorseTravelboosterVO.parseXmlNode (bundle line 118814); ACastlePostActionDialog.calculateTooltip
(bundle line 27269)
Judgement
¶
Bases: IntEnum
Citizen judgement ids from the judgements table, named from the game's English name, else visualName.
Client: JudgementVO.fillFromParamXML (bundle line 134514); names from judgement_<id>_name (bundle line
49629)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text judgement_<value>_name; None when the language file has no such
text.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: EventJudgementVO.getInfoTooltipLine1 (bundle line 49629)
LeagueType
¶
Bases: IntEnum
League type ids, the LID of the highscore commands, named from the highscore's title for each league: its level
band in the honour highscore. An event numbers its own leagues from 1 too, so in an event a member is that event's
league of the id; GameData.league_type gives its band.
Client: LeagueTypeVO.parseXML (bundle line 91495); names from CastleHighscoreDialog.setLeagueTitleById
(bundle line 27528)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text dialog_highscore_league<value>; None when the language file has
no such text.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: CastleHighscoreDialog.setLeagueTitleById (bundle line 27528)
LegendarySkill
¶
Bases: IntEnum
Legendary skill ids from the legendskills table, named effect type, tree, group and level.
Client: CastleLegendSkillVO.parseXML (bundle line 48652)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
skill_tree_id |
int
|
The tree it sits in. |
skill_group_id |
int
|
The group its levels share. |
level |
int
|
Upgrade level; -1 when the row has none. |
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text dialog_legendTemple_<skill_group_id>_name.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: CastleLegendSkillVO.nameTextID (bundle line 48669)
LootBoxType
¶
Bases: IntEnum
Loot box type ids from the lootBoxTypes table, named from lootBoxTheme; keys count per type.
Client: LootBoxTypeVO.parseXML (bundle line 58900)
LootBox
¶
MainQuest
¶
Bases: IntEnum
Main quest ids from the mainquests table, the quest book's chapters, named from the game's English title.
Client: CastleQuestBookMainQuestListVO.parseListsFromParamObject (bundle line 52419); names from
mainquest_<id>_title (bundle line 93386)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text mainquest_<value>_title.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: the quest book's chapter dialog (bundle line 93386)
PrebuiltCastle
¶
Bases: IntEnum
Prebuilt castle ids from the prebuiltcastles table: the castles and camps a kingdom, a season event's map or a
special server starts with, named from the game's English name and the area offering it.
Client: PrebuiltCastleItemVO.parseXML (bundle line 142341)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text dialog_chooseCastle_preBuiltCastle_<id> or
dialog_prebuiltCastle<id>_name; None for a row without one.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: SpecialServerPreBuiltCastleVO.getNameText (bundle line 40294) and
CastleKingdomCastleDetails.update (bundle line 97888)
PrivateVillageType
¶
Bases: IntEnum
Private resource village ids from the privateVillages table, one per kind, kingdom and level, named from the
game's English name. Named PrivateVillageType, as PrivateVillage is one you hold.
Client: PrivateResourceVillageInfoVO.fillFromParamXML (bundle line 143715)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
kingdom_id |
int
|
Its kingdom, a |
resource |
str
|
What it produces: wood, stone or food. |
level |
int
|
Upgrade level; -1 when the row has none. |
text_id |
str
|
The text id of its name, |
text_id
property
¶
text_id: str
The text id of its name, dialog_privateResourceVillages_villageLevel_<resource>_tt.
display_name
¶
The game's name for it in lang, the text dialog_privateResourceVillages_villageLevel_<resource>_tt, its
{0} filled with the level.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: PrivateResourceVillageShopItem.getTitleTxt (bundle line 81659)
QuestId
¶
Bases: IntEnum
Quest ids from the quests table, named from what the first condition counts; most names carry their id, as many
quests count the same thing. Named QuestId, as empire_core.quests.Quest is your running quest.
Client: CastleQuestData.generateQuestXMLList (bundle line 20192), CastleQuestVO.fillFromParamXML (bundle
line 52452)
Attributes:
| Name | Type | Description |
|---|---|---|
series_id |
int
|
The quest series it belongs to; -1 for none. |
event_id |
int
|
The event it belongs to, an |
RaidBoss
¶
Bases: IntEnum
Alliance raid boss ids from the raidBosses table.
Client: AllianceRaidbossVO.parseXML (bundle line 113835)
Research
¶
Bases: IntEnum
Research ids from the researches table, named from the game's English title and level; a blueprint or recipe
research from the comment2 note, group and level.
Client: AResearchVO.fillFromParamXML (bundle line 61502), which does not read comment2; titles from
ResearchVO.nameTextId (bundle line 61480)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
group_id |
int
|
The group the research's levels share. |
level |
int
|
Upgrade level; -1 when the row has none. |
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text research_<groupID>_title or ci_blueprint_<item name>; None for
a row without one.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: ResearchVO.nameTextId (bundle line 61480), BlueprintResearchVO.nameTextId (bundle line 139596);
a crafting recipe research has none here, as its name holds its recipe's output
(CraftingRecipeResearchVO.fullNameText, bundle line 139405)
SceatSkill
¶
Bases: IntEnum
Sceat skill ids from the sceatSkills table, named from the game's English name and level.
Client: CastleSceatSkillVO.parseXML (bundle line 23074); names from nameTextID (bundle line 23110)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
skill_group_id |
int
|
The group its levels share. |
skill_tree_id |
int
|
The tree it sits in. |
level |
int
|
Upgrade level; -1 when the row has none. |
text_id |
str
|
The text id of its name, |
text_id
property
¶
text_id: str
The text id of its name, dialog_legendTemple_sceat_<skill_group_id>_name.
display_name
¶
The game's name for it in lang, the text dialog_legendTemple_sceat_<skill_group_id>_name.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: CastleSceatSkillVO.nameTextID (bundle line 23110)
Title
¶
Bases: IntEnum
Title ids from the titles table, named from the game's English title.
Client: TitleVO.parseXml (bundle line 62705); names from TitleVO.textID (bundle line 62756)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
title_system |
str
|
Its title system, a |
text_id |
str
|
The text id of its name, |
Tool
¶
Bases: IntEnum
Tool wodID values from the units table (rows with slotTypes).
Client: ToolUnitVO.parseXmlNode (bundle line 6538)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
level |
int
|
Upgrade level; -1 when the row has none. |
category |
str
|
Attack or Defence; "0" when the row has none. |
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text <type>_name.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: BasicUnitVO.getNameString (bundle line 19219)
TreasureMapId
¶
Bases: IntEnum
Treasure map ids from the tmaps table: the season events' maps and the treasure hunt's, named from the game's
English title; a season map by its event's in-game name and its comment1 difficulty; else the comment2 and
comment1 notes.
Client: TreasureMapVO.fillFromParamXML (bundle line 140567); names from CastleTreasureMapDialog.onMapLoaded
(bundle line 43848), a season map's event from the events' mapID (ASeasonEventVO.parseEventXmlNode, bundle
line 31385)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
map_type |
int
|
What the map is for, a |
text_id |
str
|
The text id of its name, |
display_name
¶
The game's name for it in lang, the text treasuremap_chest_<value>_title; None when the language file
has no such text.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: "treasuremap_chest_" + currentMapID + "_title", as CastleTreasureMapDialog.onMapLoaded names the
treasure hunt's map (bundle line 43848)
Unit
¶
Bases: IntEnum
Unit wodID values from the units table (rows without slotTypes).
Client: SoldierUnitVO.parseXmlNode (bundle line 12531)
Methods:
| Name | Description |
|---|---|
display_name |
The game's name for it in |
Attributes:
| Name | Type | Description |
|---|---|---|
level |
int
|
Upgrade level; -1 when the row has none. |
role |
str
|
melee or ranged. |
text_id |
str
|
The text id the game names it by, which |
text_id
instance-attribute
¶
text_id: str
The text id the game names it by, which display_name reads.
display_name
¶
The game's name for it in lang, the text <type>_name.
Fetches the language file on first use and caches it (empire_core.texts.text); a text the file lacks, or
a failed fetch, gives the text id.
Client: BasicUnitVO.getNameString (bundle line 19219)