Jump to content

Making a Workstation


EpicSpire

Recommended Posts

im trying to convert an already in game block / decor item (actually a Furniture) into a workstation, i have everything working, except that when i go to "use" it (it tells me to press E to use), nothing happens. I tried this with other blocks (containers and lootables), and it works perfectly. the only difference is that the other blocks are lootable, and the one i'm trying to use is not. How do i make it lootable, i assume that is the only thing since by default the block has no function so "using" it (pressing E) does not trigger the container UI.

Link to comment
Share on other sites

49 minutes ago, EpicSpire said:

does anyone know how to do this?

 

Does your mod already have this?

 

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

 

or any other type of workstation you have selected.

 

You have added the ui_display.xml file, to add the list of resources that your workstation will do.
You also have to add XUi Folder with the xui.xml files and windows.xml with the output, tools, fuel that it will have.

Link to comment
Share on other sites

6 minutes ago, Gouki said:

 

Does your mod already have this?

 

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

 

or any other type of workstation you have selected.

 

You have added the ui_display.xml file, to add the list of resources that your workstation will do.
You also have to add XUi Folder with the xui.xml files and windows.xml with the output, tools, fuel that it will have.



yes. it does.
 

<block name="WorkingWoodBuringStove">
			<property name="Class" value="Campfire"/>
			<property name="Material" value="Mmetal"/>
			<property name="MaxDamage" value="350"/>
			<property name="StabilitySupport" value="true"/>
			<property name="Shape" value="ModelEntity"/>
			<property name="Model" value="Entities/Furniture/woodBurningStovePrefab"/> <property name="Place" value="TowardsPlacerInverted"/>
			<property name="CustomIcon" value="cntWoodBurningStove"/>   
			<property name="ImposterDontBlock" value="true"/>
			<property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
			<property name="IsTerrainDecoration" value="true"/>
			<property name="ParticleName" value="campfire"/>
			<property name="ParticleOffset" value="0.5,0.5,0.5"/>
			<property name="Stacknumber" value="1"/>
			<property name="HeatMapStrength" value="1"/>
			<property name="HeatMapTime" value="1200"/>
			<property name="HeatMapFrequency" value="25"/>
			<property name="BuffsWhenWalkedOn" value="buffBurningEnvironment"/>
			<property name="ActiveRadiusEffects" value="buffCampfireAOE(4)"/>

			<property class="Workstation">
				<property name="Modules" value="tools,output,fuel,input"/>
				<property name="Collide" value="melee,bullet,arrow,rocket"/>
				<property name="CraftingAreaRecipes" value="campfire"/> 
			</property>
			<property name="WorkstationIcon" value="ui_game_symbol_campfire" />
			<property name="CraftActionName" value="lblContextActionCook" />
			<property name="CraftIcon" value="ui_game_symbol_spatula" />
			<property name="OpenSound" value="campfire_open" />
			<property name="CloseSound" value="campfire_close" />
			<property name="CraftSound" value="campfire_cook_click" />
			<property name="CraftCompleteSound" value="campfire_complete_item" />
			<property name="WorkstationJournalTip" value="campfireTip" />

			<property class="RepairItems">
				<property name="resourceScrapIron" value="3"/>
			</property>
			
			<drop event="Harvest" name="terrStone" count="0" tool_category="Disassemble"/>
			<drop event="Harvest" name="resourceMechanicalParts" count="1,2" tag="salvageHarvest"/>
			<drop event="Harvest" name="resourceMetalPipe" count="0,1" tag="salvageHarvest"/>
			<drop event="Harvest" name="resourceScrapIron" count="4,8" tag="salvageHarvest"/>
			<drop event="Destroy" name="resourceScrapIron" count="2,4" prob="1"/>
			<drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
			
			<property name="Group" value="Food/Cooking,Basics,Building"/>
			<property name="DescriptionKey" value="campfireDesc"/>
			<property name="EconomicValue" value="5"/>
			<property name="EconomicBundleSize" value="1"/>
			<property name="SellableToTrader" value="false"/>
			<property name="FilterTags" value="fdecor,fother,ffurniture"/>
			<property name="SortOrder1" value="70i0"/>
		</block>



