Standalone [1.3] tModLoader - A Modding API

should be fine to upload as long as it doesnt interfere with other mods and doesn't damage the client in anyway such as malicious code intent on damaging or destroying peoples worlds or what not.
Well, actually the thing is mods can interfere with each other when using Harmony. It does have a priority system, but if patches are applied in the wrong order, things can go wrong. Of course it's not an issue right now, as there are no other mods that use Harmony...
 
Well, actually the thing is mods can interfere with each other when using Harmony. It does have a priority system, but if patches are applied in the wrong order, things can go wrong. Of course it's not an issue right now, as there are no other mods that use Harmony...
Well i dont see a reason for anyone to be implementing harmony in their mods unless they are doing something with the games runtime so i highly doubt people would run into the issue.
 
Hi
I have a question.
I want to save an array of Tiles(the Tiles are not placed in the world) in my ModWorld class.
But I always get an Error when I try to load beacause apperantly the TagCompound can't save Tiles.
Does anyone have an idea how I could save Tiles?
 
Hi
I have a question.
I want to save an array of Tiles(the Tiles are not placed in the world) in my ModWorld class.
But I always get an Error when I try to load beacause apperantly the TagCompound can't save Tiles.
Does anyone have an idea how I could save Tiles?
I'd say the simplest way to do it would be to just shove all the data from the tile manually into a TagCompound. If you look at the constructor for Tile, you'll see there isn't much of it. Type, wall type, liquid, frameX, frameY and 4 "headers". All of these are just numeric types.
 
I have a question about one of the Mod Browser rules.

I've made a mod (MechScope), that uses a library called Harmony, to modify game code during run-time. It works kinda like detouring in unmanaged code, but it can actually interoperate with other instances of itself, allowing multiple mods to patch the same methods. As far as I know, there haven't been any terraria mods that use this sort of thing yet.
So, would it be OK to upload this mod to the Mod Browser?
Should be fine but there is no official support. If things go wrong you're on your own.
you could use a patcher such as NTCore's 4gb patcher. Just direct it to your tmodloader exe file
tModLoader is already patched. Out of memory means you need to drop mods, and some of them are probably poorly optimized.
 
  • Like
Reactions: 000
Is it possible for a tModLoader mod to make everything in-game (such as chat usernames, NPCs mentioning you, death notices, et cetera) think that a player's name is something specific, while the name saved into the player save file is something different/unchanged?

As a specific example, would it be possible to make a tModLoader mod which makes it so that I can make a character called something like "July 2018", who then shows up as "July 2018" on the character selection, but once I pick that character, everything in-game would call me "Zappy", and then when I save and go to the character selection again, it's still "July 2018" on the character selection?

I have tried making a simple mod where, upon typing "/name" into the chat, caller.Player.name is set to "Test". At first glance, it appears to work... but when I return to the character selection, it's named "Test" there as well, rather than the original name.

I'm not asking for someone to make this for me, I'm just asking if it's even possible in the first place. (Preferably as a client-only mod, too, where the modded in-game name is also sent to servers, though I don't know if that's possible.)
 
Hi guys, I'm having a little trouble with starting up the game with tmodloader installed with my new setup. After it adjusts my display's resolution to very low (like 800x600 or something), it starts freaking out and alternating b/w static and pink screens erratically. I can't alt-tab, alt-f4, use the control panel, etc. The only solution is restarting my pc. No other games I have do this, including unmodded terraria. Now, my guess for why this happens is that I use a projector instead of a monitor, and tmodloader doesn't know how to handle that (Back when I used a monitor, tmodloader would run just fine). Does anyone know how I can fix this or disable something with tmodloader that handles game resolution or something? Help would be much appreciated.
 
i spent 3days to find a code which can make my weapon got a real 100% armor penetration,but clearly now tml dont have it..so are u ever want to add one?
 
I am trying to make something that acts like the lava charm, but the lava time doesn't go down. Can anyone help me?
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace NalonMod.Items
{
    public class HeatShield : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Heat Shield");
            Tooltip.SetDefault("2 defence\n14 seconds immunity to lava\nImmunity to fire blocks and On Fire!");
        }
        public override void SetDefaults()
        {
            item.width = 28;
            item.height = 32;
            item.value = 10000;
            item.rare = 3;
            item.accessory = true;
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.ObsidianSkull);
            recipe.AddIngredient(ItemID.ObsidianRose);
            recipe.AddIngredient(ItemID.LavaCharm);
            recipe.AddIngredient(ItemID.HellstoneBar, 20);
            recipe.AddTile(TileID.TinkerersWorkbench);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.noKnockback = true;
            player.lavaTime = 14;
            player.statDefense += 4;
            player.buffImmune[BuffID.Burning] = true;
            player.buffImmune[BuffID.OnFire] = true;
        }
    }
}
 
