Hello, I have been looking for the specific command of the negative moral effect on the troops of when the general dies, but I cannot find it, does anyone know where it is located and if possible, what the command is called
Hello, I have been looking for the specific command of the negative moral effect on the troops of when the general dies, but I cannot find it, does anyone know where it is located and if possible, what the command is called
Sad
Thanks for the info, I tough it was moddeable
btw I have another question: the command "recruit_priority_offset 10" and this one "move_speed_mod 1.3 that goes on export_descr_unit works? cuz I want that the IA in campaign recruit less of a kind of unit and more to recruit better units for his armies, but seems he's doing the same anyway, and the other command that guaranty the units get more speed, cause that my mod crash at the begining of the run
About first question - there's an event BattleGeneralKilled for battle scripts, but it's somehow unselective so in script we can't match which side general dies. It's the only one way to manually script morale decreasing. But this event is hardcoded, so engine matches itself which general died and it definitely has it's influence on troops anyway.
For the second - all those parameters are 100% functional. For editing recruitment priority for faction look for "ai_personalities" in Workshop or Wiki, it's pretty clear explained there.
Here's the link to Serious Potato's AI Personalities page. This page doesn't give the exact formulae used in AI recruitment/construction decisions, the exact formulae may not be known yet, but I seem to remember that increasing the recruit_priority_offset causes the AI to prefer the unit for recruitment.
Last edited by Callistonian; February 10, 2024 at 07:48 PM.
Looking at numbers like for monster ribauld (20) and militia (-50) in the crusades EDU I would think priority values are the other way: the lower the number, the higher the priority.
AI personalities are supposed to set preferences for the type of unit to be recruited, ditto for buildings.
I had to dig through old messages to find this, but probably worth posting: Serious Potato tested recruit_priority_offset in 2021 by creating units with otherwise identical stats. The unambiguous result is that increasing the recruit_priority_offset value makes the AI more likely to recruit the unit. This is what he had to say on the matter:
This would explain why CA would set the Monster Ribault, which has a small unit size and poor stats, to a higher priority than militia, which have a large unit size and probably better melee, defense, etc. stats - it's so that the AI will recruit the ribault at least sometimes. Although, thinking back to my days playing vanilla M2, they may have overdone it with the recruit_priority_offset values because I recall late-campaign AI armies being extremely artillery heavy, almost comically so. The recruit_priority_offset values in the vanilla and expansion EDU files look pretty random but this is just because CA had the formula on hand and were using this modifier for fine-tuning. By now, I wouldn't be surprised if the reverse engineering crowd has found the exact formulae that control the AI's recruitment and construction decisions.Originally Posted by Serious Potato 03/17/21
Makes sense - and explains the 'offset' suffix: if one knows the basis of the 'normal' recruiting preferences then one should be easily be able to off set it by adding the proper value. Eg -50 = suppressing excessive recruiting, +20 = increasing rare recruiting as you suggest.
That can obviously back fire as you notice like when other recruit pools are exhausted. The unit with low priority is also prone to surviving auto resolve at a better rate because it ends up at the tail end of the army stack, eg the artillery heavy stacks.
Seems this thread goes good hahaha, thx for the info yall
I have 1 last question, about modding for multiplayer, it is possible to enable silver and gold experience chevrons in multiplayer? or is it, a hardcoded thing?
In custom battles you can 'buy' experience, hence it's already present, you need to click multiple times (expensive!) I think to get silver and gold . In hotseat it's back to the default of having to 'earn' them, unless there is bonus building present when recruiting units.
I mean, for multiplayer, online battles. It seems can only buy just the bronce experience chevrons (max 3). That can be moddeable for enable the silver and gold XP chevrons? or it is hardcoded?