Standalone [1.3] tModLoader - A Modding API

How can i make my modified ore generate around the world by smashing alters ? Never done it before if it works yet ? How would i write the code for this ?
 
I dont know how to use tmodreader.
First, I open tmodreader and nothing happen, just the loading mouse,
then i click to the mod and i choose tmodreader andthe same thing.
Plus, I have the mod files in the input folder but don't do a thing
What I can do to use it? :confused:
 
I have a bit of a problem that's probably just me being dopey with syntax. I'm trying to find the max stack of a vanilla item from within the ModWorld file using the item ID. So something like:
Code:
int MaxDirtStack = something(ItemID.DirtBlock).maxStack     // equals 999;

But I haven't been able to find anything that works correctly. Can anyone guide me in the right direction?
 
How can i make my modified ore generate around the world by smashing alters ? Never done it before if it works yet ? How would i write the code for this ?
 
Can someone help me to make your player spawn with certain items depending on their name. I tried an IF statement but it's just using the ELSE even when I have the name typed exactly the same :/
here is the code:

Code:
namespace ImmersionMod
{
    public class ImmersionModPlayer : ModPlayer
    {
        public override void SetupStartInventory(IList<Item> items)
        {
            if(player.name == "Consition")
            {
                Item item = new Item();
                item.SetDefaults(Terraria.ID.ItemID.Seaweed);
                items.Add(item);
            }
            else
            {
                Item item = new Item();
                item.SetDefaults(mod.ItemType("ThankYou"));
                items.Add(item);
            }
        }
    }
 
Woah! So many questions :p

@-(Benny24)- Many things could cause that. 1). Are you both using the same mods? 2). Are you both on tModLoader? 3). Are you both on the same version of tModLoader/Terraria?

@JonnyNava367 some mods such as Tremor or Thorium don't let you get the source of the .tmod, because they don't want people stealing their stuff, or copying their code. Other mods might work, just that it doesn't say which can be extracted.

@^=^ this should work:
Code:
public override void SetupStartInventory(IList<Item> items)
        { //Add using Terraria.ID; to the top of the file. Then, you don't have to do Terraria.ID.ItemID.Seaweed;
            Player player = Main.player[Main.myPlayer]; //You might not need this, not sure.
            Item item = new Item();
            if (player.name == "Consition")
            {
                item.SetDefaults(ItemID.Seaweed);
                item.stack = 5; //Whatever number.
            }
            if (player.name != "Consition")
            {
                item.SetDefaults(mod.ItemType("SlimyStick"));
            }
            items.Add(item);
        }

@CoolGuy#1Yo:red:=_= you'd have to directly change the projectile's AI, or (not sure if this'll work), copy a yo-yo such as the Eye of Cthulhu, as to get the length.

@Iroh The Dragon I've seen it done, just don't know the code. Ask on the discord chat, it'd be a lot faster.
@efhosci same as above.

:D
 
@GabeHasWon I found one way to increase the lenght, i use aiType = ProjectileId.Name, but where i can find a source of other yoyo and other items, Is it possible to find one?
 
@GabeHasWon I found one way to increase the lenght, i use aiType = ProjectileId.Name, but where i can find a source of other yoyo and other items, Is it possible to find one?

Use VisualStudio, like that, you have :
visualstudio.png


edit: Oh, yeah, small edit, you can also google: Terraria projectile ID then go the wiki ^^.
 
Last edited:
Have you done the correct filters? There is a search bar and some icons, and it filters them through that. Sometimes, without the right icons and such, it shows up blank.
 
So first of I can even use the search bar and I also tried mixing all the different filters to no avail
[doublepost=1467931475,1467931453][/doublepost]
So first of I can even use the search bar and I also tried mixing all the different filters to no avail
sorry *cant* use the search bar
 
I have a quick question, will it be fine if i have tModLoader installed and opened and join the normal server that was hosted with normal terraria. By "will it be fine" i mean will it be consider cheating/will it change the gameplay on the server ?
 
Got a bit of an issue
That is after I installed the mod (moved files in the zip to the terraria file in SteamApps), the tModReader exe wouldn't work. The rest of Terraria works though, so thats a good thing
 
Back
Top Bottom