Deity Empires

Deity Empires

Not enough ratings
Modding tips
By Hade
Some Modding issues I've run across.
   
Award
Favorite
Favorited
Unfavorite
Modding your mod file
The game doesn't like you making changing to your mods. If you make a change then you need to unselect the mod, exit, relaunch, start a new game to make sure that your mod is not still active, exit, relaunch and then re-enable. The reason for start a new game is that even though I disabled my mod, when I started a new game, everything was still there as if it was modded. I could tell because I've changed some colors and the terrain was still the modded color.


Changing terrain colors
I would recommend changing colors as everything is green. If you do so you'll need to put the 2 files into your mod directory terrain_image.dat and terrain_image.dat. You can open both files in Notepad and then paste in whatever colors you like. They're all in Hex, just do a search and find a hexadecimal colors translation site.
For instance:
23=0xFFFF0000:0xFFFF0000:0xFFFF0000:0xFFFF0000:terrain light deciduous forest0.png:terrain light deciduous forest1.png:terrain light deciduous forest2.png.

I changed this because I couldn't tell the difference between the various levels of trees. I changed a few of the other colors to be able to actually see what's there.
Copy building command
Never use copybuilding for the 4 warehouses. If you do your game will end up hanging a couple of turns after building your new warehouse. Took me forever to figure it out. At which point I just don't use this command.
Changing resource amounts
Becareful when changing the amount of any resource.
A) If you go over 20 million on anything in a city, that will cause that resource to go into the negatives and stay there making your city useless.
B) On the world map, if anything goes over 20 million it will go into the negatives, then you have to wait until it's positive again. This is for gold and mana and will take whatever turns are needed to get back to positive.

I struggled with gold constantly rolling over, even with city tax rate = 0. I ended up changing all the buildings for zero gold and trade goods plus their efficiencies. Even modded out things like gold and such from the minerals file.

mineral=gold
imp_required=none
weighted_chance_occurs1 = 0
weighted_chance_occurs2 = 0
weighted_chance_occurs3 = 0
weighted_chance_occurs4 = 0
weighted_chance_occurs5 = 0
weighted_chance_occurs6 = 0
weighted_chance_occurs7 = 0
weighted_chance_occurs8 = 0
weighted_chance_occurs9 = 0

However you have the weights modded, prospectors do not follow this as stated in the game info. Also if you want to see some of the other minerals that are extremely rare you'll need to mod this as well. And you'll need to put in all 9 weights ot there won't be any effect

mineral=ancient world tree
imp_required=none
weighted_chance_occurs1 = 100
weighted_chance_occurs2 = 100
weighted_chance_occurs3 = 100
weighted_chance_occurs4 = 100
weighted_chance_occurs5 = 100
weighted_chance_occurs6 = 100
weighted_chance_occurs7 = 100
weighted_chance_occurs8 = 100
weighted_chance_occurs9 = 100

This mineral I've only seen it show up twice until I changed it. I didn't even know it existed until I found it once by accident.

Also ores can show up in forests where you can't build mines no matter what, is the reason for imp_required=none. I did try to add +mine to the forests, but the game didn't accept it, so ended up changing all the minerals to no improvement required to be able to actually collect it.

Update:
At some point after the last patch a change was implemented that allows you to go beyond 20 million. I got gold to go over 100 million.
Battle turns (and Mirror Image)
Modding the game for more time in dungeons.
A) Since the game only gives you 100 battle turns (settings) and then you must decide whether to cast a spell you want to or cast extent battle for 5 more turns. Every turn in a dungeon is a battle turn. To get around this you can either have a building give the spell Extend Battle or Give to spell to every unit.

building = Armory
description = Extend Battle
spell_awarded = Extend Battle
charges_awarded = 25
charges_awarded_fighting_units_only = 1
charges_awarded_increase_max_storage = 25

or

unit = Highmen Crusader
spell1 = Extend Battle

I change the description to whatever the building is giving in term of ability or spell.

The building or unit will still keep it's original stats plus the above. I also used Mirror Image. When I cast mirror image, plus extend battle, you can have infinite battle turns and along as the mirror unit has it as a spell and you've modded this spell:
spell = Extend Battle
mana_cost0 = 0

This way your mirrored units can stay stationary and cast extend battle every turn. I'll point out that if you automate battle or unit, that unit will cast Mirror Image to death and beyond. So it's good to make sure to grey it out (disable the spell) before going into battle otherwise what would normally take a few moments could take hours as all the mirrored units take their turns. You can still cast disabled unit spells if done manually.
Non-functioning codes
Some modding options in the modding section just down work or don't work as listed.

For example you can only give 1 ability or spell per building. Like the example above. If you add a second ability or spell it will get ignored. Also special_code4 or special_data4 just don't work. and some others. so keep an eye on that.
Making mistakes of any kind
If you mod a unit and make a mistake, that unit will never show up on the world map or as a hero.

Update:
I made a modding mistake and didn't even realize it was a mistake. As an example I gave already good unit alignment = good which caused the game to crash. Also I changed some good units to city_race = any and this also caused the game to randomly crash. It took forever to find this. After many crashes (usually when viewing my capital and then it started just on the map after about 20 turns), one crash report said game error unit.cpp. I took this as a problem with my unit files and not with by buildings file as I had thought it was.

