Standalone [1.3] tModLoader - A Modding API

Hi, I'm having a technical issue when playing with tModLoader 0.9.1 installed - every time that a menu or other type of UI is up on the screen (such as the Item/NPC browsers from the Cheat Sheet mod) Terraria's FPS drops to 15-20 from 45 and the game becomes incredibly laggy. The lag goes away once the menus/UI are closed and not being drawn on the screen anymore.

I can confirm that it works fine on my laptop; my desktop is the one with this issue. Desktop specs: Core i5 processor, 16 GB RAM, and Radeon 6900 2 GB video card.

Does anyone have any idea as to why this issue is occurring? Further testing showed that its caused by rendering any sort of menu on the screen; if I press F11 to turn off all UI elements, my FPS skyrockets back to 60, but turning them back on drops FPS to 15-20 again. I can confirm that this is not an issue with vanilla Terraria as I can play that without any lag or other issues. I've already uninstalled and reinstalled .NET Framework 4.5.2, XNA Framework 4.0 and my video card driver, to no avail. I need help with this as I cannot figure out why it only happens with tModLoader's Terraria.exe file.
 
Well, I need help again. Edit: It has been solved.
 

Attachments

  • client-crashlog.txt
    2.9 KB · Views: 567
Last edited:
I found a Major glitch. I made a new Expert Character, but when the Goblin Army came, I noticed that the progress bar was staying at 0. The Old One's army didn't even spawn.
 
I've got a bug where I can't place modded helmets on armor stands or modded weapons in weapon racks. Whenever I place an item, there's a texture glitch and when I try to mine it to get the item back, the item is destroyed. Please halp please
 
How do I get a projectile to stay still? When I shoot it it moves down.
Here is the projectile's code:
Code:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace EpicnessModRemastered.Projectiles
{
    public class PoisonRing : ModProjectile
    {
        public override void SetDefaults()
        {
            projectile.name = "Poison Ring";
            projectile.width = 57;
            projectile.height = 50;
            projectile.friendly = true;
            projectile.hostile = false;
            projectile.ranged = false;
            projectile.melee = false;
            projectile.magic = true;
            projectile.penetrate = -1;
            projectile.timeLeft = 600;
            projectile.light = 0.5f;
            projectile.tileCollide = false;
        }
    }
}
 
How do I get a projectile to stay still? When I shoot it it moves down.
Here is the projectile's code:
Code:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace EpicnessModRemastered.Projectiles
{
    public class PoisonRing : ModProjectile
    {
        public override void SetDefaults()
        {
            projectile.name = "Poison Ring";
            projectile.width = 57;
            projectile.height = 50;
            projectile.friendly = true;
            projectile.hostile = false;
            projectile.ranged = false;
            projectile.melee = false;
            projectile.magic = true;
            projectile.penetrate = -1;
            projectile.timeLeft = 600;
            projectile.light = 0.5f;
            projectile.tileCollide = false;
        }
    }
}
You can always override an AI method and set the velocity to zero manually:
Code:
public override bool PreAI()
{
    projectile.velocity = Vector2.Zero;
    return false;
}
 
I have a problem. I have the code for a weapon all set and ready. But it doesn't want to compile.

Here is the code:

Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace PupusyaviysMod.Items.Weapons
{
    public class DirtSword : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Dirt Sword";     
            item.damage = 1;    
            item.melee = true;   
            item.width = 40; 
            item.height = 40;    
            item.toolTip = "It's a dirt sword, what do you think?";    
            item.useTime = 70;   
            item.useAnimation = 70; 
            item.useStyle = 1; ,
            item.knockBack = 2; 
            item.value = 1;
            item.rare = 1; 
            item.UseSound = SoundID.Item1; 
            item.autoReuse = true;
        }

        public override void AddRecipes()
        {
            ModRecipie recipe = new ModRecipie(mod);
            recipe.AddIngredient(ItemID.DirtBlock, 10);
            recipe.AddTiles(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipie();
        }

    }
}

And this is what I get:

Code:
Terraria\ModLoader\Mod Sources\PupusyaviysMod\Items\Weapons\DirtSword.cs(30,4) : error CS0246: The type or namespace name 'ModRecipie' could not be found (are you missing a using directive or an assembly reference?)

Terraria\ModLoader\Mod Sources\PupusyaviysMod\Items\Weapons\DirtSword.cs(30,28) : error CS0246: The type or namespace name 'ModRecipie' could not be found (are you missing a using directive or an assembly reference?)

What is the problem with the recipe assignment?
 
I have a question. is there a way to remove a specific mod from tmod without logging in terraria on mac.Or is there a way to access the mod folder on mac?
 
Can we get 64 bit version too? :D I want it because it tells me about 120 times that it has no memory while I am loading mods and I have 16GB RAM, so 32 bit sucks.
 
Is it possible to change the mods folder? There doesn't seem to be a way to change the default directory. I want to install mods but it defaults to my C:\ drive and I don't want it there
 
Hey there.
I've been using Tmodloader as a player for quite a long time, and I would like to start an adventure with a bunch of friends on the game.
We would like to multiply the base amount of hp for every single mob in the game by 2.5 (e. 500 hp instead of 200), and their base damage by 1.2 (even the modded ones, if possible).
The problem is that ... Well. I've already tried to do some things using Tmodloader, but nothing more than copy/pasting lines of code without understanding what I was doing ...
I know this is possible, and that's why I'm there asking for some help.
Thanks for considering my problem, I hope someone will be able, and will take the time to help me ^.^
(also, I'm sorry if this is the wrong place to post that kind of messages, I don't really know where to do it ...)
 
Can we get 64 bit version too? :D I want it because it tells me about 120 times that it has no memory while I am loading mods and I have 16GB RAM, so 32 bit sucks.
Not possible due to xna, sorry.

how do you update tmodloader mines stuck in 9.0.3
You just download and install the latest.

Is it possible to change the mods folder? There doesn't seem to be a way to change the default directory. I want to install mods but it defaults to my C:\ drive and I don't want it there
Vanilla terraria has a -savedirectory switch, the mod directory is derived from that.

Hey there.
I've been using Tmodloader as a player for quite a long time, and I would like to start an adventure with a bunch of friends on the game.
We would like to multiply the base amount of hp for every single mob in the game by 2.5 (e. 500 hp instead of 200), and their base damage by 1.2 (even the modded ones, if possible).
The problem is that ... Well. I've already tried to do some things using Tmodloader, but nothing more than copy/pasting lines of code without understanding what I was doing ...
I know this is possible, and that's why I'm there asking for some help.
Thanks for considering my problem, I hope someone will be able, and will take the time to help me ^.^
(also, I'm sorry if this is the wrong place to post that kind of messages, I don't really know where to do it ...)
This might be useful: https://forums.terraria.org/index.php?threads/stats-config.48588/
 
Back
Top Bottom