What the heck is going on with this Unfinished SDK??

Deep_Blue

Knight
Joined
Aug 2, 2005
Messages
750
I am really disappointed with the current situation of Modding in Civ5, It seems like they released an unfinished SDK and that they didnt plan wisely before they release it.

I swear that before the patches I was able to change happiness in Lua using ChangeHappinessFromBuildings. But this function doesn't work any more in the new patches :confused:

What else we have to change happiness , we have the stupid SetHappniess() which is no good because happiness will reset every turn. why changing Happiness is forbidden in Civ5 modding? that is really very very dumb.

Modding now is limited more than before, I am really disappointed with that.

They promised a game that will be more moddable that ever, and what we got:
  • An SDK with many many limitations
  • Poor graphics modibility
  • Stupid FontIcons
  • Unfinished Nexus
  • No documentation
  • Removal of functions (like ChangeHappinessFromBuildings) in the patches without notice
  • Unstable Modding environment , mods before the patch doesnt work after it. the real cause of this instability is because most of the lua files are not modular, they are poorly programmed with lack of vision for any future changes.
When the game was released many people were disappointed with the game, but we had big hopes on modding to fix it, but then modding SDK itself added a big disappointment to the game .. I am sad for how Civ ended up :sad:
 
i am sad too. All they had to do was take civ4 bts, convert it to a hex system with 1upt, adjust the AI, and give us shiny new graphics, but no, they re-write the game entirely, with a young inexperienced staff no less, nobody should be surprised.
 
Modding it how? You can adjust the happiness modifiers on anything that currently has them (buildings, resources, some stuff on policies) and the unhappiness from various things. Completely replacing the system will probably require source modding, unsurprisingly.
 
Modding it how? You can adjust the happiness modifiers on anything that currently has them (buildings, resources, some stuff on policies) and the unhappiness from various things. Completely replacing the system will probably require source modding, unsurprisingly.

read my first Post.

lua modding using:
ChangeHappinessFromBuildings
SetHappniess
 
I am really disappointed with the current situation of Modding in Civ5, It seems like they released an unfinished SDK and that they didnt plan wisely before they release it.

I came here to the forum right now for almost the exact reason. Ever since the patches I'm running into problems I didn't have before. I can't even add a simple new civilization like I could before. It's like the database is not updating or something.



edit: I checked the SQL database though firefox and the files are there. I don't know what the problem is. I'll have to keep trying to debug.
 
I want to change Happiness while the game is running not in pregame.
There are many uses for this, somethings are impossible to do without it.
I'm just trying to understand the full situation, to maximise my chances of being able to help. So, I'll try again...

I understood that much. I mean, what would the effect be from the point of view of someone playing it? If there's several, just give me one example.
 
What else we have to change happiness , we have the stupid SetHappniess() which is no good because happiness will reset every turn.

Depends on what you're using it for. For instance, I've got a start-of-turn Event that checks for the presence of a specific Wonder and adjusts Happiness levels accordingly. (In the case of that wonder, the Dream Twister, it subtracts 10 happiness from all civs other than the one that built it.) It's completely transparent to the user. Every turn, the appropriate amount is added or subtracted, and the user never sees the unmodified amount.

As to your other complaints:
Unstable Modding environment , mods before the patch doesnt work after it. the real cause of this instability is because most of the lua files are not modular, they are poorly programmed with lack of vision for any future changes.

Not sure where you're getting this. The only thing that made most big mods nonfunctional after the patch was the removal of the save/load functionality, which has since been restored in the hotfix. The thing that made most Lua mods nonfunctional post-patch was the VFS default issue, which is extremely trivial to fix and only affects mods compiled post-patch (meaning ones made before the patch would still work). After a day or two of compatibility work, my own mod (which is rather extensive) worked just fine other than the save/load issue, and apparently that's now fixed as well.

The modding environment has been VERY stable, considering that they're still adding more functions for us to use. It's not static, unlike most other programming environments. And it's a lot closer to being a full programming environment than any of the previous games; we can do things with the combination of XML, SQL, and Lua that'd be unheard of in the previous games, so if anything, I'd be praising this modding setup instead of criticizing it.

I just went over to the General Discussion board, and the level of whining was deafening. You've got people actually cheering the departure of the lead designer, and describing the game as a "colossal failure", "waste of time", and so on. Are we really that different in this forum? Most of the people in this modding community seem to be enjoying the game... it makes me wonder, do most of those people just refuse to download any mods?
 
Depends on what you're using it for. For instance, I've got a start-of-turn Event that checks for the presence of a specific Wonder and adjusts Happiness levels accordingly. (In the case of that wonder, the Dream Twister, it subtracts 10 happiness from all civs other than the one that built it.) It's completely transparent to the user. Every turn, the appropriate amount is added or subtracted, and the user never sees the unmodified amount.

As to your other complaints:


