Age of Mythology: Extended Edition

Age of Mythology: Extended Edition

Advance to the Steam Age
Explore modified graphics as well as new scenarios, maps, AI, and more! Ready to share your creations with the world? Upload right from the in-game mod manager.
DeuSJS 6 15 Jul, 2019 @ 2:50am
Making things attack faster
Is there any way to increase the rate at which the "damage ticks" caused by units attacking occur. I tried changing the rate of the attack action in the proto, but it didn't work. I thought I could try editing the attacking animation, but I'd like to make sure there are no other options before I do that.
< >
Showing 1-9 of 9 comments
Loggy 27 15 Jul, 2019 @ 3:08am 
Two things determine attack rates:

1) The length of the actual animation, usually the .brg file
2) Any overridden length specified in the anim files

Anim files are by far the easiest way to do this - by simply adding "length x.x" after the line that describes the anim file to use (visual or visualgranny). If memory serves, most villagers have anims with overrided lengths - though their files are pretty complicated compared to plenty of other units.
DeuSJS 6 15 Jul, 2019 @ 7:41pm 
Thanks for the help, I imagine that'll make it much easier to do what I'd like as I was dreading having change the animation itself. How do I know what the default length for the animation I'm trying to change is, though?
Last edited by DeuSJS; 15 Jul, 2019 @ 7:58pm
Callistonian 72 16 Jul, 2019 @ 2:15am 
The only way to know the default length is to open the animation in 3ds Max or Blender, etc. However, the number in the anim file ("length x") is only a multiplier so you don't really need to know the original animation length. Basically, if the original animation is 3 seconds and you put "length 2.0" in the anim file, the new animation will be 6 seconds long.

In theory, changing the animation length in the anim file (or in a 3D program) will not change the DPS done by the unit. However, there is some evidence to suggest this is not true for certain units. Certainly for special attacks that do a flat damage rate, increasing the frequency of the animation will increase DPS.
DeuSJS 6 16 Jul, 2019 @ 3:07am 
The value for length isn't a multiplier. It's a time value. I set the length of ulfsark starting attack to 1.0 and it attacked once every second, as opposed to the regular ulfsark, which attacked once every 0.7 seconds. Setting the toxote's attack animation length to 1.0 didn't change its attack speed, however, because it already attacks once every second. I'll try creating a compendium of the length of every animation in the game so that people don't need to go through the same pain as I am in the future.
Callistonian 72 16 Jul, 2019 @ 3:23am 
Interesting. Most animations are 1s so I had assumed it was a multiplier. The DPS should still remain the same for these types of units.
Loggy 27 16 Jul, 2019 @ 3:41am 
There are other ways to get the "natural" length of an anim besides exporting it:

1) Use the editor's anim browser, one of the fields displays the current anim length (arguably the easiest)
2) Mod your UI to include the text field {currentUnitCurrentAnimLength()} somewhere that supports them, then just select the unit doing the anim in question and have a read
3) For BRGs, the anim length is encoded in the 4 bytes at offset 40 (if you want to script something that works on these, this is useful)

For one-offs, 1) is definitely the nicest solution, though!

As for DPS, the game adjusts damage done to be equal to DPS*animtime, except in the following cases:

1) The unit attacks more than once per anim. In this case, each attack does the expected damage
2) The unit has an area component to its attack, in which case the anim length is treated as 1, regardless of what it really is
3) The unit has a lightning attack, in which case the anim length is treated as 1
4) Some special attacks like to be special and don't act quite as you'd expect
Last edited by Loggy; 16 Jul, 2019 @ 3:44am
DeuSJS 6 16 Jul, 2019 @ 3:51am 
how would one go about modding the UI to include that field? In fact, how would one go about modding the UI in the first place?

Edit: Ah, nevermind, figured it out myself
Last edited by DeuSJS; 16 Jul, 2019 @ 3:58am
Loggy 27 16 Jul, 2019 @ 4:08am 
The UI is just a XML file, the main one of interest is aom/data/uimain.xml. It can be modded much as anything else. Try adding the following at a sensible point - though the toggle button might need to be moved a bit (play with size1024 values) to be compatible with the regular UI:

<gadget name="currentanimlengthToggle" size1024="585 0 605 15" foreground="icons/fish" mouseovertext="Show attack bonuses" sound="ui_scroll" texturereplace="" type="button"> <command>gadgetToggle("currentanimlength")</command> </gadget> <gadget name="currentanimlength" type="textBox" size1024="0 340 400 555" datarefreshrate="60" textfont="NumbersFont" textfontsize="12" textcolor="0 0 255" textcenterhoriz="" textcentervert="" hidden="">{currentUnitCurrentAnimLength()}</gadget>
DeuSJS 6 16 Jul, 2019 @ 4:45am 
the {currentUnitCurrentAnimLength()} doesn't seem to want to display a number

Edit: Ah, nevermind, I'm stupid
Last edited by DeuSJS; 16 Jul, 2019 @ 4:55am
< >
Showing 1-9 of 9 comments
Per page: 1530 50