21 Commits

Author SHA1 Message Date
ProjectKoi-Kalo\Kalo
c735d8f87c 暂存 2025-09-08 14:59:27 +08:00
ProjectKoi-Kalo\Kalo
493267be2c 暂存 2025-09-08 14:39:46 +08:00
ProjectKoi-Kalo\Kalo
8cf1ec75b2 暂存 2025-09-08 13:50:21 +08:00
Tourswen
341d6d1da7 辅虫修改 2025-09-08 12:25:50 +08:00
Tourswen
c0b65f457d 辅虫生育调整 2025-09-08 11:54:03 +08:00
Tourswen
15dca29e4b 搬运普及化,缩短搬运虫时间 2025-09-08 10:50:20 +08:00
Tourswen
150d36ff75 战士虫添加身体武器 2025-09-08 09:08:13 +08:00
Tourswen
7a2a250de3 Merge branch 'master' of https://git.ra3battle.cn/Kalospacer/ArachnaeSwarm 2025-09-07 23:32:17 +08:00
Tourswen
829ba7cae7 黑丝 2025-09-07 23:31:51 +08:00
ProjectKoi-Kalo\Kalo
1938d30343 暂存修红字 2025-09-07 22:05:39 +08:00
Tourswen
29141c7202 黑丝 2025-09-07 19:53:55 +08:00
Tourswen
e8830e6853 对科技等级的总体调整 2025-09-07 19:15:08 +08:00
ProjectKoi-Kalo\Kalo
9ed650c1a9 Merge branch '冲撞2' 2025-09-07 18:42:01 +08:00
ProjectKoi-Kalo\Kalo
c43bc0f0bb 暂存 2025-09-07 18:41:35 +08:00
ProjectKoi-Kalo\Kalo
b954781675 暂存 2025-09-07 18:26:43 +08:00
ProjectKoi-Kalo\Kalo
acfc078f91 暂存 2025-09-07 18:10:03 +08:00
ProjectKoi-Kalo\Kalo
b28594c604 暂存 2025-09-07 17:27:06 +08:00
ProjectKoi-Kalo\Kalo
7a6d5380e1 暂存 2025-09-07 17:11:53 +08:00
Tourswen
ceb68bc8fa 白丝,以及技能补齐 2025-09-07 17:09:18 +08:00
ProjectKoi-Kalo\Kalo
b6f9e6193a 暂存1 2025-09-07 16:49:34 +08:00
Tourswen
c05df1399a 头发 2025-09-07 15:25:41 +08:00
64 changed files with 1691 additions and 751 deletions

Binary file not shown.

View File

@@ -32,140 +32,6 @@
</comps>
</AbilityDef>
<AbilityDef Name="ARA_EggSpew_Base" Abstract="True">
<cooldownTicksRange>5000</cooldownTicksRange>
<aiCanUse>false</aiCanUse>
<displayOrder>300</displayOrder>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>1</range>
<warmupTime>7</warmupTime>
<soundCast>AcidSpray_Resolve</soundCast>
<violent>false</violent>
<targetable>false</targetable>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
<needDef>Food</needDef>
<needCost>4</needCost>
<failMessage>营养值不足,需要进食</failMessage>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityBodyPartCheck">
<requiredPart>ARA_Ovary</requiredPart>
<failMessage>卵巢受损或缺失,无法生育</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef Name="ARA_EggSpew_Base_Proj" ParentName="BaseGrenadeProjectile" Abstract="True">
<thingClass>Projectile_SpawnsThing</thingClass>
<graphicData>
<texPath>ArachnaeSwarm/Building/ARA_EggSac</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile>
<damageDef>Bullet</damageDef>
<speed>21</speed>
<damageAmountBase>0</damageAmountBase>
<tryAdjacentFreeSpaces>true</tryAdjacentFreeSpaces>
</projectile>
</ThingDef>
<AbilityDef ParentName="ARA_EggSpew_Base">
<defName>ARA_EggSpew</defName>
<label>生育虫卵</label>
<description>从卵巢中排出一颗休眠的虫卵,阿拉克涅女皇种可以通过与其交互将其激活,并选择孵化的督虫虫族类型——参阅虫卵的具体信息,了解各个督虫的特点。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_Proj_EggSac</projectileDef>
</li>
</comps>
</AbilityDef>
<ThingDef ParentName="ARA_EggSpew_Base_Proj">
<defName>ARA_Proj_EggSac</defName>
<label>阿拉克涅虫卵</label>
<projectile>
<spawnsThingDef>ARA_InteractiveEggSac</spawnsThingDef>
</projectile>
</ThingDef>
<AbilityDef ParentName="ARA_EggSpew_Base">
<defName>ARA_EggSpew_BaseFighter</defName>
<label>生育虫卵-武斗虫</label>
<description>从卵巢中排出一颗休眠的虫卵,阿拉克涅女皇种可以通过与其交互将其激活,并选择孵化的督虫虫族类型——参阅虫卵的具体信息,了解各个督虫的特点。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_Proj_EggSac_BaseFighter</projectileDef>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_1KYC</requiredResearch>
<failMessage>需要科技 基因节点KYC-1"武斗虫" 以解锁此孵化路径</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef ParentName="ARA_EggSpew_Base_Proj">
<defName>ARA_Proj_EggSac_BaseFighter</defName>
<label>阿拉克涅虫卵</label>
<projectile>
<spawnsThingDef>ARA_InteractiveEggSac_Basic_Fighter</spawnsThingDef>
</projectile>
</ThingDef>
<AbilityDef>
<defName>ARA_EggSpewBioforgeIncubator</defName>
<label>生育孵化茧 基础酸性武器</label>
<description>孵化茧</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<cooldownTicksRange>5000</cooldownTicksRange>
<aiCanUse>true</aiCanUse>
<displayOrder>300</displayOrder>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>1</range>
<warmupTime>12</warmupTime>
<soundCast>AcidSpray_Resolve</soundCast>
<violent>false</violent>
<targetable>false</targetable>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_Proj_BioforgeIncubator</projectileDef>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
<needDef>Food</needDef>
<needCost>1</needCost>
<failMessage>营养值不足,需要进食</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef ParentName="BaseGrenadeProjectile">
<defName>ARA_Proj_BioforgeIncubator</defName>
<label>阿拉克涅孵化茧</label>
<thingClass>Projectile_SpawnsThing</thingClass>
<graphicData>
<texPath>ArachnaeSwarm/Building/ARA_BioforgeIncubator</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile>
<damageDef>Bullet</damageDef>
<speed>21</speed>
<damageAmountBase>0</damageAmountBase>
<spawnsThingDef>ARA_BioforgeIncubator_AcidBase</spawnsThingDef>
<tryAdjacentFreeSpaces>true</tryAdjacentFreeSpaces>
</projectile>
</ThingDef>
<AbilityDef>
<defName>ARA_AcidSprayBurst_Queen</defName>
<label>女皇种酸液轰炸</label>
@@ -328,8 +194,8 @@
<AbilityDef>
<defName>ARA_BaseRace_Acid_Launcher</defName>
<label>种投射</label>
<description></description>
<label>种投射</label>
<description>将一只阿拉克涅酸噬种辅虫发射到指定地点,落地后这只寿命有限的辅虫将立刻对敌人展开攻击。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<cooldownTicksRange>5000</cooldownTicksRange>
<aiCanUse>true</aiCanUse>
@@ -362,7 +228,7 @@
</AbilityDef>
<ThingDef ParentName="BaseGrenadeProjectile">
<defName>ArachnaeBase_Race_Acid_Proj</defName>
<label>阿拉克涅酸</label>
<label>阿拉克涅酸</label>
<thingClass>Projectile_SpawnsPawnZeroAge</thingClass>
<uiIconPath>Wula/Things/WULA_Attack_Cat/WULA_Cat_Thin_south</uiIconPath>
<graphicData>

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<AbilityDef Name="ARA_EggSpew_Base" Abstract="True">
<cooldownTicksRange>5000</cooldownTicksRange>
<aiCanUse>false</aiCanUse>
<displayOrder>300</displayOrder>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>1</range>
<warmupTime>7</warmupTime>
<soundCast>AcidSpray_Resolve</soundCast>
<violent>false</violent>
<targetable>false</targetable>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
<needDef>Food</needDef>
<needCost>4</needCost>
<failMessage>营养值不足,需要进食</failMessage>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityBodyPartCheck">
<requiredPart>ARA_Ovary</requiredPart>
<failMessage>卵巢受损或缺失,无法生育</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef Name="ARA_EggSpew_Base_Proj" ParentName="BaseGrenadeProjectile" Abstract="True">
<thingClass>Projectile_SpawnsThing</thingClass>
<graphicData>
<texPath>ArachnaeSwarm/Building/ARA_EggSac</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile>
<damageDef>Bullet</damageDef>
<speed>21</speed>
<damageAmountBase>0</damageAmountBase>
<tryAdjacentFreeSpaces>true</tryAdjacentFreeSpaces>
</projectile>
</ThingDef>
<AbilityDef Name="ARA_CocoonSpew_Base" Abstract="True">
<cooldownTicksRange>5000</cooldownTicksRange>
<aiCanUse>true</aiCanUse>
<displayOrder>300</displayOrder>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>1</range>
<warmupTime>12</warmupTime>
<soundCast>AcidSpray_Resolve</soundCast>
<violent>false</violent>
<targetable>false</targetable>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
<needDef>Food</needDef>
<needCost>1</needCost>
<failMessage>营养值不足,需要进食</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef Name="ARA_CocoonSpew_Base_Proj" ParentName="BaseGrenadeProjectile" Abstract="True">
<label>阿拉克涅孵化茧</label>
<thingClass>Projectile_SpawnsThing</thingClass>
<graphicData>
<texPath>ArachnaeSwarm/Building/ARA_BioforgeIncubator</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile>
<damageDef>Bullet</damageDef>
<speed>21</speed>
<damageAmountBase>0</damageAmountBase>
<tryAdjacentFreeSpaces>true</tryAdjacentFreeSpaces>
</projectile>
</ThingDef>
<AbilityDef ParentName="ARA_EggSpew_Base">
<defName>ARA_EggSpew_BaseFighter</defName>
<label>生育虫卵-战士虫</label>
<description>从卵巢中排出一颗休眠的虫卵,阿拉克涅女皇种可以通过与其交互将其激活,并选择孵化的督虫虫族类型——参阅虫卵的具体信息,了解各个督虫的特点。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_Proj_EggSac_BaseFighter</projectileDef>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_1KYC</requiredResearch>
<failMessage>需要科技 基因节点KYC-1"战士虫" 以解锁此孵化路径</failMessage>
</li>
</comps>
</AbilityDef>
<AbilityDef ParentName="ARA_EggSpew_Base">
<defName>ARA_EggSpew</defName>
<label>生育虫卵</label>
<description>从卵巢中排出一颗休眠的虫卵,阿拉克涅女皇种可以通过与其交互将其激活,并选择孵化的督虫虫族类型——参阅虫卵的具体信息,了解各个督虫的特点。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_Proj_EggSac</projectileDef>
</li>
</comps>
</AbilityDef>
</Defs>

View File

@@ -6,17 +6,17 @@
<defName>ARA_Flyer_TrackingCharge</defName>
<thingClass>ArachnaeSwarm.PawnFlyer_TrackingCharge</thingClass>
<pawnFlyer>
<flightDurationMin>0.5</flightDurationMin>
<flightDurationMax>2.0</flightDurationMax>
<flightSpeed>0.5</flightSpeed>
<heightFactor>0</heightFactor>
</pawnFlyer>
</ThingDef>
<!-- 2. The final Ability Definition -->
<AbilityDef>
<defName>ARA_Ability_TrackingCharge</defName>
<label>Tracking Charge</label>
<description>Launch yourself towards a target, dealing damage to everything in your path. The damage increases the further you travel.</description>
<iconPath>UI/Abilities/Charge</iconPath> <!-- Placeholder Icon -->
<label>追踪冲撞</label>
<description>阿拉克涅盾头种对目标发起蓄势冲撞,对路径上的一切造成伤害。飞行的距离越远,伤害越高。</description>
<iconPath>UI/Commands/WarTrumpet</iconPath> <!-- Placeholder Icon -->
<cooldownTicksRange>600</cooldownTicksRange>
<verbProperties>
<verbClass>ArachnaeSwarm.Verb_CastAbilityTrackingCharge</verbClass>
@@ -28,7 +28,7 @@
<canTargetMechs>true</canTargetMechs>
<canTargetSelf>false</canTargetSelf>
</targetParams>
<range>30</range>
<range>60</range>
<warmupTime>1.0</warmupTime>
</verbProperties>
<comps>
@@ -36,9 +36,16 @@
<homingSpeed>1.5</homingSpeed>
<initialDamage>15</initialDamage>
<damagePerTile>2</damagePerTile>
<inertiaDistance>4</inertiaDistance>
<inertiaDistance>6</inertiaDistance>
<collisionDamageDef>Blunt</collisionDamageDef>
<flyerDef>ARA_Flyer_TrackingCharge</flyerDef>
<collisionRadius>1.5</collisionRadius> <!-- Larger collision radius -->
<impactSound>Pawn_Melee_BigBash_HitPawn</impactSound>
<damageHostileOnly>true</damageHostileOnly> <!-- Set to false to damage everyone in the path -->
</li>
<li Class="CompProperties_AbilityEffecterOnCaster">
<effecterDef>WarTrumpet</effecterDef>
<maintainTicks>20</maintainTicks> <!-- Long enough for the "2nd wave" to spawn -->
</li>
</comps>
</AbilityDef>

