• Register

You are a God! You are master and ruler of a loyal nation. You have unimaginable powers at your disposal. You have claimed this world as yours. But there are others who stand in your way. You must defeat and destroy these pretenders. Only then can you ascend to godhood and become the new Pantokrator. When you start the game you decide what kind of god you are and how your DOMINION affects your lands and followers. It is an expression of your divine might and the faith of your followers. If your dominion dies, so do you. Your dominion also inspires your sacred warriors and gives them powers derived from your dominion. In order to win and become the one true god you have to defeat your enemies one of three different ways: conquer their lands, extinguish their dominion or claim the Thrones of Ascension. Release version and manual is available now. Manual can be downloaded from Illwinter's web page.

Forum Thread
  Posts  
Modding Dom4 for newbies - first steps (Games : Dominions 4: Thrones of Ascension : Forum : Palace of Dreams - Modding : Modding Dom4 for newbies - first steps) Post Reply
Thread Options
Sep 29 2013 Anchor

Hello
I’ve used mods in games I like to play, but it’s been recently my interest in modding myself some of those games. Coding is something I’ver never done before (so I’m a newbie modder) but with some perseverance I’ve seen it’s possible to quickly learn and start moddin’ basic stuff that fits my own tastes. Forums are probably the best way to start for people who want to, at least, give it a try. That’s the way I started. Reading them have encouraged me in writing this post as a way to thank those folks. Parts of text are also taken from them :D and edited for the threading purpose: making the first steps in modding for newbies.

Introduction
Newbie is used for describing a newcomer or inexperienced and mod is for modification.
WIP means Work in Progress, for describing an unfinished work.
Vanilla is used for describing the original game - Also Known As - intended by developers. It’s what is going to be modified - AKA - modded.

FAQ
-So what is really a mod?
-It’s the changes to be introduced in the game, like a change in a setting or in a creature or adding a brand new nation.

-Is modding a legal stuff?
-Modding stuff like the described above it is. If you plan in modding something that yourself think it “might barely" be legal, then better go have a look at En.wikipedia.org and then ask.

-Is it dangerous?
-You will have easy access to stuff like the most powerful creatures you ever imagined, and other ones that might break with the lore created in the game. It’s your concern deciding if that is something dangerous or not

-I mean, is it dangerous FOR MY PC?
-The answer is ONLY if you don’t know what are you doing, and that's going to be explained now:

Mods that only require to copy some files in a certain place, usually in a folder called \mod or \mods are likely to be pretty safe. Those games are prepared to be modded. The game scans the folder, reads them and apply the changes. Easy and neat.

Other Mods may require other different operations to be followed in order for everything to work. Fortunately, this is not the case. So it's time to ...

Getting started
You have guessed that Dominions 4 is a game with a \mods folder. A lot of stuff can be modded this way. You can check it in the Manual for Modders. Get it at Jaffa.illwinter.com

When you take a quick look, you can imagine that you will need to put -the least- some effort on it. The truth is that the effort will be proportional to your modding intentions. So many pages show that there is lots of stuff to mod the game…that’s very good for people who likes to mod a lot of things, but if you plan in just small changes, then you may find all that overwhelming at first. That's why I'm describing first steps, hoping this can be of some use. But sooner or later you will be happy of having near the MM.

FIRST STEP. To know where the vanilla files are.
Vanilla files are split in two places in Windows 7 (so this may change in other OS like Linux or Mac):

A) like in “Appdata”. The Mods folder, Savegames and Map Editor folders are in a special folder that Windows makes use. The game key file is also here.
Open an explorer and type this

%appdata%

in the explorer bar to quick find Dominions4 ‘appdata’ folder.

C:\Users\NameUser\AppData\Roaming\Dominions4\

Note that this is a hidden folder and ‘Users’ and ‘NameUser’ may change...don't blame on me, I didn't do that.

B) Game Data folder, game Maps folder, and the executable file (dominions4.exe)
Open a explorer and look inside Desura folder. By default, try in ‘Program Files’ folder, or the folder you installed Desura.

C:\...\Desura\Common\dominions-4-thrones-of-ascensions

You might want to create a shortcut to these folders. I’ll refer to them as A) and B) respectively from now on.
You might also want to create a shortcut to dominions4.exe. You can add some commands for changing some default settings like: default resolution, renaming commanders on, score graphs on, or no credits on exiting. For example:

C:\... \Desura\Common\dominions-4-thrones-of-ascensions\Dominions4.exe -–1280x1024 --renaming --scoregraphs --nocredits -ddddd

-ddddd (one dash, five d) run a debug mode, that will display a “debug Mod” screen when a mod is enabled. It also creates a log.txt file in B) with a lot of information about last turn in the game. The utility of the data is not for a newbie, anyway it may help when trying mods.

SECOND STEP. How to install an already created mod.

If you plan to use already created mods, just download the mod and put the files in the \mods folder in A).
Open the game and go to Mods. Click on the mod in the modlist to enable. It’s in.
Remember that saves with mods might cause some trouble if you delete the mod and later try to load a moded savegame. Read more about it in the MM.

