IdolM@ster Civilization

Divine Yuri

Never Closes Chrome
Joined
Oct 28, 2014
Messages
89
Location
Brrrr, USA
IdolM@ster Civilization
Led by Producer
Civfanatics | Steam

Requires BNW

This is my first mod for Civ5. I've been slightly dipping in and out of making a mod, but never finished one until this. Hope this is good enough for a first time mod. :D

UA:


UU:
Spoiler :


UB:
Spoiler :


Things to do:
Get the Cultural Diversity Custom Era Screens to work.
Balance

Referenced Mods:

Events and Decisions
YnAEMP
Map Labels
Civ IV Leader Traits in Civ V
JFD's Cultural Diversity (Core)
JFD’s Piety and Prestige
JFD's Exploration Continued Expanded
Community Patch
DLL - Various Mod Components

Special Thanks:
JFD, and Vice, Used their mods for reference.
Kyte ( Leugi and Lockstep ) for his Dynamic Culture Overview.
 
It looks nice.
So... It supports events and decisions?
 
It looks nice.
So... It supports events and decisions?

Yep. Right now I have 2 Decisions, and I'll add a couple events in the next build. I had one in mind, but wasn't sure how they work exactly. I was looking to make the event Fire Only Once, but wasn't sure if there was something for that.
 
You can make it spwan rarely. Its not the same, but its very similar. Or you could make it spawn... Once in, say, 200 turns.
 
You can make events fire only once - I think that's actually the most common for custom civilizations.
Here's an example from one of my own events called Account Of Corsica:
Spoiler :
Code:
--------------------------------------------------------------------------------------------------------------------------
--  An Account of Corsica
--------------------------------------------------------------------------------------------------------------------------
local Event_AccountOfCorsica = {}
	Event_AccountOfCorsica.Name = "TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA"
	Event_AccountOfCorsica.Desc = "TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA_DESC"
	Event_AccountOfCorsica.Weight = 20
	Event_AccountOfCorsica.CanFunc = (
		function(pPlayer)
			[COLOR="Lime"]if load(pPlayer, "Event_AccountOfCorsica") == true then return false end[/COLOR]
			if pPlayer:GetCivilizationType() ~= GameInfoTypes["CIVILIZATION_DMS_CORSICA"] then return false end
					
			local iGoldCost = math.ceil(600 * iMod)
			if pPlayer:GetGold() < iGoldCost then return false end
			if pPlayer:GetCurrentEra() < GameInfoTypes["ERA_RENAISSANCE"] then return false end
			
			Event_AccountOfCorsica.Desc = Locale.ConvertTextKey("TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA_DESC", iGoldCost)
			return true
		end
		)
	Event_AccountOfCorsica.Outcomes = {}
	--=========================================================
	-- Outcome 1
	--=========================================================
	Event_AccountOfCorsica.Outcomes[1] = {}
	Event_AccountOfCorsica.Outcomes[1].Name = "TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA_OUTCOME_1"
	Event_AccountOfCorsica.Outcomes[1].Desc = "TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA_OUTCOME_RESULT_1"
	Event_AccountOfCorsica.Outcomes[1].Weight = 15
	Event_AccountOfCorsica.Outcomes[1].CanFunc = (
		function(pPlayer)		
			local iGoldCost = math.ceil(600 * iMod)
			Event_AccountOfCorsica.Outcomes[1].Desc = Locale.ConvertTextKey("TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA_OUTCOME_RESULT_1", iGoldCost)
			return true
		end
		)
	Event_AccountOfCorsica.Outcomes[1].DoFunc = (
		function(pPlayer)
			local iGoldCost = math.ceil(600 * iMod)
			pPlayer:ChangeGold(-iGoldCost)
			pPlayer:InitUnit(GameInfoTypes["UNIT_CORSICA_WRITER_BOSWELL"], pPlayer:GetCapitalCity():GetX(), pPlayer:GetCapitalCity():GetY())

			[COLOR="lime"]save(pPlayer, "Event_AccountOfCorsica", true)[/COLOR]
			-- save(pPlayer, "Event_AccountOfCorsica", false) -- for testing

			JFD_SendNotification(pPlayer:GetID(), "NOTIFICATION_GENERIC", Locale.ConvertTextKey("TXT_KEY_AN_ACCOUNT_OF_CORSICA_OUTCOME_RESULT_1_NOTIFICATION"), Locale.ConvertTextKey("TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA"))
		end
		)
	--=========================================================
	-- Outcome 2
	--=========================================================
	Event_AccountOfCorsica.Outcomes[2] = {}
	Event_AccountOfCorsica.Outcomes[2].Name = "TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA_OUTCOME_2"
	Event_AccountOfCorsica.Outcomes[2].Desc = "TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA_OUTCOME_RESULT_2"
	Event_AccountOfCorsica.Outcomes[2].Weight = 5
	Event_AccountOfCorsica.Outcomes[2].CanFunc = (
		function(pPlayer)
			Event_AccountOfCorsica.Outcomes[2].Desc = Locale.ConvertTextKey("TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA_OUTCOME_RESULT_2")
			return true
		end
		)
	Event_AccountOfCorsica.Outcomes[2].DoFunc = (
		function(pPlayer) 
			-- nothing
			[COLOR="lime"]save(pPlayer, "Event_AccountOfCorsica", true)[/COLOR]
			-- save(pPlayer, "Event_AccountOfCorsica", false) -- for testing
			JFD_SendNotification(pPlayer:GetID(), "NOTIFICATION_GENERIC", Locale.ConvertTextKey("TXT_KEY_AN_ACCOUNT_OF_CORSICA_OUTCOME_RESULT_2_NOTIFICATION"), Locale.ConvertTextKey("TXT_KEY_EVENT_AN_ACCOUNT_OF_CORSICA"))
		end
		)
	
Events_AddCivilisationSpecific(GameInfoTypes["CIVILIZATION_DMS_CORSICA"], "Event_AccountOfCorsica", Event_AccountOfCorsica)
Notice that the first check in the code is if the event has fired before, i.e. if
Code:
load(pPlayer, "Event_AccountOfCorsica") == true
If this is the case, the event doesn't fire.
Also, in both options, you can see
Code:
save(pPlayer, "Event_AccountOfCorsica", true)
This makes sure, that - in this example - no matter what option you choose, the event won't fire again.

Hopefully that's of some use.

Hey, and congratulations on the release. It looks pretty impressive!
 
Top Bottom