Where did I go wrong?

isnorden

Amnesiac Modder
Joined
Jul 6, 2012
Messages
608
Location
Madison, Wisconsin, USA
After making some code changes to my latest mod, I decided to run a playtest game with only that modpack activated. As you can see in the attached screenshot, the new code went horribly wrong... :eek2: :badcomp:

What can I do to get the resource generator working and cause the least possible conflict between mods? (We all know a few players who add multiple resource packs to get all their favorites.) My delete-and-replace code was supposed to solve the "two versions of Resource X on the same map" problem; instead, I got flat, featureless gray.

I suspect that I did something wrong with the resource generator (Lua code borrowed from FA's "Amer-Asian Resources"). Unfortunately, I know little about any code but XML; could one of you please show me how to fix my mistakes? Thank you again!
 
It's in the download database, bugs and all; just click the "my latest mod" link in my original post.
 
Looking at the screenshot, I would have guessed you're having texture memory issues, but I don't think your texture file sizes are overlarge...

I don't think the version you have uploaded is the same version you're using, because in this one, I'm getting database errors which result in no resources being added.
Spoiler :
Code:
[97176.595] no such table: ResourceFlavors
[97176.595] In Query - DELETE FROM ResourceFlavors WHERE ResourceType = ?;
[97176.595] Database::XMLSerializer (XML/NewMinerals.xml): There was an error executing the delete statement! See Database.log for details.
[97176.595] In XMLSerializer while updating table ResourceFlavors from file XML/NewMinerals.xml.
[97176.595] Database::XMLSerializer (XML/NewMineralsText.xml): 'Row' or 'Delete' expected, got 'Text'.
...
[97179.933] Invalid Reference on IconFontMapping.IconFontTexture - "ICON_FONT_TEXTURE_SAPPHIRE" does not exist in IconFontTextures

Let me know if you need help fixing those, but I assume you already have.

So I never got to give it a real test. Note I did get a "Could not load font xml file" error when researching Metallurgy (it can't load the Platinum icon). There is also an extra apostrephe in the Metallury popup ("...unlocks the Jeweler''s Shop..."); same for the Mining popup ("Also unlocks the Goldsmith''s Shop...").

Also note that you shouldn't set your Lua files VFS=true unless you're using an include(). If you add them with an Entry point like InGameUIAddin, they should be VFS=false.
 
From bad to worse today: I scrapped FA's resource generator in favor of Barathor's expanded AssignStartingPlots.lua, plugging in my new resources where Barathor had put his. Although I found and corrected a few old mistakes in my art-related code, today's playtest ended abruptly with an "instant defeat by bug". No other mods were selected for that game, so I checked the Lua.log file and saw this...


Spoiler :
Code:
[90456.437] Map Script: 2 lakes added
[90456.437] Map Script: Adding Features (Lua Small Continents) ...
[90456.640] Map Script: Creating start plot database.
[90456.640] Runtime Error: Assets\DLC\DLC_SP_Maps_2\Maps\Script_Small_Continents_Plus.lua:971: attempt to index global 'AssignStartingPlots' (a nil value)
stack traceback:
	Assets\DLC\DLC_SP_Maps_2\Maps\Script_Small_Continents_Plus.lua:971: in function 'StartPlotSystem'
	Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:815: in function <Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:779>
	=[C]: ?
[90486.765] CivilopediaScreen: SetSelectedCategory(12)
[90486.765] CivilopediaScreen: CivilopediaCategory[CategoryTerrain].DisplayList
[90486.859] CivilopediaScreen: SetSelectedCategory(1)
[90486.859] CivilopediaScreen: CivilopediaCategory[CategoryHomePage].DisplayList
[90490.484] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion2\Tutorial\Lua\TutorialInclude_Expansion2.lua
[90490.484] Tutorial: Loaded Additional Tutorial checks - Assets\DLC\Expansion\Tutorial\lua\TutorialInclude_Expansion1.lua
[90493.625] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarPlunderTradeRoutePopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\DLC\Expansion2\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmImprovementRebuildPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\NetworkKickedPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\CityPlotManagementPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCommandPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivEnterTerritoryPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\LiberateMinorPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ReturnCivilianPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\AnnexCityPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarMovePopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\BarbarianRansomPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmGiftPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmCityTaskPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\PuppetCityPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\DeclareWarRangeStrikePopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\ConfirmPolicyBranchPopup.lua
[90493.625] GenericPopup: Loaded Popup - Assets\UI\InGame\PopupsGeneric\MinorCivGoldPopup.lua
[90495.968] EconomicGeneralInfo: Total Units - 0
[90495.968] EconomicGeneralInfo: Maint Free Units - 0
[90495.968] EconomicGeneralInfo: Paid Units - 0
[90496.031] EconomicGeneralInfo: Total Units - 0
[90496.031] EconomicGeneralInfo: Maint Free Units - 0
[90496.031] EconomicGeneralInfo: Paid Units - 0
[90497.234] ChoosePantheonPopup: -252
[90497.234] ChoosePantheonPopup: 963
[90497.234] ChoosePantheonPopup: 711
[90498.093] ChooseIdeologyPopup: -252
[90498.093] ChooseIdeologyPopup: 963
[90498.093] ChooseIdeologyPopup: 711
[90499.359] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90499.359] Runtime Error: Error loading C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua.
[90499.375] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\Maps\Terra.lua:1080: nesting of [[...]] is deprecated near '['
[90499.375] Runtime Error: Error loading C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\Maps\Terra.lua.
[90500.687] AdvisorInfoPopup: Closing Advisor Info
[90500.687] Demographics: Dequeuing demographics
[90500.687] Demographics: Dequeuing demographics
[90546.265] InstalledPanel: Refreshing Mods
[90546.265] InstalledPanel: GetModBrowserListings()
[90547.015] InstalledPanel: Refreshing Mods
[90547.015] InstalledPanel: GetModBrowserListings()
[90574.171] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.250] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.281] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.296] Runtime Error: Assets\Maps\Four_Corners.lua:495: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.296] Runtime Error: Error loading Assets\Maps\Four_Corners.lua.
[90574.312] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.328] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.328] Runtime Error: Assets\Maps\Great_Plains.lua:877: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.328] Runtime Error: Error loading Assets\Maps\Great_Plains.lua.
[90574.359] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.359] Runtime Error: Assets\Maps\Highlands.lua:534: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.359] Runtime Error: Error loading Assets\Maps\Highlands.lua.
[90574.375] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.390] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.390] Runtime Error: Assets\Maps\InlandSea.lua:299: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.390] Runtime Error: Error loading Assets\Maps\InlandSea.lua.
[90574.421] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.421] Runtime Error: Assets\Maps\Lakes.lua:191: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.421] Runtime Error: Error loading Assets\Maps\Lakes.lua.
[90574.437] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.437] Runtime Error: Assets\Maps\North_vs_South.lua:474: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.437] Runtime Error: Error loading Assets\Maps\North_vs_South.lua.
[90574.468] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.484] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.515] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.515] Runtime Error: Assets\Maps\Ring.lua:562: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.515] Runtime Error: Error loading Assets\Maps\Ring.lua.
[90574.531] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.546] Runtime Error: Assets\Maps\Skirmish.lua:798: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.546] Runtime Error: Error loading Assets\Maps\Skirmish.lua.
[90574.562] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.593] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.593] Runtime Error: Assets\Maps\Terra.lua:606: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.593] Runtime Error: Error loading Assets\Maps\Terra.lua.
[90574.625] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.656] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.656] Runtime Error: Assets\Maps\West_vs_East.lua:296: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.656] Runtime Error: Error loading Assets\Maps\West_vs_East.lua.
[90574.671] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.687] Runtime Error: Assets\DLC\DLC_SP_Maps\Maps\Amazon.lua:894: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.687] Runtime Error: Error loading Assets\DLC\DLC_SP_Maps\Maps\Amazon.lua.
[90574.703] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.718] Runtime Error: Assets\DLC\DLC_SP_Maps\Maps\ContinentsPlus.lua:994: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.718] Runtime Error: Error loading Assets\DLC\DLC_SP_Maps\Maps\ContinentsPlus.lua.
[90574.750] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.781] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.781] Runtime Error: Assets\DLC\DLC_SP_Maps\Maps\PangaeaPlus.lua:1122: attempt to index global 'AssignStartingPlots' (a nil value)
[90574.781] Runtime Error: Error loading Assets\DLC\DLC_SP_Maps\Maps\PangaeaPlus.lua.
[90574.796] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.812] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.843] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.859] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.875] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.890] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.906] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.921] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.953] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.968] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90574.984] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.000] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.015] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.031] Runtime Error: Assets\DLC\DLC_SP_Maps_3\Maps\Script_Random_China.lua:722: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.031] Runtime Error: Error loading Assets\DLC\DLC_SP_Maps_3\Maps\Script_Random_China.lua.
[90575.031] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.062] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.078] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.093] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.109] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.125] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.156] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.171] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.171] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.203] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.203] Runtime Error: Assets\DLC\Expansion\Maps\Amazon_XP.lua:893: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.203] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Amazon_XP.lua.
[90575.218] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.234] Runtime Error: Assets\DLC\Expansion\Maps\Arborea.lua:765: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.234] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Arborea.lua.
[90575.250] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.250] Runtime Error: Assets\DLC\Expansion\Maps\Boreal.lua:607: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.250] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Boreal.lua.
[90575.265] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.281] Runtime Error: Assets\DLC\Expansion\Maps\Europe.lua:837: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.281] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Europe.lua.
[90575.296] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.296] Runtime Error: Assets\DLC\Expansion\Maps\Frontier.lua:689: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.296] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Frontier.lua.
[90575.312] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.328] Runtime Error: Assets\DLC\Expansion\Maps\Great_Plains_XP.lua:877: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.328] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Great_Plains_XP.lua.
[90575.343] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.359] Runtime Error: Assets\DLC\Expansion\Maps\Hemispheres.lua:923: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.359] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Hemispheres.lua.
[90575.375] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.390] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.406] Runtime Error: Assets\DLC\Expansion\Maps\Rainforest.lua:763: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.406] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Rainforest.lua.
[90575.421] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.437] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:407: '}' expected (to close '{' at line 98) near 'EligibilityMethodNumber'
[90575.453] Runtime Error: Assets\DLC\Expansion\Maps\Tilted_Axis.lua:872: attempt to index global 'AssignStartingPlots' (a nil value)
[90575.453] Runtime Error: Error loading Assets\DLC\Expansion\Maps\Tilted_Axis.lua.
[90596.109] InstalledPanel: Refreshing Mods
[90596.109] InstalledPanel: GetModBrowserListings()
[90597.187] InstalledPanel: Refreshing Mods
[90597.187] InstalledPanel: GetModBrowserListings()

