Heavily inspired by the mechanics of the same names in Europa Universalis IV; Events and Decisions is a mod and framework that hopes to inject a bit more historical flavor into the game, and to allow other mod creators to do the same. Events and Decisions is supported by the majority of modded civs and custom mechanics. Download | Wikia The mod introduces an "Enact Decisions Panel" accessible through the Diplocorner drop-down. Decisions themselves are created/defined almost entirely via Lua (with XML/SQL for text and for certain effects via dummy buildings and policies), thus almost anything that can be done or detected via Lua, can be triggered or required by Decisions. The system is also modular, other mods can come in and introduce, remove or modify any existing decisions! Spoiler : Currently, the mod does introduce a few other things into the game; many Decisions require Magistrates, a new resource, to be enacted. A number of Magistrates will be provided at the start of the game via the Palace, and more can be gained by constructing the Judicial Court, a new National Wonder. As it stands, there are a number of Generic Decisions available to anyone, and 2 Religious Decisions that are designed to change depending on your civ's majority religion at the time (compatible with Tomatekh's mods). Each Firaxis civilization also has 2 Civ Specific Decisions, modded civilizations must have their Civ Specific Decisions supplied by their modder. For a list of Civilization Specific Decisions, see here (Graciously completed by iBurst). There is also an Events system, also inspired by EU4 (and partly by Civ 4). With random events enabled an Event will occasionally occur. Events can also be scheduled to occur at a certain time; be triggered by other Events or Decisions. Spoiler : And much like the Decisions system, the Events system is also modular; allowing other mods to add their own Events. I highly suggest checking out More Civ's Civilizations, Patria Grande, Tomatekh's Civs and JFD's Civilisations, as many of them have Decisions and/or Events support. My thanks to JFD for graciously providing events to incorporate into the base mod, to JanBoruta for his excellent artwork, to them both as well as Pouakai and Viregel for help with Decision and Event ideas; and to them all once again for help in playing testing the mod in it's earlier stages and providing feedback.
For Modders: LINK Spoiler : Decisions: Tutorial | Generator Random Events: Tutorial | Generator I haven't updated the tutorials very regularly unfortunately; so if something seems amiss, please leave a comment (either here, or in the doc) The generators will help generate the framework for your decision, simply modify the variables and run them (I suggest Repl.it or the Lua Demo)
I'm debating between when I finish the AI system (ATM they just enact them as soon as they can), or when I finish decisions for all the civs.
Very interesting. If you need testers I'm more than willing to spend a whole lot of hours playing with this.
This is absolutely amazing! Can't wait. Hopefully this is a success so people put it into their mods.
All of the More Civs civs are hopefully going to contain support for it upon release at the very least
I think it's a great idea, but how hard is it to make new decisions for modded civs (like you did with Tuscany)? Can you give an example of what kind of coding is needed to make a new decision? Because I'd totally love to incorporate compatibility for this into my mods, as long as it's within my capability.
This is extremely exciting. I can see this completely revolutionizing scenarios - imagine how complex and detailed we can make historical scenarios now! Victoria II in Civilization V, anyone?
I just realised that this could be used as a way to introduce player-initiated country forming (in the form of city flipping) when certain conditions are met on a scenario map, ala EU / Vicky. Change my previous extremely exciting to extremely extremely exciting. Think it's about time to start work on a 19th Century scenario. EDIT: Quick question: Are newly available decisions notified to the player, and are decisions made by AI's notified to the player as well?
A notification is sent when you adopt a decision (Sukritact needs to give it more flavour though ), but I don't think for when the AI does.
JFD has mentioned he found it relatively intuitive. It does assume that you are familiar with Lua however. Here's an example: Code: -------------------------------------------------------------------------------------------------------------------------- -- Ottomans: Adopt the Devshirme System -------------------------------------------------------------------------------------------------------------------------- local Decisions_OttomanDevshirme = {} Decisions_OttomanDevshirme.Name = "TXT_KEY_DECISIONS_OTTOMANDEVSHIRME" Decisions_OttomanDevshirme.Desc = "TXT_KEY_DECISIONS_OTTOMANDEVSHIRME_DESC" HookDecisionCivilizationIcon(Decisions_OttomanDevshirme, "CIVILIZATION_OTTOMAN") Decisions_OttomanDevshirme.CanFunc = ( function(pPlayer) if pPlayer:GetCivilizationType() ~= GameInfoTypes.CIVILIZATION_OTTOMAN then return false, false end if load(pPlayer, "Decisions_OttomanDevshirme") == true then Decisions_OttomanDevshirme.Desc = Locale.ConvertTextKey("TXT_KEY_DECISIONS_OTTOMANDEVSHIRME_ENACTED_DESC") return false, false, true end local iCost = math.ceil(pPlayer:GetNumCities() * iMod * 150) Decisions_OttomanDevshirme.Desc = Locale.ConvertTextKey("TXT_KEY_DECISIONS_OTTOMANDEVSHIRME_DESC", iCost) if (pPlayer:GetGold() < iCost) then return true, false end if (pPlayer:GetCapitalCity() == nil) then return true, false end if not(Teams[pPlayer:GetTeam()]:IsHasTech(GameInfoTypes.TECH_GUNPOWDER)) then return true, false end if (Teams[pPlayer:GetTeam()]:IsHasTech(GameInfoTypes.TECH_RIFLING)) then return true, false end if (pPlayer:GetNumResourceAvailable(iMagistrate, false) < 2) then return true, false end return true, true end ) Decisions_OttomanDevshirme.DoFunc = ( function(pPlayer) local iCost = math.ceil(pPlayer:GetNumCities() * iMod * 100) pPlayer:ChangeGold(-iCost) pPlayer:ChangeNumResourceTotal(iMagistrate, -2) for pCity in pPlayer:Cities() do InitUnitFromCity(pCity, GameInfoTypes.UNIT_OTTOMAN_JANISSARY, 1) end save(pPlayer, "Decisions_OttomanDevshirme", true) end ) tDecisions.Decisions_OttomanDevshirme = Decisions_OttomanDevshirme Basically a decision is a Lua table, which you supply a name, a description, a "CanFunc" and a "DoFunc" to. There will also be a number of global entries and functions that I will ask people not alter (adding a decision basically amounts to including an extra Lua file in an ever increasingly long line of includes). A more detailed tutorial, but I warn that you go through this at your own risk, everything is subject to alteration until release: LINK In addition to what is stated above, there's also a notification when a Decision become available; though there will be a 1 turn delay between it becoming available and the notification.
Just curious here. Wouldn't it be possible to set up an Lua event and then just have authors adding new Decisions use a listener with the Add function? That would allow plug and play functionality and would avoid having to alter the core file to add new includes.