Standalone [1.3] tModLoader - A Modding API

Can u show picture of it in game
Sword uauee.PNG
 
Ok
[DOUBLEPOST=1451791839,1451791799][/DOUBLEPOST]Can i some how use command to get it ?
I edited the treasure bag thingy to give me the ingrediants
Code:
            player.QuickSpawnItem(ItemID.Obsidian, 10);
            player.QuickSpawnItem(ItemID.CobaltBar, 4);
            player.QuickSpawnItem(ItemID.Wood, 6);
//Insert this code near the other QuickSpwanItems
 
What do i do whit that code i mean where to put it
Code:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace ExampleMod.Items
{
    public class ExplorerBag : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Explorer's Bag";
            item.width = 20;
            item.height = 20;
            item.toolTip = "Right click for goodies!";
            item.rare = 2;
        }

        public override bool CanRightClick()
        {
            return true;
        }

        public override void RightClick(Player player)
        {
            player.QuickSpawnItem(ItemID.LifeCrystal, 15);
            player.QuickSpawnItem(ItemID.TerraBlade);
            player.QuickSpawnItem(ItemID.StarWrath);
            player.QuickSpawnItem(ItemID.BrokenHeroSword, 2);
            player.QuickSpawnItem(989);
            player.QuickSpawnItem(ItemID.Obsidian, 10);
            player.QuickSpawnItem(ItemID.CobaltBar, 4);
            player.QuickSpawnItem(ItemID.Wood, 6);
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

Take this code and make a new C# File and make a random texture (name them the same thing)
[DOUBLEPOST=1451792392,1451792294][/DOUBLEPOST]then mine up 1 dirt block and craft the item. right click it and you will get some crap you dont want and the recipe items
 
Cannot make ):
Are you on Mac or Linux?
[DOUBLEPOST=1451793075,1451792854][/DOUBLEPOST]Also, Is it possible to make one item not stack with another? For instance, If I combined a frost core with a fire gauntlet for an icy gauntlet, could I make it so the melee damage/speed/knockback would not stack with the fire gauntlet?
 
The Example mod download isnt working. and does anyone know any good coding tutorials? I get the basics, but i want to be able to make a NPC at some point.
Can someone give me a setup code so i can just edit a few things like HP, Sprite, and AI type? Im trying to make a slime. Also, how to I edit spawn chance and where it spawns?

I am bad at coding.
https://dl.dropboxusercontent.com/u/41490830/TerrariaModding/tModLoader Windows v0.6.zip
http://forums.terraria.org/index.php?threads/code-examples-handy-code-snippets.28901/#post-656323
https://github.com/bluemagic123/tMo...-virtual-float-canspawnnpcspawninfo-spawninfo
https://github.com/bluemagic123/tModLoader/blob/master/ExampleMod/NPCs/PartyZombie.cs#L31

Sorry I can't explain anything in depth right now, but all these links should be helpful. Also, just google for c# tutorials.

Eh, how to shoot a random projectile out of 5?

You could override Shoot:
if(Main.rand.Next(5)==0){
type = mod.getProjectile("LessFrequentProjectile");
}
return true;

Is it allowed to add the Lunatic Cultist bag back in? I know that there have been some issues, but what if I resprite it?
*coughnotpartofourmodcough*
Technically it is against forum rules, which by extension, would be against the rules of tModLoader. If you don't use the same artwork, and don't call it the same thing, it's not the safe item, right? I'd go that route.

Found out some issues with the installer.
First, it doesn't recognize "Resources" but rather "resources". There's a difference, the program can tell somehow.
Second, it will NOT work in certain folders (for example: you can't use it from a folder in the desktop)
This goes against all the instructions people have been following to install it, so it might just be your computer and unzip program setting the permissions and blocking wrong.

So you plan to add support for multiplayer in the next update? Cause i would like the mods to work in multiplayer to enhance the experience.
Next update will release with the server executable, and we've fixed the door glitch, but that's all we've done so far.
 
Last edited:
So how would I get this code to work for a projectile
Code:
        public override Color? GetAlpha(Color drawColor)
        {
            return Color.White;
        }
and how would I get my projectile to spawn my custom dust?
View attachment 90918
I want to get that sword to work correctly
It's hard to say what you want the GetAlpha hook to do.

There's many examples of spawning dust in the example mod. The MoltenDrill projectile has one of the more simple examples of spawning vanilla dust. Look in the AI hook.
 
It's hard to say what you want the GetAlpha hook to do.

There's many examples of spawning dust in the example mod. The MoltenDrill projectile has one of the more simple examples of spawning vanilla dust. Look in the AI hook.
What I want to do is get the projectile to be visible even in total darkness
 
The current status is, there is no released modded server exe, but modded clients can play on vanilla servers, and whenever a modded player opens/closes a door, chaos will break loose (walls will be destroyed, water/lava will appear, presents will come out of nowhere).

In the next update, I'll be releasing a pre-pre-release of a modded server exe. People will be able to use it to find bugs, so that by the time I do work on servers I'll know what exactly to fix.

Chaos.. love it.. will try now just for fun :D

a preliminar multiplayer support is awesome. Thanks Greenmagic123.
 
This goes against all the instructions people have been following to install it, so it might just be your computer and unzip program setting the permissions and blocking wrong.

Actually, I followed the instructions, but it just refused to work until I moved the tmod installer somewhere else (to "C:\games", for example) and renamed "Resources" to "resources". It's like the "Fun" variable in Undertale: it can differentiate high and low caps. When I moved elsewhere and "corrected the typo", then it worked 100%. Now the only problem I am having is a transparency issue in Tremor Mod, but this ain't matters for this topic.
 
Back
Top Bottom