Sukritact's Events and Decisions

Do the religious festival decisions now cost 2 magistrates in the latest version? That seems a bit steep. Everything in the files suggests it should just cost one magistrate, but in game they cost 2 now.
 
Is there a way to modify existing decisions through mods? Or is there a way to remove decisions from a civ? Decisions_RemoveCivilisationSpecific?
 
I'm playing as Venice and enacted the St Mark's decision, but the wonder didn't appear. Does the fact that I was using the CBP have anything to do with it? Also, with CID your judiciary court still appears in the civlopedia but there is no way to build it.
 
Is there a way to modify existing decisions through mods? Or is there a way to remove decisions from a civ? Decisions_RemoveCivilisationSpecific?

Take a look at Narmer to see how I modify Decisions.

I'm playing as Venice and enacted the St Mark's decision, but the wonder didn't appear. Does the fact that I was using the CBP have anything to do with it? Also, with CID your judiciary court still appears in the civlopedia but there is no way to build it.
The latter is intentional by JFD, the former, I have no idea how E&D interacts with the CBP.
 
Take a look at Narmer to see how I modify Decisions.

Code:
tDecisions.Decisions_EgyptianNome = nil

Is this what I'm looking for?
 
How would I make a decision that adds population to the capital? I'm likely missing something obvious in the code (right now, the moment the decision becomes enactable it makes all decisions vanish).

The (crappy) code I've got:
Spoiler :
local AgeModren = GameInfoTypes["ERA_MODREN"]

local Decisions_KurainBurgerz = {}
Decisions_KurainBurgerz.Name = "TXT_KEY_DECISIONS_KURAINBURGERZ"
Decisions_KurainBurgerz.Desc = "TXT_KEY_DECISIONS_KURAINBURGERZ_DESC"
Decisions_KurainBurgerz.CanFunc = (
function(pPlayer)
if pPlayer:GetCivilizationType() ~= GameInfoTypes.CIVILIZATION_KURAIN then return false, false end
if load(pPlayer, "Decisions_KurainBurgerz") == true then
Decisions_KurainBurgerz.Desc = Locale.ConvertTextKey("TXT_KEY_DECISIONS_KURAINBURGERZ_ENACTED_DESC")
return false, false, true
end

local iCost = math.ceil(4000 * iMod)
Decisions_KurainBurgerz.Desc = Locale.ConvertTextKey("TXT_KEY_DECISIONS_KURAINBURGERZ_DESC", iCost)
if (pPlayer:GetNumResourceAvailable(iMagistrate, false) < 3) then return true, false end
if (pPlayer:GetCapitalCity() == nil) then return true, false end
if (pPlayer:GetCurrentEra() < AgeModren) then return true, false end
if (pPlayer:GetGold() < iCost) then return true, false end

return true, true
end
)

Decisions_KurainBurgerz.DoFunc = (
function(pPlayer)
local iCost = math.ceil(4000 * iMod)
pPlayer:ChangeNumResourceTotal(iMagistrate, -3)
pPlayer:ChangeGold(-icost)
pPlayer:GetCapitalCity():ChangePopulation(10, true)
save(pPlayer, "Decisions_KurainBurgerz", true)
end
)

Decisions_AddCivilisationSpecific(GameInfoTypes.CIVILIZATION_KURAIN, "Decisions_KurainBurgerz", Decisions_KurainBurgerz)


I have a funny feeling I'm missing something obvious...
 
How would I make a decision that adds population to the capital? I'm likely missing something obvious in the code (right now, the moment the decision becomes enactable it makes all decisions vanish).

The (crappy) code I've got:
Spoiler :
local AgeModren = GameInfoTypes["ERA_MODREN"]

local Decisions_KurainBurgerz = {}
Decisions_KurainBurgerz.Name = "TXT_KEY_DECISIONS_KURAINBURGERZ"
Decisions_KurainBurgerz.Desc = "TXT_KEY_DECISIONS_KURAINBURGERZ_DESC"
Decisions_KurainBurgerz.CanFunc = (
function(pPlayer)
if pPlayer:GetCivilizationType() ~= GameInfoTypes.CIVILIZATION_KURAIN then return false, false end
if load(pPlayer, "Decisions_KurainBurgerz") == true then
Decisions_KurainBurgerz.Desc = Locale.ConvertTextKey("TXT_KEY_DECISIONS_KURAINBURGERZ_ENACTED_DESC")
return false, false, true
end

local iCost = math.ceil(4000 * iMod)
Decisions_KurainBurgerz.Desc = Locale.ConvertTextKey("TXT_KEY_DECISIONS_KURAINBURGERZ_DESC", iCost)
if (pPlayer:GetNumResourceAvailable(iMagistrate, false) < 3) then return true, false end
if (pPlayer:GetCapitalCity() == nil) then return true, false end
if (pPlayer:GetCurrentEra() < AgeModren) then return true, false end
if (pPlayer:GetGold() < iCost) then return true, false end

return true, true
end
)

