Questions on using SQL UPDATE function

Nymus

Chieftain
Joined
Nov 22, 2016
Messages
6
So I'm making a mod and I wanted to make it so the Street Carnival does not require any population to built(as it was before it was patched). So far the lines I have used are

UPDATE Districts SET RequiresPopulation = NULL WHERE DistrictType = 'DISTRICT_STREET_CARNIVAL';
and
UPDATE Districts SET RequiresPopulation = 'false' WHERE DistrictType = 'DISTRICT_STREET_CARNIVAL';

However, these doesn't seem to work and the district is still bounded by population. I am also having trouble with this type of UPDATE when I'm trying to remove the requirement for great wall to be only built on the border when I use the line

UPDATE Improvements SET BuildonFrontier= NULL WHERE ImprovementType= 'IMPROVEMENT_GREAT_WALL';
or
UPDATE Improvements SET BuildonFrontier= 'false' WHERE ImprovementType= 'IMPROVEMENT_GREAT_WALL';

On my other mod, when I used
UPDATE Units SET Cost = '90' WHERE UnitType = 'UNIT_NORWEGIAN_BERSERKER';
the changes gets implemented so I think the lines I made should be right but it doesn't work anyway. Any help would be appreciated. Thank you
 
'90' is text but SQLite changes it automatically to integer. Boolean actually doesn't exist in SQLite, it's integer 1 as TRUE and 0 as FALSE. So, you cannot use 'false' because it's text.
Should be RequiresPopulation = 0
 
'90' is text but SQLite changes it automatically to integer. Boolean actually doesn't exist in SQLite, it's integer 1 as TRUE and 0 as FALSE. So, you cannot use 'false' because it's text.
Should be RequiresPopulation = 0
Haha yea it worked. First time I kept the '0' accidentally but yea it now works. Thanks alot man.
 
Back
Top Bottom