Jump to content

Edit History

Please note that revisions older than 365 days are pruned and will no longer show here
kryzzk

kryzzk


Added Blocks and XUi XML's for reference.

Until now anything I modded as all been XML mods, this is the first mod I have tried to make that used a new block.  

 

I created a custom workbench, it shows up in game, properly placed, rotated ect. when I walk up to it I get the "press E", I can hold E and pick it up but I can't open the crafting window on it or any other crafting stations. If I pick up my custom workbench the other crafting stations start working again. 

 

Everything in the XML looks correct to me, but I've never made a workstation before so I'm not sure. I also wasn't able to find a list of what Unity tags are needed for what blocks and I could not locate the default workbenches for reference. so I used the A20 Mod Tutorial for what little reference as it gave and selected T_Mesh_B as my tag because that was the only tag I could find on any tutorial video about making a block.

 

Would this be a incorrect tag in unity or have I likely coded something wrong in one of the XML files or do I need another XML that I'm missing?

 

Blocks.xml

<config>
<append xpath="/blocks">

<block name="ResearchTable">
        <property name="Extends" value="workbench"/>
        <property name="Class" value="Workstation" />
        <property name="CreativeMode" value="Player"/>
        <property name="Shape" value="ModelEntity" />
        <property name="Model" value="#@modfolder:/Resources/researchdesk.unity3d?deskprefab"/>
        <property name="SortOrder2" value="0290"/> 
        <property name="MultiBlockDim" value="2,2,1"/>
        <property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
        <property name="FilterTags" value="fdecor,fother,ffurniture"/>  
        <property name="CustomIcon" value="ResearchDesk"/>
        <property class="Workstation">
            <property name="Modules" value="output"/>
            <property name="CraftingAreaRecipes" value="ResearchTable"/>
        </property>  
        <property name="WorkstationIcon" value="ui_game_symbol_wrench" />
        <property name="OpenSound" value="open_workbench" />
        <property name="CloseSound" value="close_workbench" />
        <property name="WorkstationJournalTip" value="workbenchTip" />  
        <property class="RepairItems">
            <property name="resourceForgedIron" value="25" />
            <property name="resourceMechanicalParts" value="20" />
            <property name="resourceWood" value="50" />
        </property>  
        <property name="TakeDelay" value="15" />  
        <property name="DescriptionKey" value="workbenchDesc" />
        <property name="EconomicValue" value="776" />
        <property name="Group" value="Building,advBuilding" />  
    </block>

</append>

</config>

 

XUi.xml 

 

<xui>
<append xpath="/xui/ruleset[@name='default']" >    
        <window_group name="ResearchTable" controller="XUiC_WorkstationWindowGroup" open_backpack_on_open="true" close_compass_on_open="true">
            <window name="windowCraftingList"/>
            <window name="craftingInfoPanel"/>
            <window name="windowCraftingQueue"/>
            <window name="windowOutput" />
            <window name="windowNonPagingHeader" />
        </window_group>                
</append>
</xui>

kryzzk

kryzzk

Until now anything I modded as all been XML mods, this is the first mod I have tried to make that used a new block.  

 

I created a custom workbench, it shows up in game, properly placed, rotated ect. when I walk up to it I get the "press E", I can hold E and pick it up but I can't open the crafting window on it or any other crafting stations. If I pick up my custom workbench the other crafting stations start working again. 

 

Everything in the XML looks correct to me, but I've never made a workstation before so I'm not sure. I also wasn't able to find a list of what Unity tags are needed for what blocks and I could not locate the default workbenches for reference. so I used the A20 Mod Tutorial for what little reference as it gave and selected T_Mesh_B as my tag because that was the only tag I could find on any tutorial video about making a block.

 

Would this be a incorrect tag in unity or have I likely coded something wrong in one of the XML files?

 

×
×
  • Create New...