潜渊症mod制作研究讲义

说明

作者:晓涵 Steam昵称:Xiao[CN]
——荧惑守心研究院

最后编辑:2023.04.17

本文共计 17,000 字/词 (含代码),预计阅读时长 1min ~ Infinity

如有建议&错误反馈,或需要mod制作的技术支持,可加Q群:807201342(专门用来反馈或进行技术讨论),或在萌化群@晓涵


本文所用术语定义:对于下文中的参考代码,假设此时要讲解itemproduction标签的作用,
其中 itemproduction 为主元素/标签(Root element)
与其在同一行的 rate 为主元素属性(Root element attributes)
位于itemproduction/itemproduction之间的item称为子元素/标签(Child elements)

<itemproduction rate="0.0015" requiredhappiness="80-100" requiredhunger="0-30"><item identifier="Mermaidegg1" commonness="30" /><item identifier="Mermaidmilk" commonness="70" />
</itemproduction>

创意工坊已发布模组如下,请多多支持!

  • SummonNight召唤杖拓展
  • GeneFarm基因农场
  • More Defense Bots - 防御机器人拓展
  • Annihilation Weapon - 湮灭武器

Q&A

Q:此教程包含什么?
A:此教程目的是帮助模组制作者和想要制作模组的玩家对模组制作有所了解,并介绍一些特定功能的实现。

Q:0基础能看懂吗?
A:可以,但最好有些英文基础。

Q:看完此教程我能做什么样的模组?
A:工坊上大部分的模组!包括但不限于美化、更多怪物、宠物、武器、潜水服。

本文简易目录

  1. XML基础
  2. FireList文件列表
  3. Items物品组
  4. Character生物
  5. Affliction痛苦
  6. Talents天赋
  7. Particle粒子效果
  8. 语言&本地化
  9. 附录

您在阅读时可使用pdf浏览器自带的目录功能跳转,并请妥善通过Crtl+F使用搜索功能

一、XML基础

XML 指可扩展标记语言(eXtensible Markup Language)。XML 被设计用来传输和存储数据,潜渊症中绝大部分数据以及模组都使用XML文件来进行存储设计,因此您无需深入研究该游戏的代码来了解事情是如何工作的。

注意:虽然不是很方便,但是您可以使用 记事本 来打开和编辑XML文件。

XML 文档第一行以 XML 声明开始,用来表述文档的一些信息,如下列示例代码,声明使用utf-8编码。

<?xml version="1.0" encoding="utf-8"?>