it works if i make the block the "cntCharcoalGrillClosed" it works perfectly. but the stove doesn't. the only thing i can think of is that the grill is a container and the stove is not. but i don't know how to make the stove a container.

This code works for the grill

 

<block name="WorkingCharcoalGrill">
			<property name="Class" value="Campfire"/>
			<property name="Material" value="Mmetal"/>
			<property name="MaxDamage" value="100"/>
			<property name="StabilitySupport" value="true"/>
			<property name="Shape" value="ModelEntity"/>
			<property name="Model" value="#Entities/LootContainers?Grill_Simple_ClosedPrefab.prefab"/>
			<property name="CustomIcon" value="cntCharcoalGrillClosed"/>   
			<property name="ImposterDontBlock" value="true"/>
			<property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
			<property name="IsTerrainDecoration" value="true"/>
			<property name="ParticleName" value="campfire"/>
			<property name="ParticleOffset" value="0.5,0.8,0.5"/>
			<property name="Stacknumber" value="1"/>
			<property name="HeatMapStrength" value="1"/>
			<property name="HeatMapTime" value="1200"/>
			<property name="HeatMapFrequency" value="25"/>
			<property name="BuffsWhenWalkedOn" value="buffBurningEnvironment"/>
			<property name="ActiveRadiusEffects" value="buffCampfireAOE(2)"/>

			<property class="Workstation">
				<property name="Modules" value="tools,output,fuel,input"/>
				<property name="Collide" value="melee,bullet,arrow,rocket"/>
				<property name="CraftingAreaRecipes" value="campfire"/> 
			</property>
			<property name="WorkstationIcon" value="ui_game_symbol_campfire" />
			<property name="CraftActionName" value="lblContextActionCook" />
			<property name="CraftIcon" value="ui_game_symbol_spatula" />
			<property name="OpenSound" value="campfire_open" />
			<property name="CloseSound" value="campfire_close" />
			<property name="CraftSound" value="campfire_cook_click" />
			<property name="CraftCompleteSound" value="campfire_complete_item" />
			<property name="WorkstationJournalTip" value="campfireTip" />

			<property class="RepairItems">
				<property name="resourceScrapIron" value="3"/>
			</property>
			
			<drop event="Harvest" name="terrStone" count="0" tool_category="Disassemble"/>
			<drop event="Harvest" name="resourceMechanicalParts" count="1,2" tag="salvageHarvest"/>
			<drop event="Harvest" name="resourceMetalPipe" count="0,1" tag="salvageHarvest"/>
			<drop event="Harvest" name="resourceScrapIron" count="4,8" tag="salvageHarvest"/>
			<drop event="Destroy" name="resourceScrapIron" count="2,4" prob="1"/>
			<drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
			
			<property name="Group" value="Food/Cooking,Basics,Building"/>
			<property name="DescriptionKey" value="campfireDesc"/>
			<property name="EconomicValue" value="5"/>
			<property name="EconomicBundleSize" value="1"/>
			<property name="SellableToTrader" value="false"/>
			<property name="FilterTags" value="fdecor,fother,ffurniture"/>
			<property name="SortOrder1" value="70i0"/>
		</block>

 

Link to comment
Share on other sites

Are you trying to add the fire stove from the game?
I have it made mod.

This goes in ui_display.xml:

 

