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

Q: How can I add/replace a terrain texture? My experiments didn't work.

cajaj49907

Refugee
I wanted to add a nice grass lawn texture to the terrain texture with the goal being to create a new block type, similar to terrDirt, that could be placed into the terrain adding grass to replace whatever was there (in my case, sand; I want a nice lawn in front of my base).  I've got the XML files correct, I think:

recipes.xml

<configs>
<append xpath="/recipes">
<recipe name="terrGrassyDirt" count="1" craft_time="1">
<ingredient name="resourceClayLump" count="16"/>
<ingredient name="resourceYuccaFibers" count="2"/>
</recipe>
</append>
</configs>




materials.xml

<configs>
<append xpath="/materials">
<material id="Mgrassy_dirt">
<property name="Extends" value="Mdirt"/>
<property name="stepsound" value="grass"/>
<property name="MaxDamage" value="200"/>
</material>
</append>
</configs>




blocks.xml

<configs>
<append xpath="/blocks">
<block name="terrGrassyDirt">
<property name="NoScrapping" value="true"/>
<property name="Shape" value="Terrain"/>
<property name="Mesh" value="terrain"/>
<property name="LPHardnessScale" value="2"/>
<property name="Map.Color" value="35,80,45"/>
<property name="ImposterExclude" value="true"/>
<property class="RepairItems">
<property name="resourceClayLump" value="14"/>
</property>
<drop event="Harvest" name="resourceClayLump" count="14" tag="oreWoodHarvest"/>
<drop event="Harvest" name="resourceYuccaFibers" count="1" tag="allHarvest"/>
<drop event="Destroy" count="0"/>
<drop event="Fall" name="terrForestGround" count="1" prob="0.25" stick_chance="1"/>
<drop event="Fall" name="resourceClayLump" count="44" prob="0.187" stick_chance="0"/>
<property name="Group" value="Decor/Miscellaneous"/>
<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="d0k0"/>
<property name="SortOrder2" value="0050"/>
<property name="DisplayType" value="blockTerrainFertile"/>
<property name="DescriptionKey" value="terrainBlockGroupDesc"/>

<property name="Material" value="Mgrassy_dirt"/>
<property name="CustomIcon" value="terrGrassyDirt" />
<property name="CreativeMode" value="Player"/>
<property name="Texture" value="308"/>
</block>
</append>
</configs>






Things I tried:

1) I use UABE to modify \7 Days To Die\Data\Bundles\terraintextures by replacing the existing sod.png (#308) texture with my grass texture (same size, also png) with "IsReadable=false".  Placing a terrGrassyDirt continued to show the splatmap terrain texture for that location (sand).

2) I use UABE to modify \7 Days To Die\Data\Bundles\terraintextures by replacing sod.png texture with my grass texture with "IsReadable=true".  Placing a terrGrassyDirt continued to show the splatmap terrain texture for that location (sand).

3) 1) I use UABE to modify \7 Days To Die\Data\Bundles\terraintextures by replacing the existing sand.png texture with my grass texture.  I just wanted to see if changing the terraintexture file did anything at all.  The sand in the game remained sand, not grass.

What am I missing?

 
You currently cannot, as the terrain textures are baked into the shader, much as changing the references in biomes.xml does nothing.

If you look at my previous posts on my profile there are some discussions on this.

 
Back
Top