Hello everyone!
I've been having lots of trouble lately with my unique unit that I named the Timetraveller. The plan is to make them fully heal each turn. However, it would seem that using the 'EFFECT_ADJUST_UNIT_HEALING_MODIFIERS' and pumping it up to 100 doesn't change a thing for its healing factor, am I reduced to making it in LUA?
Here's the code:
I've been having lots of trouble lately with my unique unit that I named the Timetraveller. The plan is to make them fully heal each turn. However, it would seem that using the 'EFFECT_ADJUST_UNIT_HEALING_MODIFIERS' and pumping it up to 100 doesn't change a thing for its healing factor, am I reduced to making it in LUA?
Here's the code:
Code:
INSERT INTO Types
(Type, Kind )
VALUES ('TRAIT_CIVILIZATION_HOLOEN_TIMETRAVELLER', 'KIND_TRAIT' ),
('UNIT_HOLOEN_TIMETRAVELLER', 'KIND_UNIT' ),
('ABILITY_HOLOEN_TIMETRAVELLER', 'KIND_ABILITY' ),
('MODIFIER_HOLOEN_UNIT_ADJUST_HEAL_PER_TURN', 'KIND_MODIFIER'),
('MODIFIER_HOLOEN_UNIT_GRANT_HEAL_AFTER_ACTION','KIND_MODIFIER');
------------------------------------
-- DynamicModifiers
------------------------------------
INSERT INTO DynamicModifiers
(ModifierType, CollectionType, EffectType)
VALUES ('MODIFIER_HOLOEN_UNIT_ADJUST_HEAL_PER_TURN', 'COLLECTION_OWNER', 'EFFECT_ADJUST_UNIT_HEALING_MODIFIERS'),
('MODIFIER_HOLOEN_UNIT_GRANT_HEAL_AFTER_ACTION','COLLECTION_OWNER', 'EFFECT_GRANT_HEAL_AFTER_ACTION');
--------------------------------------------------------------------------------------------------------------------------
-- Modifiers
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO Modifiers
(ModifierId, ModifierType)
VALUES ('HOLOEN_TRAIT_ABILITY_HEAL_MAX', 'MODIFIER_HOLOEN_UNIT_ADJUST_HEAL_PER_TURN'),
('HOLOEN_TRAIT_ABILITY_ALWAYS_HEAL', 'MODIFIER_HOLOEN_UNIT_GRANT_HEAL_AFTER_ACTION');
--------------------------------------------------------------------------------------------------------------------------
-- ModifierArguments
--------------------------------------------------------------------------------------------------------------------------
INSERT INTO ModifierArguments
(ModifierId, Name, Value )
VALUES ('HOLOEN_TRAIT_ABILITY_HEAL_MAX', 'Amount', 100 ),
('HOLOEN_TRAIT_ABILITY_ALWAYS_HEAL', 'Type', 'ALL' );
-----------------------------------------------
-- Tags
-----------------------------------------------
INSERT INTO Tags
(Tag, Vocabulary )
VALUES ('CLASS_HOLOEN_TIMETRAVELLER','ABILITY_CLASS');
INSERT INTO TypeTags
(Type, Tag )
VALUES ('UNIT_HOLOEN_TIMETRAVELLER', 'CLASS_HOLOEN_TIMETRAVELLER' ),
('ABILITY_HOLOEN_TIMETRAVELLER','CLASS_HOLOEN_TIMETRAVELLER' );
INSERT INTO TypeTags (Type, Tag)
SELECT 'UNIT_HOLOEN_TIMETRAVELLER', Tag
FROM TypeTags
WHERE Type = 'UNIT_KNIGHT';
INSERT INTO Units (
UnitType,
Name,
Description,
TraitType,
BaseMoves,
Cost,
PurchaseYield,
AdvisorType,
Combat,
RangedCombat,
Range,
BaseSightRange,
ZoneOfControl,
Domain,
FormationClass,
PromotionClass,
Maintenance,
MandatoryObsoleteTech,
PrereqTech,
PrereqCivic
)
SELECT 'UNIT_HOLOEN_TIMETRAVELLER', -- UnitType
'LOC_UNIT_HOLOEN_TIMETRAVELLER_NAME', -- Name
'LOC_UNIT_HOLOEN_TIMETRAVELLER_DESCRIPTION', -- Description
'TRAIT_CIVILIZATION_HOLOEN_TIMETRAVELLER',
BaseMoves,
Cost,
PurchaseYield,
AdvisorType,
45,
RangedCombat,
Range,
BaseSightRange,
ZoneOfControl,
Domain,
FormationClass,
PromotionClass,
Maintenance,
MandatoryObsoleteTech,
PrereqTech,
PrereqCivic
FROM Units
WHERE UnitType = 'UNIT_KNIGHT';
---------------------------
-- UnitAbilities
---------------------------
INSERT INTO UnitAbilities
(UnitAbilityType, Name, Description)
VALUES ('ABILITY_HOLOEN_TIMETRAVELLER', 'LOC_UNIT_HOLOEN_TIMETRAVELLER_NAME', 'LOC_MODIFIER_HOLOEN_TIMETRAVELLER_HEALTH');
--------------------------
-- UnitAbilityModifiers
--------------------------
INSERT INTO UnitAbilityModifiers
(UnitAbilityType, ModifierId)
VALUES ('ABILITY_HOLOEN_TIMETRAVELLER', 'HOLOEN_TRAIT_ABILITY_HEAL_MAX'),
('ABILITY_HOLOEN_TIMETRAVELLER', 'HOLOEN_TRAIT_ABILITY_ALWAYS_HEAL');