I do remember enough about Lua to know what a nil value is, but not enough to figure out where I'd created one by mistake. My deleting "generic gems" from the resource list (after adding eight new gems and a metal) may be to blame -- although I might have made other errors. To anyone who knows Lua reasonably well: could you please check the code in my attached mod snapshot, and show me where/how to kill the bugs?
 
P.S. to Nutty: Thank you for explaining the bugs in version 3.2; it was supposed to fix the data errors that kept new resources off the map in 3.1, but ironically created a worse one! :confused: I switched to Barathor's code in v4 mainly because it was harder to keep track of a multi-file script with include() commands.
 
I personally like the idea of using FA's generator instead of replacing AssignStartingPlots.lua (especially as you said you were trying to maintain compatibility with other resource mods), but admittedly there are problems with that method too.

Either way...

The log is saying you need a comma after isn_sapphire_ID on line 404 of AssignStartingPlots.lua.

EDIT: As for Terra.lua, Lua block comment syntax is:
--[[ and --]]

not:
--[[ and ]]--

:)
 
I personally like the idea of using FA's generator instead of replacing AssignStartingPlots.lua (especially as you said you were trying to maintain compatibility with other resource mods), but admittedly there are problems with that method too.

Either way...

The log is saying you need a comma after isn_sapphire_ID on line 404 of AssignStartingPlots.lua.

