修
This commit is contained in:
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<Defs>
|
<Defs>
|
||||||
<!-- 自定义袭击定义 -->
|
<!-- 自定义袭击定义,defname是硬编码指定不能更改 -->
|
||||||
<ArachnaeSwarm.CustomRaidDef>
|
<ArachnaeSwarm.CustomRaidDef>
|
||||||
<defName>ARA_Stage1_Raid</defName>
|
<defName>ARA_SpecialAttack</defName>
|
||||||
<factionDef>ARA_Hostile_Hive</factionDef>
|
<factionDef>ARA_Hostile_Hive</factionDef>
|
||||||
<pointWavePools>
|
<pointWavePools>
|
||||||
<li>
|
<li>
|
||||||
@@ -56,6 +56,9 @@
|
|||||||
<defName>ARA_Wave_Scout_Patrol</defName>
|
<defName>ARA_Wave_Scout_Patrol</defName>
|
||||||
<label>侦察巡逻队</label>
|
<label>侦察巡逻队</label>
|
||||||
<description>一支小型侦察队伍,主要由远程单位组成,进行骚扰射击</description>
|
<description>一支小型侦察队伍,主要由远程单位组成,进行骚扰射击</description>
|
||||||
|
<possibleArrivalModes>
|
||||||
|
<li>CenterDrop</li>
|
||||||
|
</possibleArrivalModes>
|
||||||
<pawnComposition>
|
<pawnComposition>
|
||||||
<li>
|
<li>
|
||||||
<pawnKind>ARA_Raid_Shooter</pawnKind>
|
<pawnKind>ARA_Raid_Shooter</pawnKind>
|
||||||
@@ -77,6 +80,9 @@
|
|||||||
<defName>ARA_Wave_Assault_Team</defName>
|
<defName>ARA_Wave_Assault_Team</defName>
|
||||||
<label>突击小队</label>
|
<label>突击小队</label>
|
||||||
<description>以近战单位为主的快速突击队伍,擅长冲锋陷阵</description>
|
<description>以近战单位为主的快速突击队伍,擅长冲锋陷阵</description>
|
||||||
|
<possibleArrivalModes>
|
||||||
|
<li>CenterDrop</li>
|
||||||
|
</possibleArrivalModes>
|
||||||
<pawnComposition>
|
<pawnComposition>
|
||||||
<li>
|
<li>
|
||||||
<pawnKind>ARA_Raid_Assault</pawnKind>
|
<pawnKind>ARA_Raid_Assault</pawnKind>
|
||||||
@@ -98,6 +104,9 @@
|
|||||||
<defName>ARA_Wave_Acid_Swarm</defName>
|
<defName>ARA_Wave_Acid_Swarm</defName>
|
||||||
<label>酸液虫群</label>
|
<label>酸液虫群</label>
|
||||||
<description>大量酸噬种辅虫组成的虫海战术,数量庞大但个体脆弱</description>
|
<description>大量酸噬种辅虫组成的虫海战术,数量庞大但个体脆弱</description>
|
||||||
|
<possibleArrivalModes>
|
||||||
|
<li>CenterDrop</li>
|
||||||
|
</possibleArrivalModes>
|
||||||
<pawnComposition>
|
<pawnComposition>
|
||||||
<li>
|
<li>
|
||||||
<pawnKind>ARA_Raid_AcidSwarm</pawnKind>
|
<pawnKind>ARA_Raid_AcidSwarm</pawnKind>
|
||||||
@@ -119,6 +128,9 @@
|
|||||||
<defName>ARA_Wave_Heavy_Defense</defName>
|
<defName>ARA_Wave_Heavy_Defense</defName>
|
||||||
<label>重装防御队</label>
|
<label>重装防御队</label>
|
||||||
<description>以盾头种为主的防御型队伍,移动缓慢但防御力强</description>
|
<description>以盾头种为主的防御型队伍,移动缓慢但防御力强</description>
|
||||||
|
<possibleArrivalModes>
|
||||||
|
<li>CenterDrop</li>
|
||||||
|
</possibleArrivalModes>
|
||||||
<pawnComposition>
|
<pawnComposition>
|
||||||
<li>
|
<li>
|
||||||
<pawnKind>ARA_Raid_Heavy</pawnKind>
|
<pawnKind>ARA_Raid_Heavy</pawnKind>
|
||||||
@@ -140,13 +152,15 @@
|
|||||||
<maxCount>8</maxCount>
|
<maxCount>8</maxCount>
|
||||||
</li>
|
</li>
|
||||||
</pawnComposition>
|
</pawnComposition>
|
||||||
<strategy>Defensive</strategy> <!-- 防御战术 -->
|
|
||||||
</ArachnaeSwarm.RaidWaveDef>
|
</ArachnaeSwarm.RaidWaveDef>
|
||||||
<!-- 波次5: 混合部队 -->
|
<!-- 波次5: 混合部队 -->
|
||||||
<ArachnaeSwarm.RaidWaveDef>
|
<ArachnaeSwarm.RaidWaveDef>
|
||||||
<defName>ARA_Wave_Mixed_Forces</defName>
|
<defName>ARA_Wave_Mixed_Forces</defName>
|
||||||
<label>混合部队</label>
|
<label>混合部队</label>
|
||||||
<description>均衡配置的混合部队,包含各种单位类型</description>
|
<description>均衡配置的混合部队,包含各种单位类型</description>
|
||||||
|
<possibleArrivalModes>
|
||||||
|
<li>CenterDrop</li>
|
||||||
|
</possibleArrivalModes>
|
||||||
<pawnComposition>
|
<pawnComposition>
|
||||||
<li>
|
<li>
|
||||||
<pawnKind>ARA_Raid_Assault</pawnKind>
|
<pawnKind>ARA_Raid_Assault</pawnKind>
|
||||||
@@ -174,7 +188,6 @@
|
|||||||
<DefaultUnit>true</DefaultUnit>
|
<DefaultUnit>true</DefaultUnit>
|
||||||
</li>
|
</li>
|
||||||
</pawnComposition>
|
</pawnComposition>
|
||||||
<strategy>Balanced</strategy> <!-- 均衡战术 -->
|
|
||||||
</ArachnaeSwarm.RaidWaveDef>
|
</ArachnaeSwarm.RaidWaveDef>
|
||||||
|
|
||||||
<!-- 事件定义 -->
|
<!-- 事件定义 -->
|
||||||
|
|||||||
Binary file not shown.
@@ -5,6 +5,10 @@
|
|||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\storyteller\\incidentworker_customraid.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\storyteller\\incidentworker_customraid.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:storyteller\\incidentworker_customraid.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:storyteller\\incidentworker_customraid.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\storyteller\\raidwavedef.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||||
|
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:storyteller\\raidwavedef.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"DocumentGroupContainers": [
|
"DocumentGroupContainers": [
|
||||||
@@ -14,21 +18,34 @@
|
|||||||
"DocumentGroups": [
|
"DocumentGroups": [
|
||||||
{
|
{
|
||||||
"DockedWidth": 200,
|
"DockedWidth": 200,
|
||||||
"SelectedChildIndex": 1,
|
"SelectedChildIndex": 2,
|
||||||
"Children": [
|
"Children": [
|
||||||
{
|
{
|
||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 1,
|
||||||
|
"Title": "RaidWaveDef.cs",
|
||||||
|
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Storyteller\\RaidWaveDef.cs",
|
||||||
|
"RelativeDocumentMoniker": "Storyteller\\RaidWaveDef.cs",
|
||||||
|
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Storyteller\\RaidWaveDef.cs*",
|
||||||
|
"RelativeToolTip": "Storyteller\\RaidWaveDef.cs*",
|
||||||
|
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAA9AAAAAAAAAA==",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
|
"WhenOpened": "2025-10-16T09:14:26.956Z",
|
||||||
|
"EditorCaption": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 0,
|
"DocumentIndex": 0,
|
||||||
"Title": "IncidentWorker_CustomRaid.cs",
|
"Title": "IncidentWorker_CustomRaid.cs",
|
||||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Storyteller\\IncidentWorker_CustomRaid.cs",
|
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Storyteller\\IncidentWorker_CustomRaid.cs",
|
||||||
"RelativeDocumentMoniker": "Storyteller\\IncidentWorker_CustomRaid.cs",
|
"RelativeDocumentMoniker": "Storyteller\\IncidentWorker_CustomRaid.cs",
|
||||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Storyteller\\IncidentWorker_CustomRaid.cs",
|
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Storyteller\\IncidentWorker_CustomRaid.cs*",
|
||||||
"RelativeToolTip": "Storyteller\\IncidentWorker_CustomRaid.cs",
|
"RelativeToolTip": "Storyteller\\IncidentWorker_CustomRaid.cs*",
|
||||||
"ViewState": "AgIAAAYBAAAAAAAAAAAgwBYBAAAyAAAAAAAAAA==",
|
"ViewState": "AgIAAHgBAAAAAAAAAAA1wJIBAAAfAAAAAAAAAA==",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||||
"WhenOpened": "2025-10-16T07:14:58.682Z",
|
"WhenOpened": "2025-10-16T07:14:58.682Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
|
|||||||
@@ -381,9 +381,35 @@ namespace ArachnaeSwarm
|
|||||||
Log.Message($"Raid arrival mode already set: {parms.raidArrivalMode.defName}");
|
Log.Message($"Raid arrival mode already set: {parms.raidArrivalMode.defName}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 对于自定义袭击,默认使用边缘进入
|
// 从自定义波次定义中获取进场方式
|
||||||
|
RaidWaveDef waveDef = parms.GetCustomRaidWave();
|
||||||
|
if (waveDef != null)
|
||||||
|
{
|
||||||
|
// 如果波次定义了多个可能的进场方式
|
||||||
|
if (waveDef.possibleArrivalModes != null && waveDef.possibleArrivalModes.Count > 0)
|
||||||
|
{
|
||||||
|
PawnsArrivalModeDef selectedMode;
|
||||||
|
selectedMode = waveDef.possibleArrivalModes.RandomElement();
|
||||||
|
|
||||||
|
parms.raidArrivalMode = selectedMode;
|
||||||
|
Log.Message($"Set random raid arrival mode from waveDef: {parms.raidArrivalMode.defName}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 回退到派系特定的逻辑
|
||||||
|
Faction faction = parms.faction;
|
||||||
|
if (faction?.def?.defName == "ARA_Hostile_Hive")
|
||||||
|
{
|
||||||
|
// 阿拉克涅虫群默认使用空投
|
||||||
|
parms.raidArrivalMode = PawnsArrivalModeDefOf.CenterDrop;
|
||||||
|
Log.Message($"Set ARA_Hostile_Hive default raid arrival mode: {parms.raidArrivalMode.defName}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 默认使用边缘进入
|
||||||
parms.raidArrivalMode = PawnsArrivalModeDefOf.EdgeWalkIn;
|
parms.raidArrivalMode = PawnsArrivalModeDefOf.EdgeWalkIn;
|
||||||
Log.Message($"Set raid arrival mode: {parms.raidArrivalMode.defName}");
|
Log.Message($"Set default raid arrival mode: {parms.raidArrivalMode.defName}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 可选:重写其他方法以提供更好的调试信息
|
// 可选:重写其他方法以提供更好的调试信息
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using RimWorld;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Verse;
|
using Verse;
|
||||||
|
|
||||||
@@ -6,6 +7,7 @@ namespace ArachnaeSwarm
|
|||||||
public class RaidWaveDef : Def
|
public class RaidWaveDef : Def
|
||||||
{
|
{
|
||||||
public List<PawnComposition> pawnComposition;
|
public List<PawnComposition> pawnComposition;
|
||||||
|
public List<PawnsArrivalModeDef> possibleArrivalModes;
|
||||||
|
|
||||||
public override IEnumerable<string> ConfigErrors()
|
public override IEnumerable<string> ConfigErrors()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user