Fandom

Surfpup's tConfig Mod Wiki

How to Make an Accessory

124pages on
this wiki
Add New Page
Comments6 Share
Difficulty: Difficulty-2
Clock: 15 to 25 minutes


Introduction Edit

This tutorial is designed for people who want to make an accessory for Terraria. NOTE: I learned how to do this on my own so there may be some errors.

Video Tutorial Edit

Terraria tConfig Modding Tutorial 5 - Custom Accessory07:59

Terraria tConfig Modding Tutorial 5 - Custom Accessory

Requirements Edit

Making the Accessory Edit

  • Here is the format you need. There are some changes from a basic item:
[Stats]
width=10
height=14
type=-1
maxStack=1
toolTip=Creates a grid on screen for block placement
toolTip2=Increases block placement range
scale=1
value=2500
accessory=true
rare=3
[Recipe]
Amount=1
needWater=False
Items=1 Ruler,1 Toolbelt
Tiles=Tinkerer's Workshop
  • This is my Toolbelt With Ruler.ini file.
  • You will need a photo by the same name, so here is the photo I used:
    Toolbelt With Ruler

    Toolbelt With Ruler.png

  • Basically, there is only three differences from the item file:
    • "accesory" is to determine whether the item is allowed in the accesory slot and if it can recieve accesory reforges. Can only be stated as true or false.
    • "toolTip2" is the second line for the tooltip.
    • "rare" is the rarity value. Natural rarity is shown by looking at the color of a title of an item without modifiers.
  • Now we have to make a new file:

The Effects Edit

  • Create a new file. For this item, it is named "Toolbelt With Ruler.cs"
  • This code is put into the file:
public static void Effects(Player player) {
	player.rulerAcc = true;
	player.blockRange = 1;
}
  • This adds to effects:
    • "rulerAcc" is the folder grid layout.
    • "blockRange" increases your block range by 1 block, like the toolbelt.
  • If you want to have an effect like the Band of Regeneration, you have to add a line of code to the .ini file. For the Band of Regeneration, you would add lifeRegen = 1.

If You Want Effects Of Other Accessories... Edit

  1. Depending on how decompiling worked, you might have a Item.cs file.
  2. Find your accesory in that file or on the item list.
  3. Remember the number next to it(It's type)
  4. In the Player.cs file, search for type == (the number you remembered)
  5. Copy the effect (this.effect = blahblah)
  6. Paste it under the effects statement in your [NameHere].cs
  7. If you can't find it in the Player.cs file, look for effects on the initializer you found in Item.cs and put it on the Stats part of the [NameHere].ini file.

The Results Edit

So, if you did everything correctly and you equip the Toolbelt With Ruler, you should be able to see the block boundaries and place block 1 block further. Leave problems in the comments!

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.