EDIT: As for Terra.lua, Lua block comment syntax is:
--[[ and --]]

not:
--[[ and ]]--

I fixed those errors just now, but more turned up in the latest logfile attached to this message.

1. Where exactly is that missing } supposed to go in line 807? I'm still gettng error messages like these:

Code:
[141779.093] Syntax Error: C:\Documents and Settings\Ingeborg Norden\My Documents\My Games\Sid Meier's Civilization 5\MODS\(G+K or BNW) Goldsmith, Jeweler, and More Luxuries (v 4)\Lua\AssignStartingPlots.lua:807: '}' expected (to close '{' at line 797) near '{'

...And these:

Code:
[141779.875] Runtime Error: Assets\DLC\DLC_SP_Maps_2\Maps\Script_Small_Continents_Plus.lua:971: attempt to index global 'AssignStartingPlots' (a nil value)
stack traceback:
	Assets\DLC\DLC_SP_Maps_2\Maps\Script_Small_Continents_Plus.lua:971: in function 'StartPlotSystem'
	Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:815: in function <Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:779>
	=[C]: ?




2. What should I do about "nested [[ ]] is deprecated" errors in the map script? The block comments were in Barathor's mod before I borrowed his code.
 
After more edits, playtests, and "defeats by bug" with version 4, I went back to FA's resource generator and playtested the result. Something looked wrong when my new resources didn't appear on the map or on Civilopedia; when I became eligible to learn Metallurgy, I kept getting the error message "Could not load font XML file". I then checked Lua.log and found out that te resource generator had not passed my additions into the database. If you can figure out what I overlooked and how to correct it, this will be the update I release. Thank you for being patient with me!
 
It's not the generator, it's your XML. You want to make sure your database.log is right before moving to the Lua log.

In NewMinerals.xml, you forgot the underscore in Resource_Flavors.

In NewMineralsText.xml, you've got the syntax wrong.
Code:
<Row Tag="TXT_KEY_RESOURCE_AMBER_ISN" [COLOR="RED"][B]/[/B][/COLOR]>
	<Text>Amber</Text>
That last slash at the end of the Row line ends the insert command, so that the parser adds a new row with Tag set to "TXT_KEY_RESOURCE_AMBER_ISN" and Text set to NULL (since it isn't specified before the end of the command). The Text tag that follows then appears out of nowhere from the point of view of the parser.

Any of these would work instead:
Code:
<Row Tag="TXT_KEY_RESOURCE_AMBER_ISN" Text="Amber" />
or
Code:
<Row Tag="TXT_KEY_RESOURCE_AMBER_ISN">
	<Text>Amber</Text>
</Row>
or
Code:
<Row>
	<Tag>TXT_KEY_RESOURCE_AMBER_ISN</Tag>
	<Text>Amber</Text>
</Row>
 
Thank you for spotting my syntax errors and typos; I've corrected the ones you listed, but caused another database problem somehow. During the "Dawn of Man" screen, the same font-file error message appeared repeatedly; here's what Database.log said about the situation.


Spoiler :
Code:
[232725.390] columns StrategicViewType, TileType are not unique
[232725.390] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[232760.921] no such table: ContentPackage.LocalizedText
[232760.921] no such table: ContentPackage.LocalizedText
[232760.921] no such table: ContentPackage.LocalizedText
[232769.687] no such table: ContentPackage.LocalizedText
[232778.921] columns StrategicViewType, TileType are not unique
[232778.921] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[232781.296] no such table: ContentPackage.LocalizedText
[232781.296] no such table: ContentPackage.LocalizedText
[232781.296] no such table: ContentPackage.LocalizedText
[232804.890]

I have no idea of where to look for the error behind that message; could you please show me what to do? :thanx: :rockon:
 
Those errors come with the game and are a result of Firaxis' problems, not us modders'. They can just be ignored without any adverse effects, although they do look ugly in the database.log.
 
Those errors come with the game and are a result of Firaxis' problems, not us modders'. They can just be ignored without any adverse effects, although they do look ugly in the database.log.

Since that XML error message keeps me from getting past the "Dawn of Man" screen, is there a less disruptive way to code what I had in mind?
 
Those messages have nothing to do with anything relevant. It is therefore not those errors from the database.log that are preventing you from getting past the DOM screen. Any clues from the lua.log?
 
Those messages have nothing to do with anything relevant. It is therefore not those errors from the database.log that are preventing you from getting past the DOM screen. Any clues from the lua.log?


The Lua.log file didn't seem to have any messages related to an infinite loop of XML font errors, although I may be wrong. I'm attaching all the logfiles of a recent playtest. If any of them show what I need to correct, please pass it on!
 
I've never modded font icons, but you definitely don't add the .dds extension at the end of the IconFontTextures entry [additionally the Art/FontIcons/ filepath isn't necessary, and may or may not cause a problem as well]
 
D'oh! Let me look at some similar modpacks and try to match my syntax with what's in there.
 
I deleted the pathnames where you suggested it, fixed an icon typo in newshops.xml, and hunted for more typos; but that blasted XML error won't go away. The database log showed nothing unusual, but the Lua log showed an error in a map script that's part of the standard game:

Spoiler :
Code:
[337042.531] Runtime Error: Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:7764: attempt to compare nil with number
stack traceback:
	Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:7764: in function 'AssignLuxuryToRegion'
	Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:7930: in function 'AssignLuxuryRoles'
	Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:9878: in function 'PlaceResourcesAndCityStates'
	Assets\DLC\DLC_SP_Maps_2\Maps\Script_Small_Continents_Plus.lua:993: in function 'StartPlotSystem'
	Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:815: in function <Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:779>
	=[C]: ?

I'm attaching my latest logfiles and the updated mod; if you find something else that could cause that XML font error, please let me know.
 
I think you misread. The .dds extension was the biggie (remove it!); I wasn't sure about the pathname.

EDIT: But there is obviously another issue... I suspect the game is having trouble with the fact that you've deleted Gems [leaving a hole in the database] which it's trying to use in AssignStartingPlots.lua. You might update the Gems entry and change it to something else rather than deleting it; realizing that you'll be letting that resource be handed out by the AssignStartingPlots instead of your generator.
EDIT #2: Or see this tutorial.

EDIT #3: I assume you've seen this recent thread: Placing Custom Resources?
 
Before I edited out the pathnames, I checked the atlas-defining code in other mods which added resources, but which didn't cause any problems on my computer. All those mods showed the same syntax: keep the .dds extensions, exclude the pathnames. [EDIT: I was looking at the regular atlas defiitions when I wrote that, but you're right on both points; font icon atlases drop the extension AND the path.]

The more I try to make this project work, though, the more I suspect that you're right about the other possibility. Deleting data that might come from another mod (the way Barathor did) is usually safe. Deleting data that's part of the main game (the way I did) isn't safe, unless you're redoing a whole list from scratch. :)

What I should have done is replace the "generic gems" with another resource as you suggested, changing the default icons and text with some <Update> blocks. Here's hoping that works! [EDIT: I'm considering Opal as the new resource, since (1) Diamonds get their own reskin in this mod, and (2) Firaxis' Gems show enough color for a multi-colored stone.]
 
Top Bottom