Editing Building Cost Causes Bug

Modding, Map Editor, IES Scripting and Other Questions
Post Reply
cursedbrawler
Posts: 3
Joined: 11 Jul 2020, 23:44

Editing Building Cost Causes Bug

Post by cursedbrawler »

Hello fellow Empire Earth 2 fans! I hope someone is still active here and is able to help me out.

I wanted to do some balancing adjustments by editing the cost and building time of certain structures. To test out whether that is possible, I changed the required resources for an early game fortress to 3000 wood and 3000 stone (just test values). I did that by opening upgrade_unittypes.csv in db/TechTree. I opened the csv file with Excel and searched for FortressUpgradeEpoch1. There I changed the wood and stone values. I made a new zip file and replaced the standard db.zip with my custom one.

Now when I select a settler and try to build something, most structures are greyed out (their icons are replaced by some kind of placeholder image I think?). Also most structures dont cost anything at all and get built instantly. Does anyone know what might have gone wrong? Or did I miss a step/ edit the wrong file?

I would greatly appreciate it if anyone could help me out ^^

User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Editing Building Cost Causes Bug

Post by Dr.MonaLisa »

Hi.
I know those are .csv files, but Excel literally damages them. So we use Notepad++ to edit those files. Then that should not cause any bugs. So I'd recommend you to restore the original file, and re-attempt.

Also, do you use the Normal or Developers (or nothing at all) version of Unofficial Patch 1.5? I'm asking, because in the "Normal" version of UP1.5 mentioned files have a different name (upgrade_unittype5.csv and upgrade_unittype6.csv) and are stored in db_155.zip instead (it's for the multi-language support).
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
cursedbrawler
Posts: 3
Joined: 11 Jul 2020, 23:44

Re: Editing Building Cost Causes Bug

Post by cursedbrawler »

Thanks for the reply! I am going to try that out as soon as possible.

At first I was trying to use the Unofficial Patch 1.5 version. I tried modifying a few of the upgrade_unittype.csv files and noticed that only the upgrade_unittype5.csv in db_155.zip caused the bug. Editing the cost of buildings in the other csv files didn't really change anything as far as I noticed.
I figured the weird no cost bug was caused because I tampered with the wrong files, so I went back and installed vanilla Empire Earth 2 without any mods/patches. But then I got the same result when I edited the normal upgrade_unittype.csv

If I wanted to make the changes with UP 1.5 installed, do I need to make changes to both upgrade_unittype5.csv and upgrade_unittype6.csv?
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Editing Building Cost Causes Bug

Post by Dr.MonaLisa »

If you like the "Normal" version of UP1.5, then you need to remember to backup your changes, and modify after every update of UP1.5. It's because db_155.zip is always overwritten when checksum doesn't match. I know it might be harder for modding, but it solves all the problems with incorrect installations, crashes and errors in Multiplayer.
If you don't like (and don't use) new units, like Radar, Missile Defense, etc. you can try modding on the Developers Version of UP1.5: https://www.ee2.eu/patch/developers/
Then you would have new camera, compatibility with Windows 8 / 10, DirectX 9 and other important features, while game files structure remains unchanged. Updates of Developers Version don't overwrite db.zip files, so less risk.
In the "Normal" version of UP1.5 files "upgrade_unittype5.csv" and "upgrade_unittype6.csv" depend on option "Disable UP1.5 units, buildings...": https://www.ee2.eu/help/#disablefeatures (in UP1.5 Settings). So basically "5" is read when UP1.5 units are enabled, and "6" when they're disabled. So you might just need to edit 1 file, depending on your preferences. But then again, you can backup the whole "upgrade_unittype5.csv" which you modified, and then overwrite in db_155.zip after updates, but if an update modifies this file (it happens from time to time), and you overwrite it with an old version, you might experience lack of fixes, crashes and other unexpected issues.

No matter what, you should not use the Excel to modify those .csv files. It's known for years that it often "damages" those files by adding extra information. So should really consider re-attempting using Notepad++, even when it's harder to detect values and requires manual counting.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
cursedbrawler
Posts: 3
Joined: 11 Jul 2020, 23:44

Re: Editing Building Cost Causes Bug

Post by cursedbrawler »

I tried using Notepad and everything worked exactly like I envisioned.

I was using Excel because it was suggested in the brief modding tutorial here: http://ee.heavengames.com/new/ee2h/arti ... ing1.shtml
I guess in older versions Excel didn't mess with the csv files or something. Anyways, now it's time for me to spent countless hours with Empire Earth 2 again!

Thanks for the help and keep up the good work! ^^
User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Editing Building Cost Causes Bug

Post by Dr.MonaLisa »

Yes, it was posted on "July 15, 2005" (almost 15 years anniversary). I guess the old Excel version wasn't as bad as it is now.

With UP1.5 I keep the original costs and balance wherever possible (exception were useless HERCs and Tanks).

Have fun.
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
Post Reply

Return to “Questions”