Skip to content

Commit 2bb1427

Browse files
RimWorld 1.3 support
1 parent 410049d commit 2bb1427

9 files changed

+293
-1
lines changed
11 KB
Binary file not shown.

1.2/Patches/PatchInRescueBehavior.xml

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Patch>
3+
4+
<Operation Class="PatchOperationSequence">
5+
<success>Always</success>
6+
<operations>
7+
8+
<!-- Raiders kidnapping -->
9+
<li Class="PatchOperationAdd">
10+
<xpath>/Defs/DutyDef[defName="Kidnap"]/thinkNode/subNodes</xpath>
11+
<order>Prepend</order>
12+
<value>
13+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
14+
<rescueChance>0.33</rescueChance>
15+
<searchRadius>10.0</searchRadius>
16+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
17+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
18+
<distancePriorityWeight>1.0</distancePriorityWeight>
19+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
20+
</li>
21+
</value>
22+
</li>
23+
24+
<!-- Raiders stealing -->
25+
<li Class="PatchOperationAdd">
26+
<xpath>/Defs/DutyDef[defName="Steal"]/thinkNode/subNodes</xpath>
27+
<order>Prepend</order>
28+
<value>
29+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
30+
<rescueChance>0.33</rescueChance>
31+
<searchRadius>10.0</searchRadius>
32+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
33+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
34+
<distancePriorityWeight>1.0</distancePriorityWeight>
35+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
36+
</li>
37+
</value>
38+
</li>
39+
40+
<!-- PanicFlee mental state used by raiders who fleeing in panic -->
41+
<li Class="PatchOperationAdd">
42+
<xpath>/Defs/ThinkTreeDef[defName="MentalStateNonCritical"]/thinkRoot/subNodes/li[state="PanicFlee"]/subNodes</xpath>
43+
<order>Prepend</order>
44+
<value>
45+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
46+
<rescueChance>0.5</rescueChance>
47+
<searchRadius>10.0</searchRadius>
48+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
49+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
50+
<distancePriorityWeight>1.0</distancePriorityWeight>
51+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
52+
</li>
53+
</value>
54+
</li>
55+
56+
<!-- ExitMapBest duty used by raiders who are giving up -->
57+
<li Class="PatchOperationReplace">
58+
<xpath>/Defs/DutyDef[defName="ExitMapBest"]/thinkNode</xpath>
59+
<value>
60+
<thinkNode Class="ThinkNode_Priority">
61+
<subNodes>
62+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
63+
<rescueChance>1.00</rescueChance>
64+
<searchRadius>20.0</searchRadius>
65+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
66+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
67+
<distancePriorityWeight>1.0</distancePriorityWeight>
68+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
69+
</li>
70+
<li Class="JobGiver_ExitMapBest">
71+
<defaultLocomotion>Walk</defaultLocomotion>
72+
<jobMaxDuration>300</jobMaxDuration>
73+
</li>
74+
</subNodes>
75+
</thinkNode>
76+
</value>
77+
</li>
78+
79+
<!-- ExitMapRandom duty used for fleeing pawns -->
80+
<li Class="PatchOperationReplace">
81+
<xpath>/Defs/DutyDef[defName="ExitMapRandom"]/thinkNode</xpath>
82+
<value>
83+
<thinkNode Class="ThinkNode_Priority">
84+
<subNodes>
85+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
86+
<!-- Rescue chance checked every time we try this node: once at the beginning and then once every (jobMaxDuration) ticks of the exit map job that follows (default 0.33)-->
87+
<rescueChance>0.5</rescueChance>
88+
89+
<!-- Radius to search (default 10.0) -->
90+
<searchRadius>10.0</searchRadius>
91+
92+
<!-- Remove any of the following parameters or set their value below 0.0 to remove them from calculations -->
93+
<!-- Weight of the opinion of the rescuer on target priority -->
94+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
95+
<!-- Weight of the market value of the target on target priority -->
96+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
97+
<!-- Weight of the distance to the target on target priority (divisor) -->
98+
<distancePriorityWeight>1.0</distancePriorityWeight>
99+
100+
<!-- Weight of the health of the rescuer on target search range -->
101+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
102+
</li>
103+
<li Class="JobGiver_ExitMapRandom">
104+
<defaultLocomotion>Walk</defaultLocomotion>
105+
<jobMaxDuration>300</jobMaxDuration>
106+
</li>
107+
</subNodes>
108+
</thinkNode>
109+
</value>
110+
</li>
111+
112+
<!-- ExitMapBestAndDefendSelf duty used by traders who are leaving -->
113+
<li Class="PatchOperationReplace">
114+
<xpath>/Defs/DutyDef[defName="ExitMapBestAndDefendSelf"]/thinkNode</xpath>
115+
<value>
116+
<thinkNode Class="ThinkNode_Priority">
117+
<subNodes>
118+
<li Class="JobGiver_AIDefendSelf">
119+
<targetAcquireRadius>35</targetAcquireRadius>
120+
<targetKeepRadius>40</targetKeepRadius>
121+
</li>
122+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
123+
<rescueChance>1.00</rescueChance>
124+
<searchRadius>20.0</searchRadius>
125+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
126+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
127+
<distancePriorityWeight>1.0</distancePriorityWeight>
128+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
129+
</li>
130+
<li Class="JobGiver_ExitMapBest">
131+
<defaultLocomotion>Walk</defaultLocomotion>
132+
<jobMaxDuration>120</jobMaxDuration>
133+
</li>
134+
</subNodes>
135+
</thinkNode>
136+
</value>
137+
</li>
138+
139+
</operations>
140+
</Operation>
141+
142+
</Patch>
11 KB
Binary file not shown.

