1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[MOD] Liberation boost

Discussion in 'Civ5 - Mod Components' started by smellymummy, Nov 3, 2010.

  1. smellymummy

    smellymummy King

    Joined:
    Jul 31, 2002
    Messages:
    705
    not compatible with G&K

    Mod:
    this simple lua script mod component boosts the state of a liberated player. once liberated the new player:

    • receives every technology the liberator has researched
    • tech appropriate units
    • tech appropriate defensive buildings
    • a worker
    • a little gold
    • declaration of war on everyone at war with the liberator

    Installation:
    Download and extract into your documents / my games / civ5 / MODS directory

    Compatibility:
    Should be no compatibility problems, InGame.xml free, the only things to watch out for is if another MOD changes the indexes of the default defensive buildings and their required technologies, and the worker unit (all of which can be quickly edited to whatever new value you need)


    version history:

    Spoiler :

    v1.11 - 11/17/10
    using verbose=1 mode to print, so less console spam
    removed the need to require InGame.xml

    v1.1 - 11/08/10
    will get UUs if the civ has one instead of the basic spear/pike/musket/etc
    added tech check for free defensive building given (walls, castle or mughal, defense base)
    complete kills options should not be a problem anymore

    v1 - 11/03/10
    first release


    notes:

    Spoiler :

    still wish to add diplo between the liberator and liberated deals, but if those are available to edit/add it's very well hidden

    add a check for coastal cities to drop a naval unit or two, also maybe add a check for available resources to spawn a few attack units

    the lua script is very straightforward and easily modifiable to whatever


    feedback, bug reports, suggestions, etc most welcome
    enjoy!
     

    Attached Files:

  2. smellymummy

    smellymummy King

    Joined:
    Jul 31, 2002
    Messages:
    705
    1.1 update uploaded
     
  3. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    This sounds interesting, installed! :)

    I really miss vassel states from BTS, and this somewhat brings it back into the game. I'm not sure it's possible, but it would be great if the liberated AI also immediately offers the liberator all their resources free for 45 turns (like after surrendering).
     
  4. smellymummy

    smellymummy King

    Joined:
    Jul 31, 2002
    Messages:
    705
    i'm not sure if its possible either. ive yet to find any function to set up deals.

    the closest thing there is available is to activate coop/secrecy pacts for example, but that results in the game opening up the leaderhead message with the leader saying 'glad you agree' or whatever their message is

    tradelogic.lua would of been a great place to find examples but that's all done via the UI and diplodiscussion interface... so i think its possible to say open up the trade window drop the trade items in the trade window, but having the AI accept the deal is another matter

    and this obviously wont work for AI-AI deal making
     
  5. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,274
    Location:
    Venice, California
    Most of what this mod promises sounds great to me. One question has to do with matching tech. The odds are that the human civ is near the top of the tech lead. This skyrockets the liberated civ in a way that is logically unlikely and a gigantic leap utterly unlike anything else in the game. I would think that the liberated tech should be more of a backwater vassal rather than an instant civic model! Might it make more sense to let the Tech Diffusion mod work its magic here and let the civ catch up in a more gradual way?

    One more point - will the liberated civ declaring war leave it in too vulnerable a place once the human makes peace?
     
  6. smellymummy

    smellymummy King

    Joined:
    Jul 31, 2002
    Messages:
    705
    i agree that the liberated civs can seem to be heavily teched, i suppose having them trail a bit behind the liberator would be a bit more natural, but i don't think backwater should do it. a few techs behind in most fields except the one that decides which units it gets could work. some checks on it's territory could be put in also, ie you liberate a tundra town they shouldn't really be the next top of the line civ ;)

    their old capital with wonders and advanced buildings on the other hand...

    the idea is to have a brand new ally/vassalish state joining sides with the player that liberates. i'm not sure, but don't they provide an auto UN vote? i was hoping once diplo deals can be seamlessly added i'll be making it so the AI liberates more often to actually have it win via UN.

    edit: never thought about the peace ramifications, thanks for bringing it up! some more checks to put in to force some peace deals if they're warranted
     
  7. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,274
    Location:
    Venice, California
    I think the goal of the liberated civ being a semi-vassal is ideal. Any checks that you can put in regarding tech, so that it's closer to Tech Diffusion than Top of the Line, seems good to me. And yes, liberated cities do vote for you in the UN, even if their leader's attitude may leave something to be desired.

    I love the idea of the AI going for a liberation-based UN win. This may be possible after the next patch.

    I'm about to try your mod in a new game, so I'll post back if it comes into play. (ANd if it's a close call, it will!)
     
  8. Erendir

    Erendir Chieftain

    Joined:
    Oct 31, 2005
    Messages:
    59
    You missed file extension in .modinfo, line34:
    Code:
    <EntryPoint type="CityViewUIAddin" file="liberationboost[COLOR="Red"].lua[/COLOR]">
    This is probably the reason of
    Code:
     Runtime Error: [string "Assets/UI/InGame/CityView/CityView.lua"]:2271: attempt to index local 'addinFile' (a nil value)
     Runtime Error: Error loading Assets/UI/InGame/CityView/CityView.lua.
    errors in Lua Console.

    Also, Liberation boost (v 1.11) breaks Free-Research Balance Mod (v 2.1) and Improved Notifications (v 6) mods:
    Code:
     CivilopediaScreen: CivilopediaCategory[CategoryHomePage].DisplayList
    [B] Runtime Error: [string "CustomNotification.lua"]:62: attempt to call global 'class' (a nil value)
     Runtime Error: Error loading CustomNotification.lua.
     Runtime Error: [string "NotificationOptions.lua"]:75: attempt to call global 'aprint' (a nil value)[/B]
     GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
    [I]... uninteresting ...[/I]
     GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivGoldPopup.lua
    [B] Runtime Error: [string "C:\Users\MYUSERNAME\Documents\My Games\Sid Meier..."]:37: attempt to call global 'class' (a nil value)
     Runtime Error: Error loading C:\Users\MYUSERNAME\Documents\My Games\Sid Meier's Civilization 5\MODS\Free-Research Balance Mod (v 2.1)\CustomMissionHandler.lua.[/B]
     InfoAddictHistoricalData: INFO:  loadPlayerDataTable() from 0 to 0 took 0s to complete.
     InfoAddictCivRelations: INFO:  Total time to build political view: 0.0039999999999054s
     InfoAddictHistoricalData: INFO:  loadPlayerDataTable() from 0 to 0 took 0s to complete.
    [B] Runtime Error: [string "Assets/UI/InGame/WorldView/UnitPanel.lua"]:157: attempt to index field 'CustomMission' (a nil value)[/B]
     \Users\MYUSERNAME\Documents\My Games\Sid Meier's Civilization 5\MODS\Free-Research Balance Mod (v 2.1)\DiscoverMission: Warning: cache not shared.
    
     
  9. Optik

    Optik Chieftain

    Joined:
    Mar 24, 2011
    Messages:
    75
    Location:
    France
    This is a really nice script, I have no knowledge on lua but I understand some lines.

    What should I do (add/change) if I want to get a free unit (which I created) pop after a captured city and not a liberated one?
     
  10. mattcrwi

    mattcrwi Warlord

    Joined:
    May 16, 2010
    Messages:
    147
    Has anyone testing this mod with the lastest patch? It didn't work for me but its possible other mods are conflicting. I have civ willard and CS dilpo mod installed. Any idea why it wouldn't work? I really like the concept behind it.
     
  11. Kasdar

    Kasdar Warlord

    Joined:
    Jul 29, 2006
    Messages:
    268
    Location:
    Minnesota
    Is this working with the latest patch? possible to get an update?
     
  12. crazedcivplayer

    crazedcivplayer Chieftain

    Joined:
    Jul 25, 2011
    Messages:
    5
    I had thought it would be a good idea if a defensive pact came with this, but in lua file it does note this is not possible. I recently played a game in which I ended up liberating India but they were guarded afterwards, I felt a bit put out by their ungratefulness and was wondering if there's some kind of friendship mechanic or at least a boost of some kind for the liberatOR and not the liberatEE. An assured vote for diplomatic victory? Somehow I think that most fitting would be a free social policy for the liberator, perhaps even two, or some kind of culture boost.
    ... a free research agreement
     
  13. smellymummy

    smellymummy King

    Joined:
    Jul 31, 2002
    Messages:
    705
    i haven't checked in for a while on this, but i clearly remember that when investigating if creating diplo ties/deals in game was possible, that the sound answer from firaxis was that doing so would be outside the 'game mechanics'

    in other words, it's possible to make diplomatic ties/deals, say for a scenario, prior to the game start, although once the game is going, 'game mechanics' prevents the establishment of new ties/deals, since the 'game mechanics' is what decides diplomacy

    maybe there was an update that enabled this.. i remember reading patch notes about how they added relation notifications? that was a little hopeful. or maybe when dll comes out it could be added in. and maybe when i have more time i'll come and fix this up too, i know i have to do some updating that's for sure ;)

    for the second point, IIRC liberated nations will always vote for the liberator for the diplo win
     
  14. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,817
    Location:
    France
    you can force declaration of friendship or denunciation (I think that's "new" since you've released this mod), but afaik defensive pact still can't be forced.
     
  15. Marss

    Marss Chieftain

    Joined:
    Sep 6, 2010
    Messages:
    7
    Thanx a lot. This is really helping me.
     
  16. Putmalk

    Putmalk Deity

    Joined:
    Sep 26, 2010
    Messages:
    2,623
    Location:
    New York
  17. wuTz

    wuTz Warlord

    Joined:
    Jan 12, 2012
    Messages:
    160
    I wanted to ask if this mod is still up to date with all patches and GK-Expansion...
     
  18. smellymummy

    smellymummy King

    Joined:
    Jul 31, 2002
    Messages:
    705
    no it isn't
     

Share This Page