Expand description
Asset variation databases (warscape_asset_variation_db.bin): which environment file a battle uses.
The database has a list of categories (map, season, precipitation…) with their values, and per key
(environment) a list of files with the flags of the category values each one allows. When a battle starts,
the game picks one of the files whose flags allow the battle’s values.
§File Format
FASTBIN0, little endian, with str being a u16 size and that many bytes:
[8 bytes] FASTBIN0 signature
[u16] serialise_version (1)
[u32] category count, then per category: u16 version (1), str name, u32 value count, str values
[u32] entry count, then per entry: str key, u16 version (1), u32 variation count,
and per variation: u16 version (1), str filename, u32 flagsThe packs also have the database in XML form, next to the binary one, and the Assembly Kit has its source
(environment_map.xml). See AssetVariationDb::to_xml, AssetVariationDb::from_xml and
AssetVariationDb::from_environment_map.
§Selection
As the game does it:
- Every value has a bit, counting through the values of all categories in order:
1 << (index & 31). - A query ORs the bit of the value chosen for each category. A value missing from the lists adds no bit.
- A variation matches when its flags are 0, or when they have every bit of the query.
- If nothing matches the battle’s map, the game queries again with the map
default_map, and picks one of the matches at random.
Structs§
- Asset
Variation Db - An asset variation database.
- Variation
- A file the game may pick, with the values it allows.
- Variation
Category - A category of the conditions of a battle, like
season, with its values. - Variation
Entry - The variations of a key, like
environment. - Variation
Matches - The variations of a key that match a query.
Constants§
- PATH
- Path of the database in the packs.
- PATH_
XML - Path of the XML form of the database in the packs.
- SIGNATURE
- FASTBIN0 file signature.
Type Aliases§
- Variation
Query - A query: the value chosen for each category. Categories left out add no bit.