Results 1 to 5 of 5

Thread: Autoreslove unit strengths

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Autoreslove unit strengths

    is there a place in the .pack files where i can modify the strength of units for autoresolves

  2. #2
    Commissar Caligula_'s Avatar The Ecstasy of Potatoes
    Join Date
    Dec 2013
    Location
    The alcoves in the Koningin Astridpark
    Posts
    5,871

    Default Re: Autoreslove unit strengths

    I believe its cdir_military_generator_unit_qualities_tables.
    Zombies have the lowest value there, which befits their horrible skillz in custom battles whilst Archaon has the highest.
    This table could be the thing that helps the AI decide how good a unit is, and whether its worth buying. I'm not sure.



  3. #3

    Default Re: Autoreslove unit strengths

    I thought that table was just for the AI to associate a value with recruitment or how good it is in battle?

  4. #4

    Default Re: Autoreslove unit strengths

    It's the campaign_autoresolver_[...] tables. They aren't by-unit but are rather by unit class so if you want to make changes that would only affect certain units of a class you'd need to give them a new one. Currently, all of the large monsters are just inf_mel so they're treated the same as sword melee units and thus get all of their HP drained the same as a sword melee would its men. I would recommend adding a new monster class for them and adding a new vehicle class for the special "chariots". It might also be a good idea to create an inf_sml entry for the 12 unit groups, separate from the new mon (monster) entry.

    To add a new class first add an entry to unit_class_tables and then be sure to give what you added entries in unit_set_to_unit_junction_tables, ui_unit_stat_to_classes_tables, and effect_bonus_value_unit_class_junction_tables. The first one is important for being able to place banners on or target units of your new class with spells and the second determines what stats show up in their UI so also very important--you can just c/p these values from inf_mel or chariot or whatever class what you're editing originally had. That last table is I think a leftover but they could add armoury type upgrades later or maybe they're still used internally somewhere so may as well update it.

    Finally, you'll need to edit land_unit_tables to actually give units your new class. This means that your mod will not be at all compatible with any unit mods that change whatever units you're giving new classes to so you'd have to manually create compatible tables with combined updates. Kind of a pain, but for it to be any different CA would need to take the class entry out of land_unit_tables and instead make a new land_unit_to_class_junction_tables. At the very least please be sure to delete all rows you aren't editing though! This goes for all tables really but is most important here to ensure maximum compatibility. The only time you should leave in rows you have not edited is when they so closely interact with what you did edit that you would not want them changed! For instance, if you were editing values for cavalry charges and keeping some of the values default you'd probably still want to keep all of them in since if a mod changed something you didn't there it would still alter the "feel" of the cavalry charges your mod was aiming for.

    As for how to work the autoresolve tables you'll want to start with campaign_autoresolver_modifiers_table and add new entries for your class and how you want it to interact with things and how you want things to interact with it. Then you add new entries to campaign_autoresolver_mod_group_modifier_values_tables to determine the strength of the affects. I'm not quite sure what the group modifier is about but for now all I know is that wh_global_ranged_kps_penalty is something that will always apply and despite its name you can still set to work for newly added melee entries in the modifiers table. I believe the moderate/strong business would apply to moderate/strong stat differences.

    There are other autoresolve values scattered throughout other tables as well. Off the top of my head there are several in campaign_variables_tables. There are quite a few things there to help lower ranged effectiveness and increase the effectiveness of units with really strong stats or AoE attacks as currently autoresolve doesn't really care as they're set low. You can also mess with the general prediction accuracy of autoresolve to give it more unexpected results.

    If you're interested in messing around with how some of the AI vs. AI autoresolves are carried out, specifically, you may want to mess with cdir_configs_tables as I believe the BOOST_RIVALS_AMOUNT and BOOST_RIVALS_PERCENTAGE are used when a "rival" faction is autoresolving a non-rival usually resulting in ridiculous outcomes like a 6 stack wiping a 20 stack because their autoresolve was boosted. This is meant to give you a greater challenge, as factions close to you and factions occupying victory conditions are boosted, but when it happens on-screen it's very lame.

  5. #5

    Default Re: Autoreslove unit strengths

    Thank you so much for the detailed and comprehensive answer/tutorial.
    I will use this information in aiding my own overhaul. Really appreciate it

Posting Permissions

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