[MOD] Demigod Hercules Mod v0.1

An early version of my Demigod Hercules Mod can be found here:

https://1drv.ms/u/s!ApKmLPWB7R8xnWeV8nAz8niNpSeq?e=6aMHC1

 

v0.1changes :

- heroes can level up all the way to level 99, AI is functional even at very high levels

- towers and citadel have more hp and more hp regen, especially on the high structure hp setting

- more favor / achievement points after a game - note: this doesn't work online

- the Rook now has a smaller size

- screen shake removed for giants (CameraShake)

- added an extra tab with custom achievement items, only available to human players

- light towers of the Rook now stay up 10 times longer than before

70,858 views 23 replies
Reply #1 Top

Hi M_KIII,

I am pleasantly surprised to see that people are still modding this game. A friend of mine and i have recently started playing again and bein a programmer myself i was interested in modding. However i can not seem to find an active community anywhere? Nor can i find any documentation on modding DEMIGOD. So basically my questions are: 

1. Do you know of any active/semi-active (modding) communities?
2. Do you know of any documentation regarding the modding of DEMIGOD?

With best regards,
Soeplepel

Reply #2 Top

Here's v0.13a of the Demigod Hercules Mod:

https://1drv.ms/u/s!ApKmLPWB7R8xnWiXqrxTGBcCN5Mi?e=tJW5p6

 

Patch notes

10/31/2020 - version 0.13a:

- added a cheap achievement item with fast teleport

- added the possibility to add Skill Damage to items, should work with the following skills, though still untested for most skills:

Demon Assassin:

- Warp Strike

- Spine Attack

- Area Warp

 

Torch Bearer:

- Rain of Ice

- Fireball

- Fire Nova

- Circle of Fire

- Deep Freeze

 

Vampire:

- Bat Swarm

 

Edna:

- Pounce -> tested: works

- Heal

 

Rook:

- HammerSlam -> tested: works

- BoulderRoll

 

Oculus:

- Chain Lightning

- Blast Off

- Sacrifice

- Lightning Blast

 

Oak:

- Shield Heal

- Penitence

- Surge of Faith

 

Sniper:

- Snipe

- Mark of the Betrayer

- Angelic Fury Vengeance

 

 

10/26/2020 - version 0.12:

- added Dead Eye Sniper Gloves to the regular shop for Sniper builds, currently also works with melee Heroes

  note: very slow attack speed interferes with teleporting, it might be smart to pick up these gloves after increasing your attack speed

 

10/25/2020 - version 0.11:

- heroes can level up all the way to level 99, AI is functional even at very high levels

- towers and citadel have more hp and more hp regen, especially on the high structure hp setting

- more favor / achievement points after a game - note: this doesn't work in online matches

- the Rook now has a smaller size

- screen shake removed for giants (CameraShake)

- added an extra tab with custom achievement items, only available to human players

- light towers of the Rook now stay up 10 times longer than before

- added Architect Armor to the shop which is excellent for the Rook when going for light towers

- added Lethal Spiked Armor to the shop which is an improved version of the Armor of Vengeance

Reply #3 Top

Hi M_KIII,

I am pleasantly surprised to see that people are still modding this game. A friend of mine and i have recently started playing again and bein a programmer myself i was interested in modding. However i can not seem to find an active community anywhere? Nor can i find any documentation on modding DEMIGOD. So basically my questions are: 

1. Do you know of any active/semi-active (modding) communities?
2. Do you know of any documentation regarding the modding of DEMIGOD?

With best regards,
Soeplepel

 

Hi Soeplepel,

Are you by any chance living in the Netherlands like me?

As for your questions:

1. I don't know of any active or semi-active modding communities. 

2. I don't know of any documentation about Demigod modding, but you can download all mods out there and look at the files in the mod zip. If you have any tooling to compare files you can compare any file in the mod with the default / standard file in the dgdata.zip. I have unpacked the zip file in a my_dgdata_unpacked directory and just copy the file(s) I need into my mod directory. Note that the location of the file needs to be the same, i.e. my_dgdata_unpacked/lua/AIBrain.lua needs to be copied to the bindata\mods\<YourModName>\hook\lua\AIBrain.lue location.

