Expand description
Native port of the opponent_generation category — the single
bots_settings.bots_generation_script run via [crate::BehaviorRegistry::generate_opponent]
to build a PvP bot from an expected arena rating.
all the data it needs is now in the typed GameConfig:
available_to_botsand item-raritycodewere promoted ontoAbilityTemplate/ItemRarity(they previously lived only in the admin-generatedcontent_raw).- ability-rarity
effislookups.ability_rarity_eff(whichcontent_raw_extractitself sources from the sameeff). character_level.ability_slotsis the baseability_slots_levelslookup (from_chapter_level <= level, highest match) — same rule the real-player path (ability_slots_for_chapter_level) uses.
uuid-string) order, so the native iterates config Vecs sorted by uuid string
— this matters for drain_random (picks by index) and find order.
RNG: the script draws in this order — level (1), then item_q once per
inventory item-type, then drain_random once per equipped ability.
rand_round/drain_random reuse the shared native logic
(balance::rand_round_f64; the drain index formula).
Structs§
- Opponent
GenCtx - Inputs for the opponent-generation slot — mirrors the
generate_opponentscope (ExpectedRating,Random) plus config/lookups the content reads. - Opponent
Generation Result - Uuid
IntPair
Functions§
- default_
opponent_ generation - Port of the shipped
bots_generation_script.
Type Aliases§
- Opponent
GenFn - Signature of an opponent-generation native fn.