Files
blitzkit/scripts/buildAssets/definitions.ts
T

1166 lines
38 KiB
TypeScript
Raw Normal View History

2024-03-31 18:24:19 -05:00
import { readdir } from 'fs/promises';
2024-01-25 12:20:34 -06:00
import { parse as parsePath } from 'path';
2023-12-28 20:58:18 -06:00
import { Vector3Tuple } from 'three';
2024-01-25 12:20:34 -06:00
import { parse as parseYaml } from 'yaml';
2024-03-07 18:30:02 -06:00
import { TankClass } from '../../src/components/Tanks';
2024-04-06 11:14:07 -05:00
import { readStringDVPL } from '../../src/core/blitz/readStringDVPL';
2024-01-07 20:07:45 -06:00
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
2024-01-20 21:35:36 -06:00
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
2024-01-25 11:50:43 -06:00
import {
ConsumableDefinitions,
2024-01-25 13:10:20 -06:00
TankFilterDefinitionCategory,
} from '../../src/core/blitzkrieg/consumableDefinitions';
2024-01-16 17:19:46 -06:00
import {
EquipmentDefinitions,
2024-01-21 22:11:01 -06:00
EquipmentPreset,
2024-01-16 17:19:46 -06:00
EquipmentRow,
} from '../../src/core/blitzkrieg/equipmentDefinitions';
2024-04-06 11:14:07 -05:00
import { GameDefinitions } from '../../src/core/blitzkrieg/gameDefinitions';
2024-01-09 18:35:42 -06:00
import {
ModelArmor,
ModelDefinitions,
} from '../../src/core/blitzkrieg/modelDefinitions';
2024-01-25 13:10:20 -06:00
import { ProvisionDefinitions } from '../../src/core/blitzkrieg/provisionDefinitions';
2024-03-31 18:24:19 -05:00
import { SkillDefinitions } from '../../src/core/blitzkrieg/skillDefinitions';
2024-02-05 13:33:23 -06:00
import { superCompress } from '../../src/core/blitzkrieg/superCompress';
2023-12-12 15:12:09 -06:00
import {
2024-02-16 21:07:48 -06:00
Crew,
2024-02-16 10:20:20 -06:00
CrewMember,
2023-12-14 22:19:01 -06:00
GunDefinition,
2023-12-12 15:12:09 -06:00
ShellType,
2023-12-17 20:47:30 -06:00
TankDefinitionPrice,
2023-12-14 22:19:01 -06:00
TankDefinitions,
2023-12-05 17:36:18 -06:00
Tier,
2024-01-07 20:07:45 -06:00
} from '../../src/core/blitzkrieg/tankDefinitions';
2024-02-20 11:21:01 -06:00
import { DATA, POI } from './constants';
2024-03-31 18:24:19 -05:00
import { Avatar } from './skillIcons';
2024-01-28 20:45:50 -06:00
import { TankParameters } from './tankIcons';
2023-12-04 10:13:14 -06:00
2024-01-07 20:07:45 -06:00
interface Strings {
[key: string]: string;
2023-12-12 13:40:58 -06:00
}
2023-12-12 15:12:09 -06:00
type ShellKind =
| 'ARMOR_PIERCING'
| 'ARMOR_PIERCING_CR'
| 'HIGH_EXPLOSIVE'
| 'HOLLOW_CHARGE';
type ShellDefinitionsList = Record<
string,
{
id: number;
userString: string;
icon: string;
kind: ShellKind;
caliber: number;
damage: { armor: number; devices: number };
normalizationAngle: number;
ricochetAngle: number;
2024-01-20 13:43:03 -06:00
explosionRadius?: number;
2023-12-12 15:12:09 -06:00
}
> & {
icons: Record<string, string>;
};
2024-01-28 19:06:38 -06:00
interface EngineDefinitionsList {
nextAvailableId: number;
ids: Record<string, number>;
shared: {
[key: string]: {
userString: string;
level: number;
fireStartingChance: number;
2024-02-08 10:58:03 -06:00
weight: number;
power: number;
2024-01-28 19:06:38 -06:00
};
};
}
2024-02-08 10:58:03 -06:00
export interface ChassisDefinitionsList {
nextAvailableId: number;
ids: Record<string, number>;
}
2024-01-09 18:35:42 -06:00
type VehicleDefinitionArmor = Record<
string,
number | { vehicleDamageFactor: 0; '#text': number }
>;
2024-03-13 23:23:06 -05:00
interface UnlocksInner {
cost: number;
'#text': number;
}
type Unlocks = {
[key in 'vehicle' | 'engine' | 'chassis' | 'turret' | 'gun']:
| UnlocksInner
| UnlocksInner[];
};
type UnlocksListing = Unlocks | undefined;
2023-12-12 13:40:58 -06:00
interface VehicleDefinitions {
2024-01-28 19:32:12 -06:00
invisibility: {
moving: number;
still: number;
firePenalty: number;
};
2024-02-16 10:20:20 -06:00
crew: Record<CrewMember, string | string[]>;
2024-02-05 12:57:03 -06:00
speedLimits: {
forward: number;
backward: number;
};
2024-01-25 12:20:34 -06:00
consumableSlots: number;
2024-01-25 13:10:20 -06:00
provisionSlots: number;
2024-03-13 18:50:08 -05:00
optDevicePreset: string | string[];
2023-12-31 19:26:08 -06:00
hull: {
2024-01-09 18:35:42 -06:00
armor: VehicleDefinitionArmor;
2024-01-03 18:52:22 -06:00
turretPositions: { turret: string };
turretInitialRotation?: { yaw: 0; pitch: 6.5; roll: 0 };
2024-01-27 19:06:02 -06:00
maxHealth: number;
2024-02-08 10:58:03 -06:00
weight: number;
2023-12-31 19:26:08 -06:00
};
2024-01-16 08:40:27 -06:00
chassis: {
[key: string]: {
2024-03-13 23:23:06 -05:00
unlocks: UnlocksListing;
2024-02-08 10:58:03 -06:00
weight: number;
terrainResistance: string;
2024-02-03 15:54:21 -06:00
rotationSpeed: number;
2024-04-01 19:05:55 -05:00
userString: string;
2024-02-03 15:54:21 -06:00
shotDispersionFactors: {
vehicleMovement: number;
vehicleRotation: number;
};
2024-02-08 11:09:33 -06:00
level: number;
2024-01-22 16:54:07 -06:00
hullPosition: string;
2024-01-16 08:40:27 -06:00
armor: {
leftTrack:
| number
| {
chanceToHitByProjectile: number;
chanceToHitByExplosion: number;
'#text': number;
};
rightTrack:
| number
| {
chanceToHitByProjectile: number;
chanceToHitByExplosion: number;
'#text': number;
};
};
};
};
2024-01-28 19:06:38 -06:00
engines: {
2024-03-13 23:23:06 -05:00
[key: string]: {
unlocks: UnlocksListing;
};
2024-01-28 19:06:38 -06:00
};
2023-12-12 13:40:58 -06:00
turrets0: {
[key: string]: {
2024-03-13 23:23:06 -05:00
unlocks: UnlocksListing;
2024-02-03 15:54:21 -06:00
rotationSpeed: number;
2024-02-08 10:58:03 -06:00
weight: number;
2024-01-28 19:32:12 -06:00
circularVisionRadius: number;
2024-01-27 19:06:02 -06:00
maxHealth: number;
2024-01-09 18:35:42 -06:00
armor: VehicleDefinitionArmor;
2023-12-12 13:40:58 -06:00
userString: number;
level: number;
yawLimits: string | string[];
2023-12-31 19:26:08 -06:00
gunPosition: string | string[];
2024-01-01 14:00:41 -06:00
models: { undamaged: string };
2024-01-28 20:45:50 -06:00
hitTester: {
collisionModel: string;
};
2023-12-12 13:40:58 -06:00
guns: {
[key: string]: {
2024-03-13 23:23:06 -05:00
unlocks: UnlocksListing;
2024-01-16 08:40:27 -06:00
armor: VehicleDefinitionArmor & {
gun?:
| number
| {
chanceToHitByProjectile: number;
chanceToHitByExplosion: number;
'#text': number;
};
};
2024-01-28 19:32:12 -06:00
invisibilityFactorAtShot: number | number[];
2023-12-14 22:19:01 -06:00
reloadTime: number;
2024-02-03 15:54:21 -06:00
aimingTime?: number;
shotDispersionRadius: number;
shotDispersionFactors?: {
turretRotation: number;
afterShot: number;
whileGunDamaged: number;
};
2023-12-12 13:40:58 -06:00
maxAmmo: number;
2024-01-02 20:17:10 -06:00
extraPitchLimits?: {
front?: string;
back?: string;
transition?: number | number[];
};
2023-12-12 13:40:58 -06:00
pitchLimits?: string | string[];
2023-12-14 22:19:01 -06:00
pumpGunMode?: boolean;
pumpGunReloadTimes?: string;
clip?: { count: number; rate: number };
2024-01-01 14:48:46 -06:00
models: { undamaged: string };
2023-12-12 13:40:58 -06:00
};
};
};
};
}
2024-01-07 20:07:45 -06:00
export interface VehicleDefinitionList {
[key: string]: {
id: number;
userString: string;
shortUserString?: string;
description: string;
price: number | { gold: ''; '#text': number };
sellPrice?: { gold: ''; '#text': number };
enrichmentPermanentCost: number;
notInShop?: boolean;
tags: string;
level: number;
combatRole?: Record<string, string>;
configurationModes: string;
};
2023-12-05 19:14:53 -06:00
}
2024-01-07 20:07:45 -06:00
interface TurretDefinitionsList {
nextAvailableId: number;
ids: Record<string, number>;
}
interface GunDefinitionsList {
nextAvailableId: number;
ids: Record<string, number>;
shared: {
[key: string]: {
2024-02-03 16:28:33 -06:00
rotationSpeed: number;
2024-02-08 10:58:03 -06:00
weight: number;
2024-02-03 15:54:21 -06:00
shotDispersionFactors: {
turretRotation: number;
afterShot: number;
whileGunDamaged: number;
};
aimingTime: number;
2024-02-16 09:48:57 -06:00
shotDispersionRadius: number;
2024-01-07 20:07:45 -06:00
userString: string;
tags: string;
level: number;
pitchLimits: string;
burst?: { count: number; rate: number };
clip?: { count: number; rate: number };
shots: {
[key: string]: {
speed: number;
piercingPower: string;
};
};
};
2023-12-06 10:17:42 -06:00
};
}
2023-12-05 19:14:53 -06:00
2024-01-16 16:58:00 -06:00
export interface OptionalDevices {
[key: string]: {
id: number;
userString: string;
description: string;
icon: string;
script: unknown;
display_params: unknown;
};
}
interface OptionalDeviceSlots {
presets: {
[key: string]: {
level0: OptionalDeviceSlotRow;
level1: OptionalDeviceSlotRow;
level2: OptionalDeviceSlotRow;
};
};
}
interface OptionalDeviceSlotRow {
2024-01-16 17:19:46 -06:00
[key: string]: { device0: string; device1: string };
2024-01-16 16:58:00 -06:00
}
2024-02-13 09:40:00 -06:00
export interface ConsumablesCommon {
2024-01-16 21:49:15 -06:00
[key: string]: {
id: number;
userString: string;
description: string;
icon: string;
category: string;
tags: string;
2024-01-25 13:10:20 -06:00
vehicleFilter?: {
2024-01-25 13:51:30 -06:00
include: { vehicle: ConsumablesVehicleFilter; nations?: string };
exclude?: { vehicle: ConsumablesVehicleFilter; nations?: string };
2024-01-16 21:49:15 -06:00
};
script: {
'#text': string;
automatic?: boolean;
2024-02-13 09:40:00 -06:00
cooldown: number;
2024-01-16 21:49:15 -06:00
duration?: number;
2024-02-13 09:40:00 -06:00
shotEffect?: string;
bonusValues?: { [key: string]: number };
} & Record<string, string>;
};
}
export interface ProvisionsCommon {
[key: string]: {
id: number;
userString: string;
description: string;
icon: string;
category: string;
tags: string;
vehicleFilter?: {
include: { vehicle: ConsumablesVehicleFilter; nations?: string };
exclude?: { vehicle: ConsumablesVehicleFilter; nations?: string };
};
script: {
'#text': string;
automatic?: boolean;
2024-01-16 21:49:15 -06:00
shotEffect?: string;
bonusValues?: { [key: string]: number };
} & Record<string, string>;
};
}
2024-01-25 13:51:30 -06:00
type ConsumablesVehicleFilter =
2024-01-16 21:49:15 -06:00
| { minLevel: number; maxLevel: number }
| { name: string }
| { extendedTags: string };
2023-12-12 15:12:09 -06:00
const blitzShellKindToBLitzkrieg: Record<ShellKind, ShellType> = {
ARMOR_PIERCING: 'ap',
2023-12-12 23:35:08 -06:00
ARMOR_PIERCING_CR: 'ap_cr',
2023-12-12 15:12:09 -06:00
HIGH_EXPLOSIVE: 'he',
2023-12-12 23:35:08 -06:00
HOLLOW_CHARGE: 'hc',
2023-12-12 15:12:09 -06:00
};
2024-01-16 21:49:15 -06:00
const missingStrings: Record<string, string> = {
'#artefacts:tungstentip/name': 'Tungsten Shells',
};
2024-04-08 22:04:50 -05:00
const botPattern = /^.+((tutorial_bot(\d+)?)|(TU(R?)))$/;
2024-01-16 21:49:15 -06:00
2024-01-25 13:10:20 -06:00
export async function definitions(production: boolean) {
2024-02-11 14:17:41 -06:00
console.log('Building definitions...');
2023-11-06 23:02:26 -06:00
2024-04-06 11:14:07 -05:00
const gameDefinitions: GameDefinitions = {
version: (await readStringDVPL(`${DATA}/version.txt.dvpl`))
.split(' ')[0]
.split('.')
.slice(0, 3)
.join('.'),
};
2023-12-31 19:26:08 -06:00
const tankDefinitions: TankDefinitions = {};
2024-01-02 20:17:10 -06:00
const modelDefinitions: ModelDefinitions = {};
2024-01-16 17:19:46 -06:00
const equipmentDefinitions: EquipmentDefinitions = {
presets: {},
equipments: {},
};
2024-01-16 21:49:15 -06:00
const consumableDefinitions: ConsumableDefinitions = {};
2024-01-25 13:10:20 -06:00
const provisionDefinitions: ProvisionDefinitions = {};
2024-03-31 18:24:19 -05:00
const skillDefinitions: SkillDefinitions = {
classes: { lightTank: [], mediumTank: [], heavyTank: [], 'AT-SPG': [] },
};
2024-01-16 16:58:00 -06:00
const nations = await readdir(`${DATA}/${POI.vehicleDefinitions}`).then(
2023-12-05 19:14:53 -06:00
(nations) => nations.filter((nation) => nation !== 'common'),
);
2024-01-16 21:49:15 -06:00
const tankStringIdMap: Record<string, number> = {};
2024-01-28 19:06:38 -06:00
const stringsPreInstalled = await readYAMLDVPL<Strings>(
2024-01-21 16:23:44 -06:00
`${DATA}/${POI.strings}/en.yaml.dvpl`,
2023-12-05 17:36:18 -06:00
);
2024-01-25 12:20:34 -06:00
const stringsCache = await fetch(POI.cachedStrings)
.then((response) => response.text())
.then((string) => parseYaml(string) as Strings);
2024-01-16 16:58:00 -06:00
const optionalDevices = await readXMLDVPL<{ root: OptionalDevices }>(
2024-01-16 17:19:46 -06:00
`${DATA}/${POI.optionalDevices}.dvpl`,
2024-01-16 16:58:00 -06:00
);
2024-01-28 19:06:38 -06:00
const strings = {
...stringsPreInstalled,
...stringsCache,
};
2024-01-16 16:58:00 -06:00
const optionalDeviceSlots = await readXMLDVPL<{
root: OptionalDeviceSlots;
2024-01-16 17:19:46 -06:00
}>(`${DATA}/${POI.optionalDeviceSlots}.dvpl`);
2024-02-13 09:40:00 -06:00
const consumables = await readXMLDVPL<{ root: ConsumablesCommon }>(
2024-01-17 11:34:27 -06:00
`${DATA}/${POI.consumablesCommon}.dvpl`,
2024-01-16 21:49:15 -06:00
);
2024-02-13 09:40:00 -06:00
const provisions = await readXMLDVPL<{ root: ProvisionsCommon }>(
2024-01-25 13:10:20 -06:00
`${DATA}/${POI.provisionsCommon}.dvpl`,
);
2024-03-31 18:24:19 -05:00
const avatar = await readXMLDVPL<{ root: Avatar }>(
`${DATA}/XML/item_defs/tankmen/avatar.xml.dvpl`,
);
2023-12-05 17:36:18 -06:00
2024-03-14 23:31:50 -05:00
const tankXps = new Map<number, number>();
2023-12-05 19:14:53 -06:00
await Promise.all(
nations.map(async (nation) => {
2023-12-12 13:40:58 -06:00
const tankList = await readXMLDVPL<{ root: VehicleDefinitionList }>(
2024-01-16 16:58:00 -06:00
`${DATA}/${POI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
2023-12-05 19:14:53 -06:00
);
2023-12-12 13:40:58 -06:00
const turretList = await readXMLDVPL<{
root: TurretDefinitionsList;
}>(
2024-01-16 16:58:00 -06:00
`${DATA}/${POI.vehicleDefinitions}/${nation}/components/turrets.xml.dvpl`,
2023-12-12 13:40:58 -06:00
);
const gunList = await readXMLDVPL<{
root: GunDefinitionsList;
}>(
2024-01-16 16:58:00 -06:00
`${DATA}/${POI.vehicleDefinitions}/${nation}/components/guns.xml.dvpl`,
2023-12-12 13:40:58 -06:00
);
2023-12-12 15:12:09 -06:00
const shellList = await readXMLDVPL<{
root: ShellDefinitionsList;
}>(
2024-01-16 16:58:00 -06:00
`${DATA}/${POI.vehicleDefinitions}/${nation}/components/shells.xml.dvpl`,
2023-12-12 15:12:09 -06:00
);
2024-01-28 19:06:38 -06:00
const enginesList = await readXMLDVPL<{
root: EngineDefinitionsList;
}>(
`${DATA}/${POI.vehicleDefinitions}/${nation}/components/engines.xml.dvpl`,
);
2024-02-08 10:58:03 -06:00
const chassisList = await readXMLDVPL<{
root: ChassisDefinitionsList;
}>(
`${DATA}/${POI.vehicleDefinitions}/${nation}/components/chassis.xml.dvpl`,
);
2023-12-05 19:14:53 -06:00
2023-12-12 13:40:58 -06:00
for (const tankKey in tankList.root) {
2024-04-08 22:04:50 -05:00
if (botPattern.test(tankKey)) continue;
2024-03-15 12:28:29 -05:00
const gunXps = new Map<number, number>();
const turretXps = new Map<number, number>();
const engineXps = new Map<number, number>();
const trackXps = new Map<number, number>();
2023-12-12 13:40:58 -06:00
const tank = tankList.root[tankKey];
2023-12-17 20:47:30 -06:00
const tankPrice: TankDefinitionPrice =
typeof tank.price === 'number'
? { type: 'credits', value: tank.price }
: { type: 'gold', value: tank.price['#text'] };
2023-12-12 13:40:58 -06:00
const tankDefinition = await readXMLDVPL<{ root: VehicleDefinitions }>(
2024-01-16 16:58:00 -06:00
`${DATA}/${POI.vehicleDefinitions}/${nation}/${tankKey}.xml.dvpl`,
2023-12-12 13:40:58 -06:00
);
2024-01-28 20:45:50 -06:00
const tankParameters = await readYAMLDVPL<TankParameters>(
`${DATA}/${POI.tankParameters}/${nation}/${tankKey}.yaml.dvpl`,
);
2023-12-31 19:26:08 -06:00
const turretOrigin = tankDefinition.root.hull.turretPositions.turret
.split(' ')
.map(Number) as Vector3Tuple;
2023-12-12 13:40:58 -06:00
const tankId = toUniqueId(nation, tank.id);
const tankTags = tank.tags.split(' ');
2024-01-09 18:35:42 -06:00
const hullArmor: ModelArmor = { thickness: {} };
2024-01-16 16:58:00 -06:00
const equipment = tankDefinition.root.optDevicePreset;
2024-01-16 21:49:15 -06:00
tankStringIdMap[`${nation}:${tankKey}`] = tankId;
2024-01-09 18:35:42 -06:00
Object.keys(tankDefinition.root.hull.armor)
.filter((name) => name.startsWith('armor_'))
.forEach((name) => {
const armorIdString = name.match(/armor_(\d+)/)?.[1];
if (armorIdString === undefined) {
throw new SyntaxError(`Invalid armor id: ${name}`);
}
const armorId = parseInt(armorIdString);
const armorRaw = tankDefinition.root.hull.armor[name];
if (typeof armorRaw === 'number') {
hullArmor.thickness[armorId] = armorRaw;
} else {
if (!hullArmor.spaced) hullArmor.spaced = [];
hullArmor.thickness[armorId] = armorRaw['#text'];
hullArmor.spaced.push(armorId);
}
});
2024-02-16 21:07:48 -06:00
const crew: Crew[] = [];
2024-02-22 10:56:45 -06:00
const fixedCamouflage = tankTags.includes('eventCamouflage_user');
2024-03-13 23:23:06 -05:00
const totalUnlocks: UnlocksListing[] = [];
2024-02-16 10:20:20 -06:00
Object.entries(tankDefinition.root.crew).forEach(([key, value]) => {
2024-02-16 21:07:48 -06:00
let entry: Crew;
const index = crew.findIndex(({ type }) => type === key);
if (index === -1) {
entry = { type: key as CrewMember };
crew.push(entry);
} else {
entry = crew[index];
}
2024-02-16 10:20:20 -06:00
if (typeof value === 'string') {
2024-02-16 21:07:48 -06:00
if (entry.count === undefined) {
entry.count = 1;
} else {
entry.count++;
}
if (value !== '') {
entry.substitute = value
.split('\n')
.map((member) => member.trim()) as CrewMember[];
}
2024-02-16 10:20:20 -06:00
} else {
2024-02-16 21:07:48 -06:00
if (entry.count === undefined) {
entry.count = value.length;
} else {
entry.count += value.length;
}
}
if (entry.count === 1) {
delete entry.count;
2024-02-16 10:20:20 -06:00
}
});
2024-01-02 20:17:10 -06:00
tankDefinitions[tankId] = {
2024-02-08 10:58:03 -06:00
id: tankId,
2024-02-22 10:56:45 -06:00
fixedCamouflage: fixedCamouflage ? true : undefined,
2024-02-16 10:20:20 -06:00
crew,
2024-02-08 10:58:03 -06:00
weight: tankDefinition.root.hull.weight,
2024-01-27 19:06:02 -06:00
health: tankDefinition.root.hull.maxHealth,
2024-02-05 12:57:03 -06:00
speed: {
forwards: tankDefinition.root.speedLimits.forward,
backwards: tankDefinition.root.speedLimits.backward,
},
2024-03-13 18:50:08 -05:00
equipment:
typeof equipment === 'string' ? equipment : equipment.at(-1)!,
2024-01-25 12:20:34 -06:00
consumables: tankDefinition.root.consumableSlots,
2024-01-25 13:10:20 -06:00
provisions: tankDefinition.root.provisionSlots,
2024-01-02 20:17:10 -06:00
name:
(tank.shortUserString
2024-01-28 19:06:38 -06:00
? strings[tank.shortUserString]
: undefined) ?? strings[tank.userString],
2024-02-03 15:54:21 -06:00
nameFull: strings[tank.userString],
2024-01-02 20:17:10 -06:00
nation,
2024-02-03 15:54:21 -06:00
treeType: tankTags.includes('collectible')
2024-01-02 20:17:10 -06:00
? 'collector'
: (typeof tank.price === 'number' ? false : 'gold' in tank.price)
? 'premium'
: 'researchable',
tier: tank.level as Tier,
2024-03-07 18:30:02 -06:00
class: tankTags[0] as TankClass,
2024-01-02 20:17:10 -06:00
testing: tankTags.includes('testTank') ? true : undefined,
price: tankPrice,
camouflage: {
still: tankDefinition.root.invisibility.still,
moving: tankDefinition.root.invisibility.moving,
2024-01-28 19:32:12 -06:00
onFire: tankDefinition.root.invisibility.firePenalty,
2024-01-02 20:17:10 -06:00
},
turrets: [],
2024-01-28 19:06:38 -06:00
engines: [],
2024-02-08 10:58:03 -06:00
tracks: [],
2024-01-02 20:17:10 -06:00
};
2024-02-03 15:54:21 -06:00
if (tankDefinitions[tankId].name === tankDefinitions[tankId].nameFull) {
delete tankDefinitions[tankId].nameFull;
2024-01-21 16:03:38 -06:00
}
2024-01-02 20:17:10 -06:00
modelDefinitions[tankId] = {
2024-01-09 18:35:42 -06:00
armor: hullArmor,
2024-01-02 20:17:10 -06:00
turretOrigin,
2024-01-03 18:52:22 -06:00
turretRotation: tankDefinition.root.hull.turretInitialRotation
? {
yaw: tankDefinition.root.hull.turretInitialRotation.yaw,
pitch: tankDefinition.root.hull.turretInitialRotation.pitch,
roll: tankDefinition.root.hull.turretInitialRotation.roll,
}
: undefined,
2024-01-28 20:45:50 -06:00
boundingBox: tankParameters.collision.hull.bbox,
2024-01-02 20:17:10 -06:00
turrets: {},
2024-02-08 10:58:03 -06:00
tracks: {},
2024-01-02 20:17:10 -06:00
};
2024-02-08 10:58:03 -06:00
Object.keys(tankDefinition.root.chassis).forEach((key) => {
const track = tankDefinition.root.chassis[key];
const trackId = toUniqueId(nation, chassisList.root.ids[key]);
const terrainResistances = track.terrainResistance
.split(' ')
.map(Number);
const trackArmorRaw = track.armor.leftTrack;
const hullOrigin = track.hullPosition
.split(' ')
.map(Number) as Vector3Tuple;
2024-03-13 23:23:06 -05:00
totalUnlocks.push(track.unlocks);
2024-02-08 10:58:03 -06:00
tankDefinitions[tankId].tracks.push({
id: trackId,
weight: track.weight,
2024-04-01 19:05:55 -05:00
name: strings[track.userString],
2024-02-08 10:58:03 -06:00
traverseSpeed: track.rotationSpeed,
dispersion: {
move: track.shotDispersionFactors.vehicleMovement,
traverse: track.shotDispersionFactors.vehicleRotation,
},
resistance: {
hard: terrainResistances[0],
medium: terrainResistances[1],
soft: terrainResistances[2],
},
2024-02-08 11:09:33 -06:00
tier: track.level as Tier,
2024-02-08 10:58:03 -06:00
});
modelDefinitions[tankId].tracks[trackId] = {
thickness:
typeof trackArmorRaw === 'number'
? trackArmorRaw
: trackArmorRaw['#text'],
origin: hullOrigin,
};
});
2024-01-28 19:06:38 -06:00
Object.keys(tankDefinition.root.engines).forEach((engineKey) => {
2024-03-13 23:23:06 -05:00
const engine = tankDefinition.root.engines[engineKey];
const engineListEntry = enginesList.root.shared[engineKey];
2024-01-28 19:06:38 -06:00
const engineId = toUniqueId(nation, enginesList.root.ids[engineKey]);
2024-03-13 23:23:06 -05:00
totalUnlocks.push(engine.unlocks);
2024-01-28 19:06:38 -06:00
tankDefinitions[tankId].engines.push({
id: engineId,
2024-03-13 23:23:06 -05:00
name: strings[engineListEntry.userString],
fireChance: engineListEntry.fireStartingChance,
tier: engineListEntry.level as Tier,
weight: engineListEntry.weight,
power: engineListEntry.power,
2024-01-28 19:06:38 -06:00
});
});
2024-01-02 20:17:10 -06:00
Object.keys(tankDefinition.root.turrets0).forEach(
(turretKey, turretIndex) => {
2023-12-12 13:40:58 -06:00
const turret = tankDefinition.root.turrets0[turretKey];
2024-01-01 14:48:46 -06:00
const turretModel = Number(
2024-01-25 12:20:34 -06:00
parsePath(turret.models.undamaged).name.split('_')[1],
2024-01-01 14:48:46 -06:00
);
2023-12-12 13:40:58 -06:00
const turretId = toUniqueId(nation, turretList.root.ids[turretKey]);
2023-12-17 20:47:30 -06:00
const turretYaw = (
typeof turret.yawLimits === 'string'
? turret.yawLimits
: turret.yawLimits.at(-1)!
)
.split(' ')
.map(Number) as [number, number];
2023-12-31 19:26:08 -06:00
const gunOrigin = (
typeof turret.gunPosition === 'string'
? turret.gunPosition
: turret.gunPosition[0]
)
.split(' ')
.map(Number) as Vector3Tuple;
2024-01-09 18:35:42 -06:00
const turretArmor: ModelArmor = { thickness: {} };
2024-03-13 23:23:06 -05:00
totalUnlocks.push(turret.unlocks);
2024-01-09 18:35:42 -06:00
Object.keys(turret.armor)
.filter((name) => name.startsWith('armor_'))
.forEach((name) => {
const armorIdString = name.match(/armor_(\d+)/)?.[1];
if (armorIdString === undefined) {
throw new SyntaxError(`Invalid armor id: ${name}`);
}
const armorId = parseInt(armorIdString);
const armorRaw = turret.armor[name];
if (typeof armorRaw === 'number') {
turretArmor.thickness[armorId] = armorRaw;
} else {
if (!turretArmor.spaced) turretArmor.spaced = [];
turretArmor.thickness[armorId] = armorRaw['#text'];
turretArmor.spaced.push(armorId);
}
});
2024-01-02 20:17:10 -06:00
tankDefinitions[tankId].turrets.push({
id: turretId,
2024-02-08 10:58:03 -06:00
traverseSpeed: turret.rotationSpeed,
2024-01-02 20:17:10 -06:00
name:
strings[turret.userString] ??
turretKey
.replaceAll('_', ' ')
.replace(/^(Turret ([0-9] )?)+/, ''),
tier: turret.level as Tier,
guns: [],
2024-01-27 19:06:02 -06:00
health: turret.maxHealth,
2024-02-03 15:54:21 -06:00
viewRange: turret.circularVisionRadius,
2024-02-08 10:58:03 -06:00
weight: turret.weight,
2024-01-02 20:17:10 -06:00
});
modelDefinitions[tankId].turrets[turretId] = {
2024-01-09 18:35:42 -06:00
armor: turretArmor,
2024-01-02 20:17:10 -06:00
gunOrigin,
model: turretModel,
yaw:
-turretYaw[0] + turretYaw[1] === 360
? undefined
: { min: turretYaw[0], max: turretYaw[1] },
guns: {},
2024-01-28 20:45:50 -06:00
boundingBox:
tankParameters.collision[
parsePath(turret.hitTester.collisionModel).name.toLowerCase()
].bbox,
2024-01-02 20:17:10 -06:00
};
Object.keys(turret.guns).forEach((gunKey, gunIndex) => {
2024-03-13 23:23:06 -05:00
const gun = turret.guns[gunKey];
2023-12-12 14:14:26 -06:00
const gunId = toUniqueId(nation, gunList.root.ids[gunKey]);
2024-01-10 17:36:11 -06:00
const gunListEntry = gunList.root.shared[gunKey];
2023-12-12 14:14:26 -06:00
const pitchLimitsRaw =
2024-03-13 23:23:06 -05:00
gun.pitchLimits ?? gunListEntry.pitchLimits;
2023-12-14 22:19:01 -06:00
const gunPitch = (
typeof pitchLimitsRaw === 'string'
? pitchLimitsRaw
: pitchLimitsRaw.at(-1)!
)
.split(' ')
.map(Number) as [number, number];
2024-01-01 14:48:46 -06:00
const gunModel = Number(
2024-03-13 23:23:06 -05:00
parsePath(gun.models.undamaged).name.split('_')[1],
2024-01-01 14:48:46 -06:00
);
2023-12-14 22:19:01 -06:00
const gunName =
2024-01-10 17:36:11 -06:00
strings[gunListEntry.userString] ?? gunKey.replaceAll('_', ' ');
2023-12-14 22:19:01 -06:00
const gunType =
2024-03-13 23:23:06 -05:00
'clip' in gun
? gun.pumpGunMode
2024-02-06 13:07:01 -06:00
? 'autoReloader'
: 'autoLoader'
2023-12-14 22:19:01 -06:00
: 'regular';
const gunReload =
2024-02-06 13:07:01 -06:00
gunType === 'autoReloader'
2024-03-13 23:23:06 -05:00
? gun.pumpGunReloadTimes!.split(' ').map(Number)
: gun.reloadTime;
2023-12-14 22:19:01 -06:00
const gunClipCount =
2024-03-13 23:23:06 -05:00
gunType === 'regular' ? undefined : gun.clip!.count;
2024-03-12 17:09:21 -05:00
const gunIntraClip =
2024-03-13 23:23:06 -05:00
gunType === 'regular' ? undefined : 60 / gun.clip!.rate;
const front = gun.extraPitchLimits?.front
? gun.extraPitchLimits.front.split(' ').map(Number)
2024-01-02 20:17:10 -06:00
: undefined;
2024-03-13 23:23:06 -05:00
const back = gun.extraPitchLimits?.back
? gun.extraPitchLimits.back.split(' ').map(Number)
2024-01-02 20:17:10 -06:00
: undefined;
2024-03-13 23:23:06 -05:00
const transition = gun.extraPitchLimits?.transition
? typeof gun.extraPitchLimits.transition === 'number'
? gun.extraPitchLimits.transition
: gun.extraPitchLimits.transition.at(-1)!
2024-01-02 20:17:10 -06:00
: undefined;
2024-01-09 18:35:42 -06:00
const gunArmor: ModelArmor = { thickness: {} };
2024-02-03 15:54:21 -06:00
const shotDispersionFactors =
2024-03-13 23:23:06 -05:00
gun.shotDispersionFactors ?? gunListEntry.shotDispersionFactors;
2024-04-13 10:36:13 -05:00
const maskName = `gun_${gunModel.toString().padStart(2, '0')}`;
const maskEnabled =
tankParameters.maskSlice?.[maskName]?.enabled ?? false;
let mask: number | undefined;
if (maskEnabled) {
const maskRaw = tankParameters.maskSlice![maskName]!;
mask = maskRaw.planePosition[1];
} else {
mask = undefined;
}
2024-01-09 18:35:42 -06:00
2024-03-13 23:23:06 -05:00
totalUnlocks.push(gun.unlocks);
Object.keys(gun.armor)
2024-01-09 18:35:42 -06:00
.filter((name) => name.startsWith('armor_'))
.forEach((name) => {
const armorIdString = name.match(/armor_(\d+)/)?.[1];
if (armorIdString === undefined) {
throw new SyntaxError(`Invalid armor id: ${name}`);
}
const armorId = parseInt(armorIdString);
2024-03-13 23:23:06 -05:00
const armorRaw = gun.armor[name];
2024-01-09 18:35:42 -06:00
if (typeof armorRaw === 'number') {
gunArmor.thickness[armorId] = armorRaw;
} else {
if (!gunArmor.spaced) gunArmor.spaced = [];
gunArmor.thickness[armorId] = armorRaw['#text'];
gunArmor.spaced.push(armorId);
}
});
2024-01-02 20:17:10 -06:00
tankDefinitions[tankId].turrets[turretIndex].guns.push({
id: gunId,
2024-02-08 10:58:03 -06:00
weight: gunListEntry.weight,
2024-02-03 16:28:33 -06:00
rotationSpeed: gunListEntry.rotationSpeed,
2024-01-02 20:17:10 -06:00
name: gunName,
2024-01-10 17:36:11 -06:00
tier: gunListEntry.level as Tier,
2024-01-02 20:17:10 -06:00
shells: [],
type: gunType,
reload: gunReload,
count: gunClipCount,
2024-03-12 17:09:21 -05:00
intraClip: gunIntraClip,
2024-01-28 19:32:12 -06:00
camouflageLoss:
2024-03-13 23:23:06 -05:00
typeof gun.invisibilityFactorAtShot === 'number'
? gun.invisibilityFactorAtShot
: gun.invisibilityFactorAtShot.at(-1)!,
aimTime: gun.aimingTime ?? gunListEntry.aimingTime,
2024-02-03 15:54:21 -06:00
dispersion: {
2024-02-16 09:48:57 -06:00
base:
2024-03-13 23:23:06 -05:00
gun.shotDispersionRadius ??
2024-02-16 09:48:57 -06:00
gunListEntry.shotDispersionRadius,
2024-02-03 15:54:21 -06:00
damaged: shotDispersionFactors.whileGunDamaged,
shot: shotDispersionFactors.afterShot,
traverse: shotDispersionFactors.turretRotation,
},
2024-01-02 20:17:10 -06:00
} as GunDefinition);
modelDefinitions[tankId].turrets[turretId].guns[gunId] = {
2024-01-09 18:35:42 -06:00
armor: gunArmor,
2024-01-02 20:17:10 -06:00
model: gunModel,
2024-04-13 10:36:13 -05:00
mask,
2024-02-08 11:08:22 -06:00
thickness:
2024-03-13 23:23:06 -05:00
gun.armor.gun === undefined
2024-01-16 08:40:27 -06:00
? 0
2024-03-13 23:23:06 -05:00
: typeof gun.armor.gun === 'number'
? gun.armor.gun
: gun.armor.gun['#text'],
2024-01-02 20:17:10 -06:00
pitch: {
min: gunPitch[0],
max: gunPitch[1],
front: front
? {
min: front[0],
max: front[1],
range: front[2],
}
: undefined,
back: back
? {
min: back[0],
max: back[1],
range: back[2],
}
: undefined,
transition,
},
};
2024-01-10 17:36:11 -06:00
Object.keys(gunListEntry.shots).forEach((shellKey) => {
const gunShellEntry = gunListEntry.shots[shellKey];
2023-12-12 15:12:09 -06:00
const shell = shellList.root[shellKey];
const shellId = toUniqueId(nation, shell.id);
2023-12-14 22:19:01 -06:00
const shellName =
strings[shell.userString] ?? shellKey.replaceAll('_', ' ');
2024-01-10 17:36:11 -06:00
const penetrationRaw = gunShellEntry.piercingPower
.split(' ')
.filter((penetrationString) => penetrationString !== '')
.map(Number);
2023-12-12 15:12:09 -06:00
2024-01-02 20:17:10 -06:00
tankDefinitions[tankId].turrets[turretIndex].guns[
gunIndex
].shells.push({
2023-12-12 15:12:09 -06:00
id: shellId,
2023-12-14 22:19:01 -06:00
name: shellName,
2024-01-10 17:36:11 -06:00
speed: gunShellEntry.speed,
2023-12-12 15:12:09 -06:00
damage: {
armor: shell.damage.armor,
2024-01-27 19:06:02 -06:00
module: shell.damage.devices,
2023-12-12 15:12:09 -06:00
},
caliber: shell.caliber,
normalization: shell.normalizationAngle,
ricochet: shell.ricochetAngle,
type: blitzShellKindToBLitzkrieg[shell.kind],
explosionRadius:
shell.kind === 'HIGH_EXPLOSIVE'
? shell.explosionRadius ?? 0
: undefined,
2023-12-12 23:35:08 -06:00
icon: shell.icon,
2024-01-10 17:36:11 -06:00
penetration:
penetrationRaw[0] === penetrationRaw[1]
? penetrationRaw[0]
: [penetrationRaw[0], penetrationRaw[1]],
2024-01-02 20:17:10 -06:00
});
2023-12-12 15:12:09 -06:00
});
2023-12-12 14:14:26 -06:00
});
2023-12-12 13:40:58 -06:00
},
);
2024-03-13 23:23:06 -05:00
totalUnlocks.forEach((unlocks) => {
if (unlocks === undefined) return;
2024-03-14 23:31:50 -05:00
2024-03-13 23:23:06 -05:00
Object.entries(unlocks).forEach(([key, value]) => {
(Array.isArray(value) ? value : [value]).forEach((vehicle) => {
2024-03-14 23:31:50 -05:00
switch (key as keyof Unlocks) {
case 'vehicle': {
const tankListEntry = tankList.root[vehicle['#text']];
const currentTank = tankDefinitions[tankId];
const successorId = toUniqueId(nation, tankListEntry.id);
2024-03-13 23:23:06 -05:00
2024-03-14 23:31:50 -05:00
tankXps.set(successorId, vehicle.cost);
2024-03-13 23:23:06 -05:00
2024-03-14 23:31:50 -05:00
if (currentTank.successors === undefined) {
currentTank.successors = [];
}
if (!currentTank.successors!.includes(successorId)) {
currentTank.successors!.push(successorId);
}
break;
}
case 'gun': {
gunXps.set(
toUniqueId(nation, gunList.root.ids[vehicle['#text']]),
vehicle.cost,
);
break;
}
case 'turret': {
turretXps.set(
toUniqueId(nation, turretList.root.ids[vehicle['#text']]),
vehicle.cost,
);
break;
}
case 'engine': {
engineXps.set(
toUniqueId(nation, enginesList.root.ids[vehicle['#text']]),
vehicle.cost,
);
break;
}
case 'chassis': {
trackXps.set(
toUniqueId(nation, chassisList.root.ids[vehicle['#text']]),
vehicle.cost,
);
break;
}
2024-03-13 23:23:06 -05:00
}
});
});
});
2024-03-15 12:28:29 -05:00
Object.values(tankDefinitions[tankId].turrets).forEach((turret) => {
turret.xp = turretXps.get(turret.id);
Object.values(turret.guns).forEach((gun) => {
gun.xp = gunXps.get(gun.id);
});
});
Object.values(tankDefinitions[tankId].engines).forEach((engine) => {
engine.xp = engineXps.get(engine.id);
});
Object.values(tankDefinitions[tankId].tracks).forEach((track) => {
track.xp = trackXps.get(track.id);
});
2023-12-05 19:14:53 -06:00
}
}),
);
2024-03-14 23:31:50 -05:00
Object.values(tankDefinitions).forEach((tank) => {
tank.xp = tankXps.get(tank.id);
});
2024-03-13 23:23:06 -05:00
Object.values(tankDefinitions).forEach((tank) => {
tank.successors?.forEach((predecessorId) => {
if (tankDefinitions[predecessorId].ancestors === undefined) {
tankDefinitions[predecessorId].ancestors = [];
}
if (!tankDefinitions[predecessorId].ancestors?.includes(tank.id)) {
tankDefinitions[predecessorId].ancestors?.push(tank.id);
}
});
});
2024-01-16 17:19:46 -06:00
Object.entries(optionalDevices.root).forEach(
([optionalDeviceKey, optionalDeviceEntry]) => {
if (optionalDeviceKey === 'nextAvailableId') return;
equipmentDefinitions.equipments[optionalDeviceEntry.id] = {
name: strings[optionalDeviceEntry.userString],
};
},
);
Object.entries(optionalDeviceSlots.root.presets).forEach(
([optionalDeviceSlotKey, optionalDeviceSlotEntry]) => {
if (optionalDeviceSlotKey === 'emptyPreset') return;
equipmentDefinitions.presets[optionalDeviceSlotKey] = Object.values(
optionalDeviceSlotEntry,
).map(
(level) =>
Object.values(level).map((options) => {
return [
optionalDevices.root[options.device0].id,
optionalDevices.root[options.device1].id,
];
}) as EquipmentRow,
2024-01-21 22:11:01 -06:00
) as EquipmentPreset;
2024-01-16 17:19:46 -06:00
},
);
2024-01-16 21:49:15 -06:00
Object.values(consumables.root).forEach((consumable) => {
consumableDefinitions[consumable.id] = {
id: consumable.id,
2024-02-13 09:40:00 -06:00
cooldown: consumable.script.cooldown,
duration: consumable.script.duration,
2024-01-16 21:49:15 -06:00
name:
strings[consumable.userString] ??
missingStrings[consumable.userString] ??
`Unknown ${consumable.id}`,
include: [],
};
2024-01-25 13:10:20 -06:00
const includeRaw = consumable.vehicleFilter?.include.vehicle;
const excludeRaw = consumable.vehicleFilter?.exclude?.vehicle;
2024-01-16 21:49:15 -06:00
2024-01-25 13:10:20 -06:00
if (includeRaw) {
if ('minLevel' in includeRaw) {
consumableDefinitions[consumable.id].include.push({
type: 'tier',
min: includeRaw.minLevel,
max: includeRaw.maxLevel,
});
} else if ('name' in includeRaw) {
consumableDefinitions[consumable.id].include.push({
type: 'ids',
ids: includeRaw.name.split(' ').map((key) => tankStringIdMap[key]),
});
} else throw new SyntaxError('Unhandled include type');
2024-01-25 13:51:30 -06:00
if (consumable.vehicleFilter?.include.nations) {
consumableDefinitions[consumable.id].include.push({
type: 'nation',
nations: consumable.vehicleFilter.include.nations.split(' '),
});
}
2024-01-25 13:10:20 -06:00
}
2024-01-16 21:49:15 -06:00
if (excludeRaw) {
consumableDefinitions[consumable.id].exclude = [];
if ('name' in excludeRaw) {
consumableDefinitions[consumable.id].exclude!.push({
type: 'ids',
ids: excludeRaw.name.split(' ').map((key) => tankStringIdMap[key]),
});
} else if ('extendedTags' in excludeRaw) {
consumableDefinitions[consumable.id].exclude!.push({
type: 'category',
2024-01-25 11:50:43 -06:00
categories: excludeRaw.extendedTags.split(
' ',
2024-01-25 13:10:20 -06:00
) as TankFilterDefinitionCategory[],
2024-01-16 21:49:15 -06:00
});
} else throw new SyntaxError('Unhandled exclude type');
2024-01-25 13:51:30 -06:00
if (consumable.vehicleFilter?.exclude?.nations) {
consumableDefinitions[consumable.id].exclude!.push({
type: 'nation',
nations: consumable.vehicleFilter.exclude.nations.split(' '),
});
}
2024-01-16 21:49:15 -06:00
}
});
2024-01-25 13:10:20 -06:00
Object.values(provisions.root).forEach((provision) => {
provisionDefinitions[provision.id] = {
id: provision.id,
name:
strings[provision.userString] ??
missingStrings[provision.userString] ??
`Unknown ${provision.id}`,
include: [],
};
const includeRaw = provision.vehicleFilter?.include.vehicle;
const excludeRaw = provision.vehicleFilter?.exclude?.vehicle;
if (includeRaw) {
if ('minLevel' in includeRaw) {
provisionDefinitions[provision.id].include.push({
type: 'tier',
min: includeRaw.minLevel,
max: includeRaw.maxLevel,
});
} else if ('name' in includeRaw) {
provisionDefinitions[provision.id].include.push({
type: 'ids',
ids: includeRaw.name.split(' ').map((key) => tankStringIdMap[key]),
});
} else throw new SyntaxError('Unhandled include type');
2024-01-25 13:51:30 -06:00
if (provision.vehicleFilter?.include.nations) {
provisionDefinitions[provision.id].include.push({
type: 'nation',
nations: provision.vehicleFilter.include.nations.split(' '),
});
}
2024-01-25 13:10:20 -06:00
}
if (excludeRaw) {
provisionDefinitions[provision.id].exclude = [];
if ('name' in excludeRaw) {
provisionDefinitions[provision.id].exclude!.push({
type: 'ids',
ids: excludeRaw.name.split(' ').map((key) => tankStringIdMap[key]),
});
} else if ('extendedTags' in excludeRaw) {
provisionDefinitions[provision.id].exclude!.push({
type: 'category',
categories: excludeRaw.extendedTags.split(
' ',
) as TankFilterDefinitionCategory[],
});
} else throw new SyntaxError('Unhandled exclude type');
2024-01-25 13:51:30 -06:00
if (provision.vehicleFilter?.exclude?.nations) {
provisionDefinitions[provision.id].exclude!.push({
type: 'nation',
nations: provision.vehicleFilter.exclude.nations.split(' '),
});
}
2024-01-25 13:10:20 -06:00
}
2024-02-16 23:08:20 -06:00
if (provision.script.bonusValues?.crewLevelIncrease !== undefined) {
provisionDefinitions[provision.id].crew =
provision.script.bonusValues?.crewLevelIncrease;
}
2024-01-25 13:10:20 -06:00
});
2024-03-31 18:24:19 -05:00
Object.entries(avatar.root.skillsByClasses).forEach(([tankClass, skills]) => {
skillDefinitions.classes[tankClass as TankClass] = skills.split(' ');
});
2024-01-21 00:01:32 -06:00
await commitAssets(
2024-01-03 18:52:22 -06:00
'definitions',
[
2024-04-06 11:14:07 -05:00
{
content: superCompress(gameDefinitions),
encoding: 'base64',
path: 'definitions/game.cdon.lz4',
},
2024-01-03 18:52:22 -06:00
{
2024-02-05 13:33:23 -06:00
content: superCompress(tankDefinitions),
encoding: 'base64',
2024-02-07 10:02:00 -06:00
path: 'definitions/tanks.cdon.lz4',
2024-01-03 18:52:22 -06:00
},
{
2024-02-05 13:33:23 -06:00
content: superCompress(modelDefinitions),
encoding: 'base64',
2024-02-07 10:02:00 -06:00
path: 'definitions/models.cdon.lz4',
2024-01-03 18:52:22 -06:00
},
2024-01-16 17:19:46 -06:00
{
2024-02-05 13:33:23 -06:00
content: superCompress(equipmentDefinitions),
encoding: 'base64',
2024-02-07 10:02:00 -06:00
path: 'definitions/equipment.cdon.lz4',
2024-01-16 17:19:46 -06:00
},
2024-01-16 21:49:15 -06:00
{
2024-02-05 13:33:23 -06:00
content: superCompress(consumableDefinitions),
encoding: 'base64',
2024-02-07 10:02:00 -06:00
path: 'definitions/consumables.cdon.lz4',
2024-01-16 21:49:15 -06:00
},
2024-01-25 13:10:20 -06:00
{
2024-02-05 13:33:23 -06:00
content: superCompress(provisionDefinitions),
encoding: 'base64',
2024-02-07 10:02:00 -06:00
path: 'definitions/provisions.cdon.lz4',
2024-01-25 13:10:20 -06:00
},
2024-03-31 18:24:19 -05:00
{
content: superCompress(skillDefinitions),
encoding: 'base64',
path: 'definitions/skills.cdon.lz4',
},
2024-01-03 18:52:22 -06:00
],
2024-01-20 21:35:36 -06:00
production,
2024-01-03 18:52:22 -06:00
);
2023-12-05 19:14:53 -06:00
}