At this point I always backup everything before changing anything. Be very careful when modding, error don't always reveal themselves. Usually the workshop will have an exclamation point, clicking on that will tell you if you have any errors. Unless it's a valid error like mine was.
Modding heroes
If you mod your game to have any unit as a hero, be careful as some might crash the game. Also baby dragons tend to show the most followed by some others if hireling_chance = 100 and if you don't add "alignment = any" then this unit will only be a hero unit for the neutral races and no other.

I believe it took over 10 games to actually see one Rock Behemoth, so a higher number then 100 might be needed.
Modding more buildings and the magical ores
You're only allowed to create a certain amount of buildings, however that was so long ago that I've forgotten how many it was. Around 200 I think.

I have found out thru error that you don't need the command "building=new" to make a new building. However if there is no position for it designated then it'll show up in the upper right hand corner of the screen. And if you do this to more then one then both will be in the exact same spot. So it's always good to add a position to everything.

building = new
newname = Artificer's Warehouse 1
description = Magical Ore Storage x 100k
image = mithril adamantium.png
building_prereq1 = Artificer's Warehouse
special_code1 = 23
special_data1 = 100000
special_code2 = 24
special_data2 = 100000
special_code3 = 6
special_data3 = 100
production_base_cost = 100000
pos_relative = Artificer's Warehouse
pos_x = 0
pos_y = 250

I'll also point out that I didn't want my warehouses to store all that Mithril and Adamantium. Since only the amount in whatever city you built your Artificer is used, so

building = Small Warehouse
special_code1 = 23
special_data1 = 0
special_code2 = 24
special_data2 = 0

The minimum you can have is 10. And I find it boring to be constantly moving Supply Wagons around collection and delivering everything since all that is manual boring work.
Random map & settings files
You may also want to mod the randommap or setting file.
Random map file
I modded it because I like to see the other biomes that never show up and I like lots of rivers and less woods to have to chop down every turn. And the world is covered in forests initially

Settings file
Lots to mod here, I mainly modded some things I just don't want to have to deal with like item vault. Even though your unit is wearing it, it's still in the item vault. Weird decision. I set mine to 100k, never have to worry about it again.
Modding experience
If you mod it to get lots of experince the game may crash when you're evolving units.

For example baby dragons. They evolve at level 5, if they level to lvl 15 in one turn the game may crash. Best for you to know how many levels they get initially from level 1. Let's say you know that the baby dragon will level 10 levels. On level 5 select something else (but not evolve) and on level 10 evolve it to a young dragon. This way the game won't crash.
Settlers, Workers and Cities.
I also got bored of constanyly looking into all my cities every turn to build either workers or settlers. And also since the AI never puts build points into settlers I made more spells for each race as follows (using dwarves as an example)

spell=new
newname=Summon Mountain Dwarf Settler
description=Summon Mountain Dwarf Settlers.
magic_school=2 (you have to do the correct school of each spell. See Below)
target_type=14
spell_level=0
mana_cost0=xxxx (whatever you want for mana cost)
summon_unit=Mountain Dwarf Settler
research_cost=0 (I wanted this spell immediately, but still has to be researched)
sort_order=1
cast_range0=0
damage_type=Arcane

spell=new
newname=Summon Mountain Dwarf Engineer
description=Summon Mountain Dwarf Engineers until you summon so many you get carpal tunnel and go cross-eyed and everyone else starves to death from the upkeep.
magic_school=2
target_type=14
spell_level=0
mana_cost0=xxxx
summon_unit=Mountain Dwarf Engineer
research_cost=0
sort_order=1
cast_range0=0
damage_type=Arcane

Failure to put in the right magic school can cause the game to crash. The game doesn't allow you to mix and match alignments when cities are involved. But it also doesn't care what alignment you summon in. For settlers this is very important, can't have an evil race summon in a good settler = instant game crash (tested this). I know the AI casts these spells from the various game crashes when I forgot to add the magic school. Makes for a more better game play instead of the AI relying on settler auto-build. My 100 cities vs the AI 5.
A few other things....
You can only mod what you're allowed to mod as listed in the modding section.

When modding, mod a little at a time and then test it.

Also I'll remind that some options don't work.

Spell modding is very limited. I tried to make a AE raise/lower terrain spell without any success and not for lack of trying.

You can essentially mod the game to be able to build heroes. I did this once, but unfortunately that computer is no longer available to me and it's notes.

Some other things....

Mercenary Appeal. Determines which mercenaries show up. This is also controlled by your settings file. I had my merc appearance set really high and it was a nightmare. Now I have it so that only heroes show up. However this is somewhat broken since after a certain amount of turns regular units start showing up.

I reply on mercs showing up since I can't cast summon hero due to game crashing.

This is all just for the base game. Don't play beta as that always crashes when chopping down forests and with this game that's what you mostly do.
Disclaimer
Not responsible for typos and potentially missing words or paragraphs. As I often make these mistakes and have given up on trying to fix them no matter how many times I read thru it.

Also I don't remember where the hell I got the tree image for this guide from.
1 Comments
robihoti 10 Dec, 2024 @ 2:46pm 
Thanks for this