This commit is contained in:
2026-01-23 12:04:23 +08:00
parent 3c9ddc4c60
commit 51ba45982f
34 changed files with 1665 additions and 432 deletions

View File

@@ -1102,6 +1102,26 @@
</subNodes>
</li>
<!-- 特殊处理——非生产者生产会使用单元逻辑 -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
<li Class="ArachnaeSwarm.ThinkNode_ConditionalNotProducedByMechCarrier">
<subNodes>
<li Class="JobGiver_AIFightEnemies">
<targetAcquireRadius>100</targetAcquireRadius>
<targetKeepRadius>100</targetKeepRadius>
</li>
<li Class="JobGiver_AITrashColonyClose" />
<li Class="JobGiver_AITrashBuildingsDistant" />
<li Class="JobGiver_AIGotoNearestHostile" />
<li Class="JobGiver_AITrashBuildingsDistant">
<attackAllInert>true</attackAllInert>
</li>
<li Class="JobGiver_WanderAnywhere" />
</subNodes>
</li>
</subNodes>
</li>
<!-- 特殊处理——如果生产者被征召会跟随pawn -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
@@ -1442,6 +1462,26 @@
</subNodes>
</li>
<!-- 特殊处理——非生产者生产会使用单元逻辑 -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
<li Class="ArachnaeSwarm.ThinkNode_ConditionalNotProducedByMechCarrier">
<subNodes>
<li Class="JobGiver_AIFightEnemies">
<targetAcquireRadius>100</targetAcquireRadius>
<targetKeepRadius>100</targetKeepRadius>
</li>
<li Class="JobGiver_AITrashColonyClose" />
<li Class="JobGiver_AITrashBuildingsDistant" />
<li Class="JobGiver_AIGotoNearestHostile" />
<li Class="JobGiver_AITrashBuildingsDistant">
<attackAllInert>true</attackAllInert>
</li>
<li Class="JobGiver_WanderAnywhere" />
</subNodes>
</li>
</subNodes>
</li>
<!-- 特殊处理——如果生产者被征召会跟随pawn -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
@@ -2305,6 +2345,26 @@
</subNodes>
</li>
<!-- 特殊处理——非生产者生产会使用单元逻辑 -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
<li Class="ArachnaeSwarm.ThinkNode_ConditionalNotProducedByMechCarrier">
<subNodes>
<li Class="JobGiver_AIFightEnemies">
<targetAcquireRadius>100</targetAcquireRadius>
<targetKeepRadius>100</targetKeepRadius>
</li>
<li Class="JobGiver_AITrashColonyClose" />
<li Class="JobGiver_AITrashBuildingsDistant" />
<li Class="JobGiver_AIGotoNearestHostile" />
<li Class="JobGiver_AITrashBuildingsDistant">
<attackAllInert>true</attackAllInert>
</li>
<li Class="JobGiver_WanderAnywhere" />
</subNodes>
</li>
</subNodes>
</li>
<!-- 特殊处理——如果生产者被征召会跟随pawn -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
@@ -2559,6 +2619,26 @@
</subNodes>
</li>
<!-- 特殊处理——非生产者生产会使用单元逻辑 -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
<li Class="ArachnaeSwarm.ThinkNode_ConditionalNotProducedByMechCarrier">
<subNodes>
<li Class="JobGiver_AIFightEnemies">
<targetAcquireRadius>100</targetAcquireRadius>
<targetKeepRadius>100</targetKeepRadius>
</li>
<li Class="JobGiver_AITrashColonyClose" />
<li Class="JobGiver_AITrashBuildingsDistant" />
<li Class="JobGiver_AIGotoNearestHostile" />
<li Class="JobGiver_AITrashBuildingsDistant">
<attackAllInert>true</attackAllInert>
</li>
<li Class="JobGiver_WanderAnywhere" />
</subNodes>
</li>
</subNodes>
</li>
<!-- 特殊处理——如果生产者被征召会跟随pawn -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
@@ -2691,6 +2771,313 @@
</subNodes>
</thinkRoot>
</ThinkTreeDef>
<ThinkTreeDef>
<defName>ARA_Insect_Locust_Thinktree</defName>
<thinkRoot Class="ThinkNode_Priority">
<subNodes>
<!-- Keep lying down if we have to -->
<li Class="ThinkNode_ConditionalMustKeepLyingDown">
<subNodes>
<!-- Do a queued job if possible -->
<li Class="ThinkNode_QueuedJob">
<inBedOnly>true</inBedOnly>
</li>
<!-- Keep lying down -->
<li Class="JobGiver_KeepLyingDown"/>
</subNodes>
</li>
<li Class="ThinkNode_Subtree">
<treeDef>Downed</treeDef>
</li>
<li Class="ThinkNode_Subtree">
<treeDef>BurningResponse</treeDef>
</li>
<li Class="ThinkNode_Subtree">
<treeDef>MentalStateCritical</treeDef>
</li>
<!-- React to close melee threat -->
<li Class="JobGiver_ReactToCloseMeleeThreat">
<maxDistance>2.9</maxDistance>
</li>
<!-- Do a queued job -->
<li Class="ThinkNode_QueuedJob"/>
<!-- Mental state non critical -->
<li Class="ThinkNode_Subtree">
<treeDef>MentalStateNonCritical</treeDef>
</li>
<!-- Forced goto -->
<li Class="ThinkNode_ConditionalForcedGoto">
<subNodes>
<li Class="ThinkNode_Tagger">
<tagToGive>Misc</tagToGive>
<subNodes>
<li Class="JobGiver_ForcedGoto"/>
</subNodes>
</li>
</subNodes>
</li>
<!-- Behavior when roped -->
<li Class="ThinkNode_Subtree">
<treeDef>RopedPawn</treeDef>
</li>
<!-- Lord directives -->
<li Class="ThinkNode_Subtree">
<treeDef>LordDuty</treeDef>
</li>
<li Class="ThinkNode_ConditionalHasFaction">
<invert>true</invert>
<subNodes>
<!-- Wild insects with no lord will fight nearby enemies -->
<li Class="JobGiver_AIFightEnemies">
<targetAcquireRadius>30</targetAcquireRadius> <!-- Same as DefendAndExpandHive -->
<targetKeepRadius>35</targetKeepRadius>
</li>
<!-- Wild insects leave map in some conditions -->
<li Class="ThinkNode_Subtree">
<treeDef>LeaveIfWrongSeason</treeDef>
</li>
<li Class="ThinkNode_Subtree">
<treeDef>LeaveIfStarving</treeDef>
</li>
<!-- Wild insects randomly leave map -->
<li Class="ThinkNode_ChancePerHour_Constant">
<mtbDays>60</mtbDays>
<subNodes>
<li Class="ThinkNode_Tagger">
<tagToGive>Misc</tagToGive>
<subNodes>
<li Class="JobGiver_ExitMapRandom">
<defaultLocomotion>Walk</defaultLocomotion>
</li>
</subNodes>
</li>
</subNodes>
</li>
</subNodes>
</li>
<!-- Insects of a faction that's not the players without a lord leave randomly -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<invert>true</invert>
<subNodes>
<li Class="ThinkNode_ConditionalHasFaction">
<subNodes>
<li Class="ThinkNode_ConditionalNoLord">
<subNodes>
<li Class="ThinkNode_ChancePerHour_Constant">
<mtbDays>60</mtbDays>
<subNodes>
<li Class="ThinkNode_Tagger">
<tagToGive>Misc</tagToGive>
<subNodes>
<li Class="JobGiver_ExitMapRandom">
<defaultLocomotion>Walk</defaultLocomotion>
</li>
</subNodes>
</li>
</subNodes>
</li>
</subNodes>
</li>
</subNodes>
</li>
</subNodes>
</li>
<!-- 特殊处理——非生产者生产会使用单元逻辑 -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
<li Class="ArachnaeSwarm.ThinkNode_ConditionalNotProducedByMechCarrier">
<subNodes>
<li Class="JobGiver_FleeForDistance">
<enemyDistToFleeRange>2.9~7.9</enemyDistToFleeRange>
<fleeDistRange>13.5~20</fleeDistRange>
</li>
<!-- React to close melee threat -->
<li Class="JobGiver_ReactToCloseMeleeThreat">
<maxDistance>2.9</maxDistance>
</li>
<!-- Fire spikes at distant enemies -->
<li Class="JobGiver_AIAbilityFight">
<targetAcquireRadius>65</targetAcquireRadius>
<targetKeepRadius>72</targetKeepRadius>
<skipIfCantTargetNow>true</skipIfCantTargetNow>
<ability>ARA_Locust_Needle_Fire</ability>
<allowTurrets>true</allowTurrets>
<needLOSToAcquireNonPawnTargets>true</needLOSToAcquireNonPawnTargets>
</li>
<li Class="JobGiver_AITrashColonyClose" />
<li Class="JobGiver_AITrashBuildingsDistant" />
<li Class="JobGiver_AIGotoNearestHostile" />
<li Class="JobGiver_AITrashBuildingsDistant">
<attackAllInert>true</attackAllInert>
</li>
<li Class="JobGiver_WanderAnywhere" />
</subNodes>
</li>
</subNodes>
</li>
<!-- 特殊处理——如果生产者被征召会跟随pawn -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
<li Class="ArachnaeSwarm.ThinkNode_ConditionalShouldFollowProducer">
<subNodes>
<!-- <li Class="ArachnaeSwarm.JobGiver_AIDefendProducer">
<attackMeleeThreatEvenIfNotHostile>true</attackMeleeThreatEvenIfNotHostile>
<defendRadius>100</defendRadius>
</li> -->
<!-- Keep distance -->
<li Class="JobGiver_FleeForDistance">
<enemyDistToFleeRange>2.9~7.9</enemyDistToFleeRange>
<fleeDistRange>13.5~20</fleeDistRange>
</li>
<!-- React to close melee threat -->
<li Class="JobGiver_ReactToCloseMeleeThreat">
<maxDistance>2.9</maxDistance>
</li>
<!-- Fire spikes at distant enemies -->
<li Class="JobGiver_AIAbilityFight">
<targetAcquireRadius>65</targetAcquireRadius>
<targetKeepRadius>72</targetKeepRadius>
<skipIfCantTargetNow>true</skipIfCantTargetNow>
<ability>ARA_Locust_Needle_Fire</ability>
<allowTurrets>true</allowTurrets>
<needLOSToAcquireNonPawnTargets>true</needLOSToAcquireNonPawnTargets>
</li>
<li Class="ArachnaeSwarm.JobGiver_AIFollowProducer"/>
<li Class="ArachnaeSwarm.JobGiver_WanderNearProducer"/>
</subNodes>
</li>
<!-- Take care of critical needs (below rescue - so heroic!)-->
<li Class="ThinkNode_Tagger">
<tagToGive>RestingForMedicalReasons</tagToGive>
<subNodes>
<li Class="JobGiver_PatientGoToBed"/>
</subNodes>
</li>
<li Class="JobGiver_SeekAllowedArea"/>
<li Class="JobGiver_SeekSafeTemperature"/>
</subNodes>
</li>
<!-- Satisfy basic needs -->
<li Class="ThinkNode_Subtree">
<treeDef>SatisfyBasicNeeds</treeDef>
</li>
<!-- Tame animal: wander near colony if possible -->
<li Class="ThinkNode_ConditionalOfPlayerFaction">
<subNodes>
<li Class="ThinkNode_Tagger">
<tagToGive>Idle</tagToGive>
<subNodes>
<!-- Wander near your current position if in hostile map -->
<li Class="ThinkNode_ConditionalAnyEnemyInHostileMap">
<subNodes>
<li Class="JobGiver_WanderAnywhere">
<maxDanger>None</maxDanger>
<ticksBetweenWandersRange>160~300</ticksBetweenWandersRange>
</li>
</subNodes>
</li>
<li Class="ThinkNode_ConditionalRoamer">
<subNodes>
<li Class="JobGiver_WanderInRoofedCellsInPen">
<maxDanger>None</maxDanger>
<ticksBetweenWandersRange>160~300</ticksBetweenWandersRange>
<expiryInterval>1200</expiryInterval>
</li>
<!-- tame roamers should not wander too far, and if unenclosed wander near a suitable pen marker 10% of the time -->
<li Class="ThinkNode_ConditionalRandom">
<chance>0.1</chance>
<subNodes>
<li Class="JobGiver_WanderInPen">
<maxDanger>None</maxDanger>
<ticksBetweenWandersRange>160~300</ticksBetweenWandersRange>
<expiryInterval>1200</expiryInterval>
</li>
</subNodes>
</li>
<li Class="JobGiver_WanderAnywhere">
<maxDanger>None</maxDanger>
<ticksBetweenWandersRange>160~300</ticksBetweenWandersRange>
</li>
</subNodes>
</li>
<!-- Wander near colony -->
<li Class="JobGiver_WanderColony">
<maxDanger>None</maxDanger>
<ticksBetweenWandersRange>160~300</ticksBetweenWandersRange>
</li>
</subNodes>
</li>
</subNodes>
</li>
<!-- Of neutral faction: rest and then exit the map -->
<li Class="ThinkNode_ConditionalNonPlayerNonHostileFaction">
<subNodes>
<li Class="ThinkNode_Tagger">
<tagToGive>RestingForMedicalReasons</tagToGive>
<subNodes>
<li Class="JobGiver_PatientGoToBed" />
</subNodes>
</li>
<li Class="ThinkNode_Tagger">
<tagToGive>Misc</tagToGive>
<subNodes>
<li Class="JobGiver_ExitMapBest">
<defaultLocomotion>Walk</defaultLocomotion>
</li>
</subNodes>
</li>
</subNodes>
</li>
<!-- Wander -->
<li Class="ThinkNode_Tagger">
<tagToGive>Idle</tagToGive>
<subNodes>
<li Class="ThinkNode_ConditionalHerdAnimal">
<subNodes>
<li Class="JobGiver_WanderHerd">
<maxDanger>Deadly</maxDanger>
<ticksBetweenWandersRange>160~300</ticksBetweenWandersRange>
</li>
</subNodes>
</li>
<li Class="JobGiver_WanderAnywhere">
<maxDanger>Deadly</maxDanger>
<ticksBetweenWandersRange>160~300</ticksBetweenWandersRange>
</li>
</subNodes>
</li>
<li Class="JobGiver_IdleError"/>
</subNodes>
</thinkRoot>
</ThinkTreeDef>
<ThinkTreeDef>
<defName>ARA_Humanlike</defName> <!-- 更改defName以避免与原版Humanlike冲突 -->