Discussion Suggestion Make spearmen use spears against enemy infantry (hard-coded in C++ engine)

Users who are viewing this thread

The reason is all here.

So a few modders like @Philozoraptor managed to achieve this behavior by increasing the damage of spears. However, this is not ideal as this means that both infantry and cavalry will always use their spears against any kind of enemy and will refuse to switch to their secondary weapons when enemies are too close for spear range. Thus, even if we make spearmen use spears, I will have to code additional behavior to make them switch to their sidearms, such as making them drop their spears, or removing their spears, or decreasing the damage of their spears.

I understand that currently the main reason why spearmen don't use their spears against enemy infantry is because of the poor damage and performance of spears. However, there are already plenty of mods that solve this. The final step is for TW to change the AI melee weapon priority in the C++ engine.
 
I am not 100% certain of it, but I remember that at least in some of the previous patches vanilla pikemen switched to pikes from their 1h swords when they were under advance order instead of charge order. Disadvantage is that advance is semi broken - units dont throw javelins etc, thats why we prefer charge and charge to target in RBM and deal with weapon usage by giving units only one desired primary weapon.
 
This is something that we very dealy need for historical mods. There's no reason for AI weapon behaviour to be hardcoded in the first place, it should be modular.
 
Up!
Retro-Mushroom-1UP-2.ico

What about this @Dejan ? :cool:
 
We discussed this suggestion at the modding meeting. We have an open task for putting the relevant variables into a model but it hasn't been tackled yet.

Considering what you said, would then this still be needed?
I don't know if I understand you correctly, but you meant that it would not be needed in the base game if a mod already supports it?
 
I don't know if I understand you correctly, but you meant that it would not be needed in the base game if a mod already supports it?
No. I was specifically referring to the ability of modders to modify this behaviour. As in, have you now figured out a way to do this?
Me and many others have tried modifying the code to change the priority of melee weapon usage by AI troops. But we have all come to the conclusion that this behavior is hard-coded in the C++ engine and that it cannot be modified through C#.
 
Back
Top Bottom