Civilization 5 Modding Dead.

Check each AI city each round if there is some a-bomb order running, and if you find one replace it with something you think is more adequate in that situation.

That's a horrible way to do things. Artificially forcing the player to change its mind on things it's partially produced already (and has therefore already sunk hammers into) is incredibly unbalancing.
Besides, it does nothing to address the real problem. It's not the PRODUCTION of nukes that's the issue, it's the USE.

Right now, nukes are used on turn one of any war in that era, because there's currently no reason not to use them. Causing the AI to produce fewer nukes, either through build queue manipulation, flavor values, or resource limitation, would do nothing to address this; the AI would shoot off whatever nukes it had on Day One and be done with it.
To fix this, then, we need to add a consequence to using nukes (difficult at best in Lua, given the lack of relation stubs) and get the AI to understand that there are times when using a nuke isn't appropriate (impossible with the current mechanisms). No amount of flavor tweaking will substitute for this.
 
(Incidentally, remember how SaveData and LoadData were removed in the December patch before being restored in a hotfix? The devs' stated logic at the time was that they were in the process of implementing a superior system and so didn't think it was necessary to keep those functions around anymore. So where's that superior system? If it's in place, already, then we probably don't NEED that kind of I/O.)

They did, indeed. Going to check if that's been part of a patch since then or not...

I believe, however, that it went out in the February patch.
 
Looks like it did make it into the February patch.

Essentially, all Civ5 saves now have an SQL database attached, which is accessible by mods. This database is extracted and stored in the cache folder with the file name "Civ5SavedGameDatabase.db". Think of it as SaveUtils, but cleanly incorporated.

The cached file is the file that is actually used (this means external tools can access it as well).

Accessing the database from within Lua is simple.

Code:
local savedData = Modding.OpenSaveData();
if(savedData ~= nil) then --It might be nil if there was an error and the file doesn't exist/is corrupted.
  savedData.SetValue(name, someValue); --Assign a simple value into the SimpleValues table.

  local value = savedData.GetValue(name); --Retrieve the value in SimpleValues that matches the name.

  local query = savedData.Query("SELECT Value from SimpleValues"); -- Full SQL access to the db :)
   for row in query do
        print(row.Value);
   end
end

So. Still need Read/Write access? For ini files, most likely. However, as others pointed out, that's not always a good idea. For saving data however? Not at all; A simple system is in place for that.
 
Yep, seen it used in Polynesia scenario.

so now we have:

  • savedData = Modding.OpenSaveData(), savedData.GetValue and savedData.SetValue for simple value linked to a specific game
  • modUserData = Modding.OpenUserData(modId, modVersion), modUserData.SetValue and modUserData.GetValue for simple value linked to a specific mod (config)
  • SaveUtils for complex data.

edit : just one problem, cleaning the cache will erase those saved simple values, and cleaning the cache is sometime recommended when upgrading a mod...
 
Surely the cache clearing wouldn't be an issue, as the data is stored in the save file and restored from it; there'd only be a problem from clearing the cache if the user was in the middle of a game, currently playing it.

However, this only seems superior in that it allows data that isn't associated with anything in particular. We still need ScriptData/SaveUtils to actually associate data with a player, unit, or plot, right?
 
However, this only seems superior in that it allows data that isn't associated with anything in particular. We still need ScriptData/SaveUtils to actually associate data with a player, unit, or plot, right?

Given that it's database driven with query, I assume an association could be created using both the player ID in combination with the unit or plot ID.

Ideally, I think the thing to do is edit SaveUtils such that it saves the serialized string to an appropriate database entry. Done properly, this could provide full query capability for complex data saved to the modding database by SaveUtils.

I'll consider rewriting it if anyone wants to give recommendations in the SaveUtils thread.

Zombie Civ arise! :D
 
What SamBC said, as far as the cache goes.

On the rest... Whys is of course entirely correct. :goodjob: And rewriting SaveUtils to make that even simpler for modders, while eliminating a large amount of the serialization it has to do currently, would open things even more.... ;)


Really should have announced that database, but I never saw it in the patchnotes. :lol:
 
Really should have announced that database, but I never saw it in the patchnotes. :lol:
I saw it used in the scenario, but didn't think it worth mentioning because that use stores simple key-value pairs without any sort of association - leaving it less powerful than ScriptData.

If we can create extra tables, it could be very powerful, certainly. Otherwise, serialisation could emulate the same effects as ScriptData, but I'd imagine it less efficient.
 
Ideally, I think the thing to do is edit SaveUtils such that it saves the serialized string to an appropriate database entry. Done properly, this could provide full query capability for complex data saved to the modding database by SaveUtils.

An indirect Saves mod compatibility "Detector" function, as we discussed earlier -- indeed.
Component or GameAddIn (in theory, btw)... i really don't mind the acrobatics within LeoPaRd.DB set.
:cool: stuff from Devs, nevertheless.
 
Hey Afforess, I was just hearding the last Modcast episode, the one you appeared, right before the release from civ5.
Well, I don't think you should desist on Civ5 just yet, but you really could go back to modding Civ4 a bit, maybe just finishing AND.

AND is finished. 1.75 was a planned final release, it was no surprise, and well announced, months ahead of time.
 
Didn't the new patch allow for 2D leaderheads? That should help a bit...
 
Until a Fall from Heaven, a Final Frontier or a Dune Mod made, i'll be continue to play Civ4. Are they going to release sdk? Is there any confirmation?
 
The "sdk" is already released; the Software Development Kit was out within a week of launch.

The term you want is dll, in which case the answer is no, they have not released it yet, but yes, they have stated they plan to.

IMO, they're waiting till the code is more or less stable before releasing it.
 
I played a demo of Civ V and then played around with a friend's copy, both let me horribly down. The game, even though pretty, was just horrible and so simple. It appears the modding is equally horrible since I do not see many player made mods -- I see Firaxis trying to sell me mods though, which is another let down.

From what I have been reading, it seems most people cannot or will not mod for this game. It reminds me a lot like Never Winter Nights -- the first one was a joy to mod but the graphics were dated; while the second offered far better graphics but the programming was dreadful.

I am pleased I am still modding in Civ IV and that the game has many more years of life in it.
 
I played a demo of Civ V and then played around with a friend's copy, both let me horribly down. The game, even though pretty, was just horrible and so simple. It appears the modding is equally horrible since I do not see many player made mods -- I see Firaxis trying to sell me mods though, which is another let down.

From what I have been reading, it seems most people cannot or will not mod for this game. It reminds me a lot like Never Winter Nights -- the first one was a joy to mod but the graphics were dated; while the second offered far better graphics but the programming was dreadful.

I am pleased I am still modding in Civ IV and that the game has many more years of life in it.
One of the problems seems to be that people want to make the sort of big, deep mods that they could with source modding in CivIV, and they're waiting (or giving up waiting) for the source. I have fairly big plans that are doable with the current structure (mostly), but haven't had the time. Even where mechanics can be changed, the AI won't know how to use them properly, unfortunately.
 
So much doom and gloom.

Maybe have a little faith?

Al
 
Top Bottom