Is there a way to set how many times a god power can be cast?

Hello,

I’m playing around with making a mod that prevents casting god powers multiple times (ala the original aom) and found that setting the base cost to -1 works well enough and even accurately makes the icon red after it is used. Unfortunately, Atlanteans are the fly in my ointment as I want them to be able to cast their abilities a few times, but there doesn’t seem to be a way to currently. I’ve tried adding “< recharges >2< /recharges >” from the original game, but it is now deprecated. Has anybody found a workaround?

Thanks!

Edit: had to fix recharges formatting for it to work in forum

Hi there, I don’t know about modding, but I was able to replicate what you desire with map triggers using:

trGodPowerSetUseCount();

So my first thought is to try

<count>2</count>

If that doesn’t work, there’s also

<charges>2</charges>

or

<charge>2</charge>

Sorry if I couldn’t be of any help, I’ve only dabbled in map scripting so this is the best I got.

Editing to add: I don’t know how important this is for what you’re doing, but when setting up the triggers I had to set cost FIRST, and add the count SECOND. I had them set up the other way around at first and it didn’t work.

1 Like

Modding wise, you just need to not give recast or cost and it will be one time use.

If you want to give them a limited number of use, probably this


in a tech, at leats it"s my first guess

Don’t hesitate to come in the official discord to ask in modding channel, there are active people there

1 Like

Thank you, that is useful information that I plan to utilize later on when I’m modding scenarios. Will come in handy!

This led me to the right area, thank you! I checked out techtree.xml to see how I might utilize this and figured I’d place it where Zeus is granted his bolt power (to be able to quickly test it out). I used the Titan Gate power as a basis for how to structure the powermaxuses subtype. It updated the god power dots like in the original AoM, but only one was available.

After some tinkering, I decided to remove the powermaxuses subtype and just changed the amount granted to Zeus via the Archaic age, set cost to -1 in greek.godpowers and sure enough it works! This is perfect

Edit: For future reference, that screenshot is from the BANG! documentation in the game’s directory. A fantastic resource.