View File

@@ -63,9 +63,9 @@
<slot>Adulthood</slot>
<workDisables>
<li>Cleaning</li>
<li>Hauling</li>
<!-- <li>Hauling</li> -->
<li>Mining</li>
<li>PlantWork</li>
<!-- <li>PlantWork</li> -->
<li>Animals</li>
<li>Hunting</li>
<li>Crafting</li>
@@ -92,14 +92,14 @@
<slot>Adulthood</slot>
<workDisables>
<li>Cleaning</li>
<li>Hauling</li>
<!-- <li>Hauling</li> -->
<!-- <li>Mining</li> -->
<li>PlantWork</li>
<li>Animals</li>
<li>Hunting</li>
<li>Crafting</li>
<li>Cooking</li>
<li>Constructing</li>
<!-- <li>Constructing</li> -->
<li>Caring</li>
<li>Social</li>
<li>Artistic</li>
@@ -121,21 +121,21 @@
<slot>Adulthood</slot>
<workDisables>
<li>Cleaning</li>
<li>Hauling</li>
<!-- <li>Hauling</li> -->
<li>Mining</li>
<li>PlantWork</li>
<li>Animals</li>
<li>Hunting</li>
<!-- <li>Crafting</li> -->
<li>Cooking</li>
<!-- <li>Constructing</li> -->
<li>Constructing</li>
<li>Caring</li>
<li>Social</li>
<!-- <li>Artistic</li> -->
<li>Intellectual</li>
</workDisables>
<skillGains>
<Construction>5</Construction>
<Crafting>5</Crafting>
</skillGains>
<spawnCategories>
@@ -153,7 +153,7 @@
<!-- <li>Hauling</li> -->
<li>Mining</li>
<li>PlantWork</li>
<li>Animals</li>
<!-- <li>Animals</li> -->
<!-- <li>Hunting</li> -->
<li>Crafting</li>
<li>Cooking</li>

View File

@@ -679,6 +679,14 @@
<solid>false</solid>
<bleedRate>1.5</bleedRate>
</BodyPartDef>
<BodyPartDef>
<defName>ARA_Sickle</defName>
<label>巨镰</label>
<hitPoints>25</hitPoints>
<skinCovered>false</skinCovered>
<solid>true</solid>
<bleedRate>0</bleedRate>
</BodyPartDef>
<BodyPartGroupDef>
<defName>ARA_Genitalias</defName>
@@ -695,6 +703,12 @@
<label>毒针器官</label>
<listOrder>126</listOrder>
</BodyPartGroupDef>
<BodyPartGroupDef>
<defName>ARA_Sickles</defName>
<label>巨镰器官</label>
<listOrder>126</listOrder>
</BodyPartGroupDef>
<BodyDef>
<defName>ArachnaeMyrmecocystus_Body</defName>
@@ -2124,8 +2138,8 @@
<li>
<def>ARA_Tail</def>
<height>Bottom</height>
<depth>Inside</depth>
<coverage>0.25</coverage>
<depth>Outside</depth>
<groups>
<li>Torso</li>
</groups>
@@ -2159,6 +2173,24 @@
</li>
</parts>
</li>
<li>
<def>ARA_Sickle</def>
<customLabel>左镰刀</customLabel>
<coverage>0.1</coverage>
<depth>Outside</depth>
<groups>
<li>ARA_Sickles</li>
</groups>
</li>
<li>
<def>ARA_Sickle</def>
<customLabel>右镰刀</customLabel>
<coverage>0.1</coverage>
<depth>Outside</depth>
<groups>
<li>ARA_Sickles</li>
</groups>
</li>
</parts>
</corePart>
</BodyDef>

View File

@@ -14,7 +14,6 @@
<nodeClass>PawnRenderNode_AttachmentHead</nodeClass>
<workerClass>PawnRenderNodeWorker_FlipWhenCrawling</workerClass>
<texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Facehugger_Upperhead</texPath>
<colorType>Skin</colorType>
<parentTagDef>Head</parentTagDef>
<useSkinShader>false</useSkinShader>
<useRottenColor>false</useRottenColor>

View File

@@ -12,12 +12,6 @@
<maxGenerationAge>30</maxGenerationAge>
<minGenerationAge>10</minGenerationAge>
<canBeScattered>false</canBeScattered>
<abilities>
<li>ARA_EggSpew</li>
<li>ARA_EggSpew_BaseFighter</li>
<li>ARA_AcidSprayBurst_Queen</li>
<li>ARA_BindDrone</li>
</abilities>
<xenotypeSet>
<xenotypeChances>
@@ -147,6 +141,9 @@
<apparelTags>
</apparelTags>
<apparelMoney>0</apparelMoney>
<abilities>
<li>ARA_Ability_TrackingCharge</li>
</abilities>
</PawnKindDef>
<PawnKindDef ParentName="ArachnaeNodeABasePawnKind">
<defName>ArachnaeNode_Race_WeaponSmith</defName>
@@ -163,7 +160,10 @@
</li>
</backstoryFiltersOverride>
<abilities>
<li>ARA_EggSpewBioforgeIncubator</li>
<li>ARA_BioforgeIncubator_ClothBase</li>
<li>ARA_BioforgeIncubator_AcidBase</li>
<li>ARA_BioforgeIncubator_ToxicNeedleBase</li>
<li>ARA_BioforgeIncubator_BoneBase</li>
</abilities>
<apparelTags>
</apparelTags>
@@ -228,7 +228,7 @@
</li>
</moveSpeedFactorByTerrainTag>
</PawnKindDef>
<PawnKindDef ParentName="ARA_InsectKindBase">
<!--<PawnKindDef ParentName="ARA_InsectKindBase">
<defName>ArachnaeBase_Race_Slavey</defName>
<label>阿拉克涅苦役种</label>
<race>ArachnaeBase_Race_Slavey</race>
@@ -249,7 +249,7 @@
</dessicatedBodyGraphicData>
</li>
</lifeStages>
</PawnKindDef>
</PawnKindDef>-->
<PawnKindDef ParentName="ARA_InsectKindBase">
<defName>ArachnaeBase_Race_Scavenger</defName>
<label>阿拉克涅食腐种</label>
@@ -296,7 +296,7 @@
</PawnKindDef>
<PawnKindDef ParentName="ARA_InsectKindBase">
<defName>ArachnaeBase_Race_Acid</defName>
<label>阿拉克涅酸</label>
<label>阿拉克涅酸</label>
<race>ArachnaeBase_Race_Acid</race>
<lifeStages>
<li>

View File

@@ -0,0 +1,241 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<HediffDef>
<defName>ARA_Queen_0_Stage</defName>
<label>进化等级——无</label>
<description>这只阿拉克涅女皇种刚刚步入纷乱的边缘世界,其基因表达尚未明晰,她也需要更多的经验以思考要如何带领巢穴前进。</description>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>2.0</maxSeverity>
<!-- <stages>
<li>
<becomeVisible>ture</becomeVisible>
</li>
<li>
<minSeverity>1.01</minSeverity>
<becomeVisible>false</becomeVisible>
</li>
</stages> -->
<comps>
<li Class="HediffCompProperties_GiveAbility">
<abilityDefs>
<li>ARA_EggSpew</li>
<li>ARA_EggSpew_BaseFighter</li>
<li>ARA_BindDrone</li>
<li>ARA_Queen_Upgrade_1_Stage</li>
<li>ARA_AcidSprayBurst_Queen</li>
</abilityDefs>
</li>
<li Class="HediffCompProperties_RemoveIfOtherHediff">
<hediffs>
<li>ARA_Queen_1_Stage_Transition_Period</li>
</hediffs>
</li>
</comps>
</HediffDef>
<AbilityDef>
<defName>ARA_Queen_Upgrade_1_Stage</defName>
<label>女皇种进化——阶段1</label>
<description>使女皇种发生内驱性进化,解锁下一等级的虫群植入物和阿拉克涅卵</description>
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Queen_Upgrade_1_Stage</iconPath>
<cooldownTicksRange>1800</cooldownTicksRange>
<hostile>false</hostile>
<groupAbility>true</groupAbility>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>true</disableGizmoWhileUndrafted>
<aiCanUse>true</aiCanUse>
<ai_IsOffensive>true</ai_IsOffensive>
<targetRequired>false</targetRequired>
<jobDef>CastAbilityOnThing</jobDef>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>1</range>
<warmupTime>12</warmupTime>
<soundCast>AcidSpray_Resolve</soundCast>
<violent>false</violent>
<targetable>false</targetable>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="CompProperties_AbilityGiveHediff">
<compClass>CompAbilityEffect_GiveHediff</compClass>
<hediffDef>ARA_Queen_1_Stage_Transition_Period</hediffDef>
<onlyApplyToSelf>True</onlyApplyToSelf>
<replaceExisting>true</replaceExisting>
<severity>1</severity>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_2WMT</requiredResearch>
<failMessage>需要科技 基因节点WMT-2"内在突破" 以解锁进化</failMessage>
</li>
</comps>
</AbilityDef>
<HediffDef>
<defName>ARA_Queen_1_Stage_Transition_Period</defName>
<label>女皇种进化——阶段1</label>
<description>使女皇种发生内驱性进化,解锁下一等级的虫群植入物和阿拉克涅卵</description>
<!-- <hediffClass>HediffWithComps</hediffClass> -->
<hediffClass>Hediff_High</hediffClass>
<initialSeverity>1</initialSeverity>
<maxSeverity>1.01</maxSeverity>
<alwaysShowSeverity>true</alwaysShowSeverity>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd>
<comps>
<li Class="HediffCompProperties_ReplaceHediff">
<hediffs>
<li>
<hediff>ARA_Queen_1_Stage</hediff>
<severityRange>0.02~0.15</severityRange>
</li>
</hediffs>
<message>{PAWN_nameDef} 获得了一定的见解以发展巢穴,她可以用基因的织网编织更加复杂更加强大的虫群。</message>
</li>
</comps>
</HediffDef>
<HediffDef>
<defName>ARA_Queen_1_Stage</defName>
<label>进化等级——等级1</label>
<description>这只阿拉克涅女皇种获得了一定的见解以发展巢穴,她可以用基因的织网编织更加复杂更加强大的虫群。</description>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<comps>
<li Class="HediffCompProperties_GiveAbility">
<abilityDefs>
<li>ARA_EggSpew</li>
<li>ARA_EggSpew_BaseFighter</li>
<li>ARA_BindDrone</li>
<li>ARA_AcidSprayBurst_Queen</li>
<li>ARA_Queen_Upgrade_2_Stage</li>
</abilityDefs>
</li>
</comps>
</HediffDef>
<AbilityDef>
<defName>ARA_Queen_Upgrade_2_Stage</defName>
<label>女皇种进化——阶段2</label>
<description>使女皇种发生内驱性进化,解锁下一等级的虫群植入物和阿拉克涅卵</description>
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Queen_Upgrade_2_Stage</iconPath>
<cooldownTicksRange>1800</cooldownTicksRange>
<hostile>false</hostile>
<groupAbility>true</groupAbility>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>true</disableGizmoWhileUndrafted>
<aiCanUse>true</aiCanUse>
<ai_IsOffensive>true</ai_IsOffensive>
<targetRequired>false</targetRequired>
<jobDef>CastAbilityOnThing</jobDef>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>1</range>
<warmupTime>12</warmupTime>
<soundCast>AcidSpray_Resolve</soundCast>
<violent>false</violent>
<targetable>false</targetable>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="CompProperties_AbilityGiveHediff">
<compClass>CompAbilityEffect_GiveHediff</compClass>
<hediffDef>ARA_Queen_2_Stage_Transition_Period</hediffDef>
<onlyApplyToSelf>True</onlyApplyToSelf>
<replaceExisting>true</replaceExisting>
<severity>1</severity>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_2WMT</requiredResearch>
<failMessage>需要科技 基因节点WMT-2"内在突破" 以解锁进化</failMessage>
</li>
</comps>
</AbilityDef>
<HediffDef>
<defName>ARA_Queen_2_Stage_Transition_Period</defName>
<label>女皇种进化——阶段2</label>
<description>使女皇种发生内驱性进化,解锁下一等级的虫群植入物和阿拉克涅卵</description>
<!-- <hediffClass>HediffWithComps</hediffClass> -->
<hediffClass>Hediff_High</hediffClass>
<initialSeverity>1</initialSeverity>
<maxSeverity>1.01</maxSeverity>
<alwaysShowSeverity>true</alwaysShowSeverity>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd>
<comps>
<li Class="HediffCompProperties_ReplaceHediff">
<hediffs>
<li>
<hediff>ARA_Queen_2_Stage</hediff>
<severityRange>0.02~0.15</severityRange>
</li>
</hediffs>
<message>{PAWN_nameDef} 获得了一定的见解以发展巢穴,她可以用基因的织网编织更加复杂更加强大的虫群。</message>
</li>
</comps>
</HediffDef>
<HediffDef>
<defName>ARA_Queen_2_Stage</defName>
<label>进化等级——等级2</label>
<description>这只阿拉克涅女皇种获得了一定的见解以发展巢穴,她可以用基因的织网编织更加复杂更加强大的虫群。</description>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<comps>
<li Class="HediffCompProperties_GiveAbility">
<abilityDefs>
<li>ARA_EggSpew</li>
<li>ARA_EggSpew_BaseFighter</li>
<li>ARA_BindDrone</li>
<li>ARA_AcidSprayBurst_Queen</li>
<!-- <li>ARA_Queen_Upgrade_2_Stage</li> -->
</abilityDefs>
</li>
</comps>
</HediffDef>
<RecipeDef ParentName="SurgeryInstallBodyPartArtificialBase">
<defName>ARA_Install_</defName>
<label>安装暗物质能源炉</label>
<description>为合成人安装暗物质能源炉。</description>
<descriptionHyperlinks>
<ThingDef>WULA_Energy_Furnace_DM_Engine</ThingDef>
<HediffDef>WULA_Energy_Furnace_Hediff_DM_Engine</HediffDef>
</descriptionHyperlinks>
<jobString>安装暗物质能源炉中</jobString>
<anesthetize>false</anesthetize>
<ingredients Inherit="False">
<li>
<filter>
<thingDefs>
<li>WULA_Energy_Furnace_DM_Engine</li>
</thingDefs>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>WULA_Energy_Furnace_DM_Engine</li>
</thingDefs>
</fixedIngredientFilter>
<appliedOnFixedBodyParts>
<li>WULA_Energy_Furnace_Bodypart</li>
</appliedOnFixedBodyParts>
<addsHediff>WULA_Energy_Furnace_Hediff_DM_Engine</addsHediff>
<recipeUsers Inherit="False">
<li>ArachnaeNode_Race_WeaponSmith</li>
</recipeUsers>
</RecipeDef>
</Defs>

