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.

  1. Download dnSpy from the Github releases page (I grabbed dnSpy-netcore-win64.zip)
  2. 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.
  3. 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.
  4. Open dnSpy, then open the DLL.
    the file tree
  5. Click on “Assembly-CSharp.dll” on the left, then press Ctrl-Shift-K to open the advanced search field.
  6. Search for “CalculateTaxationValues” and hit enter.
    searching
  7. Double click on it to take you to the code.
    the code for calculatetaxationvalues()
  8. 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;_
    }
    
  9. Now we need to edit UIUpdateMonthlyTaxDisplay() so it doesn’t show erroneous values.
  10. Ctrl-Shift-K again, search for the function. double click the “Update” function.

    UIUpdateMonthlyTaxDisplay search

  11. 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"); 
      	}
      
  12. Click Compile to update the code in place.

  13. 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 #c# #mods