Results 1 to 6 of 6

Thread: New World protectorates forever

  1. #1

    Icon8 New World protectorates forever

    So I want to make a mod that will allow for New World protectorates to stay for the whole game. There is already a mod that does this (http://www.twcenter.net/forums/showt...-protectorates) HOWEVER the oaf removed fog of war as well. Anyway how I might go about doing what he has done?

  2. #2
    Alwyn's Avatar Frothy Goodness
    Content Director Patrician Citizen

    Join Date
    Feb 2014
    Location
    United Kingdom
    Posts
    9,340

    Default Re: New World protectorates forever

    Yes, I know how to create a mod which causes the protectorates to remain throughout the game (unless they are conquered), so that they will not be absorbed by Britain, France and Spain. You would need to edit the scripting.lua to remove the section which hands over the new world protectorates to Britain, France and Spain. I did this, made an edited a scripting.lua file available and unlocked the New World protectorates for play as part of my These United Colonies mod. I didn't do anything to remove fog of war.

    You will find the scripting.lua file in your C:/ProgramFiles(x86)/Steam/steamapps/common/Empire Total War/campaigns/main folder. You can edit the scripting.lua with a simple text editor such as Notepad, you don't need to use Pack File Manager or DB editor.

    Before editing anything, I recommend making a back-up copy of the original, unedited file, for example by copying it into a new sub-folder of Empire Total War/campaigns/main called something like 'vanilla files.'

    The part of the scripting.lua which you need to delete is below (it is almost at the start of the text in the scripting.lua file):-

    local function OnFactionTurnStart(context)
    if conditions.TurnNumber(context) == 1 then
    if conditions.FactionName("cherokee", context) and conditions.FactionIsHuman("cherokee", context) then
    scripting.game_interface:trigger_custom_mission("britain_protectorate", "cherokee", "capture_city", 0, "Acadia", "", "main_mission_capture_city_text", "main_protectorate_new_spain_reward", 2000, "", context)
    end
    elseif conditions.TurnNumber(context) == 2 then
    if conditions.FactionName("britain", context) and conditions.FactionIsHuman("britain", context) then
    scripting.game_interface:trigger_custom_mission("britain_protectorate", "britain", "protectorate_region_capture", 0, "georgia_usa+cherokee_territory+new_france", "", "mission_text_text_main_protectorate_thirteen_colonies_text", "mission_text_text_main_protectorate_thirteen_colonies_reward", 0, "thirteen_colonies", context)
    elseif conditions.FactionName("spain", context) and conditions.FactionIsHuman("spain", context) then
    scripting.game_interface:trigger_custom_mission("spain_protectorate", "spain", "protectorate_region_capture", 0, "trinidad_tobago+tejas+curacao", "", "mission_text_text_main_protectorate_new_spain_text", "mission_text_text_main_protectorate_new_spain_reward", 0, "new_spain", context)
    elseif conditions.FactionName("france", context) and conditions.FactionIsHuman("france", context) then
    scripting.game_interface:trigger_custom_mission("france_protectorate", "france", "protectorate_region_capture", 0, "michigan_territory+algonquin_territory+cherokee_territory", "", "mission_text_text_main_protectorate_louisiana_text", "mission_text_text_main_protectorate_louisiana_reward", 0, "louisiana", context)
    end
    elseif conditions.TurnNumber(context) == 5 then
    scripting.game_interface:enable_auto_generated_missions(true)
    end

    if conditions.FactionName("britain", context) and not conditions.FactionIsHuman("britain", context) then
    scripting.game_interface:grant_faction_handover("britain", "thirteen_colonies", 6, 15, context)
    elseif conditions.FactionName("spain", context) and not conditions.FactionIsHuman("spain", context) then
    scripting.game_interface:grant_faction_handover("spain", "new_spain", 6, 15, context)
    elseif conditions.FactionName("france", context) and not conditions.FactionIsHuman("france", context) then
    scripting.game_interface:grant_faction_handover("france", "louisiana", 6, 15, context)
    end
    end


    My other basic guides to modding ETW are listed here.
    Last edited by Alwyn; September 06, 2015 at 02:35 AM.

  3. #3

    Default Re: New World protectorates forever

    cool mod, i actually get to play against the 13 colonies as sweden on vh setting
    since i have to do it to GB ~1702 before they do it to me,
    -13 colonies never turn into USA when i finish off GB so fast
    My 6 2nd rates routed in horror from 1 brig + 1 5th rate on auto-resolve....

  4. #4

    Default Re: New World protectorates forever

    Is it possible to make the missions apply to the AI too? So, if the AI captures the regions normally required by the mission, they would get to annex their colony?

  5. #5
    Alwyn's Avatar Frothy Goodness
    Content Director Patrician Citizen

    Join Date
    Feb 2014
    Location
    United Kingdom
    Posts
    9,340

    Default Re: New World protectorates forever

    Quote Originally Posted by D@gget View Post
    Is it possible to make the missions apply to the AI too? So, if the AI captures the regions normally required by the mission, they would get to annex their colony?
    Maybe - unfortunately, my understanding of this is very limited. In the last paragraph, phrases like ...

    'if conditions.FactionName("britain", context) and not conditions.FactionIsHuman("britain", context) then [...]'

    ... seem to govern what happens if Britain, France and Spain are AI controlled, because of the 'not conditions.FactionIsHuman' part. I wonder what would happen if we replaced the phrases which seem to allow AI-controlled factions to automatically take over their protectorates with the phrases which appear to create the missions for players, so that the text would look like this:-

    if conditions.FactionName("britain", context) and not conditions.FactionIsHuman("britain", context) then scripting.game_interface:trigger_custom_mission("britain_protectorate", "britain", "protectorate_region_capture", 0, "georgia_usa+cherokee_territory+new_france", "", "mission_text_text_main_protectorate_thirteen_colonies_text", "mission_text_text_main_protectorate_thirteen_colonies_reward", 0, "thirteen_colonies", context)

    However, I imagine that it is not as simple as that - my guess is that that would simply crash the game, either on start-up or a few turns in. Can anyone advise us on whether it is possible to make the missions apply to AI-controlled factions - and, if so, how it can be done? (If it can be done, presumably their victory conditions would need to be adjusted in the startpos, to encourage them to fulfill the objectives of the missions. I know how to do that.)

  6. #6

    Default Re: New World protectorates forever

    Quote Originally Posted by Alwyn View Post
    Maybe - unfortunately, my understanding of this is very limited. In the last paragraph, phrases like ...

    'if conditions.FactionName("britain", context) and not conditions.FactionIsHuman("britain", context) then [...]'

    ... seem to govern what happens if Britain, France and Spain are AI controlled, because of the 'not conditions.FactionIsHuman' part. I wonder what would happen if we replaced the phrases which seem to allow AI-controlled factions to automatically take over their protectorates with the phrases which appear to create the missions for players, so that the text would look like this:-

    if conditions.FactionName("britain", context) and not conditions.FactionIsHuman("britain", context) then scripting.game_interface:trigger_custom_mission("britain_protectorate", "britain", "protectorate_region_capture", 0, "georgia_usa+cherokee_territory+new_france", "", "mission_text_text_main_protectorate_thirteen_colonies_text", "mission_text_text_main_protectorate_thirteen_colonies_reward", 0, "thirteen_colonies", context)

    However, I imagine that it is not as simple as that - my guess is that that would simply crash the game, either on start-up or a few turns in. Can anyone advise us on whether it is possible to make the missions apply to AI-controlled factions - and, if so, how it can be done? (If it can be done, presumably their victory conditions would need to be adjusted in the startpos, to encourage them to fulfill the objectives of the missions. I know how to do that.)
    That makes sense. I also read the script and it seems to trigger the "mission", but we don't know if such a thing works for the AI. I was expecting a simple trigger that handed over the protectorate's territories over by simply having the target regions. Doesn't look like a simple edit of the "FactionIsHuman" condition will make it happen.

Posting Permissions

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