View File

@@ -15,6 +15,18 @@
<researchViewY>3.20</researchViewY>
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
</ResearchProjectDef>
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_2WMT</defName>
<label>基因节点WMT-2"内在突破"</label>
<description>允许女皇种进化到下一个阶段。</description>
<baseCost>150</baseCost>
<researchViewX>4.50</researchViewX>
<researchViewY>3.10</researchViewY>
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
<prerequisites>
<li>ARA_Base_Technology</li>
</prerequisites>
</ResearchProjectDef>
<!-- 酸类发展 -->
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_6VXI</defName>
@@ -43,8 +55,8 @@
<!-- 孵化发展 -->
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_1KYC</defName>
<label>基因节点KYC-1"武斗虫"</label>
<description>允许女皇种孵化新的虫族——战士种和跃袭种</description>
<label>基因节点KYC-1"战士虫"</label>
<description>允许女皇种孵化新的虫族——战士种。</description>
<baseCost>150</baseCost>
<researchViewX>1.00</researchViewX>
<researchViewY>2.20</researchViewY>
@@ -93,7 +105,7 @@
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_4DIL</defName>
<label>基因节点DIL-4"编织"</label>
<description>允许工艺种孵化覆壳茧,为虫族提供基础防具。</description>
<description>允许工艺种孵化织物茧,为虫族提供基础防具。</description>
<baseCost>150</baseCost>
<researchViewX>1.00</researchViewX>
<researchViewY>5.10</researchViewY>
@@ -128,18 +140,6 @@
</prerequisites>
</ResearchProjectDef>
<!-- 工艺种进化 -->
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_2WMT</defName>
<label>基因节点WMT-2"进化"</label>
<description>允许女皇种为工艺种执行进化手术,使其可以孵化更复杂的茧。</description>
<baseCost>150</baseCost>
<researchViewX>4.50</researchViewX>
<researchViewY>3.10</researchViewY>
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
<prerequisites>
<li>ARA_Base_Technology</li>
</prerequisites>
</ResearchProjectDef>
<!-- 建筑发展 -->
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_5SHL</defName>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<StatDef>
<defName>ARA_IncubationSpeedFactor</defName>
<label>孵化速度</label>
<description>应用于孵化池的孵化速度乘数。</description>
<category>Building</category>
<defaultBaseValue>1</defaultBaseValue>
<minValue>0.001</minValue>
<toStringStyle>PercentZero</toStringStyle>
<showIfUndefined>false</showIfUndefined>
</StatDef>
</Defs>

View File

@@ -10,6 +10,7 @@
<ComfyTemperatureMin>-3000</ComfyTemperatureMin>
<ComfyTemperatureMax>3000</ComfyTemperatureMax>
<Wildness>0</Wildness>
<Fertility MayRequire="Ludeon.RimWorld.Biotech">0</Fertility>
</statBases>
<uiIconScale>1.1</uiIconScale>
@@ -80,33 +81,6 @@
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ArachnaeBase_Race">
<defName>ArachnaeBase_Race_Slavey</defName>
<label>阿拉克涅苦役种</label>
<description>阿拉克涅辅虫之一,智力低下,能执行搬运工作,注定在度过短暂的时光后死亡。</description>
<comps>
<li Class="ArachnaeSwarm.CompProperties_AdvancedTraining">
<!-- <skillLevels>
<li>
<skill>Plants</skill>
<level>8</level>
</li>
<li>
<skill>Mining</skill>
<level>8</level>
</li>
</skillLevels> -->
<trainables>
<li>
<trainable>Haul</trainable>
<trainInstantly>true</trainInstantly>
<setWanted>true</setWanted>
</li>
</trainables>
<disableAllSkillDecay>true</disableAllSkillDecay> <!-- 阻止这个动物的所有技能衰减 -->
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ArachnaeBase_Race">
<defName>ArachnaeBase_Race_Scavenger</defName>
<label>阿拉克涅食腐种</label>
@@ -160,7 +134,7 @@
<ThingDef ParentName="ArachnaeBase_Race">
<defName>ArachnaeBase_Race_Maid</defName>
<label>阿拉克涅家政种</label>
<description>阿拉克涅辅虫之一,智力低下,可以执行清洁工作,注定在度过短暂的时光后死亡。</description>
<description>阿拉克涅辅虫之一,智力低下,可以执行清洁和搬运工作,注定在度过短暂的时光后死亡。</description>
<race>
<specialTrainables>
<li>ARA_Cleaning</li>
@@ -174,6 +148,11 @@
<trainInstantly>true</trainInstantly>
<setWanted>true</setWanted>
</li>
<li>
<trainable>Haul</trainable>
<trainInstantly>true</trainInstantly>
<setWanted>true</setWanted>
</li>
</trainables>
<disableAllSkillDecay>true</disableAllSkillDecay> <!-- 阻止这个动物的所有技能衰减 -->
</li>
@@ -181,7 +160,7 @@
</ThingDef>
<ThingDef ParentName="BaseDrone" MayRequire="Ludeon.RimWorld.Odyssey">
<defName>ArachnaeBase_Race_Acid</defName>
<label>阿拉克涅酸</label>
<label>阿拉克涅酸</label>
<description>阿拉克涅辅虫之一,智力低下,一般被作为活体炮弹打出,击中敌人后若是还没散架,就会继续依靠带酸液的颚撕咬敌军。</description>
<race>
<thinkTreeConstant>WarUrchinConstant</thinkTreeConstant>

View File

@@ -77,7 +77,7 @@
<li>
<name>ArachnaeNode Hair</name>
<userCustomizable>true</userCustomizable>
<path>ArachnaeSwarm/Hair/ARA_Scattered_Hair_Long</path>
<path>ArachnaeSwarm/Hair/ARA_ArachnaeNode_Hair</path>
<inFrontOfBody>true</inFrontOfBody>
<layerInvert>false</layerInvert>
<colorChannel>hair</colorChannel>
@@ -85,9 +85,6 @@
<drawSize>1</drawSize>
<alignWithHead>true</alignWithHead>
<scaleWithPawnDrawsize>true</scaleWithPawnDrawsize>
<useSkipFlags>
<li></li>
</useSkipFlags>
<conditions>
<BodyPart>
<bodyPart>Head</bodyPart>
@@ -126,9 +123,6 @@
<alignWithHead>true</alignWithHead>
<scaleWithPawnDrawsize>true</scaleWithPawnDrawsize>
<linkVariantIndexWithPrevious>true</linkVariantIndexWithPrevious>
<useSkipFlags>
<li></li>
</useSkipFlags>
<conditions>
<BodyPart>
<bodyPart>Head</bodyPart>
@@ -678,7 +672,7 @@
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
<defName>ArachnaeNode_Race_Myrmecocystus</defName>
<label>阿拉克涅蜜罐种</label>
<description>阿拉克涅督虫之一,拥有非常广泛的食谱,可以吞下许多未经处理的生物并将其分解为阿拉克涅虫蜜,以滋养虫群。这种督虫非常脆弱,并且没有可以接入武装器官的副肢,除了生产虫蜜外能执行烹饪工作。\n\n作为督虫她可以繁育并监管若干阿拉克涅苦役种辅虫以协助巢穴进行搬运工作。</description>
<description>阿拉克涅督虫之一,拥有非常广泛的食谱,可以吞下许多未经处理的生物并将其分解为阿拉克涅虫蜜,以滋养虫群。这种督虫除了生产虫蜜外能执行烹饪工作。\n\n作为督虫她可以繁育并监管若干阿拉克涅苦役种辅虫以协助巢穴进行搬运工作。</description>
<alienRace>
<generalSettings>
<!-- 各种零件定义 -->
@@ -722,8 +716,8 @@
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>ArachnaeBase_Race_Slavey</pawnKind>
<count>4</count>
<pawnKind>ArachnaeBase_Race_Scavenger</pawnKind>
<count>2</count>
<cooldownTicks>1000</cooldownTicks>
</li>
</productionQueue>
@@ -990,6 +984,99 @@
</lifeStageAges>
</race>
</AlienRace.ThingDef_AlienRace>
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
<defName>ArachnaeNode_Race_Fighter</defName>
<label>阿拉克涅战士种</label>
<description>阿拉克涅督虫之一,是巢穴中真正的战士,除了战斗外也可以进行狩猎和搬运。其拥有强大的可塑性基因,随着科技的解锁其将获得更多的能力。\n\n作为督虫她可以向敌人投射寿命有限但是非常恼人的阿拉克涅酸噬种辅虫以阻止敌人的远程火力开火。</description>
<alienRace>
<generalSettings>
<!-- 各种零件定义 -->
<alienPartGenerator>
<!-- 额外身体部件 -->
<bodyAddons>
<li>
<path>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Claw</path>
<inFrontOfBody>true</inFrontOfBody>
</li>
<li>
<path>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Tail</path>
<inFrontOfBody>false</inFrontOfBody>
<offsets>
<north>
<layerOffset>-0.275</layerOffset>
</north>
</offsets>
</li>
</bodyAddons>
</alienPartGenerator>
</generalSettings>
<raceRestriction>
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
</raceRestriction>
</alienRace>
<comps>
</comps>
<!-- 基础属性设置 -->
<statBases>
<!-- 移动速度 -->
<MoveSpeed>4.5</MoveSpeed>
<!-- <RestRateMultiplier>1</RestRateMultiplier> -->
<!-- <HungerRateMultiplier>1</HungerRateMultiplier> -->
<!-- <EatingSpeed>5</EatingSpeed> -->
<MaxNutrition>2</MaxNutrition>
<CarryingCapacity>100</CarryingCapacity>
<MeatAmount>60</MeatAmount>
<LeatherAmount>30</LeatherAmount>
<MeleeDodgeChance>1.25</MeleeDodgeChance>
<MeleeHitChance>1.25</MeleeHitChance>
<!-- <NegotiationAbility>1</NegotiationAbility> -->
<!-- <SellPriceFactor>1</SellPriceFactor> -->
<!-- <SocialImpact>1</SocialImpact> -->
<!-- <TradePriceImprovement>0.5</TradePriceImprovement> -->
<!-- 自带的甲壳可以防御外部攻击 -->
<ArmorRating_Blunt>0.4</ArmorRating_Blunt>
<ArmorRating_Sharp>0.4</ArmorRating_Sharp>
<ArmorRating_Heat>0.3</ArmorRating_Heat>
</statBases>
<tools>
<li>
<label>巨镰</label>
<capacities>
<li>Cut</li>
</capacities>
<power>20</power>
<cooldownTime>2.5</cooldownTime>
<linkedBodyPartsGroup>ARA_Sickles</linkedBodyPartsGroup>
<!-- <ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable> -->
<chanceFactor>0.5</chanceFactor>
</li>
</tools>
<race>
<!-- 身体类型 -->
<body>ArachnaeFighter_Body</body>
<baseBodySize>0.85</baseBodySize>
<baseHealthScale>2</baseHealthScale>
<lifeExpectancy>5</lifeExpectancy>
<lifeStageAges Inherit="False">
<li>
<def>ArachnaeNode_Myrmecocystus_Adult</def>
<minAge>0</minAge>
</li>
</lifeStageAges>
</race>
</AlienRace.ThingDef_AlienRace>
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
<defName>ArachnaeNode_Race_Facehugger</defName>
<label>阿拉克涅原虫种</label>
@@ -1055,79 +1142,4 @@
</li>
</comps>
</AlienRace.ThingDef_AlienRace>
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
<defName>ArachnaeNode_Race_Fighter</defName>
<label>阿拉克涅战士种</label>
<description>阿拉克涅督虫之一,是巢穴中真正的战士,除了战斗外也可以进行狩猎和搬运。其拥有强大的可塑性基因,随着科技的解锁其将获得更多的能力。\n\n作为督虫她可以向敌人投射寿命有限但是非常恼人的阿拉克涅酸噬种辅虫以阻止敌人的远程火力开火。</description>
<alienRace>
<generalSettings>
<!-- 各种零件定义 -->
<alienPartGenerator>
<!-- 额外身体部件 -->
<bodyAddons>
<li>
<path>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Claw</path>
<inFrontOfBody>true</inFrontOfBody>
</li>
<li>
<path>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Tail</path>
<inFrontOfBody>false</inFrontOfBody>
<offsets>
<north>
<layerOffset>-0.275</layerOffset>
</north>
</offsets>
</li>
</bodyAddons>
</alienPartGenerator>
</generalSettings>
<raceRestriction>
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
</raceRestriction>
</alienRace>
<comps>
</comps>
<!-- 基础属性设置 -->
<statBases>
<!-- 移动速度 -->
<MoveSpeed>4.5</MoveSpeed>
<!-- <RestRateMultiplier>1</RestRateMultiplier> -->
<!-- <HungerRateMultiplier>1</HungerRateMultiplier> -->
<!-- <EatingSpeed>5</EatingSpeed> -->
<MaxNutrition>2</MaxNutrition>
<CarryingCapacity>100</CarryingCapacity>
<MeatAmount>60</MeatAmount>
<LeatherAmount>30</LeatherAmount>
<MeleeDodgeChance>1.25</MeleeDodgeChance>
<MeleeHitChance>1.25</MeleeHitChance>
<!-- <NegotiationAbility>1</NegotiationAbility> -->
<!-- <SellPriceFactor>1</SellPriceFactor> -->
<!-- <SocialImpact>1</SocialImpact> -->
<!-- <TradePriceImprovement>0.5</TradePriceImprovement> -->
<!-- 自带的甲壳可以防御外部攻击 -->
<ArmorRating_Blunt>0.4</ArmorRating_Blunt>
<ArmorRating_Sharp>0.4</ArmorRating_Sharp>
<ArmorRating_Heat>0.3</ArmorRating_Heat>
</statBases>
<race>
<!-- 身体类型 -->
<body>ArachnaeFighter_Body</body>
<baseBodySize>0.85</baseBodySize>
<baseHealthScale>2</baseHealthScale>
<lifeExpectancy>5</lifeExpectancy>
<lifeStageAges Inherit="False">
<li>
<def>ArachnaeNode_Myrmecocystus_Adult</def>
<minAge>0</minAge>
</li>
</lifeStageAges>
</race>
</AlienRace.ThingDef_AlienRace>
</Defs>

