[HELP] Troubleshooting My First Mod

You were right, the water column switched to 1 made citadels unbuildable on land. I took this off, and the general was able to build on land. Yield is now 2 hammers as well.

Builds does have water, but it appears that I cannot make citadel buildable on water without losing land support.

I checked SQLite while in-game. I haven't noticed a single bit of difference! Something must be wrong because the mod is working some things in game such as yields, but it does not appear in SQLite.

These are the remaining issues with my mod:

1. Make a separate "Sea Citadel" identical to a normal citadel, buildable by great admiral
2. New LUA code that enables both these citadels to support air units
EDIT: 3. Even though database doesn't pick up on it, I'm still not sure if SpecialCargo and DomainCargo are being added to Improvements

EDIT: Nevermind, debugdatabase did pick up on it. The tables were properly inserted and citadel is now air domain and fighter-friendly. Great Admiral is also allowed to build citadel. Tomorrow I'll see how I can add a new improvement Sea Citadel and make the great admiral build that instead. God help me with LUA
 
So while working on the new Sea Citadel, there seems to be an error stemming from this xml code:

Spoiler :
<BuildFeatures>
<Row>
<BuildType>BUILD_SEA_CITADEL</BuildType>
<FeatureType>FEATURE_ATOLL</FeatureType>
<PrereqTech>TECH_SAILING</PrereqTech>
<Time>300</Time>
<Remove>true</Remove>
</Row>
</BuildFeatures>


That forces a crash on the game with DX11 error screen. Odd. I have also added these codes for the Sea Citadel:

Spoiler :

XML Add Sea Citadel to Improvements:
<GameData>
<Improvements>
<Row>
<Type>IMPROVEMENT_SEA_CITADEL</Type>
<Description>TXT_KEY_IMPROVEMENT_CITADEL</Description>
<Civilopedia>TXT_KEY_CIV5_IMPROVEMENTS_CITADEL_TEXT</Civilopedia>
<ArtDefineTag>ART_DEF_IMPROVEMENT_CITADEL</ArtDefineTag>
<BuildableOnResources>true</BuildableOnResources>
<DefenseModifier>100</DefenseModifier>
<CreatedByGreatPerson>true</CreatedByGreatPerson>
<NearbyEnemyDamage>3</NearbyEnemyDamage>
<PortraitIndex>35</PortraitIndex>
<IconAtlas>TERRAIN_ATLAS</IconAtlas>
</Row>
</Improvements>
</GameData>

SQL Modify a bunch of things:

UPDATE Features
SET NoImprovement='0'
WHERE Type='FEATURE_ATOLL';

INSERT INTO Unit_Builds (UnitType, BuildType) VALUES ('UNIT_GREAT_ADMIRAL', 'BUILD_SEA_CITADEL');

INSERT INTO Improvement_ValidTerrains (ImprovementType, TerrainType) VALUES ('IMPROVEMENT_SEA_CITADEL', 'TERRAIN_COAST');

INSERT INTO Improvement_ValidFeatures (ImprovementType, FeatureType) VALUES ('IMPROVEMENT_SEA_CITADEL', 'FEATURE_ATOLL');

UPDATE Improvements
SET Water='1', DomainCargo='DOMAIN_AIR', SpecialCargo='SPECIALUNIT_FIGHTER'
WHERE Type='IMPROVEMENT_SEA_CITADEL';

UPDATE Builds
Set Water='1'
WHERE Type='BUILD_SEA_CITADEL';


The last two codes seem to work fine, of course the sea citadel is still not buildable by a great admiral. I suppose I'll need LUA for that. These make Sea Citadel appear as a water-friendly new improvement in DebugDatabase. But the first spoiler's xml code is throwing errors, and I can't seem to insert the new sea citadel improvement into Builds or BuildFeatures.

Any ideas Nutty?
 
There's no boolean type in SQLite, so it should be <Remove>1</Remove>.

EDIT: Did you leave out <GameData> or is that an excerpt?
Also, are you sure the order of your OnModActivated/UpdateDatabase entries is right?
 
Top Bottom