Skip navigation

To mod or not to mod

Forum NavigationHome > Forum Index > Hegemony > To mod or not to mod
Level 2 Human gamer
Alignment: True neutral
Posted on December 16, 2016 at 5:04 pm

How can I edit existing faction's attributes, buildings, unit's stats, etc.? I have downloaded files from https://pub.longbowgames.com/hegemony3/3.2/, edited files into whatever I wanted and put them in mods directory (Documents\Longbow Digital Arts\Hegemony III\Mods\my mod\Resources\Entities\). Then I activate mod in the game and nothing happens. Variables stays the same and nothing changes. What am I doing wrong?

Level 6 Extraplanar programmer
Alignment: Good
Posted on December 17, 2016 at 12:32 am

If you want to mod existing factions, you need to add modtechnique="replace" to the line that says <entity>. This lets the game know to replace the existing faction definition with the new one. Optionally, you could use modtechnique="merge" instead and only include the lines that you're changing instead of having all the data from the original file. Either way, you'll need to add a modtechnique.

Level 2 Human gamer
Alignment: True neutral
Posted on December 17, 2016 at 12:55 am

First things first. I am by no means an programmer or even modder :). I finished campagin few times already and to stir up a game a little bit I want to play around with mods. My skills are limited to editing simple files at best. Where exactly do I put this "modtechnique" line to replace whole factions, buildings or whatever I want to replace? I doubt that I have to put it in front of every line in every file of the mod?
Is that possible that you would make me an file with single faction and building edited so I can keep going on my own by looking on example?

Level 6 Extraplanar programmer
Alignment: Good
Posted on December 17, 2016 at 2:17 am

Oh, apologies, you had gone through enough steps correctly that I assumed an advanced skill level. You'll want to put the modtechnique in every file where you see it say <entity>, add it in just before the > so that it looks like <entity modtechnique="replace">. For example, if you wanted to modify the Histri's colour, you could replace like so:
<entity modtechnique="replace">
<class>faction</class>
<type>Histri</type>

<factiongroup>illyric</factiongroup>

<article>Factions::Histri</article>

<flag atlas="flags" sprite="histri"/>
<logo atlas="factions" sprite="histri"/>

<guicolour>#5398d9</guicolour>
<unitcolour>#5398d9</unitcolour>

<unitshield shieldtype="normal" atlas="shields" sprite="histri"/>
<unitshield shieldtype="peltast" atlas="shields" sprite="histri"/>
<unitshield shieldtype="sail" atlas="shields" sprite="histri"/>
<unitshield shieldtype="rectangle" atlas="shields" sprite="histri_rect"/>

<attribute attrtype="raiddamage" op="mult">0.75</attribute>
<attribute attrtype="speed" op="mult">0.1</attribute>
<attribute attrtype="maxmorale" op="mult">-0.15</attribute>
</entity>

You could also use "merge" to change only certain parts and not need to copy the entire file over. That would look like this.
<entity modtechnique="merge">
<class>faction</class>
<type>Histri</type>

<guicolour>#5398d9</guicolour>
<unitcolour>#5398d9</unitcolour>
</entity>

You will actually need to do this for every file of the mod. It's done this way so that people can replace and merge different things. If it helps, you don't need to have everything in different files; you could have a file that looks like
<entitygroup>
<entity modtechnique="merge">
<class>faction</class>
<type>Histri</type>

<guicolour>#5398d9</guicolour>
<unitcolour>#5398d9</unitcolour>
</entity>

<entity modtechnique="merge">
<class>faction</class>
<type>Rome</type>

<guicolour>#5398d9</guicolour>
<unitcolour>#5398d9</unitcolour>
</entity>

<entity modtechnique="merge">
<class>faction</class>
<type>Samnites</type>

<guicolour>#5398d9</guicolour>
<unitcolour>#5398d9</unitcolour>
</entity>
</entitygroup>
and that will edit the Histri, Rome AND the Samnites all in the same file. Just make sure it begins and ends with <entitygoup> and </entitygroup> like in my example.

If you need more examples, there are several uploaded at https://pub.longbowgames.com/hegemony3/mods/ (these are the example mods created for the tutorials we made on our steam forum a while back).

Hope this helps, let us know if you have any more questions!

Level 2 Human gamer
Alignment: True neutral
Posted on December 17, 2016 at 12:39 pm

I guess that I could have been more thorough but for some reason google couldn't dig up this "Tutorial Index". All I could find was some info on hegemony's gamepedia.
Thanks for help. I hope that with your post and these tutorials I'll be able to proceed on my own.