That should be possible; though I can't say I see a difference functionally. The altering of includes is already done modularly (it already is plug and play); none of the core files need to be altered.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.
Oh, if anyone would like to propose National Decisions for those civs that still lack decisions, feel free to do so. I can't guarantee I will use them, but ideas will be helpful nonetheless.
<Row Tag="TXT_KEY_DECISIONS_AMERICANPURCHASE">
<Text>The Louisiana Purchase</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_AMERICANPURCHASE_DESC">
<Text>
In 1803 Napoleon of France was hard pressed for cash as he was set on a dream of European hegemony. He therefore offered the Louisiana Territory, a vast region between the Mississippi and the Rockies against a lump sum of 15 million dollars. The President and the Senate agreed and the United States nearly doubled its size.[NEWLINE]
[NEWLINE]Requirement/Restrictions:
[NEWLINE][ICON_BULLET]Player must be America
[NEWLINE][ICON_BULLET]Must have completed at least 1 Social Policy tree
[NEWLINE][ICON_BULLET]May only be enacted once per game
[NEWLINE]Costs:
[NEWLINE][ICON_BULLET]{1_Gold} [ICON_GOLD] Gold
[NEWLINE][ICON_BULLET]2 [ICON_MAGISTRATES] Magistrates
[NEWLINE]Rewards:
[NEWLINE][ICON_BULLET]Founded cities start with additional territory
</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_SIAMEMBASSIES">
<Text>Send Out Embassies</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_SIAMEMBASSIES_DESC">
<Text>
Siam's position as one of the greatest empires in the world must be properly established. Sending embassies to the many lesser nations should help to proclaim our glory![NEWLINE]
[NEWLINE]Requirement/Restrictions:
[NEWLINE][ICON_BULLET]Player must be Siam
[NEWLINE][ICON_BULLET]Must know at least 4 City States
[NEWLINE][ICON_BULLET]Player must be at Peace
[NEWLINE][ICON_BULLET]May only be enacted in the Renaissance or Industrial Era
[NEWLINE][ICON_BULLET]May only be enacted once per game
[NEWLINE]Costs:
[NEWLINE][ICON_BULLET]{1_Gold} [ICON_GOLD] Gold
[NEWLINE][ICON_BULLET]2 [ICON_MAGISTRATES] Magistrates
[NEWLINE]Rewards:
[NEWLINE][ICON_BULLET]+80 [ICON_INFLUENCE] Influence with 1 random City State
[NEWLINE][ICON_BULLET]+40 [ICON_INFLUENCE] Influence with 3 random City States
</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_EGYPTIANNOME">
<Text>Establish the Nomes</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_EGYPTIANNOME_DESC">
<Text>
Ancient Egypt was divided into 42 subdivisions called Nomes or Sepats; this division remained in place for more than three millennia. The areas of the individual Nomes and their ordering remained remarkably stable. Some, like Xois in the Delta or Khent in Upper Egypt, were first mentioned on the Palermo stone, which was inscribed in the Fifth Dynasty. The names of a few, like the nome of Bubastis, appeared no earlier than the New Kingdom.[NEWLINE]
[NEWLINE]Requirement/Restrictions:
[NEWLINE][ICON_BULLET]Player must be Egypt
[NEWLINE][ICON_BULLET]May only be enacted once per game
[NEWLINE]Costs:
[NEWLINE][ICON_BULLET]{1_Cost} [ICON_GOLD] Gold
[NEWLINE][ICON_BULLET]{1_Cost} [ICON_PEACE] Faith
[NEWLINE][ICON_BULLET]1 [ICON_MAGISTRATES] Magistrates
[NEWLINE]Rewards:
[NEWLINE][ICON_BULLET]Unlocks the "Empower the Pharaoh" Decision
[NEWLINE][ICON_BULLET]Unlocks the "Empower the Nomarchs" Decision
[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Note: The two unlocked Decisions will allow you to gain [ICON_GOLD] Gold or [ICON_PEACE] Faith from Enacting Decisions[ENDCOLOR]
</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_EGYPTIANPHARAOH">
<Text>Empower the Pharaoh</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_EGYPTIANPHARAOH_DESC">
<Text>
Centralise power within the empire. Let Pharaoh, the Embodiment of Horus, Lord of the Two Lands, reign supreme as God-King over all of Egypt! Long may he reign![NEWLINE]
[NEWLINE]Requirement/Restrictions:
[NEWLINE][ICON_BULLET]Player must be Egypt
[NEWLINE][ICON_BULLET]"Establish the Nomes" must be enacted
[NEWLINE][ICON_BULLET]May only be enacted once per game
[NEWLINE]Costs:
[NEWLINE][ICON_BULLET]1 [ICON_MAGISTRATES] Magistrates
[NEWLINE][ICON_BULLET]Unenacts the "Empower the Nomarchs" Decision if enacted
[NEWLINE]Rewards:
[NEWLINE][ICON_BULLET]Receive {1_Reward} [ICON_PEACE] Faith when you enact a decision.
[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Note: the amount received will increase as you advance through the Eras[ENDCOLOR]
</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_EGYPTIANNOMARCH">
<Text>Empower the Nomarchs</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_EGYPTIANNOMARCH_DESC">
<Text>
Lessen the burden on Pharaoh's shoulders and de-centralise power within the empire. Let the Nomarchs assume greater control over their respective Nomes[NEWLINE]
[NEWLINE]Requirement/Restrictions:
[NEWLINE][ICON_BULLET]Player must be Egypt
[NEWLINE][ICON_BULLET]"Establish the Nomes" must be enacted
[NEWLINE][ICON_BULLET]May only be enacted once per game
[NEWLINE]Costs:
[NEWLINE][ICON_BULLET]1 [ICON_MAGISTRATES] Magistrates
[NEWLINE][ICON_BULLET]Unenacts the "Empower the Pharaoh" Decision if enacted
[NEWLINE]Rewards:
[NEWLINE][ICON_BULLET]Receive {1_Reward} [ICON_GOLD] Gold when you enact a decision.
[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Note: the amount received will increase as you advance through the Eras[ENDCOLOR]
</Text>
</Row>
<!-- Denmark -->
<Row Tag="TXT_KEY_DECISIONS_DENMARKRAID">
<Text>Go on a Viking against {1_Name}</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_DENMARKRAID_DESC">
<Text>
The people of {1_Name} are rich and fat. We shall do what our people have always done, and call a raid against them. Our blades will fall upon them as we claim their riches for our own![NEWLINE]
[NEWLINE]Requirement/Restrictions:
[NEWLINE][ICON_BULLET]Player must be Denmark
[NEWLINE][ICON_BULLET]Must have a Melee Unit in the Capital
[NEWLINE][ICON_BULLET]May not be enacted after the Medieval era
[NEWLINE][ICON_BULLET]May only be enacted once per City State[NEWLINE][ICON_BULLET]May only be enacted 8 times per game[NEWLINE]Costs:
[NEWLINE][ICON_BULLET]{2_Chance}% chance the unit is killed
[NEWLINE][ICON_BULLET]-60 [ICON_INFLUENCE] Influence with {1_Name}
[NEWLINE]Rewards:
[NEWLINE][ICON_BULLET]{3_Reward} [ICON_GOLD] Gold
[NEWLINE][NEWLINE][COLOR_POSITIVE_TEXT]Note: Higher level units are less likely to be killed[ENDCOLOR]
</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_SPAINCOLUMBUS">
<Text>Fund Columbus's Expedition</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_SPAINCOLUMBUS_DESC">
<Text>
Explorer Christopher Columbus made two attempts in 1485 and 1488 to convince the King of Portugal, John III, to finance an expedition to try and find a western route to the Orient. After being rejected the second time, Columbus turned his efforts towards the Spanish Crown. Backed up by Italian investors, Columbus finally managed to convince King Ferdinand to agree to the expedition. In August 1492, after having been made 'Admiral of the Seas' and promised a share of the profits, Columbus finally set sail.[NEWLINE]
[NEWLINE]Requirement/Restrictions:
[NEWLINE][ICON_BULLET]Player must be Spain
[NEWLINE][ICON_BULLET]Must have researched Astronomy
[NEWLINE][ICON_BULLET]May only be enacted once per game
[NEWLINE]Costs:
[NEWLINE][ICON_BULLET]{1_Gold} [ICON_GOLD] Gold
[NEWLINE]Rewards:
[NEWLINE][ICON_BULLET]2 Caravels appear near the Capital
[NEWLINE][ICON_BULLET]A Great Admiral appears near the Capital
[NEWLINE][NEWLINE][COLOR_NEGATIVE_TEXT]Warning: Your Capital should be within working range of an Ocean[ENDCOLOR]
</Text>
</Row>
<!-- Rome -->
<Row Tag="TXT_KEY_DECISIONS_ROMANCONCRETE">
<Text>Introduce Concrete</Text>
</Row>
<Row Tag="TXT_KEY_DECISIONS_ROMANCONCRETE_DESC">
<Text>
The development of concrete transformed Roman construction methods. The addition of Pozzolana, a sandy black volcanic ash named after an area around the Bay of Naples, created a stronger paste which allowed for construction underwater, something crucial for bridge building. Concrete also allowed the construction of elaborate architectural features, such as curved columns and arches, the most notable examples of these being in the Pantheon in Rome.[NEWLINE]
[NEWLINE]Requirement/Restrictions:
[NEWLINE][ICON_BULLET]Player must be Rome
[NEWLINE][ICON_BULLET]Must have researched Engineering
[NEWLINE][ICON_BULLET]May only be enacted once per game
[NEWLINE]Costs:
[NEWLINE][ICON_BULLET]{1_Science} [ICON_RESEARCH] Science
[NEWLINE][ICON_BULLET]1 [ICON_MAGISTRATES] Magistrates
[NEWLINE]Rewards:
[NEWLINE][ICON_BULLET]+10% [ICON_PRODUCTION] Production when constructing Buildings or Wonders in the Capital
</Text>
</Row>
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).
Usually the CanFunc ends up being much longer in my experience; since it determines whether the decision is locked, enactable, enacted or not visible in the first place.The code rather reminds me of the modified UI code I've been using to add new missions -- DoFunc is the meat of the function, doing whatever you need it to do.
Something I defined; it will give units the appropriate experience and promotions from the given city. For naval units, it will place them on the first valid tile with water; or failing that the city itself.As an aside, is InitUnitFromCity a core lua function, or is it something you defined?
I know that not everybody share this idea, and you are doing already an huge (and I think, very difficult) work, so, in alternative, could you maybe consider to make civ specific decisions easy to generalize for a mod maker ?
Since Decisions are just a bunch of tables in the tDecisions table, removing a Decision really is as simple as "tDecisions.Decisions_OttomanDevshirme = nil", the whole table can be cleared with "tDecisions = {}".Granted the civ specific decisions can suspend the alternate history tone of the game, Sukritact has indicated that any decisions can be quite easily disabled.
How about something that changes the purpose of a particular building (if that's possible) - e.g. the monuments becoming tourist attractions (+1 tourism) but losing the culture element?