View File

@@ -472,7 +472,6 @@
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
<!-- 可以驯服的宠物,主要是防止小虫由别人驯服 -->
<petList>
<li>ArachnaeBase_Race_Slavey</li>
<li>ArachnaeBase_Race_Scavenger</li>
<li>ArachnaeBase_Race_HardJaw</li>
</petList>
@@ -751,6 +750,7 @@
<comps>
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
<hediffs>
<li>ARA_Queen_0_Stage</li>
<li>ARA_HiveMindMaster</li>
</hediffs>
<addChance>1.0</addChance>

View File

@@ -0,0 +1,182 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!-- 内衬 -->
<ThingDef Name="ARA_ApparelOnSkinBase" ParentName="ApparelMakeableBase" Abstract="True">
<graphicData>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>CutoutComplex</shaderType>
</graphicData>
<smeltable>false</smeltable>
<thingCategories>
<li>ApparelMisc</li>
</thingCategories>
<costStuffCount>0</costStuffCount>
<stuffCategories Inherit="False" />
<apparel>
<tags>
<li>ARA_Apparel</li>
<li>ARA_Inner</li>
</tags>
<bodyPartGroups>
<li>Torso</li>
</bodyPartGroups>
<layers>
<li>OnSkin</li>
</layers>
<canBeDesiredForIdeo>false</canBeDesiredForIdeo>
<canBeGeneratedToSatisfyWarmth>false</canBeGeneratedToSatisfyWarmth>
<canBeGeneratedToSatisfyToxicEnvironmentResistance>false</canBeGeneratedToSatisfyToxicEnvironmentResistance>
<useWornGraphicMask>true</useWornGraphicMask>
</apparel>
<recipeMaker Inherit="False" IsNull="True"/>
<possessionCount>1</possessionCount>
<statBases>
<Mass>0.1</Mass>
</statBases>
</ThingDef>
<ThingDef ParentName="ARA_ApparelOnSkinBase">
<defName>ARA_Bodystocking_White</defName>
<label>连身白丝</label>
<description>阿拉克涅虫群的装饰性织物,对于虫群来说应该是没啥用的东西。</description>
<graphicData>
<texPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_White</texPath>
</graphicData>
<apparel>
<wornGraphicPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_White</wornGraphicPath>
</apparel>
<statBases>
<WorkToMake>3000</WorkToMake>
</statBases>
</ThingDef>
<ThingDef ParentName="ARA_ApparelOnSkinBase">
<defName>ARA_Bodystocking_Black</defName>
<label>连身黑丝</label>
<description>阿拉克涅虫群的装饰性织物,对于虫群来说应该是没啥用的东西。</description>
<graphicData>
<texPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_Black</texPath>
</graphicData>
<apparel>
<wornGraphicPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_Black</wornGraphicPath>
</apparel>
<statBases>
<WorkToMake>3000</WorkToMake>
</statBases>
</ThingDef>
<AbilityDef ParentName="ARA_CocoonSpew_Base">
<defName>ARA_BioforgeIncubator_ClothBase</defName>
<label>投放孵化茧 基础织物</label>
<description>投放一枚织物茧,内含可以孵化一套基础织物的营养和遗传物质——参阅茧的超链接,了解其能生产的所有装备的特点。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_BioforgeIncubator_ClothBase_Proj</projectileDef>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_4DIL</requiredResearch>
<failMessage>需要科技 基因节点DIL-4"编织" 以解锁此孵化路径</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef ParentName="ARA_CocoonSpew_Base_Proj">
<defName>ARA_BioforgeIncubator_ClothBase_Proj</defName>
<projectile>
<spawnsThingDef>ARA_BioforgeIncubator_ClothBase</spawnsThingDef>
</projectile>
</ThingDef>
<ThingDef ParentName="ARA_BioforgeIncubator_Base">
<defName>ARA_BioforgeIncubator_ClothBase</defName>
<label>阿拉克涅孵化茧 基础织物</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为-30~55°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_Bodystocking_White</ThingDef>
<ThingDef>ARA_Bodystocking_Black</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_4DIL</li>
</researchPrerequisites>
<comps>
<!-- The new, GrowthVat-style fuel component -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>10</fuelCapacity>
<fuelLabel>营养</fuelLabel>
<fuelFilter>
<categories>
<li>Foods</li>
</categories>
</fuelFilter>
<fuelConsumptionRate>0</fuelConsumptionRate> <!-- IMPORTANT: Disable base class consumption -->
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>1</autoRefuelPercent>
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<processes>
<li>
<thingDef>ARA_Bodystocking_White</thingDef>
<productionTicks>6000</productionTicks>
<totalNutritionNeeded>1</totalNutritionNeeded>
</li>
<li>
<thingDef>ARA_Bodystocking_Black</thingDef>
<productionTicks>6000</productionTicks>
<totalNutritionNeeded>1</totalNutritionNeeded>
</li>
</processes>
<whitelist>
<li>ArachnaeNode_Race_WeaponSmith</li>
</whitelist>
<spawnCount>1</spawnCount>
<destroyOnSpawn>True</destroyOnSpawn>
<minSafeTemperature>-30</minSafeTemperature>
<maxSafeTemperature>55</maxSafeTemperature>
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
<damagePerTickWhenUnfueled>0.2</damagePerTickWhenUnfueled>
<minNutritionToStart>1.0</minNutritionToStart>
<qualityThresholds>
<li>
<quality>Legendary</quality>
<threshold>0.99</threshold>
</li>
<li>
<quality>Masterwork</quality>
<threshold>0.90</threshold>
</li>
<li>
<quality>Excellent</quality>
<threshold>0.70</threshold>
</li>
<li>
<quality>Good</quality>
<threshold>0.50</threshold>
</li>
<li>
<quality>Normal</quality>
<threshold>0.20</threshold>
</li>
<li>
<quality>Poor</quality>
<threshold>0.10</threshold>
</li>
</qualityThresholds>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>-30</minSafeTemperature>
<maxSafeTemperature>55</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
<ApparelLayerDef>
<defName>Shield</defName>
<label>盾牌</label>
<drawOrder>275</drawOrder>
</ApparelLayerDef>
</Defs>

View File

