So I used this template: UA_Reference.sql - Google Drive to try and add a special trait to Arabia, but I can't play a game with this mod active as the game won't start.
I am trying to give 5 combat boost to Arabian units fighting on desert tiles.
SQL
I am trying to give 5 combat boost to Arabian units fighting on desert tiles.
SQL
Code:
-----------------------------------------------
-- Types
-----------------------------------------------
INSERT INTO Types
(Type, Kind )
VALUES ('TRAIT_CIVILIZATION_SALADIN_ARABIA', 'KIND_TRAIT' ),
('MODTYPE_SALADIN_ARABIA_DESERT_ATTACK_BUFF', 'KIND_MODIFIER' );
-----------------------------------------------
-- Traits
-----------------------------------------------
INSERT INTO Traits
(TraitType, Name, Description )
VALUES ('TRAIT_CIVILIZATION_SALADIN_ARABIA', 'LOC_TRAIT_CIVILIZATION_SALADIN_ARABIA_NAME', 'LOC_TRAIT_CIVILIZATION_SALADIN_ARABIA_DESCRIPTION' );
-----------------------------------------------
-- CivilizationTraits
-----------------------------------------------
INSERT INTO CivilizationTraits
(CivilizationType, TraitType )
VALUES ('CIVILIZATION_SALADIN_ARABIA', 'TRAIT_CIVILIZATION_SALADIN_ARABIA' );
-----------------------------------------------
-- TraitModifiers
-----------------------------------------------
INSERT INTO TraitModifiers
(TraitType, ModifierId )
VALUES ('TRAIT_CIVILIZATION_SALADIN_ARABIA', 'MODIFIER_SALADIN_ARABIA_DESERT_ATTACK' );
-----------------------------------------------
-- DynamicModifiers
-----------------------------------------------
INSERT INTO DynamicModifiers
(ModifierType, CollectionType, EffectType )
VALUES ('MODTYPE_SALADIN_ARABIA_DESERT_ATTACK_BUFF', 'COLLECTION_PLAYER_COMBAT', 'EFFECT_ADJUST_PLAYER_STRENGTH_MODIFIER' );
---------------------------------------------------------------------------------------------------------------
-- RequirementSets
---------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSets
(RequirementSetId, RequirementSetType)
VALUES ('ATTACK_BUFF_PLOT_HAS_DESERT', 'REQUIREMENTSET_TEST_ANY');
---------------------------------------------------------------------------------------------------------------
-- RequirementSetRequirements
---------------------------------------------------------------------------------------------------------------
INSERT INTO RequirementSetRequirements
(RequirementSetId, RequirementId)
VALUES ('ATTACK_BUFF_PLOT_HAS_DESERT', 'REQUIRES_PLOT_HAS_DESERT');
-----------------------------------------------
-- Modifiers
-----------------------------------------------
INSERT INTO Modifiers
(ModifierId, ModifierType, OwnerRequirementSetId, SubjectRequirementSetId, RunOnce, Permanent )
VALUES ('MODIFIER_SALADIN_ARABIA_DESERT_ATTACK', 'MODTYPE_SALADIN_ARABIA_DESERT_ATTACK_BUFF', NULL, 'ATTACK_BUFF_PLOT_HAS_DESERT', 0, 0 );
-----------------------------------------------
-- ModifierArguments
-----------------------------------------------
INSERT INTO ModifierArguments
(ModifierId, Name, Value )
VALUES ('MODIFIER_SALADIN_ARABIA_DESERT_ATTACK', 'Amount', 5 );
-----------------------------------------------------------------------------------------------------------------------------------------------------------------