Standalone [1.3] tModLoader - A Modding API

Code:
public override bool CanTownNPCSpawn(int i = 14); void numTownNPCs; (int i = 500000); void money;[CODE]

error?

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Explorer.cs(35,77) : error CS1519: Invalid token '(' in class, struct, or interface member declaration

I hate it when it gives you an error and criticizes you for doing it right. I know this isn't right, but come on! I just edited what he sold, names, location, quotes, and requirements!
 
Code:
public override bool CanTownNPCSpawn(int i = 14); void numTownNPCs; (int i = 500000); void money;[CODE]

error?

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Explorer.cs(35,77) : error CS1519: Invalid token '(' in class, struct, or interface member declaration

I hate it when it gives you an error and criticizes you for doing it right. I know this isn't right, but come on! I just edited what he sold, names, location, quotes, and requirements!
I need to know what template you're using and what you're trying to do with it.
 
Can somone please help? My game keeps freezing in multiplayer,and then stops responding. My friend is the host.
List of mods we are using:

Bluemagic's mod
Calamity mod
Cheat Sheet
Cosmetic Variety
Crystilium mod
Prefixes for enemies
Fargo's Mutant mod (The npc that sells boss summons)
imkSushi mod
imkSushi potions addon
MaxStackPlus
MoreAccessories
More Guns mod
Pumpking's mod
Quality of Life
Sacred Tools
Thorium mod
Tremor mod
YoYo expansion
YoYo overload
Zoaklen mod

Thanks in advance
 
@bluemagic123

I have intresting thing: i play with mod "Legends of Terraria 3". This mod add some NPC. And mod have hardmode enemy "Succubus".
I try to create my mod, and create town NPC with this parameter:
npc.name = "Succubus";
npc.townNPC = true;
npc.friendly = true;

All works nice - NPC come in my town, but... if i relogin in world - my town NPC convert to enemy NPC from "Legends of Terraria 3" and kill me! It's scarry!

If i rename my NPC:
npc.name = "Succubus_001";
npc.townNPC = true;
npc.friendly = true;
...all works good and Town NPC not converting, but "Jenny the Succubus_001 arrived" looks not good. How i can fix this trouble?

P.S. Sorry for bad english(
 
Add a space after Succubus, dreverseb. Also you would want to post this in the thread for LOT: 3.
[doublepost=1471555894,1471555825][/doublepost]Oh and btw I use the same thing Al0n37 used, meow,
[doublepost=1471556008][/doublepost]And as I just said, I changed spawn info, names, shop items, quotes, and defense. Also he doesn't have an attacking animation, because he is kid NPC; defenseless.
 
Add a space after Succubus, dreverseb. Also you would want to post this in the thread for LOT: 3.
[doublepost=1471555894,1471555825][/doublepost]Oh and btw I use the same thing Al0n37 used, meow,
[doublepost=1471556008][/doublepost]And as I just said, I changed spawn info, names, shop items, quotes, and defense. Also he doesn't have an attacking animation, because he is kid NPC; defenseless.
Here's the problem: I have no idea who Al0n37 is :redspin:
 
When I open the game it shows me a error that says Terraria.exe is not a valid Win32 application can someone help me?
 
SOMEONE PLEASE HELP ME! This happens ALL the time I try to mod Terraria and it is getting annoying! I don't even have many mods active and there is plenty of memory on my computer. My computer is Windows 10 so it can't be old OS either! I am very tired of losing modded progress, please fix this! Here is the error(btw i there is no backup about 99% of the time.)
Unable to read beyond the end of the stream.
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadUInt16()
at Terraria.ModLoader.IO.ItemIO.GetCustomData(Int32 type, BinaryReader reader, Boolean hasGlobalSaving)
at Terraria.ModLoader.Default.MysteryItem.LoadCustomData(BinaryReader reader)
at Terraria.ModLoader.IO.ItemIO.ReadCustomData(Item item, Byte[] data, Boolean hasGlobalSaving)
 
Alright guys, for whoever was helping me, THANK YOU! YOU ARE A LEGEND!!!!
*ahem* Anyways, if you guys were living under rocks, Jopojelly told me probably the worst mistake of my life. The Autoload signature was changed. Just wanted to tell you, if you had a problem, that might be your reason.
 
I cant download the new version because its Media Fire and mediafire doesn't work for me, so is there anyway I can download it from any other place?
 
Last edited:
So I'm trying to do something like this: sell an item from another mod based on another mods condition
Code:
    if (ModLoader.GetLoadedMods().Contains("Pumpking"))
             {
            if (Pumpking.PumpkingWorld.downedPumpkingHorseman == true)
            {   
            shop.item[nextSlot].SetDefaults(ModLoader.GetMod("Pumpking").ItemType("PumpkingSoul"));
            shop.item[nextSlot].value=200000;
            nextSlot++;
            }
             }

but obviously it is not working so does anyone have any idea?
 
Can Someone help me why my minion disappear if he goes attack something

Code:
    public class HarpyMinion : ModProjectile
    {
        public override void SetDefaults()
        {

            projectile.netImportant = true;
            projectile.name = "HarpyMinion";
            projectile.width = 60;
            projectile.height = 40;
            Main.projFrames[projectile.type] = 4;
            projectile.friendly = true;
            Main.projPet[projectile.type] = true;
            projectile.aiStyle = 54;
            projectile.minion = true;
            projectile.minionSlots = 1;
            projectile.penetrate = -1;
            projectile.tileCollide = false;
            projectile.ignoreWater = true;
            ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
        }

        public override bool MinionContactDamage()
        {
            return true;
        }
    }
}
 
:gslime:Can someone help me please?, i try to put in a recipe my custom ore (called mercurium) and tMod says this
c:\Users\Usuario\Documents\My Games\Terraria\ModLoader\Mod Sources\AstromodV10\Items\Weapons\Mercursword.cs(35,32) : error CS0117: 'Terraria.ID.ItemID' no definition for 'Mercurium'
this is the code
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;

namespace AstromodV10.Items.Weapons
{
public class Mercursword : ModItem
{
public override void SetDefaults()
{
item.name = "Mercursword";
item.damage = 50;
item.melee = true;
item.width = 40;
item.height = 40;
item.toolTip = "Directamente hecha en Mercurio";
item.useTime = 17;
item.useAnimation = 25;
item.useStyle = 1;
item.knockBack = 5;
item.value = 100;
item.rare = 10;
item.useSound = 1;
item.autoReuse = true;
item.useTurn = true;

}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Mercurium, 25);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();

}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
player.AddBuff(mod.BuffType("BuffName"), 400);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.Next(1) == 0)
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, mod.DustType("DustName"));
}
}
}
}

How can i make that the sword can be crafted with mercurium?, thanks
 
Last edited:
Back
Top Bottom