CBP Events and Decisions Compatibility

Ok, so looking thru the code, I'm not the best at reading LUA, but it appears that the increasing cost per turn for the various events is intentional. Which ends up that a set of three marathon turns increases gold cost of something by eighteen (two per turn x three for marathon scaler x three turns i think) while the respective standard turn only 2. There's more Gold in Marathon, but not that much more, these costs are essentially scaling for marathon twice if I understand it right, the per turn value and the number of turns. Now, they do still become at least somewhat affordable eventually maybe, but that's cause there's so much Gold in the Ren.

And second, the percent chance on both the four barbarians spawn (I know there's other choices on it, but when they're essentially roleplaying letting women get raped, that's a big nah for me) and the destitute Great General one seem too high. One game is one game, but I got both those events in basically every city, and less of the events from the regular CP. Maybe its just that those events aren't tied to buildings I guess?
 
Played a game as Ottoman Turks, and they've got a Decision that was going up in cost 7 culture per turn, not sure why it wasn't six, but in any event, I don't know the first thing about LUA modding, but hopefully you can turn off the per turn Marathon scaling on these formulas. Its one time vaules that scale, per turn values are normally the same. There's simply never enough culture to pay that kind of price.
 
In EventsAndDecisions_Utilities.lua
Code:
iMod = ((GameInfo.GameSpeeds[Game.GetGameSpeedType()].BuildPercent)/100)
iScale = (((Game.GetGameTurn()/75)+1))

The ottoman decision is either
Code:
		local iCost = math.ceil(200*iMod*((Game.GetGameTurn()/100)+1))
Code:
		local iCost = math.ceil(225*iMod*((Game.GetGameTurn()/100)+1))
 
In EventsAndDecisions_Utilities.lua
Code:
iMod = ((GameInfo.GameSpeeds[Game.GetGameSpeedType()].BuildPercent)/100)
iScale = (((Game.GetGameTurn()/75)+1))

The ottoman decision is either
Code:
		local iCost = math.ceil(200*iMod*((Game.GetGameTurn()/100)+1))
Code:
		local iCost = math.ceil(225*iMod*((Game.GetGameTurn()/100)+1))

Well, that particular decision is the happiness per city one, not the Sipahi, already lost, can't remember their names. But the issue is that in general costs for decisions are scaling twice for gamespeed, triple per turn and triple turns, effectively a 9x scaler. Its just that the gold cost events can maybe still be afforded if I really really want them, whereas a Culture cost, no way. But in general the per turn gamespeed scaling cost should be turned off.
 
How do you propose the scaling aspect should work then?
 
How do you propose the scaling aspect should work then?

That initial 200 or 225 can stay tripled I think, but after that there shouldn't be scaling. It's an every turn value, and there's approx three times more turns. I mean Monuments still give 1 culture per turn, Merchant specialists give 3 gold per turn, and so on. Its the same thing, only in reverse.
 
That initial 200 or 225 can stay tripled I think, but after that there shouldn't be scaling. It's an every turn value, and there's approx three times more turns. I mean Monuments still give 1 culture per turn, Merchant specialists give 3 gold per turn, and so on. Its the same thing, only in reverse.

Yeah I get what you're saying. The formula would be now:
Code:
(200*iMod)+(200*(Game.GetGameTurn()/100)+1))
I'll update it in version 10.
 
Yeah I get what you're saying. The formula would be now:
Code:
(200*iMod)+(200*(Game.GetGameTurn()/100)+1))
I'll update it in version 10.

Thanks! I'm enjoying it overall, more events equal more fun! From an immersive thematic point of view, I even like the events that put my empire into resistance. And I haven't had a crash yet, even tho in my hazy memory of trying regular E&D, I had quite a few. Thanks for all your hard work!
 
I think the effect from the 'Pragmatic' morality (+1 culture to villages and +2 culture, +1 science to towns) might be lingering after it's been changed to another morality. To clarify: at some point in my game I was 'Pragmatic' and my villages and towns were getting the additional yields. After my morality changed to 'Benevolent', I was getting both the boosts to villages and towns and the additional great person generation rate.
 
I think the effect from the 'Pragmatic' morality (+1 culture to villages and +2 culture, +1 science to towns) might be lingering after it's been changed to another morality. To clarify: at some point in my game I was 'Pragmatic' and my villages and towns were getting the additional yields. After my morality changed to 'Benevolent', I was getting both the boosts to villages and towns and the additional great person generation rate.

I haven't tested it out yet, but I think this happens when you use Gazebo's experimental features. I believe neither Event_Maleficent and Event_Beneficent are deleting Building_Pragmatic(Which causes the bonus to appear) after the EventDuration of Event_Pragmatic.