Grtz,

MK_III

Reply #4 Top

Quoting M_KIII, reply 3


Hi M_KIII,



I am pleasantly surprised to see that people are still modding this game. A friend of mine and i have recently started playing again and bein a programmer myself i was interested in modding. However i can not seem to find an active community anywhere? Nor can i find any documentation on modding DEMIGOD. So basically my questions are: 

1. Do you know of any active/semi-active (modding) communities?
2. Do you know of any documentation regarding the modding of DEMIGOD?

With best regards,
Soeplepel

 

Hi Soeplepel,

Are you by any chance living in the Netherlands like me?

As for your questions:

1. I don't know of any active or semi-active modding communities. 

2. I don't know of any documentation about Demigod modding, but you can download all mods out there and look at the files in the mod zip. If you have any tooling to compare files you can compare any file in the mod with the default / standard file in the dgdata.zip. I have unpacked the zip file in a my_dgdata_unpacked directory and just copy the file(s) I need into my mod directory. Note that the location of the file needs to be the same, i.e. my_dgdata_unpacked/lua/AIBrain.lua needs to be copied to the bindata\mods\<YourModName>\hook\lua\AIBrain.lue location.

Grtz,

MK_III




Hi M_KIII,

How did you guess i'm from the netherlands :P 

1. Thats too bad but not a surprise as the game is quite old.

2.I checked everything except the dgdata.zip... Thanks for pointing me in the right direction.

We actually tried to play a LAN game with mods but this does not seem to work even though we had the same mod pack. So we're missing something there

With best regards,
Soeplepel



Edit: inside dgdata their is a folder lua which contains a mods.lua file. i've given it a quick glance and it looks to be the mod manager it self. But is also contains quite a bit of documentation on modding.  If this is info is new to you i hope it helps you in your future endeavours :)

Reply #5 Top

Hi Soeplepel,

I will check the mods.lua file inside the dgdata.zip out, thanks for the tip!

For the LAN game, first check if the mod works in Single player, for each of the players. Some old mods were designed for older versions of the game and do not work well with the most recent version of Demigod. Then check if everybody has only mod active. If you have multiple mods active at the same time, then you might run into trouble when one mod has changes in the same file as the other mod.

Good luck!

 

v0.14a (alpha version) of the Hercules Demigod Mod can be found here:

https://1drv.ms/u/s!ApKmLPWB7R8xnWlhLiEi8zcgYKqa?e=Gpn4ZF

 

The most recent changes are:

10/31/2020 - version 0.14a

- added the Great Mage Armor to the regular shop which has a Skill Damage aura

- added the Chaos Mage Boots to the regular shop which has Skill Damage

- added the Dragon Mage Gloves to the regular shop which has Skill Damage

 

Reply #6 Top

Hi M_Klll and Soeplepel.

1. I haven't recognized anyone from the old modding community being active. I developed an interest for modding myself (without having any earlier programming experience) but I don't know anyone else but you.

2. As for documentation, there's a few old forum posts that contain a lot of useful information.

This is a guide on creating items, by Exxcentric. The comments by user miriyaka are also very useful.
https://forums.demigodgame.com/376116/page/1/