@@ -63,6 +63,110 @@
<li>RewardStandardQualitySuper</li>
</thingSetMakerTags>
</ThingDef>
<AbilityDef ParentName="ARA_CocoonSpew_Base">
<defName>ARA_BioforgeIncubator_BoneBase</defName>
<label>投放孵化茧 骨刃器官</label>
<description>投放一枚武装器官茧,内含可以孵化一套基础骨刃武装器官的营养和遗传物质——参阅茧的超链接,了解其能生产的所有装备的特点。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_BioforgeIncubator_BoneBase_Proj</projectileDef>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_5DIL</requiredResearch>
<failMessage>需要科技 基因节点DIL-5"骨刀" 以解锁此孵化路径</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef ParentName="ARA_CocoonSpew_Base_Proj">
<defName>ARA_BioforgeIncubator_BoneBase_Proj</defName>
<projectile>
<spawnsThingDef>ARA_BioforgeIncubator_BoneBase</spawnsThingDef>
</projectile>
</ThingDef>
<ThingDef ParentName="ARA_BioforgeIncubator_Base">
<defName>ARA_BioforgeIncubator_BoneBase</defName>
<label>阿拉克涅孵化茧 基础骨片装备</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个骨片武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为-20~35°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_MW_Bone_Sword</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_5DIL</li>
</researchPrerequisites>
<comps>
<!-- The new, GrowthVat-style fuel component -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>10</fuelCapacity>
<fuelLabel>营养</fuelLabel>
<fuelFilter>
<categories>
<li>Foods</li>
</categories>
</fuelFilter>
<fuelConsumptionRate>0</fuelConsumptionRate> <!-- IMPORTANT: Disable base class consumption -->
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>1</autoRefuelPercent>
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<processes>
<li>
<thingDef>ARA_MW_Bone_Sword</thingDef>
<productionTicks>60000</productionTicks>
<totalNutritionNeeded>15</totalNutritionNeeded>
</li>
</processes>
<whitelist>
<li>ArachnaeNode_Race_WeaponSmith</li>
</whitelist>
<spawnCount>1</spawnCount>
<destroyOnSpawn>True</destroyOnSpawn>
<minSafeTemperature>-20</minSafeTemperature>
<maxSafeTemperature>35</maxSafeTemperature>
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
<damagePerTickWhenUnfueled>0.2</damagePerTickWhenUnfueled>
<minNutritionToStart>1.0</minNutritionToStart>
<qualityThresholds>
<li>
<quality>Legendary</quality>
<threshold>0.99</threshold>
</li>
<li>
<quality>Masterwork</quality>
<threshold>0.90</threshold>
</li>
<li>
<quality>Excellent</quality>
<threshold>0.70</threshold>
</li>
<li>
<quality>Good</quality>
<threshold>0.50</threshold>
</li>
<li>
<quality>Normal</quality>
<threshold>0.20</threshold>
</li>
<li>
<quality>Poor</quality>
<threshold>0.10</threshold>
</li>
</qualityThresholds>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>-20</minSafeTemperature>
<maxSafeTemperature>35</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Basic_Fist_Needle_Gun</defName>
@@ -151,6 +255,110 @@
<speed>40</speed>
</projectile>
</ThingDef>
<AbilityDef ParentName="ARA_CocoonSpew_Base">
<defName>ARA_BioforgeIncubator_ToxicNeedleBase</defName>
<label>投放孵化茧 毒针器官</label>
<description>投放一枚武装器官茧,内含可以孵化一套基础毒针武装器官的营养和遗传物质——参阅茧的超链接,了解其能生产的所有装备的特点。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_BioforgeIncubator_ToxicNeedleBase_Proj</projectileDef>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_5PAV</requiredResearch>
<failMessage>需要科技 基因节点PAV-5"毒刺" 以解锁此孵化路径</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef ParentName="ARA_CocoonSpew_Base_Proj">
<defName>ARA_BioforgeIncubator_ToxicNeedleBase_Proj</defName>
<projectile>
<spawnsThingDef>ARA_BioforgeIncubator_ToxicNeedleBase</spawnsThingDef>
</projectile>
</ThingDef>
<ThingDef ParentName="ARA_BioforgeIncubator_Base">
<defName>ARA_BioforgeIncubator_ToxicNeedleBase</defName>
<label>阿拉克涅孵化茧 基础毒针武器</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个毒针武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为0~22°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_RW_Basic_Fist_Needle_Gun</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_5PAV</li>
</researchPrerequisites>
<comps>
<!-- The new, GrowthVat-style fuel component -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>10</fuelCapacity>
<fuelLabel>营养</fuelLabel>
<fuelFilter>
<categories>
<li>Foods</li>
</categories>
</fuelFilter>
<fuelConsumptionRate>0</fuelConsumptionRate> <!-- IMPORTANT: Disable base class consumption -->
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>1</autoRefuelPercent>
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<processes>
<li>
<thingDef>ARA_RW_Basic_Fist_Needle_Gun</thingDef>
<productionTicks>40000</productionTicks>
<totalNutritionNeeded>10</totalNutritionNeeded>
</li>
</processes>
<whitelist>
<li>ArachnaeNode_Race_WeaponSmith</li>
</whitelist>
<spawnCount>1</spawnCount>
<destroyOnSpawn>True</destroyOnSpawn>
<minSafeTemperature>0</minSafeTemperature>
<maxSafeTemperature>22</maxSafeTemperature>
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
<damagePerTickWhenUnfueled>0.2</damagePerTickWhenUnfueled>
<minNutritionToStart>1.0</minNutritionToStart>
<qualityThresholds>
<li>
<quality>Legendary</quality>
<threshold>0.99</threshold>
</li>
<li>
<quality>Masterwork</quality>
<threshold>0.90</threshold>
</li>
<li>
<quality>Excellent</quality>
<threshold>0.70</threshold>
</li>
<li>
<quality>Good</quality>
<threshold>0.50</threshold>
</li>
<li>
<quality>Normal</quality>
<threshold>0.20</threshold>
</li>
<li>
<quality>Poor</quality>
<threshold>0.10</threshold>
</li>
</qualityThresholds>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>0</minSafeTemperature>
<maxSafeTemperature>22</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Basic_Acid_Bladder_Gun</defName>
@@ -247,4 +455,168 @@
</li>
</comps>
</ThingDef>
<AbilityDef ParentName="ARA_CocoonSpew_Base">
<defName>ARA_BioforgeIncubator_AcidBase</defName>
<label>投放孵化茧 酸液器官</label>
<description>投放一枚武装器官茧,内含可以孵化一套基础酸液武装器官的营养和遗传物质——参阅茧的超链接,了解其能生产的所有装备的特点。</description>
<iconPath>UI/Commands/EggSpew</iconPath>
<comps>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_7VXI</requiredResearch>
<failMessage>需要科技 基因节点VXI-7"外置酸袋" 以解锁此孵化路径</failMessage>
</li>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_BioforgeIncubator_AcidBase_Proj</projectileDef>
</li>
</comps>
</AbilityDef>
<ThingDef ParentName="ARA_CocoonSpew_Base_Proj">
<defName>ARA_BioforgeIncubator_AcidBase_Proj</defName>
<projectile>
<spawnsThingDef>ARA_BioforgeIncubator_AcidBase</spawnsThingDef>
</projectile>
</ThingDef>
<ThingDef ParentName="ARA_BioforgeIncubator_Base">
<defName>ARA_BioforgeIncubator_AcidBase</defName>
<label>阿拉克涅孵化茧 基础酸性武器</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个酸性武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为10~28°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_RW_Basic_Acid_Bladder_Gun</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_7VXI</li>
</researchPrerequisites>
<comps>
<!-- The new, GrowthVat-style fuel component -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>10</fuelCapacity>
<fuelLabel>营养</fuelLabel>
<fuelFilter>
<categories>
<li>Foods</li>
</categories>
</fuelFilter>
<fuelConsumptionRate>0</fuelConsumptionRate> <!-- IMPORTANT: Disable base class consumption -->
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>1</autoRefuelPercent>
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<processes>
<li>
<thingDef>ARA_RW_Basic_Acid_Bladder_Gun</thingDef>
<productionTicks>80000</productionTicks>
<totalNutritionNeeded>30</totalNutritionNeeded>
</li>
</processes>
<whitelist>
<li>ArachnaeNode_Race_WeaponSmith</li>
</whitelist>
<spawnCount>1</spawnCount>
<destroyOnSpawn>True</destroyOnSpawn>
<minSafeTemperature>10</minSafeTemperature>
<maxSafeTemperature>28</maxSafeTemperature>
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
<damagePerTickWhenUnfueled>0.2</damagePerTickWhenUnfueled>
<minNutritionToStart>1.0</minNutritionToStart>
<qualityThresholds>
<li>
<quality>Legendary</quality>
<threshold>0.99</threshold>
</li>
<li>
<quality>Masterwork</quality>
<threshold>0.90</threshold>
</li>
<li>
<quality>Excellent</quality>
<threshold>0.70</threshold>
</li>
<li>
<quality>Good</quality>
<threshold>0.50</threshold>
</li>
<li>
<quality>Normal</quality>
<threshold>0.20</threshold>
</li>
<li>
<quality>Poor</quality>
<threshold>0.10</threshold>
</li>
</qualityThresholds>
<!--
当一个生产流程完成时,系统会通过以下三个步骤来确定最终的物品品质:
第 1 步: 计算“基础品质分” (Base Quality Score)
基础品质分代表了在整个生产过程中,理想条件所占的比例。理想条件被严格定义为:燃料充足 且 温度适宜。
公式:
基础品质分 = 在理想条件下度过的时间(ticks) / 生产总需时间(ticks)
C# 代码对应:
baseQuality = (_selectedProcess.productionTicks > 0) ? (float)ticksUnderOptimalConditions / _selectedProcess.productionTicks : 0f;
说明:
ticksUnderOptimalConditions 是一个计数器只有在同时满足燃料充足和温度安全这两个条件的游戏刻Tick它才会加 1。
_selectedProcess.productionTicks 是在 XML 中为该产品定义的总生产时间。
这个得分的范围是 0.0 (0%) 到 1.0 (100%)。如果整个过程都完美无缺,这个分数就是 1.0。
第 2 步: 计算“温度惩罚分” (Temperature Penalty Score)
温度惩罚分是一个独立累加的负面分数。它只在环境温度超出安全范围时才会累积。
公式:
每刻惩罚增加量 = 超出安全范围的度数 × penaltyPerDegreePerTick
温度惩罚分 = 所有惩罚增加量的总和
C# 代码对应:
temperaturePenaltyPercent = Mathf.Min(1f, temperaturePenaltyPercent + tempDelta * Props.penaltyPerDegreePerTick);
说明:
penaltyPerDegreePerTick 是一个可在 XML 中配置的系数代表每超出1度、每刻所产生的惩罚量。
这个惩罚是不可逆的。即使温度恢复正常,已经累积的惩罚也不会减少。
它的最大值被限制在 1.0 (100%),以防止无限累加。
第 3 步: 计算“最终品质分”并映射到品质等级
最终品质分由基础分减去惩罚分得出,这个分数将直接决定物品的品质等级。
公式:
最终品质分 = 基础品质分 - 温度惩罚分
C# 代码对应:
finalQualityScore = Mathf.Clamp01(baseQuality - temperaturePenaltyPercent);
映射到品质等级:
得到 finalQualityScore (一个 0.0 到 1.0 之间的值) 后,系统会通过一系列 if-else if 判断,将其映射到游戏中的 QualityCategory (品质等级)。例如,在我们的代码中:
>= 0.99 -> 传说 (Legendary)
>= 0.90 -> 杰作 (Masterwork)
>= 0.70 -> 优秀 (Excellent)
>= 0.50 -> 良好 (Good)
>= 0.20 -> 普通 (Normal)
>= 0.10 -> 差 (Poor)
< 0.10 -> 劣质 (Awful)
总结
这个系统的核心在于,它鼓励玩家全程维持最佳生产环境。
仅仅保持燃料充足或温度适宜是不够的,必须两者兼顾才能提高“基础品质分”。
同时,必须极力避免温度超出安全范围,因为“温度惩罚分”是纯粹的惩罚,它只会单方面地拉低最终品质,且无法挽回。
这种设计为玩家提供了一个清晰的目标和富有挑战性的过程管理,而不是一个简单的“放置-等待”式生产。
-->
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>10</minSafeTemperature>
<maxSafeTemperature>28</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
</Defs>

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!-- 1. 加成建筑 "孵化加速器" -->
<ThingDef ParentName="BuildingBase">
<defName>ARA_IncubationAccelerator</defName>
<label>孵化加速器</label>
<description>一个辅助性的生物机械装置,当放置在大型孵化池旁边时,可以加速其内部的孵化过程。</description>
<graphicData>
<texPath>Things/Building/Misc/ToolCabinet</texPath>
<graphicClass>Graphic_Multi</graphicClass>
</graphicData>
<size>(1,1)</size>
<comps>
<!-- 使用原版的 CompFacility -->
<li Class="CompProperties_Facility">
<statOffsets>
<!-- 提供我们自定义的孵化速度加成 -->
<ARA_IncubationSpeedFactor>0.60</ARA_IncubationSpeedFactor>
</statOffsets>
</li>
</comps>
</ThingDef>
<!-- 2. 主建筑 "生物孵化池" -->
<ThingDef ParentName="BuildingBase">
<defName>ARA_BioforgeIncubator</defName>
<label>生物质孵化池</label>
<description>一个大型的、需要消耗大量营养物质的孵化设施,可以同时孵化多个单位,并能通过链接外部设备来提高效率。</description>
<graphicData>
<texPath>Things/Building/AncientHeatVent</texPath>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>CutoutComplex</shaderType>
<drawSize>(7,7)</drawSize>
</graphicData>
<size>(7,7)</size>
<tickerType>Normal</tickerType>
<stuffCategories Inherit="False"/>
<costStuffCount>0</costStuffCount>
<costList>
<ARA_Carapace>50</ARA_Carapace>
</costList>
<castEdgeShadows>false</castEdgeShadows>
<staticSunShadowHeight>0</staticSunShadowHeight>
<altitudeLayer>Building</altitudeLayer>
<passability>PassThroughOnly</passability>
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
<pathCost>50</pathCost>
<statBases>
<MaxHitPoints>250</MaxHitPoints>
<WorkToBuild>2800</WorkToBuild>
<Flammability>1.0</Flammability>
</statBases>
<placeWorkers>
<li>PlaceWorker_PreventInteractionSpotOverlap</li>
</placeWorkers>
<fillPercent>0.8</fillPercent>
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
<hasInteractionCell>true</hasInteractionCell>
<designationCategory>ARA_Buildings</designationCategory>
<uiOrder>2600</uiOrder>
<surfaceType>Item</surfaceType>
<building>
<workTableRoomRole>Laboratory</workTableRoomRole>
<workTableNotInRoomRoleFactor>0.8</workTableNotInRoomRoleFactor>
</building>
<comps>
<!-- a. 我们自己的队列生产组件 -->
<li Class="ArachnaeSwarm.CompProperties_QueuedPawnSpawner">
<productionQueueLimit>5</productionQueueLimit>
<minNutritionToStart>0.5</minNutritionToStart>
<whitelist>
<li>ARA_ArachnaeQueen</li>
</whitelist>
<spawnablePawns>
<li>
<pawnKind>ArachnaeNode_Race_Myrmecocystus</pawnKind>
<delayTicks>180000</delayTicks>
<totalNutritionNeeded>5.0</totalNutritionNeeded>
</li>
<li>
<pawnKind>ArachnaeNode_Race_ShieldHead</pawnKind>
<delayTicks>180000</delayTicks>
<totalNutritionNeeded>5.0</totalNutritionNeeded>
</li>
<li>
<pawnKind>ArachnaeNode_Race_WeaponSmith</pawnKind>
<delayTicks>180000</delayTicks>
<totalNutritionNeeded>5.0</totalNutritionNeeded>
<!--<requiredResearch>ARA_AdvancedBiology</requiredResearch>-->
</li>
</spawnablePawns>
</li>
<!-- b. 我们的营养燃料组件 -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>100.0</fuelCapacity>
<fuelFilter>
<categories>
<li>Foods</li>
</categories>
</fuelFilter>
<fuelGizmoLabel>生物质</fuelGizmoLabel>
</li>
<!-- c. 原版的设施链接接收组件 -->
<li Class="CompProperties_AffectedByFacilities">
<linkableFacilities>
<li>ARA_IncubationAccelerator</li>
</linkableFacilities>
</li>
</comps>
</ThingDef>
</Defs>

