NepCTF 2022 MISC <签到题>(极限套娃)

该博客分享了一道NepCTF 2022 MISC的签到题,涉及图片隐写、Python脚本和USB流量分析。作者通过层层解压嵌套的zip文件,最终分析键盘流量数据包以解密信息。使用binwalk、Wireshark、tshark和正则表达式进行分析,并解析键盘流量数据。尽管存在干扰项,但通过对照键位表,成功完成挑战。这道题适合初学者,展现了多种安全技术的应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

题目链接:CTFm

这道题融合了图片隐写、py脚本编写和usb流量分析

下载题目附件,是个gz压缩包,无加密直接打开,里面是一张图片


图片长这样

盲猜图片隐写,打开虚拟机使用binwalk工具康康,确实有多文件包含,binwalk -e xxx.jpg

进行文件分离。得到如下文件。

         这里“极限套娃”的面目显露出来了,zip里再次嵌套了zip,一直套了老多层,不慌,写个脚本给它全解压了

exp.py

import os
import zipfile

dir = "D:\\迅雷下载\\新\\"

n = 0
s2 = ""


def jieya():
    i = 232
    for x in range(10000):
        print(i)
        zpf = zipfile.ZipFile(dir + str(i) + ".zip")
        list = zpf.namelist()  # 得到压缩包里所有文件
        for f in list:
            zpf.