Not sure where you're getting this. The only thing that made most big mods nonfunctional after the patch was the removal of the save/load functionality, which has since been restored in the hotfix. The thing that made most Lua mods nonfunctional post-patch was the VFS default issue, which is extremely trivial to fix and only affects mods compiled post-patch (meaning ones made before the patch would still work). After a day or two of compatibility work, my own mod (which is rather extensive) worked just fine other than the save/load issue, and apparently that's now fixed as well.

The modding environment has been VERY stable, considering that they're still adding more functions for us to use. It's not static, unlike most other programming environments. And it's a lot closer to being a full programming environment than any of the previous games; we can do things with the combination of XML, SQL, and Lua that'd be unheard of in the previous games, so if anything, I'd be praising this modding setup instead of criticizing it.

I just went over to the General Discussion board, and the level of whining was deafening. You've got people actually cheering the departure of the lead designer, and describing the game as a "colossal failure", "waste of time", and so on. Are we really that different in this forum? Most of the people in this modding community seem to be enjoying the game... it makes me wonder, do most of those people just refuse to download any mods?

Stop defending blindly and lets face the facts bravely:

They removed functions with no notice (Again: ChangeHappinessFromBuildings)

My mods now crash from time to time for no reason after the patch (when I reload the game with the exact mod no crash happens, which means nothing wrong with my mod the problem is with the Game or SDK)

Lua files are not Modular they are stupid static that is why many mods conflict with each other.

The SDK didnt give you flexibility to add resources easily especially Luxuries that's why I created "Resource Generator" (see my signature for the link) which took a lot of time and effort to finish.

FontIcons are stupid Static and cant be changed and the bad news is that this will not be fixed soon in next patches.

No documentation and messy SDK release

Poor Nexus and Poor graphics modability

..

..
.
I can go on for a long list. So please dont just come here and say
The modding environment has been VERY stable
It's not static, unlike most other programming environments.
because you just made me angry

And this is not Whining I seek professional and practical solutions for my problems in modiing is that too much to ask ?? !!
 
I'm just trying to understand the full situation, to maximise my chances of being able to help. So, I'll try again...

I understood that much. I mean, what would the effect be from the point of view of someone playing it? If there's several, just give me one example.

See Dale's mod for example:
http://forums.civfanatics.com/showthread.php?t=399829

If you read through the thread you will find why we need to change happiness dynamically for some cases. You can check the lua files in the mod and see how SetHappiness is used, the bad thing with this function is that happiness reset at next turn, so you have to update happiness in every turn, now imagine we want to change happiness at some events not at end_turn and start_turn, like for example changing happiness when an improvement is pillaged, then things will get messy and will be very unstable.

I am now working on a mod the easiest part of it should be changing happiness at some Events, but I finished all the mod and still stuck at the stupid happiness thing. Using SetHappiness caused great instability in my Mod, the same exact mod worked perfectly before the patches because I was using ChangeHappinessFromBuildings which do not reset every turn.

So the bottom line is that my Mod was working perfectly before the patch and now it is not working :lol:
 
I came here to the forum right now for almost the exact reason. Ever since the patches I'm running into problems I didn't have before. I can't even add a simple new civilization like I could before. It's like the database is not updating or something.



edit: I checked the SQL database though firefox and the files are there. I don't know what the problem is. I'll have to keep trying to debug.

It happened with me too, then I solved this by changing VFS for my mod files.

In your mod right click on the files and select properties, now change "Import into VFS" to true for:
- All lua files
- Any graphics files
- Any UI xml file (these files start with <context> not <gamedata> )

other xml and sql files that update the database dont need checking VFS to true
 
Stop defending blindly

Stop criticizing for the sake of hearing yourself talk.

See how easy it is to over-generalize? Given that some of us have been doing a LOT of modification, "blindly" isn't really a good word to be throwing around. At this point, you'd be hard-pressed to find people who know more about how the whole Civ5 setup works (outside the developers, of course), so try to be civil.

