Tax Fix for Automation Empire

After taking my time playing Automation Empire and really loving it, I got to a point where the tax system really destroyed it for me. The way they designed it was that tax was based on 2% of lifetime earnings for the save game that you’re playing. They claim that this made players have to work consistently to expand their profitability and push to finish maps, but the general sentiment in the forums (and for me) is that it ruins the fun of taking your time and exploring what’s possible in the game. They claim there’s a reset in the algorithm, but it doesn’t actually work.

Ignoring the fact that they barely explain it, much like the rest of the game, the fact that you don’t find out about it until many hours in when your finances tank and you have to search the forums to understand exactly why all your money is disappearing without explanation other than “tax”.

This post is based on a thread on the steam community forums. It was a little light on the specifics and as my first use of dnSpy, I was impressed with how easy it was.

Download dnSpy from the Github releases page (I grabbed dnSpy-netcore-win64.zip) Extract dnSpy somewhere handy. It works fine from your Downloads dir or the desktop, no need to put it near the DLL in the game files directory like some other mods. The DLL is located in the steam app directory, for me it was C:\Program Files (x86)\Steam\steamapps\common\Automation Empire\AutomationEmpire_Data\Managed\Assembly-CSharp.dll. You’ll want to back up the file before you modify it. I just right clicked and added to a .7z file.

Open dnSpy, then open the DLL.

the file tree

Click on “Assembly-CSharp.dll” on the left, then press Ctrl-Shift-K to open the advanced search field.

Search for “CalculateTaxationValues” and hit enter.

searching

Double click on it to take you to the code.

the code for calculatetaxationvalues()

Press Ctrl-Shift-E to open the code, and edit the function so it looks like the below. This’ll set tax to zero. It’s a brute-force approach, but simple and doesn’t break things (so far).

private void CalculateTaxactionValues() {
    this._totalProfit += this._weeklyNoBonusIncome - this._currentRunningCost - this._currentTaxValue;
    **this**._currentTaxValue = 0;_
}

Now we need to edit UIUpdateMonthlyTaxDisplay() so it doesn’t show erroneous values.

Ctrl-Shift-K again, search for the function. double click the “Update” function.

UIUpdateMonthlyTaxDisplay search

Ctrl-Shift-E to get to the editor.

Old code:

private void Update() { 
    float num = Mathf.Round((float)Camera.main.transform.GetComponent<PowerConsumerManager>()._totalProfit * 0.08f); 
    if (num < 0f) { num = 0f; } 
        this._myElement.text = "$" + num.ToString("N0"); 
}

New function:

private void Update() { 
    float num = 0f; 
    this._myElement.text = "$" + num.ToString("N0"); 
}

Click Compile to update the code in place.

Click the file menu and hit Save module

Done! You should be able to play the game without the nightmarish and broken tax function killing all the fun.



#games #dotnet #csharp #mods