Standalone [1.3] tModLoader - A Modding API

Is there any possible way to have the mods saved in a different drive. I have a 95GB SSD C: drive thats only has 5 GB empty on average without terraria installed in the first place. after installing terraria with tmodloader and all the mods I plan to use I now have 2.33GB left.
 
wait... that terraria.exe.BACKUP is the terraria launcher or the terraria 1.3.5.3 launcher?
and i use C: that does interfer?
EDIT1: dont worked. sadly.

If you have everything on your C: drive this should work, assuming everything else is default and, as I noted above you have the default terrarria.exe (yes, the normal 1.3.5.3 version) backed up as "Terraria.exe.BACKUP" and the tModloader version as "Terraria.exe.tMODLOADER":


Code:
copy "C:\Program Files (x86)\Steam\steamapps\common\Terraria\Terraria.exe.BACKUP" "C:\Program Files (x86)\Steam\steamapps\common\Terraria\Terraria.exe"
start /d "C:\Program Files (x86)\Steam\steamapps\common\Terraria\" Terraria.exe

Code:
copy "C:\Program Files (x86)\Steam\steamapps\common\Terraria\Terraria.exe.tMODLOADER" "C:\Program Files (x86)\Steam\steamapps\common\Terraria\Terraria.exe"
start /d "C:\Program Files (x86)\Steam\steamapps\common\Terraria\" "D:\Program Files (x86)\Steam\steamapps\common\Terraria\Terraria.exe"

Make a new text file for each of the above two code snippets and past the appropriate code into each. Finally, make sure to change the file extension for the two text files from .txt to .bat (this is what actully makes them executable).
 
I know this has probably been asked before, but is there any way to alter the spread of corruption/crimson/hallow, and/or the "spirits of light and dark" release upon Wall of Flesh kill?

Note: my exploration of the net led me to find that the Tshock 3rd party client can negate the spread (so its obviously possible), but i havent found anything about the Hardcore strip gen, and i dotn know if Tshock is compatible with Tmodloader.

as an aside, im looking into trying to rebuild Story Of Red Cloud (i have an updated map from someone else who seems to have fallen off the face of the earth several years ago)

EDIT: further questions!

whats the formatting, and where, for altering VANILLA block mining level? (idea: skip the anti-block-breaker code from original SoRC, just make terrain unminable and replace "breakable" walls with other, unmodified terrain blocks)

is there any way to block the overhead graphic and Drop-On-Death of the Large Gems? (basically key doors, to spice it up from just switch doors)
 
Last edited:
Hello, I have recently been having an issue with playing multiplayer with my buddy. After a few minutes maybe 3-4, I disconnect with the message "Lost Connection". I am positive we are using the same mods and allowed Terraria through any firewall. The mods we are using are Thorium, More Fair Soul Drops, Builder's Toolbox, WingSlot, and Cheat Sheet. When I host, he gets the same problem I have when he hosts. We both are itching to play together but can't. If anybody knows a fix, please let me know. Thanks.
 
Also how do i update my mod???
I made some weapons. But my sword is so big i tried to save it and opening Terraria.
It didnt work! Tell me how do i do that?
 
I know this has probably been asked before, but is there any way to alter the spread of corruption/crimson/hallow, and/or the "spirits of light and dark" release upon Wall of Flesh kill?...

Hmm, you can use TerraCustom to generate a world that starts in hardmode and disable the "V" from generating during world creation. Though, I'm not sure if the "V" would later be triggered when you kill the Wall of Flesh for the first time in such a world, but it may be worth trying.

Another suggestion would be to use the hellevator generator item in the mod luiafk, so you can easily box out any Corruption/Crimson/Hallow areas.

Alternately (though possibly tediously so), you could use TEdit to manually edit your world to box in any Corruption/Crimson/Hallow, or even remove them completely, though depending how you do it, this could be rather time consuming.

I also wanted to point out one other thing (no mods needed), in case you didn't know it already (though it may not be exactly the kind of info you're looking for): killing Plantera, in hardmode, significantly slows down the spread of Corruption/Crimson/Hallow.
 
Last edited:
Hmm, you can use TerraCustom to generate a world that starts in hardmode and disable the "V" from generating during world creation. Though, I'm not sure if the "V" would later be triggered when you kill the Wall of Flesh for the first time in such a world, but it may be worth trying.

Another suggestion would be to use the hellevator generator item in the mod luiafk, so you can easily box out any Corruption/Crimson/Hallow areas.

Alternately (though possibly tediously so), you could use TEdit to manually edit your world to box in any Corruption/Crimson/Hallow, or even remove them completely, though depending how you do it, this could be rather time consuming.

I also wanted to point out one other thing (no mods needed), in case you didn't know it already (though it may not be exactly the kind of info you're looking for): killing Plantera, in hardmode, significantly slows down the spread of Corruption/Crimson/Hallow.

