Results 1 to 9 of 9

Thread: Diplomatic Restrictions for 1807 Campaign

  1. #1

    Default Diplomatic Restrictions for 1807 Campaign

    So I was playing a Duchy of Warsaw campaign in 1807 lately and I found out that France wanted to kill me so bad it actually did. Also, 90% of my former allies teamed up against me. This is completely unacceptable, therefore I gave a little "push" to France.

    This minimod for the lua script file does a few diplomatic restrictions:

    - Prevents France and Poland to go to war and cancel their alliance
    - Prevents Kingodm of Italy and France from going to war and cancel their alliance
    - Prevents Naples and France to go to war (but you can cancel their alliance)
    - Prevents Spain and France to go to peace when France declares war on Spain. This starts the "Spanish Ulcer", which you, as France, will never solve completely until you get to conquer it all.

    Put the scripting file in data/campaigns/LME_1807_Campaign/ and ovewrite the existent (make a copy just in case).
    Attached Files Attached Files

  2. #2

    Default Re: Diplomatic Restrictions for 1807 Campaign

    Sorry for the double post. I accidentally used an old copy of the scripting.lua file. Here is the real fixed one. Apologies, this works ok without crashes. Please note, the diplomatic changes start on the first turn (I forgot to add that).
    Attached Files Attached Files

  3. #3

    Default Re: Diplomatic Restrictions for 1807 Campaign

    This corrections are playble for 1805, 1812 and 1815 campaigns?

  4. #4

    Default Re: Diplomatic Restrictions for 1807 Campaign

    No the file must take the other campaigns as reference. Which campaign do you want these changes to be applied to?

  5. #5

    Default Re: Diplomatic Restrictions for 1807 Campaign

    I was not very happy in campaigns that those who should be logically my allies, are fighting against me. For example, Austria and Britain in alliance with France - against Russia.
    How is it possible to correct that alliances between countries were more resistant and more logical, in its essence? Although the used during the first 2-3 years of the year?

  6. #6

    Default Re: Diplomatic Restrictions for 1807 Campaign

    Well that's fairly simple. I shouldnt be posting this here maybe, but oh well, I hope it is useful.

    Simple scripting like this will help immensely:

    Code:
     if conditions.TurnNumber(context) == 1 and CampaignUI.IsPlayersTurn() then
         scripting.game_interface:force_diplomacy("france", "britain", "trade agreement", false, false)
         scripting.game_interface:force_diplomacy("britain", "france", "trade agreement", false, false)
         scripting.game_interface:force_diplomacy("france", "britain", "regions", false, false)
         scripting.game_interface:force_diplomacy("britain", "france", "regions", false, false)
         scripting.game_interface:force_diplomacy("france", "britain", "alliance", false, false)
         scripting.game_interface:force_diplomacy("britain", "france", "alliance", false, false)
    end
    This put in scripting.lua in a specific campaign tells the game that at turn 1, and if it is the player's turn, we should force the diplomatic options of britain and france in a certain manner. In this case, we disable the trading agreements, the region trading and the alliance between France and Britain, and vice versa Britain and France. First false is "give", second is "accept".

    This will start at turn 1 and NEVER end. BUT if you wish to add it for X amount of time for example just 1 or 2 years, then you change the conditions to be checked:

    Code:
    if conditions.TurnNumber(context) < 24 and CampaignUI.IsPlayersTurn() then 
    
    ...do stuff
    
    elseif conditions.TurnNumber(context) == 24 and CampaignUI.IsPlayersTurn() then 
    
    ... do stuff
    
       end
    end
    This tells the game to check if it is less than turn 24 (1 year), if it is then fires this event. When it reaches turn 24 however, you fire another event, maybe reverting the alliances that you had estabilished earlier, or trading, or payments etc.

    This way you can control which nations do what in every moment.

    For more info check TC's thread on scripting

  7. #7

    Default Re: Diplomatic Restrictions for 1807 Campaign

    Thank you for information. I can`t write scripting, but I`ll trie.

  8. #8

    Default Re: Diplomatic Restrictions for 1807 Campaign

    There is no such thing as "I can't do". If you dont know, your best bet is learn.

  9. #9

    Default Re: Diplomatic Restrictions for 1807 Campaign

    Yes! "Learn! Learn and Learn!" as says Vladimir Lenin!

Posting Permissions

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