Standalone [1.3] tModLoader - A Modding API

Hey guys, just looking to use a custom mid-range weapon (Throwing glove) to use one ammo id (Ninja stars) . I've made both in terms of defaults and recipes but don't know how to use:

public virtual bool ConsumeAmmo(Player player) method

or

public virtual void Kill(int timeLeft) method [Pretty sure that's in the example mod though]

Danke
 
Last edited:
apologies, i see all these things about crashes and now im getting one :/ i apologize because all i can do is give you this. (it happens when i hit new character)

Field not found: 'Terraria.Main.rand'.
at FastStart.FastStartPlayer.SetupStartInventory(IList`1 items)
at Terraria.ModLoader.PlayerHooks.SetupStartInventory(Player player)
at Terraria.Player..ctor(Boolean startupInventory)
at Terraria.GameContent.UI.States.UICharacterSelect.NewCharacterClick(UIMouseEvent evt, UIElement listeningElement)
at Terraria.UI.UIElement.Click(UIMouseEvent evt)
at Terraria.UI.UserInterface.Update(GameTime time)
at Terraria.Main.DoUpdate(GameTime gameTime)
at Terraria.Main.Update(GameTime gameTime)
 
apologies, i see all these things about crashes and now im getting one :/ i apologize because all i can do is give you this. (it happens when i hit new character)

Field not found: 'Terraria.Main.rand'.
at FastStart.FastStartPlayer.SetupStartInventory(IList`1 items)
at Terraria.ModLoader.PlayerHooks.SetupStartInventory(Player player)
at Terraria.Player..ctor(Boolean startupInventory)
at Terraria.GameContent.UI.States.UICharacterSelect.NewCharacterClick(UIMouseEvent evt, UIElement listeningElement)
at Terraria.UI.UIElement.Click(UIMouseEvent evt)
at Terraria.UI.UserInterface.Update(GameTime time)
at Terraria.Main.DoUpdate(GameTime gameTime)
at Terraria.Main.Update(GameTime gameTime)

Try removing FastStart .tmod
 
so i downloaded the newest version of tmodloader and every time i try to start it up it crashes and i get an error. I cleared my old logs and started it up again, i got two errors in the logs file:
Method not found: 'Void Terraria.ModLoader.Mod.RegisterHotKey(System.String, System.String)'.
at RecipeBrowser.RecipeBrowser.Load()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
Field not found: 'Terraria.Main.rand'.
at WeaponOut.WeaponOut.ModifyTransformMatrix(Matrix Transform)
at Terraria.ModLoader.ModHooks.ModifyTransformMatrix(Matrix Transform)
at Terraria.Main.do_Draw(GameTime gameTime)
at Terraria.Main.DoDraw(GameTime gameTime)
EDIT: Nevermind, i read the comments above.
 
so i downloaded the newest version of tmodloader and every time i try to start it up it crashes and i get an error. I cleared my old logs and started it up again, i got two errors in the logs file:
Method not found: 'Void Terraria.ModLoader.Mod.RegisterHotKey(System.String, System.String)'.
at RecipeBrowser.RecipeBrowser.Load()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
Field not found: 'Terraria.Main.rand'.
at WeaponOut.WeaponOut.ModifyTransformMatrix(Matrix Transform)
at Terraria.ModLoader.ModHooks.ModifyTransformMatrix(Matrix Transform)
at Terraria.Main.do_Draw(GameTime gameTime)
at Terraria.Main.DoDraw(GameTime gameTime)

Try removing those mods (RecipeBrowser & WeaponsOut).
Recipe browser may be updated, but don't quote me on that.
 
Deleting/moving all the .tmod files from "Documents\my games\Terraria\ModLoader\Mods" will remove all those mods
what I mean is: can I launch tmodloader without deleting my mods? Like a hidden option that I must enable through a file so that I can launch it and then update my mods (since i have quite a few and i dont want to re-download them).
 
what I mean is: can I launch tmodloader without deleting my mods? Like a hidden option that I must enable through a file so that I can launch it and then update my mods (since i have quite a few and i dont want to re-download them).
If you are updating them, you are downloading them either way.
 
Hello, I have a weird glitch using tmodloader.
When I put any dye in the head slot, it pushes a balloon sprite down.

Normal 01.jpg

Glitched 02.jpg
 
Can someone help me out with an error please?
Error CS1002 ; expected
Here is code if u need it

using Terraria.ID;
using Terraria.ModLoader;

namespace NicksMod.Items
{
public class SimplePistol : ModItem
{
public override void SetDefaults()
{
item.name = "Simple Pistol"; //Gun name
item.damage = 14; //gun damage
item.ranged = true; //its a gun so set this to true
item.width = 38; //gun image width
item.height = 24; //gun image height
item.toolTip = "As Simple As It Gets"; //gun description
item.useTime = 20; //how fast
item.useAnimation = 20;
item.useStyle = 5; //
item.noMelee = true; //so the item's animation doesn't do damage
item.knockBack = 4;
item.value = 10000;
item.rare = 2;
item.useSound = SoundID.11;
item.autoReuse = true;
item.shoot = 10; //idk why but all the guns in the vanilla source have this
item.shootSpeed = 16f;
item.useAmmo = AmmoID.Bullet;
}

public override void AddRecipes() //How to craft this gun
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(324, 1); //you need 1 dirtblock
recipe.AddTile(TileID.Anvils); //at work bench
recipe.SetResult(this);
recipe.AddRecipe();

}
}
}



Plz help
 
item.useSound = SoundID.11;

When posting for help with errors, please include the line and column number that is shown with the error as it makes it easier to find and help you out.

If I had to guess, it is the line I quoted above which I believe should be "item.UseSound = SoundID.Item11;".
 
But when i do that this error comes up
error CS1061: 'Terraria.Item' does not contain a definition for 'useSound' and no extension method 'useSound' accepting a first argument of type 'Terraria.Item' could be found (are you missing a using directive or an assembly reference?)
 
Back
Top Bottom