All of this information would be excellent if i was asking about a vanilla world. unfortunately, im asking for the sake of a modded adventure map that REALLY doesnt want the V of Death to :red: it up, so pretty much all those methods wont work. and starting in hardmode is a no-can-do, cuz adventure map. look up Story Of Red Cloud.
 
All of this information would be excellent if i was asking about a vanilla world. unfortunately, im asking for the sake of a modded adventure map that REALLY doesnt want the V of Death to :red: it up, so pretty much all those methods wont work. and starting in hardmode is a no-can-do, cuz adventure map. look up Story Of Red Cloud.
Oh, you can just delete the appropriate passes in ModifyHardModeTasks http://blushiemagic.github.io/tModL..._world.html#ad81d5304809613f8b2aa6755268ee2c8
 
Oh, you can just delete the appropriate passes in ModifyHardModeTasks http://blushiemagic.github.io/tModL..._world.html#ad81d5304809613f8b2aa6755268ee2c8

Awesome! that makes things much easier, though the Spread issue is still annoying. Actually manageable now tho, i can "trick" the system here lol.
now i just need to find a coder willing to work with me that can make sense of all this old tconfig .cs data for things like the mod AI scripts, SHM, and a few other quirks.
 
I hate to ask question normally, but I have no choice for this. So is it possible to declare npc like this so I can access the custom method inside, rn everything I tried crash the game.
Code:
private Eye_of_Apocalypse_clone[] clone = new Eye_of_Apocalypse_clone[3];
        public void initClone() {
            Player p = GetPlayer(npc);
            getClone()[0] = new Eye_of_Apocalypse_clone("left", NPC.NewNPC((int)p.Center.X, (int)p.Center.Y, mod.NPCType("Eye_of_Apocalypse_clone")));
            getClone()[1] = new Eye_of_Apocalypse_clone("right", NPC.NewNPC((int)p.Center.X, (int)p.Center.Y, mod.NPCType("Eye_of_Apocalypse_clone")));
            getClone()[2] = new Eye_of_Apocalypse_clone("bottom", NPC.NewNPC((int)p.Center.X, (int)p.Center.Y, mod.NPCType("Eye_of_Apocalypse_clone")));
        }

Silently Caught Exception: Object reference not set to an instance of an object. at TerrariaUltraApocalypse.NPCs.EoA.Eye_of_Apocalypse_clone..ctor(String pos, Int32 thisnpcID) in d:\Documents\My Games\Terraria\ModLoader\Mod Sources\TerrariaUltraApocalypse\NPCs\EoA\Eye_of_Apocalypse_clone.cs:line 23 at Terraria.ModLoader.ModCompile.<>c.<ActivateExceptionReporting>b__15_0(Object sender, FirstChanceExceptionEventArgs exceptionArgs)
at TerrariaUltraApocalypse.NPCs.EoA.Eye_of_Apocalypse_clone..ctor(String pos, Int32 thisnpcID) in d:\Documents\My Games\Terraria\ModLoader\Mod Sources\TerrariaUltraApocalypse\NPCs\EoA\Eye_of_Apocalypse_clone.cs:line 23
at TerrariaUltraApocalypse.NPCs.EoA.Eye_of_Apocalypse.initClone() in d:\Documents\My Games\Terraria\ModLoader\Mod Sources\TerrariaUltraApocalypse\NPCs\EoA\Eye_of_Apocalypse.cs:line 53
at TerrariaUltraApocalypse.NPCs.EoA.Eye_of_Apocalypse.AI() in d:\Documents\My Games\Terraria\ModLoader\Mod Sources\TerrariaUltraApocalypse\NPCs\EoA\Eye_of_Apocalypse.cs:line 125
at Terraria.ModLoader.NPCLoader.AI(NPC npc)
at Terraria.ModLoader.NPCLoader.NPCAI(NPC npc)
at Terraria.NPC.UpdateNPC(Int32 i)
at Terraria.Main.DoUpdate(GameTime gameTime)
at Terraria.Main.Update(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs)
at Terraria.WindowsLaunch.Main(String[] args)
[/code]
 
sometimes when when i open terraria(with tmodloader), it goes to default(like controls and fullscreen) and when i go into my world, it deletes every modded block and every modded item in chests. im pretty sure this couldn't be a mod problem.
 
Last edited:
I suggest adding a little game like maybe Pong (Terraria-style) to the screen while mods are loading, so someone that has lots of mods that load for like half an hour, can play a game and not be bored.
 
Hello

trying to experiment with an accessory.... would like to increase defaultitemgrabrange, tilerangex and tilerangey when equipped.

