earlc
Warlord
- Joined
- Jun 9, 2017
- Messages
- 113
Old first post:
Spoiler :
I'm a newbie to modding. I've been able to figure out and troubleshoot a bunch by copying others, but now I'm trying to add a leader ability to a custom civ/leader that gives a combat bonus to all units on rainforests, forests and marshes. I was using America's home continent ability and the rough rider's hills bonus as a model, with the main difference being that hills are considered a terrain type, and forests/jungles/marshes are all considered features by the game. So for those I looked at Brazil's adjacency bonuses and crossed my fingers.
Now I get booted out whenever trying to start a new game. Here's the code I'm attempting:
And here is my database log. I'm getting a syntax error by FEATURE_FOREST, but I don't understand why.
I figure the invalid references are unrelated, probably stemming from using a template and not resolving all the tags. I think it all worked before I tried this LA though. I have no idea what the "types" errors are, but again, those didn't stop the game from starting before.
Hopefully it's an easy, dumb mistake?
Now I get booted out whenever trying to start a new game. Here's the code I'm attempting:
Code:
--==========================================================================================================================
-- LEADERS: TRAITS
--==========================================================================================================================
-- Types
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Types
(Type, Kind)
VALUES ('TRAIT_OSCEOLA_EVERGLADES', 'KIND_TRAIT');
--------------------------------------------------------------------------------------------------------------------------
-- Traits
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Traits
(TraitType, Name, Description)
VALUES ('TRAIT_OSCEOLA_EVERGLADES', 'LOC_TRAIT_OSCEOLA_EVERGLADES_NAME', 'LOC_TRAIT_OSCEOLA_EVERGLADES_DESCRIPTION');
--------------------------------------------------------------------------------------------------------------------------
-- TraitModifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO TraitModifiers
(TraitType, ModifierId)
VALUES ('TRAIT_OSCEOLA_EVERGLADES', 'OSCEOLA_EVERGLADES_COMBAT_BONUS'),
('TRAIT_OSCEOLA_EVERGLADES', 'OSCEOLA_EVERGLADES_COMBAT_BONUS_MODIFIER');
--------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers
(ModifierId, ModifierType, OwnerRequirementSetId, SubjectRequirementSetId)
VALUES ('OSCEOLA_EVERGLADES_COMBAT_BONUS', 'MODIFIER_PLAYER_UNITS_ATTACH_MODIFIER', null, null),
('OSCEOLA_EVERGLADES_COMBAT_BONUS_MODIFIER', 'MODIFIER_UNIT_ADJUST_COMBAT_STRENGTH', 'REQUIREMENTS_UNIT_LAND_DOMAIN', 'REQUIRE_UNIT_FEATURE_MARSH_FOREST');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
(ModifierId, Name, Value)
VALUES ('OSCEOLA_EVERGLADES_COMBAT_BONUS', 'ModifierId', 'OSCEOLA_EVERGLADES_COMBAT_BONUS_MODIFIER'),
('OSCEOLA_EVERGLADES_COMBAT_BONUS', 'Amount', 7);
--------------------------------------------------------------------------------------------------------------------------
-- RequirementSets
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSets
(RequirementSetId, RequirementSetType)
VALUES ('REQUIRE_UNIT_FEATURE_MARSH_FOREST', 'REQUIREMENTSET_TEST_ALL');
--------------------------------------------------------------------------------------------------------------------------
-- RequirementSetRequirements
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSetRequirements
(RequirementSetId, RequirementId)
VALUES ('REQUIRE_UNIT_FEATURE_MARSH_FOREST', 'PLOT_IS_FOREST_FEATURE_REQUIREMENT'),
('REQUIRE_UNIT_FEATURE_MARSH_FOREST', 'PLOT_IS_RAINFOREST_FEATURE_REQUIREMENT'),
('REQUIRE_UNIT_FEATURE_MARSH_FOREST', 'PLOT_IS_MARSH_FEATURE_REQUIREMENT');
--------------------------------------------------------------------------------------------------------------------------
-- Requirements
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Requirements
(RequirementId, RequirementType)
VALUES ('PLOT_IS_FOREST_FEATURE_REQUIREMENT', 'REQUIREMENT_PLOT_FEATURE_TYPE_MATCHES'),
('PLOT_IS_RAINFOREST_FEATURE_REQUIREMENT', 'REQUIREMENT_PLOT_FEATURE_TYPE_MATCHES'),
('PLOT_IS_MARSH_FEATURE_REQUIREMENT', 'REQUIREMENT_PLOT_FEATURE_TYPE_MATCHES');
--------------------------------------------------------------------------------------------------------------------------
-- RequirementArgumets
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementArguments
(RequirementId, Name, Value)
VALUES ('PLOT_IS_FOREST_FEATURE_REQUIREMENT', 'FeatureType' 'FEATURE_FOREST'),
('PLOT_IS_RAINFOREST_FEATURE_REQUIREMENT', 'FeatureType' 'FEATURE_JUNGLE'),
('PLOT_IS_MARSH_FEATURE_REQUIREMENT', 'FeatureType' 'FEATURE_MARSH');
Code:
[3846476.701] [Localization]: Validating Foreign Key Constraints...
[3846476.703] [Localization]: Passed Validation.
[3846476.723] [Configuration]: Validating Foreign Key Constraints...
[3846476.723] [Configuration]: Passed Validation.
[3846490.634] [FullTextSearch]: Initializing FullTextSearch
[3846490.941] [Gameplay]: Validating Foreign Key Constraints...
[3846490.950] [Gameplay]: Passed Validation.
[3846491.364] [Configuration] ERROR: no such table: Types
[3846491.364] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
[3846491.364] [Configuration]: In XMLSerializer while updating table Types from file Template_Buildings.xml.
[3846491.364] [Configuration] ERROR: no such table: Types
[3846491.364] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
[3846491.364] [Configuration]: In XMLSerializer while updating table Types from file Template_Units.xml.
[3846491.364] [Configuration]: Validating Foreign Key Constraints...
[3846491.365] [Configuration]: Passed Validation.
[3846509.458] [FullTextSearch]: FTS - Creating Context
[3846520.287] [Configuration] ERROR: no such table: Types
[3846520.287] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
[3846520.287] [Configuration]: In XMLSerializer while updating table Types from file Template_Buildings.xml.
[3846520.287] [Configuration] ERROR: no such table: Types
[3846520.287] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
[3846520.287] [Configuration]: In XMLSerializer while updating table Types from file Template_Units.xml.
[3846520.354] [Configuration]: Validating Foreign Key Constraints...
[3846520.354] [Configuration]: Passed Validation.
[3846523.204] [Gameplay] ERROR: near "'FEATURE_FOREST'": syntax error
[3846523.205] [Gameplay] ERROR: FOREIGN KEY constraint failed
[3846523.205] [Gameplay] ERROR: FOREIGN KEY constraint failed
[3846523.205] [Gameplay]: Validating Foreign Key Constraints...
[3846523.206] [Gameplay] ERROR: Invalid Reference on Buildings.TraitType - "TRAIT_CIVILIZATION_BUILDING_TEMP_CUSTOM" does not exist in Traits
[3846523.213] [Gameplay] ERROR: Invalid Reference on Units.TraitType - "TRAIT_CIVILIZATION_UNIT_TUSTENU" does not exist in Traits
[3846523.214] [Gameplay]: Failed Validation.
[3846523.230] [Gameplay]: Validating Foreign Key Constraints...
[3846523.239] [Gameplay]: Passed Validation.
[3846524.376] [FullTextSearch]: FTS - Creating Context
[3846524.465] [Configuration] ERROR: no such table: Types
[3846524.465] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
[3846524.465] [Configuration]: In XMLSerializer while updating table Types from file Template_Buildings.xml.
[3846524.465] [Configuration] ERROR: no such table: Types
[3846524.465] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
[3846524.465] [Configuration]: In XMLSerializer while updating table Types from file Template_Units.xml.
[3846524.465] [Configuration]: Validating Foreign Key Constraints...
[3846524.465] [Configuration]: Passed Validation.
[3846529.571] [FullTextSearch]: FullTextSearch - Shutting down
Hopefully it's an easy, dumb mistake?
Last edited: