• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Can someone help me translate some code from Alpha 16 into Alpha 17 compatible?

  • Thread starter Thread starter Nyteshade12134
  • Start date Start date
N

Nyteshade12134

Guest
I have a few buffs that I would like to have in my game, but the coding for buffs looks different in Alpha 17.

 
Possibly. I haven't looked into buffs (much) myself, but generally I'd say a good idea is to actually articulate the concrete problem you're trying to solve.

 
They seem to have added a lot of stuff to the buffs, but the underlying code is still pretty much the same. If you post what your trying to do I could look at it and see if any major changes need to be made to get it to work.

 
Variations have been posted here before, the sleeping bag modifiers and recipes, blocks, buffs. Basic modding stuff. This is going to take multiple posts. First I'll start with the blocks involved. These work in Alpha 16.4

Blocks:

==============================================================================================

<block id="463" name="bed01">

<property name="DescriptionKey" value="bedGroupDesc"/>

<property name="Class" value="SleepingBag"/>

<property name="Material" value="Mmetal_weak"/>

<property name="Shape" value="Ext3dModel"/>

<property name="Texture" value="293"/>

<property name="Mesh" value="models"/>

<property name="Model" value="Furniture/bed01" param1="main_mesh"/>

<property name="IsTerrainDecoration" value="true"/>

<property name="MultiBlockDim" value="1,1,2"/>

<property name="FallDamage" value="false"/>

<property name="OnlySimpleRotations" value="true"/>

<property name="Place" value="TowardsPlacerInverted"/>

<property name="BuffsWhenWalkedOn" value="Sleeping2"/>

<property name="FuelValue" value="6"/>

<property class="RepairItems">

<property name="cloth" value="20"/>

<property name="cottonPlant" value="20"/>

<property name="spring" value="10"/>

<property name="shortMetalPipe" value="10"/>

</property>

<property name="DowngradeBlock" value="bed01Frame"/>

<drop event="Harvest" name="shortMetalPipe" count="4" tool_category="Disassemble"/>

<drop event="Harvest" name="scrapIron" count="20" tool_category="Disassemble"/>

<drop event="Harvest" name="spring" count="3" tool_category="Disassemble"/>

<drop event="Harvest" name="cottonPlant" count="8" tool_category="Disassemble"/>

<drop event="Harvest" name="cloth" count="8"/>

<drop event="Destroy" name="scrapIron" count="5"/>

<property name="Group" value="Building,Decor/Miscellaneous"/>

<property name="EconomicValue" value="1330"/>

</block>

<block id="466" name="mattressFlat">

<property name="DescriptionKey" value="bedGroupDesc"/>

<property name="Class" value="SleepingBag"/>

<property name="Material" value="furniture"/>

<property name="Shape" value="Ext3dModel"/> <property name="Texture" value="293"/>

<property name="Mesh" value="models"/>

<property name="Model" value="Furniture/mattress_flat" param1="main_mesh"/>

<property name="CanPickup" value="true"/>

<property name="IsTerrainDecoration" value="true"/>

<property name="MultiBlockDim" value="1,1,2"/>

<property name="FallDamage" value="false"/>

<property name="OnlySimpleRotations" value="true"/>

<property name="Place" value="TowardsPlacerInverted"/>

<property name="FuelValue" value="12"/>

<property name="BuffsWhenWalkedOn" value="Sleeping"/>

<drop event="Harvest" name="cottonPlant" count="2"/>

<drop event="Harvest" name="cloth" count="2"/>

<drop event="Destroy" count="0"/>

<property name="EconomicValue" value="60"/> <!-- disassemble value -->

</block>

<block id="1467" name="bed02">

<property name="DescriptionKey" value="bedGroupDesc"/>

<property name="Class" value="SleepingBag"/>

<property name="Material" value="furniture"/>

<property name="Shape" value="Ext3dModel"/>

<property name="Texture" value="293"/>

<property name="Mesh" value="models"/>

<property name="Model" value="Furniture/bed02" param1="main_mesh"/>

<property name="MultiBlockDim" value="2,1,2"/>

<property name="IsTerrainDecoration" value="true"/>

<property name="BuffsWhenWalkedOn" value="Sleeping3"/>

<property name="FallDamage" value="false"/>

<property class="RepairItems">

<property name="cloth" value="40"/>

<property name="cottonPlant" value="40"/>

<property name="spring" value="20"/>

<property name="wood" value="20"/>

<property name="shortMetalPipe" value="10"/>

</property>

<drop event="Harvest" name="cloth" count="16"/>

<drop event="Harvest" name="cottonPlant" count="16" tool_category="Disassemble"/>

<drop event="Harvest" name="spring" count="6" tool_category="Disassemble"/>

<drop event="Harvest" name="wood" count="8"/>

<drop event="Harvest" name="shortMetalPipe" count="4" tool_category="Disassemble"/>

<drop event="Harvest" name="scrapIron" count="10" tool_category="Disassemble"/>

<drop event="Destroy" name="scrapIron" count="10"/>

<property name="Group" value="Building,Decor/Miscellaneous"/>

<property name="EconomicValue" value="2600"/>

</block>

<block id="1562" name="bedroll">

<property name="DescriptionKey" value="bedGroupDesc"/>

<property name="Class" value="SleepingBag"/>

<property name="Material" value="plants"/>

<property name="StabilitySupport" value="false"/> <!-- build restriction -->

<property name="MaxDamage" value="100"/>

<property name="Shape" value="Ext3dModel"/>

<property name="Texture" value="293"/>

<property name="Mesh" value="models"/>

<property name="Model" value="CampingGear/bedroll_02" param1="main_mesh"/>

<property name="MultiBlockDim" value="1,2,2"/>

<!-- <property name="FallDamage" value="false"/> doesn't look thick enough so... nope -->

<property name="Place" value="TowardsPlacerInverted"/>

<property name="OnlySimpleRotations" value="true"/>

<property name="FuelValue" value="6"/>

<property name="CanPickup" value="true"/>

<property name="BuffsWhenWalkedOn" value="Sleeping4"/>

<property name="IsTerrainDecoration" value="true"/>

<property name="Group" value="Basics,Building"/>

<property class="RepairItems"> <property name="yuccaFibers" value="10"/> </property>

<drop event="Destroy" name="yuccaFibers" count="1,3"/>

<drop event="Fall" name="yuccaFibers" count="5" prob="1" stick_chance="0"/>

<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>

<property name="EconomicValue" value="10"/>

<property name="EconomicBundleSize" value="10"/>

</block>

=====================================================================================================

- - - Updated - - -

Next, the BUFFS:

<buff id="Sleeping" stack="reset" duration="4" name_key="Sleeping" description_key="Sleeping on a mattress slowly regenerates health, and stamina." tooltip_key="You're resting on a mattress." actions="debuff(hungry);debuff(thirsty)" icon="ui_game_symbol_map_bed">

<modify id="0" stat="health" amount="1" rate="3" />

<modify id="0" stat="stamina" amount="1" rate="3" />

</buff>

<buff id="Sleeping2" stack="reset" duration="4" name_key="Sleeping" description_key="Sleeping in an old bed slowly regenerates health, and stamina, as well as keeps you warm" tooltip_key="You're resting in your bed." actions="debuff(hungry);debuff(thirsty)" icon="ui_game_symbol_map_bed">

<modify id="0" stat="health" amount="2" rate="3" />

<modify id="0" stat="stamina" amount="2" rate="3" />

<modify id="0" stat="coretemp" setValue="70"/>

</buff>

<buff id="Sleeping3" stack="reset" duration="4" name_key="Sleeping" description_key="Sleeping in a king size bed quickly regenerates health, and stamina, as well as keeps you warm" tooltip_key="You're resting in your bed." actions="debuff(hungry);debuff(thirsty)" icon="ui_game_symbol_map_bed">

<modify id="0" stat="health" amount="4" rate="3" />

<modify id="0" stat="stamina" amount="4" rate="3" />

<modify id="0" stat="coretemp" setValue="70"/>

</buff>

<buff id="Sleeping4" stack="reset" duration="7" name_key="Sleeping" description_key="Sleeping in a sleeping bag very slowly regenerates health, and stamina, as well as keeps you warm" tooltip_key="You're resting in your sleeping bag." actions="debuff(hungry);debuff(thirsty)" icon="ui_game_symbol_map_bed">

<modify id="0" stat="health" amount="1" rate="6" />

<modify id="0" stat="stamina" amount="1" rate="6" />

<modify id="0" stat="coretemp" setValue="70"/>

</buff>

 
NEXT THE RECIPES:

<recipe name="bed01" count="1">

<!-- <ingredient name="cloth" count="20"/> -->

<!-- <ingredient name="cottonPlant" count="20"/> -->

<!-- <ingredient name="spring" count="10"/> -->

<ingredient name="mattressFlat" count="1"/>

<ingredient name="spring" count="4"/>

<ingredient name="shortMetalPipe" count="10"/>

</recipe>

<recipe name="bed02" count="1">

<ingredient name="mattressFlat" count="1"/>

<ingredient name="wood" count="20"/>

<ingredient name="spring" count="10"/>

<ingredient name="shortMetalPipe" count="20"/>

</recipe>

- - - Updated - - -

That works in Alpha 16.4 so how do I code it into Alpha 17 ?

 
Back
Top