Results 1 to 15 of 15

Thread: In which descr_ file is the trigger for when the general dies?

  1. #1
    MerkeKING's Avatar Foederatus
    Join Date
    Jan 2024
    Location
    Ecuador
    Posts
    34

    Icon5 In which descr_ file is the trigger for when the general dies?

    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

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: In which descr_ file is the trigger for when the general dies?

    There is no file like that, it's an inbuild (hard coded) game mechanic. At least to the best of my knowledge. You can switch morale on and off in the game's CFG file, but that's it, and not really desirable.










  3. #3
    MerkeKING's Avatar Foederatus
    Join Date
    Jan 2024
    Location
    Ecuador
    Posts
    34

    Default Re: In which descr_ file is the trigger for when the general dies?

    Sad

    Thanks for the info, I tough it was moddeable

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: In which descr_ file is the trigger for when the general dies?











  5. #5
    MerkeKING's Avatar Foederatus
    Join Date
    Jan 2024
    Location
    Ecuador
    Posts
    34

    Default Re: In which descr_ file is the trigger for when the general dies?

    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

  6. #6
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: In which descr_ file is the trigger for when the general dies?

    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.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  7. #7

    Default Re: In which descr_ file is the trigger for when the general dies?

    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.

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: In which descr_ file is the trigger for when the general dies?

    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.










  9. #9

    Default Re: In which descr_ file is the trigger for when the general dies?

    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:

    Quote Originally Posted by Serious Potato 03/17/21
    we couldn't figure out the way it works exactly yet... it's definitely not a relative thingy, where 5 gets recruited half as much as 10 for example, the impact is very extreme when you test it between identical units, but a "real" mod scenario has too many factors to take into consideration, so this will take a while [...] I would recommend using it mainly for rare units that the AI would otherwise ignore, a good example would be small units whose strength doesn't come from stats, but from a powerful projectile (projectiles don't get factored in, range and ammo does though!).
    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.

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: In which descr_ file is the trigger for when the general dies?

    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.










  11. #11

    Default Re: In which descr_ file is the trigger for when the general dies?

    Quote Originally Posted by Gigantus View Post
    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.
    That's a good point. The fact that the first few units are typically the only ones to suffer auto-resolve losses is a significant bug and exploit for human players.

  12. #12
    MerkeKING's Avatar Foederatus
    Join Date
    Jan 2024
    Location
    Ecuador
    Posts
    34

    Default Re: In which descr_ file is the trigger for when the general dies?

    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?

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: In which descr_ file is the trigger for when the general dies?

    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.










  14. #14
    MerkeKING's Avatar Foederatus
    Join Date
    Jan 2024
    Location
    Ecuador
    Posts
    34

    Default Re: In which descr_ file is the trigger for when the general dies?

    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?

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: In which descr_ file is the trigger for when the general dies?

    Not sure how you would restrict that for multi player battles, nor have I ever played any - it certainly goes all the way to 3 gold chevrons in single player custom battle.










Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •