Fandom

Surfpup's tConfig Mod Wiki

TConfig Create Custom Wings

124pages on
this wiki
Add New Page
Comments24 Share

Winged

Screenshot of custom wings in action; posted originally by Yoraiz0r.

Creating Custom Wings w/ TConfig
Edit

1. Create your wing texture. It's best to base this off of the Angel Wings or Demon wings if you're doing this for the first time.

2. Create a .ini file for your wings, defining them as an accessory. Here is a basic outline to follow:

[Stats]
width=24
height=8
type=-1
accessory=True
useAnimation=100
useTime=100
maxStack=1
scale=1
toolTip=Fly anywhere with these wings!
rare=5
value=10000
[Recipe]
Amount=1
needWater=False
Items=1 Wood
Tiles=Workbench

3. Create three new folders inside your mod folder. They should be called "Global", "Item", and "Gore".

4. Create a new text document inside the "Global" folder, and paste the following into it. Afterwards, save the file as "World.cs".

public static int AddWingByTextureName(string tex)
{
    Texture2D TEX = Main.goreTexture[Config.goreID[tex]];
    for (int i = 0; i < Main.wingsTexture.Length; i++)
        if (Main.wingsTexture[i] == TEX) return i;
    Array.Resize(ref Main.wingsTexture, Main.wingsTexture.Length + 1);
    Main.wingsTexture[Main.wingsTexture.Length - 1] = TEX;
    return Main.wingsTexture.Length - 1;
}


5. Inside the "Item" folder, create a new text document and paste the following code into it. Save the file as

Wings 2

Example of wings. In the "Gore" folder

"CustomWings.cs".

public static int WINDEX = ModWorld.AddWingByTextureName("Awesome Wings"); //its static because there's no point to initialize this for every single item's instance
public void Effects(Player P)
{
    P.wings = WINDEX;
}

6. Now, paste your texture file into both the "Item" and the "Gore" folders. It should be saved as a .png image.


7. Compile the modpack, and enjoy your new creation!

Credit:

Yoraiz0r @ TerrariaOnline Forums [Original Idea / Code / Overhauled code]

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.