Jump to content
fantanoice

Does the game consider "load terrain" a cheat?

18 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Hi all, first time posting here. Big fan of SimCity 3000 from way back and recently picked up the GOG version. 

I'm wanting to do a challenge run where I start with my town completely underwater. I'd like to do this in a way that the game doesn't consider 'cheating', because that locks me out of certain buildings and achievements. I'm aware that the game considers "terrain up/down" as cheating, but I'm wondering if it's the same for "load terrain".

I essentially want to play the vanilla game, just with this wacky map idea.

If it "is" a cheat, how do you think I could go about doing this? I'd like to use the largest map, and manually covering it all water would be a huge pain. I obviously don't want to cheat for extra money to cover it all that way either. Has anyone managed to reverse engineer the ".sct" terrain files for the existing towns? 😅

  • Like 1

ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

I like games, tech and The Simpsons

Youtube | Twitch

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I first went with "Haha" (laughing) for my reaction to your post for the silliness of the concept, but then after reading again, I think I misunderstood this part:

20 minutes ago, fantanoice said:

I'm wanting to do a challenge run where I start with my town completely underwater.

I now suspect rather than building the town itself underwater, you mean the starting land is all under water and you'll pay to raise it as needed to then grow your town. (So I changed my reaction to "Like" since that is a cool idea.)

