Results 1 to 13 of 13

Thread: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

  1. #1

    Default [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    This is the test version of a script which aims to keep factions from expanding beyond realistic areas. It consists of two parts: A forced peace treaty list, which will declare peace every turn between a list of AI factions that shouldn't expand in each others direction. For example all gauls can't go to war with all iberians, but they can fight and expand within their "area" all they want. It's not a particularly sophisticated approach, but in my initial testing it seems to work, although somewhat unsatisfactorily.
    The second part is an adapted OnPendingBattle script, which gives autocalc bonuses to factions based on relative region number. That way, factions can be continually at war and do battle, the bigs just get defeated and cant expand much. In theory, that is, no long-term testing has been done yet. Testing and feedback is highly appreciated! And so are screenshots of your campaigns.

    Since this is a script, technically it can be applied to an existing campaign. It was not designed for this, however, so outcomes will be unpredictable.
    I would recommend playing this without a submod that increases liberation rates, since this script does not account for gen_ factions, and it might mess with the balance.

    @___expansion_limit_script 1.05.zip -Core functionality is in place now

    It comes delivered in DeI's 1.2.2a's grand_campaign.lua, because I couldn't figure out how to put it in it's own file and because it replaces it's functions. So it is most likely not compatible with any other DeI versions. Run this on top, it's compatible with and will not affect any submod that doesn't change the grand_campaign.lua, but that it should overwrite.

    I left logging on, so in your Rome II folder there is a file named major_log.txt that will give you information about AI battles.

    I give full permission to anyone to use my work as they please. (Giving credit would be nice.) Or to update this for future DeI versions in case I'm not around. But since I'm mostly adapting DeI code, I consider this more or less still their belonging.
    Last edited by CIaagent11; Yesterday at 03:46 AM.

  2. #2
    Maetharin's Avatar Senator
    Join Date
    Oct 2013
    Location
    Austria
    Posts
    1,255

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Very intriguing, do you plan on further expanding functionalities?
    F.e. by comparing the relative strength of factions so they seek peace?
    "Ceterum censeo Carthaginem delendam esse!"

    Marcus Porcius Cato Censorius

    "I concur!"

    ​Me

  3. #3

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Quote Originally Posted by Maetharin View Post
    Very intriguing, do you plan on further expanding functionalities?
    F.e. by comparing the relative strength of factions so they seek peace?
    Good idea, and my initial thought. But so far I only know how to test the strength of one faction in the script, which can't be used for comparing strength. Also, what should the criteria be? Only equal-strength factions can fight? It might have weird results. If the bigs can't attack the smalls, they might gouge on the mediums and expand too much. One has to think about all the repercussions...
    Last edited by CIaagent11; October 13, 2017 at 12:09 PM.

  4. #4

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Wow, there you have now but with a new version very hurried. Very beautiful. Property synonymous times in the file reingeschaut and what I've seen makes a very good impression. I think the rest is done by different books.
    I just started a new game with version 06 and exchanged the same. I'm just in round 36 and fortunately not much has been done yet. I will gladly again as soon as possible.

    I would search the comparison about the strength of the unit size.
    If the attacker has 20 units and the defender even then they close peace, or it does not take place until war, since no one can actually win the battle.
    It may also be due to the military accounts. This factor, which is quite important as I think, should not be ignored.

  5. #5

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Ok, I have no idea how to do this. Need some help.
    If I wanted to make everyone go to peace with a faction once it has a certain amount of settlements, would I do it like this?
    This crashes the game...

    Code:
    function PeaceBig(context)
    if context:faction():is_human() == false and context:faction():region_list():num_items() > 3 then
        for i = 0, scripting.game_interface:model():world():faction_list():num_items() - 1 do
            scripting.game_interface:force_make_peace(context.string,scripting.game_interface:model():world():faction_list(i))
        end
    end
    end
    Last edited by CIaagent11; October 14, 2017 at 04:05 PM.

  6. #6

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Hmm, there will be the fractions which have only one settlement but quite problems. Do not you think? I think the barbarians should come to peace when there are no armies left.
    Otherwise, we have the problem again that when Rome comes to this area, then this fraction does not exist there, which should be there.

  7. #7

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    I'm not sure that's possible. The AI will always have armies. At least I way don't know how to do it.

    My testing revealed that this runs into issues with the game mechanics. The AI works basically like this: "if not at war with anyone, declare war on random close-by faction you don't like". If you then forbid them from warring all their neighbors via the script, they will declare war on other factions, who might be far away, and eventually you. I saw Epirus ship fleets off to africa, and I was invaded by the Vivisci and some shouthern iberian tribe. Macedon sent two armies to Judea. Ultimately it is pretty lame if you as the player gets invaded by these full stacks from way far away all the time.
    Last edited by CIaagent11; October 16, 2017 at 04:59 PM.

  8. #8

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Maybe it's about the size of the army? Once the faction just says we have a total of 5 units in the pool that makes peace.

    Yes, I must agree with you. Is then already slightly corrosive if you have once strains from anywhere else in the neighborhood. At the Cimbri I would be the yes from a certain date still to be let go ...
    Last edited by Sedulus; October 15, 2017 at 02:39 AM.

  9. #9
    Greek strategos's Avatar Domesticus
    Join Date
    Feb 2008
    Location
    Hellas
    Posts
    2,078

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Hey @Claagnet11
    Total War's AI functionality was always problematic and most scripts aren't very helpful, since it's not as easily manipulated as the AI in other games (Paradox series,Civilization) etc.
    I'll try to play test with this sub mod when I'll have more free time. Your idea looks interesting and I hope it'll have a positive impact.

    Cheers.

  10. #10

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Thank you.
    The first "release" version, which has the core functionality in place, is done now. Looking forward to feedback and impressions.
    I'll test this for a while and make changes if I find bugs. The specific balancing will be an ongoing process and is easily adapted to anyones liking. The faction lists now come in blocks by area that can be easily understood (e.g. the iberian block) and lines have been commented out instead of removed for intuitive editing.
    Last edited by CIaagent11; October 18, 2017 at 05:10 PM.

  11. #11

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Very nice! Should I start a new game, or does it work with the started?

  12. #12

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    It works just fine, but for best results start a new one.

    Get the new version. The 1.0 had a bug where it considered factions smaller if they were the same size, instead of considering them smaller if there is a difference of two, because the + 1 was on the wrong side of the comparison.
    Last edited by CIaagent11; Yesterday at 03:41 AM.

  13. #13

    Default Re: [Submod] Peace Treaty Script (Realistic Expansion) *testers appreciated*

    Thanks for this. I've been using it in my new Sparta campaign. It seems to be working well for the most part, limiting expansion of minors but it is causing some strange behaviour. Bithynia declared on Pergamon, my ally, who I joined. However, the next turn I automatically made peace with Bithynia, but they were still at war with Pergamon. It also seems that Galatia is declaring war, capturing a city in one turn and then being forced to make peace the next turn, allowing it to keep the city without retaliation.

Posting Permissions

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