Jump to content

Extending forge use

Recommended Posts

Hi so im right at the end of this mod im making essentially im adding more mats to the game and a large portion of that is new smeltable metals. i have everything working correctly except two things.

First question in the forge menu i need to make a second column for the input materials so they dont go out of the UI for the forge.  im abit stumped on how the code itself should look when making a second column.

Second question i want to recolor an ore vein i applied      <property name="TintColor" value="b5b5b5"/>       which works fine with the boulders that sit ontop of the nodes am i missing something?

I want to add that i am fresh to mod making

Link to comment
Share on other sites

17 hours ago, Plexius said:

I figured out the forge issue now i just need to figure out how to recolor the ore veins


Try in the blocks file, the veins are terrOreCoal (change coal to the ore type for the other ones)

Link to comment
Share on other sites

here is what i have for tungsten

<block name="terrOreTungsten">
            <property name="MaxDamage" value="300"/>
              <property name="CustomIcon" value="terrOreOilDeposit"/>
            <property name="CustomIconTint" value="b5b5b5"/>
              <property name="TintColor" value="b5b5b5"/>
            <property name="Material" value="Mtungsten"/>
            <property name="Shape" value="Terrain"/>
            <property name="Mesh" value="terrain"/>
            <property name="Texture" value="316"/>
            <property name="ImposterExclude" value="true"/>
            <drop event="Harvest" name="resourceTungsten" count="20" tag="oreWoodHarvest"/>
            <drop event="Harvest" name="resourceRockSmall" count="15" tag="oreWoodHarvest"/>
            <drop event="Destroy" count="0"/>
            <drop event="Fall" name="resourceTungsten" count="15" prob="0.5" stick_chance="0"/>
            <property name="CanMobsSpawnOn" value="true"/>
            <property name="EconomicValue" value="5"/>
            <property name="EconomicBundleSize" value="1"/>
            <property name="SellableToTrader" value="false"/>
            <property name="FilterTags" value="fterrain"/>
            <property name="SortOrder1" value="d0l0"/>
            <property name="SortOrder2" value="0050"/>
            <property name="DisplayType" value="blockTerrain" />
            <property name="DescriptionKey" value="terrOreCopper"/>
            <property name="Tags" value="ore,deepOre"/>
            <drop event="Harvest" name="resourceRawDiamond" prob=".005" count="1" tag="artOfMiningLuckyStrikeHarvest"/>
            <drop event="Harvest" name="resourceSilverNugget" prob=".01" count="1" tag="artOfMiningLuckyStrikeHarvest"/>
            <drop event="Harvest" name="resourceGoldNugget" prob=".007" count="1" tag="artOfMiningLuckyStrikeHarvest"/>
        <block name="oreTungstenBoulder">
            <property name="Extends" value="oreBoulderMaster"/>
              <property name="Map.Color" value="70,110,120"/>
              <property name="CustomIcon" value="oreLeadBoulder"/>
            <property name="CustomIconTint" value="b5b5b5"/>
              <property name="TintColor" value="b5b5b5"/>
            <property name="Material" value="MoreMetal"/>
            <property name="Model" value="Entities/Resources/oreLeadBoulderPrefab"/>
            <drop event="Harvest" name="resourceTungsten" count="50" tag="oreWoodHarvest"/>

Link to comment
Share on other sites

okay, I assume you also create an entry for tungsten in the materials file (Mtungsten)


Next step is you would want to put in a possible layer in the biomes file