Guess, I'll go back to relying on Lua to delete the buildings and install its new respective buildings.

In other notices, Version 10 will be including in a Military Draft decision that is enactable per era, granting a free unit for each city for 1 magistrate. I'll also be incorporating some of the decisions with my new mod, Rise and Fall of Kingdoms where being at a state of Civilized Heritage and Conqueror Zeal will unlock new decisions. Overall, your magistrates should never be higher than 5.
 

You forgot about "™" :D

I got a CTD with 6/15 CBP.
Lot of errors like this:
Spoiler :

[16126.640] Runtime Error: E:\Dokumenty\My Games\Sid Meier's Civilization 5\MODS\(8) Events and Decisions (CBP) (v 9)\Lua/UI/EnactDescisionsPopup.lua:787: attempt to index field '?' (a nil value)
stack traceback:
E:\Dokumenty\My Games\Sid Meier's Civilization 5\MODS\(8) Events and Decisions (CBP) (v 9)\Lua/UI/EnactDescisionsPopup.lua:787: in function <E:\Dokumenty\My Games\Sid Meier's Civilization 5\MODS\(8) Events and Decisions (CBP) (v 9)\Lua/UI/EnactDescisionsPopup.lua:786>


I played as Brazil, not sure if E&D caused the CTD, but I post anyway.
 
oh I see what's happening that makes this really unstable.

I think Gazebo made GreatPersonExpended now properly requiring EVENTS_GREAT_PEOPLE to be used now. I'm afraid I can't test it, but if you put this UPDATE statement into the DecisionsAddinSupport.sql file.

Code:
UPDATE CustomModOptions
SET Value = 1
WHERE Name = 'EVENTS_GREAT_PEOPLE' AND Value = 0;

It should theoretically work.
 
Ok, I'll try to play with this fix.

Starting a new game is necessary instead of loading a save, right?

Edit: Save didn't work, CTD just after hitting next turn. I'm starting a new game then.
Edit 2: I started a new game. After hours of playing, 214 turn as Napoleon, late Renaissance, some decisions enacted, and tons of events. So far, no CTDs :) Thank you!
 
I still get looot of errors:
Spoiler :

[16126.640] Runtime Error: E:\Dokumenty\My Games\Sid Meier's Civilization 5\MODS\(8) Events and Decisions (CBP) (v 9)\Lua/UI/EnactDescisionsPopup.lua:787: attempt to index field '?' (a nil value)
stack traceback:
E:\Dokumenty\My Games\Sid Meier's Civilization 5\MODS\(8) Events and Decisions (CBP) (v 9)\Lua/UI/EnactDescisionsPopup.lua:787: in function <E:\Dokumenty\My Games\Sid Meier's Civilization 5\MODS\(8) Events and Decisions (CBP) (v 9)\Lua/UI/EnactDescisionsPopup.lua:786>

And I got CTD in the Industrial Era :( I played as Germany. I don't know, if it's because of your mod or because of 7/1 CBO version.
 
I don't know why it's like that. I'll have to investigate.
 
I'm too far from my home computer, but try this Zares,
Code:
 if GameInfo.Units[iUnit].Class == UNITCLASS_GREAT_DIPLOMAT then
where
Code:
if GameInfoTypes[GameInfo.Units[iUnit].Class] == GameInfoTypes.UNITCLASS_GREAT_DIPLOMAT then
in Lua\UI\EnactDecisionsPopup.lua

Courtesy of bane_
 
Hey Enginseer, would it be possible to make the decision related units disappear from tech buttons in the tech tree? Similarly to how CBO handles unique units that aren't related to the civ you're currently playing. That'd unclutter some tech buttons, and I think the information about what techs unlock what units is sufficient enough in the tooltips for the decisions.

I'd be happy to do that myself, but I know nothing of lua ):

Edit: oh, and there's also at least one decision related building - Public Transportation System, if I remember correctly.
 
Hey Enginseer, would it be possible to make the decision related units disappear from tech buttons in the tech tree? Similarly to how CBO handles unique units that aren't related to the civ you're currently playing. That'd unclutter some tech buttons, and I think the information about what techs unlock what units is sufficient enough in the tooltips for the decisions.

I'd be happy to do that myself, but I know nothing of lua ):

Edit: oh, and there's also at least one decision related building - Public Transportation System, if I remember correctly.

Thing is CBO handles Unique Units that aren't related to the Civ is by making sure they are a unique unit. The decision-related units aren't a unique unit and were made so since you had a lot of barbarians popping in with decision-related units at the ancient era (Great Galleass at Ancient?! :mad:)

Unless telling ShowInPedia to be false makes it disappear. I don't know. I'll have to ask Gazebo about that.
 
Top Bottom