Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
929d362856 | ||
|
|
a114b6f037 | ||
|
|
8cbd09e036 | ||
|
|
f3d6c4e35e | ||
|
|
f55952befc | ||
|
|
6c1e7743dc | ||
|
|
dede557c05 | ||
|
|
c102458a43 | ||
|
|
f815e468eb | ||
|
|
505076b835 | ||
|
|
2bd1f6260f | ||
|
|
458e9b313b | ||
|
|
2a70345b8e | ||
|
|
f531d0a136 | ||
|
|
d31f5c616a | ||
|
|
d18f489113 | ||
|
|
12e860d637 | ||
|
|
09fd8c2c82 | ||
|
|
7da13bd49d | ||
|
|
ee48fb4491 |
@@ -31,6 +31,97 @@
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>ARA_TumorSpew</defName>
|
||||
<label>菌瘤释放</label>
|
||||
<description>排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动,并阻碍敌军的前进。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||
<targetRequired>false</targetRequired>
|
||||
<hostile>false</hostile>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<range>13</range>
|
||||
<warmupTime>1</warmupTime>
|
||||
<soundCast>AcidSpray_Resolve</soundCast>
|
||||
<violent>false</violent>
|
||||
<targetable>false</targetable>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<targetParams>
|
||||
<canTargetSelf>True</canTargetSelf>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
|
||||
<needDef>Food</needDef>
|
||||
<needCost>0.2</needCost>
|
||||
<failMessage>营养值不足,需要进食</failMessage>
|
||||
</li>
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_Tumor</projectileDef>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<ThingDef ParentName="ARA_EggSpew_Base_Proj">
|
||||
<defName>ARA_Proj_Tumor</defName>
|
||||
<label>阿拉克涅菌瘤</label>
|
||||
<projectile>
|
||||
<spawnsThingDef>ARA_Tumor_Smokepop</spawnsThingDef>
|
||||
</projectile>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="BuildingNaturalBase">
|
||||
<defName>ARA_Tumor_Smokepop</defName>
|
||||
<label>阿拉克涅枯萎菌瘤</label>
|
||||
<description>由少数虫族排出的特殊菌瘤,除了照明外还会在地上大范围地扩散菌毯,但是很快就会枯死。</description>
|
||||
<thingClass>Building</thingClass>
|
||||
<!-- <minifiedDef>MinifiedThing</minifiedDef> -->
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<selectable>true</selectable>
|
||||
<fillPercent>0.20</fillPercent>
|
||||
<leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
|
||||
<rotatable>false</rotatable>
|
||||
<tickerType>Normal</tickerType>
|
||||
<repairEffect>EatVegetarian</repairEffect>
|
||||
<filthLeaving>Filth_Slime</filthLeaving>
|
||||
<statBases>
|
||||
<MaxHitPoints>10</MaxHitPoints>
|
||||
<Mass>4</Mass>
|
||||
<Flammability>1.0</Flammability>
|
||||
<MarketValue>50</MarketValue>
|
||||
</statBases>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_Tumor</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<drawSize>1.2</drawSize>
|
||||
<shadowData>
|
||||
<volume>(0.3, 0.6, 0.3)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_GlowRadius</li>
|
||||
</placeWorkers>
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>13</glowRadius>
|
||||
<glowColor>(220,210,171,0)</glowColor>
|
||||
</li>
|
||||
<li Class="CompProperties_Lifespan">
|
||||
<lifespanTicks>9000</lifespanTicks>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_DelayedTerrainSpawn">
|
||||
<terrainToSpawn>ARA_InsectCreep</terrainToSpawn>
|
||||
<spawnRadius>13</spawnRadius>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
<AbilityDef>
|
||||
<defName>ARA_AcidSprayBurst_Queen</defName>
|
||||
@@ -221,7 +312,7 @@
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
|
||||
<needDef>Food</needDef>
|
||||
<needCost>0.5</needCost>
|
||||
<needCost>0.2</needCost>
|
||||
<failMessage>营养值不足,需要进食</failMessage>
|
||||
</li>
|
||||
</comps>
|
||||
@@ -274,7 +365,42 @@
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
|
||||
<needDef>Food</needDef>
|
||||
<needCost>0.5</needCost>
|
||||
<needCost>0.2</needCost>
|
||||
<failMessage>营养值不足,需要进食</failMessage>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef Name="LongJump">
|
||||
<defName>ARA_Skyraider_jump</defName>
|
||||
<label>高空机动</label>
|
||||
<description>使用强壮的翅膀瞬间加力,以重定位至一处新的地点。</description>
|
||||
<iconPath>UI/Abilities/Longjump</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange>
|
||||
<hostile>false</hostile>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
<charges>2</charges>
|
||||
<cooldownPerCharge>true</cooldownPerCharge>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbilityJump</verbClass>
|
||||
<label>jump</label>
|
||||
<violent>false</violent>
|
||||
<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
|
||||
<warmupTime>0</warmupTime>
|
||||
<range>150</range>
|
||||
<requireLineOfSight>true</requireLineOfSight>
|
||||
<soundCast>Longjump_Jump</soundCast>
|
||||
<soundLanding>Longjump_Land</soundLanding>
|
||||
<targetParams>
|
||||
<canTargetLocations>true</canTargetLocations>
|
||||
<canTargetPawns>false</canTargetPawns>
|
||||
<canTargetBuildings>false</canTargetBuildings>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<jobDef>CastJump</jobDef>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
|
||||
<needDef>Food</needDef>
|
||||
<needCost>0.3</needCost>
|
||||
<failMessage>营养值不足,需要进食</failMessage>
|
||||
</li>
|
||||
</comps>
|
||||
@@ -323,7 +449,7 @@
|
||||
<AbilityDef>
|
||||
<defName>ARA_Ability_Smokepop</defName>
|
||||
<label>信息素浓雾释放</label>
|
||||
<description>浓雾种将其腹部的大量释放阿拉克涅信息素烟雾,吸引附近的阿拉克涅辅虫破土而出支援虫群。形成一大片足以遮蔽虫族身形的烟雾,并防止敌方使用火焰武器点燃虫族集群。</description>
|
||||
<description>浓雾种将其腹部的大量释放阿拉克涅信息素烟雾,形成一大片足以遮蔽虫族身形的烟雾,并防止敌方使用火焰武器点燃虫族集群。这些信息素会吸引附近的阿拉克涅辅虫破土而出支援虫群,沾染信息素的目标越多(无论敌我),前来支援的虫族就越多。</description>
|
||||
<iconPath>UI/Abilities/MechSmokepop</iconPath>
|
||||
<cooldownTicksRange>6000</cooldownTicksRange>
|
||||
<targetRequired>false</targetRequired>
|
||||
@@ -367,95 +493,61 @@
|
||||
</li> -->
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
|
||||
<AbilityDef>
|
||||
<defName>ARA_TumorSpew</defName>
|
||||
<label>菌瘤释放</label>
|
||||
<description>排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动,并阻碍敌军的前进。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||
<targetRequired>false</targetRequired>
|
||||
<hostile>false</hostile>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
|
||||
<defName>ARA_Ability_TrackingCharge</defName>
|
||||
<label>蛮力冲撞</label>
|
||||
<description>阿拉克涅盾头种对目标发起蓄势冲撞,对路径上的一切造成伤害。在冲击中途经的距离越远,伤害越高。</description>
|
||||
<iconPath>UI/Commands/WarTrumpet</iconPath> <!-- Placeholder Icon -->
|
||||
<cooldownTicksRange>6000</cooldownTicksRange>
|
||||
<charges>3</charges>
|
||||
<cooldownPerCharge>true</cooldownPerCharge>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<range>13</range>
|
||||
<warmupTime>1</warmupTime>
|
||||
<soundCast>AcidSpray_Resolve</soundCast>
|
||||
<violent>false</violent>
|
||||
<targetable>false</targetable>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<verbClass>ArachnaeSwarm.Verb_CastAbilityTrackingCharge</verbClass>
|
||||
<label>追踪冲撞</label>
|
||||
<targetParams>
|
||||
<canTargetSelf>True</canTargetSelf>
|
||||
<canTargetPawns>true</canTargetPawns>
|
||||
<canTargetBuildings>false</canTargetBuildings>
|
||||
<canTargetAnimals>true</canTargetAnimals>
|
||||
<canTargetMechs>true</canTargetMechs>
|
||||
<canTargetSelf>false</canTargetSelf>
|
||||
</targetParams>
|
||||
<range>30</range>
|
||||
<warmupTime>1.0</warmupTime>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_TrackingCharge">
|
||||
<homingSpeed>1.5</homingSpeed>
|
||||
<initialDamage>15</initialDamage>
|
||||
<damagePerTile>1.5</damagePerTile>
|
||||
<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>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>ARA_Technology_1VTE</requiredResearch>
|
||||
<failMessage>需要科技 基因节点VTE-1"爆发激素" 以解锁技能</failMessage>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
|
||||
<needDef>Food</needDef>
|
||||
<needCost>1</needCost>
|
||||
<needCost>0.2</needCost>
|
||||
<failMessage>营养值不足,需要进食</failMessage>
|
||||
</li>
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_Tumor</projectileDef>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<ThingDef ParentName="ARA_EggSpew_Base_Proj">
|
||||
<defName>ARA_Proj_Tumor</defName>
|
||||
<label>阿拉克涅菌瘤</label>
|
||||
<projectile>
|
||||
<spawnsThingDef>ARA_Tumor_Smokepop</spawnsThingDef>
|
||||
</projectile>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="BuildingNaturalBase">
|
||||
<defName>ARA_Tumor_Smokepop</defName>
|
||||
<label>阿拉克涅枯萎菌瘤</label>
|
||||
<description>由少数虫族排出的特殊菌瘤,除了照明外还会在地上大范围地扩散菌毯,但是很快就会枯死。</description>
|
||||
<thingClass>Building</thingClass>
|
||||
<!-- <minifiedDef>MinifiedThing</minifiedDef> -->
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>PassThroughOnly</passability>
|
||||
<selectable>true</selectable>
|
||||
<fillPercent>0.20</fillPercent>
|
||||
<leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
|
||||
<rotatable>false</rotatable>
|
||||
<tickerType>Normal</tickerType>
|
||||
<repairEffect>EatVegetarian</repairEffect>
|
||||
<filthLeaving>Filth_Slime</filthLeaving>
|
||||
<statBases>
|
||||
<MaxHitPoints>10</MaxHitPoints>
|
||||
<Mass>4</Mass>
|
||||
<Flammability>1.0</Flammability>
|
||||
<MarketValue>50</MarketValue>
|
||||
</statBases>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_Tumor</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<drawSize>1.2</drawSize>
|
||||
<shadowData>
|
||||
<volume>(0.3, 0.6, 0.3)</volume>
|
||||
<offset>(0,0,-0.1)</offset>
|
||||
</shadowData>
|
||||
</graphicData>
|
||||
<placeWorkers>
|
||||
<li>PlaceWorker_GlowRadius</li>
|
||||
</placeWorkers>
|
||||
<comps>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>13</glowRadius>
|
||||
<glowColor>(220,210,171,0)</glowColor>
|
||||
</li>
|
||||
<li Class="CompProperties_Lifespan">
|
||||
<lifespanTicks>9000</lifespanTicks>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_DelayedTerrainSpawn">
|
||||
<terrainToSpawn>ARA_InsectCreep</terrainToSpawn>
|
||||
<spawnRadius>13</spawnRadius>
|
||||
</li>
|
||||
</comps>
|
||||
<ThingDef ParentName="PawnFlyerBase">
|
||||
<defName>ARA_Flyer_TrackingCharge</defName>
|
||||
<thingClass>ArachnaeSwarm.PawnFlyer_TrackingCharge</thingClass>
|
||||
<pawnFlyer>
|
||||
<flightSpeed>0.5</flightSpeed>
|
||||
<heightFactor>0</heightFactor>
|
||||
</pawnFlyer>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
@@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<!-- 1. Definition for the PawnFlyer itself -->
|
||||
<ThingDef ParentName="PawnFlyerBase">
|
||||
<defName>ARA_Flyer_TrackingCharge</defName>
|
||||
<thingClass>ArachnaeSwarm.PawnFlyer_TrackingCharge</thingClass>
|
||||
<pawnFlyer>
|
||||
<flightSpeed>0.5</flightSpeed>
|
||||
<heightFactor>0</heightFactor>
|
||||
</pawnFlyer>
|
||||
</ThingDef>
|
||||
|
||||
<!-- 2. The final Ability Definition -->
|
||||
<AbilityDef>
|
||||
<defName>ARA_Ability_TrackingCharge</defName>
|
||||
<label>追踪冲撞</label>
|
||||
<description>阿拉克涅盾头种对目标发起蓄势冲撞,对路径上的一切造成伤害。飞行的距离越远,伤害越高。</description>
|
||||
<iconPath>UI/Commands/WarTrumpet</iconPath> <!-- Placeholder Icon -->
|
||||
<cooldownTicksRange>600</cooldownTicksRange>
|
||||
<verbProperties>
|
||||
<verbClass>ArachnaeSwarm.Verb_CastAbilityTrackingCharge</verbClass>
|
||||
<label>追踪冲撞</label>
|
||||
<targetParams>
|
||||
<canTargetPawns>true</canTargetPawns>
|
||||
<canTargetBuildings>false</canTargetBuildings>
|
||||
<canTargetAnimals>true</canTargetAnimals>
|
||||
<canTargetMechs>true</canTargetMechs>
|
||||
<canTargetSelf>false</canTargetSelf>
|
||||
</targetParams>
|
||||
<range>30</range>
|
||||
<warmupTime>1.0</warmupTime>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_TrackingCharge">
|
||||
<homingSpeed>1.5</homingSpeed>
|
||||
<initialDamage>15</initialDamage>
|
||||
<damagePerTile>2</damagePerTile>
|
||||
<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>
|
||||
</Defs>
|
||||
89
1.6/1.6/Defs/AbilityDefs/Ability_Morph.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<!-- 变形技能的定义 -->
|
||||
<AbilityDef>
|
||||
<defName>ARA_Ability_Morph</defName>
|
||||
<label>织域形态</label>
|
||||
<description>将自己转换为一个坚固的静态建筑形态,或从建筑形态恢复。</description>
|
||||
<iconPath>UI/Commands/EggSpew</iconPath> <!-- TODO: 替换为你的图标路径 -->
|
||||
<cooldownTicksRange>6000</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<targetRequired>false</targetRequired>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<requireLineOfSight>false</requireLineOfSight>
|
||||
<nonInterruptingSelfCast>true</nonInterruptingSelfCast>
|
||||
<warmupTime>1</warmupTime>
|
||||
<range>19.9</range>
|
||||
<targetable>false</targetable>
|
||||
<targetParams>
|
||||
<canTargetSelf>True</canTargetSelf>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityTransform">
|
||||
<buildingDef>ARA_MorphableResearchBench</buildingDef>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>ARA_MorphableResearchBench</defName>
|
||||
<hasInteractionCell>true</hasInteractionCell>
|
||||
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
|
||||
<label>阿拉克涅织域织座</label>
|
||||
<description>一个供阿拉克涅虫族进行研究的活体结构,可以让虫群尽情地探索变异和进化方向。其研究能力完全取决于内部的阿拉克涅织域种。</description>
|
||||
<thingClass>ArachnaeSwarm.Building_Morphable</thingClass>
|
||||
<tickerType>Normal</tickerType>
|
||||
<size>(3,3)</size>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_ResearchBench</texPath>
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<shaderType>CutoutComplex</shaderType>
|
||||
<drawSize>(3,4.5)</drawSize>
|
||||
</graphicData>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>Impassable</passability>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<fillPercent>0.8</fillPercent>
|
||||
<staticSunShadowHeight>0</staticSunShadowHeight>
|
||||
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
|
||||
<statBases>
|
||||
<MaxHitPoints>1000</MaxHitPoints>
|
||||
<WorkToBuild>2800</WorkToBuild>
|
||||
<Flammability>1.0</Flammability>
|
||||
<ResearchSpeedFactor>1.0</ResearchSpeedFactor>
|
||||
</statBases>
|
||||
<uiOrder>2600</uiOrder>
|
||||
<surfaceType>Item</surfaceType>
|
||||
<building>
|
||||
<workTableRoomRole>Laboratory</workTableRoomRole>
|
||||
<workTableNotInRoomRoleFactor>0.8</workTableNotInRoomRoleFactor>
|
||||
<deconstructible>false</deconstructible>
|
||||
</building>
|
||||
<!-- 不可建造,只能通过变形生成 -->
|
||||
<comps Inherit="False">
|
||||
<li Class="CompProperties_ReportWorkSpeed">
|
||||
<workSpeedStat>ResearchSpeedFactor</workSpeedStat>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_Morphable">
|
||||
<restGainMultiplier>1.0</restGainMultiplier>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
|
||||
<fuelFilter>
|
||||
<categories>
|
||||
<li>Foods</li>
|
||||
</categories>
|
||||
</fuelFilter>
|
||||
<fuelCapacity>10.0</fuelCapacity>
|
||||
<targetFuelLevelConfigurable>false</targetFuelLevelConfigurable>
|
||||
<fuelGizmoLabel>营养</fuelGizmoLabel>
|
||||
<outOfFuelMessage>没有营养</outOfFuelMessage>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
</Defs>
|
||||
@@ -8,14 +8,15 @@
|
||||
<key>ARA_Flight_Attachment</key>
|
||||
<value>
|
||||
<keyframes>
|
||||
<li><graphicState>ARA_FlyEast_0</graphicState><tick>0</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_1</graphicState><tick>4</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_2</graphicState><tick>8</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_3</graphicState><tick>12</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_4</graphicState><tick>16</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_5</graphicState><tick>20</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_6</graphicState><tick>24</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_7</graphicState><tick>28</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_0</graphicState><tick>6</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_1</graphicState><tick>12</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_2</graphicState><tick>18</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_3</graphicState><tick>24</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_4</graphicState><tick>32</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_3</graphicState><tick>48</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_2</graphicState><tick>52</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_1</graphicState><tick>58</tick></li>
|
||||
<li><graphicState>ARA_FlyEast_0</graphicState><tick>60</tick></li>
|
||||
</keyframes>
|
||||
</value>
|
||||
</li>
|
||||
@@ -38,14 +39,15 @@
|
||||
<key>ARA_Flight_Attachment</key>
|
||||
<value>
|
||||
<keyframes>
|
||||
<li><graphicState>ARA_FlyNorth_0</graphicState><tick>0</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_1</graphicState><tick>4</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_2</graphicState><tick>8</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_3</graphicState><tick>12</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_4</graphicState><tick>16</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_5</graphicState><tick>20</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_6</graphicState><tick>24</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_7</graphicState><tick>28</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_0</graphicState><tick>6</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_1</graphicState><tick>12</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_2</graphicState><tick>18</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_3</graphicState><tick>24</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_4</graphicState><tick>32</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_3</graphicState><tick>48</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_2</graphicState><tick>52</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_1</graphicState><tick>58</tick></li>
|
||||
<li><graphicState>ARA_FlyNorth_0</graphicState><tick>60</tick></li>
|
||||
</keyframes>
|
||||
</value>
|
||||
</li>
|
||||
@@ -68,14 +70,15 @@
|
||||
<key>ARA_Flight_Attachment</key>
|
||||
<value>
|
||||
<keyframes>
|
||||
<li><graphicState>ARA_FlySouth_0</graphicState><tick>0</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_1</graphicState><tick>4</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_2</graphicState><tick>8</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_3</graphicState><tick>12</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_4</graphicState><tick>16</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_5</graphicState><tick>20</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_6</graphicState><tick>24</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_7</graphicState><tick>28</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_0</graphicState><tick>6</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_1</graphicState><tick>12</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_2</graphicState><tick>18</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_3</graphicState><tick>24</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_4</graphicState><tick>32</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_3</graphicState><tick>48</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_2</graphicState><tick>52</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_1</graphicState><tick>58</tick></li>
|
||||
<li><graphicState>ARA_FlySouth_0</graphicState><tick>60</tick></li>
|
||||
</keyframes>
|
||||
</value>
|
||||
</li>
|
||||
|
||||
@@ -275,4 +275,32 @@
|
||||
<li>ArachnaeNode_spawnCategories_Facehugger</li>
|
||||
</spawnCategories>
|
||||
</AlienRace.AlienBackstoryDef>
|
||||
|
||||
<AlienRace.AlienBackstoryDef ParentName="ARA_BaseBackStory">
|
||||
<defName>Arachnae_Node_BS_Adult_NeuroSwarm</defName>
|
||||
<title>阿拉克涅织域种</title>
|
||||
<titleShort>织域种</titleShort>
|
||||
<description>[PAWN_nameDef]是一只阿拉克涅织域种督虫。织域种虽然受到女皇种监管,但仍然具有强大的高级智慧和自我意志,织域种之间能够构建一种高度互联的神经网络从而进行复杂的研究和计算工作,织域种进行计算工作时无法感知外界环境,因此她们是虫群的重要保护对象。</description>
|
||||
<slot>Adulthood</slot>
|
||||
<workDisables>
|
||||
<li>Cleaning</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>Caring</li>
|
||||
<!-- <li>Artistic</li> -->
|
||||
</workDisables>
|
||||
<skillGains>
|
||||
<Intellectual>10</Intellectual>
|
||||
</skillGains>
|
||||
|
||||
<spawnCategories>
|
||||
<li>ArachnaeNode_spawnCategories_NeuroSwarm</li>
|
||||
</spawnCategories>
|
||||
</AlienRace.AlienBackstoryDef>
|
||||
</Defs>
|
||||
@@ -286,5 +286,42 @@
|
||||
<FacialAnimation.SkinTypeDef ParentName="ArachnaeNode_Skin" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Smokepop_SkinNormal</defName>
|
||||
<raceName>ArachnaeNode_Race_Smokepop</raceName>
|
||||
</FacialAnimation.SkinTypeDef>
|
||||
|
||||
<FacialAnimation.BrowTypeDef ParentName="ArachnaeNode_Brow" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_BrowNormal</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.BrowTypeDef>
|
||||
<FacialAnimation.EyeballTypeDef ParentName="ArachnaeNode_EyeA" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_EyeNormal</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.EyeballTypeDef>
|
||||
<FacialAnimation.EyeballTypeDef ParentName="ArachnaeNode_EyeB" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_EyeNormal2</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.EyeballTypeDef>
|
||||
<FacialAnimation.EyeballTypeDef ParentName="ArachnaeNode_EyeC" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_EyeNormal3</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.EyeballTypeDef>
|
||||
<FacialAnimation.EyeballTypeDef ParentName="ArachnaeNode_EyeD" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_EyeNormal4</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.EyeballTypeDef>
|
||||
<FacialAnimation.HeadTypeDef ParentName="ArachnaeNode_Head" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_HeadNormal</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.HeadTypeDef>
|
||||
<FacialAnimation.LidTypeDef ParentName="ArachnaeNode_Lid" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_LidNormal</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.LidTypeDef>
|
||||
<FacialAnimation.MouthTypeDef ParentName="ArachnaeNode_Mouth" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_MouthNormal</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.MouthTypeDef>
|
||||
<FacialAnimation.SkinTypeDef ParentName="ArachnaeNode_Skin" MayRequire="Nals.FacialAnimation">
|
||||
<defName>ArachnaeNode_Race_Skyraider_SkinNormal</defName>
|
||||
<raceName>ArachnaeNode_Race_Skyraider</raceName>
|
||||
</FacialAnimation.SkinTypeDef>
|
||||
</Defs>
|
||||
@@ -2,33 +2,33 @@
|
||||
<Defs>
|
||||
|
||||
<!-- North Frames -->
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_0</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_1_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_1</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_2_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_2</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_3_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_3</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_4_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_4</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_5_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_5</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_6_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_0</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_1_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_1</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_2_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_2</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_3_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_3</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_4_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_4</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_5_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<!-- <GraphicStateDef><defName>ARA_FlyNorth_5</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_6_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_6</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_7_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_7</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_8_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyNorth_7</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_8_north</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef> -->
|
||||
|
||||
<!-- East Frames -->
|
||||
<GraphicStateDef><defName>ARA_FlyEast_0</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_1_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_1</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_2_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_2</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_3_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_3</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_4_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_4</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_5_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_5</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_6_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_0</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_1_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_1</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_2_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_2</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_3_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_3</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_4_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_4</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_5_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<!-- <GraphicStateDef><defName>ARA_FlyEast_5</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_6_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_6</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_7_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_7</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_8_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlyEast_7</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_8_east</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef> -->
|
||||
|
||||
<!-- South Frames -->
|
||||
<GraphicStateDef><defName>ARA_FlySouth_0</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_1_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_1</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_2_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_2</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_3_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_3</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_4_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_4</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_5_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_5</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_6_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_0</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_1_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_1</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_2_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_2</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_3_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_3</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_4_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_4</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_5_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<!-- <GraphicStateDef><defName>ARA_FlySouth_5</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_6_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_6</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_7_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_7</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_8_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef>
|
||||
<GraphicStateDef><defName>ARA_FlySouth_7</defName><defaultGraphicData><graphicClass>Graphic_Single</graphicClass><texPath>Things/Pawn/Animal/Goose/Goose_Flying_8_south</texPath><drawSize>1.35</drawSize></defaultGraphicData></GraphicStateDef> -->
|
||||
|
||||
</Defs>
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<stages>
|
||||
<li>
|
||||
<label>潜伏期</label>
|
||||
<label>休眠期</label>
|
||||
<becomeVisible>false</becomeVisible>
|
||||
<vomitMtbDays>5</vomitMtbDays>
|
||||
</li>
|
||||
@@ -28,6 +28,7 @@
|
||||
<minSeverity>0.5</minSeverity>
|
||||
<vomitMtbDays>1</vomitMtbDays>
|
||||
<painFactor>0.5</painFactor>
|
||||
<totalBleedFactor>0.9</totalBleedFactor>
|
||||
<becomeVisible>false</becomeVisible>
|
||||
<capMods>
|
||||
<li>
|
||||
@@ -39,18 +40,33 @@
|
||||
<li>
|
||||
<label>终末期</label>
|
||||
<minSeverity>0.7</minSeverity>
|
||||
<deathMtbDays>0.5</deathMtbDays>
|
||||
<painFactor>0</painFactor>
|
||||
<lifeThreatening>true</lifeThreatening>
|
||||
<totalBleedFactor>0.3</totalBleedFactor>
|
||||
<becomeVisible>true</becomeVisible>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Talking</capacity>
|
||||
<postFactor>0</postFactor>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>BloodFiltration</capacity>
|
||||
<offset>0.45</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>BloodPumping</capacity>
|
||||
<offset>0.1</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>Metabolism</capacity>
|
||||
<offset>0.1</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>Breathing</capacity>
|
||||
<offset>0.1</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<postFactor>0.7</postFactor>
|
||||
<offset>-0.1</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
<regeneration>50</regeneration>
|
||||
@@ -58,8 +74,8 @@
|
||||
<li>
|
||||
<label>即将转化</label>
|
||||
<minSeverity>0.9</minSeverity>
|
||||
<deathMtbDays>0.5</deathMtbDays>
|
||||
<painFactor>2.0</painFactor>
|
||||
<painFactor>0</painFactor>
|
||||
<totalBleedFactor>0.3</totalBleedFactor>
|
||||
<lifeThreatening>true</lifeThreatening>
|
||||
<becomeVisible>true</becomeVisible>
|
||||
<capMods>
|
||||
@@ -67,6 +83,22 @@
|
||||
<capacity>Talking</capacity>
|
||||
<postFactor>0</postFactor>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>BloodFiltration</capacity>
|
||||
<offset>0.45</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>BloodPumping</capacity>
|
||||
<offset>0.1</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>Metabolism</capacity>
|
||||
<offset>0.1</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>Breathing</capacity>
|
||||
<offset>0.1</offset>
|
||||
</li>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<setMax>0.1</setMax>
|
||||
@@ -90,11 +122,18 @@
|
||||
<showRemainingTime>true</showRemainingTime>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.HediffCompProperties_NecroticTransformation">
|
||||
<!-- 3. 在这里指定你希望转化成的MutantDef的defName -->
|
||||
<!-- 例如: Shambler, Ghoul, 或者您自己定义的其他变异体 -->
|
||||
<mutantDef>ARA_MimicNematodeShambler</mutantDef>
|
||||
<triggerSeverity>0.7</triggerSeverity>
|
||||
</li>
|
||||
|
||||
<!-- ==================== 新增的共生组件 ==================== -->
|
||||
<li Class="ArachnaeSwarm.HediffCompProperties_Symbiosis">
|
||||
<!-- "钥匙": 只有当Pawn拥有这个Hediff时,共生效果才会激活 -->
|
||||
<requiredHediff>ARA_SymbioticStabilizer</requiredHediff>
|
||||
|
||||
<!-- "新的上限": 在共生状态下,此Hediff的严重性最高只能达到0.8 -->
|
||||
<newMaxSeverity>0.8</newMaxSeverity>
|
||||
</li>
|
||||
<li Class="HediffCompProperties_DisappearsOnDeath" />
|
||||
</comps>
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
<forceNormalGearQuality>true</forceNormalGearQuality>
|
||||
<initialWillRange>99~99</initialWillRange>
|
||||
<initialResistanceRange>99~99</initialResistanceRange>
|
||||
<maxGenerationAge>30</maxGenerationAge>
|
||||
<minGenerationAge>10</minGenerationAge>
|
||||
<maxGenerationAge>0</maxGenerationAge>
|
||||
<minGenerationAge>0</minGenerationAge>
|
||||
<canBeScattered>false</canBeScattered>
|
||||
<xenotypeSet>
|
||||
<xenotypeChances>
|
||||
@@ -234,7 +234,7 @@
|
||||
<race>ArachnaeNode_Race_Skyraider</race>
|
||||
<defaultFactionType>PlayerColony</defaultFactionType>
|
||||
<invNutrition>0</invNutrition>
|
||||
<flyingAnimationFramePathPrefix>Things/Pawn/Animal/Goose/Goose_Flying_</flyingAnimationFramePathPrefix>
|
||||
<flyingAnimationFramePathPrefix>ArachnaeSwarm/Things/ARA_HiveNode/Addons/Flying/ArachnaeNode_Race_Addons_Skyraider_Wing_</flyingAnimationFramePathPrefix>
|
||||
<flyingAnimationDrawSize>1.35</flyingAnimationDrawSize>
|
||||
<flyingAnimationFrameCount>2</flyingAnimationFrameCount>
|
||||
<flyingAnimationTicksPerFrame>2</flyingAnimationTicksPerFrame>
|
||||
@@ -249,13 +249,34 @@
|
||||
</backstoryFiltersOverride>
|
||||
<abilities>
|
||||
<li>ARA_BaseRace_Skyhive_Launcher</li>
|
||||
</abilities>
|
||||
<abilities>
|
||||
<li>ARA_Skyraider_jump</li>
|
||||
</abilities>
|
||||
<apparelTags>
|
||||
</apparelTags>
|
||||
<apparelMoney>0</apparelMoney>
|
||||
</PawnKindDef>
|
||||
<PawnKindDef ParentName="ArachnaeNodeABasePawnKind">
|
||||
<defName>ArachnaeNode_Race_NeuroSwarm</defName>
|
||||
<label>阿拉克涅织域种</label>
|
||||
<race>ArachnaeNode_Race_NeuroSwarm</race>
|
||||
<defaultFactionType>PlayerColony</defaultFactionType>
|
||||
<invNutrition>0</invNutrition>
|
||||
<backstoryFiltersOverride>
|
||||
<li>
|
||||
<categories>
|
||||
<li>ArachnaeNode_spawnCategoriesA</li>
|
||||
<li>ArachnaeNode_spawnCategories_NeuroSwarm</li>
|
||||
</categories>
|
||||
</li>
|
||||
</backstoryFiltersOverride>
|
||||
<abilities>
|
||||
<li>ARA_Ability_Morph</li>
|
||||
</abilities>
|
||||
<apparelTags>
|
||||
</apparelTags>
|
||||
<apparelMoney>0</apparelMoney>
|
||||
</PawnKindDef>
|
||||
|
||||
|
||||
<PawnKindDef Name="ARA_InsectKindBase" ParentName="AnimalKindBase" Abstract="True">
|
||||
<defaultFactionType>PlayerColony</defaultFactionType>
|
||||
@@ -264,6 +285,8 @@
|
||||
<forceNoDeathNotification>true</forceNoDeathNotification>
|
||||
<combatPower>75</combatPower>
|
||||
<ecoSystemWeight>0</ecoSystemWeight>
|
||||
<maxGenerationAge>0</maxGenerationAge>
|
||||
<minGenerationAge>0</minGenerationAge>
|
||||
<moveSpeedFactorByTerrainTag>
|
||||
<li>
|
||||
<key>ARA_Creep</key>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<li> <!-- 使用默认的 PawnRenderNodeProperties -->
|
||||
<debugLabel>Wings (Hides when flying)</debugLabel>
|
||||
<workerClass>ArachnaeSwarm.PawnRenderNodeWorker_AttachmentBody_NoFlight</workerClass>
|
||||
<texPath>ArachnaeSwarm/Things/General/Invisible/Inv</texPath>
|
||||
<texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Skyraider_Wing</texPath>
|
||||
<baseLayer>60</baseLayer>
|
||||
<drawData>
|
||||
<dataSouth>
|
||||
|
||||
@@ -126,6 +126,18 @@
|
||||
<li>ARA_Base_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="ARA_techBase">
|
||||
<defName>ARA_Technology_1VTE</defName>
|
||||
<label>基因节点VTE-1"爆发激素"</label>
|
||||
<description>允许一部分拥有厚重甲壳的阿拉克涅督虫使用追踪冲撞攻击敌军。</description>
|
||||
<baseCost>150</baseCost>
|
||||
<researchViewX>1.00</researchViewX>
|
||||
<researchViewY>5.10</researchViewY>
|
||||
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
|
||||
<prerequisites>
|
||||
<li>ARA_Technology_4DIL</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<!-- 毒类发展 -->
|
||||
<ResearchProjectDef ParentName="ARA_techBase">
|
||||
<defName>ARA_Technology_5PAV</defName>
|
||||
|
||||
@@ -166,4 +166,4 @@
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
</Defs>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<ThingDef ParentName="AnimalThingBase" Name="ARA_BaseDroneSwarm" Abstract="True">
|
||||
<statBases>
|
||||
<MarketValue>1200</MarketValue>
|
||||
@@ -39,7 +38,6 @@
|
||||
<killedLeavings>
|
||||
</killedLeavings>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="ARA_BaseDroneSwarm">
|
||||
<defName>ArachnaeBase_Race_Acid</defName>
|
||||
<label>阿拉克涅酸噬种</label>
|
||||
@@ -84,11 +82,10 @@
|
||||
</li>
|
||||
</tools>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="ARA_BaseDroneSwarm">
|
||||
<defName>ArachnaeBase_Race_Skyhive</defName>
|
||||
<label>阿拉克涅天巢种</label>
|
||||
<description>阿拉克涅辅虫之一,智力低下,一般被作为活体炮弹打出,击中敌人后若是还没散架,就会继续依靠带酸液的颚撕咬敌军。</description>
|
||||
<description>阿拉克涅辅虫之一,智力低下,通常被督虫们当成导弹打出,拥有在飞行中调整姿态以追踪敌军的能力。命中敌军后,这些虫族会趴在敌军身上进行啃咬,直到鳌刺松动而掉在地上。</description>
|
||||
<race>
|
||||
<flightStartChanceOnJobStart>1.0</flightStartChanceOnJobStart>
|
||||
<thinkTreeConstant>WarUrchinConstant</thinkTreeConstant>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Defs>
|
||||
|
||||
<MutantDef ParentName="BaseMutantEntity">
|
||||
<MutantDef ParentName="BaseMutantEntity">
|
||||
<defName>ARA_MimicNematodeShambler</defName>
|
||||
<label>阿拉克涅拟线种寄生体</label>
|
||||
<description>阿拉克涅拟线种是虫群中最神秘的分支之一。它们与原虫种同源,但在进化之路上并未发展出高级智慧,而是走向了一条截然不同的道路:寄生。拟线种是无法脱离宿主独立存活的寄生虫。一旦寄生于生物体内,它们会长期潜伏,最终逐步接管宿主的神经与代谢系统,将其变为受其操控的行尸走肉——“寄生体”。得益于超凡的细胞复制与再生能力,拟线种能够模仿并替代宿主的细胞结构,这使得寄生体拥有了惊人的自我修复能力。然而,这种寄生关系也极具侵略性:拟线种的虫卵遍布寄生体体表,任何被寄生体攻击的生物都有可能被感染,最终沦为新的寄生体。尽管拟线虫将寄生体的新陈代谢维持在极低水平,但寄生体本身并不会主动觅食。因此,当能量耗尽后,它们终将迎来“死亡”。</description>
|
||||
<hediff>ARA_MimicNematodeShambler</hediff>
|
||||
<thinkTree>Shambler</thinkTree>
|
||||
<thinkTree>ARA_WorkingShambler</thinkTree>
|
||||
<thinkTreeConstant>ShamblerConstant</thinkTreeConstant>
|
||||
<hideLabel>true</hideLabel>
|
||||
<namePrefix>拟线种寄生体 </namePrefix>
|
||||
@@ -25,10 +25,10 @@
|
||||
<clearMutantStatusOnDeath>true</clearMutantStatusOnDeath>
|
||||
<canTravelInCaravan>false</canTravelInCaravan>
|
||||
<canAttackWhileCrawling>true</canAttackWhileCrawling>
|
||||
<respectsAllowedArea>false</respectsAllowedArea>
|
||||
<respectsAllowedArea>true</respectsAllowedArea>
|
||||
<disableFlying>true</disableFlying>
|
||||
<canGainXP>false</canGainXP>
|
||||
<canBeDrafted>false</canBeDrafted>
|
||||
<canBeDrafted>true</canBeDrafted>
|
||||
<disableHostilityResponse>true</disableHostilityResponse>
|
||||
<deathOnDownedChance>0.25</deathOnDownedChance>
|
||||
<woundColor>(0.3, 0.3, 0.0, 1.0)</woundColor>
|
||||
@@ -44,6 +44,19 @@
|
||||
<removesHediffs>
|
||||
<li>ARA_MimicNematode</li>
|
||||
</removesHediffs>
|
||||
<workDisables Inherit="false">
|
||||
<li>ManualSkilled</li>
|
||||
<li>Intellectual</li>
|
||||
<li>Artistic</li>
|
||||
<li>Caring</li>
|
||||
<li>Social</li>
|
||||
<li>PlantWork</li>
|
||||
<li>Mining</li>
|
||||
<li>Hunting</li>
|
||||
<li>Constructing</li>
|
||||
<li>Cooking</li>
|
||||
<li>Shooting</li>
|
||||
</workDisables>
|
||||
<!-- Rendering -->
|
||||
<renderNodeProperties>
|
||||
<li Class="PawnRenderNodeProperties_Overlay">
|
||||
|
||||
@@ -327,6 +327,8 @@
|
||||
<li>ARA_RW_Basic_Acid_Bladder_Gun</li>
|
||||
<li>ARA_RW_Basic_Fist_Needle_Gun</li>
|
||||
<li>ARA_MW_Bone_Sword</li>
|
||||
<li>ARA_RW_Basic_SkyHive_Gun</li>
|
||||
<li>ARA_RW_Toxic_Needle_MG</li>
|
||||
</weaponList>
|
||||
<onlyUseRaceRestrictedWeapons>true</onlyUseRaceRestrictedWeapons>
|
||||
<!-- 可以穿戴的衣服 -->
|
||||
@@ -481,8 +483,8 @@
|
||||
|
||||
<!-- <RestRateMultiplier>1</RestRateMultiplier> -->
|
||||
<!-- <HungerRateMultiplier>1</HungerRateMultiplier> -->
|
||||
<MaxNutrition>1.05</MaxNutrition>
|
||||
<EatingSpeed>2</EatingSpeed>
|
||||
<MaxNutrition>0.5</MaxNutrition>
|
||||
|
||||
<CarryingCapacity>50</CarryingCapacity>
|
||||
<MeatAmount>150</MeatAmount>
|
||||
@@ -572,7 +574,7 @@
|
||||
<soundMeleeMiss>Pawn_Melee_BigBash_Miss</soundMeleeMiss>
|
||||
<canFlyInVacuum>false</canFlyInVacuum>
|
||||
<!-- 身形大小,略大于常规人类 -->
|
||||
<baseBodySize>2</baseBodySize>
|
||||
<baseBodySize>1</baseBodySize>
|
||||
</race>
|
||||
|
||||
<!-- 工具设置(攻击方式) -->
|
||||
@@ -648,12 +650,17 @@
|
||||
<raceRestriction>
|
||||
<!-- 武器列表 -->
|
||||
<weaponList>
|
||||
<li>ARA_RW_Acid_Mortar</li>
|
||||
</weaponList>
|
||||
</raceRestriction>
|
||||
</alienRace>
|
||||
|
||||
<statBases>
|
||||
<MaxNutrition>0.34</MaxNutrition>
|
||||
</statBases>
|
||||
|
||||
<race>
|
||||
<baseBodySize>2.5</baseBodySize>
|
||||
<baseBodySize>3</baseBodySize>
|
||||
<baseHealthScale>4</baseHealthScale>
|
||||
<lifeExpectancy>10</lifeExpectancy>
|
||||
</race>
|
||||
@@ -746,8 +753,6 @@
|
||||
<foodType>OmnivoreHuman,CarnivoreAnimal,OvivoreAnimal,VegetarianRoughAnimal</foodType>
|
||||
<!-- 身体类型 -->
|
||||
<body>ArachnaeMyrmecocystus_Body</body>
|
||||
<!-- 身形大小 -->
|
||||
<baseBodySize>2.5</baseBodySize>
|
||||
<!-- 血量上限 -->
|
||||
<baseHealthScale>3</baseHealthScale>
|
||||
<!-- 蜜罐虫的寿命很低 -->
|
||||
@@ -858,9 +863,11 @@
|
||||
<!-- <TradePriceImprovement>0.5</TradePriceImprovement> -->
|
||||
|
||||
<!-- 自带的甲壳可以防御外部攻击 -->
|
||||
<ArmorRating_Blunt>1</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>1.25</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>1</ArmorRating_Heat>
|
||||
<ArmorRating_Blunt>0.75</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>1</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>0.5</ArmorRating_Heat>
|
||||
|
||||
<MaxNutrition>0.51</MaxNutrition>
|
||||
</statBases>
|
||||
|
||||
<race>
|
||||
@@ -871,7 +878,7 @@
|
||||
<!-- 血量上限 -->
|
||||
<baseHealthScale>5</baseHealthScale>
|
||||
<!-- 蜜罐虫的寿命很低 -->
|
||||
<lifeExpectancy>2</lifeExpectancy>
|
||||
<lifeExpectancy>1</lifeExpectancy>
|
||||
</race>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
@@ -948,6 +955,8 @@
|
||||
<ArmorRating_Blunt>0.1</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>0.1</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>0.05</ArmorRating_Heat>
|
||||
|
||||
<MaxNutrition>1.26</MaxNutrition>
|
||||
</statBases>
|
||||
|
||||
<race>
|
||||
@@ -996,7 +1005,7 @@
|
||||
<!-- 基础属性设置 -->
|
||||
<statBases>
|
||||
<!-- 移动速度 -->
|
||||
<MoveSpeed>4.5</MoveSpeed>
|
||||
<MoveSpeed>5</MoveSpeed>
|
||||
|
||||
<!-- <RestRateMultiplier>1</RestRateMultiplier> -->
|
||||
<!-- <HungerRateMultiplier>1</HungerRateMultiplier> -->
|
||||
@@ -1019,6 +1028,8 @@
|
||||
<ArmorRating_Blunt>0.4</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>0.4</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>0.3</ArmorRating_Heat>
|
||||
|
||||
<MaxNutrition>1.26</MaxNutrition>
|
||||
</statBases>
|
||||
|
||||
<tools>
|
||||
@@ -1038,9 +1049,9 @@
|
||||
<race>
|
||||
<!-- 身体类型 -->
|
||||
<body>ArachnaeFighter_Body</body>
|
||||
<baseBodySize>0.85</baseBodySize>
|
||||
<baseBodySize>0.8</baseBodySize>
|
||||
<baseHealthScale>2</baseHealthScale>
|
||||
<lifeExpectancy>5</lifeExpectancy>
|
||||
<lifeExpectancy>2</lifeExpectancy>
|
||||
</race>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
@@ -1079,11 +1090,12 @@
|
||||
<statBases>
|
||||
<MoveSpeed>5</MoveSpeed>
|
||||
<EatingSpeed>5</EatingSpeed>
|
||||
<MaxNutrition>1</MaxNutrition>
|
||||
<CarryingCapacity>100</CarryingCapacity>
|
||||
<MeatAmount>20</MeatAmount>
|
||||
<LeatherAmount>5</LeatherAmount>
|
||||
<MeleeDodgeChance>1.5</MeleeDodgeChance>
|
||||
|
||||
<MaxNutrition>2</MaxNutrition>
|
||||
</statBases>
|
||||
|
||||
<race>
|
||||
@@ -1105,7 +1117,7 @@
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase_Huge">
|
||||
<defName>ArachnaeNode_Race_Smokepop</defName>
|
||||
<label>阿拉克涅浓雾种</label>
|
||||
<description>阿拉克涅督虫之一,身披厚重甲壳的大型虫族,拥有在大范围内喷射烟雾、阻燃物和铺设菌毯的能力,虽然移动速度比较慢,但是在战斗中就如同装甲车一样难以撼动。\n\n她可以进行搬运和医护工作,拥有不错的战斗技能,防御力和伤害耐受能力强大。\n\n作为督虫,她可以繁育并监管大量阿拉克涅家政种辅虫,以协助巢穴进行清洁和搬运工作。</description>
|
||||
<description>阿拉克涅督虫之一,身披厚重甲壳的大型虫族,拥有在大范围内喷射信息素以召唤辅虫虫群能力,虽然移动速度比较慢,但是在战斗中就如同装甲车一样难以撼动。\n\n她可以进行搬运和医护工作,拥有不错的战斗技能,防御力和伤害耐受能力强大。\n\n作为督虫,她可以繁育并监管大量阿拉克涅家政种辅虫,以协助巢穴进行清洁和搬运工作。</description>
|
||||
<alienRace>
|
||||
<generalSettings>
|
||||
<!-- 各种零件定义 -->
|
||||
@@ -1180,23 +1192,23 @@
|
||||
<!-- <TradePriceImprovement>0.5</TradePriceImprovement> -->
|
||||
|
||||
<!-- 自带的甲壳可以防御外部攻击 -->
|
||||
<ArmorRating_Blunt>0.85</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>0.85</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>0.6</ArmorRating_Heat>
|
||||
<ArmorRating_Blunt>1</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>1.2</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>0.75</ArmorRating_Heat>
|
||||
|
||||
</statBases>
|
||||
|
||||
<race>
|
||||
<!-- 身体类型 -->
|
||||
<body>ArachnaeFighter_Body</body>
|
||||
<baseBodySize>2.5</baseBodySize>
|
||||
<baseHealthScale>4</baseHealthScale>
|
||||
<lifeExpectancy>10</lifeExpectancy>
|
||||
<lifeExpectancy>5</lifeExpectancy>
|
||||
</race>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
<defName>ArachnaeNode_Race_Skyraider</defName>
|
||||
<label>阿拉克涅空天种</label>
|
||||
<description>阿拉克涅督虫之一,众督虫中的精锐,进化出了强大的飞行能力,是巢穴中无可争议的空中霸主。\n\n她可以进行搬运工作,拥有不错的战斗技能,非常灵活。\n\n作为为数不多拥有飞行能力的虫族,她可以从空中掠袭猎物并将其带至千米高空之上俯冲投下,只留其余猎物在地面无助的挣扎。</description>
|
||||
<description>阿拉克涅督虫之一,众督虫中的精锐,虽然身材娇小但是拥有引以为傲的强大飞行能力,是巢穴中无可争议的空中霸主。\n\n她可以进行搬运工作,拥有不错的战斗技能,在战场上行动时非常灵活。\n\n作为督虫,她可以向敌人发射天巢种辅虫,这种辅虫会自动修正姿态追踪敌军,并在命中后对敌人进行持续啃咬。</description>
|
||||
<alienRace>
|
||||
<generalSettings>
|
||||
<!-- 各种零件定义 -->
|
||||
@@ -1204,12 +1216,7 @@
|
||||
<!-- 额外身体部件 -->
|
||||
<bodyAddons>
|
||||
<li>
|
||||
<path>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Claw</path>
|
||||
<inFrontOfBody>true</inFrontOfBody>
|
||||
<scaleWithPawnDrawsize>true</scaleWithPawnDrawsize>
|
||||
</li>
|
||||
<li>
|
||||
<path>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Tail</path>
|
||||
<path>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Skyraider_Tail</path>
|
||||
<inFrontOfBody>false</inFrontOfBody>
|
||||
<scaleWithPawnDrawsize>true</scaleWithPawnDrawsize>
|
||||
<offsets>
|
||||
@@ -1244,7 +1251,7 @@
|
||||
<!-- 基础属性设置 -->
|
||||
<statBases>
|
||||
<!-- 移动速度 -->
|
||||
<MoveSpeed>4.5</MoveSpeed>
|
||||
<MoveSpeed>4</MoveSpeed>
|
||||
|
||||
<MaxFlightTime>9999</MaxFlightTime>
|
||||
<FlightCooldown>0</FlightCooldown>
|
||||
@@ -1252,14 +1259,12 @@
|
||||
<!-- <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>
|
||||
<MeleeDodgeChance>1.5</MeleeDodgeChance>
|
||||
|
||||
<!-- <NegotiationAbility>1</NegotiationAbility> -->
|
||||
<!-- <SellPriceFactor>1</SellPriceFactor> -->
|
||||
@@ -1267,32 +1272,89 @@
|
||||
<!-- <TradePriceImprovement>0.5</TradePriceImprovement> -->
|
||||
|
||||
<!-- 自带的甲壳可以防御外部攻击 -->
|
||||
<ArmorRating_Blunt>0.4</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>0.4</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>0.3</ArmorRating_Heat>
|
||||
</statBases>
|
||||
<ArmorRating_Blunt>0.3</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>0.2</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>0.2</ArmorRating_Heat>
|
||||
|
||||
<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>
|
||||
<MaxNutrition>1.26</MaxNutrition>
|
||||
</statBases>
|
||||
|
||||
<race>
|
||||
<!-- 身体类型 -->
|
||||
<body>ArachnaeFighter_Body</body>
|
||||
<renderTree>ARA_ArachnaeRenderTree</renderTree>
|
||||
<flightStartChanceOnJobStart>1.0</flightStartChanceOnJobStart>
|
||||
<baseBodySize>0.85</baseBodySize>
|
||||
<baseHealthScale>2</baseHealthScale>
|
||||
<baseBodySize>0.8</baseBodySize>
|
||||
<baseHealthScale>1.5</baseHealthScale>
|
||||
<lifeExpectancy>5</lifeExpectancy>
|
||||
</race>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
|
||||
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
|
||||
<defName>ArachnaeNode_Race_NeuroSwarm</defName>
|
||||
<label>阿拉克涅织域种</label>
|
||||
<description>阿拉克涅督虫之一,是阿拉克涅虫群中最为特殊的虫族,织域种虽然受到女皇种监管,但仍然具有强大的高级智慧和自我意志,织域种之间能够构建一种高度互联的神经网络从而进行复杂的研究和计算工作,织域种进行计算工作时无法感知外界环境,因此她们是虫群的重要保护对象。</description>
|
||||
<alienRace>
|
||||
<generalSettings>
|
||||
<!-- 各种零件定义 -->
|
||||
<alienPartGenerator>
|
||||
<!-- 额外身体部件 -->
|
||||
<bodyAddons>
|
||||
<li>
|
||||
<path>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_WeaponSmith</path>
|
||||
<inFrontOfBody>false</inFrontOfBody>
|
||||
<scaleWithPawnDrawsize>true</scaleWithPawnDrawsize>
|
||||
<offsets>
|
||||
<north>
|
||||
<layerOffset>-0.275</layerOffset>
|
||||
</north>
|
||||
</offsets>
|
||||
</li>
|
||||
</bodyAddons>
|
||||
</alienPartGenerator>
|
||||
</generalSettings>
|
||||
<raceRestriction>
|
||||
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
|
||||
</raceRestriction>
|
||||
</alienRace>
|
||||
<comps>
|
||||
</comps>
|
||||
|
||||
<!-- 基础属性设置 -->
|
||||
<statBases>
|
||||
<!-- 移动速度 -->
|
||||
<MoveSpeed>3.5</MoveSpeed>
|
||||
|
||||
<!-- <RestRateMultiplier>1</RestRateMultiplier> -->
|
||||
<!-- <HungerRateMultiplier>1</HungerRateMultiplier> -->
|
||||
<!-- <EatingSpeed>5</EatingSpeed> -->
|
||||
<MaxNutrition>2</MaxNutrition>
|
||||
|
||||
<CarryingCapacity>100</CarryingCapacity>
|
||||
<MeatAmount>40</MeatAmount>
|
||||
<LeatherAmount>10</LeatherAmount>
|
||||
|
||||
<MeleeDodgeChance>0.75</MeleeDodgeChance>
|
||||
<!-- <MeleeHitChance>1</MeleeHitChance> -->
|
||||
|
||||
<!-- <NegotiationAbility>1</NegotiationAbility> -->
|
||||
<!-- <SellPriceFactor>1</SellPriceFactor> -->
|
||||
<!-- <SocialImpact>1</SocialImpact> -->
|
||||
<!-- <TradePriceImprovement>0.5</TradePriceImprovement> -->
|
||||
|
||||
<!-- 自带的甲壳可以防御外部攻击 -->
|
||||
<ArmorRating_Blunt>0.1</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>0.1</ArmorRating_Sharp>
|
||||
<ArmorRating_Heat>0.05</ArmorRating_Heat>
|
||||
|
||||
<MaxNutrition>1.26</MaxNutrition>
|
||||
</statBases>
|
||||
|
||||
<race>
|
||||
<!-- 身体类型 -->
|
||||
<body>ArachnaeWeaponSmith_Body</body>
|
||||
<baseBodySize>0.8</baseBodySize>
|
||||
<baseHealthScale>0.75</baseHealthScale>
|
||||
<lifeExpectancy>5</lifeExpectancy>
|
||||
</race>
|
||||
</AlienRace.ThingDef_AlienRace>
|
||||
|
||||
168
1.6/1.6/Defs/Thing_Misc/ARA_Drugs.xml
Normal file
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<!-- ==================== 1. 物品定义:阿拉克涅信息素溶剂 ==================== -->
|
||||
|
||||
<ThingDef ParentName="MakeableDrugPillBase">
|
||||
<defName>ARA_PheromoneSolvent</defName>
|
||||
<label>阿拉克涅信息素溶剂</label>
|
||||
<description>一种合成的化学制剂,能够模拟阿拉克涅虫群内部用于区分敌我的信息素。定期注射可以欺骗宿主体内的寄生虫,使其进入休眠的共生状态,从而抑制其致命的增殖行为。</description>
|
||||
<descriptionHyperlinks>
|
||||
<HediffDef>ARA_SymbioticStabilizer</HediffDef>
|
||||
<HediffDef>ARA_MimicNematode</HediffDef>
|
||||
</descriptionHyperlinks>
|
||||
<graphicData>
|
||||
<texPath>Things/Item/Drug/WakeUp</texPath> <!-- 暂时使用WakeUp的贴图,可后续替换 -->
|
||||
<graphicClass>Graphic_StackCount</graphicClass>
|
||||
<color>(1.0, 0.647, 0.0, 0.5)</color> <!-- 橙色 -->
|
||||
</graphicData>
|
||||
<rotatable>false</rotatable>
|
||||
<statBases>
|
||||
<WorkToMake>1000</WorkToMake>
|
||||
<MarketValue>50</MarketValue>
|
||||
<Mass>0.01</Mass>
|
||||
</statBases>
|
||||
<techLevel>Industrial</techLevel>
|
||||
<ingestible>
|
||||
<drugCategory>Medical</drugCategory> <!-- 定义为医疗品,而非娱乐品 -->
|
||||
<outcomeDoers>
|
||||
<li Class="IngestionOutcomeDoer_GiveHediff">
|
||||
<hediffDef>ARA_SymbioticStabilizer</hediffDef>
|
||||
<severity>1.0</severity> <!-- 每次服用直接将效果补满 -->
|
||||
</li>
|
||||
</outcomeDoers>
|
||||
</ingestible>
|
||||
<recipeMaker>
|
||||
<researchPrerequisite>MedicineProduction</researchPrerequisite> <!-- 假设需要基础制药解锁 -->
|
||||
<recipeUsers>
|
||||
<li>DrugLab</li>
|
||||
</recipeUsers>
|
||||
</recipeMaker>
|
||||
<costList>
|
||||
<Neutroamine>2</Neutroamine>
|
||||
<ARA_InsectJelly>5</ARA_InsectJelly> <!-- 使用虫胶作为特色材料 -->
|
||||
</costList>
|
||||
<comps>
|
||||
<li Class="CompProperties_Drug">
|
||||
<chemical>ARA_Pheromone</chemical>
|
||||
<addictiveness>0.05</addictiveness>
|
||||
<needLevelOffset>1</needLevelOffset>
|
||||
<listOrder>1000</listOrder>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
<!-- ==================== 2. Hediff定义:共生稳定器效果 ==================== -->
|
||||
|
||||
<HediffDef>
|
||||
<defName>ARA_SymbioticStabilizer</defName>
|
||||
<label>信息素抑制</label>
|
||||
<labelNoun>一种信息素抑制效果</labelNoun>
|
||||
<description>阿拉克涅信息素溶剂的效果正在生效,它模拟了虫群的共生信号,抑制了体内寄生体的活性。</description>
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor>
|
||||
<isBad>false</isBad>
|
||||
<comps>
|
||||
<li Class="HediffCompProperties_SeverityPerDay">
|
||||
<severityPerDay>-0.34</severityPerDay> <!-- 严重性每天降低0.34,大约3天从1.0掉到0 -->
|
||||
<showHoursToRecover>true</showHoursToRecover>
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
<!-- ==================== 3. 物品定义:阿拉克涅拟线种虫卵 ==================== -->
|
||||
|
||||
<ThingDef ParentName="MakeableDrugPillBase">
|
||||
<defName>ARA_NematodeEgg</defName>
|
||||
<label>阿拉克涅拟线种虫卵</label>
|
||||
<description>一个经过特殊处理的阿拉克涅拟线种虫卵,可以被直接服用。服用后,虫卵会迅速在宿主体内孵化并释放大量阿拉克涅拟线虫,导致极其严重的感染。</description>
|
||||
<descriptionHyperlinks>
|
||||
<HediffDef>ARA_MimicNematode</HediffDef>
|
||||
</descriptionHyperlinks>
|
||||
<graphicData>
|
||||
<texPath>Things/Item/Drug/Luciferium</texPath>
|
||||
<graphicClass>Graphic_StackCount</graphicClass>
|
||||
<color>(100,50,100)</color> <!-- 深紫色 -->
|
||||
</graphicData>
|
||||
<statBases>
|
||||
<MarketValue>75</MarketValue>
|
||||
<Mass>0.05</Mass>
|
||||
</statBases>
|
||||
<techLevel>Industrial</techLevel>
|
||||
<ingestible>
|
||||
<drugCategory>None</drugCategory> <!-- 修正:这不是药物,不应被药物政策管理 -->
|
||||
<foodType>AnimalProduct</foodType>
|
||||
<outcomeDoers>
|
||||
<li Class="IngestionOutcomeDoer_GiveHediff">
|
||||
<hediffDef>ARA_MimicNematode</hediffDef>
|
||||
<severity>0.5</severity> <!-- 直接给予0.7的严重性 -->
|
||||
</li>
|
||||
</outcomeDoers>
|
||||
</ingestible>
|
||||
<recipeMaker IsNull="True" /> <!-- 明确声明此物品不可制造,以覆盖父类的设置 -->
|
||||
</ThingDef>
|
||||
|
||||
<!-- ==================== 3. 阿拉克涅信息素成瘾机制 ==================== -->
|
||||
|
||||
<ChemicalDef>
|
||||
<defName>ARA_Pheromone</defName>
|
||||
<label>阿拉克涅信息素</label>
|
||||
<addictionHediff>ARA_PheromoneAddiction</addictionHediff>
|
||||
</ChemicalDef>
|
||||
|
||||
<NeedDef ParentName="DrugAddictionNeedBase">
|
||||
<defName>Chemical_ARA_Pheromone</defName>
|
||||
<needClass>Need_Chemical</needClass>
|
||||
<label>信息素依赖</label>
|
||||
<description>由于长期使用阿拉克涅信息素溶剂,此人的身体已经习惯了这种外部信息素的存在。如果中断使用,体内的拟线虫将因为失去抑制而猛烈反扑。</description>
|
||||
<fallPerDay>0.333</fallPerDay>
|
||||
<listPriority>50</listPriority>
|
||||
</NeedDef>
|
||||
|
||||
<HediffDef ParentName="AddictionBase">
|
||||
<defName>ARA_PheromoneAddiction</defName>
|
||||
<label>信息素依赖</label>
|
||||
<description>对阿拉克涅信息素溶剂产生了化学依赖。需要定期使用来维持体内的拟线虫生态平衡,否则会产生严重的戒断反应。</description>
|
||||
<hediffClass>Hediff_Addiction</hediffClass>
|
||||
<chemicalNeed>Chemical_ARA_Pheromone</chemicalNeed>
|
||||
<stages>
|
||||
<li>
|
||||
<!-- 需求满足时,无效果 -->
|
||||
</li>
|
||||
<li>
|
||||
<label>戒断反应</label>
|
||||
<capMods>
|
||||
<li>
|
||||
<capacity>Consciousness</capacity>
|
||||
<offset>-0.1</offset>
|
||||
</li>
|
||||
</capMods>
|
||||
<hediffGivers>
|
||||
<li Class="ArachnaeSwarm.HediffGiver_RandomWithSeverity">
|
||||
<hediff>ARA_MimicNematode</hediff>
|
||||
<mtbDays>1</mtbDays>
|
||||
<severityRange>0.1~0.2</severityRange>
|
||||
</li>
|
||||
</hediffGivers>
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
<ThoughtDef>
|
||||
<defName>ARA_PheromoneWithdrawal</defName>
|
||||
<workerClass>ThoughtWorker_Hediff</workerClass>
|
||||
<hediff>ARA_PheromoneAddiction</hediff>
|
||||
<validWhileDespawned>true</validWhileDespawned>
|
||||
<stages>
|
||||
<li>
|
||||
<visible>false</visible>
|
||||
</li>
|
||||
<li>
|
||||
<label>信息素戒断</label>
|
||||
<description>我感觉很糟糕,体内的某些东西正在变得活跃......我需要信息素溶剂。</description>
|
||||
<baseMoodEffect>-15</baseMoodEffect>
|
||||
</li>
|
||||
</stages>
|
||||
</ThoughtDef>
|
||||
|
||||
</Defs>
|
||||
@@ -426,7 +426,7 @@
|
||||
<damageDef>ARA_AcidBurn</damageDef>
|
||||
<spinRate>15</spinRate>
|
||||
<damageAmountBase>50</damageAmountBase>
|
||||
<speed>15</speed>
|
||||
<speed>45</speed>
|
||||
<arcHeightFactor>1</arcHeightFactor>
|
||||
<explosionRadius>3.5</explosionRadius>
|
||||
<flyOverhead>true</flyOverhead>
|
||||
@@ -518,7 +518,7 @@
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="BaseBullet">
|
||||
<defName>Bullet_ARA_RW_Basic_SkyHive_Gun</defName>
|
||||
<label>天巢种</label>
|
||||
<label>阿拉克涅天巢种</label>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_Single_AgeSecs</graphicClass>
|
||||
<texPath>Things/Pawn/Insect/Locust/Locust_north</texPath>
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
<ThingDef ParentName="BenchBase">
|
||||
<defName>ARA_ResearchBench</defName>
|
||||
<label>阿拉克涅研究台</label>
|
||||
<description>一个供阿拉克涅女皇种和智囊种进行研究的活体结构,可以让虫群尽情地探索变异和进化方向。</description>
|
||||
<description>一个供阿拉克涅虫族进行研究的活体结构,可以让虫群尽情地探索变异和进化方向。</description>
|
||||
<thingClass>Building_ResearchBench</thingClass>
|
||||
<size>(3,3)</size>
|
||||
<stuffCategories Inherit="False"/>
|
||||
|
||||
66
1.6/1.6/Defs/ThinkTreeDefs/ARA_WorkingShambler_ThinkTree.xml
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- ===== 2. 定义我们的“工作僵尸”思考树,并引用上面的子树 ===== -->
|
||||
<!-- ================================================================== -->
|
||||
<ThinkTreeDef>
|
||||
<defName>ARA_WorkingShambler</defName>
|
||||
<thinkRoot Class="ThinkNode_Priority">
|
||||
<subNodes>
|
||||
<!-- 基础状态检查 (来自 Shambler) -->
|
||||
<li Class="ThinkNode_Subtree">
|
||||
<treeDef>Despawned</treeDef>
|
||||
</li>
|
||||
<li Class="ThinkNode_ConditionalDowned">
|
||||
<subNodes>
|
||||
<li Class="ThinkNode_ConditionalCanCrawl">
|
||||
<invert>true</invert>
|
||||
<subNodes>
|
||||
<li Class="ThinkNode_Subtree">
|
||||
<treeDef>Downed</treeDef>
|
||||
</li>
|
||||
</subNodes>
|
||||
</li>
|
||||
</subNodes>
|
||||
</li>
|
||||
<li Class="ThinkNode_Subtree">
|
||||
<treeDef>BurningResponse</treeDef>
|
||||
</li>
|
||||
|
||||
<!-- 响应直接命令和威胁 (来自 Shambler) -->
|
||||
<li Class="ThinkNode_QueuedJob" />
|
||||
<li Class="ThinkNodeConditional_EscapingHoldingPlatform">
|
||||
<subNodes>
|
||||
<li Class="JobGiver_EscapingHoldingPlatform" />
|
||||
</subNodes>
|
||||
</li>
|
||||
<li Class="JobGiver_ReactToCloseMeleeThreat" />
|
||||
<li Class="ThinkNode_Subtree">
|
||||
<treeDef>LordDuty</treeDef>
|
||||
</li>
|
||||
|
||||
<!-- 主动战斗 (来自 Shambler) -->
|
||||
<li Class="JobGiver_ShamblerFight">
|
||||
<targetAcquireRadius>20</targetAcquireRadius>
|
||||
<targetKeepRadius>30</targetKeepRadius>
|
||||
</li>
|
||||
|
||||
<!-- 工作逻辑 (引用我们自己的精简版工作核心) -->
|
||||
<li Class="JobGiver_SeekAllowedArea" />
|
||||
<li Class="JobGiver_Work">
|
||||
<emergency>true</emergency>
|
||||
</li>
|
||||
<!-- 核心工作循环,但使用我们的精简版 -->
|
||||
<li Class="JobGiver_Work"/>
|
||||
|
||||
<!-- 空闲时徘徊 (来自 Shambler) -->
|
||||
<li Class="JobGiver_ShamblerWander">
|
||||
<wanderRadius>5</wanderRadius>
|
||||
</li>
|
||||
|
||||
</subNodes>
|
||||
</thinkRoot>
|
||||
</ThinkTreeDef>
|
||||
|
||||
</Defs>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LanguageData>
|
||||
|
||||
<!-- CompAbilityEffect_Transform -->
|
||||
<PawnTransformer_SpaceBlocked>{PAWN_labelShort} 无法变形:空间不足或有障碍物。</PawnTransformer_SpaceBlocked>
|
||||
<AbilityCannotBeUsedOnOthers>此能力只能对自己施放。</AbilityCannotBeUsedOnOthers>
|
||||
|
||||
<!-- Building_Morphable -->
|
||||
<StoredPawn>织域者</StoredPawn>
|
||||
<Activity>活动</Activity>
|
||||
<Researching>研究中</Researching>
|
||||
<Idle>空闲中</Idle>
|
||||
<Sleeping>睡眠中</Sleeping>
|
||||
<PawnTransformer_OutOfFuel>{PAWN_labelShort} 因营养耗尽而被强制弹出!</PawnTransformer_OutOfFuel>
|
||||
<PawnTransformer_ForcedRevert>{PAWN_labelShort} 因受到攻击而被强制弹出!</PawnTransformer_ForcedRevert>
|
||||
<PawnTransformer_BuildingDestroyed>{PAWN_labelShort} 从被摧毁的 {BUILDING_label} 中弹出!</PawnTransformer_BuildingDestroyed>
|
||||
|
||||
</LanguageData>
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 37 KiB |
@@ -191,6 +191,14 @@
|
||||
<Compile Include="ProphecyGearEffect.cs" />
|
||||
<Compile Include="Hediff_ConfigurableMutant.cs" />
|
||||
<Compile Include="HediffComp_Symbiosis.cs" />
|
||||
<Compile Include="HediffGiver_RandomWithSeverity.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Morphable\CompProperties_Morphable.cs" />
|
||||
<Compile Include="Morphable\CompMorphable.cs" />
|
||||
<Compile Include="Morphable\CompProperties_AbilityTransform.cs" />
|
||||
<Compile Include="Morphable\CompAbilityEffect_Transform.cs" />
|
||||
<Compile Include="Morphable\Building_Morphable.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 自定义清理任务,删除obj文件夹中的临时文件 -->
|
||||
|
||||
54
Source/ArachnaeSwarm/HediffGiver_RandomWithSeverity.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
/// <summary>
|
||||
/// A custom HediffGiver that is similar to HediffGiver_Random,
|
||||
/// but allows specifying a random severity range for the given hediff.
|
||||
/// </summary>
|
||||
public class HediffGiver_RandomWithSeverity : HediffGiver
|
||||
{
|
||||
// XML configurable fields
|
||||
public float mtbDays;
|
||||
public FloatRange severityRange = new FloatRange(0.01f, 1f);
|
||||
|
||||
public override void OnIntervalPassed(Pawn pawn, Hediff cause)
|
||||
{
|
||||
// Calculate the chance based on Mean Time Between (MTB) days and pawn-specific factors
|
||||
float mtb = this.mtbDays;
|
||||
float chanceFactor = ChanceFactor(pawn);
|
||||
if (chanceFactor != 0f && Rand.MTBEventOccurs(mtb / chanceFactor, 60000f, 60f))
|
||||
{
|
||||
// Try to apply the hediff with our custom logic
|
||||
if (TryApplyWithCustomSeverity(pawn))
|
||||
{
|
||||
// If successful, send a letter to the player
|
||||
SendLetter(pawn, cause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies the hediff and then sets its severity to a random value within the specified range.
|
||||
/// </summary>
|
||||
/// <param name="pawn">The pawn to apply the hediff to.</param>
|
||||
/// <returns>True if the hediff was successfully applied, false otherwise.</returns>
|
||||
private bool TryApplyWithCustomSeverity(Pawn pawn)
|
||||
{
|
||||
// First, apply the hediff using the base class logic.
|
||||
// This will add the hediff with its default initial severity.
|
||||
if (base.TryApply(pawn))
|
||||
{
|
||||
// If the hediff was successfully added, find it.
|
||||
Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(this.hediff);
|
||||
if (hediff != null)
|
||||
{
|
||||
// Set its severity to a random value from our configured range.
|
||||
hediff.Severity = this.severityRange.RandomInRange;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,9 +9,21 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
private const int EffectInterval = 600;
|
||||
|
||||
// 用于存储攻击者派系的字段
|
||||
private Faction casterFaction;
|
||||
|
||||
// 属性来获取我们的自定义Comp
|
||||
private HediffComp_NecroticTransformation PropsComp => this.TryGetComp<HediffComp_NecroticTransformation>();
|
||||
|
||||
public override void PostAdd(DamageInfo? dinfo)
|
||||
{
|
||||
base.PostAdd(dinfo);
|
||||
if (dinfo.HasValue && dinfo.Value.Instigator != null)
|
||||
{
|
||||
this.casterFaction = dinfo.Value.Instigator.Faction;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Notify_PawnDied(DamageInfo? dinfo, Hediff culprit = null)
|
||||
{
|
||||
base.Notify_PawnDied(dinfo, culprit);
|
||||
@@ -59,7 +71,8 @@ namespace ArachnaeSwarm
|
||||
return;
|
||||
}
|
||||
|
||||
Faction faction = GetHostileFaction();
|
||||
// **优先使用攻击者的派系,如果没有,则执行备用逻辑**
|
||||
Faction faction = this.casterFaction ?? GetHostileFaction();
|
||||
|
||||
// **调用我们自己的工具方法,传入从XML获取的mutantDef**
|
||||
NecroticTransformationUtility.ResurrectAsCustomMutant(pawn, comp.Props.mutantDef, faction);
|
||||
@@ -124,5 +137,11 @@ namespace ArachnaeSwarm
|
||||
return base.TipStringExtra + "\n" + "NecroticVirus_EffectTip".Translate();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ExposeData()
|
||||
{
|
||||
base.ExposeData();
|
||||
Scribe_References.Look(ref this.casterFaction, "casterFaction");
|
||||
}
|
||||
}
|
||||
}
|
||||
259
Source/ArachnaeSwarm/Morphable/Building_Morphable.cs
Normal file
@@ -0,0 +1,259 @@
|
||||
using RimWorld;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class Building_Morphable : Building
|
||||
{
|
||||
private CompMorphable compMorphable;
|
||||
private CompRefuelableNutrition compRefuelable;
|
||||
private Effecter researchEffecter;
|
||||
|
||||
public float virtualRest; // Public for external access
|
||||
private bool forceSleep;
|
||||
|
||||
public float VirtualRestMax => 1.0f;
|
||||
|
||||
public override void ExposeData()
|
||||
{
|
||||
base.ExposeData();
|
||||
Scribe_Values.Look(ref virtualRest, "virtualRest", 1f);
|
||||
Scribe_Values.Look(ref forceSleep, "forceSleep", false);
|
||||
}
|
||||
|
||||
public override void SpawnSetup(Map map, bool respawningAfterLoad)
|
||||
{
|
||||
base.SpawnSetup(map, respawningAfterLoad);
|
||||
this.compMorphable = GetComp<CompMorphable>();
|
||||
this.compRefuelable = GetComp<CompRefuelableNutrition>();
|
||||
}
|
||||
|
||||
protected override void Tick()
|
||||
{
|
||||
base.Tick();
|
||||
|
||||
if (compMorphable?.StoredPawn == null)
|
||||
{
|
||||
StopResearchEffect();
|
||||
return;
|
||||
}
|
||||
|
||||
Pawn pawn = compMorphable.StoredPawn;
|
||||
|
||||
var needs = pawn.needs;
|
||||
if (needs == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// --- 饮食逻辑 ---
|
||||
if (needs.food != null && compRefuelable != null)
|
||||
{
|
||||
if (compRefuelable.HasFuel)
|
||||
{
|
||||
// 模拟消耗
|
||||
compRefuelable.ConsumeFuel(pawn.needs.food.FoodFallPerTick);
|
||||
}
|
||||
else
|
||||
{
|
||||
Messages.Message("PawnTransformer_OutOfFuel".Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.NegativeEvent);
|
||||
this.Destroy(DestroyMode.Vanish);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// --- 休息与研究逻辑 ---
|
||||
if (needs.rest != null)
|
||||
{
|
||||
if (needs.rest.CurLevel <= 0)
|
||||
{
|
||||
forceSleep = true;
|
||||
}
|
||||
if (forceSleep && needs.rest.CurLevel >= needs.rest.MaxLevel)
|
||||
{
|
||||
forceSleep = false;
|
||||
}
|
||||
}
|
||||
|
||||
TimeAssignmentDef assignment = pawn.timetable?.CurrentAssignment ?? TimeAssignmentDefOf.Anything;
|
||||
|
||||
if (forceSleep || assignment == TimeAssignmentDefOf.Sleep || assignment == TimeAssignmentDefOf.Joy)
|
||||
{
|
||||
// 休眠期 (只有在强制休眠或日程为睡眠/娱乐时才恢复)
|
||||
if (needs.rest != null)
|
||||
{
|
||||
virtualRest = Mathf.Min(VirtualRestMax, virtualRest + (Need_Rest.BaseRestGainPerTick * ((CompProperties_Morphable)compMorphable.props).restGainMultiplier)); // 使用XML中定义的乘数
|
||||
}
|
||||
StopResearchEffect();
|
||||
}
|
||||
else // 工作或任意时间 (只要不在休息/娱乐,就下降)
|
||||
{
|
||||
// 使用固定的、预估的下降率
|
||||
if (virtualRest > 0)
|
||||
{
|
||||
virtualRest -= (0.66f / 60000f);
|
||||
}
|
||||
|
||||
ResearchProjectDef currentProj = Find.ResearchManager.GetProject();
|
||||
if (currentProj != null)
|
||||
{
|
||||
float researchSpeed = pawn.GetStatValue(StatDefOf.ResearchSpeed);
|
||||
researchSpeed *= this.GetStatValue(StatDefOf.ResearchSpeedFactor);
|
||||
Find.ResearchManager.ResearchPerformed(researchSpeed, pawn);
|
||||
pawn.skills.Learn(SkillDefOf.Intellectual, 0.1f, false);
|
||||
StartResearchEffect();
|
||||
}
|
||||
else
|
||||
{
|
||||
StopResearchEffect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void StartResearchEffect()
|
||||
{
|
||||
if (researchEffecter == null)
|
||||
{
|
||||
researchEffecter = EffecterDefOf.Research.Spawn();
|
||||
}
|
||||
researchEffecter.EffectTick(this, TargetInfo.Invalid);
|
||||
}
|
||||
|
||||
private void StopResearchEffect()
|
||||
{
|
||||
if (researchEffecter != null)
|
||||
{
|
||||
researchEffecter.Cleanup();
|
||||
researchEffecter = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override string Label
|
||||
{
|
||||
get
|
||||
{
|
||||
if (compMorphable?.StoredPawn != null)
|
||||
{
|
||||
return $"{base.Label} ({compMorphable.StoredPawn.LabelShort})";
|
||||
}
|
||||
return base.Label;
|
||||
}
|
||||
}
|
||||
|
||||
public override string GetInspectString()
|
||||
{
|
||||
List<string> inspectStrings = new List<string>();
|
||||
|
||||
if (compMorphable?.StoredPawn != null)
|
||||
{
|
||||
Pawn pawn = compMorphable.StoredPawn;
|
||||
|
||||
// 1. 活动状态 (置于首位)
|
||||
TimeAssignmentDef assignment = pawn.timetable?.CurrentAssignment ?? TimeAssignmentDefOf.Anything;
|
||||
bool isWorkingTime = !forceSleep && (assignment == TimeAssignmentDefOf.Work || assignment == TimeAssignmentDefOf.Anything);
|
||||
string activity;
|
||||
if (isWorkingTime)
|
||||
{
|
||||
ResearchProjectDef currentProj = Find.ResearchManager.GetProject();
|
||||
if (currentProj != null)
|
||||
{
|
||||
activity = "Activity".Translate() + ": " + "Researching".Translate() + $" ({currentProj.LabelCap})";
|
||||
}
|
||||
else
|
||||
{
|
||||
activity = "Activity".Translate() + ": " + "Idle".Translate();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
activity = "Activity".Translate() + ": " + "Sleeping".Translate();
|
||||
}
|
||||
inspectStrings.Add(activity);
|
||||
|
||||
// 2. 智识技能
|
||||
SkillRecord intellectualSkill = pawn.skills?.GetSkill(SkillDefOf.Intellectual);
|
||||
if (intellectualSkill != null)
|
||||
{
|
||||
inspectStrings.Add($"{SkillDefOf.Intellectual.LabelCap}: {intellectualSkill.Level} ({intellectualSkill.XpProgressPercent:P0})");
|
||||
}
|
||||
|
||||
// 3. 休息需求
|
||||
Need_Rest restNeed = pawn.needs?.rest;
|
||||
if (restNeed != null)
|
||||
{
|
||||
inspectStrings.Add($"{restNeed.LabelCap}: {virtualRest.ToStringPercent()}");
|
||||
}
|
||||
}
|
||||
|
||||
// 基础信息(如HP)最后添加
|
||||
string baseString = base.GetInspectString();
|
||||
if (!baseString.NullOrEmpty())
|
||||
{
|
||||
inspectStrings.Add(baseString);
|
||||
}
|
||||
|
||||
return string.Join("\n", inspectStrings);
|
||||
}
|
||||
|
||||
public override void PostApplyDamage(DamageInfo dinfo, float totalDamageDealt)
|
||||
{
|
||||
base.PostApplyDamage(dinfo, totalDamageDealt);
|
||||
if (dinfo.Amount <= 0 || this.Destroyed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (compMorphable?.StoredPawn != null)
|
||||
{
|
||||
ForceRevert(dinfo);
|
||||
}
|
||||
}
|
||||
|
||||
private void ForceRevert(DamageInfo dinfo)
|
||||
{
|
||||
Pawn pawn = compMorphable.StoredPawn;
|
||||
Map map = this.Map;
|
||||
IntVec3 position = this.Position;
|
||||
|
||||
compMorphable.SetStoredPawn(null);
|
||||
|
||||
float damageProportion = dinfo.Amount / this.def.statBases.GetStatValueFromList(StatDefOf.MaxHitPoints, 1f);
|
||||
float pawnDamage = pawn.MaxHitPoints * damageProportion;
|
||||
DamageInfo pawnDinfo = new DamageInfo(dinfo.Def, pawnDamage, dinfo.ArmorPenetrationInt, dinfo.Angle, dinfo.Instigator, null, dinfo.Weapon, dinfo.Category, dinfo.IntendedTarget);
|
||||
|
||||
this.Destroy(DestroyMode.Vanish);
|
||||
|
||||
GenSpawn.Spawn(pawn, position, map, WipeMode.Vanish);
|
||||
PawnComponentsUtility.AddComponentsForSpawn(pawn);
|
||||
pawn.TakeDamage(pawnDinfo);
|
||||
|
||||
Messages.Message("PawnTransformer_ForcedRevert".Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.NegativeEvent);
|
||||
}
|
||||
|
||||
public override void Destroy(DestroyMode mode)
|
||||
{
|
||||
if (researchEffecter != null)
|
||||
{
|
||||
researchEffecter.Cleanup();
|
||||
researchEffecter = null;
|
||||
}
|
||||
|
||||
if (this.Spawned && compMorphable != null && compMorphable.StoredPawn != null)
|
||||
{
|
||||
Pawn pawn = compMorphable.StoredPawn;
|
||||
GenSpawn.Spawn(pawn, this.Position, this.Map, WipeMode.Vanish);
|
||||
PawnComponentsUtility.AddComponentsForSpawn(pawn);
|
||||
|
||||
if (mode == DestroyMode.KillFinalize)
|
||||
{
|
||||
Messages.Message("PawnTransformer_BuildingDestroyed".Translate(pawn.Named("PAWN"), this.Named("BUILDING")), pawn, MessageTypeDefOf.NegativeEvent);
|
||||
}
|
||||
}
|
||||
base.Destroy(mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompAbilityEffect_Transform : CompAbilityEffect
|
||||
{
|
||||
public new CompProperties_AbilityTransform Props => (CompProperties_AbilityTransform)props;
|
||||
|
||||
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||
{
|
||||
base.Apply(target, dest);
|
||||
Pawn pawn = parent.pawn;
|
||||
|
||||
// 检查空间
|
||||
foreach (var cell in GenRadial.RadialCellsAround(pawn.Position, Props.buildingDef.Size.x / 2f, true))
|
||||
{
|
||||
if (!cell.InBounds(pawn.Map) || !cell.Walkable(pawn.Map) || cell.GetEdifice(pawn.Map) != null)
|
||||
{
|
||||
Messages.Message("PawnTransformer_SpaceBlocked".Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.RejectInput, false);
|
||||
// 重置技能冷却
|
||||
parent.StartCooldown(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 执行转换
|
||||
IntVec3 position = pawn.Position;
|
||||
Map map = pawn.Map;
|
||||
|
||||
pawn.DeSpawn(DestroyMode.Vanish);
|
||||
|
||||
Building building = (Building)GenSpawn.Spawn(Props.buildingDef, position, map, WipeMode.Vanish);
|
||||
building.SetFaction(pawn.Faction);
|
||||
|
||||
var newMorphComp = building.GetComp<CompMorphable>();
|
||||
if (newMorphComp != null)
|
||||
{
|
||||
newMorphComp.SetStoredPawn(pawn);
|
||||
}
|
||||
|
||||
// 同步需求值
|
||||
var buildingMorphable = building as Building_Morphable;
|
||||
var refuelableComp = building.GetComp<CompRefuelableNutrition>();
|
||||
|
||||
if (buildingMorphable != null && refuelableComp != null && pawn.needs != null)
|
||||
{
|
||||
if(pawn.needs.food != null)
|
||||
{
|
||||
refuelableComp.Refuel(refuelableComp.Props.fuelCapacity * pawn.needs.food.CurLevelPercentage);
|
||||
}
|
||||
if(pawn.needs.rest != null)
|
||||
{
|
||||
buildingMorphable.virtualRest = buildingMorphable.VirtualRestMax * pawn.needs.rest.CurLevelPercentage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||
{
|
||||
// 这个技能只应该对自己释放
|
||||
if (target.Pawn != parent.pawn)
|
||||
{
|
||||
if (throwMessages)
|
||||
{
|
||||
Messages.Message("AbilityCannotBeUsedOnOthers".Translate(), MessageTypeDefOf.RejectInput, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return base.Valid(target, throwMessages);
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Source/ArachnaeSwarm/Morphable/CompMorphable.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompMorphable : ThingComp
|
||||
{
|
||||
private Pawn storedPawn;
|
||||
public bool wasEjectedForFuel = false;
|
||||
public Pawn StoredPawn => storedPawn;
|
||||
|
||||
public void SetStoredPawn(Pawn pawn)
|
||||
{
|
||||
this.storedPawn = pawn;
|
||||
}
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
Scribe_References.Look(ref storedPawn, "storedPawn", false);
|
||||
}
|
||||
|
||||
public override IEnumerable<Gizmo> CompGetGizmosExtra()
|
||||
{
|
||||
if (parent.Faction == Faction.OfPlayer && storedPawn != null)
|
||||
{
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "恢复人形",
|
||||
defaultDesc = "将此建筑恢复为人形。",
|
||||
icon = TexCommand.ReleaseAnimals, // TODO: Replace with a proper icon
|
||||
action = () => { TransformBackToPawn(); }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private void TransformBackToPawn()
|
||||
{
|
||||
Building building = (Building)this.parent;
|
||||
Map map = building.Map;
|
||||
|
||||
// 同步燃料到食物
|
||||
var refuelableComp = building.GetComp<CompRefuelableNutrition>();
|
||||
var buildingMorphable = building as Building_Morphable;
|
||||
var needs = storedPawn.needs;
|
||||
|
||||
if (refuelableComp != null && needs?.food != null)
|
||||
{
|
||||
needs.food.CurLevelPercentage = refuelableComp.Fuel / refuelableComp.Props.fuelCapacity;
|
||||
}
|
||||
if (buildingMorphable != null && needs?.rest != null)
|
||||
{
|
||||
needs.rest.CurLevelPercentage = buildingMorphable.virtualRest / buildingMorphable.VirtualRestMax;
|
||||
}
|
||||
|
||||
// 如果是因为燃料耗尽而被弹出,清空Pawn的食物需求
|
||||
if(wasEjectedForFuel && needs?.food != null)
|
||||
{
|
||||
needs.food.CurLevel = 0;
|
||||
}
|
||||
|
||||
// 移除建筑
|
||||
building.DeSpawn(DestroyMode.Vanish);
|
||||
|
||||
// 重新生成Pawn
|
||||
GenSpawn.Spawn(storedPawn, building.Position, map, WipeMode.Vanish);
|
||||
|
||||
// 重新初始化Pawn在地图上所需的组件
|
||||
PawnComponentsUtility.AddComponentsForSpawn(storedPawn);
|
||||
|
||||
// 选中Pawn
|
||||
if (Find.Selector.IsSelected(building))
|
||||
{
|
||||
Find.Selector.Select(storedPawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_AbilityTransform : CompProperties_AbilityEffect
|
||||
{
|
||||
public ThingDef buildingDef;
|
||||
|
||||
public CompProperties_AbilityTransform()
|
||||
{
|
||||
compClass = typeof(CompAbilityEffect_Transform);
|
||||
}
|
||||
}
|
||||
}
|
||||
15
Source/ArachnaeSwarm/Morphable/CompProperties_Morphable.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_Morphable : CompProperties
|
||||
{
|
||||
public float restGainMultiplier = 1f; // Default to 1.0 if not specified in XML
|
||||
|
||||
public CompProperties_Morphable()
|
||||
{
|
||||
compClass = typeof(CompMorphable);
|
||||
}
|
||||
}
|
||||
}
|
||||
122
Source/Documents/Milira_Fortress.cs
Normal file
@@ -0,0 +1,122 @@
|
||||
using AncotLibrary;
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
||||
namespace Milira
|
||||
{
|
||||
public class JobDriver_FortressMode : JobDriver
|
||||
{
|
||||
private Thing thing;
|
||||
|
||||
public virtual ThingDef TurretDef => MiliraDefOf.Milian_Fortress;
|
||||
|
||||
public CompThingContainer CompThingContainer => thing?.TryGetComp<CompThingContainer>();
|
||||
|
||||
public override bool TryMakePreToilReservations(bool errorOnFailed)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override IEnumerable<Toil> MakeNewToils()
|
||||
{
|
||||
// 检查部署区域是否合适
|
||||
Toil check = Toils_General.Do(() =>
|
||||
{
|
||||
foreach (var cell in GenRadial.RadialCellsAround(pawn.Position, 1.5f, false))
|
||||
{
|
||||
if (!cell.IsValid || !cell.InBounds(pawn.Map) || !cell.Walkable(pawn.Map) ||
|
||||
!cell.GetEdifice(pawn.Map).DestroyedOrNull() || cell.Roofed(pawn.Map))
|
||||
{
|
||||
// 空间不足或有障碍,技能冷却重置并结束任务
|
||||
var ability = pawn.abilities.abilities.FirstOrDefault(a => a.def.defName == "Milira_Fortress");
|
||||
ability?.StartCooldown(0);
|
||||
EndJobWith(JobCondition.Incompletable);
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
yield return check;
|
||||
|
||||
// 部署炮台
|
||||
yield return Toils_General.Do(DeployPod);
|
||||
|
||||
// 角色进入炮台
|
||||
Toil enterPod = ToilMaker.MakeToil("EnterPod");
|
||||
enterPod.initAction = () =>
|
||||
{
|
||||
if (thing == null)
|
||||
{
|
||||
EndJobWith(JobCondition.Incompletable);
|
||||
return;
|
||||
}
|
||||
|
||||
bool pawnSelected = Find.Selector.IsSelected(pawn);
|
||||
|
||||
// 角色从地图消失并进入炮台容器
|
||||
if (pawn.DeSpawnOrDeselect())
|
||||
{
|
||||
CompThingContainer?.GetDirectlyHeldThings().TryAdd(pawn);
|
||||
}
|
||||
|
||||
// 如果之前选中了角色,现在改为选中炮台
|
||||
if (pawnSelected)
|
||||
{
|
||||
Find.Selector.Select(thing, playSound: false, forceDesignatorDeselect: false);
|
||||
}
|
||||
};
|
||||
yield return enterPod;
|
||||
}
|
||||
|
||||
private void DeployPod()
|
||||
{
|
||||
var carrierComp = pawn.TryGetComp<CompThingCarrier_Custom>();
|
||||
if (carrierComp == null) return;
|
||||
|
||||
FleckMaker.Static(pawn.TrueCenter(), pawn.Map, FleckDefOf.Milian_FortressFormed);
|
||||
thing = GenSpawn.Spawn(TurretDef, pawn.Position, pawn.Map);
|
||||
thing.SetFaction(pawn.Faction);
|
||||
|
||||
bool hasRapidDeployment = ModsConfig.IsActive("Ancot.MilianModification") &&
|
||||
pawn.health.hediffSet.GetFirstHediffOfDef(MiliraDefOf.MilianFitting_RapidDeployment) != null;
|
||||
|
||||
if (hasRapidDeployment)
|
||||
{
|
||||
SetHitPointAndRemoveResourceInCarrier(carrierComp, 200, 60);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetHitPointAndRemoveResourceInCarrier(carrierComp, 1200, 600);
|
||||
}
|
||||
|
||||
var containerMilian = thing.TryGetComp<CompThingContainer_Milian>();
|
||||
if (containerMilian != null)
|
||||
{
|
||||
containerMilian.hitPointMax = thing.HitPoints;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetHitPointAndRemoveResourceInCarrier(CompThingCarrier_Custom comp, int hitPoint, int initiationDelayTicks)
|
||||
{
|
||||
if (comp.IngredientCount > hitPoint + 400)
|
||||
{
|
||||
comp.TryRemoveThingInCarrier(hitPoint);
|
||||
thing.HitPoints = hitPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
int halfResources = comp.IngredientCount / 2;
|
||||
comp.TryRemoveThingInCarrier(halfResources);
|
||||
thing.HitPoints = halfResources;
|
||||
}
|
||||
|
||||
var initiatableComp = thing.TryGetComp<CompInitiatable>();
|
||||
if (initiatableComp != null)
|
||||
{
|
||||
initiatableComp.initiationDelayTicksOverride = initiationDelayTicks;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
558
Source/Documents/PawnBuildingTransformer_Design.md
Normal file
@@ -0,0 +1,558 @@
|
||||
# Pawn 与 Building 双向转换系统设计文档
|
||||
|
||||
本文档旨在详细阐述一个通用的、可配置的系统,用于在《边缘世界》中实现角色(Pawn)与建筑(Building)之间的双向转换。
|
||||
|
||||
## 1. 核心目标
|
||||
|
||||
- **通用性**: 任何Pawn或Building都可以通过简单的XML配置获得变形能力。
|
||||
- **健壮性**: 确保在各种情况下(主动触发、被动摧毁、存档读档)Pawn的状态都能被正确保存和恢复。
|
||||
- **可扩展性**: 方便开发者添加自定义的转换条件、资源消耗和效果。
|
||||
- **状态保持**: 明确Pawn的关键状态(如健康、技能、装备、意识形态等)在转换过程中通过保存Pawn实例本身而得以完整保留。
|
||||
|
||||
## 2. 系统架构
|
||||
|
||||
系统由以下几个核心部分组成:
|
||||
|
||||
- **`CompProperties_Morphable`**: 在XML中定义的配置组件,用于指定变形的目标、效果和耗时。
|
||||
- **`CompMorphable`**: 附加在物体上的核心逻辑组件,管理变形状态和触发器。
|
||||
- **`CompThingContainer`**: 用于在建筑形态下实际“存储”Pawn对象的容器。
|
||||
- **`JobDriver_Transforming`**: 一个自定义的`JobDriver`,用于处理从Pawn到Building的、有持续时间的转换过程。
|
||||
- **自定义Building类**: 需要一个继承自`Building`的子类,以重写`Destroy`方法来处理被动转换。
|
||||
|
||||
### 架构图
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
subgraph Pawn
|
||||
A[Pawn_Character] -- Has --> B[CompMorphable];
|
||||
end
|
||||
|
||||
subgraph Building
|
||||
D[Building_Morphed] -- Has --> E[CompMorphable];
|
||||
D -- Also has --> C[CompThingContainer];
|
||||
C -- Contains --> F[Stored Pawn Instance];
|
||||
end
|
||||
|
||||
subgraph User_Interface
|
||||
G[Gizmo Button 'Transform'] -- Triggers --> H{StartTransform};
|
||||
end
|
||||
|
||||
A -- Transform --> D;
|
||||
D -- Transform Back --> A;
|
||||
|
||||
B -- Initiates Job --> J[JobDriver_Transforming];
|
||||
E -- Calls method --> K[TransformBackLogic];
|
||||
|
||||
subgraph XML_Configuration
|
||||
L[ThingDef: Pawn_Character] -- Defines --> B;
|
||||
M[ThingDef: Building_Morphed] -- Defines --> E & C;
|
||||
end
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. 实现细节与代码示例
|
||||
|
||||
### 3.1 XML 配置 (`CompProperties_Morphable`)
|
||||
|
||||
为你的Pawn和Building `ThingDef` 添加以下组件。
|
||||
|
||||
**Pawn Def:**
|
||||
```xml
|
||||
<ThingDef ParentName="BasePawn">
|
||||
<!-- ... other pawn properties ... -->
|
||||
<comps>
|
||||
<li Class="YourNamespace.CompProperties_Morphable">
|
||||
<buildingDef>Your_BuildingDef_Name</buildingDef>
|
||||
<transformSound>Your_TransformSound</transformSound>
|
||||
<transformEffect>Your_TransformEffect</transformEffect>
|
||||
<transformTicks>120</transformTicks> <!-- 2 seconds -->
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
```
|
||||
|
||||
**Building Def:**
|
||||
```xml
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<!-- ... other building properties ... -->
|
||||
<comps>
|
||||
<!-- 容器组件,必须有 -->
|
||||
<li Class="CompProperties_ThingContainer">
|
||||
<compClass>CompThingContainer</compClass>
|
||||
</li>
|
||||
<!-- 变形逻辑组件 -->
|
||||
<li Class="YourNamespace.CompProperties_Morphable">
|
||||
<!-- pawnDef是可选的,如果为空则恢复被存储的pawn -->
|
||||
<pawnDef>Your_PawnDef_Name</pawnDef>
|
||||
<transformSound>Your_TransformBackSound</transformSound>
|
||||
<transformEffect>Your_TransformBackEffect</transformEffect>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
```
|
||||
|
||||
### 3.2 核心逻辑组件 (`CompMorphable`)
|
||||
|
||||
```csharp
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
public class CompMorphable : ThingComp
|
||||
{
|
||||
private Pawn storedPawn;
|
||||
public CompProperties_Morphable Props => (CompProperties_Morphable)props;
|
||||
|
||||
public bool IsMorphed => parent.def == Props.buildingDef;
|
||||
public Pawn StoredPawn => storedPawn;
|
||||
|
||||
public void SetStoredPawn(Pawn pawn)
|
||||
{
|
||||
this.storedPawn = pawn;
|
||||
}
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
// 确保Pawn引用在存档/读档时被正确保存
|
||||
Scribe_References.Look(ref storedPawn, "storedPawn");
|
||||
}
|
||||
|
||||
public override IEnumerable<Gizmo> CompGetGizmosExtra()
|
||||
{
|
||||
// 为Pawn添加“变形”按钮
|
||||
if (parent is Pawn pawn)
|
||||
{
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "变形",
|
||||
action = () => {
|
||||
// 创建并分配变形任务
|
||||
var job = new Job(JobDefOf.Your_TransformingJob, parent);
|
||||
pawn.jobs.TryTakeOrderedJob(job);
|
||||
}
|
||||
};
|
||||
}
|
||||
// 为Building添加“恢复”按钮
|
||||
else if (parent is Building)
|
||||
{
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "恢复人形",
|
||||
action = () => { TransformBackToPawn(); }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private void TransformBackToPawn()
|
||||
{
|
||||
// ... (此处实现Building -> Pawn的逻辑) ...
|
||||
// 检查空间、移除建筑、重新生成Pawn
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 3.3 Pawn -> Building 转换 (`JobDriver_Transforming`)
|
||||
|
||||
这个`JobDriver`负责有过程的转换。
|
||||
|
||||
```csharp
|
||||
public class JobDriver_Transforming : JobDriver
|
||||
{
|
||||
protected override IEnumerable<Toil> MakeNewToils()
|
||||
{
|
||||
this.FailOnDespawnedNullOrForbidden(TargetIndex.A);
|
||||
|
||||
// 1. 检查空间
|
||||
yield return Toils_General.Do(() => {
|
||||
// ... 检查逻辑 ...
|
||||
// 如果失败: EndJobWith(JobCondition.Incompletable);
|
||||
});
|
||||
|
||||
// 2. 等待并播放特效
|
||||
var props = pawn.GetComp<CompMorphable>().Props;
|
||||
yield return Toils_General.Wait(props.transformTicks)
|
||||
.WithProgressBarToilDelay(TargetIndex.A);
|
||||
|
||||
// 3. 执行核心转换
|
||||
Toil transform = Toils_General.Do(() => {
|
||||
// 移除Pawn
|
||||
pawn.DeSpawn(DestroyMode.Vanish);
|
||||
// 生成Building
|
||||
Building building = (Building)GenSpawn.Spawn(props.buildingDef, pawn.Position, pawn.Map);
|
||||
building.SetFaction(pawn.Faction);
|
||||
// 存储Pawn
|
||||
building.GetComp<CompThingContainer>().GetDirectlyHeldThings().TryAdd(pawn);
|
||||
building.GetComp<CompMorphable>().SetStoredPawn(pawn);
|
||||
});
|
||||
yield return transform;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 3.4 Building -> Pawn 转换 (被动触发)
|
||||
|
||||
需要一个自定义的Building类来处理被摧毁时的情况。
|
||||
|
||||
```csharp
|
||||
public class Building_Morphable : Building
|
||||
{
|
||||
public override void Destroy(DestroyMode mode)
|
||||
{
|
||||
var comp = this.GetComp<CompMorphable>();
|
||||
if (comp != null && comp.StoredPawn != null)
|
||||
{
|
||||
Pawn pawn = comp.StoredPawn;
|
||||
// 在建筑消失前,先把Pawn生成出来
|
||||
GenSpawn.Spawn(pawn, this.Position, this.Map);
|
||||
|
||||
// 可选:对Pawn施加伤害
|
||||
if (mode == DestroyMode.KillFinalize)
|
||||
{
|
||||
pawn.TakeDamage(new DamageInfo(DamageDefOf.Bomb, 20));
|
||||
}
|
||||
}
|
||||
base.Destroy(mode);
|
||||
}
|
||||
}
|
||||
```
|
||||
**注意**: 你的Building `ThingDef` 的 `thingClass` 需要指向这个新的 `Building_Morphable` 类。
|
||||
|
||||
---
|
||||
|
||||
## 4. 流程图
|
||||
|
||||
### Pawn -> Building
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Player
|
||||
participant Pawn
|
||||
participant Gizmo
|
||||
participant JobDriver_Transforming
|
||||
|
||||
Player->>Gizmo: 点击“变形”按钮
|
||||
Gizmo->>Pawn: 分配 "Transforming" 任务
|
||||
Pawn->>JobDriver_Transforming: 开始执行任务
|
||||
JobDriver_Transforming->>JobDriver_Transforming: Toil 1: 检查空间
|
||||
JobDriver_Transforming->>JobDriver_Transforming: Toil 2: 等待 & 播放特效
|
||||
JobDriver_Transforming->>JobDriver_Transforming: Toil 3: DeSpawn Pawn, Spawn Building, Store Pawn
|
||||
JobDriver_Transforming->>Pawn: 任务结束
|
||||
```
|
||||
|
||||
### Building -> Pawn
|
||||
```mermaid
|
||||
graph TD
|
||||
subgraph Active_Trigger [主动触发]
|
||||
A[Player Clicks Gizmo] --> B{TransformBackToPawn};
|
||||
B --> C[Check Spawn Area];
|
||||
C -- OK --> E[DeSpawn Building];
|
||||
E --> F[Spawn Pawn at Position];
|
||||
end
|
||||
|
||||
subgraph Passive_Trigger [被动触发]
|
||||
H[Building HP <= 0] --> I{Override 'Destroy' method};
|
||||
I --> J[Get Stored Pawn];
|
||||
J --> K[Spawn Pawn at Position];
|
||||
K --> L[Apply Damage to Pawn];
|
||||
L --> M[Call base.Destroy()];
|
||||
end
|
||||
```
|
||||
|
||||
这份文档提供了从设计理念到具体实现的全套方案,您可以根据此指南开始编码工作。
|
||||
|
||||
---
|
||||
|
||||
## 5. 完整C#代码实现
|
||||
|
||||
以下是实现此系统所需的全部C#脚本。建议将它们放置在项目的一个新子目录中(例如 `Source/Morphable/`)。
|
||||
|
||||
### 5.1 `CompProperties_Morphable.cs`
|
||||
|
||||
```csharp
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace YourNamespace
|
||||
{
|
||||
public class CompProperties_Morphable : CompProperties
|
||||
{
|
||||
// 变形为建筑的目标ThingDef
|
||||
public ThingDef buildingDef;
|
||||
|
||||
// 从建筑恢复时,指定要生成的PawnDef(可选,为空则恢复原Pawn)
|
||||
public ThingDef pawnDef;
|
||||
|
||||
// 变形时的音效
|
||||
public SoundDef transformSound;
|
||||
|
||||
// 变形时的视觉效果
|
||||
public EffecterDef transformEffect;
|
||||
|
||||
// 变形过程所需的tick数
|
||||
public int transformTicks = 60;
|
||||
|
||||
public CompProperties_Morphable()
|
||||
{
|
||||
compClass = typeof(CompMorphable);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 5.2 `CompMorphable.cs`
|
||||
|
||||
```csharp
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
||||
namespace YourNamespace
|
||||
{
|
||||
public class CompMorphable : ThingComp
|
||||
{
|
||||
private Pawn storedPawn;
|
||||
public CompProperties_Morphable Props => (CompProperties_Morphable)props;
|
||||
|
||||
public bool IsMorphed => parent.def == Props.buildingDef;
|
||||
public Pawn StoredPawn => storedPawn;
|
||||
|
||||
public void SetStoredPawn(Pawn pawn)
|
||||
{
|
||||
this.storedPawn = pawn;
|
||||
}
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
Scribe_References.Look(ref storedPawn, "storedPawn", false);
|
||||
}
|
||||
|
||||
public override IEnumerable<Gizmo> CompGetGizmosExtra()
|
||||
{
|
||||
if (parent is Pawn pawn && pawn.Faction == Faction.OfPlayer)
|
||||
{
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "变形",
|
||||
defaultDesc = "将此单位转换为建筑形态。",
|
||||
icon = TexCommand.Attack, // TODO: Replace with a proper icon
|
||||
action = () => {
|
||||
// 添加配置验证
|
||||
if (Props.buildingDef == null)
|
||||
{
|
||||
Log.Error($"CompMorphable on {parent.def.defName} has no buildingDef defined.");
|
||||
return;
|
||||
}
|
||||
var job = JobMaker.MakeJob(JobDefOf.Your_TransformingJob, parent);
|
||||
pawn.jobs.TryTakeOrderedJob(job);
|
||||
}
|
||||
};
|
||||
}
|
||||
else if (parent is Building building && building.Faction == Faction.OfPlayer && storedPawn != null)
|
||||
{
|
||||
yield return new Command_Action
|
||||
{
|
||||
defaultLabel = "恢复人形",
|
||||
defaultDesc = "将此建筑恢复为人形。",
|
||||
icon = TexCommand.ReleaseAnimals, // TODO: Replace with a proper icon
|
||||
action = () => { TransformBackToPawn(); }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private void TransformBackToPawn()
|
||||
{
|
||||
Building building = (Building)this.parent;
|
||||
Map map = building.Map;
|
||||
|
||||
// 播放特效
|
||||
if (Props.transformEffect != null)
|
||||
{
|
||||
Effecter eff = Props.transformEffect.Spawn();
|
||||
eff.Trigger(building, building);
|
||||
}
|
||||
if (Props.transformSound != null)
|
||||
{
|
||||
Props.transformSound.PlayOneShot(new TargetInfo(building.Position, map));
|
||||
}
|
||||
|
||||
// 移除建筑
|
||||
building.DeSpawn(DestroyMode.Vanish);
|
||||
|
||||
// 重新生成Pawn
|
||||
GenSpawn.Spawn(storedPawn, building.Position, map, WipeMode.Vanish);
|
||||
|
||||
// 选中Pawn
|
||||
if (Find.Selector.IsSelected(building))
|
||||
{
|
||||
Find.Selector.Select(storedPawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 5.3 `JobDriver_Transforming.cs`
|
||||
|
||||
```csharp
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using Verse.AI;
|
||||
|
||||
namespace YourNamespace
|
||||
{
|
||||
public class JobDriver_Transforming : JobDriver
|
||||
{
|
||||
public override bool TryMakePreToilReservations(bool errorOnFailed)
|
||||
{
|
||||
return pawn.Reserve(pawn.Position, job);
|
||||
}
|
||||
|
||||
protected override IEnumerable<Toil> MakeNewToils()
|
||||
{
|
||||
this.FailOnDespawnedNullOrForbidden(TargetIndex.A);
|
||||
var comp = pawn.GetComp<CompMorphable>();
|
||||
if (comp == null) yield break;
|
||||
|
||||
// 1. 检查空间是否足够
|
||||
Toil checkSpace = Toils_General.Do(() => {
|
||||
foreach (var cell in GenRadial.RadialCellsAround(pawn.Position, comp.Props.buildingDef.Size.x / 2f, true))
|
||||
{
|
||||
if (!cell.InBounds(Map) || !cell.Walkable(Map) || cell.GetEdifice(Map) != null)
|
||||
{
|
||||
pawn.jobs.EndCurrentJob(JobCondition.Incompletable, true);
|
||||
if (pawn.Faction == Faction.OfPlayer)
|
||||
{
|
||||
Messages.Message("PawnTransformer_SpaceBlocked".Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.RejectInput, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
yield return checkSpace;
|
||||
|
||||
// 2. 等待并播放特效
|
||||
Toil waitingToil = Toils_General.Wait(comp.Props.transformTicks, TargetIndex.None)
|
||||
.WithProgressBarToilDelay(TargetIndex.A);
|
||||
|
||||
waitingToil.tickAction = () =>
|
||||
{
|
||||
if (comp.Props.transformEffect != null && pawn.IsHashIntervalTick(5))
|
||||
{
|
||||
Effecter eff = comp.Props.transformEffect.Spawn();
|
||||
eff.Trigger(pawn, pawn);
|
||||
}
|
||||
};
|
||||
if (comp.Props.transformSound != null)
|
||||
{
|
||||
waitingToil.initAction = () => { comp.Props.transformSound.PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); };
|
||||
}
|
||||
yield return waitingToil;
|
||||
|
||||
// 3. 执行核心转换
|
||||
Toil transform = Toils_General.Do(() => {
|
||||
IntVec3 position = pawn.Position;
|
||||
Map map = pawn.Map;
|
||||
|
||||
// 移除Pawn
|
||||
pawn.DeSpawn(DestroyMode.Vanish);
|
||||
|
||||
// 生成Building
|
||||
Building building = (Building)GenSpawn.Spawn(comp.Props.buildingDef, position, map, WipeMode.Vanish);
|
||||
building.SetFaction(pawn.Faction);
|
||||
|
||||
// 继承Pawn的名称
|
||||
if (pawn.Name != null)
|
||||
{
|
||||
building.TryGetComp<CompAssignableToPawn>().TryAssignPawn(pawn);
|
||||
}
|
||||
|
||||
// 存储Pawn
|
||||
var container = building.GetComp<CompThingContainer>();
|
||||
if (container != null)
|
||||
{
|
||||
container.GetDirectlyHeldThings().TryAdd(pawn);
|
||||
}
|
||||
|
||||
var newMorphComp = building.GetComp<CompMorphable>();
|
||||
if (newMorphComp != null)
|
||||
{
|
||||
newMorphComp.SetStoredPawn(pawn);
|
||||
}
|
||||
});
|
||||
yield return transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 5.4 `Building_Morphable.cs`
|
||||
|
||||
```csharp
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace YourNamespace
|
||||
{
|
||||
public class Building_Morphable : Building
|
||||
{
|
||||
public override void Destroy(DestroyMode mode)
|
||||
{
|
||||
var comp = this.GetComp<CompMorphable>();
|
||||
if (comp != null && comp.StoredPawn != null)
|
||||
{
|
||||
Pawn pawn = comp.StoredPawn;
|
||||
Map map = this.Map;
|
||||
IntVec3 position = this.Position;
|
||||
|
||||
// 在建筑消失前,先把Pawn生成出来
|
||||
GenSpawn.Spawn(pawn, position, map, WipeMode.Vanish);
|
||||
|
||||
// 如果是被摧毁,对Pawn施加伤害
|
||||
if (mode == DestroyMode.KillFinalize)
|
||||
{
|
||||
Messages.Message($"{pawn.LabelShort} 从被摧毁的建筑中弹出!", pawn, MessageTypeDefOf.NegativeEvent);
|
||||
pawn.TakeDamage(new DamageInfo(DamageDefOf.Bomb, 20, 1, -1, this));
|
||||
}
|
||||
}
|
||||
base.Destroy(mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 5.5 `JobDefOf.cs` (用于定义JobDef)
|
||||
|
||||
```csharp
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace YourNamespace
|
||||
{
|
||||
[DefOf]
|
||||
public static class JobDefOf
|
||||
{
|
||||
public static JobDef Your_TransformingJob;
|
||||
|
||||
static JobDefOf()
|
||||
{
|
||||
DefOfHelper.EnsureInitializedInCtor(typeof(JobDefOf));
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**最后,您还需要在 `Defs/JobDefs/` 目录下创建一个XML文件来定义 `Your_TransformingJob`:**
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Defs>
|
||||
<JobDef>
|
||||
<defName>Your_TransformingJob</defName>
|
||||
<driverClass>YourNamespace.JobDriver_Transforming</driverClass>
|
||||
<reportString>正在变形...</reportString>
|
||||
</JobDef>
|
||||
</Defs>
|
||||
```
|
||||