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

Trouble loading custom mod

I'm currently throwing together my first mod, just to get an idea of things. The mod launcher recognizes it, the console on startup shows that it has been imported without error, but the block does not show up in creative menu.

This is the block xml contents.

<configs>
    <append xpath="/blocks">
        <block name="CCTVRack">

            <property name="Extends" value="steelMaster"/>
            <property name="Meshfile" value="#CCTVRack.unity3d?MonitorRackPrefab"/>
            <property name="MultiBlockDim" value="2,2,1" />
            <property name="Shape" value="ModelEntity" />
            <property name="CreativeMode" value="Player"/>
            <property name="Material" value="Msteel"/>
            <property name="OnlySimpleRotations" value="true"/>
            <property name="Collide" value="movement,melee,bullet,arrow,rocket"/>
            <property name="StabilitySupport" value="true"/>
            <property name="Place" value="TowardsPlacerInverted"/>
            <property name="Stacknumber" value="1"/>
            <property name="TakeDelay" value="10"/>
            <property name="EconomicValue" value="5000"/>
            <property name="Group" value="Science"/>
            <property class="RepairItems">
                <property name="resourceForgedIron" value="5"/>
                <property name="resourceElectricParts" value="10"/>
            </property>
            <drop event="Harvest" name="resourceElectricParts" count="4,8" tag="salvageHarvest"/>
            <drop event="Destroy" name="resourceScrapIron" count="10" prob="1"/>
            <drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
        </block>
    </append>
</configs>

 
 <property name="Meshfile" value="#CCTVRack.unity3d?MonitorRackPrefab"/> is likely your issue.

The correct property would likely be:

<property name="Model" value="#@modfolder:Resources/CCTVRack.unity3d?MonitorRackPrefab"/>

 


 <property name="Meshfile" value="#CCTVRack.unity3d?MonitorRackPrefab"/> is likely your issue.

The correct property would likely be:

<property name="Model" value="#@modfolder:Resources/CCTVRack.unity3d?MonitorRackPrefab"/>
I was using that first which didn't work, and tried Meshfile as I had seen that in a different project. I was able to make it work last night by adding the models and XML directly to the game file, which leads me to believe I made a mistake somewhere else with a spelling mistake in the file structure or something of that sort. It was 1am when it finally worked so I didn't spend much time finding the cause then. But I can grab a picture of the folders and files when I get home on lunch.

 
Back
Top