Standalone [1.3] tModLoader - A Modding API

upload_2017-12-25_22-31-50.png



What does this mean?
 

Attachments

  • upload_2017-12-25_22-30-42.png
    upload_2017-12-25_22-30-42.png
    79.7 KB · Views: 187
I was playing multi with my friend like 6 months ago. It was a little bit laggy, a little bit slow-motion for me sometimes, but playable. Now we are playing again, another playthrough with more mods. Now its lagging as hell, some items that should not lag the game are causing the lag. Also, if there is more than :red:ing 1 mob on the screen i get the slowmotion even if i play terraria on lowest video setting with frameskip set to subtle. My friend wants to play summoner but he can't because if he spawns minions server is going crazy and lags A LOT which makes that we can't pickup items, we can't see where is boss or even if he is alive or dead, we can't see even if we are dead or alive :O. Lags and slowmotion arealso happening alot while we are fighting bosses.

We are playing on newest tModLoader and compatibile mods with it.
Mod list:
AlchemistNPC
Antiaris
AutoTrash
Bismuth
Bluemagic
BossChecklist
Builder's Toolbox
CalamityMod
CrystiliumMod
DualWielding
Fargowitas
FKBossHealthBar
HerosMod
imkSushiMod
ItemChecklist
JoostMod
LongbowsFTW
MagicStorage
MaxStackPlux
MoreAccesssories
RecipeBrowser
ReducedGrinding
SacredTools
SpiritMod
Terranova
ThoriumMod
VeryShortRespawnTime
WeaponOut
WingSlotUpgraded
WMITF

My PC Specs:
CPU- Intel i5 4460 3.2GHz (Terraria+ Terraria console server are not even consuming 100% of the CPU)
GPU- Radeon RX Sapphire 480 4GB
RAM- 8GB (Terraria+ Terraria console server are not even consuming 100% of the RAM)
OS- Windows 10
SSD 256GB
HDD 500GB - Here is terraria and whole steam

I also tried hosting with HOST AND PLAY button on terraria, makes no difference, or makes it even worse i think.
Is there any difference anctually ? :O

I would be glad if someone could help, or even reply why this is happening :D

TY ! I will always love tModLoader and all creators that are developing it !
To be honest, i'm not sure what causes it. I got a new desktop and things seem to work well. For me, though, it's not just terraria, it's the whole computer, so try getting the entire computer's specs checked out, because for me, it wasn't tmod. It was the PC.
Also, host and play is meant to make it worse, since you're actually hosting a miniserver that people can join.
 
I was playing multi with my friend like 6 months ago. It was a little bit laggy, a little bit slow-motion for me sometimes, but playable. Now we are playing again, another playthrough with more mods. Now its lagging as hell, some items that should not lag the game are causing the lag. Also, if there is more than :red:ing 1 mob on the screen i get the slowmotion even if i play terraria on lowest video setting with frameskip set to subtle. My friend wants to play summoner but he can't because if he spawns minions server is going crazy and lags A LOT which makes that we can't pickup items, we can't see where is boss or even if he is alive or dead, we can't see even if we are dead or alive :O. Lags and slowmotion arealso happening alot while we are fighting bosses.

We are playing on newest tModLoader and compatibile mods with it.
Mod list:
AlchemistNPC
Antiaris
AutoTrash
Bismuth
Bluemagic
BossChecklist
Builder's Toolbox
CalamityMod
CrystiliumMod
DualWielding
Fargowitas
FKBossHealthBar
HerosMod
imkSushiMod
ItemChecklist
JoostMod
LongbowsFTW
MagicStorage
MaxStackPlux
MoreAccesssories
RecipeBrowser
ReducedGrinding
SacredTools
SpiritMod
Terranova
ThoriumMod
VeryShortRespawnTime
WeaponOut
WingSlotUpgraded
WMITF

My PC Specs:
CPU- Intel i5 4460 3.2GHz (Terraria+ Terraria console server are not even consuming 100% of the CPU)
GPU- Radeon RX Sapphire 480 4GB
RAM- 8GB (Terraria+ Terraria console server are not even consuming 100% of the RAM)
OS- Windows 10
SSD 256GB
HDD 500GB - Here is terraria and whole steam

I also tried hosting with HOST AND PLAY button on terraria, makes no difference, or makes it even worse i think.
Is there any difference anctually ? :O

I would be glad if someone could help, or even reply why this is happening :D

TY ! I will always love tModLoader and all creators that are developing it !
Those specs should be good enough to run Terraria without issue. But keep in mind Terraria is a 32 bit application, which means that it can't use more than 4gb of RAM. If you try to load too many mods at once, it'll hit that 4gb limit and have problems no matter how good your PC is. Try loading fewer mods.

