I try to create a slave unit with a similar ability to an engineer but with many restrictions.
This unit could give only +1
or +2
in a city instantly (like engineer's ability).First, witch lines give this instanly capacity:<WorkRate></WorkRate>,<BaseHurry></BaseHurry>,<HurryMultiplier></HurryMultiplier>?
I was trying two different method without success. First created it as a new unit with a UnitClasses.xml and Units.xml, and make pop one as free unit to see what it might look like, but nothing pop.
Next , i create it with specialist references and I got a setller O_o
Specialist.xml:
<Specialists>
<Row>
<Type>SPECIALIST_SLAVE</Type>
<Description>TXT_KEY_SPECIALIST_SLAVE</Description>
<Strategy>TXT_KEY_SPECIALIST_SLAVE_STRATEGY</Strategy>
<GreatPeopleTitle>TXT_KEY_SPECIALIST_SLAVE_TITLE</GreatPeopleTitle>
<Visible>true</Visible>
<Cost>0</Cost>
<GreatPeopleUnitClass>UNITCLASS_SLAVE</GreatPeopleUnitClass>
<GreatPeopleRateChange>-1</GreatPeopleRateChange>
<IconAtlas>UNIT_ATLAS_1</IconAtlas>
<PortraitIndex>1</PortraitIndex>
</Row>
</Specialists>
<SpecialistYields>
<Row>
<SpecialistType>SPECIALIST_SLAVE</SpecialistType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
</SpecialistYields>
<Language_en_US>
<Row Tag="TXT_KEY_SPECIALIST_SLAVE">
<Text>Slave</Text>
</Row>
</Language_en_US>
</GameData>
The ultimate goal of this unit is to be captured after killing an enemy unit (with a rate %). Once returned to the city it can be used to instantly add +1
at the current production.That's a concept that I had seen in a BTS mod.
Maybe lua's will be helpful but it's only been two weeks that I started reading Kael's guide... and no experience with lua.
This unit could give only +1


I was trying two different method without success. First created it as a new unit with a UnitClasses.xml and Units.xml, and make pop one as free unit to see what it might look like, but nothing pop.
Spoiler :
UnitClasses.xml:
<GameData>
<UnitClasses>
<row>
<Type>UNITCLASS_SLAVE</Type>
<Description>TXT_KEY_UNIT_SLAVE</Description>
<DefaultUnit>UNIT_SLAVE</DefaultUnit>
</row>
</UnitClasses>
</GameData>
Units.xml:
<Units>
<Row>
<Class>UNITCLASS_SLAVE</Class>
<Type>UNIT_SLAVE</Type>
<Cost>-1</Cost>
<Moves>2</Moves
<CivilianAttackPriority>CIVILIAN_ATTACK_PRIORITY_HIGH</CivilianAttackPriority>
<Special>SPECIALUNIT_PEOPLE</Special>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ENGINEER</DefaultUnitAI>
<Description>TXT_KEY_UNIT_SLAVE</Description>
<Civilopedia>TXT_KEY_CIV5_SLAVE_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_SLAVE_STRATEGY</Strategy>
<AdvancedStartCost>-1</AdvancedStartCost>
<WorkRate>1</WorkRate>
<CombatLimit>0</CombatLimit>
<BaseHurry>20</BaseHurry>
<HurryMultiplier>2</HurryMultiplier>
<UnitArtInfo>ART_DEF_UNIT__WORKER</UnitArtInfo>
<UnitArtInfoEraVariation>true</UnitArtInfoEraVariation>
<UnitFlagIconOffset>1</UnitFlagIconOffset>
<IconAtlas>UNIT_ATLAS_1</IconAtlas>
<PortraitIndex>1</PortraitIndex>
</Row>
</Units>
<Unit_AITypes>
<Row>
<UnitType>UNIT_SLAVE</UnitType>
<UnitAIType>UNITAI_ENGINEER</UnitAIType>
</Row>
</Unit_AITypes>
<Unit_Flavors>
<Row>
<UnitType>UNIT_SLAVE</UnitType>
<FlavorType>FLAVOR_PRODUCTION</FlavorType>
<Flavor>1</Flavor>
</Row>
</Unit_Flavors>
<GameData>
<UnitClasses>
<row>
<Type>UNITCLASS_SLAVE</Type>
<Description>TXT_KEY_UNIT_SLAVE</Description>
<DefaultUnit>UNIT_SLAVE</DefaultUnit>
</row>
</UnitClasses>
</GameData>
Units.xml:
<Units>
<Row>
<Class>UNITCLASS_SLAVE</Class>
<Type>UNIT_SLAVE</Type>
<Cost>-1</Cost>
<Moves>2</Moves
<CivilianAttackPriority>CIVILIAN_ATTACK_PRIORITY_HIGH</CivilianAttackPriority>
<Special>SPECIALUNIT_PEOPLE</Special>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ENGINEER</DefaultUnitAI>
<Description>TXT_KEY_UNIT_SLAVE</Description>
<Civilopedia>TXT_KEY_CIV5_SLAVE_TEXT</Civilopedia>
<Strategy>TXT_KEY_UNIT_SLAVE_STRATEGY</Strategy>
<AdvancedStartCost>-1</AdvancedStartCost>
<WorkRate>1</WorkRate>
<CombatLimit>0</CombatLimit>
<BaseHurry>20</BaseHurry>
<HurryMultiplier>2</HurryMultiplier>
<UnitArtInfo>ART_DEF_UNIT__WORKER</UnitArtInfo>
<UnitArtInfoEraVariation>true</UnitArtInfoEraVariation>
<UnitFlagIconOffset>1</UnitFlagIconOffset>
<IconAtlas>UNIT_ATLAS_1</IconAtlas>
<PortraitIndex>1</PortraitIndex>
</Row>
</Units>
<Unit_AITypes>
<Row>
<UnitType>UNIT_SLAVE</UnitType>
<UnitAIType>UNITAI_ENGINEER</UnitAIType>
</Row>
</Unit_AITypes>
<Unit_Flavors>
<Row>
<UnitType>UNIT_SLAVE</UnitType>
<FlavorType>FLAVOR_PRODUCTION</FlavorType>
<Flavor>1</Flavor>
</Row>
</Unit_Flavors>
Next , i create it with specialist references and I got a setller O_o
Spoiler :
Specialist.xml:
<Specialists>
<Row>
<Type>SPECIALIST_SLAVE</Type>
<Description>TXT_KEY_SPECIALIST_SLAVE</Description>
<Strategy>TXT_KEY_SPECIALIST_SLAVE_STRATEGY</Strategy>
<GreatPeopleTitle>TXT_KEY_SPECIALIST_SLAVE_TITLE</GreatPeopleTitle>
<Visible>true</Visible>
<Cost>0</Cost>
<GreatPeopleUnitClass>UNITCLASS_SLAVE</GreatPeopleUnitClass>
<GreatPeopleRateChange>-1</GreatPeopleRateChange>
<IconAtlas>UNIT_ATLAS_1</IconAtlas>
<PortraitIndex>1</PortraitIndex>
</Row>
</Specialists>
<SpecialistYields>
<Row>
<SpecialistType>SPECIALIST_SLAVE</SpecialistType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
</SpecialistYields>
<Language_en_US>
<Row Tag="TXT_KEY_SPECIALIST_SLAVE">
<Text>Slave</Text>
</Row>
</Language_en_US>
</GameData>
The ultimate goal of this unit is to be captured after killing an enemy unit (with a rate %). Once returned to the city it can be used to instantly add +1

Maybe lua's will be helpful but it's only been two weeks that I started reading Kael's guide... and no experience with lua.