Standalone [1.3] tModLoader - A Modding API

I have a question... Is it possible to make something like Moon Lord? (I mean, like a human boss with core, arms and head)
 
If he obtained Terraria another way, besides through Steam or GOG, it's a pirated copy and he'll receive no support here on the official Terraria forums.

And also not on Discord, let's have that be clear. ;P

...call me mean, but I was aware of that, and also that directly saying it would simply induce someone to fib about how they obtained the software.
[doublepost=1500410786,1500410751][/doublepost]
I have a question... Is it possible to make something like Moon Lord? (I mean, like a human boss with core, arms and head)

Yes. Do you have a more specific question?
 
Hey guys I'm from germany and I have a question!
I get everytime this error text since I downloaded tmodloader:
A error occurred while loading Modloader

This mod has automatically been disabled.

Field not found:"Terraria.Item.toolTip".
by Bismuth.Items.Global_Items.FossilGreaves.SetDefaults(Item item)
by Terraria.ModLoader.ItemLoader.SetDefaults(Item item, Boolean createModitem)
by Terraria.Modloader.Mod.SetupContent()
by Terraria.Modloader.Modloader.do_Load(Object threadContext)

I understand what this is meaning BUT how do I fix this! :(:(`:(:red2::pumpking:
 
Hey guys I'm from germany and I have a question!
I get everytime this error text since I downloaded tmodloader:
A error occurred while loading Modloader

This mod has automatically been disabled.

Field not found:"Terraria.Item.toolTip".
by Bismuth.Items.Global_Items.FossilGreaves.SetDefaults(Item item)
by Terraria.ModLoader.ItemLoader.SetDefaults(Item item, Boolean createModitem)
by Terraria.Modloader.Mod.SetupContent()
by Terraria.Modloader.Modloader.do_Load(Object threadContext)

I understand what this is meaning BUT how do I fix this! :(:(`:(:red2::pumpking:

The author of the mod "Bismuth" needs to fix it. If the mod is open source, you could potentially figure out and fix the bug yourself, but ... starting by reporting it to them would be a good start. :)
 
No matter how many times I attempt to start from scratch, I get this error when I attempt to run the installer. Any fix?
tmodloader 1.PNG

All of those files seem to be present
 
When I put player.maxSentries+=3; in public override void UpdateEquip(Player player) it gives error.
What hook for equip items or buffs increases the max number of sentries?
 
Last edited:
So I'm trying to compile a mod I've made. It's supposed to be a bullet that does no damage, but heals the player and inflicts quite a few debuffs. Every time I try to compile it, I get this:

c:\Users\[CLASSIFIED]\Documents\My Games\Terraria\ModLoader\Mod Sources\VampiricAmmo\Projectiles\Bullet.cs(36,17) : error CS1518: Expected class, delegate, enum, interface, or struct

Here's my code:

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using Terraria;
using Terraria.ModLoader;

namespace VampiricAmmo.Projectiles //We need this to basically indicate the folder where it is to be read from, so you the texture will load correctly
{
public class VampiricAmmo : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Vampiric Bullet"; //Name of the projectile, only shows this if you get killed by it
projectile.width = 36; //Set the hitbox width
projectile.height = 36; //Set the hitbox height
projectile.timeLeft = 60; //The amount of time the projectile is alive for
projectile.penetrate = 100; //Tells the game how many enemies it can hit before being destroyed
projectile.friendly = true; //Tells the game whether it is friendly to players/friendly npcs or not
projectile.hostile = false; //Tells the game whether it is hostile to players or not
projectile.tileCollide = false; //Tells the game whether or not it can collide with a tile
projectile.ignoreWater = true; //Tells the game whether or not projectile will be affected by water
projectile.ranged = true; //Tells the game whether it is a ranged projectile or not
projectile.aiStyle = 1; //How the projectile works, this is no AI, it just goes a straight path
projectile.aiType = ProjectileID.ChlorophyteBullet
}

public override void AI()
{
Player owner = Main.player[projectile.owner]; //Makes a player variable of owner set as the player using the projectile
projectile.light = 0.9f; //Lights up the whole room
projectile.alpha = 128; //Semi Transparent

}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(mod.BuffType("Bleeding"), 180);
target.AddBuff(mod.BuffType("Poisoned"), 180);
target.AddBuff(mod.BuffType("On Fire!"), 180);
target.AddBuff(mod.BuffType("Venom"), 180);
target.AddBuff(mod.BuffType("Cursed"), 180);
target.AddBuff(mod.BuffType("Cursed Inferno"), 180);
target.AddBuff(mod.BuffType("Burning"), 180);
target.AddBuff(mod.BuffType("Frostburn"), 180);
target.AddBuff(mod.BuffType("Electrified"), 180);
owner.statLife += 15;
owner.healEffect(15, true);
}

}
 