View File

@@ -33,7 +33,6 @@
<!-- <claimable>false</claimable> -->
<deconstructible>false</deconstructible>
<repairable>false</repairable>
<quickTargetable>true</quickTargetable>
<isTargetable>true</isTargetable>
<expandHomeArea>false</expandHomeArea>
</building>
@@ -52,6 +51,58 @@
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ARA_EggSpew_Base_Proj">
<defName>ARA_Proj_EggSac_BaseFighter</defName>
<label>阿拉克涅虫卵</label>
<projectile>
<spawnsThingDef>ARA_InteractiveEggSac_Basic_Fighter</spawnsThingDef>
</projectile>
</ThingDef>
<ThingDef ParentName="ARA_InteractiveEggSac_Base">
<defName>ARA_InteractiveEggSac_Basic_Fighter</defName>
<label>阿拉克涅虫卵囊 战士虫</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只新督虫所需的营养和遗传物质,可以通过阿拉克涅女皇种的交互完成激活进程——参阅虫卵的超链接,了解各个督虫的特点。\n\n卵囊对温度极度敏感该类型的卵适温为-10~22°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ArachnaeNode_Race_Fighter</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_1KYC</li>
</researchPrerequisites>
<comps>
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
<spawnablePawns>
<li>
<pawnKind>ArachnaeNode_Race_Fighter</pawnKind>
<delayTicks>12</delayTicks>
<requiredResearch>ARA_Technology_1KYC</requiredResearch>
</li>
</spawnablePawns>
<whitelist>
<li>ARA_ArachnaeQueen</li>
</whitelist>
<destroyOnSpawn>true</destroyOnSpawn>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>-10</minSafeTemperature>
<maxSafeTemperature>22</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ARA_EggSpew_Base_Proj">
<defName>ARA_Proj_EggSac</defName>
<label>阿拉克涅虫卵</label>
<projectile>
<spawnsThingDef>ARA_InteractiveEggSac</spawnsThingDef>
</projectile>
</ThingDef>
<ThingDef ParentName="ARA_InteractiveEggSac_Base">
<defName>ARA_InteractiveEggSac</defName>
<label>阿拉克涅虫卵囊</label>
@@ -67,28 +118,23 @@
<comps>
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
<pawnKinds>
<li>ArachnaeNode_Race_Myrmecocystus</li>
<li>ArachnaeNode_Race_ShieldHead</li>
<li>ArachnaeNode_Race_WeaponSmith</li>
</pawnKinds>
<whitelist>
<li>ARA_ArachnaeQueen</li>
</whitelist>
<pawnKindDelays>
<spawnablePawns>
<li>
<pawnKind>ArachnaeNode_Race_Myrmecocystus</pawnKind>
<delay>180000</delay>
<delayTicks>180000</delayTicks>
</li>
<li>
<pawnKind>ArachnaeNode_Race_ShieldHead</pawnKind>
<delay>180000</delay>
<delayTicks>180000</delayTicks>
</li>
<li>
<pawnKind>ArachnaeNode_Race_WeaponSmith</pawnKind>
<delay>180000</delay>
<delayTicks>180000</delayTicks>
</li>
</pawnKindDelays>
</spawnablePawns>
<whitelist>
<li>ARA_ArachnaeQueen</li>
</whitelist>
<destroyOnSpawn>true</destroyOnSpawn>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
@@ -100,6 +146,7 @@
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ARA_InteractiveEggSac_Base">
<defName>ARA_InteractiveEggSac_Start</defName>
<label>初诞阿拉克涅虫卵囊</label>
@@ -114,28 +161,23 @@
<comps>
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
<pawnKinds>
<li>ArachnaeNode_Race_Myrmecocystus</li>
<li>ArachnaeNode_Race_ShieldHead</li>
<li>ArachnaeNode_Race_WeaponSmith</li>
</pawnKinds>
<whitelist>
<li>ARA_ArachnaeQueen</li>
</whitelist>
<pawnKindDelays>
<spawnablePawns>
<li>
<pawnKind>ArachnaeNode_Race_Myrmecocystus</pawnKind>
<delay>300</delay>
<delayTicks>300</delayTicks>
</li>
<li>
<pawnKind>ArachnaeNode_Race_ShieldHead</pawnKind>
<delay>300</delay>
<delayTicks>300</delayTicks>
</li>
<li>
<pawnKind>ArachnaeNode_Race_WeaponSmith</pawnKind>
<delay>300</delay>
<delayTicks>300</delayTicks>
</li>
</pawnKindDelays>
</spawnablePawns>
<whitelist>
<li>ARA_ArachnaeQueen</li>
</whitelist>
<destroyOnSpawn>true</destroyOnSpawn>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
@@ -147,40 +189,5 @@
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ARA_InteractiveEggSac_Base">
<defName>ARA_InteractiveEggSac_Basic_Fighter</defName>
<label>阿拉克涅虫卵囊 武斗虫</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只新督虫所需的营养和遗传物质,可以通过阿拉克涅女皇种的交互完成激活进程——参阅虫卵的超链接,了解各个督虫的特点。\n\n卵囊对温度极度敏感该类型的卵适温为-10~22°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ArachnaeNode_Race_Fighter</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_1KYC</li>
</researchPrerequisites>
<comps>
<li Class="ArachnaeSwarm.CompProperties_SpawnPawnFromList">
<pawnKinds>
<li>ArachnaeNode_Race_Fighter</li>
</pawnKinds>
<whitelist>
<li>ARA_ArachnaeQueen</li>
</whitelist>
<pawnKindDelays>
<li>
<pawnKind>ArachnaeNode_Race_Fighter</pawnKind>
<delay>12</delay>
</li>
</pawnKindDelays>
<destroyOnSpawn>true</destroyOnSpawn>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>-10</minSafeTemperature>
<maxSafeTemperature>22</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
</Defs>
</Defs>

View File

@@ -32,314 +32,9 @@
<spawnMtbHours>4</spawnMtbHours>
<spawnRadius>5</spawnRadius>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ARA_BioforgeIncubator_Base">
<defName>ARA_BioforgeIncubator_AcidBase</defName>
<label>阿拉克涅孵化茧 基础酸性武器</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个酸性武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为10~28°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_RW_Basic_Acid_Bladder_Gun</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_7VXI</li>
</researchPrerequisites>
<comps>
<!-- The new, GrowthVat-style fuel component -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>10</fuelCapacity>
<fuelLabel>营养</fuelLabel>
<fuelFilter>
<categories>
<li>Foods</li>
</categories>
</fuelFilter>
<fuelConsumptionRate>0</fuelConsumptionRate> <!-- IMPORTANT: Disable base class consumption -->
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>1</autoRefuelPercent>
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<processes>
<li>
<thingDef>ARA_RW_Basic_Acid_Bladder_Gun</thingDef>
<productionTicks>80000</productionTicks>
<totalNutritionNeeded>30</totalNutritionNeeded>
</li>
</processes>
<whitelist>
<li>ArachnaeNode_Race_WeaponSmith</li>
</whitelist>
<spawnCount>1</spawnCount>
<destroyOnSpawn>True</destroyOnSpawn>
<minSafeTemperature>10</minSafeTemperature>
<maxSafeTemperature>28</maxSafeTemperature>
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
<damagePerTickWhenUnfueled>0.2</damagePerTickWhenUnfueled>
<minNutritionToStart>1.0</minNutritionToStart>
<qualityThresholds>
<li>
<quality>Legendary</quality>
<threshold>0.99</threshold>
</li>
<li>
<quality>Masterwork</quality>
<threshold>0.90</threshold>
</li>
<li>
<quality>Excellent</quality>
<threshold>0.70</threshold>
</li>
<li>
<quality>Good</quality>
<threshold>0.50</threshold>
</li>
<li>
<quality>Normal</quality>
<threshold>0.20</threshold>
</li>
<li>
<quality>Poor</quality>
<threshold>0.10</threshold>
</li>
</qualityThresholds>
<!--
当一个生产流程完成时,系统会通过以下三个步骤来确定最终的物品品质:
第 1 步: 计算“基础品质分” (Base Quality Score)
基础品质分代表了在整个生产过程中,理想条件所占的比例。理想条件被严格定义为:燃料充足 且 温度适宜。
公式:
基础品质分 = 在理想条件下度过的时间(ticks) / 生产总需时间(ticks)
C# 代码对应:
baseQuality = (_selectedProcess.productionTicks > 0) ? (float)ticksUnderOptimalConditions / _selectedProcess.productionTicks : 0f;
说明:
ticksUnderOptimalConditions 是一个计数器只有在同时满足燃料充足和温度安全这两个条件的游戏刻Tick它才会加 1。
_selectedProcess.productionTicks 是在 XML 中为该产品定义的总生产时间。
这个得分的范围是 0.0 (0%) 到 1.0 (100%)。如果整个过程都完美无缺,这个分数就是 1.0。
第 2 步: 计算“温度惩罚分” (Temperature Penalty Score)
温度惩罚分是一个独立累加的负面分数。它只在环境温度超出安全范围时才会累积。
公式:
每刻惩罚增加量 = 超出安全范围的度数 × penaltyPerDegreePerTick
温度惩罚分 = 所有惩罚增加量的总和
C# 代码对应:
temperaturePenaltyPercent = Mathf.Min(1f, temperaturePenaltyPercent + tempDelta * Props.penaltyPerDegreePerTick);
说明:
penaltyPerDegreePerTick 是一个可在 XML 中配置的系数代表每超出1度、每刻所产生的惩罚量。
这个惩罚是不可逆的。即使温度恢复正常,已经累积的惩罚也不会减少。
它的最大值被限制在 1.0 (100%),以防止无限累加。
第 3 步: 计算“最终品质分”并映射到品质等级
最终品质分由基础分减去惩罚分得出,这个分数将直接决定物品的品质等级。
公式:
最终品质分 = 基础品质分 - 温度惩罚分
C# 代码对应:
finalQualityScore = Mathf.Clamp01(baseQuality - temperaturePenaltyPercent);
映射到品质等级:
得到 finalQualityScore (一个 0.0 到 1.0 之间的值) 后,系统会通过一系列 if-else if 判断,将其映射到游戏中的 QualityCategory (品质等级)。例如,在我们的代码中:
>= 0.99 -> 传说 (Legendary)
>= 0.90 -> 杰作 (Masterwork)
>= 0.70 -> 优秀 (Excellent)
>= 0.50 -> 良好 (Good)
>= 0.20 -> 普通 (Normal)
>= 0.10 -> 差 (Poor)
< 0.10 -> 劣质 (Awful)
总结
这个系统的核心在于,它鼓励玩家全程维持最佳生产环境。
仅仅保持燃料充足或温度适宜是不够的,必须两者兼顾才能提高“基础品质分”。
同时,必须极力避免温度超出安全范围,因为“温度惩罚分”是纯粹的惩罚,它只会单方面地拉低最终品质,且无法挽回。
这种设计为玩家提供了一个清晰的目标和富有挑战性的过程管理,而不是一个简单的“放置-等待”式生产。
-->
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>10</minSafeTemperature>
<maxSafeTemperature>28</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ARA_BioforgeIncubator_Base">
<defName>ARA_BioforgeIncubator_ToxicNeedleBase</defName>
<label>阿拉克涅孵化茧 基础毒针武器</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个毒针武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为0~22°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_RW_Basic_Fist_Needle_Gun</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_5PAV</li>
</researchPrerequisites>
<comps>
<!-- The new, GrowthVat-style fuel component -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>10</fuelCapacity>
<fuelLabel>营养</fuelLabel>
<fuelFilter>
<categories>
<li>Foods</li>
</categories>
</fuelFilter>
<fuelConsumptionRate>0</fuelConsumptionRate> <!-- IMPORTANT: Disable base class consumption -->
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>1</autoRefuelPercent>
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<processes>
<li>
<thingDef>ARA_RW_Basic_Fist_Needle_Gun</thingDef>
<productionTicks>40000</productionTicks>
<totalNutritionNeeded>10</totalNutritionNeeded>
</li>
</processes>
<whitelist>
<li>ArachnaeNode_Race_WeaponSmith</li>
</whitelist>
<spawnCount>1</spawnCount>
<destroyOnSpawn>True</destroyOnSpawn>
<minSafeTemperature>0</minSafeTemperature>
<maxSafeTemperature>22</maxSafeTemperature>
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
<damagePerTickWhenUnfueled>0.2</damagePerTickWhenUnfueled>
<minNutritionToStart>1.0</minNutritionToStart>
<qualityThresholds>
<li>
<quality>Legendary</quality>
<threshold>0.99</threshold>
</li>
<li>
<quality>Masterwork</quality>
<threshold>0.90</threshold>
</li>
<li>
<quality>Excellent</quality>
<threshold>0.70</threshold>
</li>
<li>
<quality>Good</quality>
<threshold>0.50</threshold>
</li>
<li>
<quality>Normal</quality>
<threshold>0.20</threshold>
</li>
<li>
<quality>Poor</quality>
<threshold>0.10</threshold>
</li>
</qualityThresholds>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>0</minSafeTemperature>
<maxSafeTemperature>22</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="ARA_BioforgeIncubator_Base">
<defName>ARA_BioforgeIncubator_BoneBase</defName>
<label>阿拉克涅孵化茧 基础骨片装备</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个骨片武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为-20~35°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_MW_Bone_Sword</ThingDef>
</descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_5DIL</li>
</researchPrerequisites>
<comps>
<!-- The new, GrowthVat-style fuel component -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>10</fuelCapacity>
<fuelLabel>营养</fuelLabel>
<fuelFilter>
<categories>
<li>Foods</li>
</categories>
</fuelFilter>
<fuelConsumptionRate>0</fuelConsumptionRate> <!-- IMPORTANT: Disable base class consumption -->
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>1</autoRefuelPercent>
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<processes>
<li>
<thingDef>ARA_MW_Bone_Sword</thingDef>
<productionTicks>60000</productionTicks>
<totalNutritionNeeded>15</totalNutritionNeeded>
</li>
</processes>
<whitelist>
<li>ArachnaeNode_Race_WeaponSmith</li>
</whitelist>
<spawnCount>1</spawnCount>
<destroyOnSpawn>True</destroyOnSpawn>
<minSafeTemperature>20</minSafeTemperature>
<maxSafeTemperature>35</maxSafeTemperature>
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
<damagePerTickWhenUnfueled>0.2</damagePerTickWhenUnfueled>
<minNutritionToStart>1.0</minNutritionToStart>
<qualityThresholds>
<li>
<quality>Legendary</quality>
<threshold>0.99</threshold>
</li>
<li>
<quality>Masterwork</quality>
<threshold>0.90</threshold>
</li>
<li>
<quality>Excellent</quality>
<threshold>0.70</threshold>
</li>
<li>
<quality>Good</quality>
<threshold>0.50</threshold>
</li>
<li>
<quality>Normal</quality>
<threshold>0.20</threshold>
</li>
<li>
<quality>Poor</quality>
<threshold>0.10</threshold>
</li>
</qualityThresholds>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>-20</minSafeTemperature>
<maxSafeTemperature>35</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
<li Class="ArachnaeSwarm.CompProperties_DelayedTerrainSpawn">
<terrainToSpawn>ARA_InsectCreep</terrainToSpawn>
<spawnRadius>2.5</spawnRadius>
</li>
</comps>
</ThingDef>

