tModLoader Official tModLoader Help Thread

Discussion in 'Released' started by Jofairden, Jul 30, 2015.

  1. unrealmegashark

    unrealmegashark Terrarian

    how can i get the 1.3.5.3 version then? (i'm on mac btw)
     
  2. Zwip-Zwap Zapony

    Zwip-Zwap Zapony Terrarian

    Again, the only notable changes in version 1.3.5.3 are translation-related and/or rare. It's not worth the effort to updated tModLoader from 1.3.5.2 to 1.3.5.3. Therefore, there is no (official) version of tModLoader for 1.3.5.3.

    (Again, tModLoader for 1.3.5.2 is still "compatible" with 1.3.5.3; If you have a player and/or world made in one of those things, you can transfer it to/use it in the other thing just fine.)


    TL;DR: tModLoader is for 1.3.5.2. There is no tModLoader for 1.3.5.3. That doesn't matter at all, however.
     
  3. unrealmegashark

    unrealmegashark Terrarian

    ohhhhhhhhhhhhh ok. that's why. i asked for two reasons. 1. my friend tony wants to troll people in 1.3.5.3 servers, (which basically no matter what is impossible,) and 2. he thought tml cant reach 1.3.5.3
     
  4. Zwip-Zwap Zapony

    Zwip-Zwap Zapony Terrarian

    tModLoader clients can't join vanilla Terraria servers at all (regardless of the server's game version). (Vanilla Terraria clients also can't join tModLoader servers.)
     
  5. unrealmegashark

    unrealmegashark Terrarian

    i knew it all along!
     
  6. Sockmonkey367

    Sockmonkey367 Official Terrarian

    When making a world (mods or no mods), this happened


    Index was outside the bounds of the array.
    at Terraria.WorldGen.clearWorld()
    at Terraria.WorldGen.do_worldGenCallBack(Object threadContext)
    at Terraria.WorldGen.worldGenCallBack(Object threadContext)

    Got any way to fix it?

    EDIT: Rebooting Tmod worked. This is still odd.
     
  7. Ri0t

    Ri0t Terrarian

    PLEASE HELP

    I can not seem to figure out how to draw the player in front of the mount (im making a horse ride) and how do i make the mount play a sound when riding?
     
  8. Brockiosaurus

    Brockiosaurus Terrarian

    Hi.
    Don't know if i'm posting in the right place.
    I'm trying to make it so a projectile disappears when the player dies, but every time I summon the projectile it just does something weird. I don't know what it does, but it teleports the player back to spawn and doesn't spawn the projectile. Here's the code.

    using Terraria;
    using Terraria.ID;
    using Terraria.ModLoader;

    namespace TheStarboenMod.Projectiles
    {
    public class StarbornOrangeP : ModProjectile
    {
    public override void SetStaticDefaults()
    {
    DisplayName.SetDefault("English Display Name Here");
    }

    public override void SetDefaults()
    {
    projectile.arrow = true;
    projectile.width = 60;
    projectile.height = 60;
    projectile.aiStyle = 0;
    projectile.friendly = true;
    projectile.timeLeft = 3600;
    projectile.ranged = true;
    projectile.knockBack = 6000;
    projectile.penetrate = 100000;
    projectile.tileCollide = false;
    }

    public override void AI()
    {
    Player p = Main.player[projectile.owner];
    projectile.position.X = p.position.X - projectile.width / 3;
    projectile.position.Y = p.position.Y - projectile.height / 4;
    projectile.rotation += (float)projectile.direction * 0.1f;
    Lighting.AddLight(projectile.position, 5f, 0.25f, 2f);
    if (p.dead = true)
    {
    projectile.active = false;
    }
    else
    {
    projectile.active = true;
    }
    }
    public override void Kill(int timeLeft)
    {
    Main.PlaySound(SoundID.Item10, projectile.position);
    }
    }
    }

    the code is problematic in the if else statement. If anyone could help me it would be appreciated.
     
  9. Creeper da Snek

    Creeper da Snek Plantera

    This is the issue. Specifically, the "p.dead = true" part. You're trying to tell tModLoader to set p.dead to true rather than checking if it's true. There are a few ways to fix this. You could change "= true" to "== true", remove the "= true" part altogether, or replace the entire if/else statement with this:
    if (p.dead) ? projectile.active = false : projectile.active = true;

    Edit because I did some weird tabbing thing and accidentally posted before writing anything.
     
  10. whiteboardMarkers

    whiteboardMarkers Steampunker

    Thanks!
     
  11. Gemspark481

    Gemspark481 Terrarian

    How might i fix my gun so it is in my hand
    2099-302.png

    Here is my code:

    using Terraria.ID;
    using Terraria.ModLoader;

    namespace Gunmod.Items.Weapons
    {
    public class Rifle : ModItem
    {
    /*public override Vector2? HoldoutOffset()
    {
    return new Vector2(5, 5);
    }*/
    public override void SetStaticDefaults()
    {
    DisplayName.SetDefault("Scar");
    Tooltip.SetDefault("A large 2 handed rifle. 30 rounds..");
    }
    public override void SetDefaults()
    {
    item.damage = 15;
    item.ranged = true;
    item.width = 62;
    item.height = 24;
    item.useTime = 10;
    item.useAnimation = 10;
    item.useStyle = 5;
    item.noMelee = true;
    item.knockBack = 5;
    item.value = 100000;
    item.rare = 2;
    item.UseSound = SoundID.Item11;
    item.autoReuse = true;
    item.shoot = 8;
    item.shootSpeed = 14;
    item.useAmmo = AmmoID.Bullet;
    }

    public override void AddRecipes()
    {
    ModRecipe recipe = new ModRecipe(mod);
    recipe.AddIngredient(mod.ItemType("Gunpowder"), 1);
    recipe.AddIngredient(ItemID.IronBar, 25);
    recipe.anyIronBar = true;
    recipe.AddIngredient(ItemID.SilverBar, 5);
    recipe.AddIngredient(ItemID.HellstoneBar, 5);
    recipe.AddTile(TileID.Anvils);
    recipe.SetResult(this);
    recipe.AddRecipe();
    }
    }
    }

    Thanks :)

    P.S. fiddling with "
    /*public override Vector2? HoldoutOffset()
    {
    return new Vector2(5, 5);
    }*/" did nothing.
     
    Last edited: Jun 7, 2019
  12. parker.hamilton24

    parker.hamilton24 Terrarian

    Hey guys, I have a problem. When I open up a world in tModLoader, press ESC to open up the inventory, and move my cursor onto the inventory, the game crashes.
    Here is the message error:

    Capture.PNG

    Mods I have installed:
    The One Library
    Yet Another Boss Health Bar
    WorldGen Previewer
    What Ammo Does It Shoot?
    Colored Damage Types
    Enhanced Tooltip.

    This only happens when I have tModLoader installed. Can somebody help me, please?
     
  13. Karones

    Karones Steampunker

    I've been unable to enter or create any of my worlds after updating the mods and adding a new one. I currently have:

    Boss checklist
    Recipe Browser
    Calamity
    Cheat sheet
    Wing slot
    AlchemistNPC lite

    Mods were last updated in Feberuary and Alchemist lite was not in the list, I was able to play fine. Later I decided to add the Alchemist lite and went back to my regular world, once I saved and exited, I was unable to go back, it says "Load failed" and "backup not found". The worst part is that happens with any character in any world, even after disabling Alchemist lite(which was only used in one world before being disabled), now whenever I try to start a new world it gives the following error:

    Index was outside the bounds of the array.
    at Terraria.WorldGen.clearWorld()
    at Terraria.WorldGen.do_worldGenCallBack(Object threadContext)
    at Terraria.WorldGen.worldGenCallBack(Object threadContext)


    Edit: the problem seems weirder but not as complicated. From a fresh boot, loading any world(except my main one, the only one where the alchemist mod had been used) with any mods will work fine, but once I attempt to load my main one it will fail and cause any other world to fail to load as well, only solution being restarting the game. As it is, it seems like a corrupted save, it just seems weird that it affects other worlds when trying to load them.
     
    Last edited: Jun 12, 2019
  14. Mojo450

    Mojo450 Terrarian

    I have encountered a reoccurring bug. Sorry if somebody already said something about it.

    So whenever I launch terraria with tModloader, it always crashes when it tries to load a particular mod (Calamity Mod). The only way I have found to prevent this is to disable the mod before shutting down terraria. Is the crashing issue a problem with the mod, or tModloader? If the problem is with tModloader, is there anything I can do to stop terraria from crashing on launch, besides disabling the mod? I play on Mac, if this makes a difference.
     
  15. Kaunisenkeli

    Kaunisenkeli Terrarian

    How much RAM does your computer have? Calamity is a huge mod, and I had this exact problem loading it until I upgraded my computer's RAM. Just a possibility.
     
  16. Kaunisenkeli

    Kaunisenkeli Terrarian

    I'm having a bit of a problem building a new mod. Every time it gives me this error:
     
  17. Mojo450

    Mojo450 Terrarian

    I have 24 GB

    Specifically, It always crashes when it tries to load the font for the boss health bar
     
  18. michałpawłowski

    michałpawłowski Terrarian

    So i have a problem with tmodloader server steam friends like how do i do it ? i launch it and then how do i join it or if i do it, do i need to port forward? bc i cant port forward.
     
  19. Hikami

    Hikami Terrarian

    Can someone please help me, I am having troubles reinstalling tmodloader and I need help please
     
  20. JoshuaHalo

    JoshuaHalo Terrarian

    Need help.
    I have been trying to code a NPC, the NPC shows up and works as intended but the head dosen't show up on the map or in the NPC housing menu therefore making it so i cant assign it a house, if anyone knows it would be a great help.

    Here is the head image (placeholder until I can make one):
    upload_2019-6-14_15-51-20.png
    Here is the code:
    Code:
    using System;
    using System.Collections.Generic;
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Graphics;
    using Terraria;
    using Terraria.ID;
    using Terraria.Localization;
    using Terraria.ModLoader;[ATTACH=full]222813[/ATTACH] [ATTACH=full]222813[/ATTACH] [ATTACH=full]222813[/ATTACH] [ATTACH=full]222813[/ATTACH]
    
    namespace Enraged.NPCs
    {
        [AutoloadHead]
        public class Ranger : ModNPC
        {
            public override string Texture
            {
                get
                {
                    return "Enraged/NPCs/Ranger";
                }
            }
            public override bool Autoload(ref string name)
            {
                name = "Ranger"; return mod.Properties.Autoload;
            }
            public override void SetDefaults()
            {
                npc.townNPC = true;
                npc.friendly = true;
                npc.width = 18;
                npc.height = 46;
                npc.aiStyle = 7;
                npc.damage = 10;
                npc.defense = 15;
                npc.lifeMax = 250;
                npc.HitSound = SoundID.NPCHit1;
                npc.DeathSound = SoundID.NPCDeath1;
                npc.knockBackResist = 0.5f;
                Main.npcFrameCount[npc.type] = 16;
                animationType = NPCID.Guide;
            }
            public override bool CanTownNPCSpawn(int numTownNPCs, int money)
            {
              
                return false;// this make that he will spawn when a house is available
            }
            public override bool CheckConditions(int left, int right, int top, int bottom)    //Allows you to define special conditions required for this town NPC's house
            {
                return true;  //so when a house is available the npc will  spawn
            }
    
    
            public override string TownNPCName()
            {                                       //NPC names
                switch (WorldGen.genRand.Next(4))
                {
                    case 0:
                        return "Clent";
                    case 1:
                        return "Hunter";
                    case 2:
                        return "Kevin";
                    default:
                        return "Tom";
                }
            }
    
    
    
    
            public override string GetChat()
            {                                           //npc chat
    
                switch (Main.rand.Next(3))
                {
                    case 0:
                        return "What do you want?";
                    case 1:
                        return "Are ya gonna buy something?";
                    default:
                        return "Up for a challange?";
                }
            }
    
            public override void SetChatButtons(ref string button, ref string button2)
            {
                button = "Buy Summons";
            }
    
            public override void OnChatButtonClicked(bool firstButton, ref bool shop)
            {
                if (firstButton)
                {
                    shop = true;
                }
            }
            public override void SetupShop(Chest shop, ref int nextSlot)       //Allows you to add items to this town NPC's shop. Add an item by setting the defaults of shop.item[nextSlot] then incrementing nextSlot.
            {
                if (NPC.downedSlimeKing)   //this make so when the king slime is killed the town npc will sell this
                {
                    shop.item[nextSlot].SetDefaults(ItemID.SlimeCrown); 
                    nextSlot++;
                }
            }
        }
    }