THIRD STEP. How to install a map.

Download a map, and put it in \maps folder in B).
When creating a new game, the map is in the maplist.

The game also offers a random map generator, with many custom options. You can play with them, and get the results saved in \maps in A). It consists of two files with same MapName. You can also edit that map with the game editor.
To play a game with that map, copy the 2 files with same MapName from \maps in A) to \maps in B) and run a new game.

FORTH STEP. How to make a mod.

To make dominions engine understand and accept the changes that you want to introduce, you’ll have to write a file with extension .dm in a code language that uses #commands.
A .dm file is a file that you can open with notepad and then edit, but I suggest to try notepad ++ portable as a better editor. Google it if you want to try.
To start from scratch, create a new text file, open it with notepad (or notepad++) and save it as, let's call ModTest.dm. Beware to not to save as ModTest.dm.txt -- If you have trouble with this, you still can download any mod like mine below, open it with notepad and delete all

So you have to open ModTest.dm with notepad and start coding….

Let’s create the first mod for a custom rule: limit gold and resources 75%
Copy/paste the following lines:

-- (2 dashes) are ignored -- it’s used as additional information
#modname "ModTest - limit gold and resources 75%"
#description "Mod intended for limiting gold and resources 75%"
-- 25% normal gold
#poppergold 400
-- 25% normal resources
#resourcemult 25

Now, save it as ModTest.dm (if you have not done that yet) and then copy that file in the \mods folder, in A)
Run dom4 and go to Mods, you will see Modtest there to be picked. Enable it by clicking.
Next game, play with resources at 100% in settings and you will receive only 25%.

The Last Step for this post, is a pretender chassis, a Dark Cyclops, that I’ve created with some further explanation, to be used as a newbie example rather than a playable mod. You can have a look at it here Dl.dropboxusercontent.com

Yes, The Dark Cyclops is pretty unfinished, it's still WIP. I'm not totally sure wich nation/s I want to add, or if I'll add a fully new nation, made of dark creatures for him to lead.

But now, it's your time. This is the very beggining. Get more mods, check again the manual, learn how to introduce #icon and sprites, dig, ask and let us know :D

Some places to go for next steps:
--
Illwinter.com
Dom3.servegame.com
Dom3minions.com
Z7.invisionfree.com?
Llamaserver.net
--
Thanks to Illwinter for developing and caring this awesome game,
to Desura for all good work on hosting so much appreciated
and to the folks in all Dominions forums for sharing their love for this game.
Have fun!

Edited by: Solosol

Sep 30 2013 Anchor

Did the units' IDs in Dom3 remained in Dom4? I ask because i want to download a mod called Worthy heroes which adds and modifies heroes of every nation

Sep 30 2013 Anchor

JEBEMLITI wrote: Did the units' IDs in Dom3 remained in Dom4? I ask because i want to download a mod called Worthy heroes which adds and modifies heroes of every nation

Not all of them. The authors of Worthy Heroes are working on it to make him up to dom4 IIRC.

Sep 30 2013 Anchor

JEBEMLITI wrote: Did the units' IDs in Dom3 remained in Dom4? I ask because i want to download a mod called Worthy heroes which adds and modifies heroes of every nation


The unit ID heroes seem to be same. However I would recommend not to use the dom3 version. New heroes gave been added to the base game which makes the dom3 version diasable them. I'm working on updating worthy heroes to dom4, but it will take a few weeks.

Also the dom3 heroes will have bugged abilities because the modding commands have changed.

Oct 6 2013 Anchor

Just wanted to say thank you for this info, yes it may be basic but it's exactly what I needed somewhere to start.

Many Thanks

Oct 6 2013 Anchor

I've been wondering where to go to find some really bare bones information on how to start from scratch with a Dominions mod and this is just great!

Sticky?

Oct 6 2013 Anchor

Awesome; thanks!

And yes, please sticky it!

Oct 8 2013 Anchor

Glad it helps!
Remember to share your creations and/or ask for ideas!
Edit: Thanks for stick ;)

Edited by: Solosol

Oct 9 2013 Anchor

Hi Solosol

Thanks anyway, will do

Edited by: Hully_M

Oct 9 2013 Anchor

Hi Hully_M Those are scriptable combat spells, but they are ignored and I don't know how to do them work sorry ^^
Maybe anyone has an idea and will help, but I think it's better you create a new thread to discuss it :)

Edited by: Solosol

Oct 16 2013 Anchor

Anyone know the command for reanimation bonus?

Oct 17 2013 Anchor

If it's not in the modding manual, it doesn't exist.

Oct 17 2013 Anchor

However, using #copystats on a unit that already has reanimation bonus should work. You will get all the other traits that unit has as well though.

Nov 28 2013 Anchor

I tried typing in p;pdata% into the explorer and even searched the entire computer directory but could not find anything. Any help with this?

Nov 28 2013 Anchor

It's very probably hidden if you haven't used it before.

You can get to it quite easily inside the game (Game Tools, then under Other at the bottom, Open User Data Directory), and then unhide it from there.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.