View File

@@ -273,7 +273,7 @@
<!-- Trained behavior: Haul-->
<li Class="ThinkNode_ChancePerHour_Constant">
<mtbHours>0.5</mtbHours>
<mtbHours>0.15</mtbHours>
<subNodes>
<li Class="ThinkNode_ConditionalRequireCapacities">
<requiredCapacities>

View File

@@ -1 +1 @@
3528588530
3563955520

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -5,11 +5,20 @@ using Verse.AI.Group;
namespace ArachnaeSwarm
{
// 新的统一入口类
public class PawnSpawnEntry
{
public PawnKindDef pawnKind;
public int delayTicks = 0; // 默认延迟为0
public ResearchProjectDef requiredResearch; // 可选的科技需求
}
public class CompProperties_SpawnPawnFromList : CompProperties
{
public List<PawnKindDef> pawnKinds;
// 合并后的新列表
public List<PawnSpawnEntry> spawnablePawns;
public List<PawnKindDef> whitelist;
public List<PawnKindDelay> pawnKindDelays;
public bool destroyOnSpawn = false;
public IntRange spawnCount = new IntRange(1, 1);
public Type lordJob;
@@ -32,10 +41,4 @@ namespace ArachnaeSwarm
}
}
}
}
public class PawnKindDelay
{
public PawnKindDef pawnKind;
public int delay;
}

View File

@@ -0,0 +1,203 @@
using RimWorld;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Verse;
using Verse.AI;
namespace ArachnaeSwarm
{
// CompProperties: 在XML中配置组件的属性
public class CompProperties_QueuedPawnSpawner : CompProperties
{
public List<QueuedPawnSpawnEntry> spawnablePawns;
public List<PawnKindDef> whitelist;
public int productionQueueLimit = 1;
public float minNutritionToStart = 0.1f;
public CompProperties_QueuedPawnSpawner()
{
compClass = typeof(CompQueuedPawnSpawner);
}
}
// 主组件类
public class CompQueuedPawnSpawner : ThingComp
{
private List<QueuedProductionOrder> productionOrders = new List<QueuedProductionOrder>();
// 缓存对其他组件的引用以提高性能
private CompRefuelableNutrition _fuelComp;
private CompAffectedByFacilities _facilitiesComp;
public CompProperties_QueuedPawnSpawner Props => (CompProperties_QueuedPawnSpawner)props;
private CompRefuelableNutrition FuelComp
{
get
{
if (_fuelComp == null) _fuelComp = parent.GetComp<CompRefuelableNutrition>();
return _fuelComp;
}
}
private CompAffectedByFacilities FacilitiesComp
{
get
{
if (_facilitiesComp == null) _facilitiesComp = parent.GetComp<CompAffectedByFacilities>();
return _facilitiesComp;
}
}
public override void Initialize(CompProperties props)
{
base.Initialize(props);
// 在初始化时获取一次避免在每次访问时都调用GetComp
_fuelComp = parent.GetComp<CompRefuelableNutrition>();
_facilitiesComp = parent.GetComp<CompAffectedByFacilities>();
}
public override IEnumerable<FloatMenuOption> CompFloatMenuOptions(Pawn selPawn)
{
if (Props.whitelist == null || !Props.whitelist.Contains(selPawn.kindDef)) yield break;
if (FuelComp != null && (!FuelComp.HasFuel || FuelComp.NutritionStored < Props.minNutritionToStart))
{
yield return new FloatMenuOption("CannotStartProduction".Translate() + ": " + "NoFuel".Translate(), null);
yield break;
}
foreach (QueuedPawnSpawnEntry entry in Props.spawnablePawns)
{
if (entry.pawnKind == null) continue;
if (entry.requiredResearch != null && !entry.requiredResearch.IsFinished)
{
string disabledText = "ARA_Incubate".Translate(entry.pawnKind.label) + " (" + "Requires".Translate() + ": " + entry.requiredResearch.label + ")";
yield return new FloatMenuOption(disabledText, null);
}
else
{
string label = "ARA_Incubate".Translate(entry.pawnKind.label);
if (entry.totalNutritionNeeded > 0)
{
label += $" ({"NutritionNeeded".Translate()}: {entry.totalNutritionNeeded.ToString("0.0")})";
}
yield return new FloatMenuOption(label, () => AddToQueue(entry, selPawn));
}
}
}
private void AddToQueue(QueuedPawnSpawnEntry entry, Pawn selPawn)
{
productionOrders.Add(new QueuedProductionOrder { entry = entry });
// 给交互的Pawn一个反馈表示订单已接受
if (selPawn.jobs?.curJob != null)
{
selPawn.jobs.EndCurrentJob(JobCondition.Succeeded);
}
}
public override void CompTick()
{
base.CompTick();
var producingOrders = productionOrders.Where(o => o.spawnUntilTick > 0).ToList();
bool hasFuel = FuelComp?.HasFuel ?? true;
// 处理无燃料情况:仅暂停生产
if (!hasFuel && FuelComp != null && producingOrders.Any())
{
foreach (var order in producingOrders)
{
order.spawnUntilTick++;
}
}
// 动态计算总燃料消耗速率
if (FuelComp != null)
{
float totalConsumptionRatePerDay = 0f;
// 只计算有燃料时正在生产的订单
if(hasFuel)
{
foreach (var order in producingOrders)
{
if (order.entry.totalNutritionNeeded > 0 && order.entry.delayTicks > 0)
{
totalConsumptionRatePerDay += (order.entry.totalNutritionNeeded / order.entry.delayTicks) * 60000f;
}
}
}
FuelComp.currentConsumptionRate = totalConsumptionRatePerDay;
}
// 检查并完成订单
productionOrders.RemoveAll(order =>
{
if (order.spawnUntilTick > 0 && Find.TickManager.TicksGame >= order.spawnUntilTick)
{
Pawn pawn = PawnGenerator.GeneratePawn(new PawnGenerationRequest(order.entry.pawnKind, parent.Faction));
if (pawn != null) GenPlace.TryPlaceThing(pawn, parent.Position, parent.Map, ThingPlaceMode.Near);
return true;
}
return false;
});
// 检查并启动新订单
int currentlyProducingCount = productionOrders.Count(o => o.spawnUntilTick > 0);
if (currentlyProducingCount < Props.productionQueueLimit)
{
QueuedProductionOrder waitingOrder = productionOrders.FirstOrDefault(o => o.spawnUntilTick == -1);
if (waitingOrder != null)
{
float speedFactor = 1f;
if (FacilitiesComp != null)
{
speedFactor += FacilitiesComp.GetStatOffset(StatDef.Named("ARA_IncubationSpeedFactor"));
}
int modifiedDelay = (int)(waitingOrder.entry.delayTicks / speedFactor);
waitingOrder.spawnUntilTick = Find.TickManager.TicksGame + modifiedDelay;
}
}
}
public override string CompInspectStringExtra()
{
StringBuilder sb = new StringBuilder();
if (FuelComp != null) sb.AppendLine(FuelComp.CompInspectStringExtra());
int producingCount = productionOrders.Count(o => o.spawnUntilTick > 0);
int queuedCount = productionOrders.Count - producingCount;
sb.AppendLine($"生产槽位: {producingCount} / {Props.productionQueueLimit}");
if (queuedCount > 0) sb.AppendLine($"等待队列: {queuedCount}");
if (FacilitiesComp != null)
{
float speedFactor = 1f + FacilitiesComp.GetStatOffset(StatDef.Named("ARA_IncubationSpeedFactor"));
if(speedFactor != 1f) sb.AppendLine($"孵化速度: {speedFactor.ToStringPercent()}");
}
var producingNow = productionOrders.Where(o => o.spawnUntilTick > 0).OrderBy(o => o.spawnUntilTick);
if (producingNow.Any())
{
sb.AppendLine("正在孵化:");
foreach (var order in producingNow)
{
int remainingTicks = order.spawnUntilTick - Find.TickManager.TicksGame;
sb.AppendLine($" - {order.entry.pawnKind.LabelCap}: {remainingTicks.ToStringTicksToPeriod(true, false, true, true)}");
}
}
return sb.ToString().TrimEnd();
}
public override void PostExposeData()
{
base.PostExposeData();
Scribe_Collections.Look(ref productionOrders, "productionOrders", LookMode.Deep, new object[0]);
}
}
}

View File