Decisions_KurainBurgerz.DoFunc = (
function(pPlayer)
local iCost = math.ceil(4000 * iMod)
pPlayer:ChangeNumResourceTotal(iMagistrate, -3)
pPlayer:ChangeGold(-icost)
pPlayer:GetCapitalCity():ChangePopulation(10, true)
save(pPlayer, "Decisions_KurainBurgerz", true)
end
)

Decisions_AddCivilisationSpecific(GameInfoTypes.CIVILIZATION_KURAIN, "Decisions_KurainBurgerz", Decisions_KurainBurgerz)


I have a funny feeling I'm missing something obvious...

1. It's ERA_MODERN, not ERA_MODREN
2. Any errors in your Lua log?
 
I'm playing as Venice and enacted the St Mark's decision, but the wonder didn't appear. Does the fact that I was using the CBP have anything to do with it? Also, with CID your judiciary court still appears in the civlopedia but there is no way to build it.

I have the same Venice problem, I'm not using CBP
 
1. It's ERA_MODERN, not ERA_MODREN
2. Any errors in your Lua log?

Looks like that D- in spelling has come back to haunt me. :p

So what was happening was once I had enough magistrates, it checked the next line of code. Since AgeModren tried to pull data from the non-existent "ERA_MODREN", the line "if (pPlayer:GetCurrentEra() < AgeModren)" threw an error.

After fixing my spelling fail, I ran into a new error: the enact button showed up properly, but clicking it didn't do anything. After checking the LUA logs which I expected to be full of useless errors... it showed exactly one error, which pointed out the exact problem - icost was a nil value. Apparently iCost and icost are different variables.

Fixing the variable made the decision work :D So thank you very much for your help :goodjob:
 
Looks like that D- in spelling has come back to haunt me. :p

So what was happening was once I had enough magistrates, it checked the next line of code. Since AgeModren tried to pull data from the non-existent "ERA_MODREN", the line "if (pPlayer:GetCurrentEra() < AgeModren)" threw an error.

After fixing my spelling fail, I ran into a new error: the enact button showed up properly, but clicking it didn't do anything. After checking the LUA logs which I expected to be full of useless errors... it showed exactly one error, which pointed out the exact problem - icost was a nil value. Apparently iCost and icost are different variables.

Fixing the variable made the decision work :D So thank you very much for your help :goodjob:

The Lua log is by far the best log; it points you to straight to the error, even with a line number.
XML log's also nice, because it tells you what table the error's in, and it gives enough information for you to find the problem.
SQL log?
Code:
NEAR ';' SYNTAX ERROR
 
Hi,
Thanks for the great mod.
I'm playing a game and after enacting 3 decisions (formalize scales, codify laws and one religious decision) I reloaded to a former save game, before I enacted the decisions or even invented the religion.
now all of these decisions are in the enacted decisions section and it seems I can't enact them.
any way to solve it?
thanks
 
Hi,
Thanks for the great mod.
I'm playing a game and after enacting 3 decisions (formalize scales, codify laws and one religious decision) I reloaded to a former save game, before I enacted the decisions or even invented the religion.
now all of these decisions are in the enacted decisions section and it seems I can't enact them.
any way to solve it?
thanks

did you reload in game?
LUA code is known for not being able to reset properly if you load in game. Try exiting to the main menu or closing the game entirely before loading a save.
 
did you reload in game?
LUA code is known for not being able to reset properly if you load in game. Try exiting to the main menu or closing the game entirely before loading a save.

thanks, so if I loaded in game and continued to play and saved again I have nothing to do? exiting now and reloading a later save does'nt help me now
 
Nice mod. However, I am getting double events (ie. need to click outcome twice). This lets met get double rewards for the events, making some events overpowered.
 
An amazing mod, however for me it crashes constantly, usually whenever I click like the "accept" button of a decision. For example the Hebset festival, while playing as Djoser I click the "5 days of we love the King in all cities" then the game crashes. Hopefully you can help me with this because I really like playing with this mod enabled :D . (I had to put both logs in a .rar, since for some reason I't wouldn't allow me to upload the notepad documents, sorry.)
 

Attachments

I love this mod, but i have some problems with it. The Civ specific decisions come out like this: TXT_KEY_DECISIONS_BABYLONGATES.
The decisions where it adds a modded building like: Babylon gates or byzantium walls doesn't show up in the city, and i doesn't get the benefits from them.
However the Aztec royal army decision give me the 30 xp to the jaguars.
Also i Use the JFD byzantium mod, while playing as Theodora and the decision he made where the city with palace get 15% more tourism seem to work and isn't worded like TXT_KEY_DECISIONS_BABYLONGATES, but just 'Renovate the Capital'.
I can't really figure out what the problem(s) is. I have attached the lua logs which is part of E&D i can upload all of the logs if needed.
 

Attachments

Back
Top Bottom