here is my code:
Code:
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.GameContent;
using Terraria.GameContent.Achievements;
using Terraria.GameContent.Events;
using Terraria.GameContent.Tile_Entities;
using Terraria.GameContent.UI;
using Terraria.GameInput;
using Terraria.IO;
using Terraria.Localization;
using Terraria.ObjectData;
using Terraria.Social;
using Terraria.UI;
using Terraria.UI.Chat;
using Terraria.UI.Gamepad;
using Terraria.Utilities;
using Terraria.World.Generation;

namespace Soopertoolbelt.Items
{
    public class Soopertoolbelt : ModItem
    {
        public static int tileRangeX = 200;
        public static int tileRangeY = 200;
        public static int defaultItemGrabRange = 400;
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Soopertoolbelt");
            Tooltip.SetDefault("This is a modded accessory.");
        }

        public override void SetDefaults()
        {
            item.width = 20;
            item.height = 20;
            item.maxStack = 1;
            item.value = 100;
            item.rare = 1;
            item.accessory = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock, 10);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }

        public override void UpdateAccessory(Player player, bool hideVisual) //Where it says "player" is the variable used to represent "player". In this case, every p stands for player. This is called when the accessory is on.
        {
            player.meleeSpeed += 20f;
            player.pickSpeed += 20f;
            player.wallSpeed += 20f;
            player.tileSpeed += 20f;
            player.defaultItemGrabRange += 400;
            player.tileRangeX += 200;
            player.tileRangeY += 200;
        }
    }
}

i get a cs 0137 error -
 
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace QweronMod.Items
{
public class OrbOfSubzero : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("");
}

public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.maxStack = 10;
item.useTime = 30;
item.useAnimation = 30;
item.useStyle = 4;
item.value = 30;
item.rare = 2;
item.consumable = true;
}

public override bool CanUseItem(Player player)
{
return !NPC.AnyNPCs(mod.NPCType("SubzeroEye"));
return !Main.dayTime;
}
public override bool UseItem(Player player)
{
NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("SubzeroEye"));
Main.PlaySound(15, (int)player.position.X, (int)player.position.Y, 0);

return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IceBlock, 100);
recipe.AddIngredient(ItemID.SuspiciousLookingEye, 1);
recipe.AddIngredient(ItemID.Sapphire, 25);
recipe.AddTile(TileID.DemonAltars);
recipe.SetResult(this);
recipe.AddRecipe();
}



I TRIED TO LOAD MY SUMMON BOSS ITEM. IT DIDNT WORK IT SAID THIS
error CS1513: } expected

SOMEONE PLEASE HELP ME
 
I've spent the last day and a half trying to do this. I've looked at examplemods, tutorials, even the source code itself. I just want to at half health (5000 hp), have my boss change sprites. I know it's something simple or my code has one thing off, so if anyone can, please help me.

Here's the code that i've been using:

//Boss second stage texture
public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor)
{
if (npc.life <= 5000)
{
spriteBatch.Draw(mod.GetTexture("NPCs/Boss/BigBoy2"), npc.Center, null, Color.Red * (255f / 255f), 0f, new Vector2(100, 100), 3f, SpriteEffects.None, 0f);
}
return true;
}


I should also mention i'm new to this so ;p
 
Last edited:
Hello guys
What can i do with this error? I dont understand what should i do to play. Thanks for reply!
 

Attachments

  • Some error.JPG
    Some error.JPG
    172.1 KB · Views: 293
Hello guys
What can i do with this error? I dont understand what should i do to play. Thanks for reply!
Two things:
- You do not need to run the installer after you drop the files off into your Terraria folder. I don't think it would have worked anyways because your game files are on an E: drive.
- The files were placed in the /Terraria/Content/ folder, they should have gone into the main /Terraria/ folder.

Hopefully this gif clears up what you need to do (gif courtesy of jopojelly).
 
jopojelly
What's the point about E drive? all Games on my computer installed on this drive and even steam games
I do the same things, which your gif's showed(but thanks for it)
[doublepost=1525636973,1525636752][/doublepost]
Hopefully this gif clears up what you need to do (gif courtesy of jopojelly).
oh i got this. Thanks man, i understood my mistakes. Good luck!
 
  • Like
Reactions: 000
v0.10.1.4
-Patreon Supporter Vanity Sets added. Thanks so much to our Golem level Patrons.
-Fix NPC Shop prices
-Added Update All Button to Mod Browser
-Many more informative error messages
-Fixed ModPacks having deleted mods
-Fixed some rare errors
-Fixed some ModItem/GlobalItem data loss bugs
-ModItem/GlobalItem/ModPlayer.OnConsumeAmmo
-ExampleMod
--ExampleWorm now fully functional
--CanEquipAccessory example
--Fixes
-Updated Translations
--French
--Chinese
 
Back
Top Bottom