Workers & Resources: Soviet Republic

Workers & Resources: Soviet Republic

Vis statistikker:
tjoppen 20. juli 2021 kl. 2:31
How do I work out COST_RESOURCE_AUTO? Also computerized planning / cybernetics
Lately I've been parsing .ini files for buildings to try and build a Kantorovich-style linear program for planning the fastest way to achieve things in the game. For example the fastest way to nuclear power. The game is a useful toy economy since the in-natura costs of all means of production are readily available. I will also mention here that more elaborate toy economies is academically relevant, particularly in the field of cybernetics.

To minimize the drudgery of writing down the specs of each building, vehicle etc. I'm working on a Python script to parse the .ini files for me. WORKERS_NEEDED, PRODUCTION, CONSUMPTION, CONSUMPTION_PER_SECOND and COST_RESOURCE are straightforward enough. But COST_RESOURCE_AUTO is tricky since it is based on bounding box information. Has anyone figured out how to parse .bbox files, and how exactly building sizes correspond to costs?
< >
Viser 1-2 af 2 kommentarer
tjoppen 20. juli 2021 kl. 3:20 
For .bbox I have this tentative format that I just RE:d

u32 numshapes { //540 B per shape char shapename[512] //at least 29 (pasted__polySurfaceShape1430), lots of strcpy()-ish garbage and uninited memory u32 index //appears to increase by 1 per shape, starting from 0 float bbox[6] }
tjoppen 21. juli 2021 kl. 6:29 
I intend to write down some values from the game and RE what multipliers are used for work hours, cement, steel etc for all the autos. Not today though. For now, I refined the format to:

u32 numshapes; { //540 B per shape char shapename[512]; //at least 29 (pasted__polySurfaceShape1430), lots of strcpy()-ish garbage and uninited memory u32 index; //appears to increase by 1 per shape, starting from 0 float xmin; float ymin; float zmin; float xmax; float ymax; float zmax; }

Y is the vertical axis in the game's coordinate system. Some bboxes have zero volume because they're perfectly flat, like vehicle loading zones. A few even have negative volume, but they are named "" and are never used.
< >
Viser 1-2 af 2 kommentarer
Per side: 1530 50

Dato opslået: 20. juli 2021 kl. 2:31
Indlæg: 2