Start of Caste System

This commit is contained in:
Vegapnk 2023-04-19 08:09:33 +02:00
parent 6777861903
commit 8d541c78c9
5 changed files with 207 additions and 2 deletions

View File

@ -1,6 +1,128 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<GeneDef>
<defName>rjw_genes_queen</defName>
<label>Hive Queen</label>
<labelShortAdj>queen</labelShortAdj>
<description>This gene represents the royal caste amongst its xenotype. Children of a queen are usually born as sterile workers, unless the father was a drone. Having multiple (adult) queens leads to intense rivalry and can throw the whole colony into chaos!</description>
<iconPath>Things/Mote/Heart</iconPath>
<displayOrderInCategory>1</displayOrderInCategory>
<displayCategory>rjw_genes_hive</displayCategory>
<statOffsets>
<PsychicSensitivity>0.5</PsychicSensitivity>
<MeditationFocusGain>0.25</MeditationFocusGain>
</statOffsets>
<li Class="ConditionalStatAffecter_MultipleQueens">
<statFactors>
<MoveSpeed>0.7</MoveSpeed>
</statFactors>
<statOffsets>
<WorkSpeedGlobal>-0.5</WorkSpeedGlobal>
</statOffsets>
</li>
<li Class="ConditionalStatAffecter_QueenCloseBy">
<statFactors>
<MoveSpeed>0.4</MoveSpeed>
<WorkSpeedGlobal>0.2</WorkSpeedGlobal>
</statFactors>
</li>
<exclusionTags>
<li>rjw_genes_hive_caste</li>
</exclusionTags>
<biostatCpx>7</biostatCpx>
<biostatMet>-3</biostatMet>
</GeneDef>
<GeneDef>
<defName>rjw_genes_drone</defName>
<label>Hive Drone</label>
<labelShortAdj>drone</labelShortAdj>
<description>This gene represents the drone caste amongst its xenotype. Drones are highly specialised experts that ensure the hives functioning. Other than that, drones are the only xenotypes capable of producing fertile offspring with a queen.</description>
<iconPath>Things/Mote/Heart</iconPath>
<displayOrderInCategory>2</displayOrderInCategory>
<displayCategory>rjw_genes_hive</displayCategory>
<exclusionTags>
<li>rjw_genes_hive_caste</li>
</exclusionTags>
<conditionalStatAffecters>
<li Class="ConditionalStatAffecter_QueenAbsent">
<statFactors>
<MoveSpeed>0.9</MoveSpeed>
</statFactors>
<statOffsets>
<WorkSpeedGlobal>-0.1</WorkSpeedGlobal>
</statOffsets>
</li>
</conditionalStatAffecters>
<biostatCpx>4</biostatCpx>
<biostatMet>-2</biostatMet>
</GeneDef>
<GeneDef>
<defName>rjw_genes_worker</defName>
<label>Hive Worker</label>
<labelShortAdj>worker</labelShortAdj>
<description>This gene represents the lowest caste of a hive, the workers. Usually sterile, they are despised by higher castes and only live to serve with labour.</description>
<iconPath>Things/Mote/Heart</iconPath>
<displayOrderInCategory>3</displayOrderInCategory>
<displayCategory>rjw_genes_hive</displayCategory>
<exclusionTags>
<li>rjw_genes_hive_caste</li>
</exclusionTags>
<conditionalStatAffecters>
<li Class="ConditionalStatAffecter_QueenAbsent">
<statFactors>
<MoveSpeed>0.7</MoveSpeed>
</statFactors>
<statOffsets>
<WorkSpeedGlobal>-0.5</WorkSpeedGlobal>
</statOffsets>
</li>
<li Class="ConditionalStatAffecter_MultipleQueens">
<statFactors>
<MoveSpeed>0.7</MoveSpeed>
</statFactors>
<statOffsets>
<WorkSpeedGlobal>-0.5</WorkSpeedGlobal>
</statOffsets>
</li>
<li Class="ConditionalStatAffecter_QueenCloseBy">
<statFactors>
<MoveSpeed>1.2</MoveSpeed>
<WorkSpeedGlobal>1.2</WorkSpeedGlobal>
</statFactors>
</li>
</conditionalStatAffecters>
<biostatCpx>1</biostatCpx>
<biostatMet>0</biostatMet>
</GeneDef>
<GeneDef>
<defName>rjw_genes_zealous_loyalty</defName>
<label>Zealous Loyalty</label>
<labelShortAdj>loyalty</labelShortAdj>
<description>Carriers of this gene are genetically wired to worship carriers of the 'Queen'-gene. They receive a massive relation-ship bonus towards the queen and a slight mood bonus. Having multiple queens in the colony causes severe distress.</description>
<iconPath>Things/Mote/Heart</iconPath>
<displayOrderInCategory>10</displayOrderInCategory>
<displayCategory>rjw_genes_hive</displayCategory>
<biostatCpx>1</biostatCpx>
<biostatMet>-1</biostatMet>
</GeneDef>
<GeneDef>
<defName>rjw_genes_cocoonweaver</defName>
<label>Cocoon Weaver</label>
@ -25,7 +147,7 @@
<labelShortAdj>cocooner</labelShortAdj>
<description>Carriers of this gene can generate tame spelopedes. Higher psychic-sensitivity will spawn more spelopedes.</description>
<iconPath>World/WorldObjects/Expanding/Insects</iconPath>
<displayOrderInCategory>11</displayOrderInCategory>
<displayOrderInCategory>12</displayOrderInCategory>
<displayCategory>rjw_genes_hive</displayCategory>
<abilities>
<li>rjw_genes_ability_spawn_spelopede</li>

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
namespace RJW_Genes
{
/// <summary>
/// Checks if there are multiple queens on the map.
/// </summary>
public class ConditionalStatAffecter_MultipleQueens : ConditionalStatAffecter
{
public override string Label => (string)"StatsReport_MultipleQueens".Translate();
public override bool Applies(StatRequest req)
{
// => ModsConfig.BiotechActive && req.HasThing && req.Thing.Spawned && req.Thing.Position.InSunlight(req.Thing.Map);
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
namespace RJW_Genes
{
/// <summary>
/// Checks if there is no queen on the map.
/// </summary>
public class ConditionalStatAffecter_QueenAbsent : ConditionalStatAffecter
{
public override string Label => (string)"StatsReport_QueenAbsent".Translate();
public override bool Applies(StatRequest req)
{
//ModsConfig.BiotechActive && req.HasThing && req.Thing.Spawned && req.Thing.Position.InSunlight(req.Thing.Map);
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
namespace RJW_Genes
{
/// <summary>
/// Checks if there is (exactly) one queen nearby.
/// If the pawn is a queen itself, it's checked if there are OTHER queens nearby.
/// While this is used for mostly positive things for workers and drones, for queens it checks if there is a rival nearby.
/// </summary>
public class ConditionalStatAffecter_QueenCloseBy : ConditionalStatAffecter
{
public override string Label => (string)"StatsReport_QueenCloseBy".Translate();
public override bool Applies(StatRequest req)
{
// => ModsConfig.BiotechActive && req.HasThing && req.Thing.Spawned && req.Thing.Position.InSunlight(req.Thing.Map);
throw new NotImplementedException();
}
}
}

View File

@ -196,5 +196,8 @@
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Genes\Hive\Genes\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>