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

Modding craft stations

Atrophied

New member
I've been working on some craft station overhauls and have learned how to edit the forge but I can't find the workbench, chem station and mixer windows...

Is there a way I can add/edit their craft windows ? End goal is to add a tool area to the workbench with hammer, bench vice and chisel/files, items I will create separately.

 
The tool area is actually completely seperate from the rest of the workbench window. I wanted to add the wrench and hammer to the workbench as tools, so I did this.

Code:
<window name="windowToolsWorkbench" width="228" height="121" panel="Right">
	<panel style="header.panel">			
		<sprite style="header.icon" sprite="ui_game_symbol_cookware"/>
		<label style="header.name" text="TOOLS" text_key="xuiTools" />
	</panel>

	<rect name="content" depth="0" pos="0,-46" height="75" disablefallthrough="true" on_press="true">

		<grid name="inventory" rows="1" cols="2" pos="3,-3" cell_width="75" cell_height="75" controller="WorkstationToolGrid" repeat_content="true" allow_sort_order="false"
		required_tools="wrench,clawHammer" required_tools_only="true">
			<required_item_stack name="0"/>
		</grid>		

	</rect>
</window>
Then I took the name windowToolsWorkbench and added it to xui.xml for the workbench, so it looks like this.

Code:
<window_group name="workstation_workbench" controller="XUiC_WorkstationWindowGroup">
		<window name="windowToolsWorkbench" />
		<window name="windowCraftingList"/>
		<window name="craftingInfoPanel"/>
		<window name="windowCraftingQueue"/>
		<window name="windowOutput" />
		<window name="windowNonPagingHeader" />
		<window name="windowCombine" />
	</window_group>
That gave me the tools slot at the top right of the workbench window. :)

 
OOOOhhh... windows.xml defines the windows that XUI.xml calls... got it, yet another file to add to my edit list :p

Thanks a bundle !!

 
Last edited by a moderator:
XUI uses windows defined in windows.xml, which uses controls defined in controls.xml which use styles defined in styles.xml. :D

 
Back
Top