Yes, they screwed up that one function to change happiness (apparently; as I don't use that function I can't confirm it's broken, but I'll take your word for it). Ask for them to fix it, in a forum the devs might actually read, and it might get fixed fairly quickly. (See also: the GetScriptData and SaveScriptData functions they put back in the hotfix. It wasn't the rants on THIS board that let to the fix...) Personally, I'd rather ask them to just turn Happiness and Culture into actual Yields, that can be adjusted through all the other yield-modifying functions instead of needing their own explicit entries for everything.

Or, find some other way to do what you want through the GetHappiness and SetHappiness functions. Now that the save and load functions have been restored, you SHOULD be able to just store a variable of "NetHappiness" and add that at the start of every turn if you want a persistent happiness change. Since the devs have hinted at a much more advanced save/load functionality (which was the reason they shelved the old versions in the first place), there should be several ways to do something like this.
 
Stop criticizing for the sake of hearing yourself talk.

See how easy it is to over-generalize? Given that some of us have been doing a LOT of modification, "blindly" isn't really a good word to be throwing around. At this point, you'd be hard-pressed to find people who know more about how the whole Civ5 setup works (outside the developers, of course), so try to be civil.

Yes, they screwed up that one function to change happiness (apparently; as I don't use that function I can't confirm it's broken, but I'll take your word for it). Ask for them to fix it, in a forum the devs might actually read, and it might get fixed fairly quickly. (See also: the GetScriptData and SaveScriptData functions they put back in the hotfix. It wasn't the rants on THIS board that let to the fix...) Personally, I'd rather ask them to just turn Happiness and Culture into actual Yields, that can be adjusted through all the other yield-modifying functions instead of needing their own explicit entries for everything.

Or, find some other way to do what you want through the GetHappiness and SetHappiness functions. Now that the save and load functions have been restored, you SHOULD be able to just store a variable of "NetHappiness" and add that at the start of every turn if you want a persistent happiness change. Since the devs have hinted at a much more advanced save/load functionality (which was the reason they shelved the old versions in the first place), there should be several ways to do something like this.

Sorry for my little outburst I was mad because my hard work for more than a weak on my mod was ruined because of the recent patches, then you came saying stop whining.

I am searching desperately for a solution and I find no answer even in 2K forums, I know at this stage few people have the answer and I blame 2K games for this mess.

my problem is that I am changing happiness on End/Start Evens plus some in between events (like improvement destoryed, Pillage..etc) so when I update happiness using SetHappiness on those events my mod becomes unstable with unexpected results, also I am changing happiness for other AIs and that cant be done without a fixed change in happiness.

I am trying many things to solve this problem, I am even trying to add fake buildings with negative happiness (but the game crashed), I tried to change Happiness from Handicap xml in minus happiness then add offset fake luxuries but then these fake luxuries will be tradable between the AI.. see what they did to me and to other modders by ignoring basic things like a Simple Function to change happiness.
 
Oh my goodness...

Deep_Blue: Spatzimaus indicated a way to do it without using SetHappiness at odd times... on the events, adjust a ScriptData/SaveUtils value that stores the net change per city/tile/unit/player. Each turn, for each player (which includes AIs if you use the right one), loop over all of the things you're storing changes on, to get a total net change. Use GetHappiness and SetHappiness to find the (now reset) value for the player and add the total net change to it.

Inelegant? Yes. Comparatively resource-hungry? Yes. Actually resource-hungry enough to make a perceptible difference? I doubt it.
 
Deep_Blue is right. The patches have messed everything up for some reason. My Roman Empire scenario is on temporary hold until the next patch hopefully fixes things back to normal.
That's very unlikely to happen unless you actually tell the devs what's wrong and why it should be fixed. They thought no-one was using ScriptData, apparently, so it's farily clear they aren't keeping up with things on this third-party forum.

Here's how I got a quick response on ScriptData:
  1. Post a polite thread to the official CivV Forum's Modding Forum
  2. PM 2K Greg to point him at said thread and ask him to point the relevant people at it
The result of this was a prompt reply from the modding programmer, Sseckman, with explanation, and inclusion of a fix for this in a hotfix patch. Now, the date being what it is, I doubt that a response now would be as prompt. Important point to remember is that I was polite, and I was clear about what the problem was. "It's all broken" isn't something they can easily fix. "Function X no longer works/correctly" is much easier, and usually demonstrates that you've invested time and energy of your own into fixing it.

They won't be able to fix anything that they don't know is a problem.

All that aside, it would be very nice if the devs did actually tell us when they were going to change something deliberately. Hopefully, the lesson of ScriptData will be to not assume something is or is not being used, and therefore communicate more. Yes, to reiterate the implausible one more time, the reason they took ScriptData out without telling people was that they thought it wasn't being used...
 
Oh my goodness...

Deep_Blue: Spatzimaus indicated a way to do it without using SetHappiness at odd times... on the events, adjust a ScriptData/SaveUtils value that stores the net change per city/tile/unit/player. Each turn, for each player (which includes AIs if you use the right one), loop over all of the things you're storing changes on, to get a total net change. Use GetHappiness and SetHappiness to find the (now reset) value for the player and add the total net change to it.

Inelegant? Yes. Comparatively resource-hungry? Yes. Actually resource-hungry enough to make a perceptible difference? I doubt it.

I did do that trust me.. I got funny results. Some events are called 3 times at the same time by the game engine which may cause unstable results, I do not know for sure what goes wrong between events calls.
Also as you said this may slow the game a bit.
 
I did do that trust me.. I got funny results. Some events are called 3 times at the same time by the game engine which may cause unstable results, I do not know for sure what goes wrong between events calls.
Also as you said this may slow the game a bit.
But the problem with multiple calls would apply to anything you did event-driven, not just this one, and I've not heard of the start-of-turn event being sent multiple times.
 
Back
Top Bottom