@@ -13,14 +13,14 @@ namespace ArachnaeSwarm
private int spawnUntilTick = -1;
private PawnKindDef spawningPawnKind;
private PawnKindDef selectedPawnKind;
private PawnSpawnEntry selectedEntry;
public bool IsHatching => spawnUntilTick > 0;
public override IEnumerable<FloatMenuOption> CompFloatMenuOptions(Pawn selPawn)
{
if (spawnUntilTick > 0)
{
yield break; // 正在延迟中,不显示菜单
yield break;
}
if (Props.whitelist == null || !Props.whitelist.Contains(selPawn.kindDef))
@@ -28,16 +28,29 @@ namespace ArachnaeSwarm
yield break;
}
if (Props.pawnKinds != null)
if (Props.spawnablePawns != null)
{
foreach (PawnKindDef pawnKind in Props.pawnKinds)
foreach (PawnSpawnEntry entry in Props.spawnablePawns)
{
yield return new FloatMenuOption("ARA_Incubate".Translate(pawnKind.label), () =>
if (entry.pawnKind == null) continue;
// 检查科技需求
if (entry.requiredResearch != null && !entry.requiredResearch.IsFinished)
{
Job job = JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("ARA_IncubateJob"), parent);
selectedPawnKind = pawnKind;
selPawn.jobs.TryTakeOrderedJob(job);
});
// 科技未完成,显示灰色不可点击选项
string disabledText = "ARA_Incubate".Translate(entry.pawnKind.label) + " (" + "Requires".Translate() + ": " + entry.requiredResearch.label + ")";
yield return new FloatMenuOption(disabledText, null);
}
else
{
// 科技已完成或无需求,显示正常选项
yield return new FloatMenuOption("ARA_Incubate".Translate(entry.pawnKind.label), () =>
{
Job job = JobMaker.MakeJob(DefDatabase<JobDef>.GetNamed("ARA_IncubateJob"), parent);
this.selectedEntry = entry; // 保存整个入口信息
selPawn.jobs.TryTakeOrderedJob(job);
});
}
}
}
}
@@ -45,9 +58,10 @@ namespace ArachnaeSwarm
public void StartIncubation()
{
spawningPawnKind = selectedPawnKind;
int delay = Props.pawnKindDelays?.FirstOrDefault(pkd => pkd.pawnKind == selectedPawnKind)?.delay ?? 0;
spawnUntilTick = Find.TickManager.TicksGame + delay;
if (this.selectedEntry == null) return;
spawningPawnKind = this.selectedEntry.pawnKind;
spawnUntilTick = Find.TickManager.TicksGame + this.selectedEntry.delayTicks;
}
public override void CompTick()
@@ -147,7 +161,7 @@ namespace ArachnaeSwarm
base.PostExposeData();
Scribe_Values.Look(ref spawnUntilTick, "spawnUntilTick", -1);
Scribe_Defs.Look(ref spawningPawnKind, "spawningPawnKind");
Scribe_Defs.Look(ref selectedPawnKind, "selectedPawnKind");
// selectedEntry is transient and does not need to be saved.
}
}
}

View File

@@ -0,0 +1,49 @@
using RimWorld;
using Verse;
namespace ArachnaeSwarm
{
// 重命名以避免冲突
public class QueuedPawnSpawnEntry : IExposable
{
public PawnKindDef pawnKind;
public int delayTicks = 0;
public ResearchProjectDef requiredResearch;
public float totalNutritionNeeded = 0f;
public void ExposeData()
{
Scribe_Defs.Look(ref pawnKind, "pawnKind");
Scribe_Values.Look(ref delayTicks, "delayTicks", 0);
Scribe_Defs.Look(ref requiredResearch, "requiredResearch");
Scribe_Values.Look(ref totalNutritionNeeded, "totalNutritionNeeded", 0f);
}
}
// 重命名以避免冲突
public class QueuedProductionOrder : IExposable
{
public QueuedPawnSpawnEntry entry;
public int spawnUntilTick = -1;
public void ExposeData()
{
if (Scribe.mode == LoadSaveMode.Saving || Scribe.mode == LoadSaveMode.LoadingVars)
{
if (Scribe.EnterNode("entry"))
{
try
{
if (entry == null) entry = new QueuedPawnSpawnEntry();
entry.ExposeData();
}
finally
{
Scribe.ExitNode();
}
}
}
Scribe_Values.Look(ref spawnUntilTick, "spawnUntilTick", -1);
}
}
}

View File

@@ -11,6 +11,9 @@ namespace ArachnaeSwarm
public float inertiaDistance = 3f;
public DamageDef collisionDamageDef;
public ThingDef flyerDef;
public float collisionRadius = 1.5f;
public SoundDef impactSound;
public bool damageHostileOnly = true;
public CompProperties_TrackingCharge()
{

View File

@@ -5,6 +5,7 @@ using System.Reflection;
using System.Linq;
using Verse.AI;
using System.Collections.Generic;
using Verse.Sound;
namespace ArachnaeSwarm
{
@@ -17,12 +18,14 @@ namespace ArachnaeSwarm
public float inertiaDistance;
public DamageDef collisionDamageDef;
public LocalTargetInfo primaryTarget;
public float collisionRadius;
public SoundDef impactSound;
public bool damageHostileOnly;
public int maxFlightTicks;
// --- Internal state ---
private Vector3 currentSpeed;
private float distanceTraveled = 0f;
private bool homing = true;
private int inertiaTicks = -1;
private bool hasHitPrimaryTarget = false;
private Vector3 exactPosition;
// --- Reflection Fields ---
@@ -66,7 +69,7 @@ namespace ArachnaeSwarm
pawn.Destroy();
}
}
public override void SpawnSetup(Map map, bool respawningAfterLoad)
{
base.SpawnSetup(map, respawningAfterLoad);
@@ -75,82 +78,80 @@ namespace ArachnaeSwarm
this.exactPosition = base.DrawPos;
}
}
protected override void Tick()
{
int ticksFlying = (int)TicksFlyingInfo.GetValue(this);
// --- THE CORRECT APPROACH ---
// Let the base class handle all flight mechanics (position, timing, etc.)
// We only intervene to do two things:
// 1. Continuously update the destination to "steer" the flyer.
// 2. Perform our own collision checks (for primary target and AOE).
if (ticksFlying == 0)
if (homing && primaryTarget.HasThing && primaryTarget.Thing.Spawned)
{
Vector3 startVec = (Vector3)StartVecInfo.GetValue(this);
IntVec3 destCell = (IntVec3)DestCellInfo.GetValue(this);
Vector3 destinationPos = GenThing.TrueCenter(destCell, Rot4.North, this.FlyingThing.def.size, this.def.Altitude);
Vector3 direction = (destinationPos - startVec).normalized;
this.currentSpeed = direction * this.def.pawnFlyer.flightSpeed;
// Steer the flyer by constantly updating its destination cell.
DestCellInfo.SetValue(this, primaryTarget.Thing.Position);
}
this.exactPosition += this.currentSpeed;
this.distanceTraveled += this.currentSpeed.magnitude;
if (inertiaTicks > 0)
// --- Primary Target Collision Check ---
if (!hasHitPrimaryTarget && primaryTarget.HasThing && primaryTarget.Thing.Spawned)
{
inertiaTicks--;
if (inertiaTicks <= 0) { Land(); return; }
}
else
{
if (homing && primaryTarget.HasThing && primaryTarget.Thing.Spawned)
if ((this.DrawPos - primaryTarget.Thing.DrawPos).sqrMagnitude < this.collisionRadius * this.collisionRadius)
{
Vector3 desiredDirection = (primaryTarget.Thing.DrawPos - this.exactPosition).normalized;
this.currentSpeed = Vector3.RotateTowards(this.currentSpeed, desiredDirection, this.homingSpeed * 0.017f, 999f).normalized * this.def.pawnFlyer.flightSpeed;
}
else
{
homing = false;
}
// --- Impact! ---
if (this.impactSound != null)
{
SoundStarter.PlayOneShot(this.impactSound, new TargetInfo(this.Position, this.Map));
}
float calculatedDamage = this.initialDamage + (this.distanceTraveled * this.damagePerTile);
var dinfo = new DamageInfo(this.collisionDamageDef, calculatedDamage, 1f, -1, this.FlyingPawn);
Vector3 startPosition = (Vector3)StartVecInfo.GetValue(this);
float distance = (this.DrawPos - startPosition).magnitude;
float calculatedDamage = this.initialDamage + (distance * this.damagePerTile);
var dinfo = new DamageInfo(this.collisionDamageDef, calculatedDamage, 1f, -1, this.FlyingPawn);
if (homing && primaryTarget.HasThing && (this.exactPosition - primaryTarget.Thing.DrawPos).sqrMagnitude < 1.5f * 1.5f)
{
primaryTarget.Thing.TakeDamage(dinfo);
hasHitPrimaryTarget = true;
homing = false;
this.inertiaTicks = (int)(this.inertiaDistance / this.currentSpeed.magnitude);
}
foreach (var thing in GenRadial.RadialDistinctThingsAround(this.exactPosition.ToIntVec3(), this.Map, 1.0f, false))
Vector3 direction = (this.DrawPos - startPosition).normalized;
IntVec3 inertiaEndPos = (this.DrawPos + (direction * this.inertiaDistance)).ToIntVec3();
DestCellInfo.SetValue(this, inertiaEndPos);
}
}
// --- AOE Damage Logic ---
float distanceTravelled = ((Vector3)StartVecInfo.GetValue(this) - this.DrawPos).magnitude;
float currentAOEDamage = this.initialDamage + (distanceTravelled * this.damagePerTile);
foreach (var thing in GenRadial.RadialDistinctThingsAround(this.Position, this.Map, this.collisionRadius, false))
{
if (thing != this.FlyingPawn && thing != this && thing != primaryTarget.Thing)
{
if (thing == this.FlyingPawn || thing == this || thing == primaryTarget.Thing) continue;
if (thing is Pawn pawn && !pawn.Downed && pawn.HostileTo(this.FlyingPawn)) pawn.TakeDamage(dinfo);
else if (thing.def.destroyable && thing.def.building != null) thing.TakeDamage(dinfo);
if (thing is Pawn pawn && !pawn.Downed)
{
if (!this.damageHostileOnly || pawn.HostileTo(this.FlyingPawn))
{
var aoeDinfo = new DamageInfo(this.collisionDamageDef, currentAOEDamage, 1f, -1, this.FlyingPawn);
pawn.TakeDamage(aoeDinfo);
}
}
else if (thing.def.destroyable && thing.def.building != null)
{
var aoeDinfo = new DamageInfo(this.collisionDamageDef, currentAOEDamage, 1f, -1, this.FlyingPawn);
thing.TakeDamage(aoeDinfo);
}
}
}
try
{
DestCellInfo.SetValue(this, this.exactPosition.ToIntVec3());
TicksFlightTimeInfo.SetValue(this, ticksFlying + 2);
}
catch (System.Exception ex)
{
Log.ErrorOnce($"Exception during reflection in PawnFlyer_TrackingCharge: {ex}", this.thingIDNumber);
}
TicksFlyingInfo.SetValue(this, ticksFlying + 1);
int flightTime = (int)TicksFlightTimeInfo.GetValue(this);
if (!this.exactPosition.ToIntVec3().InBounds(this.Map) || ticksFlying > flightTime * 2)
{
Land();
}
// Let the base class do its thing. This is crucial.
base.Tick();
}
private void Land()
protected override void RespawnPawn()
{
if (this.Destroyed) return;
// This is the correct place to call the base method.
base.RespawnPawn();
this.Destroy();
}
}
}

View File

@@ -21,11 +21,21 @@ namespace ArachnaeSwarm
return false;
}
// --- Best Practice: Cache Map and Position FIRST ---
// Per MCP analysis, Caster.Map is the most reliable source.
// Cache this before ANY other logic.
Map map = this.Caster.Map;
if (map == null)
{
Log.Error($"Verb_CastAbilityTrackingCharge: Caster {this.Caster.LabelCap} has a null map. Cannot cast.");
return false;
}
if (this.CasterPawn == null || !this.CasterPawn.Spawned)
{
return false;
}
// --- This is now a fully custom Thing, so we spawn it directly ---
var trackingCharge = (PawnFlyer_TrackingCharge)ThingMaker.MakeThing(props.flyerDef);
@@ -36,10 +46,20 @@ namespace ArachnaeSwarm
trackingCharge.inertiaDistance = props.inertiaDistance;
trackingCharge.collisionDamageDef = props.collisionDamageDef;
trackingCharge.primaryTarget = this.currentTarget;
trackingCharge.collisionRadius = props.collisionRadius;
trackingCharge.impactSound = props.impactSound;
trackingCharge.damageHostileOnly = props.damageHostileOnly;
// Setup and spawn
trackingCharge.StartFlight(this.CasterPawn, this.currentTarget.Cell);
GenSpawn.Spawn(trackingCharge, this.CasterPawn.Position, this.CasterPawn.Map);
GenSpawn.Spawn(trackingCharge, this.CasterPawn.Position, map); // Use the cached map
// --- FIX for Comp Effects ---
// --- The Standard Pattern to trigger Comps like EffecterOnCaster ---
// After our custom verb logic (spawning the flyer) is done,
// we call the ability's Activate method with invalid targets.
// This triggers the standard Comp cycle without re-casting the verb.
this.ability.Activate(LocalTargetInfo.Invalid, LocalTargetInfo.Invalid);
return true;
}

View File

@@ -71,6 +71,8 @@
<Compile Include="ARA_SpawnPawnFromList\CompProperties_SpawnPawnFromList.cs" />
<Compile Include="ARA_SpawnPawnFromList\CompSpawnPawnFromList.cs" />
<Compile Include="ARA_SpawnPawnFromList\JobDriver_Incubate.cs" />
<Compile Include="ARA_SpawnPawnFromList\CompQueuedPawnSpawner.cs" />
<Compile Include="ARA_SpawnPawnFromList\ProductionContracts.cs" />
<Compile Include="ARA_QueenAbility\CompProperties_AbilitySprayLiquidMulti.cs" />
<Compile Include="ARA_QueenAbility\CompAbilityEffect_SprayLiquidMulti.cs" />
<Compile Include="DRM_HediffCurseFlame\Hediff_CurseFlame.cs" />