<Gouki>

    <append xpath="/ui_display_info/crafting_category_display" >
        
        <crafting_category_list display_type="Stove Forge" >
            <!-- <crafting_category name="" icon="ui_game_symbol_forge" display_name="lblAll" /> -->
            <crafting_category name="Resources" icon="ui_game_symbol_resource" display_name="lblCategoryResources" />
            <crafting_category name="Building" icon="ui_game_symbol_map_house" display_name="lblCategoryBuilding" />
            <!-- <crafting_category name="AdvBuilding" icon="ui_game_symbol_map_fortress" display_name="lblCategoryAdvBuilding" /> -->
            <crafting_category name="Ammo/Weapons" icon="ui_game_symbol_knife" display_name="lblCategoryAmmoWeapons" />
            <crafting_category name="Tools/Traps" icon="ui_game_symbol_tool" display_name="lblCategoryToolsTraps" />
            <!-- <crafting_category name="Decor/Miscellaneous" icon="ui_game_symbol_chair" display_name="lblCategoryDecorMisc" /> -->
        </crafting_category_list>
        
    </append>
    
</Gouki>

 

 

This goes in xui.xml,in the XUi folder:

 

<Gouki>
    <append xpath="/xui/ruleset" >
        
        <window_group name="workstation_Stove Forge" controller="XUiC_WorkstationWindowGroup">
            <window name="windowCraftingList"/>
            <window name="craftingInfoPanel"/>
            <window name="windowCraftingQueue"/>
            <window name="windowToolsForge" />
            <window name="windowFuel" />
            <window name="windowForgeInput" />
            <window name="windowOutput" />
            <window name="windowNonPagingHeader" />
        </window_group>
        
    </append>
</Gouki>

Link to comment
Share on other sites

2 minutes ago, Gouki said:

Are you trying to add the fire stove from the game?
I have it made mod.

This goes in ui_display:

 

<Gouki>

    <append xpath="/ui_display_info/crafting_category_display" >
        
        <crafting_category_list display_type="Stove Forge" >
            <!-- <crafting_category name="" icon="ui_game_symbol_forge" display_name="lblAll" /> -->
            <crafting_category name="Resources" icon="ui_game_symbol_resource" display_name="lblCategoryResources" />
            <crafting_category name="Building" icon="ui_game_symbol_map_house" display_name="lblCategoryBuilding" />
            <!-- <crafting_category name="AdvBuilding" icon="ui_game_symbol_map_fortress" display_name="lblCategoryAdvBuilding" /> -->
            <crafting_category name="Ammo/Weapons" icon="ui_game_symbol_knife" display_name="lblCategoryAmmoWeapons" />
            <crafting_category name="Tools/Traps" icon="ui_game_symbol_tool" display_name="lblCategoryToolsTraps" />
            <!-- <crafting_category name="Decor/Miscellaneous" icon="ui_game_symbol_chair" display_name="lblCategoryDecorMisc" /> -->
        </crafting_category_list>
        
    </append>
    
</Gouki>

awesome.

so does that make the ones that spawn in the game already act as a campfire? or can you craft that? 

i'm trying to get it so the player can craft the woodburning stove and it act like a campfire. i would like to eventually have it so that you can repair the ones in the world .. upgrading them to the the working one.. using a campfire as the repair ingrediant.. but my first goal is to simply get it so that the player can craft it.

 

Link to comment
Share on other sites

5 minutes ago, EpicSpire said:

awesome.

so does that make the ones that spawn in the game already act as a campfire? or can you craft that? 

i'm trying to get it so the player can craft the woodburning stove and it act like a campfire. i would like to eventually have it so that you can repair the ones in the world .. upgrading them to the the working one.. using a campfire as the repair ingrediant.. but my first goal is to simply get it so that the player can craft it.

 

 

I made it forge, but you can still change it to campfire as you want.
Just edit the codes I shared with you and change it to campfire.

 

Add this to the block so that it extends the campfire:

 

<property name="Extends" value="campfire" />

Link to comment
Share on other sites

1 minute ago, EpicSpire said:

ok.. i don't think you understand the question.

the grill works perfectly.. but when using it for the oven, it does not. i do not need a UI code i need a block code

 

This is the code for the fire pit I made.

 

