I added resources but won't work

stapano00

Chieftain
Joined
Jul 11, 2014
Messages
97
Location
NY - America
Here is my mod;;;

Well, I added some other features

I pulled out graphics, b/c of file size

when I start, there is no settler,

I used a ResourceGenerator, and LumberMill Mod

I don't know what is the problem.

Spoiler :
Runtime Error: Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:3792: attempt to perform arithmetic on field '?' (a nil value)
stack traceback:
Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:3792: in function 'AttemptToPlaceStoneAtGrassPlot'
Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:4421: in function 'NormalizeStartLocation'
Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:4579: in function 'BalanceAndAssign'
Assets\Maps\Continents.lua:315: in function 'StartPlotSystem'
Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:815: in function <Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:779>
=[C]: ?


Spoiler :
Runtime Error: C:\Users\JS_KANG\Documents\My Games\Sid Meier's Civilization 5\MODS\Mods\Caesar Mod (v 1)\LUA\Resources\ResGenerator.lua:339: attempt to concatenate local 'N' (a nil value)
[56005.718] Runtime Error: Error loading C:\Users\JS_KANG\Documents\My Games\Sid Meier's Civilization 5\MODS\Mods\Caesar Mod (v 1)\LUA\Resources\AddNewResource.lua.



and of course I set all lua and graphic file's VFS to true
 

Attachments

I've got these error in the Database.log,

Code:
[12533.453] PRIMARY KEY must be unique
[12533.453] PRIMARY KEY must be unique
[12533.468] table IDRemapper already exists
[12533.500] table IDRemapper already exists


Code:
CREATE TABLE IDRemapper ( id INTEGER PRIMARY KEY AUTOINCREMENT, Type TEXT );
INSERT INTO IDRemapper (Type) SELECT Type FROM Features;
UPDATE Features SET ID =	( SELECT IDRemapper.id-1 FROM IDRemapper WHERE Features.Type = IDRemapper.Type);
DROP TABLE IDRemapper;

CREATE TABLE IDRemapper ( id INTEGER PRIMARY KEY AUTOINCREMENT, Type TEXT );
INSERT INTO IDRemapper (Type) SELECT Type FROM FakeFeatures;
UPDATE FakeFeatures SET ID =	( SELECT IDRemapper.id-1 FROM IDRemapper WHERE FakeFeatures.Type = IDRemapper.Type);
DROP TABLE IDRemapper;

CREATE TABLE IDRemapper ( id INTEGER PRIMARY KEY AUTOINCREMENT, Type TEXT );
INSERT INTO IDRemapper (Type) SELECT Type FROM Natural_Wonder_Placement;
UPDATE Natural_Wonder_Placement SET ID =	( SELECT IDRemapper.id-1 FROM IDRemapper WHERE Natural_Wonder_Placement.Type = IDRemapper.Type);
DROP TABLE IDRemapper;
 
I'm getting
Spoiler :
Runtime Error: Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:3505: attempt to perform arithmetic on field '?' (a nil value)
stack traceback:
Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:3505: in function 'AttemptToPlaceBonusResourceAtPlot'
Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:4333: in function 'NormalizeStartLocation'
Assets\DLC\Expansion2\Gameplay\Lua\AssignStartingPlots.lua:4579: in function 'BalanceAndAssign'
Assets\Maps\Continents.lua:315: in function 'StartPlotSystem'
Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:815: in function <Assets\DLC\Expansion2\Gameplay\Lua\MapGenerator.lua:779>
=[C]: ?


and

Spoiler :
Runtime Error: C:\Users\JS_KANG\Documents\My Games\Sid Meier's Civilization 5\MODS\Mods\Caesar Mod (v 1)\LUA\Resources\ResGenerator.lua:339: attempt to concatenate local 'N' (a nil value)
[3295.718] Runtime Error: Error loading C:\Users\JS_KANG\Documents\My Games\Sid Meier's Civilization 5\MODS\Mods\Caesar Mod (v 1)\LUA/Resources/AddNewResource.lua.



and

I don't know
Code:
[3295.609] AddNewResource: Warning: cache not shared.
What does this mean?



Other Question

Code:
[4006.437] table IDRemapper already exists
[4006.515] table IDRemapper already exists
[4006.546] table IDRemapper already exists
[4006.578] table IDRemapper already exists

What is that? How to fix it?


Moderator Action: I've merged three threads together as you've opened up three different threads to ask about the same situation. Please only open one thread in future; it's better for you as well, as all the information and all the replies are in one place.
 
The SQL is making assumptions (that are not valid) about the way the database will retrieve values.

Consider the Features table has two entries, A and B with IDs of 0 and 1 respectively.

If they are inserted into the remapper table in the order A then B, they will have remapped IDs of 1 and 2 and the subsequent UPDATE will succeed.

However, if they are inserted into the remapper table in the order B then A (with associated remapped IDs of B=1 and A=2) when the UPDATE Features SET ID=(1-1) WHERE Type='B' executes it will fail with the reported errors as A already has an ID of 0, and the IDs have to be unique.

You should be able to fix the problem by adding "ORDER BY ID" to the end of the all of the SELECT statements.
 
oh!!!!!!!! I got it now!

But No Idea with How to fix
Code:
[37378.656] table Resource_FeatureBooleans has no column named TerrainType
[37378.656] In Query - insert into Resource_FeatureBooleans('ResourceType', 'TerrainType') values (?, ?);
[37378.656] In XMLSerializer while updating table Resource_FeatureBooleans from file XML/Resource/CIV5Resources.xml.
[37378.656] table IDRemapper already exists
[37378.718] table IDRemapper already exists
 
oh!!!!!!!! I got it now!

But No Idea with How to fix
Code:
[37378.656] table Resource_FeatureBooleans has no column named TerrainType
[37378.656] In Query - insert into Resource_FeatureBooleans('ResourceType', 'TerrainType') values (?, ?);
[37378.656] In XMLSerializer while updating table Resource_FeatureBooleans from file XML/Resource/CIV5Resources.xml.
[37378.656] table IDRemapper already exists
[37378.718] table IDRemapper already exists

In the part of your code that makes changes to the Resource_FeatureBooleans table, you should use FeatureType instead of TerrainType.

Btw, this table (and other database content related to resource placement) doesn't work on random maps (they only work on world builder maps with random resources), assuming you use an unmodded version of AssignStartingPlots.lua.
 
Back
Top Bottom