View Full Version : [MOD] Liberation boost
Nov 03, 2010, 09:10 PM
not compatible with G&K
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 little gold
declaration of war on everyone at war with the liberator
Download and extract into your documents / my games / civ5 / MODS directory
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)
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
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
Nov 08, 2010, 07:46 AM
1.1 update uploaded
Nov 10, 2010, 06:06 AM
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).
Nov 11, 2010, 02:28 PM
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
Nov 15, 2010, 02:05 PM
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?
Nov 15, 2010, 05:46 PM
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
Nov 15, 2010, 05:52 PM
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!)
Jan 19, 2011, 07:40 PM
You missed file extension in .modinfo, line34:
<EntryPoint type="CityViewUIAddin" file="liberationboost.lua">
This is probably the reason of
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:
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)
GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmImprovementR ebuildPopup.lua
... uninteresting ...
GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivGoldPopup.l ua
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.
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.
Runtime Error: [string "Assets/UI/InGame/WorldView/UnitPanel.lua"]:157: attempt to index field 'CustomMission' (a nil value)
\Users\MYUSERNAME\Documents\My Games\Sid Meier's Civilization 5\MODS\Free-Research Balance Mod (v 2.1)\DiscoverMission: Warning: cache not shared.
Apr 05, 2011, 10:22 AM
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?
Apr 10, 2011, 09:36 AM
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.
May 24, 2011, 08:40 PM
Is this working with the latest patch? possible to get an update?
Jul 27, 2011, 10:29 AM
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
Jul 27, 2011, 12:48 PM
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
Jul 27, 2011, 05:19 PM
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.
Nov 02, 2011, 03:34 AM
Thanx a lot. This is really helping me.
Nov 02, 2011, 03:38 PM
I posted these thoughts down back in July (August?), if you want some ideas.
Good luck with the mod.
Jul 21, 2012, 12:44 PM
I wanted to ask if this mod is still up to date with all patches and GK-Expansion...
Jul 21, 2012, 01:05 PM
no it isn't