<?xml version="1.0" encoding="utf-8"?> <Defs> <!-- Mutations --> <HediffDef Name="AddedMutationBase" ParentName="AddedBodyPartBase" Abstract="True"> <organicAddedBodypart>true</organicAddedBodypart> </HediffDef> <HediffDef ParentName="AddedMutationBase"> <defName>FleshmassStomach</defName> <label>fleshmass stomach</label> <labelNoun>a fleshmass stomach</labelNoun> <description>A cancerous mass of semi-sentient flesh. The harsh acid it produces is painful, but strong enough to prevent most food poisoning.\n\nThe organ has its own neural structures and may become dangerous if removed.</description> <defaultInstallPart>Stomach</defaultInstallPart> <stages> <li> <painOffset>0.08</painOffset> <foodPoisoningChanceFactor>0</foodPoisoningChanceFactor> <makeImmuneTo> <li>GutWorms</li> </makeImmuneTo> </li> </stages> <addedPartProps> <solid>true</solid> </addedPartProps> <comps> <li Class="HediffCompProperties_FleshbeastEmerge"> <letterLabel>Fleshmass operation</letterLabel> <letterText>Attempting to remove {PAWN_nameDef}'s fleshmass stomach has caused the twisting mass of flesh to attack. The fleshmass has detached from {PAWN_nameDef} and transformed into a fleshbeast!</letterText> </li> </comps> </HediffDef> <HediffDef ParentName="AddedMutationBase"> <defName>FleshmassLung</defName> <label>fleshmass lung</label> <labelNoun>a fleshmass lung</labelNoun> <description>A cancerous mass of semi-sentient flesh. The tissue constantly regrows and replaces itself, making it immune to effects like lung rot and asthma.\n\nThe organ has its own neural structures and may become dangerous if removed.</description> <preventsLungRot>true</preventsLungRot> <defaultInstallPart>Lung</defaultInstallPart> <stages> <li> <painOffset>0.06</painOffset> <statOffsets> <ToxicEnvironmentResistance>0.3</ToxicEnvironmentResistance> </statOffsets> </li> </stages> <addedPartProps> <solid>true</solid> </addedPartProps> <comps> <li Class="HediffCompProperties_FleshbeastEmerge"> <letterLabel>Fleshmass operation</letterLabel> <letterText>Attempting to remove {PAWN_nameDef}'s fleshmass lung has caused the twisting mass of flesh to attack. The fleshmass has detached from {PAWN_nameDef} and transformed into a fleshbeast!</letterText> </li> </comps> </HediffDef> <HediffDef ParentName="AddedMutationBase"> <defName>Tentacle</defName> <label>flesh tentacle</label> <labelNoun>a flesh tentacle</labelNoun> <description>A fleshy, muscled tentacle resembling a partial transformation into a fleshbeast. The tentacle is excellent at manipulation.\n\nThe flesh tentacle has its own neural structures and may become dangerous if removed.</description> <defaultInstallPart>Shoulder</defaultInstallPart> <stages> <li> <statOffsets> <PawnBeauty>-1</PawnBeauty> </statOffsets> </li> </stages> <renderNodeProperties> <li Class="PawnRenderNodeProperties_Spastic"> <texPaths> <li>Things/Pawn/Humanlike/BodyAttachments/TentacleLimb/TentacleLimbA</li> <li>Things/Pawn/Humanlike/BodyAttachments/TentacleLimb/TentacleLimbB</li> <li>Things/Pawn/Humanlike/BodyAttachments/TentacleLimb/TentacleLimbC</li> </texPaths> <parentTagDef>Body</parentTagDef> <overrideMeshSize>1</overrideMeshSize> <drawSize>1.3</drawSize> <colorType>Skin</colorType> <rotDrawMode>Fresh, Rotting</rotDrawMode> <useSkinShader>true</useSkinShader> <useRottenColor>true</useRottenColor> <rotationRange>-30~30</rotationRange> <durationTicksRange>10~35</durationTicksRange> <nextSpasmTicksRange>10~50</nextSpasmTicksRange> <drawData> <scaleOffsetByBodySize>true</scaleOffsetByBodySize> <useBodyPartAnchor>true</useBodyPartAnchor> <childScale>0.7</childScale> <bodyTypeScales> <Hulk>1.2</Hulk> <Fat>1.4</Fat> <Thin>0.8</Thin> </bodyTypeScales> <defaultData> <layer>49</layer> </defaultData> <dataNorth> <rotationOffset>310</rotationOffset> <flip>true</flip> <layer>0</layer> </dataNorth> <dataEast> <rotationOffset>270</rotationOffset> <flip>true</flip> </dataEast> <dataSouth> <rotationOffset>220</rotationOffset> </dataSouth> <dataWest> <rotationOffset>270</rotationOffset> </dataWest> </drawData> </li> </renderNodeProperties> <addedPartProps> <solid>true</solid> <partEfficiency>1.20</partEfficiency> </addedPartProps> <comps> <li Class="HediffCompProperties_FleshbeastEmerge"> <letterLabel>Fleshmass operation</letterLabel> <letterText>Attempting to remove {PAWN_nameDef}'s tentacle has caused the twisting mass of flesh to attack. The fleshmass has detached from {PAWN_nameDef} and transformed into a fleshbeast!</letterText> </li> </comps> </HediffDef> <HediffDef ParentName="AddedMutationBase"> <defName>FleshWhip</defName> <label>flesh whip</label> <labelNoun>a flesh whip</labelNoun> <description>A fleshy, muscled tentacle with a blade at the end. The flesh whip makes an excellent melee weapon.\n\nIt has its own neural structures and may become dangerous if removed.</description> <defaultInstallPart>Shoulder</defaultInstallPart> <stages> <li> <statOffsets> <PawnBeauty>-1</PawnBeauty> </statOffsets> </li> </stages> <renderNodeProperties> <li Class="PawnRenderNodeProperties_Spastic"> <texPaths> <li>Things/Pawn/Humanlike/BodyAttachments/FleshWhipLimb/FleshWhipLimbA</li> <li>Things/Pawn/Humanlike/BodyAttachments/FleshWhipLimb/FleshWhipLimbB</li> <li>Things/Pawn/Humanlike/BodyAttachments/FleshWhipLimb/FleshWhipLimbC</li> <li>Things/Pawn/Humanlike/BodyAttachments/FleshWhipLimb/FleshWhipLimbD</li> </texPaths> <parentTagDef>Body</parentTagDef> <overrideMeshSize>1</overrideMeshSize> <drawSize>1.4</drawSize> <colorType>Skin</colorType> <rotDrawMode>Fresh, Rotting</rotDrawMode> <useSkinShader>true</useSkinShader> <useRottenColor>true</useRottenColor> <rotationRange>-30~30</rotationRange> <durationTicksRange>10~35</durationTicksRange> <nextSpasmTicksRange>10~50</nextSpasmTicksRange> <drawData> <scaleOffsetByBodySize>true</scaleOffsetByBodySize> <useBodyPartAnchor>true</useBodyPartAnchor> <childScale>0.7</childScale> <bodyTypeScales> <Hulk>1.2</Hulk> <Fat>1.4</Fat> <Thin>0.8</Thin> </bodyTypeScales> <defaultData> <layer>49</layer> </defaultData> <dataNorth> <rotationOffset>310</rotationOffset> <flip>true</flip> <layer>0</layer> </dataNorth> <dataEast> <rotationOffset>270</rotationOffset> <flip>true</flip> </dataEast> <dataSouth> <rotationOffset>220</rotationOffset> </dataSouth> <dataWest> <rotationOffset>270</rotationOffset> </dataWest> </drawData> </li> </renderNodeProperties> <comps> <li Class="HediffCompProperties_VerbGiver"> <tools> <li> <label>blade</label> <capacities> <li>Cut</li> </capacities> <armorPenetration>0.6</armorPenetration> <power>20.5</power> <!-- 2.5x natural fist --> <cooldownTime>2</cooldownTime> </li> </tools> </li> <li Class="HediffCompProperties_FleshbeastEmerge"> <letterLabel>Fleshmass operation</letterLabel> <letterText>Attempting to remove {PAWN_nameDef}'s flesh whip has caused the twisting mass of flesh to attack. The fleshmass has detached from {PAWN_nameDef} and transformed into a fleshbeast!</letterText> </li> </comps> <addedPartProps> <solid>true</solid> </addedPartProps> </HediffDef> <!-- Ghoul Prosthetics --> <ThingDef Name="BodyPartGhoulBase" ParentName="BodyPartBase" Abstract="True"> <techLevel>Industrial</techLevel> <thingCategories> <li>BodyPartsGhoul</li> </thingCategories> <graphicData> <texPath>Things/Item/Health/HealthItem</texPath> <color>(122, 115, 113)</color> <graphicClass>Graphic_Single</graphicClass> <drawSize>0.80</drawSize> </graphicData> <tradeTags Inherit="false" /> <statBases> <DeteriorationRate>0</DeteriorationRate> </statBases> </ThingDef> <ThingDef ParentName="UnfinishedBase"> <defName>UnfinishedHealthItemGhoul</defName> <label>unfinished ghoul prosthetic</label> <description>An unfinished ghoul prosthetic.</description> <statBases> <Flammability>0.5</Flammability> </statBases> <graphicData> <texPath>Things/Item/Unfinished/UnfinishedHealthItem</texPath> <graphicClass>Graphic_Single</graphicClass> <color>(122, 115, 113)</color> </graphicData> <stuffCategories Inherit="false" /> </ThingDef> <!-- Ghoul Plating --> <HediffDef ParentName="ImplantHediffBase"> <defName>GhoulPlating</defName> <label>ghoul plating</label> <description>A number of large bioferrite plates have been surgically attached to this ghoul.</description> <stages> <li> <statFactors> <IncomingDamageFactor>0.5</IncomingDamageFactor> </statFactors> <statOffsets> <MoveSpeed>-0.7</MoveSpeed> </statOffsets> </li> </stages> <renderNodeProperties> <li> <debugLabel>Ghoul plates</debugLabel> <workerClass>PawnRenderNodeWorker_AttachmentBody</workerClass> <texPaths> <li>Things/Pawn/Ghoul/Attachments/Plates/GhoulPlating_A</li> <li>Things/Pawn/Ghoul/Attachments/Plates/GhoulPlating_B</li> <li>Things/Pawn/Ghoul/Attachments/Plates/GhoulPlating_C</li> <li>Things/Pawn/Ghoul/Attachments/Plates/GhoulPlating_D</li> <li>Things/Pawn/Ghoul/Attachments/Plates/GhoulPlating_E</li> <li>Things/Pawn/Ghoul/Attachments/Plates/GhoulPlating_F</li> </texPaths> <baseLayer>60</baseLayer> <texSeed>1</texSeed> </li> </renderNodeProperties> </HediffDef> <ThingDef ParentName="BodyPartGhoulBase"> <defName>GhoulPlating</defName> <label>ghoul plating</label> <description>Bioferrite plates that can be surgically attached to a ghoul, protecting vulnerable areas. The plates will reduce incoming damage significantly but also slow the ghoul down.\n\nDue to the extremely painful nature of the prosthetic, only ghouls can tolerate this enhancement.</description> <descriptionHyperlinks><RecipeDef>InstallGhoulPlating</RecipeDef></descriptionHyperlinks> <statBases> <Mass>0.3</Mass> <WorkToMake>9000</WorkToMake> </statBases> <techHediffsTags> <li>Ghoul</li> </techHediffsTags> <costList> <Bioferrite>70</Bioferrite> </costList> <recipeMaker> <workSpeedStat>GeneralLaborSpeed</workSpeedStat> <workSkill>Crafting</workSkill> <effectWorking>Smith</effectWorking> <soundWorking>Recipe_Smith</soundWorking> <unfinishedThingDef>UnfinishedHealthItemGhoul</unfinishedThingDef> <researchPrerequisite>GhoulEnhancements</researchPrerequisite> <recipeUsers> <li>CraftingSpot</li> <li>BioferriteShaper</li> </recipeUsers> <displayPriority>140</displayPriority> </recipeMaker> </ThingDef> <RecipeDef ParentName="SurgeryInstallImplantBase"> <defName>InstallGhoulPlating</defName> <label>install ghoul plating</label> <description>Install ghoul plating.</description> <descriptionHyperlinks> <ThingDef>GhoulPlating</ThingDef> <HediffDef>GhoulPlating</HediffDef> </descriptionHyperlinks> <jobString>Installing ghoul plating.</jobString> <skillRequirements Inherit="false" /> <anesthetize>false</anesthetize> <surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds --> <mutantPrerequisite> <li>Ghoul</li> </mutantPrerequisite> <ingredients Inherit="false"> <li> <filter> <thingDefs> <li>GhoulPlating</li> </thingDefs> </filter> <count>1</count> </li> </ingredients> <fixedIngredientFilter> <thingDefs> <li>GhoulPlating</li> </thingDefs> </fixedIngredientFilter> <appliedOnFixedBodyParts> <li>Torso</li> </appliedOnFixedBodyParts> <addsHediff>GhoulPlating</addsHediff> </RecipeDef> <!-- Ghoul Barbs --> <HediffDef ParentName="ImplantHediffBase"> <defName>GhoulBarbs</defName> <label>ghoul barbs</label> <description>A number of barbed bioferrite spikes have been surgically attached to this ghoul.</description> <stages> <li> <statFactors> <MeleeDamageFactor>1.5</MeleeDamageFactor> </statFactors> <statOffsets> <MoveSpeed>-0.25</MoveSpeed> </statOffsets> </li> </stages> <renderNodeProperties> <li> <debugLabel>Ghoul spikes</debugLabel> <workerClass>PawnRenderNodeWorker_AttachmentBody</workerClass> <texPaths> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_A</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_B</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_C</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_D</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_E</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_F</li> </texPaths> <baseLayer>65</baseLayer> <texSeed>1</texSeed> </li> <li> <debugLabel>Ghoul spikes</debugLabel> <workerClass>PawnRenderNodeWorker_AttachmentBody</workerClass> <texPaths> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_A</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_B</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_C</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_D</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_E</li> <li>Things/Pawn/Ghoul/Attachments/Barbs/GhoulBarb_F</li> </texPaths> <baseLayer>65</baseLayer> <texSeed>2</texSeed> <flipGraphic>true</flipGraphic> </li> </renderNodeProperties> </HediffDef> <ThingDef ParentName="BodyPartGhoulBase"> <defName>GhoulBarbs</defName> <label>ghoul barbs</label> <description>A number of barbed bioferrite spikes that can be surgically attached to a ghoul. They drastically increase a ghoul's melee damage but also limit its range of motion, slowing it down.\n\nDue to the extremely painful nature of the prosthetic, only ghouls can tolerate this enhancement.</description> <descriptionHyperlinks><RecipeDef>InstallGhoulBarbs</RecipeDef></descriptionHyperlinks> <statBases> <Mass>0.3</Mass> <WorkToMake>6000</WorkToMake> </statBases> <techHediffsTags> <li>Ghoul</li> </techHediffsTags> <costList> <Bioferrite>35</Bioferrite> </costList> <recipeMaker> <workSpeedStat>GeneralLaborSpeed</workSpeedStat> <workSkill>Crafting</workSkill> <effectWorking>Smith</effectWorking> <soundWorking>Recipe_Smith</soundWorking> <unfinishedThingDef>UnfinishedHealthItemGhoul</unfinishedThingDef> <researchPrerequisite>GhoulEnhancements</researchPrerequisite> <recipeUsers> <li>CraftingSpot</li> <li>BioferriteShaper</li> </recipeUsers> <displayPriority>150</displayPriority> </recipeMaker> </ThingDef> <RecipeDef ParentName="SurgeryInstallImplantBase"> <defName>InstallGhoulBarbs</defName> <label>install ghoul barbs</label> <description>Install ghoul barbs.</description> <descriptionHyperlinks> <ThingDef>GhoulBarbs</ThingDef> <HediffDef>GhoulBarbs</HediffDef> </descriptionHyperlinks> <jobString>Installing ghoul barbs.</jobString> <skillRequirements Inherit="false" /> <anesthetize>false</anesthetize> <surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds --> <mutantPrerequisite> <li>Ghoul</li> </mutantPrerequisite> <ingredients Inherit="false"> <li> <filter> <thingDefs> <li>GhoulBarbs</li> </thingDefs> </filter> <count>1</count> </li> </ingredients> <fixedIngredientFilter> <thingDefs> <li>GhoulBarbs</li> </thingDefs> </fixedIngredientFilter> <appliedOnFixedBodyParts> <li>Torso</li> </appliedOnFixedBodyParts> <addsHediff>GhoulBarbs</addsHediff> </RecipeDef> <!-- Adrenal Heart --> <HediffDef ParentName="AddedBodyPartBase"> <defName>AdrenalHeart</defName> <label>adrenal heart</label> <description>A modified human heart that can release stress hormones and liquid energy into the bloodstream, allowing a ghoul to move and attack at incredible speeds.</description> <stages> <li> <hungerRateFactorOffset>0.15</hungerRateFactorOffset> </li> </stages> <spawnThingOnRemoved>AdrenalHeart</spawnThingOnRemoved> <abilities> <li>GhoulFrenzy</li> </abilities> <addedPartProps> <solid>true</solid> </addedPartProps> </HediffDef> <ThingDef ParentName="BodyPartGhoulBase"> <defName>AdrenalHeart</defName> <label>adrenal heart</label> <description>A special bioferrite prosthetic that allows a ghoul to saturate its bloodstream with stress hormones and liquid energy. The ghoul will move and attack at incredible speeds for a short amount of time. The prosthetic slightly increases the ghoul's metabolism, causing it to eat more.\n\nDue to the extremely painful nature of the prosthetic, only ghouls can tolerate this enhancement.</description> <descriptionHyperlinks><RecipeDef>InstallAdrenalHeart</RecipeDef></descriptionHyperlinks> <statBases> <Mass>0.3</Mass> <WorkToMake>13200</WorkToMake> </statBases> <techHediffsTags> <li>Ghoul</li> </techHediffsTags> <costList> <Bioferrite>20</Bioferrite> <ComponentIndustrial>1</ComponentIndustrial> </costList> <recipeMaker> <workSpeedStat>GeneralLaborSpeed</workSpeedStat> <workSkill>Crafting</workSkill> <effectWorking>Smith</effectWorking> <soundWorking>Recipe_Smith</soundWorking> <unfinishedThingDef>UnfinishedHealthItemGhoul</unfinishedThingDef> <skillRequirements> <Crafting>4</Crafting> </skillRequirements> <researchPrerequisite>GhoulEnhancements</researchPrerequisite> <recipeUsers> <li>BioferriteShaper</li> </recipeUsers> <displayPriority>160</displayPriority> </recipeMaker> </ThingDef> <RecipeDef ParentName="SurgeryInstallBodyPartArtificialBase"> <defName>InstallAdrenalHeart</defName> <label>install adrenal heart</label> <description>Install adrenal heart.</description> <descriptionHyperlinks> <ThingDef>AdrenalHeart</ThingDef> <HediffDef>AdrenalHeart</HediffDef> </descriptionHyperlinks> <jobString>Installing adrenal heart.</jobString> <anesthetize>false</anesthetize> <surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds --> <skillRequirements> <Medicine>4</Medicine> </skillRequirements> <mutantPrerequisite> <li>Ghoul</li> </mutantPrerequisite> <ingredients Inherit="false"> <li> <filter> <thingDefs> <li>AdrenalHeart</li> </thingDefs> </filter> <count>1</count> </li> </ingredients> <fixedIngredientFilter> <thingDefs> <li>AdrenalHeart</li> </thingDefs> </fixedIngredientFilter> <appliedOnFixedBodyParts> <li>Heart</li> </appliedOnFixedBodyParts> <addsHediff>AdrenalHeart</addsHediff> </RecipeDef> <!-- Corrosive Heart --> <HediffDef ParentName="AddedBodyPartBase"> <defName>CorrosiveHeart</defName> <label>corrosive heart</label> <description>A modified human heart that allows a ghoul to spray corrosive fluid.</description> <spawnThingOnRemoved>CorrosiveHeart</spawnThingOnRemoved> <abilities> <li>CorrosiveSpray</li> </abilities> <addedPartProps> <solid>true</solid> <partEfficiency>0.85</partEfficiency> </addedPartProps> </HediffDef> <ThingDef ParentName="BodyPartGhoulBase"> <defName>CorrosiveHeart</defName> <label>corrosive heart</label> <description>A special bioferrite prosthetic that allows the ghoul to spray a corrosive fluid. The prosthetic repurposes a chamber of the ghoul's heart to create a strong acid, which can be projected from the ghoul's mouth.\n\nDue to the extremely painful nature of the prosthetic, only ghouls can tolerate this enhancement.</description> <descriptionHyperlinks><RecipeDef>InstallCorrosiveHeart</RecipeDef></descriptionHyperlinks> <statBases> <Mass>0.3</Mass> <WorkToMake>13200</WorkToMake> </statBases> <techHediffsTags> <li>Ghoul</li> </techHediffsTags> <costList> <Bioferrite>20</Bioferrite> <ComponentIndustrial>1</ComponentIndustrial> </costList> <recipeMaker> <workSpeedStat>GeneralLaborSpeed</workSpeedStat> <workSkill>Crafting</workSkill> <effectWorking>Smith</effectWorking> <soundWorking>Recipe_Smith</soundWorking> <unfinishedThingDef>UnfinishedHealthItemGhoul</unfinishedThingDef> <skillRequirements> <Crafting>4</Crafting> </skillRequirements> <researchPrerequisite>GhoulEnhancements</researchPrerequisite> <recipeUsers> <li>BioferriteShaper</li> </recipeUsers> <displayPriority>160</displayPriority> </recipeMaker> </ThingDef> <RecipeDef ParentName="SurgeryInstallBodyPartArtificialBase"> <defName>InstallCorrosiveHeart</defName> <label>install corrosive heart</label> <description>Install corrosive heart.</description> <descriptionHyperlinks> <ThingDef>CorrosiveHeart</ThingDef> <HediffDef>CorrosiveHeart</HediffDef> </descriptionHyperlinks> <jobString>Installing corrosive heart.</jobString> <anesthetize>false</anesthetize> <surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds --> <skillRequirements> <Medicine>4</Medicine> </skillRequirements> <mutantPrerequisite> <li>Ghoul</li> </mutantPrerequisite> <ingredients Inherit="false"> <li> <filter> <thingDefs> <li>CorrosiveHeart</li> </thingDefs> </filter> <count>1</count> </li> </ingredients> <fixedIngredientFilter> <thingDefs> <li>CorrosiveHeart</li> </thingDefs> </fixedIngredientFilter> <appliedOnFixedBodyParts> <li>Heart</li> </appliedOnFixedBodyParts> <addsHediff>CorrosiveHeart</addsHediff> </RecipeDef> <!-- Metalblood Heart --> <HediffDef ParentName="AddedBodyPartBase"> <defName>MetalbloodHeart</defName> <label>metalblood heart</label> <description>A modified human heart that can pump metalblood into the bloodstream, making the ghoul more resistant to damage for a short period of time. Metalblood also makes the ghoul more vulnerable to fire.</description> <spawnThingOnRemoved>MetalbloodHeart</spawnThingOnRemoved> <abilities> <li>MetalbloodInjection</li> </abilities> <stages> <li> <statOffsets> <MoveSpeed>-0.2</MoveSpeed> </statOffsets> </li> </stages> <addedPartProps> <solid>true</solid> </addedPartProps> </HediffDef> <ThingDef ParentName="BodyPartGhoulBase"> <defName>MetalbloodHeart</defName> <label>metalblood heart</label> <description>A special bioferrite prosthetic that can pump a small amount of metalblood into a ghoul's bloodstream, making it more resistant to damage for a short period of time. Metalblood also makes the ghoul more vulnerable to fire. The prosthetic causes widespread swelling, slowing the ghoul down.\n\nDue to the extremely painful nature of the prosthetic, only ghouls can tolerate this enhancement.</description> <descriptionHyperlinks><RecipeDef>InstallMetalbloodHeart</RecipeDef></descriptionHyperlinks> <statBases> <Mass>0.3</Mass> <WorkToMake>13200</WorkToMake> </statBases> <techHediffsTags> <li>Ghoul</li> </techHediffsTags> <costList> <Bioferrite>20</Bioferrite> <ComponentIndustrial>1</ComponentIndustrial> </costList> <recipeMaker> <workSpeedStat>GeneralLaborSpeed</workSpeedStat> <workSkill>Crafting</workSkill> <effectWorking>Smith</effectWorking> <soundWorking>Recipe_Smith</soundWorking> <unfinishedThingDef>UnfinishedHealthItemGhoul</unfinishedThingDef> <skillRequirements> <Crafting>4</Crafting> </skillRequirements> <researchPrerequisite>GhoulEnhancements</researchPrerequisite> <recipeUsers> <li>BioferriteShaper</li> </recipeUsers> <displayPriority>160</displayPriority> </recipeMaker> </ThingDef> <RecipeDef ParentName="SurgeryInstallBodyPartArtificialBase"> <defName>InstallMetalbloodHeart</defName> <label>install metalblood heart</label> <description>Install metalblood heart.</description> <descriptionHyperlinks> <ThingDef>MetalbloodHeart</ThingDef> <HediffDef>MetalbloodHeart</HediffDef> </descriptionHyperlinks> <jobString>Installing metalblood heart.</jobString> <anesthetize>false</anesthetize> <surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds --> <skillRequirements> <Medicine>4</Medicine> </skillRequirements> <mutantPrerequisite> <li>Ghoul</li> </mutantPrerequisite> <ingredients Inherit="false"> <li> <filter> <thingDefs> <li>MetalbloodHeart</li> </thingDefs> </filter> <count>1</count> </li> </ingredients> <fixedIngredientFilter> <thingDefs> <li>MetalbloodHeart</li> </thingDefs> </fixedIngredientFilter> <appliedOnFixedBodyParts> <li>Heart</li> </appliedOnFixedBodyParts> <addsHediff>MetalbloodHeart</addsHediff> </RecipeDef> <!-- Misc --> <!-- Revenant Vertebrae --> <HediffDef ParentName="ImplantHediffBase"> <defName>RevenantVertebrae</defName> <label>revenant vertebrae</label> <description>An installed prosthetic that allows the user to temporarily become invisible. The prosthetic is crafted from a modified revenant spine, using archotech shards to restrain the dormant revenant. The user can manipulate the visual centers of those nearby, effectively turning themself invisible for a short time.</description> <abilities> <li>RevenantInvisibility</li> </abilities> <addedPartProps> <solid>true</solid> </addedPartProps> </HediffDef> <ThingDef ParentName="BodyPartBionicBase"> <defName>RevenantVertebrae</defName> <label>revenant vertebrae</label> <description>A prosthetic spine that allows the user to temporarily become invisible. The prosthetic is crafted from a modified revenant spine and uses archotech shards to restrain the dormant revenant. The user can manipulate the visual centers of those nearby, effectively turning themself invisible for a short time.</description> <descriptionHyperlinks><RecipeDef>InstallRevenantVertebrae</RecipeDef></descriptionHyperlinks> <statBases> <Mass>0.3</Mass> <WorkToMake>24000</WorkToMake> </statBases> <techHediffsTags> <li>Anomaly</li> </techHediffsTags> <costList> <Bioferrite>10</Bioferrite> <Shard>2</Shard> <RevenantSpine>1</RevenantSpine> </costList> <tradeTags Inherit="false" /> <recipeMaker Inherit="false"> <workSpeedStat>GeneralLaborSpeed</workSpeedStat> <workSkill>Crafting</workSkill> <effectWorking>Smith</effectWorking> <soundWorking>Recipe_Smith</soundWorking> <unfinishedThingDef>UnfinishedHealthItemBionic</unfinishedThingDef> <skillRequirements> <Crafting>8</Crafting> </skillRequirements> <researchPrerequisite>RevenantInvisibility</researchPrerequisite> <recipeUsers> <li>BioferriteShaper</li> </recipeUsers> <displayPriority>160</displayPriority> </recipeMaker> </ThingDef> <RecipeDef ParentName="SurgeryInstallBodyPartArtificialBase"> <defName>InstallRevenantVertebrae</defName> <label>install revenant vertebrae</label> <description>Install revenant vertebrae.</description> <descriptionHyperlinks> <ThingDef>RevenantVertebrae</ThingDef> <HediffDef>RevenantVertebrae</HediffDef> </descriptionHyperlinks> <jobString>Installing revenant vertebrae.</jobString> <surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds --> <mutantBlacklist> <li>Ghoul</li> </mutantBlacklist> <ingredients> <li> <filter> <thingDefs> <li>RevenantVertebrae</li> </thingDefs> </filter> <count>1</count> </li> </ingredients> <fixedIngredientFilter> <thingDefs> <li>RevenantVertebrae</li> </thingDefs> </fixedIngredientFilter> <appliedOnFixedBodyParts> <li>Spine</li> </appliedOnFixedBodyParts> <addsHediff>RevenantVertebrae</addsHediff> </RecipeDef> </Defs>逐行解释
最新发布
07-18
这段 XML 代码定义了 **RimWorld 游戏或其模组中的多个突变体(Mutations)、尸鬼义体(Ghoul Prosthetics)、以及一些特殊能力组件**,包括: - **变异器官(如变异胃、变异肺、触手、肉鞭)** - **尸鬼专属义体(装甲板、尖刺、肾上腺心脏、腐蚀心脏、金属血液心脏)** - **隐形脊椎(Revenant Vertebrae)** - **相关制造配方与手术安装方式** 这些定义允许玩家为角色(尤其是尸鬼)添加 **增强型义体、变异器官或特殊能力**,并具有 **视觉表现、功能影响、副作用、以及制造方式**。 --- ## 🔧 一、通用结构解析 ### 文件声明 ```xml <?xml version="1.0" encoding="utf-8"?> ``` - 指定 XML 文件的版本和编码格式为 UTF-8。 ```xml <Defs> ``` - 开始定义多个游戏对象(Defs),这是 RimWorld 数据结构的标准格式。 --- ## 🧬 二、突变器官定义 ### `AddedMutationBase`(突变器官基类) ```xml <HediffDef Name="AddedMutationBase" ParentName="AddedBodyPartBase" Abstract="True"> <organicAddedBodypart>true</organicAddedBodypart> </HediffDef> ``` - 所有突变器官的基类,标记为有机体添加部分。 --- ### 1. `FleshmassStomach`(肉块胃) ```xml <defName>FleshmassStomach</defName> <label>fleshmass stomach</label> <description>...</description> ``` - 一种癌变的半智能胃部,产生酸液,防止食物中毒。 - 会免疫 GutWorms 寄生虫感染。 - 移除时会变成 Fleshbeast(肉兽)。 --- ### 2. `FleshmassLung`(肉块肺) ```xml <defName>FleshmassLung</defName> <label>fleshmass lung</label> <description>...</description> ``` - 具有自我再生能力,免疫 LungRot 和哮喘。 - 提高毒素环境抗性(+30%)。 - 移除时会变成 Fleshbeast。 --- ### 3. `Tentacle`(触手) ```xml <defName>Tentacle</defName> <label>flesh tentacle</label> <description>...</description> ``` - 用于操作的肉质触手,提高操作能力。 - 降低角色美观度(-1)。 - 移除时会变成 Fleshbeast。 --- ### 4. `FleshWhip`(肉鞭) ```xml <defName>FleshWhip</defName> <label>flesh whip</label> <description>...</description> ``` - 带刀刃的肉鞭,可作为近战武器使用。 - 降低角色美观度(-1)。 - 移除时会变成 Fleshbeast。 --- ## 🤖 三、尸鬼义体定义 ### `BodyPartGhoulBase`(尸鬼义体基类) ```xml <ThingDef Name="BodyPartGhoulBase" ParentName="BodyPartBase" Abstract="True"> <techLevel>Industrial</techLevel> <thingCategories><li>BodyPartsGhoul</li></thingCategories> </ThingDef> ``` - 所有尸鬼义体的基类,属于工业科技等级。 --- ### 1. `GhoulPlating`(尸鬼装甲) ```xml <defName>GhoulPlating</defName> <label>ghoul plating</label> <description>...</description> ``` - 大型生物铁装甲板,减少 50% 伤害,但降低移动速度(-0.7)。 - 只能安装在躯干上。 #### 手术配方 ```xml <RecipeDef ParentName="SurgeryInstallImplantBase"> <defName>InstallGhoulPlating</defName> </RecipeDef> ``` - 需要研究“GhoulEnhancements”解锁。 --- ### 2. `GhoulBarbs`(尸鬼尖刺) ```xml <defName>GhoulBarbs</defName> <label>ghoul barbs</label> <description>...</description> ``` - 生物铁尖刺,提升近战伤害(+50%),但降低移动速度(-0.25)。 - 只能安装在躯干上。 --- ### 3. `AdrenalHeart`(肾上腺心脏) ```xml <defName>AdrenalHeart</defName> <label>adrenal heart</label> <description>...</description> ``` - 可释放压力激素,使尸鬼进入狂暴状态。 - 提高代谢率(+15% 饥饿速度)。 - 可触发能力 `GhoulFrenzy`。 --- ### 4. `CorrosiveHeart`(腐蚀心脏) ```xml <defName>CorrosiveHeart</defName> <label>corrosive heart</label> <description>...</description> ``` - 可喷射腐蚀液,攻击敌人。 - 降低器官效率(效率 85%)。 --- ### 5. `MetalbloodHeart`(金属血液心脏) ```xml <defName>MetalbloodHeart</defName> <label>metalblood heart</label> <description>...</description> ``` - 可注入金属血液,提高抗伤能力,但怕火。 - 降低移动速度(-0.2)。 --- ## 🧢 四、特殊能力组件 ### `RevenantVertebrae`(幽灵脊椎) ```xml <defName>RevenantVertebrae</defName> <label>revenant vertebrae</label> <description>...</description> ``` - 使用幽灵脊椎和暗物质碎片制成,可让角色短暂隐形。 - 只能由非尸鬼角色使用(mutantBlacklist)。 #### 手术配方 ```xml <RecipeDef ParentName="SurgeryInstallBodyPartArtificialBase"> <defName>InstallRevenantVertebrae</defName> </RecipeDef> ``` - 需要研究“RevenantInvisibility”解锁。 --- ## 📊 总结:义体功能一览 | 义体名称 | 功能 | 副作用 | 可用种族 | |----------|------|--------|----------| | GhoulPlating | 减伤 50% | 移动速度 -0.7 | Ghoul | | GhoulBarbs | 近战伤害 +50% | 移动速度 -0.25 | Ghoul | | AdrenalHeart | 狂暴状态 | 饥饿速度 +15% | Ghoul | | CorrosiveHeart | 喷射腐蚀液 | 器官效率 85% | Ghoul | | MetalbloodHeart | 提高抗伤,怕火 | 移动速度 -0.2 | Ghoul | | RevenantVertebrae | 短暂隐形 | - | 非 Ghoul | --- ##
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值