Or, one or more of those mods are poorly optimised for online play. Try disabling all of them and see if you still have the slowdowns.
-- If it runs fine, enabling them again in groups until you find out which ones are causing your problem.
-- If it still runs like rubbish with no mods, something else is the problem. It's likely a network issue in your/your friends network settings, modem or router.
 
Hi guys
I guess you replied to this question like 4654 times, but I still want to ask you something.
I have no idea how to do that so..
1) Can someone send me an explanation of putting modded and vanilla item to drop from vanilla mob with % chances
2) How to put new loot from fishing and from destroying trees?
Thank you!
3) How to put own spawn rate in own biome+day/night to modded mob
And I'm not a native speaker so be patient with me xdd
Byeee<3
 
Last edited:
AU9KVF39.png


Would these be issues with tModLoader or some loaded mod? "Error on message Terraria.MessageBuffer" seems to happen on in-game slash-commands like /players. I'm not sure about what the "0 Bounced" could be at all.

There also seems to be an issue with client-server mod syncing; a mismatch means the client presumably syncs state (since restarting the game works), but then crashes on adding recipes.
 
1. Is ModPlayer.clientClone() useless without ModPlayer.SendClientChanges()?
2. Should ModPlayer.SyncPlayer() be expected to only always run on the server?
3. Should ModPlayer.SendClientChanges() send packets via parameter-less ModPacket.Send()?
4. If the parameter of SendClientChanges() is the clone parameter given to clientClone(), when will it be different from the current ModPlayer instance (this) within SendClientChanges() to therefore indicate needing to send a ModPacket to sync?
 
Last edited:
my friend and i have spent a collective 4 hours over 2 days trying to get multiplayer working, weve done everything from steam to hamachi and rly need help, if you can help that would great!
 
hello, i made a custom minion but there`s a bit of a problem:
help me.png

as you can see, there are 2 minions with 3 frame animation.
but i intended to make 1 minion with a 6 frame animation.
i cant find any problems so can anyone help?
here`s the code:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace novahand.Projectiles.Minions
{
public class womandrake : MinionINFO
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("womandrake");
}
public override void SetDefaults()
{
projectile.netImportant = true;
projectile.width = 110;
projectile.height = 128;
Main.projFrames[projectile.type] = 3;
projectile.friendly = true;
Main.projPet[projectile.type] = true;
projectile.minion = true;
projectile.netImportant = true;
projectile.minionSlots = 1;
projectile.penetrate = 1;
projectile.timeLeft = 18000;
projectile.tileCollide = false;
projectile.ignoreWater = true;
ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
ProjectileID.Sets.Homing[projectile.type] = true;
inertia = 30f;
shoot = mod.ProjectileType("Womandrakeflower");
shootSpeed = 10f;
ProjectileID.Sets.LightPet[projectile.type] = true;
Main.projPet[projectile.type] = true;
}

public override void CheckActive()
{
Player player = Main.player[projectile.owner];
MyPlayer modPlayer = (MyPlayer)player.GetModPlayer(mod, "MyPlayer");
if (player.dead)
{
modPlayer.womandrake = false;
}
if (modPlayer.womandrake)
{
projectile.timeLeft = 2;
}
}

public override void CreateDust()
{
Lighting.AddLight((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f), 0.6f, 0.9f, 0.3f);
}

public override void SelectFrame()
{
projectile.frameCounter++;
if (projectile.frameCounter >= 8)
{
projectile.frameCounter = 0;
projectile.frame = (projectile.frame + 1) % 3;
}
}
}
}
in case if its the sprite that`s causing the problem, here`s the sprite:
womandrake.png

if there`s no solution, ill just remove some frames.
thanks in advance to anyone that helps.
 
hello, i made a custom minion but there`s a bit of a problem:View attachment 190546
as you can see, there are 2 minions with 3 frame animation.
but i intended to make 1 minion with a 6 frame animation.
i cant find any problems so can anyone help?
here`s the code:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace novahand.Projectiles.Minions
{
public class womandrake : MinionINFO
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("womandrake");
}
public override void SetDefaults()
{
projectile.netImportant = true;
projectile.width = 110;
projectile.height = 128;
Main.projFrames[projectile.type] = 3;
projectile.friendly = true;
Main.projPet[projectile.type] = true;
projectile.minion = true;
projectile.netImportant = true;
projectile.minionSlots = 1;
projectile.penetrate = 1;
projectile.timeLeft = 18000;
projectile.tileCollide = false;
projectile.ignoreWater = true;
ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
ProjectileID.Sets.Homing[projectile.type] = true;
inertia = 30f;
shoot = mod.ProjectileType("Womandrakeflower");
shootSpeed = 10f;
ProjectileID.Sets.LightPet[projectile.type] = true;
Main.projPet[projectile.type] = true;
}

public override void CheckActive()
{
Player player = Main.player[projectile.owner];
MyPlayer modPlayer = (MyPlayer)player.GetModPlayer(mod, "MyPlayer");
if (player.dead)
{
modPlayer.womandrake = false;
}
if (modPlayer.womandrake)
{
projectile.timeLeft = 2;
}
}

public override void CreateDust()
{
Lighting.AddLight((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f), 0.6f, 0.9f, 0.3f);
}

public override void SelectFrame()
{
projectile.frameCounter++;
if (projectile.frameCounter >= 8)
{
projectile.frameCounter = 0;
projectile.frame = (projectile.frame + 1) % 3;
}
}
}
}
in case if its the sprite that`s causing the problem, here`s the sprite:View attachment 190552
if there`s no solution, ill just remove some frames.
thanks in advance to anyone that helps.
You have Main.projFrames[projectile.type] = 3; but your image is clearly more than 3 frames of animation.
 
