imkSushi
Eater of Worlds
This mod lets you change the names and textures of other items!
I will be making it much easier to put old texture packs into this on Monday. So if you've got a vanilla texture pack, don't start changing over all the item names.
Examples at https://github.com/imkSushi/ExampleNameAndTexturePack
To start, have an empty mod skeleton, from here: http://javid.ddns.net/tModLoader/generator/ModSkeletonGenerator.html, and place the folder inside the zip file in your mod sources file (see the tModLoader thread for more details). Then, delete the Items folder.
Next, open the build.txt file.
Add the following line to it:
Next, in the 'insertModNameHere'.cs file (stay in this file until I specifically say to leave it), place the following underneath 'using Terraria.ModLoader;':
Note, there are extra, just to be safe.
Next, place a PostSetupContent() method inside the 'insertModNameHere' class, but not in the method in it. Your file should now look like this:
And I think that is all. Then save and close the 'insertModNameHere'.cs file, update the version number and the authors in the build.txt file, write something appropriate in the description.txt file, and then press build and reload for your mod in tModLoader, with this mod enabled as well. If all goes well, you can now publish your data pack to the mod browser!
I will be making it much easier to put old texture packs into this on Monday. So if you've got a vanilla texture pack, don't start changing over all the item names.
Examples at https://github.com/imkSushi/ExampleNameAndTexturePack
To start, have an empty mod skeleton, from here: http://javid.ddns.net/tModLoader/generator/ModSkeletonGenerator.html, and place the folder inside the zip file in your mod sources file (see the tModLoader thread for more details). Then, delete the Items folder.
Next, open the build.txt file.
Add the following line to it:
Code:
modReferences = imkSushisDataPacksMod
in build.txt, add:
Code:
weakreferences = 'modname1', 'modname2', 'modname3', ...
Next, in the 'insertModNameHere'.cs file (stay in this file until I specifically say to leave it), place the following underneath 'using Terraria.ModLoader;':
Code:
using System;
using System.IO;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using 'insertModNameHere';
using imkSushisDataPacksMod;
Next, place a PostSetupContent() method inside the 'insertModNameHere' class, but not in the method in it. Your file should now look like this:
Code:
using System;
using System.IO;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using imkSushisDataPacksMod;
using imkSushisNamePack;
namespace 'insertModNameHere'
{
class 'insertModNameHere' : Mod
{
public 'insertModNameHere'()
{
Properties = new ModProperties()
{
Autoload = true,
AutoloadGores = true,
AutoloadSounds = true
};
}
public override void PostSetupContent()
{
}
}
}
Inside PostSetupContent(), write:
Note that the 'name you want to change it to' is a normal display name (i.e. with spaces), and it is surrounded with "s on either side.
To find item names, look here for the relevant short string:
https://github.com/blushiemagic/tModLoader/wiki/Vanilla-Item-IDs
e.g. the Gold ore has an itemName of 'GoldOre'
Do this for each item you wish to change the name of.
Code:
imkSushisDataPacksMod.imkSushisDataPacksMod.ChangeItemName(ItemID.'itemName', "'name you want to change it to'");
To find item names, look here for the relevant short string:
https://github.com/blushiemagic/tModLoader/wiki/Vanilla-Item-IDs
e.g. the Gold ore has an itemName of 'GoldOre'
Do this for each item you wish to change the name of.
Inside PostSetupContent(), write:
Note that the 'name you want to change it to' is a normal display name (i.e. with spaces), and it is surrounded with "s on either side.
Also, note that the 'modName' is not a normal display name, but is still surrounded with "s on either side.
Do this for each item you wish to change the name of.
Remember, that any mod you change a name of, must be mentioned in the weakreferences in the build.txt (see above)
Code:
if (ModLoader.GetLoadedMods().Contains("'modName'"))
{
imkSushisDataPacksMod.imkSushisDataPacksMod.ChangeItemName(ModLoader.GetMod("'modName'").ItemType("'itemName'"), "'name you want to change it to'");
}
Also, note that the 'modName' is not a normal display name, but is still surrounded with "s on either side.
Do this for each item you wish to change the name of.
Remember, that any mod you change a name of, must be mentioned in the weakreferences in the build.txt (see above)
Inside PostSetupContent(), write:
Inside your mod folder, place a sprite 'itemName'.png (itemName being the relevant item). Make sure that this sprite has the same dimensions as the normal sprite.
To find item names, look here for the relevant short string:
https://github.com/blushiemagic/tModLoader/wiki/Vanilla-Item-IDs
e.g. the Gold ore has an itemName of 'GoldOre'
Do this for each item you wish to change the texture of.
Code:
imkSushisDataPacksMod.imkSushisDataPacksMod.ChangeItemTexture(ItemID.'itemName', ModLoader.GetTexture("'insertModNameHere'/'itemName'"));
Inside your mod folder, place a sprite 'itemName'.png (itemName being the relevant item). Make sure that this sprite has the same dimensions as the normal sprite.
To find item names, look here for the relevant short string:
https://github.com/blushiemagic/tModLoader/wiki/Vanilla-Item-IDs
e.g. the Gold ore has an itemName of 'GoldOre'
Do this for each item you wish to change the texture of.
Inside PostSetupContent(), write:
Inside your mod folder, place a sprite 'itemName'.png (itemName being the relevant item). Make sure that this sprite has the same dimensions as the normal sprite.
Also, note that the 'modName' and 'itemName is not a normal display name, but is still surrounded with "s on either side.
Do this for each item you wish to change the texture of.
Remember, that any mod you change a texture of, must be mentioned in the weakreferences in the build.txt (see above)
Code:
if (ModLoader.GetLoadedMods().Contains("'modName'"))
{
imkSushisDataPacksMod.imkSushisDataPacksMod.ChangeItemTexture(ModLoader.GetMod("'modName'").ItemType("'itemName'"), ModLoader.GetTexture("'insertModNameHere'/'itemName"));
}
Also, note that the 'modName' and 'itemName is not a normal display name, but is still surrounded with "s on either side.
Do this for each item you wish to change the texture of.
Remember, that any mod you change a texture of, must be mentioned in the weakreferences in the build.txt (see above)
And I think that is all. Then save and close the 'insertModNameHere'.cs file, update the version number and the authors in the build.txt file, write something appropriate in the description.txt file, and then press build and reload for your mod in tModLoader, with this mod enabled as well. If all goes well, you can now publish your data pack to the mod browser!
Last edited: