Fandom

Surfpup's tConfig Mod Wiki

How to change original textures

124pages on
this wiki
Add New Page
Comments13 Share
Difficulty: Difficulty-1
Clock: 5 minutes


Under Contruction

Under Construction
This page has been marked as under construction, which means information may change rapidly as it updated, or that the page is awaiting updates.


Modifying TexturesEdit

This tutorial will show you how to change original textures in Terraria. Yep, this is indeed possible and it is easy to do too, only requires a tiny bit of code. If you want to have your own dirt tiles for example, this is the only way to do it at the moment.

RequirementsEdit

  • At least a basic understanding of how mods work.
  • A condom
  • tConfig must be installed correctly. See the Install Guide, if you have problems.
  • You need atleast tConfig v0.23.0. You can always download the newest version here: v0.35.3a.

PreparationsEdit

Before you can start, you have to create a blank file named "World.cs" in a subfolder of your mod called "Global", if you haven't already. This file will contain all of our code. Also of course you need a image of the texture you want to replace. Create a folder named "Gore" if you haven't already and put your png file in there.

Textures of original tilesEdit

Tile Template

Tile template created by Hedgen

Be warned, if you replace the dirt texture, all other textures that merge with dirt will look wrong! In this example we assume our png file is named "StoneTexture". Okay, now open "Global.cs" and insert this code:
public void Initialize()
{
   Main.tileTexture[0] = Main.goreTexture[Config.goreID["StoneTexture"]];
}

The number in the brackets of Main.tileTexture contains the number of the tile you want to replace. Number zero is dirt, number one is stone, number two is grass, etc. For a full list, just look at List of Tiles. Also, you need to replace the name "StoneTexture" with whatever you named your png file, since this will replace the original file.

That's all, you're done!

- S. P. Gardebiter 05:44, April 14, 2012 (UTC)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.