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 >
0 commit comments