Help finding a byte in a haystack in Stellaris

S

slynide

What is cheating?
Joined
Mar 3, 2020
Messages
1
Hello everyone! I am new here and have been using Cheat Engine 7.0 to modify game data and behavior.

Recently, I hit a snag while attempting to modify a pausable real-time strategy game on Steam I had recently picked up called Stellaris. Most of the data that can be exploited for gaining a general advantage is pretty accessible, so I have no problems finding them. However, there is one piece of data, probably a boolean or a bitflag, that I am looking for. The data I'm referring to is set only once in the game's defines.txt:

ALLOW_EMPIRE_DESIGN_CHEATS = no

It is possible to set this to yes by creating a mod or altering the text file directly, but doing so changes the checksum and therefore disables Steam achievements and prevents you from playing multiplayer with others that do not have the same mod. When this value is set to yes, it allows you to create an empire and species with no restrictions, making it possible to add any number of traits to your species, for example. Essentially, what I'm trying to accomplish is setting this value, saved in memory, to yes after game launch, using Cheat Engine--without altering the game's core files. While I have no plans to play multiplayer using this, I wanted to create new, unique, somewhat balanced (but still stronger than the baseline) custom empires, and still be able to earn achievements while playing as them (or against them).

I have a background in programming with languages like Java, Lua, and C++, but I have only recently begun learning low-level languages, almost chiefly with the goal of modifying some of the games that I play. My working theory was that, upon launching, the game reads the line from text and saved the result, most likely as a byte or as part of a byte--although I also accepted it was possible that the option results in a cascade of operations rather than simply saving to a byte.

Because this particular code is not modifiable in-game after start up, I have had a lot of trouble finding this boolean. I've tried various techniques, with no success at all, except perhaps making progress towards discovering the true address of the byte in question (if there does exist such a byte anyways). Some of the things I have tried with Cheat Engine include finding the string ALLOW_EMPIRE_DESIGN_CHEATS directly (no such string could be found, and neither could finding variations of the array of bytes that the string represents, such as 41 00 4C 00 4C 00 4F 00 57 00 5F which stands for "A.L.L.O.W._"), checking for bytes that change when a button is pressed (I learned through debugging that a custom empire's spawn setting is either 0, 1, or 2; "spawn forbidden", "spawn allowed", and "spawn forced", respectively), wide-sweeping changes of bytes from 1's to 0's while using a mod that sets the value to yes (therefore possibly represented by a 1 somewhere in the bytecode) (typically this results either in a crash or nothing happening), and changing other values in defines.txt near the ALLOW_EMPIRE_DESIGN_CHEATS line (hoping that values in the defines would be mapped near each other in memory; curiously, I cannot find any of the changed values while attempting to use large, rare numbers that should be easy to find). I have even tried modifying some opcodes and the values found at the registers (with the help of breakpoints placed on opcodes of interest), with no success--the closest I've come to a possible solution enabled by changes to opcodes is the following opcode at stellaris.exe+B4FC7C in Stellaris version 2.5.1 (checksum 1fd6): jne stellaris.exe+B4FCB6 (it is preceded by test al,al). If there was a way I could intercept the data at the stage where it's being read (in order to save its address to modify later), I would explore that option, but I am not aware of any such method or tool that exists.

Basically, I've run out of options for finding the bytecode in question, and I have not yet learned about how to use other expert-level tools that Cheat Engine provides. I was hoping that, maybe, someone out there had already found the solution to my problem and I cannot find it. I'm already aware of cheat tables for the game made by Recifense and CompactDisc that would allow me to accomplish basically the same thing (ironman achievements with a modified checksum), but unfortunately they are not up to date. So, does anybody have tips, pointers (no pun intended), or advice in using Cheat Engine in order to find hard-to-find data? I hope the game is not too obscure...
 
Top