Natan35
Mayor of St. Natansburg
Well, considering ItR deluxe is released, yeah.
For some reason, it appears that P&P breaks certain other mods which use TSL Serializer v3, namely my Hyperdimension Neptunia Civs. Firetuner returns "Failed to iterate table due to query error." Deleting the Lua files containing the Events & Decisions seemed to fix it. It seems that there might be problems stemming from having TSL included in each file which includes JFD_PietyUtils. I can't exactly pinpoint why this is, unfortunately, but would it be possible for you to edit your setup so that TSL is only included from the "main" file of Piety when you get the chance?
Not... really - PietyUtils is the main file - it's called by various other files which depend on the stored data. I don't recall any issues with P&P and Karl anyway, and both use TSL. Maybe DarkScythe could shed some light - I'm perhaps using TSL incorrectly anyway.
Failed to iterate table due to query error.
File A
|__ File B
|__ File C
File B
|__ File D
|__ File T
File C
|__ File B
File A
|__ File B
|__ File D
|__ File T
|__ File C
|__ File B
|__ File D
|__ File T
A B D T C [B][COLOR="Red"]B D T[/COLOR][/B]
Sharing between mods
Don't have two different mods (or two different states) including TableSaverLoader and saving/loading the same table.
...
What not to do
Don't try to save/load two different global tables with multiple calls to TableSave and TableLoad from the same mod
...
print("********************")
print("Loading TSL Serializer from JFD_PietySovereigntyUtils")
print("********************")
JFD_PietyInstitutionMandate_Functions: ********************
JFD_PietyInstitutionMandate_Functions: "Loading TSL Serializer from JFD_PietySovereigntyUtils"
JFD_PietyInstitutionMandate_Functions: ********************
JFD_PietyInstitutionPatriarchy_Functions: ********************
JFD_PietyInstitutionPatriarchy_Functions: "Loading TSL Serializer from JFD_PietySovereigntyUtils"
JFD_PietyInstitutionPatriarchy_Functions: ********************
JFD_Piety_ChooseStateReligionPopup: ********************
JFD_Piety_ChooseStateReligionPopup: "Loading TSL Serializer from JFD_PietySovereigntyUtils"
JFD_Piety_ChooseStateReligionPopup: ********************
JFD_Piety_Functions: ********************
JFD_Piety_Functions: "Loading TSL Serializer from JFD_PietySovereigntyUtils"
JFD_Piety_Functions: ********************
JFD_Piety_InstitutionPopup: ********************
JFD_Piety_InstitutionPopup: "Loading TSL Serializer from JFD_PietySovereigntyUtils"
JFD_Piety_InstitutionPopup: ********************
JFD_TopPanelUpdated: ********************
JFD_TopPanelUpdated: "Loading TSL Serializer from JFD_PietySovereigntyUtils"
JFD_TopPanelUpdated: ********************
HDNMainScript: Hyperdimension Neptunia mod beginning load.
HDNMainScript: At least one of Vice's HDN Civs are present in the game.
[COLOR="Red"] Runtime Error: Failed to iterate table due to query error. Check Database.log for more details.[/COLOR]
print("***")
print("Serializer loading from file [ JFD_PietyPrestigeUtils.lua ]")
print("***")
-- JFD_Piety_Functions
-- Author: JFD
-- DateCreated: 5/24/2014 12:00:40 AM
--=======================================================================================================================
-- INCLUDES
--=======================================================================================================================
include("EventsAndDecisions_Utilities.lua")
include("FLuaVector.lua")
include("JFD_PietyUtils.lua")
[B][COLOR="Blue"]include("TableSaverLoader016.lua");
tableRoot = JFD_PietySovereignty
tableName = "JFD_PietySovereignty"
print("********************")
print("Loading TSL Serializer from JFD_Piety_Functions")
print("********************")
include("JFD_PietySovereignty_TSLSerializerV3.lua");
print("TableLoad called from JFD_Piety_Functions")
TableLoad(tableRoot, tableName)[/COLOR][/B]
JFD_Piety_Functions: Loading TableSaverLoader.lua from JFD P&S...
JFD_Piety_Functions: ********************
JFD_Piety_Functions: Loading TSL Serializer from JFD_Piety_Functions
JFD_Piety_Functions: ********************
JFD_Piety_Functions: TableLoad called from JFD_Piety_Functions
JFD_Piety_Functions: TableLoad called from OnModLoaded in JFD_Piety_Functions
JFD_Piety_Functions: TableSave called from OnModLoaded in JFD_Piety_Functions
JFD_Piety_Functions: Creating SavedGameDB tables for new game: JFD_PietySovereignty_Data and JFD_PietySovereignty_Info
JFD_Piety_Functions: TableSave time: 0.035000000000764, inserts: 23, deletes: 0, updates: 0, unchanged: 0, checksum: 437
HDNMainScript: Hyperdimension Neptunia mod beginning load.
HDNMainScript: At least one of Vice's HDN Civs are present in the game.
HDNMainScript: Loading TableSaverLoader.lua from JFD P&S...
HDNMainScript: Creating SavedGameDB tables for new game: HDNMod_Data and HDNMod_Info
HDNMainScript: TableSave time: 0.03400000000056, inserts: 8, deletes: 0, updates: 0, unchanged: 0, checksum: 152
[COLOR="Blue"] HDNMainScript: Nepgear obtained the ''Trait Script Loaded'' Affinity![/COLOR]
snip
Checked the logs after not getting piety from events... The only log that looked unusual was the localization log. Should I post it?
Thank you for taking the time to investigate! I should note that I do understand, at least in essence, how include() works - when previously using SaveUtils, I found my previous misunderstanding of its use to be a source of much trouble. However, I had/have no clue how to allow multiple mods and files to otherwise access the data that Piety saves, hence why including the TSL functions in _Utils was a quick (and only) but evidently bad fix. However, I shall carefully peruse what you're written, and see if I can set up TSL properly.
Perhaps the oddest thing is that, IIRC, my Karl XII mod, using also TSL, ran perfectly fine alongside P&S. Almost certainly, ExCE, which similarly uses TSL, does.
MapModData.gT = MapModData.gT or {}
Piety has gone through much development - some Lua files aren't even executed (the Balance ones you noted, in fact, were from a distant past), and so it's no surprise that there is some redundancy. Originally, the mod used SaveUtils, and this is why some files still include it - I no longer use it, of course, but I suppose there are places I forgot to remove reference to it. Need update I'll do some cleaning
Both Karl and ExCE should load after P&S, as they both reference it. But mod load order has been known to break...
Community Balance Patch
Enable the setting: 'JFD_PIETY_COMMUNITY_BALANCE_PATCH'.
Piety has gone through much development - some Lua files aren't even executed (the Balance ones you noted, in fact, were from a distant past), and so it's no surprise that there is some redundancy. Originally, the mod used SaveUtils, and this is why some files still include it - I no longer use it, of course, but I suppose there are places I forgot to remove reference to it. Need update I'll do some cleaning
Both Karl and ExCE should load after P&S, as they both reference it. But mod load order has been known to break...
Only Karl, P&S, ExCE, and the Into the Renaissance Deluxe scenario use TSL atm.
Perhaps the oddest thing is that, IIRC, my Karl XII mod, using also TSL, ran perfectly fine alongside P&S.
JFD_SwedenKarlXII_Functions: King Karl XII is in this game
[COLOR="Red"]Runtime Error: Failed to iterate table due to query error.[/COLOR] Check Database.log for more details.
JFD_SwedenKarlXII_Functions: Processing data for save operation into savegame database.
JFD_SwedenKarlXII_Functions: Table save #1 for '[COLOR="Green"]HDNMod[/COLOR]' initiated from TSL Master.
JFD_SwedenKarlXII_Functions: TableSave time: 0, inserts: 0, deletes: 0, updates: 0, unchanged: 8, checksum: 152
JFD_SwedenKarlXII_Functions: Table save #2 for '[COLOR="Blue"]JFD_PietySovereignty[/COLOR]' initiated from TSL Master.
JFD_SwedenKarlXII_Functions: TableSave time: 0, inserts: 0, deletes: 0, updates: 0, unchanged: 23, checksum: 437
JFD_SwedenKarlXII_Functions: Table save #3 for '[COLOR="Blue"]JFD_PietySovereignty[/COLOR]' initiated from TSL Master.
JFD_SwedenKarlXII_Functions: TableSave time: 0.015000000000327, inserts: 0, deletes: 0, updates: 9, unchanged: 14, checksum: 437
JFD_SwedenKarlXII_Functions: Table save #3 for '[COLOR="Red"]JFD_SwedenKarlXII[/COLOR]' initiated from TSL Master.
[COLOR="Red"]Runtime Error: Failed to iterate table due to query error.[/COLOR] Check Database.log for more details.
JFD_SwedenKarlXII_Functions: Processing data for save operation into savegame database.
JFD_SwedenKarlXII_Functions: Table save #1 for '[COLOR="Blue"]JFD_PietySovereignty[/COLOR]' initiated from TSL Master.
JFD_SwedenKarlXII_Functions: [COLOR="Red"]!!!! TableSaverLoader thinks you are using TableSave before TableLoad on a loaded game; are you sure you want to do that? !!!![/COLOR]
JFD_SwedenKarlXII_Functions: TableSave time: 0.0019999999999527, inserts: 23, deletes: 0, updates: 0, unchanged: 0, checksum: 437
JFD_SwedenKarlXII_Functions: Table save #2 for '[COLOR="Blue"]JFD_PietySovereignty[/COLOR]' initiated from TSL Master.
JFD_SwedenKarlXII_Functions: TableSave time: 0, inserts: 0, deletes: 0, updates: 0, unchanged: 23, checksum: 437
JFD_SwedenKarlXII_Functions: Table save #2 for '[COLOR="Green"]JFD_SwedenKarlXII[/COLOR]' initiated from TSL Master.
JFD_SwedenKarlXII_Functions: TableSave time: 0, inserts: 0, deletes: 0, updates: 0, unchanged: 1, checksum: 19
Maybe a little off-topic, but is that E&D, Piety and Cultrual Diversity compatilble with overhaul mods such as GAIA(http://steamcommunity.com/sharedfiles/filedetails/?id=298284903&searchtext=gaia) ?
Apologies if this has already been answered... I had a little search but 61 pages is a lot! I've used this mod for a while now and have always chose my state religion to be the same as my overall religion. I'm playing a game now though, and I actually didn't manage to get a religion for myself in time (was 3 turns off...) so I decided to adopt a neighbor's religion since I liked their beliefs. Now I have the choice of adopting a state religion and I'm unsure what to choose and how it'll affect me.
I could choose the state religion to be the same as my neighbor's religion which I'm currently spreading to my cities. Or I could also choose a different neighbor's religion as my state religion. What exactly would happen if I chose the other religion? Would I get the beliefs and pantheon of this new religion? Would it override my current religion in my cities? I've never actually had a state religion be different than my chosen or adopted religion, so I'm unsure what happens!