Events and Decisions + CBP

Well beyond my kin, but I'd love to help someone take a stab at it. :lol: And by help, I primarily mean "watch and playtest."
 
The question isn't that E&D isn't balancable (I would do it easily of course), the question is what is the AI doing in LUA to cause random CTDs.
 
The question isn't that E&D isn't balancable (I would do it easily of course), the question is what is the AI doing in LUA to cause random CTDs.

I can say that I used E&D for a long time and never experienced any crashes from it, so if that effect exists I'd say it is rare as hell.
On the other hand, it is a fact that the AI does not know how to use the decisions properly. As master G said, they only pick whatever they can afford, something that seems a lot more viable in vanilla where the AI is always floating tons of gold.


However, all that being said I still don't see a reason why E&D couldn't exist as a choice for players, sacrificing balance (and stability?) for fun.
If someone wants to take on the huge task of actually trying to fix up compatibility with E&D I did create a balancing thread for it in the Leaders Balance subforum half a century ago, I'm sure more people would be willing to come with suggestions.
Just keep in mind that simply changing some numbers and some buildings isn't really going to cut it, the game have evolved so much that some decisions are going to have to be changed for balance-reasons even if they appear to be fine.
 
I never play with it, it always feels like cheating.
Paying gold to get GP, etc...
 
So there is a "CBP balanced" version that Gazebo did. Though it is now out of date in a few areas like for e.g. the new Mayan UI.