And in which case, I suspect Loading Terrain should be fine and not trigger the cheat flag. I'm following your topic to see how it goes.

  • Like 2

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    3 minutes ago, CorinaMarie said:

    I now suspect rather than building the town itself underwater, you mean the starting land is all under water and you'll pay to raise it as needed to then grow your town. (So I changed my reaction to "Like" since that is a cool idea.)

    Yes that's correct, start with the land underwater, and have to pay to raise it.

    • Like 2

    ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

    I like games, tech and The Simpsons

    Youtube | Twitch

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    5 minutes ago, fantanoice said:

    Yes that's correct, start with the land underwater, and have to pay to raise it.

    Caveat: It's been way, way too many years since I tinkered in 3000 so if I say something wrong or stupid, just let me know.

    I remember discovering the method to import from a grayscale image. Is that the same as "Load Terrain"? And if so, it seems very likely that would work without being considered a cheat. OTOH, what about making the grayscale so there is at least a tiny island where there's at least enough room to get something started which can make a tiny profit? From there your Sims have the ambition to expand and then you start raising the terrain.

    • Like 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    6 minutes ago, CorinaMarie said:

    I remember discovering the method to import from a grayscale image. Is that the same as "Load Terrain"? And if so, it seems very likely that would work without being considered a cheat.

    Yes, the "load terrain" and "greyscale image" methods are the same thing. It's when you open the command textbox (Ctrl+Shift+Alt+C), then type "load terrain [path_to_greyscale_image].bmp".

    The thing that makes me unsure is the "terrain up/down" commands apparently set the cheat flag. So, like, does that mean everything from the command box sets the flag? Or only specific things? I can't find any information about it online.

    If someone happens to know where the flag is in memory, then that would be one way to check. And if it does get set, could always write a Lua script to unset the flag. Just yeah, having to memory edit doesn't exactly feel like a vanilla playthrough.

     

    22 minutes ago, CorinaMarie said:

    OTOH, what about making the grayscale so there is at least a tiny island where there's at least enough room to get something started which can make a tiny profit?

    Appreciate the suggestion, though I have a pretty specific narrative in mind which requires the whole thing to start as water. 😅 I've seen AmbiguousAmphibian do a run similar to that, however.

     

    26 minutes ago, CorinaMarie said:

    From there your Sims have the ambition to expand and then you start raising the terrain.

    I'm not sure what you mean by this?

     

    • Like 1

    ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

    I like games, tech and The Simpsons

    Youtube | Twitch

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    3 minutes ago, fantanoice said:

    If someone happens to know where the flag is in memory, then that would be one way to check.

    It might be something we can isolate. In a previous topic I did find where the terrain heights were stored when comparing save files with a Hex Editor. With some trial and error we might be able to isolate that flag.

    Have you played around with Hex Viewers / Editors before? It's not difficult.

     

    5 minutes ago, fantanoice said:

    I have a pretty specific narrative in mind which requires the whole thing to start as water. 😅

    That's perfectly fine! So your interstellar spaceship had to crash on a water world with absolutely no land above sea level and for a little while y'all can float around, but must begin raising the land in order to survive long term. (or such)

     

    6 minutes ago, fantanoice said:

    I'm not sure what you mean by this?

    Just that there is the starting island and the Sims start to feel crowded and from there they decide to start raising more land from the seabed to expand on to. The ambition is their motivation to do so. (And it doesn't fit your scenario so we just ignore this suggestion.)

    • Like 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    4 minutes ago, CorinaMarie said:

    Just that there is the starting island and the Sims start to feel crowded and from there they decide to start raising more land from the seabed to expand on to. The ambition is their motivation to do so. (And it doesn't fit your scenario so we just ignore this suggestion.)

    Ah, I didn't realise you were making a narrative suggestion. All good :thumb:

    5 minutes ago, CorinaMarie said:

    It might be something we can isolate. In a previous topic I did find where the terrain heights were stored when comparing save files with a Hex Editor. With some trial and error we might be able to isolate that flag.

    Have you played around with Hex Viewers / Editors before? It's not difficult.

    I've done a few adjacent things, like low level programming and messing with Gameshark codes. So I can work the theory behind it, but haven't put it to practice. :P I've heard of people use CheatEngine for this kind of thing, but I don't know if there's a preferred tool for SC3K specifically.

    My understanding is you basically have the memory viewer open, do an action, then see what memory addresses change their values. Use that to isolate which address might contain the flag, then use a memory editor or script to change it to something else. *shrugs*

    • Like 1

    ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

    I like games, tech and The Simpsons

    Youtube | Twitch

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    11 minutes ago, fantanoice said:

    My understanding is you basically have the memory viewer open, do an action, then see what memory addresses change their values. Use that to isolate which address might contain the flag, then use a memory editor or script to change it to something else. *shrugs*

    Yep. That is it exactly.

    For the cheat flag, it should be even easier. We'd compare save files before and after. The reason it's easier is that save files are static. They do not change randomly, but live memory viewed thru the Cheat Engine can change based on other things the program is set to do. When checking live memory for changes you cannot be 100% certain the action you performed was the cause.

    So what we need is before and after copies of .sc3 saves where the after has the cheat flag set. We want the minimalist amount of changes so we hopefully only have a few address locations to test. We also need to know we can test that the flag is (or is not) set in the game. You mentioned certain things cannot be built if it is set so that could be the way to check for sure once we learn how to un-set it.


    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    12 hours ago, fantanoice said:

    I'm aware that the game considers "terrain up/down" as cheating, but I'm wondering if it's the same for "load terrain".

    Yes, "load terrain" is considered a cheat by the game. At least in the sense that it is registered as a cheat.

    Without knowing an affected building I can't check to see what SC3K considers cheating. But the game tracks the number of times cheat codes are used, and it looks like that info may be included in a screenshot.

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    14 hours ago, CorinaMarie said:

    So what we need is before and after copies of .sc3 saves where the after has the cheat flag set. We want the minimalist amount of changes so we hopefully only have a few address locations to test. We also need to know we can test that the flag is (or is not) set in the game. You mentioned certain things cannot be built if it is set so that could be the way to check for sure once we learn how to un-set it.

    Oh yeah that's a good idea. Have a save file from before using the command, then one after using the command, then compare the data.

    Is there a particular tool people use for this?

    3 hours ago, Null 45 said:

    Without knowing an affected building I can't check to see what SC3K considers cheating. But the game tracks the number of times cheat codes are used, and it looks like that info may be included in a screenshot.

    I'm not sure what you mean by 'affected building' and 'screenshot' here. Do you mean a snapshot of the save data?

    • Like 1

    ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

    I like games, tech and The Simpsons

    Youtube | Twitch

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    47 minutes ago, fantanoice said:

    I'm not sure what you mean by 'affected building' and 'screenshot' here.

    By 'affected building', I was asking for the name of a reward building that SC3K locks out if you cheat.

    The screenshot I was referring to appears to be part of a city sharing feature related to the now-inactive SC3K SimCity exchange. It looks like SC3K took a city screenshot and added some overlay text when uploading it to the exchange.

    2 hours ago, fantanoice said:

    Is there a particular tool people use for this?

    I use HxD Hex Editor, but there are plenty of alternatives. 

    I tried to perform a before/after comparison of the save data in a newly created city, but I got dozens of one byte differences. The simulation was paused the whole time, so I am not sure what is going on. Possibly the game is writing uninitialized memory to the save game.

    I had better luck dumping the individual records from the save game, TGI 0x430E2EE6, 0x530E2EE6, 0x00000000 holds the cheat code count. Unfortunately, you would have to parse the save game data to find the correct record, the 8-byte header is shared by a bunch of other records.

    • Like 2

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I've downloaded HxD, though not really sure how to use it yet. 

    I've opened my save files in Beyond Compare and like you, I'm seeing a lot of differences even with the Simulator paused. I'm guessing at least one of these values is the RNG progressing. I'm a bit stumped with what the other differences could be. The news ticker? It's always moving but I wouldn't expect it to have, like, positional data or anything like that in the save file.

    Here, "New City_connection_1" is a new city where I added a neighbour road connection. "New City_connection_2" is after I used the "let's make a deal" cheat. Additionally, the 'cheated' file (connection_2)'s save file is larger than the non-cheated one. 12 bytes larger.

    image.png.ceb8edbba5f76b37d00545fcf5116219.png

    image.png.59ba8c1a754c2e5fad3f6d337109c639.png

     

    Another comparison is my initial save file without doing anything, vs the connection_1 save file (the one with roads but not the cheat). The one with roads is 52 bytes larger than the initial save file, even without the cheat. This suggests to me that the save files are dynamic and therefore, the flag's memory address won't be the same across save files. :( Hopefully I'm wrong.

    image.png.8f094268d1974b596b78cde25bf6d862.png

    • Like 1

    ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

    I like games, tech and The Simpsons

    Youtube | Twitch

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    7 hours ago, Null 45 said:

    I use HxD Hex Editor, but there are plenty of alternatives. 

    That's the same one I use. *:ohyes:

     

    3 hours ago, fantanoice said:

    This suggests to me that the save files are dynamic and therefore, the flag's memory address won't be the same across save files. :( Hopefully I'm wrong.

    I doubt you are wrong. The save file has to grow as the city grows. However, since you only need to find it once in your water world and toggle it off that might narrow down where it's hiding. From that point on there would be no cheating so it's not like you have to keep searching and resetting. *;)

     

    7 hours ago, Null 45 said:

    I had better luck dumping the individual records from the save game, TGI 0x430E2EE6, 0x530E2EE6, 0x00000000 holds the cheat code count.

    This sounds way more useful than anything I can do with HxD.


    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    8 hours ago, CorinaMarie said:

    I doubt you are wrong. The save file has to grow as the city grows. However, since you only need to find it once in your water world and toggle it off that might narrow down where it's hiding. From that point on there would be no cheating so it's not like you have to keep searching and resetting. *;)

    Yeah, just sucks that it's not, like, *the* address that other people could use to switch it off in their game.

     

    16 hours ago, Null 45 said:

    I had better luck dumping the individual records from the save game, TGI 0x430E2EE6, 0x530E2EE6, 0x00000000 holds the cheat code count.

    I'm not sure what 'dumping the individual records' means here. Could you please elaborate?


    ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

    I like games, tech and The Simpsons

    Youtube | Twitch

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    12 minutes ago, fantanoice said:

    I'm not sure what 'dumping the individual records' means here.

    I can field this one a wee bit. *:)

    The TGI mentioned stands for Type-Group-Instance and it's some hexadecimal numbers to identify different parts of the save file. Like one TGI might be all the terrain heights per cell and another might be all the Ordinances and their status.

    In simple terms, think of them as different chapters in a non-fiction book where you'll find similar info all in the same place.

    Then by 'dumping' them it's pulling out the raw information, but with Null's trained eye looking for patterns or groups that make sense as being this or that kind of record.

    Ofc, he can explain it better, but that should point you in the right direction.

    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Oh, looks like this is something used across different Maxis games. Three hexadecimal values:

    - Type ID
    - Group ID
    - Instance ID

    I found these resources, though their documentation doesn't mention SimCity 3000 (earliest is SimCity 4). Going to assume it's the same structure while I take another look at my save files.

    https://www.wiki.sc4devotion.com/index.php?title=Type_Group_Instance

    https://www.wiki.sc4devotion.com/index.php?title=DBPF

    • Yes 1

    ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

    I like games, tech and The Simpsons

    Youtube | Twitch

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    54 minutes ago, fantanoice said:

    I'm not sure what 'dumping the individual records' means here. Could you please elaborate?

    I wrote a tool a while back to extract the contents of SC3K IXF files. Like they did for SC4, Maxis used the same code to read/write both the city save files and packed data files. SC3K's IXF (Database Indexed File) is a predecessor of the DBPF (Database Packed File) format used in SC4.

    From there I could compare the extracted records to see what the differences were. It turns out that SC3K writes the cheat count to its own record whenever it is not zero.

    I recently wrote another tool to reset the cheat count to zero.

    21 minutes ago, fantanoice said:

    I found these resources, though their documentation doesn't mention SimCity 3000 (earliest is SimCity 4). Going to assume it's the same structure while I take another look at my save files.

    Much less is known about SC3K's IXF format than SC4's DBPF format, but it uses a different structure. Not sure why it is less documented than SC4's DBPF format, perhaps SC3K never attracted the level of attention from modders that SC4 did. Even before Maxis released the BAT there were a lot of smart people tearing apart SC4's data files, see the various file format discovery threads on ST. Plus Maxis provided modders with documentation about some of the formats.

    • Like 1
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    59 minutes ago, Null 45 said:

    I recently wrote another tool to reset the cheat count to zero.

    1 hour ago, that is pretty recent! I'll have to check it out because that should be exactly what I need.

     

    1 hour ago, Null 45 said:

    Much less is known about SC3K's IXF format than SC4's DBPF format, but it uses a different structure. Not sure why it is less documented than SC4's DBPF format, perhaps SC3K never attracted the level of attention from modders that SC4 did. Even before Maxis released the BAT there were a lot of smart people tearing apart SC4's data files, see the various file format discovery threads on ST. Plus Maxis provided modders with documentation about some of the formats.

    Ah fair enough. I'm glad there are still some people around with IXF knowledge!

    • Like 1

    ezgif-633688e8d958db.gif.b99ef7098cdd58951984a873aa0eee8a.gif

    I like games, tech and The Simpsons

    Youtube | Twitch

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections