Turning Mech faction to RimWar faction

Started by Stagkiller121, September 25, 2024, 12:11:12 PM

Previous topic - Next topic

Stagkiller121

I'm trying to turn a Mechanoid faction from the mod - Vanilla Factions Expanded: Mechanoids - into a regular faction that spawns on planet generation. I want to make a Humans VS. Mechs invasion using the RimWar mod involved with it.


Here's the modded code for the Factions_Misc.XML in the VFE Mechanoid mod:

---------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<FactionDef ParentName="FactionBase">
<defName>VFE_Mechanoid</defName>
<label>mechanoid swarm</label>
<description>A large, orbit-bound swarm of mechanoid terraforming ships and combat vessels. Controlled remotely by human commanders in one of the core worlds, in the center of this mechanoid swarm lies a lair, where countless machines are constructed and deconstructed continuously to serve the greater cause.\n\nThey are not concerned with human rights and don't perceive inhabitants of this rimworld as anything but apes that need to be terminated for the terraforming project to continue.\n\nThis mechanoid swarm cannot be allied with.</description>
<pawnSingular>mechanoid</pawnSingular>
<pawnsPlural>mechanoids</pawnsPlural>
<listOrderPriority>75</listOrderPriority>
<requiredCountAtGameStart>1</requiredCountAtGameStart>
<maxConfigurableAtWorldCreation>1</maxConfigurableAtWorldCreation>
<maxCountAtGameStart>1</maxCountAtGameStart>
<settlementGenerationWeight>5</settlementGenerationWeight>
<factionNameMaker>VFE_NamerFactionMechanoid</factionNameMaker>
<factionIconPath>World/WorldObjects/Expanding/Sites/MechanoidBase</factionIconPath>
<canMakeRandomly>false</canMakeRandomly>
<settlementGenerationWeight>100</settlementGenerationWeight>
<raidCommonalityFromPointsCurve>
<points>
<li>(300,  0)</li>
<li>(700,  1)</li>
<li>(1400, 2)</li>
<li>(2800, 2.5)</li>
<li>(4000, 2.8)</li>
</points>
</raidCommonalityFromPointsCurve>
<raidLootMaker>VFE_MechanoidRaidLootMaker</raidLootMaker>
<raidLootValueFromPointsCurve>
<points>
<li>(35,    8)</li>
<li>(100,  60)</li>
<li>(1000, 250)</li>
<li>(2000, 400)</li>
<li>(4000, 500)</li>
</points>
</raidLootValueFromPointsCurve>
<humanlikeFaction>false</humanlikeFaction>
<hidden>false</hidden>
<autoFlee>false</autoFlee>
<canUseAvoidGrid>false</canUseAvoidGrid>
<techLevel>Ultra</techLevel>
<earliestRaidDays>30</earliestRaidDays>
<permanentEnemy>true</permanentEnemy>
<hostileToFactionlessHumanlikes>true</hostileToFactionlessHumanlikes>
<maxPawnCostPerTotalPointsCurve>
<points>
<li>(400,200)</li>
<li>(900,300)</li>
<li>(100000,10000)</li>
</points>
</maxPawnCostPerTotalPointsCurve>
<pawnGroupMakers>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- All types-->
<kindDef>Combat</kindDef>
<commonality>100</commonality>
<maximumPresence>9600</maximumPresence>
<options>
<VFE_Mech_Centipede>10</VFE_Mech_Centipede>
<VFE_Mech_Lancer>10</VFE_Mech_Lancer>
<VFE_Mech_Scyther>10</VFE_Mech_Scyther>
<VFE_Mech_Pikeman>5</VFE_Mech_Pikeman>
<VFE_Mech_Inquisitor>10</VFE_Mech_Inquisitor>
<VFE_Mech_Knight>10</VFE_Mech_Knight>
<VFE_Mech_Termite>5</VFE_Mech_Termite>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- Heavy Weapons-->
<kindDef>Combat</kindDef>
<commonality>100</commonality>
<maximumPresence>9600</maximumPresence>
<options>
<VFE_Mech_Centipede>10</VFE_Mech_Centipede>
<VFE_Mech_Lancer>3</VFE_Mech_Lancer>
<VFE_Mech_Scyther>3</VFE_Mech_Scyther>
<VFE_Mech_Pikeman>10</VFE_Mech_Pikeman>
<VFE_Mech_Inquisitor>3</VFE_Mech_Inquisitor>
<VFE_Mech_Knight>3</VFE_Mech_Knight>
<VFE_Mech_Termite>3</VFE_Mech_Termite>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- Infantry-->
<kindDef>Combat</kindDef>
<commonality>100</commonality>
<maximumPresence>9600</maximumPresence>
<options>
<VFE_Mech_Lancer>10</VFE_Mech_Lancer>
<VFE_Mech_Scyther>10</VFE_Mech_Scyther>
<VFE_Mech_Inquisitor>5</VFE_Mech_Inquisitor>
<VFE_Mech_Knight>10</VFE_Mech_Knight>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- Anti-infantry-->
<kindDef>Combat</kindDef>
<commonality>100</commonality>
<maximumPresence>9600</maximumPresence>
<options>
<VFE_Mech_Lancer>5</VFE_Mech_Lancer>
<VFE_Mech_Scyther>10</VFE_Mech_Scyther>
<VFE_Mech_Inquisitor>10</VFE_Mech_Inquisitor>
<VFE_Mech_Knight>7</VFE_Mech_Knight>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- All types-->
<kindDef>Settlement</kindDef>
<commonality>100</commonality>
<options>
<VFE_Mech_Centipede>10</VFE_Mech_Centipede>
<VFE_Mech_Lancer>10</VFE_Mech_Lancer>
<VFE_Mech_Scyther>10</VFE_Mech_Scyther>
<VFE_Mech_Pikeman>5</VFE_Mech_Pikeman>
<VFE_Mech_Inquisitor>10</VFE_Mech_Inquisitor>
<VFE_Mech_Knight>10</VFE_Mech_Knight>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- Vanilla-Only-->
<kindDef>Settlement</kindDef>
<commonality>100</commonality>
<options>
<VFE_Mech_Centipede>10</VFE_Mech_Centipede>
<VFE_Mech_Lancer>10</VFE_Mech_Lancer>
<VFE_Mech_Scyther>10</VFE_Mech_Scyther>
<VFE_Mech_Pikeman>5</VFE_Mech_Pikeman>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- All types-->
<kindDef>Combat</kindDef>
<commonality>100</commonality>
<minimumPresence>9600</minimumPresence>
<options>
<VFE_Mech_AdvancedCentipede>10</VFE_Mech_AdvancedCentipede>
<VFE_Mech_AdvancedLancer>10</VFE_Mech_AdvancedLancer>
<VFE_Mech_AdvancedScyther>10</VFE_Mech_AdvancedScyther>
<VFE_Mech_AdvancedPikeman>10</VFE_Mech_AdvancedPikeman>
<VFE_Mech_AdvancedInquisitor>10</VFE_Mech_AdvancedInquisitor>
<VFE_Mech_AdvancedKnight>10</VFE_Mech_AdvancedKnight>
<VFE_Mech_AdvTermite>10</VFE_Mech_AdvTermite>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- Infantry-->
<kindDef>Combat</kindDef>
<commonality>100</commonality>
<minimumPresence>9600</minimumPresence>
<options>
<VFE_Mech_AdvancedLancer>10</VFE_Mech_AdvancedLancer>
<VFE_Mech_AdvancedScyther>10</VFE_Mech_AdvancedScyther>
<VFE_Mech_AdvancedInquisitor>5</VFE_Mech_AdvancedInquisitor>
<VFE_Mech_AdvancedKnight>10</VFE_Mech_AdvancedKnight>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- Heavy Weapons-->
<kindDef>Combat</kindDef>
<commonality>100</commonality>
<minimumPresence>9600</minimumPresence>
<options>
<VFE_Mech_AdvancedCentipede>10</VFE_Mech_AdvancedCentipede>
<VFE_Mech_AdvancedLancer>3</VFE_Mech_AdvancedLancer>
<VFE_Mech_AdvancedScyther>3</VFE_Mech_AdvancedScyther>
<VFE_Mech_AdvancedPikeman>10</VFE_Mech_AdvancedPikeman>
<VFE_Mech_AdvancedInquisitor>3</VFE_Mech_AdvancedInquisitor>
<VFE_Mech_AdvancedKnight>3</VFE_Mech_AdvancedKnight>
<VFE_Mech_AdvTermite>3</VFE_Mech_AdvTermite>
</options>
</li>
<li Class="VFEMech.PawnGroupMakerMech">
<!-- All kinds-->
<kindDef>Settlement</kindDef>
<commonality>100</commonality>
<minimumPresence>9600</minimumPresence>
<options>
<VFE_Mech_AdvancedCentipede>10</VFE_Mech_AdvancedCentipede>
<VFE_Mech_AdvancedLancer>10</VFE_Mech_AdvancedLancer>
<VFE_Mech_AdvancedScyther>10</VFE_Mech_AdvancedScyther>
<VFE_Mech_AdvancedPikeman>10</VFE_Mech_AdvancedPikeman>
<VFE_Mech_AdvancedInquisitor>10</VFE_Mech_AdvancedInquisitor>
<VFE_Mech_AdvancedKnight>10</VFE_Mech_AdvancedKnight>
<VFE_Mech_AdvTermite>10</VFE_Mech_AdvTermite>
</options>
</li>
</pawnGroupMakers>
<settlementTexturePath>World/WorldObjects/MechanoidShip</settlementTexturePath>
<allowedArrivalTemperatureRange>-100~200</allowedArrivalTemperatureRange>
</FactionDef>

<ThingSetMakerDef>
<defName>VFE_MechanoidRaidLootMaker</defName>
<root Class="ThingSetMaker_MarketValue">
<fixedParams>
<filter>
<thingDefs>
<li>Plasteel</li>
<li>ComponentIndustrial</li>
<li>ComponentSpacer</li>
<li>VFE_ComponentMechanoid</li>
</thingDefs>
</filter>
</fixedParams>
</root>
</ThingSetMakerDef>

</Defs>


It will spawn the settlements for the mechanoid swarm on the planet when it generates and it will spread it's factions to different areas like in RimWar, HOWEVER... When entering a settlement - It doesn't use the original mechanoid bases and doesn't spawn the mechs either. Instead it generates a regular human faction base with NO pawns and right after entering the base, it instantly says that the base was successfully destroyed since there's no pawns on the map to start with. How do I fix this?