Aside from that, a way to make the AI 'intelligent' about E&D would be as follows:
As I understand it if the AI can enact a decision it does so (with some probability?)
You could alter that probability by taking the gains and losses from a decision, quantify them numerically multiply them by the appropriate leader flavours and then normalize. I.e. if it costs gold and gives culture then a civ that likes culture will enact it, a civ that like gold probably won't and so forth. As I understand the code, these values aren't directly stored in a table, so you would have to parse the tooltip (won't work unless there is a set format) or hardcode each decision (time intensive).

Having said that, 'Decisions' aren't really decisions. If you enact a decision is not so relevant as when. And when is almost always going to be when you can afford it. The exceptions being when multiple decisions are available like cultural/non-cultural great people. I don't know how the AI handles this currently. The other thing the AI doesn't do is save up to enact a decision early, but this isn't too much of an issue.

I was going to try and fix all the errors myself but for some reason changing the LUA with a text editor like vim or notepad just breaks it. e.g. I change a -2 to a -1 in the civ decisions file (number of magistrates spent) and if I load it no civ decisions appear at all - i.e. the file doesn't run at all anymore. I have no idea why this is.

Finally there has been a new version of E&D since Gazebo's hack, and apparently that one has cleaner code/less CTDs/etc. So ideally one would start with that.

In conclusion it's a lot of work, and probably not worth it for CBP alone. The issue is, as you describe, that there are some really good mods like P&P that need E&D to run. And it's a shame because in that specific instance JFD has gone to the great trouble of making it compatible.
 
So there is a "CBP balanced" version that Gazebo did. Though it is now out of date in a few areas like for e.g. the new Mayan UI.

Aside from that, a way to make the AI 'intelligent' about E&D would be as follows:
As I understand it if the AI can enact a decision it does so (with some probability?)
You could alter that probability by taking the gains and losses from a decision, quantify them numerically multiply them by the appropriate leader flavours and then normalize. I.e. if it costs gold and gives culture then a civ that likes culture will enact it, a civ that like gold probably won't and so forth. As I understand the code, these values aren't directly stored in a table, so you would have to parse the tooltip (won't work unless there is a set format) or hardcode each decision (time intensive).
My first thought was to just balance the whole thing about the AI being incompetent when it comes to decisions. That would probably require more than a minor tweak however. First of all if the AI can't save and strategize uses of the magistrate resource, it kinda needs to go (or the AI could receive extra of those to make up for it wasting them?). This however would kinda leave the Decision system as a intentional gold-sink, which imho isn't necessarily a bad thing (gold can really go out of control in CPP, and having a reliable sink would be nice), but in that case the gold-costs need to be scaled and balanced by the actual gold-situation in the current stage of the game.
Alternatively one could just drop the decisions part of the mod completely and expand upon the events.

All of this however kinda falls so far outside of how the mod currently works that it could barely be called the same thing anymore.


I was going to try and fix all the errors myself but for some reason changing the LUA with a text editor like vim or notepad just breaks it. e.g. I change a -2 to a -1 in the civ decisions file (number of magistrates spent) and if I load it no civ decisions appear at all - i.e. the file doesn't run at all anymore. I have no idea why this is.

Finally there has been a new version of E&D since Gazebo's hack, and apparently that one has cleaner code/less CTDs/etc. So ideally one would start with that.

In conclusion it's a lot of work, and probably not worth it for CBP alone.
It is going to be a lot of work no matter what happens.


The issue is, as you describe, that there are some really good mods like P&P that need E&D to run. And it's a shame because in that specific instance JFD has gone to the great trouble of making it compatible.
Oh, I had no idea, not using any of JFDs mods anymore, but that sounds harsh.
 
The problem with any complicated algorithim is that us Lua modders like Sukritact and I are at the mercy of the game engine to not collapse under the strain.

AFAIK, Sukritact did not make that many changes to the latest version, so any notion that it has less CTDs is probably a placebo. However, I've only ever found it to be the Events component to cause crashes (and common ones). With that in mind, approaching Decisions in isolation could be worthwhile.

In my upcoming Claims&Colonies, I've re-worked a few of the default Decisions, and added a few of my own to relate to the new systems I introduce. As Sukritact is likely both disinterested and busy, I'd be up to making at least the Decisions I modify and include more supportive of the CBP framework, from within C&C (most features are able to be disabled, so there should be no issues with one wanting E&D but not C&C). I'd just need some direction.

Of course, that won't fix the fundamental shortcoming of the AI's inability to use the system intelligently, and would probably just be putting a plaster over a larger issue. But then that's what I'll have to do in order to get the AI to 'understand' Reforms from P&S (P&P), so who am I to question it :p

Oh, I had no idea, not using any of JFDs mods anymore, but that sounds harsh.

What's this? Blasphemy from one of Pope Gazebo's Cardinals :p

It is a bit frustrating that I have to rely upon E&D for Piety, tbh, and in the future I may look at disengaging the two - especially because Sovereignty (Piety's counterpart) does not need Decisions in the same way.
 
The problem with any complicated algorithim is that us Lua modders like Sukritact and I are at the mercy of the game engine to not collapse under the strain.

AFAIK, Sukritact did not make that many changes to the latest version, so any notion that it has less CTDs is probably a placebo. However, I've only ever found it to be the Events component to cause crashes (and common ones). With that in mind, approaching Decisions in isolation could be worthwhile.

In my upcoming Claims&Colonies, I've re-worked a few of the default Decisions, and added a few of my own to relate to the new systems I introduce. As Sukritact is likely both disinterested and busy, I'd be up to making at least the Decisions I modify and include more supportive of the CBP framework, from within C&C (most features are able to be disabled, so there should be no issues with one wanting E&D but not C&C). I'd just need some direction.

Of course, that won't fix the fundamental shortcoming of the AI's inability to use the system intelligently, and would probably just be putting a plaster over a larger issue. But then that's what I'll have to do in order to get the AI to 'understand' Reforms from P&S (P&P), so who am I to question it :p
If someone actually wants to do the coding I guess I'll can help in the only way I can, which is trying to make sense of the balance in the unique decisions.



What's this? Blasphemy from one of Pope Gazebo's Cardinals :p
The big G's whatnow? I'm just your friendly neighborhood forum-troll.

It is a bit frustrating that I have to rely upon E&D for Piety, tbh, and in the future I may look at disengaging the two - especially because Sovereignty (Piety's counterpart) does not need Decisions in the same way.
I'm honestly not even sure why, I am going to try out P&P and Ex** along with whatever else you're making (seriously keeping track of everything is hard :D) at some point. Probably just waiting for you to finish polishing them.
Also with all the changes in CPP as well as limited play-time I guess I don't have time to learn more new stuff :D
 
I was a great fan of E&D before discovering CBP because it was a way to personnalising the game.

But I did remove it after a few games because it, in the current state, really unbalance the game. My final decision was when I did see I can have on an event for Byzance 2 free intant ships and more :)
 
But Ai can still utilize the decisions whenever they have the money. And it's always very interesting to see how my fellow Greek AI produces 6 pikemen with phylax promotion before anybody. I don't see why everybody is saying that this is a human exploit.
 
But Ai can still utilize the decisions whenever they have the money. And it's always very interesting to see how my fellow Greek AI produces 6 pikemen with phylax promotion before anybody. I don't see why everybody is saying that this is a human exploit.

Probably because a human could use those 6 pikeman to wipe out a player, whereas the AI would send them marching to their death at the hands of player cities. :)
 
Probably because a human could use those 6 pikeman to wipe out a player, whereas the AI would send them marching to their death at the hands of player cities. :)

By that logic, playing with "always peace" unchecked is a human exploit. (that option is in the game, just hidden from the GUI)
 
It is a bit frustrating that I have to rely upon E&D for Piety, tbh, and in the future I may look at disengaging the two - especially because Sovereignty (Piety's counterpart) does not need Decisions in the same way.

Is there a central site for your mods? I really just want to try playing a game or two of Civ with a JFD package. Every time you talk I get excited about this game. :lol:
 
Is there a central site for your mods? I really just want to try playing a game or two of Civ with a JFD package. Every time you talk I get excited about this game. :lol:

Closest thing to a central site is my signature. I really need a subforum for all my different mods :p
 
Top Bottom