1.3/Patches/PatchInRescueBehavior.xml

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Patch>
3+
4+
<Operation Class="PatchOperationSequence">
5+
<success>Always</success>
6+
<operations>
7+
8+
<!-- Raiders kidnapping -->
9+
<li Class="PatchOperationAdd">
10+
<xpath>/Defs/DutyDef[defName="Kidnap"]/thinkNode/subNodes</xpath>
11+
<order>Prepend</order>
12+
<value>
13+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
14+
<rescueChance>0.33</rescueChance>
15+
<searchRadius>10.0</searchRadius>
16+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
17+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
18+
<distancePriorityWeight>1.0</distancePriorityWeight>
19+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
20+
</li>
21+
</value>
22+
</li>
23+
24+
<!-- Raiders stealing -->
25+
<li Class="PatchOperationAdd">
26+
<xpath>/Defs/DutyDef[defName="Steal"]/thinkNode/subNodes</xpath>
27+
<order>Prepend</order>
28+
<value>
29+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
30+
<rescueChance>0.33</rescueChance>
31+
<searchRadius>10.0</searchRadius>
32+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
33+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
34+
<distancePriorityWeight>1.0</distancePriorityWeight>
35+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
36+
</li>
37+
</value>
38+
</li>
39+
40+
<!-- PanicFlee mental state used by raiders who fleeing in panic -->
41+
<li Class="PatchOperationAdd">
42+
<xpath>/Defs/ThinkTreeDef[defName="MentalStateNonCritical"]/thinkRoot/subNodes/li[state="PanicFlee"]/subNodes</xpath>
43+
<order>Prepend</order>
44+
<value>
45+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
46+
<rescueChance>0.5</rescueChance>
47+
<searchRadius>10.0</searchRadius>
48+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
49+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
50+
<distancePriorityWeight>1.0</distancePriorityWeight>
51+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
52+
</li>
53+
</value>
54+
</li>
55+
56+
<!-- ExitMapBest duty used by raiders who are giving up -->
57+
<li Class="PatchOperationReplace">
58+
<xpath>/Defs/DutyDef[defName="ExitMapBest"]/thinkNode</xpath>
59+
<value>
60+
<thinkNode Class="ThinkNode_Priority">
61+
<subNodes>
62+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
63+
<rescueChance>1.00</rescueChance>
64+
<searchRadius>20.0</searchRadius>
65+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
66+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
67+
<distancePriorityWeight>1.0</distancePriorityWeight>
68+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
69+
</li>
70+
<li Class="JobGiver_ExitMapBest">
71+
<defaultLocomotion>Walk</defaultLocomotion>
72+
<jobMaxDuration>300</jobMaxDuration>
73+
</li>
74+
</subNodes>
75+
</thinkNode>
76+
</value>
77+
</li>
78+
79+
<!-- ExitMapRandom duty used for fleeing pawns -->
80+
<li Class="PatchOperationReplace">
81+
<xpath>/Defs/DutyDef[defName="ExitMapRandom"]/thinkNode</xpath>
82+
<value>
83+
<thinkNode Class="ThinkNode_Priority">
84+
<subNodes>
85+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
86+
<!-- Rescue chance checked every time we try this node: once at the beginning and then once every (jobMaxDuration) ticks of the exit map job that follows (default 0.33)-->
87+
<rescueChance>0.5</rescueChance>
88+
89+
<!-- Radius to search (default 10.0) -->
90+
<searchRadius>10.0</searchRadius>
91+
92+
<!-- Remove any of the following parameters or set their value below 0.0 to remove them from calculations -->
93+
<!-- Weight of the opinion of the rescuer on target priority -->
94+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
95+
<!-- Weight of the market value of the target on target priority -->
96+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
97+
<!-- Weight of the distance to the target on target priority (divisor) -->
98+
<distancePriorityWeight>1.0</distancePriorityWeight>
99+
100+
<!-- Weight of the health of the rescuer on target search range -->
101+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
102+
</li>
103+
<li Class="JobGiver_ExitMapRandom">
104+
<defaultLocomotion>Walk</defaultLocomotion>
105+
<jobMaxDuration>300</jobMaxDuration>
106+
</li>
107+
</subNodes>
108+
</thinkNode>
109+
</value>
110+
</li>
111+
112+
<!-- ExitMapBestAndDefendSelf duty used by traders who are leaving -->
113+
<li Class="PatchOperationReplace">
114+
<xpath>/Defs/DutyDef[defName="ExitMapBestAndDefendSelf"]/thinkNode</xpath>
115+
<value>
116+
<thinkNode Class="ThinkNode_Priority">
117+
<subNodes>
118+
<li Class="JobGiver_AIDefendSelf">
119+
<targetAcquireRadius>35</targetAcquireRadius>
120+
<targetKeepRadius>40</targetKeepRadius>
121+
</li>
122+
<li Class="CM_No_Pawn_Left_Behind.JobGiver_Rescue">
123+
<rescueChance>1.00</rescueChance>
124+
<searchRadius>20.0</searchRadius>
125+
<opinionPriorityWeight>1.0</opinionPriorityWeight>
126+
<marketValuePriorityWeight>1.0</marketValuePriorityWeight>
127+
<distancePriorityWeight>1.0</distancePriorityWeight>
128+
<healthSearchDistanceWeight>1.0</healthSearchDistanceWeight>
129+
</li>
130+
<li Class="JobGiver_ExitMapBest">
131+
<defaultLocomotion>Walk</defaultLocomotion>
132+
<jobMaxDuration>120</jobMaxDuration>
133+
</li>
134+
</subNodes>
135+
</thinkNode>
136+
</value>
137+
</li>
138+
139+
</operations>
140+
</Operation>
141+
142+
</Patch>

About/About.xml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<url>https://github.com/CaptainMuscles/CM_No_Pawn_Left_Behind</url>
77
<supportedVersions>
88
<li>1.2</li>
9+
<li>1.3</li>
910
</supportedVersions>
1011
<description>Would you sit idly by and leave your friends to die? Now your enemies won't either (maybe).
1112

About/Manifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<Manifest>
33
<identifier>CaptainMuscles.NoPawnLeftBehind</identifier>
4-
<version>1.1.0</version>
4+
<version>1.1.1</version>
55
<dependencies>
66
<li>Ludeon.RimWorld</li>
77
</dependencies>

About/PublishedFileId.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2401146569

Assemblies/CM_No_Pawn_Left_Behind.dll

0 Bytes
Binary file not shown.

Changelog.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.1.1] - 2021-07-23
2+
3+
### Added
4+
- Support for RimWorld version 1.3
5+
6+
17
## [1.1.0] - 2021-03-15
28

39
### Added

0 commit comments

Comments
 (0)