Page 1 of 5 12345 LastLast
Results 1 to 20 of 81

Thread: Archaon's Modification Files: Player restrictions on attacking aliies [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

  1. #1

    Default Archaon's Modification Files: Player restrictions on attacking aliies [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    Archaon's Loyal Allies

    Inspired by the overwhelming response to my files made for TA:TW a M2TW mod - I have made this mod for both M2TW & M2TW-K. !!!
    The thread for the TA:TW version of this mod can be found here.

    NOTE: THIS DOES NOT MAKE UNBREAKABLE ALLIANCES - Read the entire first post, and the thread itself for more info.

    This will work with Vanilla AND ANY OTHER MOD - so long as you do not have to over-write any of the files.
    PM me if you have a question or suggestion.

    Do you want two factions that are Allied to honor the Alliance?
    To make the AI not send a vessel to a port and blockade, ruining the alliance!
    To stop the AI roaming armies turn on their allies' undefended region instead of reinforce it like a ally would!
    To send an Emissary (Diplomat) to tell their ally they want to break the alliance?

    Then this is the perfect mod!

    This file will disable any army or navy units attempting to attack an ally Army, Settlement, Navy, or Port.
    Yes that is right - the AI will not break alliances by simply following their silly coded invasions!

    If you ever wanted to invade an Ally's settlement or attack their armies, you will first need to send in a diplomat and tell them you no longer want the alliance.

    For the AI and player alike, there are many other ways the Alliance can break. For instance, an allied factions diplomat receives a terrible proposal, they inform you an alliance is no longer necessary! happens all the time!
    Other ways the alliance can break, is if two factions are allied, but one goes to war with a faction the other ally is allied to, then the original 2 factions will break their alliance.

    Then the cold war tactics could also break to alliance, (AS IT SHOULD), Assassins, spies, merchant, any of these fail a mission or acquisition, it is highly possible your ally will find out an not be too pleased.

    In Game;


    Installation;
    Download the attached files
    *descr_cursor_actions.txt
    *descr_cursor_tooltips_lookup.txt
    *cursor_action_tooltips.txt

    1. Copy the first two files to your "SEGA\Medieval II Total War\data\" directory. (i.e. *descr_cursor_actions.txt & descr_cursor_tooltips_lookup.txt)
    2. Copy cursor_action_tooltips.txt to your "SEGA\Medieval II Total War\data\text\" directory.


    Load the game!
    It is savegame compatible.

    Licensing:
    Open - free for anyone to use (with Credit given).
    This is directed at anyone who wishes to use my modified files.

    Optional script options to enhance AI realism using this mod:


    1. If the player breaks an alliance, all his other allies might choose to break their alliance with the player too!

    Code:
    monitor_event FactionBreakAlliance FactionType FactionA
        and not IsFactionAIControlled
         if not I_LocalFaction FactionB
        and DiplomaticStanceFromFaction FactionB = Allied
        and RandomPercent < 25
        console_command diplomatic_stance FactionA FactionB neutral
        end_if
         if not I_LocalFaction FactionC
        and DiplomaticStanceFromFaction FactionC = Allied
        and RandomPercent < 25
        console_command diplomatic_stance FactionA FactionC neutral
        end_if
    ect
    
    … continue for each faction ...
    end_monitor
    2. A new leader, means new views. If the leader has low Authority it is likely he holds less respect for the legacy he has behind him, so it likely that he may choose not to keep the alliances once forged by the old leader, or the allies might see this leader in a different light and not keep to their vowels.
    Code:
    monitor_event BecomesFactionLeader FactionType FactionA
        and DiplomaticStanceFromFaction FactionB = Allied
        and I_FactionLeaderAttribute FactionA Authority <= 2
        and RandomPercent < 10
        console_command diplomatic_stance FactionA FactionB neutral
    end_monitor
    3. Any leader spying on an ally is bound to be found out, do you think the alliance will hold after such transgression?
    Code:
    monitor_event LeaderOrderedSpyingMission FactionType FactionA
        and TargetFactionType FactionB
         and DiplomaticStanceFromFaction FactionB = Allied
        and RandomPercent < 25
        console_command diplomatic_stance FactionA FactionB neutral
    end_monitor
    4. Any leader who is found assassinating allies is bound to be caught, do you think the alliance will hold after such transgression?
    Code:
    monitor_event LeaderOrderedAssassination FactionType FactionA
        and TargetFactionType FactionB
         and DiplomaticStanceFromFaction FactionB = Allied
        and RandomPercent < 25
        console_command diplomatic_stance FactionA FactionB neutral
    end_monitor
    5. Get caught sabotaging and ally, pay the price!
    Code:
    monitor_event LeaderOrderedSabotage FactionType FactionA
        and TargetFactionType FactionB
         and DiplomaticStanceFromFaction FactionB = Allied
        and RandomPercent < 25
        console_command diplomatic_stance FactionA FactionB neutral
    end_monitor
    Thanks to Vegas_bear for support and the below;

    First rule of modding - make a back-up of all files that are going to be changed/replaced. I usually place a "Z_" in front of the file that is to be changed/replaced. Keeps them all together at the bottom of the folder. You could do that with the cursor_action_tooltips.txt.strings.bin.

    With just a text file in the text folder, the game will create a new .strings.bin file when the game starts up.

    If you add any files to vanilla, either packed or unpacked, you need to add " --io.file_first" to your shortcut.

    IE -
    HTML Code:
    ....SEGA\Medieval II Total War\Launcher.exe" --io.file_first

  2. #2
    Kleomenis's Avatar Semisalis
    Join Date
    Jun 2006
    Location
    Cyclades, Hellas
    Posts
    496

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS!

    Thanks Archaon + rep for your work!

  3. #3
    DAVIDE's Avatar QVID MELIVS ROMA?
    Join Date
    Nov 2005
    Location
    ITALIA
    Posts
    15,811

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS!

    can u tell me what this mod does?

  4. #4

    Default

    Do you want two factions that are Allied to honor the Alliance?
    To make the AI not send a vessel to a port and blockade, ruining the alliance!
    To stop the AI roaming armies turn on their allies' undefended region instead of reinforce it like a ally would!
    To send an Emissary (Diplomat) to tell their ally they want to break the alliance?

    Then this is the perfect mod!

    This file will disable any army or navy units attempting to attack an ally Army, Settlement, Navy, or Port.
    Yes that is right - the AI will not break alliances by simply following their silly coded invasions!

    If you ever wanted to invade an Ally's settlement or attack their armies, you will first need to send in a diplomat and tell them you no longer want the alliance.

    For the AI and player alike, there are many other ways the Alliance can break. For instance, an allied factions diplomat receives a terrible proposal, they inform you an alliance is no longer necessary! happens all the time!
    Other ways the alliance can break, is if two factions are allied, but one goes to war with a faction the other ally is allied to, then the original 2 factions will break their alliance.

    Then the cold war tactics could also break to alliance, (AS IT SHOULD), Assassins, spies, merchant, any of these fail a mission or acquisition, it is highly possible your ally will find out an not be too pleased.

    EDIT:

    Some scripts are added, in case people want to add some flavor to this new M2TW feature!

  5. #5
    DAVIDE's Avatar QVID MELIVS ROMA?
    Join Date
    Nov 2005
    Location
    ITALIA
    Posts
    15,811

    Default

    interesting. i m dowloading it. +rep

    i m playin with papal state but allies has the attitude to make bad jokes to me. Your mini mod could be useful

    i resumed my MedII vanilla campaign savegame, but i can still attack allies and allies do the same with me.. are u sure i dont need io_first to use you mod?
    Last edited by Archaon; August 31, 2009 at 04:47 PM. Reason: double post

  6. #6
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,434

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    and will the AI send a diplomat saying ''we dont want our alliance anymore'' in order to attack?
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod

  7. #7

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    Quote Originally Posted by davide.cool View Post
    interesting. i m dowloading it. +rep

    i m playin with papal state but allies has the attitude to make bad jokes to me. Your mini mod could be useful

    i resumed my MedII vanilla campaign savegame, but i can still attack allies and allies do the same with me.. are u sure i dont need io_first to use you mod?
    Only for Vanilla, i should add that to the install instructions..

    @Swagger,
    Explained above..
    This is a mod to prevent exactly what you wrote.
    The AI will always want to attach an ally that needs the ally! because if a faction leaves a province weak, an ally AI decision is always going to want to take it as its own! regardless of the overall state of both factions..
    The AI will still send armies into your provinces, but instead of attacking you, they will help defend against enemies.

    AI diplomats do advise they want to break an alliance, if relations are bad, and you offer a bad diplomatic exchange and insult them. Have you not seen this before? It is common in Kingdoms, not sure about M2 though because i dont play it often..

    I have added Scripts in the OP that offer alternative ways the AI would under those circumstances want to attack. For example, the game will already break an alliance for a failed spy or assassination mission, but i have added a chance that an ally will break an alliance regardless if the mission fails or not, based on suspicion an ally would tolerate such an action!

  8. #8
    DAVIDE's Avatar QVID MELIVS ROMA?
    Join Date
    Nov 2005
    Location
    ITALIA
    Posts
    15,811

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    i m playing vanilla but allies can attack me anyway

  9. #9
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    @ davide.cool
    delete map.rwm to work w/ saved games.

    I completed the scripting needed for sections #1, 2, 3, 4, and 5. You will need to copy and paste it to the campaign_script.txt. I believe the scripting is not save game compatible. The script was done for all factions. If there is an error let me know.

    Vegas_Bear
    Last edited by Vegas_Bear; September 07, 2009 at 02:19 AM.

  10. #10

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    but that means papal_states, aztecs, mongols, and timurids WILL have a benefit to hold AI/AI alliances better than all other factions...

    But nice work none-the-less, I am glad someone did this i haven't the time

    +REP!!!

    EDIT:

    Taking a second glance over the script - It might be a good idea to use a random_generate_counter instead of the RandomPercent...
    Might also be a good idea to lower spy mission and raise assassination. It doesn't feel right to all be the same..

    EDIT 2:

    Do you plan to make 1 & 2? If not, is it because you dont agree with the concept? I am craving feedback

  11. #11
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default

    Didn't realize it would give those factions a bonus. I will correct that then. First off, anyone can edit this and use my file as a base. Just give some credit as it is time consuming and to Archaon for the code.

    Ref edit #1, If you want to provide the code for the random_generate_counter instead of the RandomPercent, I will try and put that in there. And what % would you like them at? I just used your code as a guide, I thought the assassination should be higher too.

    What would the code be for merchants seizing assets? That might be interesting too.

    Ref edit #2, I didn't start #2 yet, will try and do soon. #1 will be a lot more time consuming and will take longer to do. I did #3, 4, and 5 first because they use basically the same code, easier to reproduce. I like all of the concepts. Just didn't have all the time to do it all last night. Will update my first post w/ the progression of things.

    I can tell you that the coding already given does work, as I tested it out on my RetroFit Mod.

    Update to post #9.
    Last edited by Archaon; September 06, 2009 at 05:52 PM. Reason: double post

  12. #12

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    RandomPercent will work ok with this, unless we want to make the scripts more complicated, then random_generate_counter is favorable. I am personally playing around with advanced versions of these scripts, trying to make a complex and 'visual' scenario for each..

    I don't think we need to include scripted alliances breaks for merchants seizing assets, the acquisition mechanism is already odd, and it is fairly difficult to seizing assets from an ally without break the alliance (near impossible)...

  13. #13
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    Update to post #9. All the scripting is complete.

  14. #14

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    I would like to mention that RANDOM PERCENT chances should be varied for #5 depending on the relationships between the factions.
    For instance; I am playing TATW and a classic example being the mistrust between Elf and Dwarf – they may ally together but if they prove to be untrustworthy there is high chance they will break that alliance, so a 50% is a better percentage.

    Same could be said for Catholic vs Islam factions in M2TW Vanilla..

    And again, it could be an extreme unlikelyness that ALL catholic factions would break an alliance with one another because it is unrealistic that such alliances would break easily.. so a 5-10 percent is a much better choice!

    So my suggestion to anyone using the script in post # 9 to thoroughly customize it to suite your game/mod.

    P.S. did you update the script with the missing factions?

  15. #15
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    Yes the missing factions were added to the script. Misunderstanding on my part, thought the script was for "player" controlled factions only.

    For BecomesFactionLeader script for the Papal States, I left out the Catholic factions. I didn't think that if a new Pope was elected, that would be cause for a faction to break the alliance w/ them.

    I agree w/ you about customizing the script to suite your needs. This is just a base to get started. For my version I already changed some of the RANDOM PERCENT chances between Catholic and non-Catholic factions.

    Thanks for the good mini MOD Archaon. Just glad I could help out a little.

    Vegas_Bear

  16. #16

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    Not a problem
    And thank you too, many vanilla players will love you!

    To all interested in DLV - I am proud to tell you that DLV 6.2 includes this mod officially and also the scripts in my OP (plus their own scripts).

    To all interested in TATW - I am proud to tell you that in addition to the modified files, TATW 1.3 will include versions of the scripts in my OP (I PM'd them to KK yesterday).

    To all interested in VLL - Icedie has the fully functional code, and will include in his release

  17. #17
    DAVIDE's Avatar QVID MELIVS ROMA?
    Join Date
    Nov 2005
    Location
    ITALIA
    Posts
    15,811

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    Quote Originally Posted by Vegas_Bear View Post
    @ davide.cool
    delete map.rwm to work w/ saved games.
    deleted but when i load the savegame, i can still attack allies. are u sure mod works with papal state? i m using them in campaign

  18. #18
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    To davide.cool,

    I'm sure this MOD would work on all factions. As the tool tips are not faction specific. I'm currently using the RetroFit MOD and added this in. I was already allied w/ the Papal States and this is what I get, see attached photo. I'm sure that you put the files in the right place, but might check that again. That would be the only thing that I can think of. Sorry for not being more of a help.

    Vegas_Bear

  19. #19
    DAVIDE's Avatar QVID MELIVS ROMA?
    Join Date
    Nov 2005
    Location
    ITALIA
    Posts
    15,811

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    Quote Originally Posted by Vegas_Bear View Post
    To davide.cool,

    I'm sure this MOD would work on all factions. As the tool tips are not faction specific. I'm currently using the RetroFit MOD and added this in. I was already allied w/ the Papal States and this is what I get, see attached photo. I'm sure that you put the files in the right place, but might check that again. That would be the only thing that I can think of. Sorry for not being more of a help.

    Vegas_Bear
    i pasted the files correctly, as written in readme. Is it sure it works with vanilla medieval II gold edition?

    now that i m thinking... the first 2 files in data folders ask me to overwrite, but the one in text folder no. is it sure the 3rd txt should be placed in text folder?

    in text folder i have .strings files or .BIN ones as cursor_action_tooltips.txt.strings


    EDIT: solved! i had to convert text files and run the game via io_first.
    Archaon, add to first post readme, txt converted files and io_first.bat is required to run the game with vanilla game (it's not so obvious lol.. damn me!)
    Last edited by DAVIDE; September 08, 2009 at 03:23 PM.

  20. #20
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Archaon's Loyal Allies Modification Files [M2TW & M2TW-K] - PLUS ALL OTHER MODS! **Now with some scripts available for added realism and AI assistance**

    Glad you got it to work davide.cool.

    First rule of modding - make a back-up of all files that are going to be changed/replaced. I usually place a "Z_" in front of the file that is to be changed/replaced. Keeps them all together at the bottom of the folder. You could do that w/ the cursor_action_tooltips.txt.strings.bin.

    With just a text file in the text folder, the game will create a new .strings.bin file when the game starts up.

    If you add any files to vanilla, either packed or unpacked, you need to add " --io.file_first" to your shortcut.

    IE -
    HTML Code:
    ....SEGA\Medieval II Total War\Launcher.exe" --io.file_first

Page 1 of 5 12345 LastLast

Posting Permissions

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