Possible to block a unit for a specific Civ ?

Joined
Apr 26, 2014
Messages
677
Is it possible ? I want to achieve that Civ 1 can recruit a Chariot for example, but Civ 2 cannot recruit that chariot...would be very interesting for me.

Thanks in advance :)
 
Thanks for the response :)

yeah, that replacing thing is a good idea. Civ2 could have a completely different unit instead of the chariot...but this have to be a UU, which is not that optimal, but ok.
 
It is possible now in R&F using the Modifier that blocks building Settlers on that one dark age policy.

You have to add each unit one by one as a Modifier. The code below from my Combined Tweaks mod blocks the Aztecs from building any Light or Heavy Cavalry units prior to the Modern era by creating a bunch of Modifiers using temporary tables. You don't have to be this complex with it, I just wanted to make sure to block any modded in units in addition to base ones, so I had to create a table. Instead you could just skip that step and specify which units to block by name, if you wanted to.

Code:
CREATE TABLE tblQuoAztecsHorseUnits AS
select unittype, technologies.eratype from units
inner join technologies on technologies.TechnologyType = units.PrereqTech
where promotionclass in  ("PROMOTION_CLASS_HEAVY_CAVALRY","PROMOTION_CLASS_LIGHT_CAVALRY") AND EraType in ("ERA_ANCIENT", "ERA_CLASSICAL", "ERA_MEDIEVAL", "ERA_RENAISSANCE", "ERA_INDUSTRIAL") AND TraitType IS NULL

union

select unittype, civics.EraType from units
inner join civics on civics.CivicType = units.PrereqCivic
where promotionclass in  ("PROMOTION_CLASS_HEAVY_CAVALRY","PROMOTION_CLASS_LIGHT_CAVALRY") AND EraType in ("ERA_ANCIENT", "ERA_CLASSICAL", "ERA_MEDIEVAL", "ERA_RENAISSANCE", "ERA_INDUSTRIAL") AND TraitType IS NULL;



INSERT INTO Modifiers
    (ModifierId, ModifierType, RunOnce, Permanent, OwnerRequirementSetId, SubjectRequirementSetId)
SELECT 'QUO_AZTECS_CANNOT_BUILD_' || tblQuoAztecsHorseUnits.UnitType, 'MODIFIER_PLAYER_UNIT_BUILD_DISABLED', 0, 0, NULL, NULL
    FROM tblQuoAztecsHorseUnits;


INSERT INTO ModifierArguments
    (ModifierId,             Name,         Type,             Value,             Extra,     SecondExtra)
SELECT 'QUO_AZTECS_CANNOT_BUILD_' || tblQuoAztecsHorseUnits.UnitType,     'UnitType',     'ARGTYPE_IDENTITY',     tblQuoAztecsHorseUnits.UnitType,            NULL,     NULL
    FROM tblQuoAztecsHorseUnits;

  
INSERT INTO TraitModifiers
    (TraitType,             ModifierID)
SELECT 'TRAIT_CIVILIZATION_LEGEND_FIVE_SUNS',    'QUO_AZTECS_CANNOT_BUILD_' || tblQuoAztecsHorseUnits.UnitType
    FROM tblQuoAztecsHorseUnits
        WHERE EXISTS (SELECT Civilizations.CivilizationType FROM Civilizations WHERE Civilizations.CivilizationType = 'CIVILIZATION_AZTEC' ) ;
 
@isau thanks, i think this is what i am looking for, will try it :)
 
Back
Top Bottom