<Gouki>
    <append xpath="/blocks" >
        <block name="Stove Forge">
          <property name="CustomIcon" value="Stove Forge" />
          <property name="DescriptionKey" value="Stove ForgeDesc"/>
          <property name="Extends" value="forge" />
          <property name="Shape" value="ModelEntity" />
          <property name="Model" value="Entities/Furniture/woodBurningStovePrefab"/> <property name="Place" value="TowardsPlacerInverted" />
          <property name="ParticleName" value="forge" />
          <property name="ParticleOffset" value="0.5,0,0.5" />
          <property name="ImposterDontBlock" value="true" />
          <property name="Class" value="Forge"/>
          <property name="UnlockedBy" value="Stove ForgeSchematic"/>
        </block>    
    </append>
</Gouki>

Link to comment
Share on other sites

16 minutes ago, Gouki said:

 

This is the code for the fire pit I made.

 

<Gouki>
    <append xpath="/blocks" >
        <block name="Stove Forge">
          <property name="CustomIcon" value="Stove Forge" />
          <property name="DescriptionKey" value="Stove ForgeDesc"/>
          <property name="Extends" value="forge" />
          <property name="Shape" value="ModelEntity" />
          <property name="Model" value="Entities/Furniture/woodBurningStovePrefab"/> <property name="Place" value="TowardsPlacerInverted" />
          <property name="ParticleName" value="forge" />
          <property name="ParticleOffset" value="0.5,0,0.5" />
          <property name="ImposterDontBlock" value="true" />
          <property name="Class" value="Forge"/>
          <property name="UnlockedBy" value="Stove ForgeSchematic"/>
        </block>    
    </append>
</Gouki>



same issue. it says "press E to use" but pressing E does nothing. i need to make the block a container.. which is what my original question is.

 

Link to comment
Share on other sites

37 minutes ago, EpicSpire said:

i figured it out, went back to my old code. i was missing something

 

Hi EpicSpire

 

Here is the code to make the woodburningstove in a container, in case you need it.

 

<Gouki>

<append xpath="/blocks">
        <block name="WoodBurningStoveContainer">
            <property name="Extends" value="decoEntityMetalMaster"/>
            <property name="Model" value="Entities/Furniture/woodBurningStovePrefab"/> <property name="Place" value="TowardsPlacerInverted"/>
            <drop event="Harvest" name="resourceScrapIron" count="10,20" tag="allHarvest"/>
            <drop event="Harvest" name="resourceCoal" count="3,8" tag="allHarvest"/>
            <property name="FilterTags" value="fdecor,fother,ffurniture"/>
            <property name="Class" value="SecureLoot"/>
            <property name="LootList" value="510" />
            <property name="CustomIcon" value="StoveContainer"/>
            <property name="CreativeMode" value="Player"/>
            <property name="Group" value="Basics,Building,advBuilding"/>
            <property name="Tags" value="door"/>
        </block>
    </append>

</Gouki>

 

 

This goes in loot.xml:

 

<!-- Stove Container -->
    <append xpath="/lootcontainers">
        <lootcontainer id="510" count="0" size="10,9" sound_open="forge_open" sound_close="forge_close" loot_quality_template="qualBaseTemplate">
            <item name="cobweb" count="1,2"/>
        </lootcontainer>
    </append>

Link to comment
Share on other sites

it wasn't necessary, but that'll come in handy for future projects, thanks.

the issue was the xui i had was copy/pasted from the grill i made. and i never altered the name for the workstation_woodburningstove 

how do i get the name to not be all one word? do i still need to do a localization?

Link to comment
Share on other sites

2 minutes ago, EpicSpire said:

it wasn't necessary, but that'll come in handy for future projects, thanks.

the issue was the xui i had was copy/pasted from the grill i made. and i never altered the name for the workstation_woodburningstove 

how do i get the name to not be all one word? do i still need to do a localization?

 

So I have the location:

 

Key,File,Type,UsedInMainMenu,NoTranslate,english,Context / Alternate Text,german,latam,french,italian,japanese,koreana,polish,brazilian,russian,turkish,schinese,tchinese,spanish

WoodBurningStoveContainer,blocks,block,,,Contenedor estufa de leña

 

I don't know if it works this way for English, but I guess it does.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...