The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

Howto: Modding Lobby and Tournament Mode

A walkthrough

By on November 18, 2010 9:37:48 PM from Demigod Forums Demigod Forums


I have released a version of the .24 skirmish AI that will work in tournament mode, see this post:;2826092


This method can be used to mod anything in the game as it replaces the locked files with a modded archive. Tournament mode only uses the locked files, so normally you are unable to use game play mods in that mode.


The steps to create a mod for the UI/tournament mode are:

1.  Create a copy of and rename to any 6 character file name you like.  For a demo I have created and modified the auto-fill function in lua\ui\lobby\lobby.lua.

Edit any files you want to edit and add back the changed files to your custom zip file.


2. Copy the demigod exe in the demigod\bin folder and rename it to whatever you like.   For this demo i have named it Demigod_Demo.exe

Open the exe with a hex editor.  I did not have one on my machine and just downloaded a reasonably rated one from cnet downloads (

In the hex editor Search for and replace it with the name for your zip file.   This tells the exe to load your custom archive instead the default one.   Save the changes.



3.  Run the game, you will get a useful error message.  The game tries to verify it is loading the correct archive by comparing it to the expected MD5 hash key.   Copy the compiled MD5 string and search for that in the hex editor.


It should find the compiled MD5:



Copy the actual MD5 in the error message and click abort program.  Paste the actual MD5 over the old MD5 string and save the exe.


4.  Load up the game again and test your change:


The UI can be modded and if you apply mods that affect game play they will be active in tournament mode as well.   The built in mod manager only allows game play mods to apply to skirmish games, so this is a nice work around.



Some notes on this: 

I do not know if it works online. 

I have developed this work around for offline play. 

Whenever you change a file in your custom archive a new MD5 with need to be swapped in on your custom exe.  

Use the unmodded demigod exe in your bin folder or through impulse to run the game through the normal files. 


Uploaded with [URL=][/URL]
+48 Karma | 8 Replies
November 18, 2010 9:40:11 PM from Demigod Forums Demigod Forums

peppe - I'll check this out later tonight or tomorrow.  Glad to see you back in the modding game and looking forward to trying this out!  Thanks!

November 19, 2010 1:03:13 AM from Demigod Forums Demigod Forums


Having some fun tonight tweaking tournament mode with my skirmish AI.  It could probably use a full mod to let you set some or all the settings you can set in skirmish.  At a minimum i think a drop down for number of players 2-10 and number of rounds could be added.  Currently both of those are hard coded to 8, but the functions are already wired to accept other values.  I haven't messed with rounds, but the function looks like it would need victory condition set for rounds past 8 as there are 8 hard coded.   Looks like maps are similar, it randomly selects from the 8 available arenas, but removes them from its list after each is selected, so may error out past round 8 without modifications.  Players took a minor tweak and then worked with anything from 2-10.   

I will have to go lookup the skirmish UI pages to see how they do those dropdowns as this is the first chance to edit anything like that.


Going to try some tournaments with the AI's set to the same difficulty on each team.   Otherwise the human team ai's are just cannon fodder.  Also playing with starting cash as I would like to see the AI fight through the early game and not jump straight to mid game items.



November 19, 2010 1:08:55 AM from Demigod Forums Demigod Forums

Peppe - still haven't tried this out, but you can count on me for some testing support.  If you can come up with a way to make the ai a challenge for me, I am a HUGE fan.  Your ai is a substantial improvement over the existing ai, but I doubt poses much of a threat to any experience MP guy.  If my experience can help you create a more challenging ai, then I am all for it (though frankly, I think the core audience for your mod is just folks that play the game on lan against ai, etc). 

November 19, 2010 2:27:35 PM from Demigod Forums Demigod Forums

Hey - tested your stand alone version - works great and is very simple to use.  Good job. 

November 19, 2010 2:33:00 PM from Demigod Forums Demigod Forums

Oh - and I did a quick test - people can't join your game if you are the host and are using your skirmish mod (and they don't have it).  I'm curious to see if 2 players with your skirmish mod installed can join each other's games. 

November 20, 2010 11:57:37 AM from Demigod Forums Demigod Forums

Does it actually not throw a fit when you go online with this?  Obviously you can't play in any multiplayer game with a that differs from other players' copies, but I'm surprised it doesn't just re-update your Demigod.exe when you go to internet multiplayer with a modified executable.

Good work with this Peppe, even if the necessary method is a bit rough.  Now what we need is a way to mod the exe to use any files outside, or to re-activate its use of mount paths in RetailDataPath.lua (there's likely vestigial code in the executable for doing just that, but I'm not sure where or how to look).

November 20, 2010 12:16:38 PM from Demigod Forums Demigod Forums


Pacov can you script the first minute or so of your game? 


I've got an interesting thing cooking


First I am scripting the start a little bit by forcing the master goal to a value.


First 20 seconds - shop, most AI's finish shopping at about 18 seconds, figure 20 is safe.

First 40 seconds - capture flag,  this gets them moving right after shopping.


After that i have one override:

Anytime we are healthy and the enemy has more flags than we do, capture flags.


The current issue is at 20 seconds they all head to the closest flag for a battle royal.   So i have some tweaking to do in those functions.  

November 20, 2010 3:25:50 PM from Demigod Forums Demigod Forums

Pacov can you script the first minute or so of your game?

When you say script, are you asking me to just tell you exactly what I'd do (or are you asking me to tell you how the ai behaves, or how I'd like it to behave, or ?)?  The more you clarify, the more you will get exactly what you are looking for.  Happy to assist. 

Does it actually not throw a fit when you go online with this?

There is no fit in hosting a custom game, but folks simply cannot join.  I put a test game up, saw several folks trying to join my lobby, but they were unable to resolve a connection to me. 

Stardock Forums v1.0.0.0    #108435  walnut2   Server Load Time: 00:00:00.0000235   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright ?? 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. ?? 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.