I am trying to make something that acts like the lava charm, but the lava time doesn't go down. Can anyone help me?
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace NalonMod.Items
{
    public class HeatShield : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Heat Shield");
            Tooltip.SetDefault("2 defence\n14 seconds immunity to lava\nImmunity to fire blocks and On Fire!");
        }
        public override void SetDefaults()
        {
            item.width = 28;
            item.height = 32;
            item.value = 10000;
            item.rare = 3;
            item.accessory = true;
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.ObsidianSkull);
            recipe.AddIngredient(ItemID.ObsidianRose);
            recipe.AddIngredient(ItemID.LavaCharm);
            recipe.AddIngredient(ItemID.HellstoneBar, 20);
            recipe.AddTile(TileID.TinkerersWorkbench);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.noKnockback = true;
            player.lavaTime = 14;
            player.statDefense += 4;
            player.buffImmune[BuffID.Burning] = true;
            player.buffImmune[BuffID.OnFire] = true;
        }
    }
}
looks like you didn't actually look at the lava charm code. All lava charm has is player.lavaMax += 420;
 
ok... i have this weird problem, the scenario is multiplayer... the mods are greal, thorium, split mod, spirit mod, helpful npcs, alchemist npc, ore seeds, simple auto chests, extra gunslinger gear, insigt reborn, magic storage, boss health bar, what mod is this from and recipy browser, whenever someone dies and someone tries to click on an item in their inventories, it gets deleted instead of being able to grab and drag, we tried black boxing the thing to test if it was a specific, mod, no use, but then we created a new character, it didnt happen, but when we got out "old character" gear and maxed out on health and mana, it happened again... very weird issue....
 
ok... i have this weird problem, the scenario is multiplayer... the mods are greal, thorium, split mod, spirit mod, helpful npcs, alchemist npc, ore seeds, simple auto chests, extra gunslinger gear, insigt reborn, magic storage, boss health bar, what mod is this from and recipy browser, whenever someone dies and someone tries to click on an item in their inventories, it gets deleted instead of being able to grab and drag, we tried black boxing the thing to test if it was a specific, mod, no use, but then we created a new character, it didnt happen, but when we got out "old character" gear and maxed out on health and mana, it happened again... very weird issue....
Can you narrow it down to 1 or 2 mods by disabling mods? That would help
 
Thanks. Do you know what the rocket time of frostspark boots is, and how to make the accessory show frostspark boot particles instead of rocket boot particles?
 
Can you narrow it down to 1 or 2 mods by disabling mods? That would help
i mean, i tried disabling 1 by one, but it seems like its a sum of character and mods because i created a new character with all mods, nothing happened, but afterwards(not sure what triggered it) it started happening again, and it is a multiplayer only bug
 
Thanks. Do you know what the rocket time of frostspark boots is, and how to make the accessory show frostspark boot particles instead of rocket boot particles?
You can learn how to search the source code here: https://github.com/blushiemagic/tModLoader/wiki/Advanced-Vanilla-Code-Adaption
[doublepost=1531183757,1531183658][/doublepost]
i mean, i tried disabling 1 by one, but it seems like its a sum of character and mods because i created a new character with all mods, nothing happened, but afterwards(not sure what triggered it) it started happening again, and it is a multiplayer only bug
Well, then make a backup of your character and then keep testing with that character. If you can narrow it down at all, the character files and mod list can help me figure it out. It would be good to figure out since I've seen this complaint several times lately.
 
How do I get my shield texture on my character? my item sprite is named HeatShield and my on-character sprite is called HeatShield_Shield. I keep getting this error:
c:\Users\Kieran Nolan\Documents\My Games\Terraria\ModLoader\Mod Sources\NalonMod\Items\Accessories\HeatShield.cs(9,76) : error CS0246: The type or namespace name 'IList' could not be found (are you missing a using directive or an assembly reference?)
Here is my coding:
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace NalonMod.Items
{
    public class HeatShield : ModItem
    {
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips) // <-- The error is here
        {
            equips.Add(EquipType.Shield);
            return true;
        }
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Heat Shield");
            Tooltip.SetDefault("2 defence\n14 seconds immunity to lava and decreased damage from touching lava\nImmunity to fire blocks and On Fire!");
        }
        public override void SetDefaults()
        {
            item.width = 28;
            item.height = 32;
            item.value = 10000;
            item.rare = 3;
            item.accessory = true;
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.ObsidianSkull);
            recipe.AddIngredient(ItemID.ObsidianRose);
            recipe.AddIngredient(ItemID.LavaCharm);
            recipe.AddIngredient(ItemID.HellstoneBar, 20);
            recipe.AddTile(TileID.TinkerersWorkbench);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.lavaMax = 840;
            player.lavaRose = true;
            player.statDefense += 2;
            player.buffImmune[BuffID.Burning] = true;
            player.buffImmune[BuffID.OnFire] = true;
        }
    }
}
 
Last edited:
grealm, thorium, split mod, spirit mod, helpful npcs, alchemist npc, ore seeds, simple auto chests, extra gunslinger gear, insigt reborn, magic storage, boss health bar, what mod is this from and recipe browser
i get this in multiplayer during old ones army, mods are the ones listed above, teleporting goblins, and in later stages, server freezes, we all time out.
 

Attachments

  • g.PNG
    g.PNG
    54 KB · Views: 287
Back
Top Bottom