I'm borrowing code from a mod I love called Better Recon. I'm trying to add it into a unique unit from the custom Taino Civ I like but I'm having issues making it work. I'm not getting a failed mod, just no implementation. Need some help getting this to work please.
Quick review:
The Taino unique unit Macana replaces both Warrior and Scout. Is a base warrior (CS etc) but uses Recon promotion class, then later upgrades into Swordsman while keeping any Recon promotions it acquired.
This unit falls behind significantly however while using Better Recon, as every other civ has scouts flying around the map twice my speed or more. My attempt is to bring movement to an equal position.
I considered the CLASS_RECON that I've bolded at the bottom of of code was an issue, as Macana is technically a warrior. I tried changing this to CLASS_MELEE but that didn't work either. I will post the unedited Macana UU code in a seperate reply, maybe that's where the issue lies?
Here's the code from Better Recon, I replaced BETTER_RECON in all situations with MACANA.
-- Ignore Terrain Cost & Sight Range from Observation
INSERT INTO Modifiers (ModifierId, ModifierType, Permanent) VALUES
('MACANA_IGNORE_TERRAIN', 'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_TERRAIN_COST', 1),
('MACANA_IGNORE_RIVERS', 'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_RIVERS', 1),
('MACANA_IGNORE_EMBARK', 'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_SHORES', 1);
INSERT INTO Modifiers (ModifierId, ModifierType, Permanent, SubjectRequirementSetId) VALUES
('MACANA_RECEIVE_SIGHT_RANGE_BONUS', 'MODIFIER_PLAYER_UNIT_ADJUST_SIGHT', 0, 'RANGE_BONUS_REQUIREMENTS');
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES
('MACANA_IGNORE_TERRAIN', 'Ignore', 1),
('MACANA_IGNORE_TERRAIN', 'Type', 'ALL'),
('MACANA_IGNORE_RIVERS', 'Ignore', 1),
('MACANA_IGNORE_EMBARK', 'Ignore', 1),
('MACANA_RECEIVE_SIGHT_RANGE_BONUS', 'Amount', 1);
INSERT INTO UnitAbilities(UnitAbilityType, Name, Description, Inactive) VALUES
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'LOC_ABILITY_MACANA_IGNORE_TC_NAME', 'LOC_ABILITY_MACANA_IGNORE_TC_DESC', 0),
('ABILITY_MACANA_GRANT_SIGHT_BONUS', 'LOC_ABILITY_MACANA_GRANT_SIGHT_BONUS_NAME', 'LOC_ABILITY_MACANA_GRANT_SIGHT_BONUS_DESC', 0);
INSERT INTO UnitAbilityModifiers(UnitAbilityType, ModifierId) VALUES
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'MACANA_IGNORE_TERRAIN'),
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'MACANA_IGNORE_RIVERS'),
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'MACANA_IGNORE_EMBARK'),
('ABILITY_MACANA_GRANT_SIGHT_BONUS', 'MACANA_RECEIVE_SIGHT_RANGE_BONUS');
INSERT INTO Types (Type, Kind) VALUES
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'KIND_ABILITY'),
('ABILITY_MACANA_GRANT_SIGHT_BONUS', 'KIND_ABILITY');
INSERT INTO TypeTags(Type, Tag) VALUES
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'CLASS_RECON'),
('ABILITY_MACANA_GRANT_SIGHT_BONUS', 'CLASS_RECON');
);
Quick review:
The Taino unique unit Macana replaces both Warrior and Scout. Is a base warrior (CS etc) but uses Recon promotion class, then later upgrades into Swordsman while keeping any Recon promotions it acquired.
This unit falls behind significantly however while using Better Recon, as every other civ has scouts flying around the map twice my speed or more. My attempt is to bring movement to an equal position.
I considered the CLASS_RECON that I've bolded at the bottom of of code was an issue, as Macana is technically a warrior. I tried changing this to CLASS_MELEE but that didn't work either. I will post the unedited Macana UU code in a seperate reply, maybe that's where the issue lies?
Here's the code from Better Recon, I replaced BETTER_RECON in all situations with MACANA.
-- Ignore Terrain Cost & Sight Range from Observation
INSERT INTO Modifiers (ModifierId, ModifierType, Permanent) VALUES
('MACANA_IGNORE_TERRAIN', 'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_TERRAIN_COST', 1),
('MACANA_IGNORE_RIVERS', 'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_RIVERS', 1),
('MACANA_IGNORE_EMBARK', 'MODIFIER_PLAYER_UNIT_ADJUST_IGNORE_SHORES', 1);
INSERT INTO Modifiers (ModifierId, ModifierType, Permanent, SubjectRequirementSetId) VALUES
('MACANA_RECEIVE_SIGHT_RANGE_BONUS', 'MODIFIER_PLAYER_UNIT_ADJUST_SIGHT', 0, 'RANGE_BONUS_REQUIREMENTS');
INSERT INTO ModifierArguments (ModifierId, Name, Value) VALUES
('MACANA_IGNORE_TERRAIN', 'Ignore', 1),
('MACANA_IGNORE_TERRAIN', 'Type', 'ALL'),
('MACANA_IGNORE_RIVERS', 'Ignore', 1),
('MACANA_IGNORE_EMBARK', 'Ignore', 1),
('MACANA_RECEIVE_SIGHT_RANGE_BONUS', 'Amount', 1);
INSERT INTO UnitAbilities(UnitAbilityType, Name, Description, Inactive) VALUES
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'LOC_ABILITY_MACANA_IGNORE_TC_NAME', 'LOC_ABILITY_MACANA_IGNORE_TC_DESC', 0),
('ABILITY_MACANA_GRANT_SIGHT_BONUS', 'LOC_ABILITY_MACANA_GRANT_SIGHT_BONUS_NAME', 'LOC_ABILITY_MACANA_GRANT_SIGHT_BONUS_DESC', 0);
INSERT INTO UnitAbilityModifiers(UnitAbilityType, ModifierId) VALUES
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'MACANA_IGNORE_TERRAIN'),
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'MACANA_IGNORE_RIVERS'),
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'MACANA_IGNORE_EMBARK'),
('ABILITY_MACANA_GRANT_SIGHT_BONUS', 'MACANA_RECEIVE_SIGHT_RANGE_BONUS');
INSERT INTO Types (Type, Kind) VALUES
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'KIND_ABILITY'),
('ABILITY_MACANA_GRANT_SIGHT_BONUS', 'KIND_ABILITY');
INSERT INTO TypeTags(Type, Tag) VALUES
('ABILITY_MACANA_IGNORE_TERRAIN_COST', 'CLASS_RECON'),
('ABILITY_MACANA_GRANT_SIGHT_BONUS', 'CLASS_RECON');
);