The purpose of this post is to explain how to change the speed and allure of a unit. It's not for those already digging the game files as this change is simple to quote and understand by reading some game files. It's more to know that such mod is possible and a start a place where to collect mod about this topic.
What follow is very detailed, too much, but it's a way to show how sample are some changes even for someone not used to coding or who didn't care give a look to game files.
Changing units speed is rather easy, everything is in the .def file of the unit.
For example for the Cleric it's in the file:
1 - Raw speed
The raw speed of the unit is defined in the "Mover.FootMover" section, for example:
You can change those values and you'll change the hero speed for the corresponding allure. So for example, to make the walk allure as fast than the run allure you can change to:
This will work with only this change. But you'll get a strange effect because the animation won't be adapted to this speed. This effect can be cool but you can also adapt the animation speed.
II - Adapt the animation speed
The move animations are also defined in this same .def file, there's one section per allure:
For example the walk allure animation:
With the example used in previous section we made a walk as fast than a run. To adapt the animation to this new speed you have two ways:
III - Adapt the walk animation speed
So for the example the increase we made of the walk allure was from 3.5 to 4.5. It's a rate increase of (4.5 - 3.5) / 3.5 = 0.286
The walk animation speed is 1.4 for the original walk speed so it should be now 1.286 * 1.4 = 1.8
So the change is just:
With those both changes of the walk speed and the walk animation speed you get a hero with 3 allures, run and flee as normal and a hurry walk, which is in fact as fast than the run but looks like a hurry walk.
The effect is fine like this because the allure is almost as important than the real speed and you'll get a hero that hurry to shop or for paying taxes.
But you could prefer a more logical change and just make the hero run for everything including shopping.
IV - Substitute the walk animation by the run animation
With the example we changed the walk speed to make it as fast than the run speed. So using the run animation will be sample, we will just reuse the same animation and animation speed than for the run defined in section {StateWork "move_fight".
So the change is just:
With this change you'll get a hero that constantly run even for shopping and buying. It's not fully perfect because there are intermediate states associated to an allure and by doing only those changes you'll keep the animation transition of the original walk. But overall the effect is still very good.
I haven't push further the changes to try also change intermediate states of an allure but this is also defined in this same file.
One point to quote is that with the changes quoted in this post, the emoticons won't be changed and even if you use the attack run animation you won't get an aggressive emoticon giving the feeling that the hero assault shops! For sure on this base you could do different variations like a hero running cowardly to shops and to pay taxes, hey that make sense!
IV - Make a hero levitate
One cool variation is to make a hero levitate, that's very simple, just use the walk animation with a slow animation speed and for all hero allures.
In a way you can consider Priestess of Krypta already levitate because his dress doesn't show legs. But you can increase the feeling by slowing a lot the animation speed of each allure and by using walk for the run too.
What follow is very detailed, too much, but it's a way to show how sample are some changes even for someone not used to coding or who didn't care give a look to game files.
Changing units speed is rather easy, everything is in the .def file of the unit.
For example for the Cleric it's in the file:
Code:
Majesty 2\resource\entity\units\heroes\hero_cleric\hero_cleric.def
1 - Raw speed
The raw speed of the unit is defined in the "Mover.FootMover" section, for example:
Code:
{"Mover.FootMover"
{pathprofile "DEFAULT"
}
{stepLength 2}
{speed 3.5 4.5 4.5} ; <= THE SPEED of the hero, for walk, run, flee
{angleSpeed 800}
}
You can change those values and you'll change the hero speed for the corresponding allure. So for example, to make the walk allure as fast than the run allure you can change to:
Code:
{"Mover.FootMover"
{pathprofile "DEFAULT"
}
{stepLength 2}
{speed [COLOR="Red"][B]4.5[/B][/COLOR] 4.5 4.5} ; <= THE SPEED of the hero, for walk, run, flee
{angleSpeed 800}
}
This will work with only this change. But you'll get a strange effect because the animation won't be adapted to this speed. This effect can be cool but you can also adapt the animation speed.
II - Adapt the animation speed
The move animations are also defined in this same .def file, there's one section per allure:
- For the walk: {StateWork "move_default"
- For the run: {StateWork "move_fight"
- For the flee: {StateWork "move_panic"
- Some units like the Dwarf have also a fourth allure, the lazy walk: {State "move_laziness". I have still some point to clarify about it as only 3 speed allures are defined for a hero. My current hypothesis about this allure is that it's the same speed than the walk but with a walk animation a bit slower.
For example the walk allure animation:
Code:
{StateWork "move_default"
{SyncNotifyStart "MOVE_RESUME"}
{SyncNotifyFinish "MOVE_PAUSE"}
{looped}
{AnimName "walk" {speed 1.4}; <= ANIMATION and its speed for the allure.
}
}
With the example used in previous section we made a walk as fast than a run. To adapt the animation to this new speed you have two ways:
- Change the walk animation speed to increase its speed as much than you increased hero walk speed.
- Substitute the walk animation by the run animation.
III - Adapt the walk animation speed
So for the example the increase we made of the walk allure was from 3.5 to 4.5. It's a rate increase of (4.5 - 3.5) / 3.5 = 0.286
The walk animation speed is 1.4 for the original walk speed so it should be now 1.286 * 1.4 = 1.8
So the change is just:
Code:
{StateWork "move_default"
{SyncNotifyStart "MOVE_RESUME"}
{SyncNotifyFinish "MOVE_PAUSE"}
{looped}
{AnimName "walk" {speed [COLOR="Red"][B]1.8[/B][/COLOR]}; <= ANIMATION and its speed for the allure.
}
}
With those both changes of the walk speed and the walk animation speed you get a hero with 3 allures, run and flee as normal and a hurry walk, which is in fact as fast than the run but looks like a hurry walk.
The effect is fine like this because the allure is almost as important than the real speed and you'll get a hero that hurry to shop or for paying taxes.
But you could prefer a more logical change and just make the hero run for everything including shopping.
IV - Substitute the walk animation by the run animation
With the example we changed the walk speed to make it as fast than the run speed. So using the run animation will be sample, we will just reuse the same animation and animation speed than for the run defined in section {StateWork "move_fight".
So the change is just:
Code:
{StateWork "move_default"
{SyncNotifyStart "MOVE_RESUME"}
{SyncNotifyFinish "MOVE_PAUSE"}
{looped}
{AnimName "[COLOR="Red"][B]ag_walk[/B][/COLOR]" {speed [B][COLOR="Red"]1.1[/COLOR][/B]}}
}
With this change you'll get a hero that constantly run even for shopping and buying. It's not fully perfect because there are intermediate states associated to an allure and by doing only those changes you'll keep the animation transition of the original walk. But overall the effect is still very good.
I haven't push further the changes to try also change intermediate states of an allure but this is also defined in this same file.
One point to quote is that with the changes quoted in this post, the emoticons won't be changed and even if you use the attack run animation you won't get an aggressive emoticon giving the feeling that the hero assault shops! For sure on this base you could do different variations like a hero running cowardly to shops and to pay taxes, hey that make sense!
IV - Make a hero levitate
One cool variation is to make a hero levitate, that's very simple, just use the walk animation with a slow animation speed and for all hero allures.
In a way you can consider Priestess of Krypta already levitate because his dress doesn't show legs. But you can increase the feeling by slowing a lot the animation speed of each allure and by using walk for the run too.