This is coal in the pines forest


        <!-- *** Pine Forest: Ore Sub Biome: coalOre -->
        <subbiome prob="0.392">
                <layer depth="1" blockname="terrForestGround"/> <layer depth="3" blockname="terrDirt"/>
                <layer depth="1" blockname="terrStone"> <resource blockname="terrGravel" prob="0.7830" rwgGenerationType="all"/> </layer>
                <layer depth="*" blockname="terrStone"> <resource blockname="terrOreCoal" prob="0.6500" rwgGenerationType="all"/> <resource blockname="terrGravel" prob="0.7830" rwgGenerationType="all"/> </layer> <layer depth="3" blockname="terrBedrock"/>
                <decoration type="prefab" name="deco_coal_vein" checkresource="-7" onslopes="true" prob=".00657" rotatemax="3"/>
                <decoration type="block" blockname="rockResource" prob=".00033" rotatemax="3"/>
                <decoration type="block" blockname="rockResource02" prob=".00033" rotatemax="3"/>
                <decoration type="block" blockname="cntForestRandomLootHelper" prob="0.00025"/>
                <decoration type="prefab" name="rock_form02" prob=".001" rotatemax="7"/>
                <decoration type="prefab" name="rock_form01" prob=".001" rotatemax="7"/>
                <decoration type="block" blockname="plantedCotton3Harvest" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="rock01" prob=".001"/>
                <decoration type="block" blockname="rock02" prob=".001"/>
                <decoration type="block" blockname="cntBirdnest" prob="0.001"/>
                <decoration type="block" blockname="treeDeadPineLeaf" prob="0.007" rotatemax="7"/>
                <decoration type="block" blockname="plantShrub" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeJuniper4m" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeMountainPine12m" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeMountainPine19m" prob="0.0015" rotatemax="7"/>
                <decoration type="block" blockname="treeMountainPine27m" prob="0.002" rotatemax="7"/>
                <decoration type="block" blockname="treeMountainPine31m" prob="0.002" rotatemax="7"/>
                <decoration type="block" blockname="treeMountainPineDry21m" prob="0.002" rotatemax="7"/>
                <decoration type="block" blockname="treeMountainPine41m" prob="0.004" rotatemax="7"/>
                <decoration type="block" blockname="plantedSnowberry3Harvest" prob=".001" rotatemax="7"/>
                <decoration type="block" blockname="plantedChrysanthemum3Harvest" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeOakLrg01" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeOakMed01" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeOakMed02" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeOakSml01" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeFirLrg01" prob="0.0005" rotatemax="7"/>
                <decoration type="block" blockname="treeMountainPine48m" prob="0.0005" rotatemax="7"/>
                <decoration type="block" blockname="treeStump" prob=".0002" rotatemax="7"/>
                <decoration type="block" blockname="treeTallGrassDiagonal" prob=".35"/>
                <decoration type="block" blockname="treeShortGrass" prob=".6"/>


Also make sure you have a map color property in the blocks portion so it shows up on the map with a different color

Link to comment
Share on other sites

i have a biomes xml which showing just the tungsten in the wasteland this does not include the xpath since theres way more to it above tungsten


<subbiome prob="0.195"> <!-- Ore Sub Biome: tungstenOre -->
                <layer depth="2" blockname="terrDestroyedStone"/> <layer depth="2" blockname="terrDirt"/>
                <layer depth="1" blockname="terrStone"> <resource blockname="terrGravel" prob="0.7830" rwgGenerationType="all"/> </layer>
                <layer depth="*" blockname="terrStone"> <resource blockname="terrOreTungsten" prob="0.6500" rwgGenerationType="all"/> <resource blockname="terrGravel" prob="0.7830" rwgGenerationType="all"/> </layer> <layer depth="1" blockname="terrStone"/> <layer depth="3" blockname="terrBedrock"/>
                <decoration type="prefab" name="deco_lead_vein" checkresource="-7" onslopes="true" prob=".01857" rotatemax="3"/>
                <decoration type="block" blockname="treePineBurntLrg" prob="0.03" rotatemax="7"/>
                <decoration type="block" blockname="treePineBurntMed" prob="0.03" rotatemax="7"/>
                <decoration type="block" blockname="treePineBurntFullMed" prob="0.03" rotatemax="7"/>
                <decoration type="block" blockname="rockResource" prob=".00033" rotatemax="3"/>
                <decoration type="block" blockname="rockResource02" prob=".00033" rotatemax="3"/>
                <decoration type="block" blockname="cntWastelandRandomLootHelper" prob="0.00025"/>
                <decoration type="block" blockname="treeDeadPineLeaf" prob="0.010" rotatemax="7"/>
                <decoration type="block" blockname="scrapMetalPile" prob=".015" rotatemax="3"/>
                <decoration type="block" blockname="brickShapes:brickDestroyed01" prob=".0004" rotatemax="7"/>
                <decoration type="block" blockname="brickShapes:brickDestroyed02" prob=".0004" rotatemax="7"/>
                <decoration type="block" blockname="brickShapes:brickDestroyed03" prob=".0004" rotatemax="7"/>
                <decoration type="block" blockname="rock01" prob=".004" rotatemax="3"/>
                <decoration type="block" blockname="rock02" prob=".004" rotatemax="3"/>
                <decoration type="block" blockname="rock04" prob=".004" rotatemax="3"/>
                <decoration type="block" blockname="cntBirdnest" prob="0.001"/>
                <decoration type="block" blockname="cinderBlocks01" prob=".006" rotatemax="7"/>
                <decoration type="block" blockname="cinderBlocks02" prob=".006" rotatemax="7"/>
                <decoration type="block" blockname="cinderBlocks03" prob=".006" rotatemax="7"/>
                <decoration type="block" blockname="treeBurntMaple01" prob="0.0012" rotatemax="7"/>
                <decoration type="block" blockname="treeBurntMaple02" prob="0.0012" rotatemax="7"/>
                <decoration type="block" blockname="treeBurntMaple03" prob="0.0012" rotatemax="3"/>
                <decoration type="block" blockname="treePineBurntLrg" prob="0.0006" rotatemax="7"/>
                <decoration type="block" blockname="treeDeadPineLeaf" prob="0.001" rotatemax="7"/>
                <decoration type="block" blockname="treeDeadTree02" prob="0.002" rotatemax="7"/>
                <decoration type="block" blockname="treeDeadPineLeaf" prob="0.010" rotatemax="7"/>
                <decoration type="prefab" name="deco_remnant_stone_01" prob=".003"/>
                <decoration type="prefab" name="deco_remnant_stone_02" prob=".003"/>
                <decoration type="prefab" name="deco_remnant_stone_03" prob=".003"/>
                <decoration type="prefab" name="deco_remnant_stone_04" prob=".002"/>
                <decoration type="prefab" name="deco_remnant_stone_05" prob=".002"/>
                <decoration type="prefab" name="deco_rubble_stone_01" prob=".0065"/>
                <decoration type="prefab" name="deco_rubble_stone_02" prob=".0065"/>
                <decoration type="prefab" name="deco_rubble_stone_03" prob=".005"/>
                <decoration type="prefab" name="deco_rubble_stone_04" prob=".003"/>
                <decoration type="prefab" name="deco_rubble_stone_05" prob=".003"/>
                <decoration type="prefab" name="deco_rubble_stone_06" prob=".0065"/>
                <decoration type="prefab" name="deco_rubble_stone_07" prob=".0065"/>
                <decoration type="prefab" name="deco_rubble_stone_08" prob=".0065"/>
                <decoration type="prefab" name="deco_rubble_stone_09" prob=".003"/>
                <decoration type="prefab" name="deco_rubble_stone_10" prob=".003"/>
                <decoration type="block" blockname="carWrecksRandomHelper" prob="0.0005" rotatemax="3"/>
                <decoration type="block" blockname="treeBrownGrassDiagonal" prob=".05"/>
                <decoration type="block" blockname="mineCandyTin" prob="0.00015"/>
                <decoration type="block" blockname="mineHubcap" prob="0.0001"/>
                <decoration type="block" blockname="hubcapNoMine" prob="0.0011"/>

                <!-- *** New_Destruction_Blocks -->
                <decoration type="block" blockname="rubblePileBricks" prob=".0004" rotatemax="7"/>
                <decoration type="block" blockname="rubblePileBricksLong" prob=".0004" rotatemax="7"/>
                <decoration type="block" blockname="rubblePileBricksSmall" prob=".0004" rotatemax="7"/>
                <decoration type="block" blockname="rubblePileCement" prob=".0004" rotatemax="7"/>

