\Barotrauma\Content\Items\Gardening\growableplants.xml香蕉的部分
<?xml version="1.0" encoding="utf-8"?>
<Items>
<!-- -->
<!-- 香蕉物品,useinhealthinterface="true"可以在醫療界面出現使用 -->
<Item name="" identifier="banana" category="Misc" Tags="smallitem,seed,plantitem" maxstacksize="8" cargocontaineridentifier="metalcrate" scale="0.5" impactsoundtag="impact_soft" spritecolor="215,245,77,255" useinhealthinterface="true">
<!-- TODO: sprite -->
<sprite texture="Content/Map/Outposts/Art/FactionItems.png" sourcerect="263,193,38,39" depth="0.2" origin="0.5,0.5"/>
<!-- 香蕉有3%機率在種子袋出現 -->
<PreferredContainer primary="seedbag" amount="1" spawnprobability="0.03"/>
<!-- 香蕉基礎價格50,不是特殊物品,只能在小丑商人處購買 -->
<Price baseprice="50" canbespecial="false">
<Price storeidentifier="merchantoutpost" sold="false"/>
<Price storeidentifier="merchantcity" sold="false"/>
<Price storeidentifier="merchantresearch" sold="false"/>
<Price storeidentifier="merchantmilitary" sold="false"/>
<Price storeidentifier="merchantmine" sold="false"/>
<!-- 條件,小丑派系聲望>=50,才能在小丑商人處購買香蕉3~5根 -->
<Price storeidentifier="merchantclown" minavailable="3" maxavailable="5" sold="true">
<Reputation faction="clowns" min="50"/>
</Price>
</Price>
<!-- 耐久50%以上的香蕉分解出鉀跟碳 -->
<Deconstruct time="30">
<Item identifier="potassium" mincondition="0.5"/>
<Item identifier="carbon" mincondition="0.5"/>
</Deconstruct>
<!-- growthspeed成長速度,pickingtime採收時間,seedrate產生種子機率,productrate產生香蕉機率,flowerquantity開花數量決定成熟度 -->
<Growable growthspeed="0.076" pickingtime="3" maximumvines="18" maxhealth="375" hardiness="0.15" floodtolerance="0.2" seedrate="0" productrate="0.0056" flowerquantity="4" baseflowerscale="0.60" vinescale="0.25" vinetint="55,152,27,255" flowertint="139,56,87,255">
<ProducedItem identifier="banana" probability="1.0"/>
<VineSprites vineatlas="Content/Items/Gardening/branches.png" decayatlas="Content/Items/Gardening/branches_overlay.png">
<LeafSprite texture="Content/Items/Gardening/GrowablePlants_Temp.png" sourcerect="0,256,256,256"/>
<LeafSprite texture="Content/Items/Gardening/GrowablePlants_Temp.png" sourcerect="256,256,256,256"/>
<FlowerSprite texture="Content/Items/Gardening/GrowablePlants_Temp.png" sourcerect="0,768,128,128"/>
<FlowerSprite texture="Content/Items/Gardening/GrowablePlants_Temp.png" sourcerect="128,768,128,128"/>
<FlowerSprite texture="Content/Items/Gardening/GrowablePlants_Temp.png" sourcerect="256,768,128,128"/>
<VineSprite type="Stem" sourcerect="640,896,128,128"/>
<VineSprite type="CrossJunction" sourcerect="512,896,128,128"/>
<VineSprite type="HorizontalLine" sourcerect="512,768,128,128"/>
<VineSprite type="VerticalLine" sourcerect="640,768,128,128"/>
<VineSprite type="TurnTopRight" sourcerect="0,768,128,128"/>
<VineSprite type="TurnTopLeft" sourcerect="384,768,128,128"/>
<VineSprite type="TurnBottomLeft" sourcerect="256,768,128,128"/>
<VineSprite type="TurnBottomRight" sourcerect="128,768,128,128"/>
<VineSprite type="TSectionTop" sourcerect="128,896,128,128"/>
<VineSprite type="TSectionLeft" sourcerect="256,896,128,128"/>
<VineSprite type="TSectionBottom" sourcerect="384,896,128,128"/>
<VineSprite type="TSectionRight" sourcerect="0,896,128,128"/>
<VineSprite type="StumpTop" sourcerect="768,768,128,128"/>
<VineSprite type="StumpLeft" sourcerect="896,768,128,128"/>
<VineSprite type="StumpBottom" sourcerect="768,896,128,128"/>
<VineSprite type="StumpRight" sourcerect="896,896,128,128"/>
</VineSprites>
</Growable>
<!-- 香蕉有圓形碰撞框 -->
<Body radius="15" density="12"/>
<!-- 香蕉是進戰武器,不可瞄準,按住右鍵時觸發,作用在香蕉,香蕉耐久-30,受時間流逝影響,香蕉有brownchunks粒子特效 -->
<MeleeWeapon slots="Any,RightHand,LeftHand" aimable="false" aimpos="32, 4" handle1="-5,-5" holdangle="-45" swingamount="0,3" swingspeed="0.5" swingwhenaiming="true" msg="ItemMsgPickUpSelect">
<StatusEffect type="OnSecondaryUse" target="This" Condition="-30.0">
<ParticleEmitter particle="brownchunks" AngleMin="80" AngleMax="100" DistanceMin="30" DistanceMax="45" VelocityMin="80" VelocityMax="90" ScaleMin="0.08" ScaleMax="0.1" ParticlesPerSecond="10" InitialDelay="0.2" CopyEntityAngle="True" ColorMultiplier="246,255,0,255" LifeTimeMultiplier="0.75"/>
</StatusEffect>
<!-- 按住右鍵時觸發,作用在香蕉跟使用者,禁用時間流逝影響 -->
<StatusEffect type="OnSecondaryUse" target="This,Character" disabledeltatime="true">
<!-- 條件,香蕉跟使用者耐久<=0,減少噁心nausea、阿片類藥物戒斷opiatewithdrawal,增加活力strengthen -->
<Conditional Condition="lte 0"/>
<ReduceAffliction identifier="nausea" amount="5"/>
<ReduceAffliction identifier="opiatewithdrawal" amount="5"/>
<Affliction identifier="strengthen" amount="10"/>
</StatusEffect>
<!-- 按住右鍵時觸發,作用在香蕉,條件,香蕉耐久>=99,播放音效 -->
<StatusEffect type="OnSecondaryUse" target="This">
<Conditional Condition="gte 99"/>
<Sound file="Content/Items/Medical/ITEM_bananaPeeling.ogg" range="250"/>
</StatusEffect>
<!-- 按住右鍵時觸發,作用在香蕉,條件,香蕉耐久<95,播放循環音效 -->
<StatusEffect type="OnSecondaryUse" target="This">
<Conditional Condition="lt 95"/>
<Sound file="Content/Items/Medical/ITEM_bananaEatingLoop.ogg" range="250" loop="true"/>
</StatusEffect>
<!-- 打在別人身上觸發,作用在香蕉,香蕉耐久-100,禁用時間流逝影響 -->
<StatusEffect type="OnUse" target="This" Condition="-100.0" disabledeltatime="true"/>
<!-- 打在別人身上觸發,作用在被攻擊到的對象,減少噁心nausea、阿片類藥物戒斷opiatewithdrawal,增加活力strengthen,播放音效 -->
<StatusEffect type="OnUse" target="UseTarget">
<ReduceAffliction identifier="nausea" amount="5"/>
<ReduceAffliction identifier="opiatewithdrawal" amount="5"/>
<Affliction identifier="strengthen" amount="10"/>
<Sound file="Content/Items/Medical/ITEM_eatingBiteQuick.ogg" range="250"/>
</StatusEffect>
<!-- Remove the item when fully used -->
<!-- 香蕉吃完,在下方物品欄生成香蕉皮,然後刪除香蕉 -->
<StatusEffect type="OnBroken" target="This">
<SpawnItem identifier="bananapeel" spawnposition="SameInventory"/>
<Remove/>
</StatusEffect>
</MeleeWeapon>
</Item>
</Items>
重點筆記
<!-- 香蕉物品可以在醫療界面出現使用 -->
<Item name="" identifier="banana" category="Misc" Tags="smallitem,seed,plantitem" maxstacksize="8" cargocontaineridentifier="metalcrate" scale="0.5" impactsoundtag="impact_soft" spritecolor="215,245,77,255" useinhealthinterface="true">
<!-- 香蕉有3%機率在種子袋出現 -->
<PreferredContainer primary="seedbag" amount="1" spawnprobability="0.03"/>
<!-- 條件,小丑派系聲望>=50,才能在小丑商人處購買香蕉3~5根 -->
<Price storeidentifier="merchantclown" minavailable="3" maxavailable="5" sold="true">
<Reputation faction="clowns" min="50"/>
</Price>
<!-- 耐久50%以上的香蕉分解出鉀跟碳 -->
<Deconstruct time="30">
<Item identifier="potassium" mincondition="0.5"/>
<Item identifier="carbon" mincondition="0.5"/>
</Deconstruct>
<!-- 香蕉有圓形碰撞框 -->
<Body radius="15" density="12"/>
<!-- 按住右鍵時觸發,作用在香蕉,香蕉耐久-30,受時間流逝影響 -->
<MeleeWeapon slots="Any,RightHand,LeftHand" aimable="false" aimpos="32, 4" handle1="-5,-5" holdangle="-45" swingamount="0,3" swingspeed="0.5" swingwhenaiming="true" msg="ItemMsgPickUpSelect">
<!-- 按住右鍵時觸發,作用在香蕉跟使用者,禁用時間流逝影響 -->
<StatusEffect type="OnSecondaryUse" target="This,Character" disabledeltatime="true">
<!-- 條件,香蕉跟使用者耐久<=0,按住右鍵吃完香蕉 -->
<Conditional Condition="lte 0"/>
<!-- 打在別人身上觸發,作用在香蕉,香蕉耐久-100,禁用時間流逝影響 -->
<StatusEffect type="OnUse" target="This" Condition="-100.0" disabledeltatime="true"/>
<!-- 打在別人身上觸發,作用在被攻擊到的對象 -->
<StatusEffect type="OnUse" target="UseTarget">
<!-- 香蕉吃完,在下方物品欄生成香蕉皮,然後刪除香蕉 -->
<StatusEffect type="OnBroken" target="This">
<SpawnItem identifier="bananapeel" spawnposition="SameInventory"/>
<Remove/>
</StatusEffect>



