SiegeEngineers / genie-rs

Rust libraries for reading/writing various Age of Empires I/II files.
https://docs.rs/genie
GNU General Public License v3.0
18 stars 9 forks source link

Converted Rise of Rome scenario fails to load in The conquerors #19

Closed Fhechene closed 4 years ago

Fhechene commented 4 years ago

I'm trying to convert a Rise of Rome scenario to a The Conquerors scenario. I've succesfully created a .scx file with genie-rs. When I tried to load the scenario in The Conquerors, it crashes. Trigger Studio is unable to load it. Agescx is unable to load it. So I'm kind of lost here. What could it be?

goto-bus-stop commented 4 years ago

genie-scx only converts the format of the scenario, the unit and terrain IDs are not changed; so it's possible that a "converted" scenario references a nonexistent unit, terrain, civ, etc, and that would crash the game. The structs in the genie_scx::convert module can be used to also convert terrain / unit IDs, but there is no simple 1:1 mapping from AoE1 units to AoE2 units, so I haven't made one for that.

(I had luck converting an aoe1 scn to scx and opening it in AoC, just all the unit IDs referred to different units, so there were like siege workshops everywhere instead of trees…but the game loaded ok)

It's possible that there is some format issue causing it as well. I think genie-rs doesn't have a RoR scenario in the test suite yet. Could you upload the original RoR scenario here?

Fhechene commented 4 years ago

I wouldn't mind having the units changed. I can use other tools to convert individual unit id's.
I once did a test: I created a map in RoR and placed EVERY unit in it and then I opened with The Conquerors, without issue. When some RoR maps fail to load, my guess is there is a combination of units or terrain and units that makes the game crash, but I guess we'll never know. The map is a stock map from a Rise of Rome stock campaign

El advenimiento de los hunos.zip

goto-bus-stop commented 4 years ago

Thanks! It definitely looks like a bug in the scenario writing code in this project. Doing cargo run --example inspectscx converted_scx.scx also crashes.

goto-bus-stop commented 4 years ago

The embedded AI file writing was wrong. I guess my test scenarios didn't have any AI files in them!