SimpleLootBox/1.5/Defs/SimpleLootBoxExample.xml
2025-05-08 08:39:17 -05:00

193 lines
6.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<Defs>
<ThingDef Name="SimpleLootBoxBase" ParentName="ResourceBase" Abstract="True">
<thingClass>ThingWithComps</thingClass>
<techLevel>Medieval</techLevel>
<thingCategories>
<li>Artifacts</li>
</thingCategories>
<tradeTags>
<li>Artifacts</li>
</tradeTags>
</ThingDef>
<ThingDef ParentName="SimpleLootBoxBase">
<defName>SimpleLootBoxExampleA</defName><!-- 箱子的定义名 -->
<label>simple loot box example A</label><!-- 箱子的名字,可以进行本地化翻译 -->
<description>Example A.</description><!-- 箱子的描述,可以进行本地化翻译 -->
<graphicData>
<texPath>SimpleLootBox/ExampleA</texPath><!-- 箱子的贴图路径 -->
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<statBases>
<Mass>1.0</Mass><!-- 箱子的重量 -->
<MarketValue>100</MarketValue><!-- 箱子本身的价值 -->
</statBases>
<tradeability>Buyable</tradeability><!-- 箱子是否可以交易,有几个字面意思可以理解的值 None Sellable Buyable All -->
<comps>
<li Class="CompProperties_Usable">
<useJob>UseArtifact</useJob>
<useLabel>Activate {0_label}</useLabel>
<showUseGizmo>true</showUseGizmo>
<useDuration>150</useDuration>
</li>
<li Class="SimpleLootBox.CompProperties_SpawnLootBox">
<lootBoxList>
<li>
<thingDef>SimpleLootBoxExampleA</thingDef><!-- 箱子的定义名,加入到击杀生物后的掉落列表 -->
<chance>0.5</chance><!-- 这个箱子的掉落概率 -->
</li>
</lootBoxList>
</li>
<li Class="SimpleLootBox.CompProperties_LootBox">
<lootBoxOpenSound>lootBoxOpenSound</lootBoxOpenSound><!-- 进入开箱界面的音效 -->
<lootBoxSpinningSound>lootBoxSpinningSound</lootBoxSpinningSound><!-- 选取物品时的音效单曲循环sustainer -->
<lootBoxBackgroundMusicSound>lootBoxBackgroundMusicSound</lootBoxBackgroundMusicSound><!-- 开箱界面的背景音乐单曲循环sustainer -->
<lootBoxThingDef>
<li>
<thingDef>Silver</thingDef><!-- 箱子可以开出的物品的定义名 -->
<count>1000</count><!-- 该物品生成的数量 -->
<weight>5</weight><!-- 这项奖励的生成权重 -->
<rarity>2</rarity><!-- 这项奖励的稀有度(使用的颜色与文本)可用选项 0 1 2 3 4 5 不填默认为0数字越大稀有度越高-->
<effecterDef>Skip_ExitNoDelay</effecterDef><!-- 生成奖励时可以播放的特效,不设置就没特效 -->
<lootBoxFinalizingRewardSound>lootBoxFinalizingRewardSound</lootBoxFinalizingRewardSound><!-- 该奖励被选中时的音效 -->
</li>
<li>
<thingDef>Gold</thingDef>
<count>500</count>
<weight>1</weight>
<rarity>4</rarity>
</li>
<li>
<thingDef>Bed</thingDef>
<stuff>WoodLog</stuff><!-- 如果这个物品是stuffable会使用这里设置的stuff -->
<quality>Masterwork</quality><!-- 如果这个物品有品质,会使用这里设置的品质,可用的品质为 Awful Poor Normal Good Excellent Masterwork Legendary-->
<count>1</count>
<weight>2</weight>
<rarity>2</rarity>
</li>
<li>
<thingDef>MeleeWeapon_MonoSword</thingDef>
<quality>Legendary</quality>
<count>1</count>
<weight>1</weight>
<rarity>5</rarity>
<effecterDef>GiantExplosion</effecterDef>
</li>
</lootBoxThingDef>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="SimpleLootBoxBase">
<defName>SimpleLootBoxExampleB</defName>
<label>simple loot box example B</label>
<thingClass>ThingWithComps</thingClass>
<description>Example B.</description>
<graphicData>
<texPath>SimpleLootBox/ExampleB</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<statBases>
<Mass>1.0</Mass>
<MarketValue>100</MarketValue>
</statBases>
<tradeability>Buyable</tradeability>
<comps>
<li Class="CompProperties_Usable">
<useJob>UseArtifact</useJob>
<useLabel>Activate {0_label}</useLabel>
<showUseGizmo>true</showUseGizmo>
<useDuration>100</useDuration>
</li>
<li Class="SimpleLootBox.CompProperties_SpawnLootBox">
<lootBoxList>
<li>
<thingDef>SimpleLootBoxExampleB</thingDef>
<chance>0.5</chance>
</li>
</lootBoxList>
</li>
<li Class="SimpleLootBox.CompProperties_LootBox">
<lootBoxOpenSound>lootBoxOpenSound</lootBoxOpenSound>
<lootBoxSpinningSound>lootBoxSpinningSound</lootBoxSpinningSound>
<lootBoxBackgroundMusicSound>lootBoxBackgroundMusicSound</lootBoxBackgroundMusicSound>
<lootBoxPawnKindDef>
<li>
<pawnKindDef>Mercenary_Gunner</pawnKindDef><!-- 箱子可以开出的人物的定义名 -->
<count>2</count><!-- 该人物生成的数量 -->
<weight>5</weight><!-- 这项奖励的生成权重 -->
</li>
<li>
<pawnKindDef>HAR_Nearmaere_Example</pawnKindDef>
<count>1</count>
<weight>5</weight>
<rarity>3</rarity>
<effecterDef>ExtinguisherExplosion</effecterDef>
</li>
<li>
<pawnKindDef>Mech_Centurion</pawnKindDef>
<count>1</count>
<weight>5</weight>
<rarity>4</rarity>
<effecterDef>ExtinguisherExplosion</effecterDef>
</li>
</lootBoxPawnKindDef>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="SimpleLootBoxBase">
<defName>SimpleLootBoxExampleC</defName>
<label>simple loot box example C</label>
<thingClass>ThingWithComps</thingClass>
<description>Example C.</description>
<graphicData>
<texPath>SimpleLootBox/ExampleC</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<statBases>
<Mass>1.0</Mass>
<MarketValue>100</MarketValue>
</statBases>
<tradeability>Buyable</tradeability>
<comps>
<li Class="CompProperties_Usable">
<useJob>UseArtifact</useJob>
<useLabel>Activate {0_label}</useLabel>
<showUseGizmo>true</showUseGizmo>
<useDuration>100</useDuration>
</li>
<li Class="SimpleLootBox.CompProperties_SpawnLootBox">
<lootBoxList>
<li>
<thingDef>SimpleLootBoxExampleC</thingDef>
<chance>0.5</chance>
</li>
</lootBoxList>
</li>
<li Class="SimpleLootBox.CompProperties_LootBox">
<lootBoxOpenSound>lootBoxOpenSound</lootBoxOpenSound>
<lootBoxSpinningSound>lootBoxSpinningSound</lootBoxSpinningSound>
<lootBoxBackgroundMusicSound>lootBoxBackgroundMusicSound</lootBoxBackgroundMusicSound>
<lootBoxPawnKindDef><!-- 箱子开出的奖励可以混合人物和物品 -->
<li>
<pawnKindDef>Mercenary_Gunner</pawnKindDef>
<count>2</count>
<weight>5</weight>
</li>
</lootBoxPawnKindDef>
<lootBoxThingDef><!-- 箱子开出的奖励可以混合人物和物品 -->
<li>
<thingDef>Silver</thingDef>
<count>1000</count>
<weight>5</weight>
<rarity>2</rarity>
<effecterDef>Skip_ExitNoDelay</effecterDef>
<lootBoxFinalizingRewardSound>lootBoxFinalizingRewardSound</lootBoxFinalizingRewardSound>
</li>
</lootBoxThingDef>
</li>
</comps>
</ThingDef>
</Defs>