When I create a new world, terraria crashes and out of memory exception appears as normal windows prompt. I understand that, I have a lot of mods, but still it should be crashing on an exact mod, which requests more memory than available, can I see which mod? The reason why I am asking is because I want to see exact amount of mods which terraria can handle, but simple removing bunch of mods and checking if the problem exists is too time consuming because I there are too many mods to check and terraria loading time is huge
 
Hi, I have a problem that needs to be solver! :D
I am creating my own npc, but when i load game it doesn't have her head on minimap and i also cant move her to house, because the option isnt here!
+ If you could write me the sounds from woman npcs so i can give it to her xd
Code(the drop thing and buy thing are not completedxddd)
Code:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace tristanajanna.NPCs.TownNPC
{
    public class themermaid : ModNPC
    { 
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("The Mermaid");     
        }     
        public override void SetDefaults()
        {         
            npc.townNPC = true;
            npc.friendly = true;
            npc.width = 18;
            npc.height = 56;
            npc.aiStyle = 7;
            npc.damage = 25;
            npc.defense = 25;
            npc.lifeMax = 250;
            npc.HitSound = SoundID.NPCHit1;
            npc.DeathSound = SoundID.NPCDeath1;
            npc.knockBackResist = 0.5f;
            Main.npcFrameCount[npc.type] = 23;         
            animationType = NPCID.Stylist;
        }

        public override bool CanTownNPCSpawn(int numTownNPCs, int money) ///spawnuje se kdyz je vytvoren v inventari mod item Mermaid's Lost Pearl
        {
            for (int k = 0; k < 255; k++)
            {
                Player player = Main.player[k];
                if (player.active)
                {
                    for (int j = 0; j < player.inventory.Length; j++)
                    {
                        if (player.inventory[j].type == mod.ItemType("starfishamulet"))
                        {
                            return true;
                        }
                    }
                }
            }
            return false;
        }



        public override string TownNPCName()
        {                                        //NPC names
            switch (WorldGen.genRand.Next(11))
            {
                case 0:
                    return "Ariel";
                case 1:
                    return "Tetra";
                case 2:
                    return "Ava";
                case 3:
                    return "Khoii";
                case 4:
                    return "Coralia";
                case 5:
                    return "Watery";
                case 6:
                    return "Leaf";
                case 7:
                    return "Lorelei";
                case 8:
                    return "Melody"; 
                case 9:
                    return "Marina";             
                default:
                    return "Nami";
            }
        }




        public override string GetChat()
        {                                             //npc chat
       
            switch (Main.rand.Next(5))
            {
                case 0:
                    return "People and their air...";
                case 1:
                    return "I decide what the tide will bring!";
                case 2:
                    return "Swim at your own risk!";
                case 3:
                    return "Afraid to get your feet wet?";                 
                default:
                    return "Thanks a lot for bringing me my lost pearl!";
            }
        }

        public override void SetChatButtons(ref string button, ref string button2)
        {
            button = "Treasure Shop";
        }

        public override void OnChatButtonClicked(bool firstButton, ref bool shop)
        {
            if (firstButton)
            {
                shop = true;
            }
        }

        public override void SetupShop(Chest shop, ref int nextSlot)
        {
            shop.item[nextSlot].SetDefaults(mod.ItemType("starfishamulet")); //items that sells
            nextSlot++;
            shop.item[nextSlot].SetDefaults(mod.ItemType("starfishamulet"));
            nextSlot++;
            if (Main.hardMode == true) //Checks if the world is hardmode
            shop.item[nextSlot].SetDefaults(mod.ItemType("starfishamulet"));
            nextSlot++;
        }

        public override void NPCLoot()
        {
            Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("starfishamulet"));
        }

        public override bool UsesPartyHat()
        {
            return false;
        }     
    }
}
 
Hello I have no idea if this has been asked yet *though it probably has* but does anybody know when tModLoader will update to terraria version 1.3.5.3?
 
Back
Top Bottom