Results 1 to 9 of 9

Thread: Some DB Editing Questions

Hybrid View

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

    Default Some DB Editing Questions

    As I'm currently trying to overhaul the game to make it more difficult on the one hand side but introduce more logic aswell, I have some questions regarding some changes. Maybe someone an help me?

    (1) Concerning the Embarking of units. First of all I want to drastically increase the movement point cost for embarking so that an embarked army has to use most of its movenemt points to embark and to disembark. In which table can I edit the movement Point costs?

    (2) Diplomacy: Playing as Carthage often means total war with everybody in range, even if they don't share borders with me or my allies. So how can I prevent factions from declaring war on me just because they don't like me?

    (3) Forced March stance: Is it possible to completely remove that stance? E.g. by removing the double speed and the negative aspects aswell?

    Thanks for answers

  2. #2
    Magnar's Avatar Artifex
    Join Date
    Jul 2013
    Location
    The last place you look
    Posts
    4,370

    Default Re: Some DB Editing Questions

    1 & 3 are both easy and possible, cant remeber off the top of my head which tables i chaged for 1 but for 3 look in efect bundles to effect junctions

  3. #3
    Kurisu Paifuaa's Avatar Biarchus
    Join Date
    Mar 2009
    Location
    Pennsylvania, US
    Posts
    621

    Default Re: Some DB Editing Questions

    Quote Originally Posted by Carthago View Post
    (1) Concerning the Embarking of units. First of all I want to drastically increase the movement point cost for embarking so that an embarked army has to use most of its movenemt points to embark and to disembark. In which table can I edit the movement Point costs?
    Look to campaign_variables table for pathfinding_land_to_sea_beach_transition_action_point_cost and pathfinding_sea_to_land_beach_transition_action_point_cost. Not sure what the top of the scale is there (defaults are 2100 and 1500, so perhaps 2500 or 3000). However, zeroing these works as you would expect.

    (2) Diplomacy: Playing as Carthage often means total war with everybody in range, even if they don't share borders with me or my allies. So how can I prevent factions from declaring war on me just because they don't like me?
    You could try a few approaches... diplomatic behavior outcomes will depend not only on general AI personality weights and modifiers, but also on initial conditions for specific factions (i.e. the 'history' defined in the startpos diplomacy arrays for each faction... such as trespasses, prior war etc). The more negative the initial conditions, the greater the chance of a behavioral modifier triggering war. Carefully balancing both of these aspects would be important, imo.

    Concerning db tables, look at the tables named cai_personality_* . In cai_personality_deal_generation_generator_priorities_tables, for example, you have a very general variable (DECLARE_WAR_ON_FACTIONS_I_DISLIKE) to control war declaration likelihood under various circumstances (with many unknown columns, at present). However, this will influence the whole board, so you could end up with a very passive campaign if this is set aggressively lower.

    In cai_personalities table, you have some more specific settings (keyed by culture type and major/minor) cross referenced with different policy aspects concerning war behavior and diplomacy. I'm not clear on which of these would affect aggressiveness in war declaration vs strategic behavior during war. You would probably want to experiment with these in conjunction with DECLARE_WAR_ON_FACTIONS_I_DISLIKE. Again, you'd need to be careful not to impart undesirable (passive) affects for all factions with a similar key.

    A more surgical approach would be to modify the diplomacy arrays for specific factions (perhaps in conjunction with the personality weightings), improving the starting relations of nearby factions towards Carthage. That's a bear of a task unless you're familiar with startpos editing and have some reference for faction index #s and also knowledge of each item in the array. Can't be of more help here at the moment... maybe there's a tutorial or reference somewhere in the Workshop.

    In any case, that's far from exhaustive and (needless to say) getting the balance correct is a complex task. I'm having a good experience with Divide et Impera, so he's doing something right. Look at his changes alongside other overhauls and CAI mods like Dubmod (which increases AI aggressiveness) to get an idea of what works and the scale and scope of certain variables. And, of course, experiment.

    (3) Forced March stance: Is it possible to completely remove that stance? E.g. by removing the double speed and the negative aspects as well?
    Removing it would be tricky, at best, due to all of the references to it. I would probably try neutering the effects instead of removing the stance.

    In effect_bundles_to_effects_junctions search for the effect bundle key rom_stance_army_forced_march. There are 5 effects tied to the stance, 2 with numeric modifiers (morale and movement) and 3 dummy effects (cannot_attack, cannot_recruit and always_ambush) with value=1. The morale and movement modifiers are straightforward, setting them to 0 (or whatever) has the intended effect. The non-numeric effects cannot be disabled here (by setting them to 0 or -1) and removing them from the base table only removes the UI indication. You likely can't eliminate this completely as the functionality does not lie in the db. Perhaps someone else has tried different methods and would know more.

    Naval is similar (rom_stance_navy_double_time).

    I would assume your concern is the AI being seemingly oblivious to the disadvantages and throwing away armies to ambushes by constantly getting caught in forced march. You could remove the morale penalty and keep the range (since it's going to use the stance anyway). You could also try something creative, like adding other effects to the bundle to blunt the forced ambush scenario. Then again, I think the idea is that the army risks loss, but is able to withdraw with enough troops to regroup next turn (in campaign). IMO it shouldn't use the stance unless it has the area scouted, but...


    Anyway, that's my experience with those, thus far.
    Last edited by Kurisu Paifuaa; December 13, 2013 at 10:19 AM.

  4. #4

    Default Re: Some DB Editing Questions

    Quote Originally Posted by Kurisu Paifuaa View Post
    Look to campaign_variables table for pathfinding_land_to_sea_beach_transition_action_point_cost and pathfinding_sea_to_land_beach_transition_action_point_cost. Not sure what the top of the scale is there (defaults are 2100 and 1500, so perhaps 2500 or 3000). However, zeroing these works as you would expect.



    You could try a few approaches... diplomatic behavior outcomes will depend not only on general AI personality weights and modifiers, but also on initial conditions for specific factions (i.e. the 'history' defined in the startpos diplomacy arrays for each faction... such as trespasses, prior war etc). The more negative the initial conditions, the greater the chance of a behavioral modifier triggering war. Carefully balancing both of these aspects would be important, imo.

    Concerning db tables, look at the tables named cai_personality_* . In cai_personality_deal_generation_generator_priorities_tables, for example, you have a very general variable (DECLARE_WAR_ON_FACTIONS_I_DISLIKE) to control war declaration likelihood under various circumstances (with many unknown columns, at present). However, this will influence the whole board, so you could end up with a very passive campaign if this is set aggressively lower.

    In cai_personalities table, you have some more specific settings (keyed by culture type and major/minor) cross referenced with different policy aspects concerning war behavior and diplomacy. I'm not clear on which of these would affect aggressiveness in war declaration vs strategic behavior during war. You would probably want to experiment with these in conjunction with DECLARE_WAR_ON_FACTIONS_I_DISLIKE. Again, you'd need to be careful not to impart undesirable (passive) affects for all factions with a similar key.

    A more surgical approach would be to modify the diplomacy arrays for specific factions (perhaps in conjunction with the personality weightings), improving the starting relations of nearby factions towards Carthage. That's a bear of a task unless you're familiar with startpos editing and have some reference for faction index #s and also knowledge of each item in the array. Can't be of more help here at the moment... maybe there's a tutorial or reference somewhere in the Workshop.

    In any case, that's far from exhaustive and (needless to say) getting the balance correct is a complex task. I'm having a good experience with Divide et Impera, so he's doing something right. Look at his changes alongside other overhauls and CAI mods like Dubmod (which increases AI aggressiveness) to get an idea of what works and the scale and scope of certain variables. And, of course, experiment.



    Removing it would be tricky, at best, due to all of the references to it. I would probably try neutering the effects instead of removing the stance.

    In effect_bundles_to_effects_junctions search for the effect bundle key rom_stance_army_forced_march. There are 5 effects tied to the stance, 2 with numeric modifiers (morale and movement) and 3 dummy effects (cannot_attack, cannot_recruit and always_ambush) with value=1. The morale and movement modifiers are straightforward, setting them to 0 (or whatever) has the intended effect. The non-numeric effects cannot be disabled here (by setting them to 0 or -1) and removing them from the base table only removes the UI indication. You likely can't eliminate this completely as the functionality does not lie in the db. Perhaps someone else has tried different methods and would know more.

    Naval is similar (rom_stance_navy_double_time).

    I would assume your concern is the AI being seemingly oblivious to the disadvantages and throwing away armies to ambushes by constantly getting caught in forced march. You could remove the morale penalty and keep the range (since it's going to use the stance anyway). You could also try something creative, like adding other effects to the bundle to blunt the forced ambush scenario. Then again, I think the idea is that the army risks loss, but is able to withdraw with enough troops to regroup next turn (in campaign). IMO it shouldn't use the stance unless it has the area scouted, but...


    Anyway, that's my experience with those, thus far.
    Thank You very much so far, especially concerning (1) and (3)

    Concerning the diplomacy thing, I think you're right with your concern of having a passive CAI after lowering the faction dislike war declaration affinity, so that's definitely not the solution. Since I'd prefer not to edit the specific diplomtic relations of the African/Iberian tribes towards Carthage I instead would like to use solutions which doesnt't cause new problems.
    Idea: Add a general diplomatic bonus (30?), let's call it "respect", to carthage, that works like a gift, what means that it lowers itself from time to time. Is that possible?

    And one additional question nearby to (1): Is it possible to drastically lower the affinity of the AI to embark units although there is a land based way towards their aim?!

  5. #5
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Some DB Editing Questions

    Quote Originally Posted by Kurisu Paifuaa View Post
    Look to campaign_variables table for pathfinding_land_to_sea_beach_transition_action_point_cost and pathfinding_sea_to_land_beach_transition_action_point_cost. Not sure what the top of the scale is there (defaults are 2100 and 1500, so perhaps 2500 or 3000). However, zeroing these works as you would expect.
    2100 is the vanilla movement points an army has (4200 in forced march, hence the problems here). You need to be able to double penalties while using forced march to make these truly effective.

    Neither of those is applied if embarking to/from a dock either.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  6. #6
    Kurisu Paifuaa's Avatar Biarchus
    Join Date
    Mar 2009
    Location
    Pennsylvania, US
    Posts
    621

    Default Re: Some DB Editing Questions

    Quote Originally Posted by crzyrndm View Post
    2100 is the vanilla movement points an army has (4200 in forced march, hence the problems here). You need to be able to double penalties while using forced march to make these truly effective.

    Neither of those is applied if embarking to/from a dock either.
    Ah, right on. And squashing the range bonus from forced march while leaving the mechanical effects seems pointless.

    From a player's perspective, I like the extra tactical option with forced march (fast reinforcements at penalty). I recall patch notes stating that AI misuse had been addressed, but I've been modding more than playing lately. Is it still as rampant as it had been? It seems less common... without actually keeping track.

  7. #7
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Some DB Editing Questions

    Quote Originally Posted by Kurisu Paifuaa View Post
    Ah, right on. And squashing the range bonus from forced march while leaving the mechanical effects seems pointless.
    I was referring spcifically to the issue with embarking/disembarking. You'll notice that the penalties currently are a significant portion of a turns standard movement allocation (100% for embarking, and ~75% for disembarking), so the entire problem here is that they have a much lesser effect on forced marching armies (50% and 37% respectively)
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  8. #8
    Kurisu Paifuaa's Avatar Biarchus
    Join Date
    Mar 2009
    Location
    Pennsylvania, US
    Posts
    621

    Default Re: Some DB Editing Questions

    Quote Originally Posted by crzyrndm View Post
    I was referring spcifically to the issue with embarking/disembarking. You'll notice that the penalties currently are a significant portion of a turns standard movement allocation (100% for embarking, and ~75% for disembarking), so the entire problem here is that they have a much lesser effect on forced marching armies (50% and 37% respectively)
    Right, gotcha... embarkation/disembarkation movement isn't much of an issue until you consider the forced march/double time bonus. Thanks for pointing out docks btw... do the ones separated from the settlement (e.g. Corsica) function similar to the port?

    I was implying that while removing the range increase for forced march (as the OP asks in (3)) would actually make that a non-issue, it still creates an arguably worse scenario for the AI (who will still use the stance, but derive only non-removable penalties). So it isn't a favorable solution overall.
    Last edited by Kurisu Paifuaa; December 15, 2013 at 09:00 AM.

  9. #9
    Kurisu Paifuaa's Avatar Biarchus
    Join Date
    Mar 2009
    Location
    Pennsylvania, US
    Posts
    621

    Default Re: Some DB Editing Questions

    Oh, yes. Forgot about the faction traits. Those are in effect_bundles_to_effect_junctions. Look at the effects like rom_faction_trait_carthage_hannonid (which already yields a small diplomacy bonus). You could increase that or use it with another dynasty. Barcid have a penalty there... maybe that's your problem .

    Also look at effect_bonus_value_religion_junction to see how some faction trait effects are only applied to certain cultures (religion=culture in R2)... like Rome/Cornelia gets a diplo bonus only with Hellenistic factions. You could limit your effect that way.

    -- don't know about the sea route affinity atm
    Last edited by Kurisu Paifuaa; December 13, 2013 at 04:56 PM.

Posting Permissions

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