See also here, about having logging enabled (though I haven't found out where to access the commandline yet...):
https://forums.demigodgame.com/399524/page/1/#2812347

On modding UI (which I haven't tried yet, so don't know how useful this is; link to example doesn't lead anywhere):
https://forums.demigodgame.com/369844/tutorial-how-to-create-a-new-window

On .dds-files (also haven't tried that):
https://forums.demigodgame.com/369682/tutorial-dds-image-files

On hooking so it's compatible with other mods (though I don't get the part about functions):
https://forums.demigodgame.com/368556/tutorial-how-to-hook

All of this I found in the old modding forums:
https://forums.demigodgame.com/forum/622/

I highly recommend looking through the files of well-made mods like BalanceMod, Uberfix, FavorMod, EnfosMod, etc. for examples. And, of course, you could check out the lua documentation in general.

 

I haven't had the chance to have a thorough look at your Hercules mod, but just from looking at the ability files, it's going to be incompatible with most other mods, since you take the whole file instead of just changing the part you want changed. And in the item files you can simply define the item you want to add and leave out all the other item definitions. That way, any changes that other mods make to those other items aren't overwritten by your mod.

It's awesome to see other people still interested in this. Maybe I can share a mod that I'd halted work on and get help by people who actually know how to program? :P

Schwiegerknecht

Reply #7 Top

Thanks Schwiegerknecht for the great feedback and interesting links! 

I will do my best to improve the modularity and code quality. 

If you'd like help on programming I can help you out as I'm quite an experienced programmer, though my lua programming experience is still very limited. 

Reply #8 Top

Hi,

I've done some refactoring. Here's v0.18a of the Hercules Demigod Mod: 

https://1drv.ms/u/s!ApKmLPWB7R8xnWsP6GwoWhXoFBCF?e=Ga1mY1

 

Recent changes

11/02/2020 - version 0.18a

- cleaned up all <Hero>_AIBlueprint.lua files

 

11/02/2020 - version 0.17a

- cleaned up Giant_Character.lua and Giant_R_Character.lua files so they are modular

- cleaned up Rook_Character.lua file so it is modular

 

11/01/2020 - version 0.16a

- cleaned up *_Items.lua files so they are modular

 

11/01/2020 - version 0.15a

- changed Dead Eye Sniper Gloves to deal a flat 2000 extra damage, but this only works for ranged attacks, increased the price

Reply #9 Top

Schwiegerknecht, Thats some great info. As for programming experience i'm in a similar boat as M_KIII having 10+ years programming experience (mostly java) and about 2 whole weeks of Lua experience.

At the moment i'm working on a mod which enables a player to reset their skills (incase you miss clicked or something) which seemed like a simple get into it mod but its been quite a struggle so hopefully the links you've provided are going to help me with that.

Second on the agenda is a money sharing system, often my teammate and i want to buy a citadel item but can only afford it if we would pool our money together.  This seems like a fun one to do but may throw off the money distribution balance in the game.

Anyway we're kinda highjacking this particular mod's thread maybe we could setup a general info thread or something

Reply #10 Top

Quoting Schwiegerknecht, reply 6

See also here, about having logging enabled (though I haven't found out where to access the commandline yet...):


You can create a shortcut to demigod.exe, when you look at the properties of the shortcut there is a target input field which will contain the path to the .exe file.  After that path you can put things like /skipintro /size 1920 1080 /showlog


For example:  "C:\Progam Files (x86)\Games\Demigod\bin/Demigod.exe" /skipintro /size 1920 1080 /showlog

Hope this helps!

Reply #11 Top

@M_KIII: I'm not sure how aware you are of this, but most of your new achievement items seems ridiculously overpowered to me ;) Or are some of them just for testing purposes/crazy games? Nice work, in any case.

@Soeplepel: Being able to reset skills is an interesting idea, since there's only so many skill points for so many abilities. I'm not sure I've read anything about something like that, though. If you want to pursue it I think it might be a good idea to limit the reset to only the last allotted skill point. I would think it's frustrating if the opponent suddenly changes all of their skills mid-game.

Quoting Soeplepel, reply 9

Anyway we're kinda highjacking this particular mod's thread maybe we could setup a general info thread or something

That's true. I'll make one :) EDIT: Done.

Quoting Soeplepel, reply 10

You can create a shortcut to demigod.exe, when you look at the properties of the shortcut there is a target input field which will contain the path to the .exe file. After that path you can put things like /skipintro /size 1920 1080 /showlog

Ooh, didn't know that. Awesome, thanks.

Reply #12 Top

@Schwiegerknecht: Some balancing is still needed, that's true. 

Reply #14 Top

Quoting M_KIII, reply 12

@Schwiegerknecht: Some balancing is still needed, that's true. 

Depends on what you're going for with your mod, I suppose. Considering how you've increased tower HP you might also want a possibility to boost power levels so games don't take ages (unless you want epic games). So for that purpose stronger items could be well suited. But then you'll have to be mindful of players' HP, so they don't die too easily.
Do you have something in mind for how the mod should look in the end / what your goals are?

Reply #15 Top

@Schwiegerknecht I started the mod just for fun. The first goal is to improve the code. After that the goal would be to add more diverse items and item properties for longer games, like the skill damage.

Reply #18 Top

Say, m_KIII, how did you add the Skill Damage Multiplier? I'd like to use that for an item in a new balance mod, but either I'm making some simple stupid mistake or I've missed something that you did to make it work. So far I've found this in your Hercules mod:

In ForgeUnit.lua in function OnCreate you added: self.SkillDamageMult = 1
And:

GetSkillDamageMult = function(self)
return self.SkillDamageMult
end

And in BuffAffects.lua you only added:

function SkillDamageMult( unit, buffName )
    local val = BuffCalculate(unit, buffName, 'SkillDamageMult'1)
    unit.SkillDamageMult = val
end

EDIT: I had forgotten you also modifed all Ability-files. Turns out the skill damage was the purpose. I'll just take TB's Fireball as example to see if I actually understand correctly what happens.

local tempFireball = Fireball

function Fireball(abilityDef, unit, params)
    local abilityDefCopy = table.copy(abilityDef)
    abilityDefCopy.DamageAmt = abilityDefCopy.DamageAmt * unit.SkillDamageMult
    return tempFireball(abilityDefCopy, unit, params)
end

So... The Fireball-function that was originally in the HEMA01_Abilites.lua gets assigned into tempFireball. The actual Fireball function that's called while using the skill in-game is overwritten with the new Fireball-function we have here. You create a copy of the ability definitions, and then modify the amount of Damage with SkillDamageMult, all within that copy. And lastly you pass that copy to the original function (now tempFireball), since the new Fireball function wouldn't do much otherwise. Correct?
Do you think there's any way to implement the Damage Multiplier at a more basic level, without having to modify every single ability? But then I guess you'd have to modify all the basic functions like DealDamage(data,target) or PassDamageData(unit,damageTable). I don't even know where those are defined.

I'm also wondering if it's possible to access single functions within the ForgeUnit class without just overwriting the whole class.

EDIT: By the way, just checked the log. It complains "WARNING: 00:00:49: *AI DEBUG: No priority set for item [...]" for DragonMageGloves, DeadEyeSniperGloves, GreatMageArmor, LethalSpikedArmor, ArchitectArmor, ChaosMageBoots. And it warns about all the duplicate abilities and buffs that it detects. I don't know if it's advisable to delete the copy of the abilityTables after calculating the SkillDamageMult.

Reply #19 Top

Okay so i love this game but always new it could be better and im trying to add these mods but i have no coding experience nor do i have any idea what to do to add mods into the code, help would be greatly appreciated. thank you in advance   

Reply #20 Top

In the end I quit updating the mod. The main reason was because I couldn't fix the many, many warnings in the log, like "WARNING: 00:00:49: *AI DEBUG: No priority set for item [...]" and because the game seemed more buggy, i.e. animation glitches, the more I added, even though the modifications itself seemed fine and should have no impact on the animation. 

Reply #21 Top

Do you think there's any way to implement the Damage Multiplier at a more basic level, without having to modify every single ability? 

I'm also wondering if it's possible to access single functions within the ForgeUnit class without just overwriting the whole class.

These are things I would like to know too. 

Reply #22 Top

Hi, 

Join the steam community: Demigod Players

There are also modders in there.

Cheers,

Zen_God