Last edited:
So I'm trying to compile a mod I've made. It's supposed to be a bullet that does no damage, but heals the player and inflicts quite a few debuffs. Every time I try to compile it, I get this:

c:\Users\[CLASSIFIED]\Documents\My Games\Terraria\ModLoader\Mod Sources\VampiricAmmo\Projectiles\Bullet.cs(36,17) : error CS1518: Expected class, delegate, enum, interface, or struct

https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs1518 explains in a little more detail what is going wrong. Various StackOverflow questions found by searching for the error code have different explanations and examples.

The summary from one of those was "this probably means you have mismatched your {} braces", which I suspect is true in your case also. The line and column information in the error will tell you exactly where the problem was observed, so check the braces just prior to that.

PS: your username on your computer isn't actually significant in any meaningful way, and it's not worth censoring in future. :)
[doublepost=1500474732,1500474714][/doublepost]
Why are coming errors with the new tmodloader.
It's sad :( ;-;

What errors?
 
Alright, so my mod is working and is in game and I can craft and use my fancy bullet. Except for one problem: it doesn't inflict any of the debuffs, and doesn't heal me at all. Also, I tried to give it the Chlorophyte bullet AI, but that didn't work either. How would I go about making this ammo home in on enemies?

Nevermind, I've fixed it and everything is working as intended.
 
Last edited:
Guys, I've been having this problem recently with mods that add NPCs to the game (Tremor, Thorium and Calamity in my case).
I imagine it has something to do with NPCs because of the log messages.
Also, I think it might be a problem with my computer, since I haven't found anyone else reporting the same problem in the forums.

There's some stuff in portuguese but here's the translation:

Referência de objeto não definida para instância de objeto -> Object reference not defined for object instance
em -> in
linha -> line

Please help...

tremor.png calamity.png thorium.png
 
Guys, I've been having this problem recently with mods that add NPCs to the game (Tremor, Thorium and Calamity in my case).
I imagine it has something to do with NPCs because of the log messages.
Also, I think it might be a problem with my computer, since I haven't found anyone else reporting the same problem in the forums.

There's some stuff in portuguese but here's the translation:

Referência de objeto não definida para instância de objeto -> Object reference not defined for object instance
em -> in
linha -> line

Please help...

Do you have the Prefixes for enemies mod? I get that same error when I try to use it with Thorium/Calamity.
 
I've got another question, how would I go about making a gun convert ammo to a round from my mod? I've looked at the Example Gun, and it says how to make a gun convert ammo a la the Uzi, but it doesn't say how to use modded rounds.

EDIT: Also, why is it that sometimes some of my modded rounds don't fire like they should, but instead look like the impact of a falling star? Occasionally, a round will look like dust or something instead of looking like it should. It happens even though I haven't messed with the code of the bullet.
It's supposed to look like a normal bullet, but instead it looks like this when it fires.


UPDATE: Fixed the problem, not sure what the cause was.
 
Last edited:
Failed to resolve assembly: 'Terraria, Version=1.3.5.1, Culture=neutral, PublicKeyToken=null'
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArrayArgument(ArrayType type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments(CustomAttribute attribute, Collection`1 parameters)
at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature(CustomAttribute attribute)
at Mono.Cecil.CustomAttribute.<Resolve>b__34_0(CustomAttribute attribute, MetadataReader reader)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.CustomAttribute.Resolve()
at Mono.Cecil.CustomAttribute.get_ConstructorArguments()
at Mono.Cecil.ImmediateModuleReader.ReadCustomAttributes(ICustomAttributeProvider provider)
at Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
at Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
at Mono.Cecil.ImmediateModuleReader.ReadModule(ModuleDefinition module)
at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters)
at Terraria.ModLoader.AssemblyManager.LoadedMod.EncapsulateReferences(Byte[] code)
at Terraria.ModLoader.AssemblyManager.LoadedMod.LoadAssemblies()
at Terraria.ModLoader.AssemblyManager.InstantiateMods(List`1 modsToLoad)

wat
 
Can someone help me? when i enter the game with modloader it says that some mods like Thorium, Calamity, and others are missing some sounds, and it automatically disables the mod.
 
Back
Top Bottom