Standalone [1.3] tModLoader - A Modding API

I'm writing a mod with a number of custom items in it. Currently I'm testing multiplayer by running a server on my Windows computer. I found that I can store and retrieve from chests just fine from Windows but when I connect to the server from my Mac the items stored in the chest show up as the wrong item/class, changing to one of the other custom items that I've created.
 
How come when i use my sword i created it shoots sharks that face the wrong way they are looking upwards when going sideways when its supposed to be looking foward at all times
Help plz
heres some code if u need it

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace NicksMod.Projectiles
{

public class SharkSwordProjectile : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Killer Shark"; //projectile name
projectile.width = 55; //projectile width
projectile.height = 55; //projectile height
projectile.friendly = true; //make that the projectile will not damage you
projectile.melee = true; //
projectile.tileCollide = false; //make that the projectile will be destroed if it hits the terrain
projectile.penetrate = -1; //how many npc will penetrate
projectile.timeLeft = 200; //how many time this projectile has before disepire
projectile.light = 0.0f; // projectile light
projectile.extraUpdates = 0;
projectile.ignoreWater = true;
}
public override void AI() //this make that the projectile will face the corect way
{ // |
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
}
 
How come when i use my sword i created it shoots sharks that face the wrong way they are looking upwards when going sideways when its supposed to be looking foward at all times
Help plz
heres some code if u need it

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace NicksMod.Projectiles
{

public class SharkSwordProjectile : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Killer Shark"; //projectile name
projectile.width = 55; //projectile width
projectile.height = 55; //projectile height
projectile.friendly = true; //make that the projectile will not damage you
projectile.melee = true; //
projectile.tileCollide = false; //make that the projectile will be destroed if it hits the terrain
projectile.penetrate = -1; //how many npc will penetrate
projectile.timeLeft = 200; //how many time this projectile has before disepire
projectile.light = 0.0f; // projectile light
projectile.extraUpdates = 0;
projectile.ignoreWater = true;
}
public override void AI() //this make that the projectile will face the corect way
{ // |
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
}
What way is your projectile oriented? It should be facing diagonally up.
 
I'm writing a mod with a number of custom items in it. Currently I'm testing multiplayer by running a server on my Windows computer. I found that I can store and retrieve from chests just fine from Windows but when I connect to the server from my Mac the items stored in the chest show up as the wrong item/class, changing to one of the other custom items that I've created.
That is odd, you should zip up the source and PM it to me so we can figure out why this is happening.
 
can anyone please tell me what is going on with tmodloader? it wont accept the "useSound"-statement anymore. its been a long while since i was last time on tmodloader so i could have just over seen something :confused:
 
can anyone please tell me what is going on with tmodloader? it wont accept the "useSound"-statement anymore. its been a long while since i was last time on tmodloader so i could have just over seen something :confused:

item.UseSound = SoundID.Item#
(Replacing '#' with the specified number)

Ensure the statement uses capital 'U' in UseSound.

Jeckel makes reference to this (which I have forgotten to quote, but is on page 733) being one of the primary changes between updates.
 
hello, if you guys see this comment, is there something wrong with my tmodloader install? or is this normal, when i try to install a mod with the mod browser it says something like cant download heavy load, i was curious if something was wrong or not :p

It is because tModLoader has updated, Heavy Load means that several people is updating/downloading mod, give it a couple of days and it will come back.
 
Jeckel makes reference to this (which I have forgotten to quote, but is on page 733) being one of the primary changes between updates.
oh ok had looked some of these pages but not all
but then there's this

Code:
private int value = 0;
        public override void ModifyHitNPC(Player player, NPC target, ref int damage, ref float knockBack, ref bool crit)
        {
       
            if (value == 1) damage= (int)(damage*1f);
            if (value == 2) damage = (int)(damage * 2.5f);
            if (value == 3) value = 0;
            value++;

            base.ModifyHitNPC(player, target, ref damage, ref knockBack, ref crit);   
        }
        public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit)
        {
               int spike = (int)Math.Floor((double)(damage / 10));
                 player.Hurt(spike, target.direction);
            base.OnHitNPC(player, target, damage, knockBack, crit);
        }
this part has an error too...
is there something new about that too?
 
Are these mods not working?
Object reference not set to an instance of an object.
at EnemyMods.NPCs.gNPC.SetDefaults(NPC npc) in c:\Users\Kenneth\Documents\my games\Terraria\ModLoader\Mod Sources\EnemyMods\NPCs\gNPC.cs:line 29
at Terraria.ModLoader.NPCLoader.SetupNPC(NPC npc)
at Terraria.NPC.SetDefaults(Int32 Type, Single scaleOverride)
at Terraria.NPC.SetDefaultsKeepPlayerInteraction(Int32 Type)
at Terraria.NPC.CloneDefaults(Int32 Type)
at CheezeMod.NPCs.Bonefish.SetDefaults()
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

Object reference not set to an instance of an object.
at EnemyMods.NPCs.gNPC.SetDefaults(NPC npc) in c:\Users\Kenneth\Documents\my games\Terraria\ModLoader\Mod Sources\EnemyMods\NPCs\gNPC.cs:line 29
at Terraria.ModLoader.NPCLoader.SetupNPC(NPC npc)
at Terraria.NPC.SetDefaults(Int32 Type, Single scaleOverride)
at Terraria.NPC.SetDefaultsKeepPlayerInteraction(Int32 Type)
at Terraria.NPC.CloneDefaults(Int32 Type)
at CosmeticVariety.NPCs.Starzar.SetDefaults() in c:\Users\benma\OneDrive\Documents\My Games\Terraria\ModLoader\Mod Sources\CosmeticVariety\NPCs\Starzar.cs:line 14
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
Can someone help me please, when i first installed 0.9.0.1 it said an error when i tried loading it from the download so someone told me to load it from the steam library, so i did but it loaded up vanilla, so i tried loading from the download again and that opened vanilla as well. How can i get tmod to work???
 
Hi, I'm trying to play some mods in multiplayer with a friend and whenever I try to host the world we get this error.
upload_2016-12-16_16-37-23.png

The error occurs just after I set the password. This has never occurred for us on previous iterations of tmodloader. Could you please provide some insight as to what the cause of this error is?
 
Hi, I'm trying to play some mods in multiplayer with a friend and whenever I try to host the world we get this error.
View attachment 151941
The error occurs just after I set the password. This has never occurred for us on previous iterations of tmodloader. Could you please provide some insight as to what the cause of this error is?
Does your install folder have tModLoaderServer.exe? maybe you deleted it.
[doublepost=1481925247,1481925163][/doublepost]
public override void AI() //this make that the projectile will face the corect way
{ // |
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
There is projectile.spriteDirection, which is used to flip sprites if needed: https://github.com/bluemagic123/tModLoader/search?utf8=✓&q=spritedirection
 
As a long time lurker, it's admirable to see all this continuing to be worked on (even with pressing life constraints among the Tmod team, and Mod Dev's in general).
Still looking forward to a GOG 1.3.4.4 Patch release (and have been eagerly watching the Gitlab activity), hoping it's progressing smoothly Jeckel!

Doing fantastic work all!
 
Back
Top Bottom