Here is the  config dump that shows it is infact doing the changes correctly in the biome.xml

            <resource blockname="terrOreCopper" prob="0.3100" rwgGenerationType="all">
              <!--Element appended by: "Plexius_Mod_Kit2"-->
            <resource blockname="terrOreZinc" prob="0.3500" rwgGenerationType="all">
              <!--Element appended by: "Plexius_Mod_Kit2"-->
            <resource blockname="terrOreTungsten" prob="0.2700" rwgGenerationType="all">
              <!--Element appended by: "Plexius_Mod_Kit2"-->
            <resource blockname="terrOreZinc" prob="0.3" rwgGenerationType="all">
              <!--Element appended by: "Plexius_Mod_Kit2"-->
            <resource blockname="terrOreCopper" prob="0.28" rwgGenerationType="all">
              <!--Element appended by: "Plexius_Mod_Kit2"-->
            <resource blockname="terrOreTungsten" prob="0.3500" rwgGenerationType="all">
              <!--Element appended by: "Plexius_Mod_Kit2"-->

Link to comment
Share on other sites

I appreciate the time you've taken to respond to me currently im trying to create prefabs by using the blocks ive made so it has a reference to spawn in instead of having to use a deco model thats in use by another block

Link to comment
Share on other sites

On 9/19/2023 at 8:50 PM, Plexius said:

yes that is what the second batch of code is from directly from config dump of that save there are no errors when starting the server so im confused as to why it just isnt spawning them in


You need to go into the POI editor and create a new deco.  I created an Uranium one using my new boulder and terrain blocks I made.  Will also link a copy of my mod code.


The only thing I couldn't get it to do was change the color of the terrain blocks.  Not sure how to do that  🤷‍♂️



Link to comment
Share on other sites

Yeah ive gathered so far that theres no way to color the texture of the terrain itself which is fine for now. I actually did start creating prefabs for it and havent gotten around to testing it out fully i will update as soon as i can!

Link to comment
Share on other sites

Thank you for the help! i managed to get everything working so far so i should be able to continue on with finishing my mod! This small thing held up the majority of the project and if you were curious here are some of the metals that were being added in the mod

Copper Zinc Tungsten Mithril Adamantium Orichalcum Necronium Chromium Niobium Vanadium Aluminum Uranium

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...