与html类似,XML中需要以成对的标签(潜渊症官方称之为元素element,在本文行文中两者都会使用,请读者在阅读时注意

<!--这是一个注释,注释不参与代码执行-->
<!--对于标签Item,可有以下两种写法-->
<item identifier="Mermaidmilk" commonness="70"></item>
<item identifier="Mermaidmilk" commonness="70" />

好,您已经学会了XML的所有基础知识,怎么样很简单吧!现在开始制作模组吧!

目前您只需要记住以上的东西,剩下的可以在后续的学习中慢慢掌握。

Hello World!

下面您将尝试书写您的第一个mod,知道您现在还什么都不会,不过不要担心,本篇旨在引导您理解模组项目的大体结构,目前您只需要跟着本篇的指引走,完成一些文件创建和复制粘贴的工作即可。

**在接下来的教程中,将引导您制作一个氧气罐。**首先,找到游戏根目录下的LocalMods文件夹,如下图所示。

在LocalMods文件夹下创建FirstMod文件夹,如下图所示。

进入FirstMod,在里面创建filelist.xmltest.xml两个文件,XML文件可先创建一个记事本文件,将 “新建文本文档.txt”**(包括.txt)**替换为刚才所说的两个文件名。


打开filelist.xml文件,将以下代码粘贴至文件并保存。(以下代码无需理解)

<?xml version="1.0" encoding="utf-8"?>
<contentpackage name="FirstMod" modversion="1.0.0" corepackage="False" gameversion="1.0.8.0"><Item file="%ModDir%/test.xml" />
</contentpackage>

打开test.xml文件,将以下代码粘贴至文件并保存。(以下代码无需理解)

<?xml version="1.0" encoding="utf-8"?>
<Items><Item name="" identifier="oxygentankMOD" category="Diving,Equipment" maxstacksize="8" Tags="smallitem,oxygensource,refillableoxygensource" cargocontaineridentifier="metalcrate" scale="0.5" impactsoundtag="impact_metal_light" allowdroppingonswap="true"><Upgrade gameversion="0.10.0.0" scale="0.5" /><InventoryIcon texture="Content/Items/InventoryIconAtlas.png" sourcerect="896,0,64,64" origin="0.5,0.5" /><Sprite texture="Content/Items/Tools/tools.png" sourcerect="410,71,24,66" depth="0.55" origin="0.5,0.5" /><Body width="22" height="64" density="9.7" /><Holdable canbecombined="true" slots="Any,RightHand,LeftHand" holdpos="30,-15" handle1="0,5" handle2="0,-5" msg="ItemMsgPickUpSelect"></Holdable></Item>
</Items>

打开潜渊症游戏,进入模组界面,可以看到禁用模组中有一项叫做FirstMod的模组,右侧图标显示为本地模组,将其启用

启用后,进入潜艇编辑器找到刚才我们创建的氧气罐。

至此,恭喜您,完成了您的第一个Mod的制作!!

在本文接下来的部分,将详细为您讲解代码的具体作用。

二、FileList 文件列表

<contentpackage name="SummonNight" modversion="1.0.6" corepackage="False" steamworkshopid="2857526183" gameversion="1.0.8.0" expectedhash="C2E20CD4E4088ABF0E3AD3CBC010FBB2"><Text file="%ModDir%/Texts/SimplifiedChinese.xml" /><Text file="%ModDir%/Texts/English.xml" /><Item file="%ModDir%/Items/SummoningStaff.xml" /><Character file="%ModDir%/Characters/Swarmfeeder_friend/Swarmfeeder_friend.xml" /><Character file="%ModDir%/Characters/Mudraptor_friend/Mudraptor_friend.xml" />
</contentpackage>

contentpackage内容包

元素属性steamworkshopid 表示发布工坊时的模组ID,自制mod在发布之前请删去此段
expectedhash 表示模组更新时工坊附加的哈希校验,出现hash校验错误时请删去此段,自制mod在发布之前请删去此段

子元素

使用对应文件类型的标签告诉游戏此文件为什么类型的文件,元素属性file标明文件路径,使用%ModDir%表示模组根目录。

三、Items 物品组

防遗忘

密度说明? 研究下次元箱,或是载货滑板车

武库的防弹插板? 等莱佬回复

文件结构简介

文件无命名要求,但一般需要能够体现该文件内物品的类别,如 tools / weapons / genetic等,或直接使用你的模组名**(那些用中文命名文件的别说是我教的)**。文件以Items起头,内部可使用Item标签定义多个物品,如下示例代码。

<Items><Item identifier="Item1"><!--具体物品代码--></Item><Item identifier="Item2"><!--具体物品代码--></Item>
</Items>

在Item标签内书写物品具体信息,包括但不限于合成方式、内部存储空间、装备或放置位、贴图、音效、拿取方式、武器攻击、药物效果,本文将选取部分进行讲解。

Item 物品

注:Item标签可替换为任意你喜欢的名字(如官方医药物品文件内),只要注意标签的匹配就行,不过一般图省事就使用Item。

主元素属性

示例代码

<Item name="" identifier="feederstaff" category="Weapon" Tags="smallitem,weapon" scale="0.5" requireaimtouse="true" impactsoundtag="impact_metal_light">

name & description 名称&描述 一般留空,具体内容在本地化文件中书写
identifier ID,物品定义最核心的内容,所有对该物品的引用都以此为标准
Tags 物品的标签
fireproof=“true” waterproof=“true” 内部(及自身)是否防火/水(一般为容器或背包使用)
requireaimtouse 是否需要瞄准(武器)

PreferredContainer 偏好容器

定义生成规则与物品整理偏好
(在此吐槽一下,这破游戏XML部分的代码命名除了元素名用的驼峰命名,大部分属性和ID命名既不驼峰又不蛇形的,就一坨糊在一起)

<!--生成规则-->
<PreferredContainer primary="wreckstoragecab,abandonedstoragecab" amount="1" spawnprobability="0.1" />
<PreferredContainer primary="seedbag" amount="1" spawnprobability="0.3" />
<!--物品整理偏好-->
<PreferredContainer primary="secarmcab" secondary="armcab" />

Price 售价

<Price baseprice="350" sold="false"><Price storeidentifier="merchantoutpost" multiplier="1.25" /><Price storeidentifier="merchantcity" multiplier="1.25" /><Price storeidentifier="merchantresearch" multiplier="1.25" /><Price storeidentifier="merchantmilitary" multiplier="0.9" /><Price storeidentifier="merchantmine" multiplier="1.25" />
</Price>

Deconstruct 分解

    <Deconstruct time="20"><Item identifier="physicorium" amount="1" /></Deconstruct>

主元素属性
time 分解时间

子元素
Item 表示分解产物,内仅含两个元素属性,物品id和数量(若数量为1可省略)

Fabricate 加工合成

<!--加工台代码示例-->
<Fabricate suitablefabricators="fabricator" requiredtime="25"><RequiredSkill identifier="weapons" level="50" /><RequiredItem identifier="physicorium" amount="4" />
</Fabricate>
<!--医药台代码示例-->
<Fabricate suitablefabricators="medicalfabricator" requiredtime="5" amount="1"><RequiredSkill identifier="medical" level="40" /><RequiredItem identifier="tobaccovineseed" /><RequiredItem identifier="geneticmaterial_unresearched" />
</Fabricate>

主元素属性
suitablefabricators 指定加工台类型
amount 一次加工产物数量

子元素
RequiredSkill 技能需求
RequiredItem 需求物品,用法与上文中的Item类似

Sprite 贴图相关

<InventoryIcon texture="%ModDir%/Items/Staff.png" sourcerect="0,0,60,60" origin="0.5,0.5" />
<Sprite texture="%ModDir%/Items/Staff.png" sourcerect="0,0,60,60" depth="0.55" origin="0.5,0.2" />
<Body width="60" height="60" density="60" />

InventoryIcon 图标,即在物品栏中显示的贴图,如果不设置则使用下面的Sprite
Sprite 精灵图,即在游戏中实际使用的贴图
Body标签声明物品的碰撞大小以及密度(density)

主元素属性
texture 图片路径,注:图片应使用透明背景,长宽像素数应为4的倍数
sourcerect 该物品需要使用的部分的起始像素坐标和长宽 (x, y, width, height),单位pixels
例如 sourcerect=“0,1,60,61” 表示在原图的(0,1)位置,截取长宽分别为60,61的图像
depth 定义物品绘制的先后顺序,可以理解为图层
origin 中心点,或可以理解为锚点,图片绘制时将以此点为中心绘制

Holdable 拿取方式

<!--示例代码-->
<Holdable slots="RightHand, LeftHand, Any, Head" holdpos="0,-70" handle1="0,10" handle2="0,-10"/>
<!--双手拿取-->
<Holdable slots="RightHand+LeftHand" holdpos="0,-70" handle1="0,10" handle2="0,-10"/>

表示哪些生物容器可以装载此物,关于 生物容器 可参见生物篇的Inventory。
此处示例代码表示该物品可单手拿取、放于自身物品栏内、或是别在头上(手电筒)

Wearable 穿戴方式

<Wearable slots="Bag" msg="ItemMsgEquipSelect" canbeselected="false" canbepicked="true" pickkey="Select"><sprite name="Nuclear Gun Worn" texture="Content/Items/JobGear/TalentGear.png" canbehiddenbyotherwearables="false" rotation="90" inheritlimbdepth="false" depth="0.6" sourcerect="270,127,240,66" limb="Torso" scale="0.5" origin="0.5,0.8" />
</Wearable>

与Holdable类似,不过除了物品自身的贴图外,能设置专门的穿戴贴图,此处展示的为核子枪代码,将原本横放的核子枪旋转90度背在背后的效果。更多内容见下方自定义服装教学

ItemContainer 物品容器

背包容器示例:

    <ItemContainer capacity="36" keepopenwhenequipped="true" movableframe="true"><Containable items="smallitem,mediumitem,depthchargeammo,coilgunammo,railgunammo" /></ItemContainer>

capacity 定义了容器的存储格数

子元素Containable表示容器可装载的物品所带有的tag

对于ItemContainer有一些特殊的用法,如氧气使用、自动注射耳机等,具体见下方自定义服装教学

Quality 物品质量

<!--鱼叉枪-->
<Quality><QualityStat stattype="FirepowerMultiplier" value="0.1" />
</Quality>
<!--消防斧-->
<Quality><QualityStat stattype="StrikingPowerMultiplier" value="0.1" />
</Quality>
<!--氧气罐-->
<Quality><QualityStat stattype="Condition" value="0.1"/>
</Quality>

物品质量影响物品的使用效果,使用属性stattype设置加成类型,上述示例代码中的两个伤害加成的,还有氧气罐增加容量的。一般上述三个就够用。具体可查官方mod文档 StatTypes 相关条目。

自定义服装/护甲

常规服装制作

以萌化白色旗袍(BSQP)为例

<Wearable slots="InnerClothes" msg="ItemMsgPickUpSelect">
<Sprite name="BSQP's Uniform 1" texture="Content/Items/Jobgear/MiscJobGear.png" sourcerect="243,71,130,74" depth="0.6" origin="0.5,0.5" />
<InventoryIcon texture="%ModDir:2809175631%/Content/Uniform_new/OutfitIcons_1.png" sourcerect="256,27,128,101" origin="0.5,0.5" />
<Wearable slots="Any,InnerClothes" msg="ItemMsgPickUpSelect"><sprite name="BSQP's Uniform Torso" texture="BSQP.png" limb="Torso" hidelimb="false" inherittexturescale="true" inheritorigin="true" inheritsourcerect="true" /><sprite name="BSQP's Uniform Right Hand" texture="BSQP.png" limb="RightHand" hidelimb="false" inherittexturescale="true" inheritorigin="true" inheritsourcerect="true" /><!--此处省略其他部位贴图代码--><!--以下为抗性设置--><damagemodifier armorsector="0.0,360.0" afflictionidentifiers="lacerations" damagemultiplier="0.95" /><damagemodifier armorsector="0.0,360.0" afflictionidentifiers="bitewounds, blunttrauma" damagemultiplier="0.9" />
</Wearable>

上述代码中第一行Wearable中的slots定义了物品的穿着位置,上述衣物定义为内部服装,区别于例如潜水服的外部服装。
第二行的Sprite配置了该物品掉落在地图上的贴图,对于衣物官方的使用的贴图为一件叠好的衣物,此处mod用的就是官方自带的贴图。

衣物重点在于Wearable,而美化重点在**Wearable内部的**sprite(精灵图),我们单独拿出一段来看。

<sprite name="BSQP's Uniform Torso" texture="BSQP.png" limb="Torso" hidelimb="false" inherittexturescale="true" inheritorigin="true" inheritsourcerect="true" />

texture 表示文件名,默认当前文件夹
limb 表示该衣物穿在那个肢体上
hidelimb=“false” 是否隐藏肢体
如果你设计的服装要露出皮肤且衣物中不带有皮肤(如萌化的衣物,也就是我以此为例的原因),请将对应的隐藏肢体设定为false。
对于官方设计的服装此项为true(官方包的严严实实),或是像莱德美化衣物中是带皮肤的,可以用true。

直观来说,可以看下图


上图为BSQP,不带皮肤,下图为莱德美化,带皮肤。

同样为Wearable子元素,damagemodifier用法如下。

<damagemodifier armorsector="0.0,360.0" afflictionidentifiers="bitewounds, blunttrauma" damagemultiplier="0.95" />

damagemodifier定义了衣物抗性,准确来说是受伤调整(damagemodifier)
armorsector 表示护甲保护角度,除盾牌以外都为全角防护
afflictionidentifiers 表示抗性类型,可用英文逗号分割多个痛苦ID
damagemultiplier 表示受伤系数,此致越小抗性越高

潜水服制作

潜水服代码很复杂,我们一段一段来看,下文代码中仅显示了贴图部分的代码。

<Wearable slots="OuterClothes" msg="ItemMsgEquipSelect" displaycontainedstatus="true" canbeselected="false" canbepicked="true" pickkey="Select"><sprite name="Abyss Diving Suit Helmet Wearable" texture="Content/Items/Jobgear/headgears.png" limb="Head" inheritlimbdepth="true" inheritscale="true" ignorelimbscale="true" scale="0.65" hidelimb="false" alphaclipotherwearables="true" sourcerect="0,409,103,103" origin="0.5,0.5"><LightComponent range="200.0" lightcolor="250,224,165,255" powerconsumption="10" IsOn="true"><StatusEffect type="OnWearing" target="This,Character" Voltage="1.0" Interval="0.1" setvalue="true"><Conditional IsDead="false" /></StatusEffect><LightTexture texture="Content/Lights/divinghelmetlight.png" origin="0.05, 0.5" size="1.0,1.0" /></LightComponent></sprite><!--省略其他肢体贴图代码--></Wearable>

与内部服装不同,潜水服额外定义了头盔,而头盔与潜水服帖图不在一起,所以需要额外提供贴图路径。同时,通过子元素LightComponent设置了潜水服头灯。

通过wearable子元素StatusEffect能够定义许多效果,防水压、视线阻挡和外界声音减小这样的潜水服效果写法如下。

<StatusEffect type="OnWearing" target="Character" ObstructVision="true" PressureProtection="10000.0" SpeedMultiplier="0.7" PropulsionSpeedMultiplier="0.5" LowPassMultiplier="0.2" setvalue="true" disabledeltatime="true"><Sound file="Content/Items/Diving/DivingSuitLoop1.ogg" range="250" loop="true"/><Sound file="Content/Items/Diving/DivingSuitLoop2.ogg" range="250" loop="true"/>
</StatusEffect>

ObstructVision 妨碍视线,表现为穿上潜水服后会阻碍侧后方视野
PressureProtection 水压保护
SpeedMultiplier 速度倍率调整,此处为深渊潜水服0.7倍速度
LowPassMultiplier 外界声音倍率,表现为穿上潜水服后外界声音减小

上电补充氧气罐定义如下。

      <!-- Refill oxygen when the suit is contained. --><StatusEffect type="OnContained" target="Contained" Condition="1.0" interval="1" disabledeltatime="true"><Conditional Voltage="gt 0.01" targetcontainer="true" targetgrandparent="true" targetitemcomponent="Powered" /><RequiredItem items="refillableoxygensource" type="Contained" excludebroken="false" excludefullcondition="true" /></StatusEffect>

供氧定义如下。

<StatusEffect type="OnWearing" target="Character" OxygenAvailable="-100.0" UseHullOxygen="false" />
<StatusEffect type="OnWearing" target="Contained,Character" OxygenAvailable="1000.0" Condition="-0.15" comparison="Or"><Conditional IsDead="false" /><RequiredItem items="oxygensource" type="Contained" />
</StatusEffect>

使用OxygenAvailable定义供氧。

第一个StatusEffect表示无氧气罐时,会出现缺氧情况。第二个StatusEffect表示存在氧气罐时,提供1000的OxygenAvailable。

吸煤气写法如下。

<StatusEffect type="OnWearing" target="Contained,Character" Oxygen="-10.0" Condition="-0.5" interval="1" disabledeltatime="true"><Conditional IsDead="false" /><RequiredItem items="weldingfueltank" type="Contained" />
</StatusEffect>
<StatusEffect type="OnWearing" target="Contained,Character" targetlimbs="Torso" Oxygen="-10.0" Condition="-0.5" interval="1" disabledeltatime="true"><Conditional IsDead="false" /><RequiredItem items="incendiumfueltank" type="Contained" /><Affliction identifier="burn" amount="3.0" />
</StatusEffect>
PUCS使用船内氧气
<!--<StatusEffect type="OnWearing" target="Character" OxygenAvailable="-100.0" UseHullOxygen="false" />-->
<StatusEffect type="OnWearing" target="Contained,Character" UseHullOxygen="false" OxygenAvailable="1000.0" Condition="-0.3" comparison="And" targetslot="0"><Conditional IsDead="false" /><Conditional HullOxygenPercentage="lt 50" /><Conditional InWater="false" /><RequiredItem items="oxygensource" type="Contained" /></StatusEffect>
<StatusEffect type="OnWearing" target="Contained,Character" UseHullOxygen="false" OxygenAvailable="1000.0" Condition="-0.3" comparison="And" targetslot="0"><Conditional InWater="true" /><RequiredItem items="oxygensource" type="Contained" />
</StatusEffect>

与传统潜水服有几个不同之处,首先,没有第一行被注释掉的部分,即没有默认的无氧气罐的窒息效果(此处的注释是我书写时加的,为方便读者观看)。

而供氧的代码逻辑也有变化,第一个StatusEffect表示不在水中且船内氧气低于50时使用氧气罐,第二个表示在水中使用氧气罐,以此达成使用船内氧气的功能。同时,结合下方物品容器中的代码,表示不在水中且船内氧气低于50使用氧气罐时提供30%的速度加成。

<SubContainer capacity="1" maxstacksize="1"><Containable items="oxygensource,weldingtoolfuel" excludeditems="oxygenitetank" /><Containable items="oxygenitetank"><StatusEffect type="OnContaining" target="Character" SpeedMultiplier="1.3" setvalue="true" comparison="And" targetslot="0"><Conditional IsDead="false" /><Conditional HullOxygenPercentage="lt 50" /><Conditional InWater="false" /></StatusEffect></Containable>
</SubContainer>

自注射

以自注射耳机为例

<ItemContainer capacity="1" maxstacksize="1" autoinject="true"><SlotIcon slotindex="0" texture="Content/UI/StatusMonitorUI.png" sourcerect="384,448,64,64" origin="0.5,0.5" /><Containable items="chem,medical" />
</ItemContainer>

自注射的实现通过ItemContainer的元素属性autoinject="true"达成。
元素属性maxstacksize表示该容器单个物品栏的最大堆叠上限,对于自注射,此值设置为1,即不可堆叠。
使用SlotIcon给对应的物品栏提示图标,例如此处的药物、潜水服的氧气罐等。
同时,使用Containable设置存放容器可存放药物。

*补充,PUCS自注射与SubContainer讲解
<ItemContainer capacity="0" maxstacksize="0" hideitems="true" containedstateindicatorstyle="tank" containedstateindicatorslot="0" autoinject="true"><Containable items="none" /><SlotIcon slotindex="0" texture="Content/UI/StatusMonitorUI.png" sourcerect="64,448,64,64" origin="0.5,0.5" /><SlotIcon slotindex="1" texture="Content/UI/StatusMonitorUI.png" sourcerect="384,448,64,64" origin="0.5,0.5" /><SubContainer capacity="1" maxstacksize="1"><!--省略上文中氧气罐代码--></SubContainer><SubContainer capacity="1" maxstacksize="1"><Containable items="chem,medical" /></SubContainer>
</ItemContainer>

SubContainer一般用于有多种不同功能的容器,比如说此处PUSC,需要一个专门的氧气罐栏位,一个专门的自注射栏位。或者是下文中将要讲到的远程武器,分弹药栏和手电栏。在每个SubContainer设置自己的可容纳物品类型(Containable),元素属性capacitymaxstacksizeItemContainer类似,不再赘述。

扫描仪/热成像嵌入头盔

以萌化的头盔为例

ItemContainer配置如下,设置两个物品容器,只允许放入扫描仪/热成像。

<ItemContainer hideitems="true" capacity="2" maxstacksize="1" containedstateindicatorstyle="" containedspritedepths="0.551,0.552"><Containable items="healthscanner,thermalgoggles" />
</ItemContainer>

Wearable内设置子元素StatusEffect配置StatusHUD,如下列代码。

<StatusEffect type="OnWearing" target="This" targetitemcomponent="StatusHUD" drawhudwhenequipped="false" overlaycolor="0,0,0,0" range="3000" thermalgoggles="false" showdeadcharacters="false" showtexts="false" />
<StatusEffect type="OnWearing" target="This" targetitemcomponent="StatusHUD" drawhudwhenequipped="true" overlaycolor="176,0,0,120" range="3000" thermalgoggles="true" showdeadcharacters="false"><RequiredItem items="thermalgoggles" type="Contained" />
</StatusEffect>
<StatusEffect type="OnWearing" target="This" targetitemcomponent="StatusHUD" drawhudwhenequipped="true" overlaycolor="0,176,0,120" range="3000" showdeadcharacters="false" showtexts="true"><RequiredItem items="healthscanner" type="Contained" />
</StatusEffect>

自定义武器

MeleeWeapon 近战武器

<MeleeWeapon slots="Any,RightHand+LeftHand" aimpos="50,0" handle1="-22,2" handle2="-32,5" holdangle="30" reload="1.2" range="175" combatPriority="40" msg="ItemMsgPickUpSelect"><Attack targetimpulse="5" severlimbsprobability="7.5" itemdamage="50" structuredamage="10"><Affliction identifier="lacerations" strength="36" /><Affliction identifier="bleeding" strength="10" /><Affliction identifier="stun" strength="0.5" /><StatusEffect type="OnUse" target="Character"><Sound file="Content/Sounds/Damage/LimbSlash1.ogg" selectionmode="random" range="500" /><Sound file="Content/Sounds/Damage/LimbSlash2.ogg" range="500" /><Sound file="Content/Sounds/Damage/LimbSlash3.ogg" range="500" /><Sound file="Content/Sounds/Damage/LimbSlash4.ogg" range="500" /><Sound file="Content/Sounds/Damage/LimbSlash5.ogg" range="500" /><Sound file="Content/Sounds/Damage/LimbSlash6.ogg" range="500" /></StatusEffect></Attack>
</MeleeWeapon>

元素属性
slots 表示可由哪些生物容器拿取,如此处为任意背包栏或双手
aimpos 双手武器特供,表示武器在瞄准时手的高度
handle1 & handle2 表示双手的拿取相对位置偏移(相对于Sprite的origin)
holdangle 表示瞄准时武器的倾斜角度
reload 表示攻击的冷却时间
range 表示AI使用此武器的战斗距离,非武器攻击距离(攻击距离似乎无法更改,待确认)

Attack 攻击

在此对上文中的Attack做额外说明

主标签属性
targetimpulse & targetforce 可以理解为击退,此值为负数则为拉进
severlimbsprobability 断肢几率
structuredamage 对结构造成的损伤

子元素

Affliction 该攻击施加的痛苦,元素属性为痛苦ID和强度

aitarget ai目标

<aitarget sightrange="500" soundrange="250" fadeouttime="1" />

(待确认)使用该武器会发出多大动静

RangedWeapon 远程武器

以鱼叉枪为例

<RangedWeapon reload="1.75" launchimpulse="20.0" barrelpos="85,14" spread="1" unskilledspread="10" combatPriority="60" drawhudwhenequipped="true" crosshairscale="0.2"><Crosshair texture="Content/Items/Weapons/Crosshairs.png" sourcerect="0,256,256,256" /><CrosshairPointer texture="Content/Items/Weapons/Crosshairs.png" sourcerect="256,256,256,256" /><Sound file="Content/Items/Weapons/HarpoonGun1.ogg" type="OnUse" range="1000" /><Sound file="Content/Items/Weapons/HarpoonGun2.ogg" type="OnUse" range="1000" /><Sound file="Content/Items/Weapons/HarpoonGun3.ogg" type="OnUse" range="1000" /><StatusEffect type="OnUse"><Explosion range="150.0" force="5" shockwave="false" smoke="false" flames="false" flash="false" sparks="false" underwaterbubble="false" camerashake="6.0" /></StatusEffect><RequiredItems items="harpoonammo" type="Contained" msg="ItemMsgSpearRequired" /><RequiredSkill identifier="weapons" level="30" />
</RangedWeapon>

Crosshair & CrosshairPointer 准心
RequiredItems 物品需要,在此就是子弹配置
RequiredSkill 武器使用的技能需求

由于远程武器需要配置子弹槽位,ItemContainer标签内容如下。

<ItemContainer itempos="27,10" iteminterval="0,-4" hideitems="false" capacity="1" maxstacksize="6" containedstateindicatorslot="0" containedstateindicatorstyle="spear" containedspritedepths="0.551,0.552,0.553,0.554,0.555,0.556"><Containable items="harpoonammo" /><SlotIcon slotindex="0" texture="Content/UI/StatusMonitorUI.png" sourcerect="0,448,64,64" origin="0.5,0.5" /><SlotIcon slotindex="1" texture="Content/UI/StatusMonitorUI.png" sourcerect="320,448,64,64" origin="0.5,0.5" />   <SubContainer capacity="1" maxstacksize="1"><Containable items="flashlight" hide="false" itempos="18,12" setactive="true" /></SubContainer>
</ItemContainer>

ItemContainer元素属性maxstacksize表示该容器单个物品栏的最大堆叠上限,数值一般比内容物本身的堆叠上限低。

上述代码表示有两个格子,一格存放鱼叉,另一格存放手电。

*Rope 绳索

原版非爆炸鱼叉类射弹特供

<Rope sourcepullforce="300" targetpullforce="100" projectilepullforce="5" maxlength="1500" snaponcollision="false" spritewidth="3" tile="true" origin="0.05,0.5" targetminmass="30" lerpforces="true" snapanimduration="0.5"><Sprite texture="Content/Map/Thalamus/thalamus.png" sourcerect="617,352,174,32" depth="0.57" origin="0.5,0.5" /><!-- Snap after 1 seconds if not stuck to anything --><StatusEffect type="OnUse" target="This" Snapped="true" delay="1" checkconditionalalways="true"><Conditional targetitemcomponent="Projectile" IsStuckToTarget="false" /></StatusEffect>
</Rope>

自定义子弹/弹匣

导言

游戏内的子弹体系可分为两种,单个子弹独立装填(如鱼叉、左轮)和使用弹匣装填(如SMG、核子枪),两者有所区别,直观来讲,子弹就是在游戏中直接能看到的射弹(包括那些从弹匣中射出的),而弹匣可理解为一种特殊的物品容器。由于讲解弹匣最终也会归结到将子弹上,本篇将先对弹匣进行讲解。

弹匣:以SMG弹匣为例

<!--SMG弹匣,已删去无关代码-->
<Item name="" identifier="smgmagazine" maxstacksize="2" scale="0.5" category="Weapon" cargocontaineridentifier="metalcrate" linkable="true" tags="smallitem,smgammo" impactsoundtag="impact_metal_light"><ItemContainer hideitems="true" capacity="1" drawinventory="false" canbeselected="false" ShowConditionInContainedStateIndicator="true" SpawnWithId="smground" removecontaineditemsondeconstruct="true" containedstateindicatorstyle="bullet"><Containable items="smground" /><!--Spawn an SMG round on use. Condition -4.8 -> 21 shots per magazine.--><StatusEffect type="OnUse" target="This" condition="-4.8" disabledeltatime="true"><SpawnItem identifiers="smground" spawnposition="ThisInventory" /></StatusEffect></ItemContainer><!--Magazines can be combined to raise condition.--><Holdable canBeCombined="true" slots="Any,RightHand,LeftHand" handle1="0,0" msg="ItemMsgPickUpSelect" /></Item>

此处使用了上文讲过的ItemContainer标签定义了一个物品容器,在Holdable中设置canBeCombined=“true”,表示弹匣能够通过叠加来整合弹匣内子弹,StatusEffect表示在枪械使用时(Onuse),通过降低弹匣的condition来达到消耗子弹的效果。内部使用SpawnItem来生成SMG子弹(smground),也就是下文所要讲解的内容。

Projectile 射弹

注:Projectile中的Spirte就是射弹发射出来时显示贴图,包括激光类射弹。

我们先来看一段示例代码,以下为SMG子弹的Projectile部分。

<Projectile characterusable="false" hitscan="true" removeonhit="true"><ParticleEmitter particle="tracerfirearm" particleamount="1" velocitymin="0" velocitymax="0" colormultiplier="255,255,115,175" scalemultiplier="1,0.6" /><!--最主要的功能,Attack部分--><Attack structuredamage="4" targetforce="5" itemdamage="4" severlimbsprobability="0.1"><Affliction identifier="gunshotwound" strength="12.5" /><Affliction identifier="bleeding" strength="12.5" /><Affliction identifier="stun" strength="0.2" probability="0.1" /></Attack><StatusEffect type="OnImpact" target="UseTarget"><ParticleEmitter particle="impactfirearm" particleamount="1" velocitymin="0" velocitymax="0" /></StatusEffect><StatusEffect type="OnImpact" target="UseTarget"><Conditional entitytype="eq Structure" /><Conditional hastag="eq door" /><ParticleEmitter particle="spark" copyentityangle="true" anglemin="-10" anglemax="10" particleamount="5" velocitymin="-10" velocitymax="-200" scalemin="0.5" scalemax="1" /></StatusEffect><!-- smg rounds should not exist outside magazines --><StatusEffect type="OnNotContained" target="This" stackable="false" delay="1"><Remove /></StatusEffect>
</Projectile>

其中ParticleEmitter为粒子效果的设置,详情请看ParticleEmitter篇。

上述代码中StatusEffect定义的内容大部分为粒子效果配置触发环境,而代码最主要的部分,除了主元素Projectile以外,就是内部的Attack部分,定义了射弹的伤害,上文已讲,在此不再赘述。因此,本篇主要将通过示例讲解元素属性

主元素属性

hitscan=“true” 命中扫描,在内部模拟射弹的弹道,并立即击中目标,对于应当快速运动的射弹,此项应设置为true。
removeonhit=“true” 命中时移除射弹

鱼叉

<Projectile characterusable="false" launchimpulse="5" sticktocharacters="true" sticktoitems="true" sticktostructures="true" sticktodoors="false"><Attack structuredamage="15" itemdamage="15" targetforce="20" severlimbsprobability="0.1"><Affliction identifier="lacerations" strength="35" /><Affliction identifier="bleeding" strength="35" /><Affliction identifier="stun" strength="0.5" /></Attack><StatusEffect type="OnActive" target="UseTarget,This" checkconditionalalways="true" comparison="And"><Conditional Snapped="false" /><Conditional mass="lt 30" /><Affliction identifier="drag" strength="1" /></StatusEffect>
</Projectile>

launchimpulse 定义了射弹的抛射速度,默认值为10
sticktocharacters ~ sticktodoors 定义射弹击中对应物品中是否附着在物品上(如鱼叉会插在身上)

霰弹

<Projectile characterusable="false" hitscan="true" hitscancount="8" removeonhit="true" spread="15" friendlyfire="false">

spread 表示射弹发射时的角度随机偏移,造成散射的效果。
hitscancount=“8” 表示进行8次命中扫描,能够模拟8片射弹的效果,而不必实际产生8片射弹,可与spread结合使用
friendlyfire=“false” 代码摘选自Lidy,此项的默认值为true,官方文档并未给出解释,设置为false推测为取消友方伤害,待确认

多hit

<Projectile characterusable="false" maxtargetstohit="10" launchimpulse="60" friendlyfire="false">

maxtargetstohit=“3” 炮弹在停止之前可以击中3个目标,但一般会在同一生物上多次判定。

爆炸射弹代码示例

<Projectile characterusable="false" launchimpulse="10.0" severlimbsprobability="0.1"><Attack structuredamage="20" targetforce="10" penetration="0.5"><Affliction identifier="explosiondamage" strength="25" /></Attack><StatusEffect type="OnImpact" target="This" Condition="-100.0" disabledeltatime="true"><Explosion range="200.0" ballastfloradamage="50" structuredamage="10" levelwalldamage="50" itemdamage="250" force="5" severlimbsprobability="0.25"><Affliction identifier="burn" strength="50" /><Affliction identifier="stun" strength="1.5" /></Explosion><sound file="Content/Items/Weapons/ExplosionSmall1.ogg" range="3000" /><sound file="Content/Items/Weapons/ExplosionSmall2.ogg" range="3000" /><sound file="Content/Items/Weapons/ExplosionSmall3.ogg" range="3000" /><Remove /></StatusEffect>
</Projectile>

自定义药物

以绷带为例:

<SuitableTreatment type="bleeding" suitability="30" />
<SuitableTreatment type="burn" suitability="30" />

suitabletreatment

告诉游戏,此药物适合治疗哪些affliction。在健康界面中,如果该人物拥有此类affliction,会将此药物列在健康界面下方的快速治疗栏位。其中type表示affliction类型,suitability表示该药物治愈能力。

同样是绷带代码,药物的主体部分,也就是治疗/毒药效果定义在MeleeWeapon部分。

<MeleeWeapon canBeCombined="true" removeOnCombined="true" slots="Any,RightHand,LeftHand" aimpos="40,5" handle1="0,0" holdangle="10" reload="1.0" msg="ItemMsgPickUpSelect" HitOnlyCharacters="true"><RequiredSkill identifier="medical" level="40" /><StatusEffect type="OnUse" target="This" Condition="-100.0" setvalue="true"><Sound file="Content/Items/Medical/Bandage1.ogg" range="500" /><Sound file="Content/Items/Medical/Bandage2.ogg" range="500" /></StatusEffect><!-- 此处为重点 --><StatusEffect tags="medical" type="OnSuccess" target="This, Limb" duration="6.0"><ReduceAffliction type="bleeding" amount="5" /><ReduceAffliction type="burn" amount="5" /></StatusEffect><StatusEffect tags="medical" type="OnFailure" target="This, Limb" duration="6.0"><ReduceAffliction type="bleeding" amount="3.75" /><ReduceAffliction type="burn" amount="3.75" /></StatusEffect><!-- 结束 --><!-- Remove the item when fully used --><StatusEffect type="OnBroken" target="This"><Remove /></StatusEffect>
</MeleeWeapon>
<SkillRequirementHint identifier="medical" level="40" />

RequiredSkill表示药物使用的技能需求。可能你已经注意到了,在上文标出为重点的代码中,为OnSuccess和OnFailure单独设置了效果,药物在使用时会以使用者的医疗技能与需求技能进行一次判定,低于技能需求将有几率判定为Failure,一般而言,这将造成药效的减少或负面效果。当然你也可以故意写成Failure时药效更强的,在本篇下方将进行讲解。

StatusEffect元素属性duration表示内部书写的治疗效果将持续的时间(单位秒),内部使用子元素ReduceAffliction表示其治疗的affliction类型和每秒治愈的强度(amount)。

因此,药物总效果可以使用durationXamount计算得到,如上文代码中OnSuccess部分,治愈持续6s,每秒治愈5点流血,共计治疗30点,而OnFailure部分只会治疗 6*3.75=22.5 点。

自定义基因物质

<Item name="" identifier="geneticmaterialmoloch" variantof="geneticmaterialcrawler" nameidentifier="geneticmaterial"><Deconstruct><Item identifier="geneticmaterialmoloch" /></Deconstruct><InventoryIcon texture="Content/Items/Genetic/Genetic.png" sheetindex="2,3" sheetelementsize="64,64" origin="0.5,0.5" /><Sprite texture="Content/Items/Genetic/Genetic.png" sheetindex="9,0" sheetelementsize="32,32" depth="0.6" origin="0.5,0.5"/><GeneticMaterial nameidentifier="character.moloch" effect="damageresistance" tooltipvaluemin="10" tooltipvaluemax="25" />
</Item>

看看基因吧,家人们,很简单吗?确实,因为使用了variantof继承了爬爬基因(geneticmaterialcrawler),此处仅需要重写父类的部分,即修改此基因物质与爬爬基因不同的部分,即上文中的解构Deconstruct、两个贴图、和基因物质部分GeneticMaterial

GeneticMaterial 基因物质

nameidentifier 理论应该赋值"character.对应生物",官方文档并没有给出对应的解释
effect 很重要,表示此基因物资的对应效果名,此效果应该在Affliction或AfflictionHusk中定义,具体见Affliction篇。

四、Character 生物(可在角色编辑器中编辑)

防遗忘

finished

主文件结构简介

主文件以“生物名.xml”命名,包含生物基本信息、父类(亚种继承)、动画路径、生命、伤害抗性、音效、粒子特效(如血液)、物品栏(以及掉落物)、ai、状态效果(StatusEffect),本文将选取部分进行介绍。

注:建议在阅读本文时结合工房模组 “角色编辑器汉化”by、SinerSAMA

三类写法

1.以Character开头的独立/基类生物

2.以override里套Character重载已有生物

3.使用属性VariantOf继承已有生物的亚种生物,例如各类精英与幼崽(不强制以Charactervariant开头)

<Charactervariant inherit="Mudraptor" texture="%ModDir%/Characters/Mudraptor_veteran/Mudraptor_veteran.png" speciestranslationoverride="Mudraptor" SpeciesName="Mudraptor_friend" DisplayName="" Group="human" eatingspeed="15">

Charactervariant的写法有所不同,需要写明 inherit 继承生物,此将自动继承原生物的布娃娃与贴图,动画不继承,对于贴图,如果没有指定的话,如果是在mod中则会在mod的包中寻找对应的贴图,所以在此一定要写明该生物的贴图(其他两种写法贴图写在Ragdoll中),可用以下两个亚种生物特供子元素调整生物属性。

<ragdoll scalemultiplier="1.375" impacttolerance="60" />
<attack damagemultiplier="2" rangemultiplier="1.375" impactmultiplier="2" />

Inventory 物品栏

以Human为例

<inventory arrowslot="9" Slots="Card, Headset, Head, InnerClothes, OuterClothes, LeftHand, RightHand, Bag, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, HealthInterface" AccessibleWhenAlive="True" Commonness="1" />

主元素属性Slots定义了生物的物品栏类型与数量,上文中生物从左到右依次具有 ID卡位、耳机位、头部装备、服饰、外部服装、左手、右手、腰包、10个物品栏、基因连接器。

对于一些生物,可在生成时直接将物品生成到对应物品栏,如人鱼(Lidy)。

<inventory accessiblebyowner="True" Slots="RightHand,LeftHand,Bag,Any,Any,Any,Any,Any,Any" AccessibleWhenAlive="True" Commonness="5"><Item slot="RightHand" equip="true" Identifier="Mermaidhookcannon" /><Item slot="Bag" equip="true" Identifier="MermaidStorageBag" /><Item equip="true" Identifier="idcard" />
</inventory>

AI 行为树

主元素属性

<ai CombatStrength="490" Sight="1.5" Hearing="1.5" AggressionHurt="300" AggressionGreed="20" FleeHealthThreshold="0" AttackWhenProvoked="True" AvoidGunfire="False" DamageThreshold="0" AvoidTime="3" MinFleeTime="20" AggressiveBoarding="True" EnforceAggressiveBehaviorForMissions="True" TargetOuterWalls="True" RandomAttack="True" CanOpenDoors="False" KeepDoorsClosed="False" AvoidAbyss="True" StayInAbyss="False" PatrolFlooded="False" PatrolDry="False" StartAggression="0" MaxAggression="100" AggressionCumulation="0" WallTargetingMethod="Target">
</ai>

CombatStrength 战斗力(为下方对于强弱对手的不同行为提供判断依据)
Sight 视力系数
Hearing 听力系数

子元素

latchonto 吸附

在迅猛龙和蜂群中见过,迅猛龙此处的代码较少,不清楚工作原理,此处摘录蜂群的代码。

<latchonto attachtocharacters="true" attachtosub="false" attachtowalls="false" mindeattachspeed="5.0" maxdeattachspeed="8.0" damageondetach="5" detachstun="5.0" attachlimb="Torso" localattachpos="0,0" offset="0" attachlimbrotation="0" weld="false" maxattachduration="10" cooldown="5" />

latchonto指蜂群的 “抓人” 行为,mindeattachspeed表示目标逃脱吸附需要的最小速度

target 目标

<target Tag="stronger" State="Attack" Priority="100" ReactDistance="0" AttackDistance="0" Timer="0" IgnoreContained="False" IgnoreInside="False" IgnoreOutside="False" IgnoreIfNotInSameSub="False" IgnoreIncapacitated="False" Threshold="0" ThresholdMin="-1" ThresholdMax="-1" Offset="0,0" AttackPattern="Straight" PrioritizeSubCenter="False" SweepDistance="0" SweepStrength="10" SweepSpeed="1" CircleStartDistance="5000" CircleRotationSpeed="1" CircleStrikeDistanceMultiplier="5" CircleMaxRandomOffset="0" />

主要功能解释:对于战力更强的对象,采用进攻行为,优先级为100

主元素属性

State 定义对于拥有对应Tag的目标的行为
Priority 行为优先级
ReactDistance 反应距离,缺省为0
AttackDistance 缺省为0,仅在State为PassiveAggressive见过有值
IgnoreInside 此生物在潜艇内时忽略目标
IgnoreOutside 此生物在潜艇外时忽略目标
(更多内容可订阅 “角色编辑器汉化” 并在游戏内查看)

State

进攻型 Attack,
PassiveAggressive 需设置ReactDistance,AttackDistance
回避 Avoid 需设置ReactDistance
跟随 Follow 需设置ReactDistance
保护 Protect 需设置ReactDistance(在保护目标受到伤害后进行反击)
进食 Eat

Tag

stronger/weaker 以CombatStrength为评价指标判定
hostile 敌对阵营
provocative 刺激物/挑衅者
dead 死物(会出现碎尸现象)
owner (宠物)孵化者;(召唤杖模组SummonNight)召唤者
human/ crawler/ husk/ watcher等Tag

注意

对于owner Tag:已知游戏特性,将召唤杖放在非玩家身上的任何形式的容器(包括腰包)时,召唤出来的迅猛龙将不会将玩家判定为召唤者(owner),转而执行执行对human tag的跟随,现版本的模组中对于两种行为几乎无影响,唯一可能需要注意的是,对于后者可能会存在召唤物转头跟随其他船员的情况。
From wiki:解决方案,通过按E互动来重新指定owner。

对于Protect和Follow State:只要该生物存在这两个State的行为,且存在对应的目标,无论该行为优先级是多少,总是会忽略除了hostile以外的大多数Tag所对应的target行为。

SwarmBehavior 群体行为

<SwarmBehavior mindistfromclosest="25" maxdistfromcenter="750" cohesion="1" />

蜂群和爬爬有此类行为,具体表现为抱团行动。

petbehavior 宠物行为

格式示例

<petbehavior maxhappiness="100" happinessdecreaserate="0.016" hungerincreaserate="0.03" playforce="6.0"><eat tag="dead" requiredhunger="70-100" hunger="-100" happiness="10" priority="100" />
</petbehavior>

eat & itemproduction 饮食与产出

此处以Lidy代码为例

<eat tag="petfood1" ignorecontained="true" requiredhunger="10-100" hunger="-50" happiness="5" priority="100" />
<eat tag="petfood2" ignorecontained="true" requiredhunger="10-100" hunger="-50" happiness="5" priority="100" />
<eat tag="petfood3" ignorecontained="true" requiredhunger="10-100" hunger="-50" happiness="5" priority="100" />
<eat tag="monsterfood" ignorecontained="true" requiredhunger="10-100" hunger="-50" happiness="5" priority="100" />
<eat tag="dead" requiredhunger="10-100" hunger="-100" happiness="10" priority="80" />
<itemproduction rate="0.0015" requiredhappiness="80-100" requiredhunger="0-30"><item identifier="Mermaidegg1" commonness="30" /><item identifier="Mermaidmilk" commonness="70" />
</itemproduction>

eat中 petfood1~3 对应3种类型宠物的饮食规则,具体可查wiki

itemproduction中 commonness 表示各种产物的概率,各类产物概率总和应为100

StatusEffect 状态效果

主元素属性

type 什么情况下产生该效果
target 效果作用对象
delay 延时生效

type

OnActive 一般正常状态下(可以理解为只要活着就是该tpye)
OnDeath 死亡状态
OnUse 使用时(一般为武器使用)

target

NearbyCharacters 附近生物(需要配合range属性)
this/character 该生物自己
UseTarget 作用对象(一般为武器或射弹使用)

子元素

Affliction 效果 identifier 效果ID strength 强度
Conditional 附加条件
e.g. HealthPercentage=“lte 30” 血量剩余百分比小于等于30%(数值表达式需转写)
Sound 音效

示例

人鱼(Lidy):为附近生物提供海之祝福

<StatusEffect type="OnActive" target="NearbyCharacters" range="200"><Affliction identifier="MermaidBlessings" strength="1" />
</StatusEffect>

分型:在血量小于等于30%的时候触发,每秒增长0.4内脏损伤和50强壮

<StatusEffect type="OnActive" target="this"><Conditional HealthPercentage="lte 30"/><Affliction identifier="internaldamage" strength="0.4"/><Affliction identifier="strengthen" strength="50"/><Sound file="Content/Characters/Fractalguardian/ALIEN_fractalGuardianPanicLoop.ogg" loop="true" range="3000" />
</StatusEffect>

蜂群:死亡后0.2秒移出该生物

<StatusEffect type="OnDeath" target="This" delay="0.2"><RemoveCharacter />
</StatusEffect>
<StatusEffect type="OnActive" target="This" delay="120"><DropContainedItems /><RemoveCharacter />
</StatusEffect>

Ragdoll 布娃娃文件

此文件一般存放于对应生物文件夹下的Ragdoll文件夹内,记录生物的贴图、生物攻击、形变特效(如爬爬的呼吸特效)以及可在编辑器中编辑的关节、骨骼等内容。生物主体的设计可在角色编辑器中实现,具体可参考潜渊症官方mod制作文档,此处仅对一些编辑器无法实现的特殊功能进行讲解。

动画&特效

形变:以爬爬呼吸为例

<deformablesprite sourcerect="36,0,115,113" depth="0.2" origin="0.4606622,0.4951695" subdivisions="5,5" texture="" color="255,255,255,255" deadcolor="255,255,255,255" deadcolortime="0" ignoretint="False">
<SpriteDeformation type="inflate" resolution="5,5" frequency="2" scale="0.2" sync="1" stopwhenhostisdead="True" typename="inflate" blendmode="Add" usemovementsine="False" sineoffset="0" strength="1" maxrotation="90" onlyinwater="False" />
<SpriteDeformation type="custom" resolution="5,5" frequency="0" blendmode="Multiply" row0="0,0 0.5,1 1,1 0.5,1 0,0" row1="0,0 0.5,1 1,1 0.5,1 0,0" row2="0,0 0.5,1 1,1 0.5,1 0,0" row3="0,0 0.5,1 1,1 0.5,1 0,0" row4="0,0 0.5,1 1,1 0.5,1 0,0" amplitude="1" sync="-1" typename="custom" usemovementsine="False" stopwhenhostisdead="False" sineoffset="0" strength="1" maxrotation="90" onlyinwater="False" />
<spritedeformation type="bendjoint" resolution="5,5" blendmode="Add" sync="-1" typename="bendjoint" usemovementsine="False" stopwhenhostisdead="False" sineoffset="0" strength="1" maxrotation="90" onlyinwater="False" />
</deformablesprite>

使用type="inflate"达成形变特效,此处形变主要为纵向的形变,如何将其调整为横向形变未知。(23.4.8尝试过,失败了)

补注:关于type=“custom”,效果未知但一定要有;我曾更改此处blendmode为"Add"并调整amplitude,其效果感觉类似以精灵图纵向中轴线为轴三维的绕轴转动(就是类似翻书的感觉)。

扭曲:以爬爬妈孕肚为例

<deformablesprite sourcerect="606,591,418,433" depth="0.21" origin="0.52797294,0.5039486" subdivisions="5,5" texture="" color="255,255,255,255" deadcolor="255,255,255,255" deadcolortime="0" ignoretint="False">
<spritedeformation type="noise" resolution="5,5" frequency="1" amplitude="0.4" changespeed="2" blendmode="Add" sync="-1" typename="noise" strength="1" maxrotation="90" usemovementsine="False" stopwhenhostisdead="True" sineoffset="0" onlyinwater="False" />
<spritedeformation type="inflate" resolution="5,5" frequency="10" scale="0.1" blendmode="Add" usemovementsine="False" stopwhenhostisdead="True" sync="-1" typename="inflate" strength="1" maxrotation="90" sineoffset="0" onlyinwater="False" />
<spritedeformation type="noise" resolution="5,5" frequency="0.01" amplitude="0.25" changespeed="2" blendmode="Add" sync="-1" typename="noise" strength="1" maxrotation="90" usemovementsine="False" stopwhenhostisdead="True" sineoffset="0" onlyinwater="False" />
<SpriteDeformation type="custom" resolution="5,5" frequency="0" blendmode="Multiply" row0="0,0 0,0 0,0 0,0 0,0" row1="0,0 0,0 0,0 0,0 0,0" row2="0,0 0.5,1 1,1 0.5,1 0,0" row3="0,0 0.5,1 1,1 0.5,1 0,0" row4="0,0 0.5,1 1,1 0.5,1 0,0" amplitude="1" sync="-1" typename="custom" usemovementsine="False" stopwhenhostisdead="False" sineoffset="0" strength="1" maxrotation="90" onlyinwater="False" />
<spritedeformation type="bendjoint" resolution="5,5" blendmode="Add" sync="-1" typename="bendjoint" usemovementsine="False" stopwhenhostisdead="False" sineoffset="0" strength="1" maxrotation="90" onlyinwater="False" />
</deformablesprite>

使用type="noise"达成扭曲特效,多个扭曲特效可重叠,例如此处以及一些大型生物毛发的动态效果。

旋转:以蠕虫牙摆动为例

<limb id="113" width="0" height="400" name="Left Tooth" type="None" blinkfrequency="0.2" blinkdurationin="0.1" blinkdurationout="0.01" blinkholdtime="2" blinkrotationin="30" blinkrotationout="0" blinkforce="300" blinktransitionin="EaseOut" blinktransitionout="Exponential" healthindex="2" friction="0.3" restitution="0.05">

旋转动画控制参数放于limb中,blinkfrequency ~ blinktransitionout 为旋转动画控制参数,简单来讲此处动画可分为两段,动画A经过T1时间旋转至角度A处,之后动画B经过T2时间旋转至角度B处,具体可订阅“角色编辑器汉化”模组在编辑器内查看。

Latcher眼睛旋转与蠕虫牙摆动类似。另有防御机器人螺旋桨旋转,原理与上述不同,代码如下。

<sprite SourceRect="42,133,42,13" Origin="0.5,0.5" Depth="0" Texture="" IgnoreTint="False" Color="255,255,255,255" DeadColor="255,255,255,255" DeadColorTime="0" />
<decorativesprite SourceRect="0,133,42,13" Origin="0.5,0.5" Depth="0.6" Texture="Content/Characters/Defensebot/DefenseBot.png" IgnoreTint="False" DeadColor="255,255,255,255" DeadColorTime="0" Offset="20,0" RandomOffset="0,0" OffsetAnim="Sine" OffsetAnimSpeed="600" RotationSpeed="0" Rotation="360" RandomRotation="0,0" Scale="1" RandomScale="0,0" RotationAnim="None" RandomGroupID="0" Color="255,255,255,255">
<IsActiveConditional IsDead="False" />
</decorativesprite>

光效:以防御机器人警戒灯为例

<lightsource castshadows="false" comparison="or" Color="255,0,0,255" Range="15" Scale="1" Offset="0,0" Rotation="0" Flicker="0" FlickerSpeed="0" PulseFrequency="0" PulseAmount="0" BlinkFrequency="5"><sprite texture="Content/Characters/Defensebot/DefenseBot.png" sourcerect="0,149,28,20" origin="0.5,0.5" size="1,1" alpha="1.0" /><lighttexture Texture="Content/Lights/pointlight_falloff.png" Origin="0.5,0.5" Size="1,1" /><Conditional AIState="Aggressive" /><Conditional AIState="Attack" />
</lightsource>

生物外骨骼

外骨骼实际就是肢体,其特点为对各项伤害都有较高抗性,且脱落承伤阈值相对于主干肢体较小,
(摩洛克外壳为例外,minseverancedamage=“15”),如下为迅猛龙胸部装甲代码(省略limb大段赘述)。

<limb id="25" name="ChestArmor" attackforcemultiplier="1" minseverancedamage="0.8" healthindex="0"><deformablesprite texture="" sourcerect="761,176,251,171" origin="0.5179283,0.5497076" depth="0.05" color="255,255,255,255" deadcolor="255,255,255,255" deadcolortime="0" ignoretint="False" /><damagemodifier armorsector="0,360" afflictiontypes="damage" damagemultiplier="0.1" damagesound="LimbArmor" damageparticle="brownchunks" deflectprojectiles="True" afflictionidentifiers="" probabilitymultiplier="1" /><damagemodifier armorsector="0,360" afflictiontypes="bleeding" damagemultiplier="0" damagesound="LimbArmor" deflectprojectiles="True" afflictionidentifiers="" probabilitymultiplier="1" damageparticle="" /><damagemodifier armorsector="0,360" afflictiontypes="burn" damagemultiplier="0.25" damagesound="" deflectprojectiles="True" afflictionidentifiers="" probabilitymultiplier="1" damageparticle="" />
</limb>

主元素属性minseverancedamage设置了该肢体的脱落承伤阈值(不仅外骨骼,任何可以脱落的肢体都可以设置)

附属标签damagemodifier设置伤害系数(抗性),一般将流血系数设置为0,并提供替他各项的伤害抗性。
如上述代码,设置外伤系数0.1,流血系数为0,烧伤系数0.25。

远程生物攻击

射弹型:以捕钩獸(Latcher)为例

前置部分(省略内部大段赘述)

<limb Name="SpikeAttack" ID="14" >
<attack StructureSoundType="StructureBlunt" Context="Any" TargetType="Structure" TargetLimbType="None" HitDetectionType="Distance" AfterAttack="FallBack" AfterAttackDelay="1" Reverse="False" Retreat="False" Range="2000" DamageRange="2000" MinRange="0" Duration="1" CoolDown="60" SecondaryCoolDown="0" CoolDownRandomFactor="0" FullSpeedAfterAttack="True" StructureDamage="0" EmitStructureDamageParticles="True" ItemDamage="0" Penetration="0" LevelWallDamage="0" Ranged="True" AvoidFriendlyFire="False" RequiredAngle="30" Stun="0" OnlyHumans="False" ApplyForceOnLimbs="" Force="0" RootForceWorldStart="0,0" RootForceWorldMiddle="0,0" RootForceWorldEnd="0,0" RootTransitionEasing="Linear" Torque="0" ApplyForcesOnlyOnce="False" TargetImpulse="0" TargetImpulseWorld="0,0" TargetForce="0" TargetForceWorld="0,0" SubmarineImpactMultiplier="1" SeverLimbsProbability="0" Priority="1" Blink="False">

attack主元素属性

FullSpeedAfterAttack=“True” 攻击后全速前进(保持原速)
EmitStructureDamageParticles=“True” 释放结构破坏粒子
Ranged=“True” 远程攻击

attack子元素

<conditional targetself="true" healthpercentage="lt 75" />
<StatusEffect type="OnFailure" target="This"><SpawnItem identifier="toothspike" spawnposition="This" count="3" aimspread="15" rotationtype="Collider" rotation="0" /><sound file="Content/Characters/Latcher/ABYSSM_teeth.ogg" range="20000" volume="1" dontmuffle="true" />
</StatusEffect>
<StatusEffect type="OnFailure" target="This" delay="0.1"><SpawnItem identifier="toothspike" spawnposition="This" count="2" aimspread="10" rotationtype="Collider" rotation="0" />
</StatusEffect>
<StatusEffect type="OnFailure" target="This" delay="0.2"><SpawnItem identifier="toothspike" spawnposition="This" count="5" aimspread="20" rotationtype="Collider" rotation="0" />
</StatusEffect>
<StatusEffect type="OnFailure" target="This" delay="0.3"><SpawnItem identifier="toothspike" spawnposition="This" count="2" aimspread="10" rotationtype="Collider" rotation="0" />
</StatusEffect>
<StatusEffect type="OnFailure" target="This" delay="0.4"><SpawnItem identifier="toothspike" spawnposition="This" count="3" aimspread="10" rotationtype="Collider" rotation="0" />
</StatusEffect>
<StatusEffect type="OnFailure" target="This" delay="0.5"><SpawnItem identifier="toothspike" spawnposition="This" count="4" aimspread="20" rotationtype="Collider" rotation="0" />
</StatusEffect>
</attack>
</limb>

上文书写了捕钩獸发射尖刺(toothspike)的六段攻击,通过使用StatusEffectSpawnItem标签生成射弹。

武器型:以分型(Legacyfractalguardian)或人鱼(Lidy)为例

主文件书写

<inventory slots="RightHand, Any, Any, Any" accessiblewhenalive="False" accessiblebyowner="True" commonness="5"><Item identifier="guardianhookcannon" slot="RightHand" /><Item identifier="aliencircuitry" />
</inventory>

标签中 slots=“RightHand, Any, Any, Any”,表示该生物具有右手栏位和三个背包栏位;附属标签将守护者鱼叉枪(guardianhookcannon)直接生成到右手(的容器)上。附人鱼(Lidy)该部分代码书写:

<inventory accessiblebyowner="True" Slots="RightHand,LeftHand,Bag,Any,Any,Any,Any,Any,Any" AccessibleWhenAlive="True" Commonness="5"><Item slot="RightHand" equip="true" Identifier="Mermaidhookcannon" /><Item slot="Bag" equip="true" Identifier="MermaidStorageBag" /><Item equip="true" Identifier="idcard" />
</inventory>

Radgoll文件与Latcher类似

由于AI生物不会更换武器子弹,需要专门制作并设置无限子弹武器。

huskappendage画皮附肢

一类特殊的布娃娃文件,与普通的布娃娃文件不同,画皮附肢仅需要列出附肢所使用的肢体和关节。

<huskappendage><limb name="Huskappendage 1" id="15" height="10" width="15" ignorecollisions="True" flip="True"><sprite texture="Content/Characters/Humanhusk/Husk_Injector.png" sourcerect="25,86,20,15" depth="0.11" origin="0.5,0.5" ignoretint="true"/><attack range="40" damagerange="25" duration="0.1" targetforce="0" structuresoundtype="StructureBlunt" force="6" applyforceonlimbs="0" torque="0" context="Any" targettype="Character" hitdetectiontype="Distance" structuredamage="0" itemdamage="0" stun="0" onlyhumans="False" applyforcesonlyonce="False" targetimpulse="3" targetimpulseworld="0,0" targetforceworld="0,0" severlimbsprobability="0" stickchance="0" priority="0" afterattack="FollowThrough" cooldown="1" secondarycooldown="0" cooldownrandomfactor="0"><StatusEffect type="OnUse" target="This" disabledeltatime="true"><ReduceAffliction type="damage" strength="1.5" /></StatusEffect><Affliction identifier="bitewounds" strength="2" /><Affliction identifier="bleeding" strength="2" probability="0.5"/><Affliction identifier="huskinfection" strength="1" probability="0.5"/><Affliction identifier="stun" strength="0.3" /></attack></limb><!--省略其他limb--><!-- Head to husk appendage --><joint name="Head to Huskappendage" limb1="1" limb2="15" limb1anchor="6.5,-8" limb2anchor="-3,0" upperlimit="0" lowerlimit="-10" canbesevered="False" limitenabled="True" /><!--省略其他joint-->
</huskappendage>

可创建新的生物主文件并使用huskappendage来调用,例如HumanHusk部分代码如下。

<Character speciesname="Humanhusk" displayname="" husk="True" humanoid="True" caninteract="True" hasinfo="True" usehuskappendage="True" needsair="False" specifiertags="true" canspeak="False" blooddecal="blood" group="husk" speciestranslationoverride="" needswater="False" noise="100" visibility="100" bleedparticleair="blooddrop" bleedparticlewater="waterblood" bleedparticlemultiplier="1" eatingspeed="10" pathfinderpriority="1" hideinsonar="False" hideinthermalgoggles="True" sonardisruption="0" disabledistance="25000"><ragdolls folder="default" /><animations folder="default" /><huskappendage affliction="huskinfection" path="Content/Characters/Humanhusk/Huskappendage.xml" /><!--剩余部分-->

此处涉及与Affliction的关联,具体请查看Affliction篇。

五、Afflictions 痛苦

防遗忘

Neurotauma? 一般制作不会这么深入,不考虑举例细讲

文件结构简介

使用Afflictions标签起头,内部可使用Affliction标签定义多个痛苦(命名可随意,不局限于Affliction),如下示例代码。

<Afflictions><!--以Affliction命名--><Affliction></Affliction><!--以Burn命名也可以--><Burnname="Burn"identifier="burn"></Burn>
</Afflictions>

Affliction标签内书写痛苦具体信息,包括但不限于基本ID名称、类型(type)、死亡原因描述、痛苦检查描述、扣血强度、痛苦程度自然变化速度、视觉效果(色差、鱼眼、重影等),本文将选取部分进行讲解。

Affliction 痛苦

主元素属性

以内脏损伤为例

<InternalDamagename="Internal Damage"identifier="internaldamage"description="The area is an ugly shade of purple, and apparently very painful to touch. You suspect a bone might be broken."type="damage"causeofdeathdescription="Died of internal injuries"selfcauseofdeathdescription="You have succumbed to your internal injuries."limbspecific="true"maxstrength="200"damageoverlayalpha="0.1"><!--此处省略描述代码--><!--此处省略效果代码--><!--此处省略图标代码--></InternalDamage>

identifier 痛苦ID
type 类型
limbspecific=“true” 为真则每个肢体单独计算影响,否则则影响整个生物(如精神病、眩晕、画皮感染等)
maxstrength 痛苦最大强度
damageoverlayalpha 血液覆盖效果的不透明度

<!--母皇基因效果-->
<Afflictionname="Hyperactivity On Damage"identifier="hyperactivityondamage"type="geneticmaterialbuff"limbspecific="false"indicatorlimb="Torso"hideiconafterdelay="true"showiconthreshold="0"treatmentthreshold="100"maxstrength="100"iconcolors="94,54,95;163,73,164;200,191,231">

indicatorlimb=“Torso” 表示该痛苦图标显示在躯干上
showiconthreshold 强度到达多少时才会显示效果图标
TreatmentThreshold 强度到达多少时AI才会去治疗
iconcolors 定义了图标颜色的渐变,根据痛苦的当前强度,定义用哪种颜色渲染痛苦的图标

<!--广谱抗生素效果-->
<Afflictionname="Husk Infection Resistance"identifier="huskinfectionresistance"description="Husk be gone."type="resistance"isbuff="true"limbspecific="false"maxstrength="600"affectmachines="false"MedicalSkillGain="0.01">

isbuff 如果设置为true,游戏会将这种痛苦识别为buff,AI不会试图治疗它,并且健康UI会将受影响的肢体呈现为绿色而不是红色。
affectmachines 如果设置为true,这种痛苦会影响标记为机器的角色,例如分形守护者。
MedicalSkillGain 当角色施加痛苦时增长多少医疗技能,如果为毒剂,则对敌方施加才增加,若为buff,则对友方施加才增加

子元素

icon 图标

<icon texture="Content/UI/MainIconsAtlas.png" sourcerect="128,768,128,128" color="195,136,60,255" origin="0,0"/>

看过前文应该很熟悉这种贴图的数据表述,不再赘述。

Description 描述

内脏损伤的检查描述如下,下文代码定义了低损伤和正常强度的描述。

<Description textidentifier="afflictiondescription.internaldamage.low"minstrength="0"maxstrength="40"/>
<Descriptiontextidentifier="afflictiondescription.internaldamage"minstrength="40"maxstrength="200"/>

textidentifier 描述ID,一般格式为 afflictiondescription.痛苦名.额外描述(如低感染low,自己self)
minstrength ~ maxstrength 定义了该描述生效时的痛苦强度区间

而具体描述存储在翻译文件中,如下示例代码。

<afflictionname.internaldamage>内脏损伤</afflictionname.internaldamage>
<afflictiondescription.internaldamage>有血管破裂和器官损伤的迹象。</afflictiondescription.internaldamage>
<afflictioncauseofdeath.internaldamage>死于内脏损伤</afflictioncauseofdeath.internaldamage>
<afflictioncauseofdeathself.internaldamage>你因内脏损伤而死。</afflictioncauseofdeathself.internaldamage>

我们再来看一段太空疱疹的代码,下文代码定义了他人查看和自己查看的不同描述。

<Descriptiontextidentifier="afflictiondescription.spaceherpes"target="OtherCharacter" />
<Descriptiontextidentifier="afflictiondescription.spaceherpes.self"target="Self" />

target 表示对应人物查看时显示的描述

当然两者可以结合使用,如下文画皮感染中玩的比较花的代码。

<Description textidentifier="afflictiondescription.huskinfection.dormant.self" target="Self" minstrength="0" maxstrength="50"/><Description textidentifier="afflictiondescription.huskinfection.transition.self" target="Self" minstrength="50" maxstrength="75"/><Description textidentifier="afflictiondescription.huskinfection.active.self" target="Self" minstrength="75" maxstrength="99"/><Description textidentifier="afflictiondescription.huskinfection.dormant.other" target="OtherCharacter" minstrength="0" maxstrength="50"/><Description textidentifier="afflictiondescription.huskinfection.transition.other" target="OtherCharacter" minstrength="50" maxstrength="75"/><Description textidentifier="afflictiondescription.huskinfection.active.other" target="OtherCharacter" minstrength="75" maxstrength="99"/><Description textidentifier="afflictiondescription.huskinfection.final" minstrength="99" maxstrength="101"/>

其翻译文件中的具体表述如下。

<afflictiondescription.huskinfection.dormant.self>你的喉咙里有些瘙痒;源头似乎还在移动。</afflictiondescription.huskinfection.dormant.self>
<afflictiondescription.huskinfection.transition.self>喉咙里长出的东西让你无法说话;它让你感到害怕。</afflictiondescription.huskinfection.transition.self>
<afflictiondescription.huskinfection.active.self>在内心深处,你知道自己应该担心那个在你嘴里颤抖移动的东西。然而,你却感到莫名的平静。</afflictiondescription.huskinfection.active.self>
<afflictiondescription.huskinfection.dormant.other>偶尔可以听到来自病人体内的微弱的咔嚓声。</afflictiondescription.huskinfection.dormant.other>
<afflictiondescription.huskinfection.transition.other>除了偶尔从喉咙深处发出的咔嚓声,病人毫无声息。</afflictiondescription.huskinfection.transition.other>
<afflictiondescription.huskinfection.active.other>有些黑暗可怕的东西在口中游移。已经完全无法说话。</afflictiondescription.huskinfection.active.other>
<afflictiondescription.huskinfection.final>剧烈的癫痫发作预示着画皮的出现。</afflictiondescription.huskinfection.final>

Effect 效果

内脏损伤代码如下。

<Effect minstrength="0" maxstrength="200" multiplybymaxvitality="true"minvitalitydecrease="0"maxvitalitydecrease="2"/>

minstrength ~ maxstrength 定义了该描述生效时的痛苦强度区间
multiplybymaxvitality 表示此痛苦对血量的影响将以百分比影响而非具体数值
minvitalitydecrease ~ maxvitalitydecrease 表示此痛苦减少的血量数值

我们再来看一下醉酒的效果,了解一下更多的属性效果。

<Effect minstrength="20" maxstrength="40"minvitalitydecrease="0"maxvitalitydecrease="10"minscreendistort="0"maxscreendistort="0.1"strengthchange="-0.1"minfacetint="255,0,0,0"maxfacetint="255,0,0,50"minspeedmultiplier="1.0"maxspeedmultiplier="0.8">
</Effect>

strengthchange 表示痛苦强度的自然变化,一般痛苦为负值,表示痛苦自然愈合,画皮感染此值为正,表示感染随时间加重
minscreendistort & maxvitalitydecrease 表示屏幕扭曲,此值与痛苦强度呈线性关系,若max小于min,则痛苦强度越大则效果越弱
minspeedmultiplier & maxspeedmultiplier 表示移速调整系数,规则与上文扭曲类似

同时Effect能造成的效果不仅这两项,具体可翻阅官方文档。

*补充,移速调整的其他写法

例如爬爬基因的增加游泳速度,可以使用StatValue设置增加移速类型,通过minvalue和maxvalue定义调整的数值。

<Effect minstrength="0" maxstrength="100"><StatValue stattype="SwimmingSpeed" minvalue="0.1" maxvalue="0.5" />
</Effect>

用类似的 方法也可以让赋予其他效果,例如母皇基因定义了受伤后的回血效果。

<Effect minstrength="0" maxstrength="20"><StatusEffect target="Character" type="OnDamaged"><requiredaffliction type="damage" minstrength="5" /><Affliction identifier="haste" amount="2" /></StatusEffect>
</Effect>

PeriodicEffect 周期效果

周期效果定义了周期性触发的效果,一般在配置该效果生效时的音效时使用,以精神病(Psychosis)为例。

<PeriodicEffect mininterval="100" maxinterval="200"><StatusEffect target="Character" duration="30" onlyinside="true"><Conditional IsLocalPlayer="True"/><Sound file="Content/Items/WarningSiren.ogg" /></StatusEffect>
</PeriodicEffect>

mininterval 最小触发间隔(单位秒)
maxinterval 最大触发间隔

此处定义了精神病会听到警报声,StatusEffect内部使用duration表示音效重复播放30s,若不设置则放一遍。

若是短间隔、高频率的音效,可使用下面的写法。

<PeriodicEffect mininterval="30" maxinterval="120"><StatusEffect target="Character" onlyoutside="true"><Conditional IsLocalPlayer="True"/><Sound file="Content/Characters/Spineling/SPINELING_idle2.ogg" selectionmode="Random"/><Sound file="Content/Characters/Spineling/SPINELING_idle4.ogg" /><Sound file="Content/Characters/Tigerthresher/TIGERTRESHER_idle1.ogg" /></StatusEffect>
</PeriodicEffect>

Sound内使用selectionmode表示此处的音效为随机选取。

AfflictionHusk 画皮痛苦

AfflictionHusk一般用在为人物增加生物性状的痛苦,例如画皮、脊刺基因效果、迅猛龙基因效果以及类似猫娘模组(CatGene)的猫猫基因。此类痛苦一般需要额外配置一种对应的生物,在生物文件中定义该痛苦生效时为人物增加的附肢,包括但不限于贴图、布娃娃和生物攻击。

<!--以下为画皮感染的代码-->
<AfflictionHuskname="Husk infection"identifier="huskinfection"type="alieninfection"targets="human,crawler"huskedspeciesname="husk"activationthreshold="0"showiconthreshold="40"showinhealthscannerthreshold="20"karmachangeonapplied="-1"maxstrength="100"transferbuffs="true"achievementonremoved="healhusk"dormantthreshold="50"activethreshold="75"transformthresholdondeath="75"transitionthreshold="100"IgnoreTreatmentIfAfflictedBy="husktransformimmunity"healcostmultiplier="2.5"basehealcost="200"iconcolors="60,140,195,255;60,107,195,255;60,0,195,255">
<!--以下为迅猛龙经验效果的部分代码-->
<AfflictionHuskname="Natural Melee Weapon"identifier="naturalmeleeweapon"type="alieninfection"needsair="true"causespeechimpediment="false"sendmessages="false">

主元素属性

Affliction的属性也适用于AfflictionHusk,相同部分不再赘述。本篇将重点介绍AfflictionHusk特供的属性。

属性名 描述
targets 目标,Affliction也能用,表示了对于哪些生物此痛苦生效
huskedspeciesname 表示拥有此效果的生物死亡时将转变成的画皮种类
showiconthreshold 表示强度到达多少时能看见图标,此值一般高于扫描仪阈值,Affliction也能用
showinhealthscannerthreshold 表示强度到达多少时可通过扫描仪看见,Affliction也能用
transferbuffs 表示转变后是否继承现有buff
activationthreshold 表示强度到达多少时该痛苦生效,一般设置为0,Affliction也能用
dormantthreshold 表示画皮感染强度到达多少时进入休眠阶段,默认值为最大强度的50%
activethreshold 表示画皮感染强度到达多少时进入活跃阶段,默认值为最大强度的75%
transformthresholdondeath 表示画皮感染强度到达多少时生物死亡会转变为画皮,默认值设置为活跃阶段的值
transitionthreshold 表示画皮感染强度到达多少时进入最终阶段,默认值为最大强度
IgnoreTreatmentIfAfflictedBy 表示如果同时拥有何种痛苦,则在前哨站治疗时忽略此痛苦
healcostmultiplier 表示在前哨站治疗时每有1点强度的mk开销,Affliction也能用
basehealcost 表示在前哨站治疗时的基础开销,Affliction也能用
needsair 转变后是否需要氧气,默认为画皮配置的false
causespeechimpediment 是否阻碍通讯,默认为画皮配置的true
sendmessages 是否发送感染信息,默认为画皮配置的true

在生物篇中已经提及huskappendage的使用,如下列示例代码。

<huskappendage affliction="huskinfection" path="Content/Characters/Humanhusk/Huskappendage.xml" />

属性affliction定义了是何种痛苦会产生此种附肢,path定义了对应附肢的布娃娃文件。

六、Talents 天赋

文件结构简介

天赋文件可以分三类,TalentTrees天赋树文件,此文件定义了天赋树的主体架构与排版。Talents天赋文件,此文件定义了天赋的图标、描述与具体效果。TalentsAffliction定义了在天赋中使用特殊Affliction,具体写法与Affliction类似,但请注意,并非所有的天赋都需要对应的Affliction。

TalentTrees 天赋树文件

天赋树文件的大体结构如下文示例代码。元素属性jobidentifier定义了使用此天赋树的职业名称,内部使用标签SubTree定义子树,所有的天赋按子树架构编排。

<TalentTree jobidentifier="captain"><SubTree></SubTree>
</TalentTree>

基础天赋

 <SubTree identifier="captain_primary" nameidentifier="talenttree.primary" type="primary"><TalentOptions requiredtalents="2" maxchosentalents="6"><TalentOption identifier="bountyhunter"/><TalentOption identifier="logisticsexpert"/><TalentOption identifier="prodigy"/><TalentOption identifier="inspirationalleader"/><TalentOption identifier="veteran"/><TalentOption identifier="travelingtradesman"/></TalentOptions><TalentOptions requiredtalents="2" maxchosentalents="6"><TalentOption identifier="emergencymaneuvers"/><TalentOption identifier="sailorwithnoname"/><TalentOption identifier="camaraderie"/><TalentOption identifier="downwiththeship"/><TalentOption identifier="gunsmith"/><TalentOption identifier="steadytune"/></TalentOptions></SubTree>

此处的天赋为天赋树最上两行的通用天赋,在元素属性中使用type="primary"定义。

TalentOptions表示在此标签内部的天赋为同级天赋,即在同一行,会受到两个元素属性的限制。
requiredtalents表示需要在此行至少选择几个天赋才会解锁下一层天赋,对于第二行的天赋则解锁职业天赋,默认为1
maxchosentalents表示在此行最多选择几个天赋,默认为1

特殊天赋

 <SubTree identifier="gunslinger" type="specialization" requires="captain_primary" blocks="skipper,politician"><TalentOptions><TalentOption identifier="quickdraw"/></TalentOptions><TalentOptions><TalentOption identifier="lonewolf"/><TalentOption identifier="deputy"/></TalentOptions><TalentOptions><TalentOption identifier="drunkensailor"/></TalentOptions><TalentOptions><TalentOption identifier="bigguns"/></TalentOptions></SubTree><SubTree identifier="skipper" type="specialization" requires="captain_primary" blocks="gunslinger,politician"></SubTree><SubTree identifier="politician" type="specialization" requires="captain_primary" blocks="gunslinger,skipper"></SubTree>

此处的天赋为天赋树下侧的三棵职业天赋子树,在元素属性中使用type="specialization"定义。

使用元素属性blocks表示在完成一棵子树前将锁定其他的子树。

TalentsFile 天赋构建文件

官方文档根本没写天赋,因此此处的讲解存在一些主观表述。建议直接抄官方的缝合一下(不要看m200的,写的很复杂)此处主要讲解怎么抄。(如果需要具体讲解,请加群提议)

先看一下整体结构。

<Talent identifier="bigguns"><!--图标--><Icon texture="Content/UI/TalentsIcons1.png" sheetindex="2,4" sheetelementsize="128,128"/><!--描述--><Description tag="talentdescription.bigguns"></Description><!--配方、效果--><AddedRecipe itemidentifier="handcannon"/><AbilityGroupEffect abilityeffecttype="OnAttack"></AbilityGroupEffect>
</Talent>

讲解一下基础的也是比较重要的两个标签。

Icon图标

<Icon texture="Content/UI/TalentsIcons1.png" sheetindex="3,1" sheetelementsize="128,128"/>

天赋的图标与其他Icon不同,采用单元化的布局,如下图所示,在此使用sheetelementsize定义每个单元表格的大小,sheetindex定义了该图标的索引,上文代码中为Inspirational Leader的图标,"3,1"表示第4列第2行的图标(索引从0开始)

Description描述

以下为物流专家(logisticsexpert)的描述代码,与Affliction一样,需要与翻译文件对照使用,与Affliction不同的是此处的描述主要为使用变量替换数值或文字。

<Description tag="talentdescription.logisticsexpert"><!--替换数值的Replace--><Replace tag="[xpbonus]" value="15" color="gui.green"/><Replace tag="[moneybonus]" value="15" color="gui.green"/><!--替换文字的Replace--><Replace tag="[missiontype1]" value="missiontype.cargo" color="gui.orange"/><Replace tag="[missiontype2]" value="missiontype.personneltransport" color="gui.orange"/>
</Description>

Description属性tag表示此描述适用于翻译文件中的哪个标签。

Replace定义了变量用于替换数值或文字,tag定义了变量名,在翻译文件中引用此变量名来获得后续的数值valuecolor表示此数值在显示时的颜色渲染。

下面为其在翻译文件中的使用和游戏中实际渲染出的效果。

<talentdescription.logisticsexpert>完成[missiontype1]或[missiontype2] 任务时,获得[xpbonus]%的经验奖励和[moneybonus]%的金钱奖励。</talentdescription.logisticsexpert>

同时翻译文件中可使用颜色处理格式来给其他文字染色,格式为 ‖color:gui.orange‖待染色文字‖end‖ ,如下文示例代码。

潜艇‖color:gui.orange‖引擎‖end‖能力随你的等级提高

AbilityGroupInterval & AbilityGroupEffect

额外奖励

舰长天赋logisticsexpert

<AbilityGroupEffect abilityeffecttype="OnGainMissionMoney"><Conditions><AbilityConditionMission missiontype="Cargo,Escort"/></Conditions><Abilities><CharacterAbilityModifyValue multiplyvalue="1.15"/></Abilities></AbilityGroupEffect><AbilityGroupEffect abilityeffecttype="OnGainMissionExperience"><Conditions><AbilityConditionMission missiontype="Cargo,Escort"/></Conditions><Abilities><CharacterAbilityModifyValue multiplyvalue="1.15"/></Abilities>
</AbilityGroupEffect>

能力增幅

舰长天赋prodigy,给自己能力增幅
+50%技能提升速度(增加医疗技能等也是这个写法)

<AbilityGroupInterval><Abilities><!-- 1 = +100% --><CharacterAbilityModifyStat stattype="SkillGainSpeed" value="0.5"/> </Abilities>
</AbilityGroupInterval>

舰长天赋inspirationalleader,给所有船员/施加Affliction
适用于所有船员:+25% 技能提升速度

<AbilityGroupInterval interval="0.9"><Abilities><CharacterAbilityApplyStatusEffectsToAllies allowself="true"><StatusEffects><StatusEffect type="OnAbility" target="Character" disabledeltatime="true"><Affliction identifier="inspirationalleader" strength="1.0"/></StatusEffect></StatusEffects></CharacterAbilityApplyStatusEffectsToAllies></Abilities>
</AbilityGroupInterval>

潜艇增幅

机修工天赋engineengineer,潜艇增幅
潜艇引擎能力随你的等级提高,每级最大速度+2.5%,最高可达20%。

<AbilityGroupInterval interval="60"><Conditions><AbilityConditionHasLevel levelequals="1" /></Conditions><Abilities><CharacterAbilityGiveItemStatToTags tags="engine" stattype="EngineMaxSpeed" value="1.025" /></Abilities></AbilityGroupInterval>
<AbilityGroupInterval interval="60"><Conditions><AbilityConditionHasLevel levelequals="2" /></Conditions><Abilities><CharacterAbilityGiveItemStatToTags tags="engine" stattype="EngineMaxSpeed" value="1.05" /></Abilities>
</AbilityGroupInterval>
<!--省略其他等级-->

配方解锁

舰长天赋emergencymaneuvers,配方解锁

<AddedRecipe itemidentifier="handcannon"/>
<AddedRecipe itemidentifier="handcannonround"/>

应急反应

例如潜艇受到攻击时,或是进水超过50%时产生的效果

舰长天赋emergencymaneuvers,潜艇受攻击/施加Affliction
每当你的潜艇受到怪物的伤害时,获得最高舵手技能,持续 5 秒。

<AbilityGroupEffect abilityeffecttype="AfterSubmarineAttacked"><Conditions><AbilityConditionEvasiveManeuvers/></Conditions><Abilities><CharacterAbilityApplyStatusEffects><StatusEffects><StatusEffect type="OnAbility" target="This" multiplyafflictionsbymaxvitality="true" disabledeltatime="true"><Affliction identifier="evasivemaneuvers" amount="1.0"/></StatusEffect></StatusEffects></CharacterAbilityApplyStatusEffects></Abilities>
</AbilityGroupEffect>

舰长天赋downwiththeship,潜艇进水/施加Affliction
如果你在潜艇上,它至少被淹了 50%,你会额外获得 50% 的游泳速度,并在 60 秒内获得 50% 的修复船体速度增益。

<AbilityGroupInterval interval="1"><Conditions><AbilityConditionShipFlooded floodpercentage="0.5"/></Conditions><Abilities><CharacterAbilityApplyStatusEffects><StatusEffects><StatusEffect type="OnAbility" target="Character" disabledeltatime="true" multiplyafflictionsbymaxvitality="true"><Affliction identifier="downwiththeship" amount="60.0"/></StatusEffect></StatusEffects></CharacterAbilityApplyStatusEffects></Abilities>
</AbilityGroupInterval>

武器增益

安全官天赋slayer,武器增益/位置判定
使用鱼叉获得额外 25% 的攻击力。如果你在公海,获得鱼叉的额外50%攻击力。

<AbilityGroupEffect abilityeffecttype="OnAttack"><Conditions><AbilityConditionAttackData tags="harpoonammo"/></Conditions><Abilities><CharacterAbilityModifyAttackData addeddamagemultiplier="0.25"/></Abilities></AbilityGroupEffect><AbilityGroupEffect abilityeffecttype="OnAttack"><Conditions><AbilityConditionAttackData tags="harpoonammo"/><AbilityConditionInHull invert="true" /></Conditions><Abilities><CharacterAbilityModifyAttackData addeddamagemultiplier="0.25"/></Abilities>
</AbilityGroupEffect>

后勤建设

医生天赋blooddonor,任务完成/物品获取
每当您完成至少一个任务时,即可在您的物品栏中获得一个血包

<AbilityGroupEffect abilityeffecttype="OnAnyMissionCompleted"><Abilities><CharacterAbilityPutItem itemidentifier="antibloodloss2" amount="1"/></Abilities>
</AbilityGroupEffect>

工程师天赋funwithfission,质量提升
燃料棒制造质量提升1

<AbilityGroupEffect abilityeffecttype="None"><Abilities><CharacterAbilityGivePermanentStat statidentifier="reactorfuel" stattype="IncreaseFabricationQuality" value="1" /></Abilities>
</AbilityGroupEffect>

机修工天赋miner,解构产出/工具使用
每当您解构矿石时,您都有 20% 的机会获得双倍的产量。使用切割机将矿石分离速度提高 100%。

<!--切割机-->
<AbilityGroupEffect abilityeffecttype="None"><Abilities><CharacterAbilityGiveStat stattype="RepairToolDeattachTimeMultiplier" value="1"/></Abilities>
</AbilityGroupEffect>
<!--解构矿石-->
<AbilityGroupEffect abilityeffecttype="OnItemDeconstructedMaterial"><Conditions><AbilityConditionServerRandom randomchance="0.2"/><AbilityConditionItem tags="ore"/></Conditions><Abilities><CharacterAbilityModifyValue multiplyvalue="2"/></Abilities>
</AbilityGroupEffect>

套装效果

助理天赋enrollintoclowncollege,小丑之力/施加Affliction
只要你穿着完整的小丑服装,你就获得了小丑的力量。小丑力量授予您:+10% 移动速度+5% 物理伤害抗性

<AbilityGroupInterval interval="0.9"><Conditions><AbilityConditionHasItem tags="clowngear,clownmask" requireall="true"/></Conditions><Abilities><CharacterAbilityApplyStatusEffects><StatusEffects><StatusEffect type="OnAbility" target="Character" disabledeltatime="true" multiplyafflictionsbymaxvitality="true"><Affliction identifier="clownpower" amount="1.0"/></StatusEffect></StatusEffects></CharacterAbilityApplyStatusEffects></Abilities>
</AbilityGroupInterval>

TalentsAffliction 效果文件

具体书写与痛苦类似,在此仅列出示例鼓舞人心的领导者(inspirationalleader),不再详细讲解。

<Afflictionidentifier="inspirationalleader"type="talentbuff"isbuff="true"limbspecific="false"hideiconafterdelay="true"showiconthreshold="1"maxstrength="1"duration="1"treatmentthreshold="1000"iconcolors="33,75,78;126,211,224;126,211,224;227,247,249"><Effect minstrength="0" maxstrength="1"><!-- 100% XP boost --><CharacterAbilityModifyStat stattype="SkillGainSpeed" value="0.25"/></Effect><Icon texture="Content/UI/TalentsIcons2.png" sheetindex="7,7" sheetelementsize="128,128" color="10,193,114,255" origin="0,0"/>
</Affliction>

七、Particle 粒子效果

注意:Particle并非一个元素或文件,Particle涉及多个文件,在此将其统称为粒子效果。

粒子效果主要是通过ParticleEmitter元素来使用,在武器/攻击相关的内容中大量使用。

首先看一下在物品文件中的使用,如射弹舰载激光(三联pulselaserbolttrilaser)代码示例:(已删除无关代码)

<Projectile characterusable="false" hitscan="true" removeonhit="true" spread="10" staticspread="true" hitscancount="3" damagedoors="true" penetration="0.5"><ParticleEmitter particle="tracerpulselaser" particleamount="1" velocitymin="0" velocitymax="0" /><StatusEffect type="OnImpact" target="UseTarget"><ParticleEmitter particle="muzzleflashpulselaser" anglemin="0" anglemax="360" particleamount="10" velocitymin="0" scalemin="0.5" scalemax="0.8" /><ParticleEmitter particle="weldspark" particleamount="5" anglemin="0" anglemax="360" velocitymin="300" velocitymax="350" scalemin="1.5" scalemax="1.9" drawontop="true" colormultiplier="255,200,225,180" /><ParticleEmitter particle="FlareBubbles" particleamount="3" anglemin="0" anglemax="360" velocitymin="0" velocitymax="50"/></StatusEffect>
</Projectile>

ParticleEmitter 粒子发射器

particle 粒子效果类型
particleamount 粒子数量

上文下方的三个粒子效果为击中时候的闪光和火星(muzzleflashpulselaser & weldspark),以及在水中飞行时的气泡(FlareBubbles)。

事实上对于粒子效果只有一部分存储在射弹(Projectile)内,关于舰载激光蓄力时的粒子效果存放在炮台物品中。

自定义粒子

ParticlePrefabs 粒子预制文件

预制粒子文件以prefabs标签起头,子元素存放自定义粒子,对于上文中的particle需要为其配置对应的粒子预制prefabs,如下示例代码,定义了bubbles的粒子效果。

<bubbles startsizemin="0.6,0.6" startsizemax="1,1" sizechangemin="0.1,0.1" sizechangemax="0.3,0.3" startrotationmin="0" startrotationmax="360" startcolor="255,255,255,200" endcolor="255,255,255,0" lifetime="3" growtime="0.1" usecollision="True" deleteoncollision="True" drawtarget="Water" velocitychange="0,0.1" startdelaymin="0" startdelaymax="0" angularvelocitymin="0" angularvelocitymax="0" rotatetodirection="False" drag="0" waterdrag="0" velocitychangewater="0,0.1" collisionradius="1" friction="0.5" restitution="0.5" blendstate="AlphaBlend" animduration="1" loopanim="True" drawontop="False" lifetimemin="0" middlecolor="255,255,255,255" usemiddlecolor="False" priority="-1"><sprite texture="Content/Particles/ParticleAtlas.png" sourcerect="270,5,103,119" />
</bubbles>

八、语言&本地化

文件结构简介

本地化文件负责存储本mod内需要的文字和介绍的翻译文本,官方翻译文本放置在/Content/Texts/文件夹内,除此之外,常见将本地化文件夹命名为"Languages"或"Localization"。

<infotexts language="Simplified Chinese" nowhitespace="true" translatedname="中文(简体)"><!--entity-->
</infotexts>

如上述示例代码,文件以infotexts标签起头,子属性language="Simplified Chinese"表示内部对应的语言名,translatedname="中文(简体)"表示语言名在该语言中的翻译,这两项应与官方已实装的语言对应。

示例

示例代码如下,以物品大类举例,以标签entityname.+[物品ID]的方式指定物品,后接物品翻译,注意标签的对应;物品简介使用entitydescription替换entityname即可。更多内容可参照下方代码。

<!--物品大类-->
<entityname.feederstaff>蜂群捕食者召唤杖</entityname.feederstaff>
<entitydescription.feederstaff>放入生理盐水或异星血浆,召唤6只友好的蜂群捕食者保护你2分钟!</entitydescription.feederstaff>
<!--病症-->
<afflictionname.></afflictionname.>
<afflictiondescription.></afflictiondescription.>
<!--天赋-->
<talentname.></talentname.>
<talentdescription.>造成的‖color:gui.orange‖伤害‖end‖和‖color:gui.orange‖眩晕‖end‖时长提高[amount]%。</talentdescription.>
<!--待补充-->

附录1

本文讲解示例涉及mod列表

  • 角色编辑器汉化|by、SinerSAMA 心儿大佬的汉化对本文中Character部分起了很大帮助
  • MermaidPlan|by、法莎莉雅 (人鱼娘,AI绘制)
  • 木卫二萌化计划|by、事不过三兄
  • SummonNight召唤杖拓展|by、Xiao[CN]
  • M200|by、内 鬼
  • EuropeWar|by、椎名黑冬

友情链接

wiki:Welcome to the Barotrauma Wiki! (barotraumagame.com)

源代码:网页链接(github.com)

官方mod制作文档:网页链接 (github.com)

注意

From 事不过三兄

与高难狩猎兼容性解决:(注:同时可在不侵权的情况下联动)
把所有的%moddir%替换为%moddir:[mod包名]% (注:将包名替换整个[mod包名],包括[])
这个问题是variant继承异常导致的。
自己改的话会导致hash报错,所以这个回复也是给作者写的

控制台

按F3呼出控制台

spwan crawler cursor 在鼠标位置生成crawler
editcharacters
editsprites
game
enablecrewai 启用 AI 控制的机组人员的 AI。
enableenemyai 启用 AI 控制的敌人的 AI。
gender [Male/Female/None]

附录2

数值表达式转写表

转写 英文全称 中文释义
gt greater than 大于
gte greater than or equal 大于等于
lt less than 小于
lte less thanor equal 小于等于
eq equal 等于
neq not equal 不等于

部分物品ID

ID 名称
physicorium 钢素
incendium 燃素水晶
fulgurium 雷素
sulphuriteshard 亚硫酸矿
dementonite 摄魂矿
oxygeniteshard 氧矿
paralyxis 麻痹源

【潜渊症 | 万字解析】模组制作研究讲义相关推荐

  1. 潜渊症LINUX环境部署全流程

    前言 在被<不止游戏>安利后,一向对深海和未知充满向往的我很快入手了这款游戏.经过几天简单的试玩,有了想要组建服务器和其他人一起探险的想法.说干就干,笔者手里刚好有一台曾经部署过饥荒的云服 ...

  2. 潜渊症设置语言后闪退bug解决

    潜渊症设置语言后闪退bug解决 steam上最近出了个海底潜水艇的合作生存游戏,看了直播后感觉画风挺有意思,就买了个玩 谁知道安装后设置语言 没有任何提示 直接闪退!!! 咱也是写代码的,想体现下自己 ...

  3. 【Minecraft】不重启游戏直接注入模组的研究(一)

    理论存在 废话不多说,先看一段代码 import com.sun.tools.attach.VirtualMachine;public class AttachExample {public stat ...

  4. LoRa模组:Ra-01S 初体验

    大家好,我是程序员小哈. 最近买了几块Ra-01S模组,该模组基于LoRa技术,感兴趣的可以买两个,我们一起玩起来. LoRa 是一种基于扩频技术的超远距离无线传输方案.这一方案改变了以往关于传输距离 ...

  5. Minecraft 1.12.2模组开发(二十) 导出模组

    模组制作完成后,我们就可以将其导出成为.jar文件,进行发布,供全世界的玩家进行下载游玩了 1.进入模组开发的文件夹 -> 起动cmd控制台 2.输入构建指令等待其构建模组 Windows系统: ...

  6. H.265及最新芯片模组技术现状和研究方向

    在视频监控领域,目前支持H.265的芯片厂商有安霸和海思,海思芯片在成本控制等方面具有很大优势,在视频监控领域处于国内领先地位.前端H.265芯片方案主要有Hi3516D,Hi3516CV300:后端 ...

  7. 网易我的世界能安装java模组吗_网易的我的世界能不能自己制作模组?怎么制作?...

    制作模组是面向有一定Java基础的玩家,最起码要理解并熟练运用以下概念回: · 类(Class) · 八大基本数答据类型(Primitive),和三种引用类型 · 对象(Object),属性和方法 · ...

  8. 华为云IoT智慧物流案例04 | 4G网卡拨号(广和通L610-CAT.1模组)与北斗定位模组(中科微电子)数据解析

    华为云IoT智慧物流案例04 | 4G网卡拨号(广和通L610-CAT.1模组)与北斗定位模组(中科微电子)数据解析 回顾 第一章 广和通L610-CAT.1模组调测和拨号脚本编写并验证网络 第二章 ...

  9. 《OV4689摄像头模组驱动源码解析》

    <OV4689摄像头模组驱动源码解析> OV4689是一款广泛应用于工业.安防等领域的高清图像传感器.在这篇文章中,我们将介绍如何在单片机上使用OV4689模组,并提供相应的驱动源码. O ...

最新文章

  1. WinForm打包或部署
  2. 软件工程的实践项目的自我目标
  3. 全网最全程序员效率工具及小技巧
  4. 安卓应用在各大应用市场上架方法整理
  5. mysql数据库1067错误
  6. 我们如何实现“业务 100% 云原生化,让阿里中间件全面升级到公共云架构”?
  7. nfa状态转换图正规式_0x02 从NFA到DFA
  8. 信息学奥赛一本通 1140:验证子串 | OpenJudge NOI 1.7 18
  9. selenium 安装报错问题
  10. Java注解之自定义注解
  11. vs2010字符集问题
  12. 2018我读过的那些书
  13. bp神经网络算法原理公式,bp神经网络算法推导
  14. 微信小程序轮播中的current_五分钟掌握微信小程序轮播图
  15. M27C64A引脚说明
  16. 微信小程序 - 开发者账号申请流程
  17. python怎么让图片旋转45度_python – 有没有办法将matplotlib图旋转45度?
  18. VS2019 无法登录 许可证已过期 无法下载许可证
  19. mac下elk的安装
  20. sqlserver,拆分分隔符并转换为列表格

热门文章

  1. 评:著名画家毕建勋三幅以身许国图的三种命运 钱江
  2. WPF 日历模板改写
  3. 基于Struts开发锦绣网上礼品店购物商城系统
  4. 第二章:WPF常用控件介绍
  5. SAP喊出“在中国,为中国”的口号
  6. 怎么恢复未保存的word文件
  7. sea.js的基本使用方法
  8. NVIDIA GeForce GTX 850M win10 cuda配置及安装教程
  9. css解决浏览器记住密码后input框的背景色为淡黄色的代码
  10. HTML 杨辉三角,杨辉三角的实现