Help with scenario conversion (FW/MGE->TOT)

Nightgoblin

Chieftain
Joined
Feb 9, 2017
Messages
29
Hi. Long time lurker here.
I'm trying to convert an old FW scenario named Alba de America by Jesús Balsinde into TOT format. First version will not use any TOT Patch Project features, nor will feature any changes over the original.
Progress so far:
I've used CivConverter to convert .scn file and changed *all* graphics and text files into TOT format (see pics attached). (Well, most, but they are all in correct formats.)
The problem:
After the first human turn (as Spanish), AI plays as Portuguese, and then the game (civ2.exe) crashes. (I'm playing on Linux under Wine with TOTPP 18.4).
The suspect here is "Build Transporter" order (see last image), as there is only one map, and no intermap transports defined. Multiple units have this order at game start and I assume it has something to do with conversion proces under CivConverter.
How do I remove Build Transporter order from many units in the game, preferably externaly, without going into cheat mode and re-creating the scenario as I want it to be identical to FW version? (Probably some sort of hex editing .scn, but what needs to be changed into what?)
Thanks.
 

Attachments

  • Screenshot_2022-03-20_17-16-30.png
    Screenshot_2022-03-20_17-16-30.png
    215.1 KB · Views: 65
  • Screenshot_2022-03-20_17-30-08.png
    Screenshot_2022-03-20_17-30-08.png
    21.1 KB · Views: 68
  • Screenshot_2022-03-20_17-16-52.png
    Screenshot_2022-03-20_17-16-52.png
    342.1 KB · Views: 64
  • Screenshot_2022-03-20_17-17-10.png
    Screenshot_2022-03-20_17-17-10.png
    361.3 KB · Views: 66
  • Screenshot_2022-03-20_17-28-03.png
    Screenshot_2022-03-20_17-28-03.png
    47.1 KB · Views: 63
The suspect here is "Build Transporter" order (see last image), as there is only one map, and no intermap transports defined. Multiple units have this order at game start and I assume it has something to do with conversion proces under CivConverter.

Good guess. Based on Catfish's Saved Game Format:

CivConverterError.png


This Lua code will fix your problem, but running it is the trick.

Code:
for unit in civ.iterateUnits() do if unit.order == 0x0B then unit.order == 0xFF end end

You could try this (I'm not completely sure it will work):
Change .scn file to .sav file.
Open the .sav file, start cheat mode, press CTRL+SHIFT+F3.
Copy above line of code into the console, and press Enter.
Save the game as a scenario again (from cheat mode). I think you'll need to Set the scenario name again before you do so.
 
Good guess. Based on Catfish's Saved Game Format:

View attachment 622823

This Lua code will fix your problem, but running it is the trick.

Code:
for unit in civ.iterateUnits() do if unit.order == 0x0B then unit.order == 0xFF end end

You could try this (I'm not completely sure it will work):
Change .scn file to .sav file.
Open the .sav file, start cheat mode, press CTRL+SHIFT+F3.
Copy above line of code into the console, and press Enter.
Save the game as a scenario again (from cheat mode). I think you'll need to Set the scenario name again before you do so.
Hi and sorry for the late reply. I did all of that (also, fixed a small typo: unit.order = 0xFF instead of unit.order == 0xFF, because you're assigning values, not comparing them) and it still kept crashing. I managed to narrow it down to corrupted tables inside of .SCN file as described in Catfish's conversion manual. The problem was, I didn't know how to fix it, until recently gapetit started posting in the forum again. This post was most helpful. Anyway, here is the scenario, fully converted to TOT format. It doesn't crash at the first turn (or any other hopefully) no more.
 

Attachments

  • AlbaTOT_beta.zip
    828.7 KB · Views: 19
Top Bottom