Standalone [1.3] tModLoader - A Modding API

Also I think you two are confusing each other.

Btw, The discord Channel listed in the first post is a good place for live help.(it's a chat room)
 
Also I think you two are confusing each other.

Btw, The discord Channel listed in the first post is a good place for live help.(it's a chat room)
Welp...
That always happens to me...
But can I help you? Since I've got the gog.com terraria?
 
Wondering whether you are asking me if I want help... But if you are, it would be very much appreciated. I'm trying my hardest to get it to work, but to no avail
 
Wondering whether you are asking me if I want help... But if you are, it would be very much appreciated. I'm trying my hardest to get it to work, but to no avail
I would want to help oyu, but I don't have a mac... Soo, Sorry...
[DOUBLEPOST=1452954008,1452953979][/DOUBLEPOST]Shoudn't TerrariaMac be .app?
 
It is, but if I right click and select "Show Package Contents", then navigate through "Terraria/Contents/MacOS/" there is an exe file.
 
Wondering whether you are asking me if I want help... But if you are, it would be very much appreciated. I'm trying my hardest to get it to work, but to no avail
Come live chat in the discord Channel.
 
I am currently having problems with the mod browser? No mods are showing up?
 
I want to make my item so i can use it with both types of iron bars(lead and iron) and with both types of mythril anvil. How should i do that?
Code:
            ModRecipe recipe = new ModRecipe(this);
            recipe.anyIronBar = true;
 
I can't seem to start a world in either the server or host and play. I remember getting it to work in host and play in 1.6 (although it was practically unplayable). When I try to run the server, it ends up either telling me that it needs a backup of the world or it keeps looping through reseting game objects, loading world data, and settling liquids before it just quits. In host and play it just stays on the first loading step/screen.
 
I made a town npc but he won't spawn no matter how long I wait.



here is the code:
Code:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace EpicnessMod.NPCs
{
    public class InfectedMan : ModNPC
    {
        public override bool Autoload(ref string name, ref string texture)
        {
            name = "Zomb";
            return mod.Properties.Autoload;
        }

        public override void SetDefaults()
        {
            npc.name = "InfectedMan";
            npc.townNPC = true;
            npc.friendly = true;
            npc.width = 18;
            npc.height = 40;
            npc.aiStyle = 7;
            npc.damage = 10;
            npc.defense = 15;
            npc.lifeMax = 250;
            npc.soundHit = 1;
            npc.soundKilled = 1;
            npc.knockBackResist = 0.5f;
            Main.npcFrameCount[npc.type] = 3;
            NPCID.Sets.ExtraFramesCount[npc.type] = 3;
            NPCID.Sets.DangerDetectRange[npc.type] = 700;
            NPCID.Sets.AttackType[npc.type] = 0;
            NPCID.Sets.AttackTime[npc.type] = 90;
            NPCID.Sets.AttackAverageChance[npc.type] = 30;
            animationType = NPCID.Zombie;
        }
        public static bool TownSpawn()
{
    return true;
}
        public override string TownNPCName()
        {
            switch (WorldGen.genRand.Next(4))
            {
                case 0:
                    return "Zomb";
                case 1:
                    return "Zombro";
                case 2:
                    return "Jason";
                default:
                    return "Zomb";
            }
        }

        public override string GetChat()
        {
            int Merchant = NPC.FindFirstNPC(NPCID.Merchant);
            if (Merchant >= 0 && Main.rand.Next(4) == 0)
            {
                return "Can you please tell " + Main.npc[Merchant].displayName + " to stop trying to sell me angel statues?";
            }
            switch (Main.rand.Next(3))
            {
                case 0:
                    return "Why does everyone think I'm a zombie?";
                case 1:
                    return "I am a npc.... not a player.. What you caught me in a deep state of mind.";
                default:
                    return "Sometimes.... AI can be harsh..";
            }
        }

        public override void SetChatButtons(ref string button, ref string button2)
        {
            button = Lang.inter[28];
        }

        public override void OnChatButtonClicked(bool firstButton, ref bool shop)
        {
            if (firstButton)
            {
                shop = true;
            }
        }

        public override void SetupShop(Chest shop, ref int nextSlot)
        {
            shop.item[nextSlot].SetDefaults(mod.ItemType("ExampleItem"));
            nextSlot++;
            shop.item[nextSlot].SetDefaults(mod.ItemType("EquipMaterial"));
            nextSlot++;
            if (Main.bloodMoon = true)
            {
                shop.item[nextSlot].SetDefaults(mod.ItemType("Bloodarang"));
                nextSlot++;
            }
           
           
        }

        public override void TownNPCAttackStrength(ref int damage, ref float knockback)
        {
            damage = 35;
            knockback = 4f;
        }

        public override void TownNPCAttackCooldown(ref int cooldown, ref int randExtraCooldown)
        {
            cooldown = 30;
            randExtraCooldown = 30;
        }

        public override void TownNPCAttackProj(ref int projType, ref int attackDelay)
        {
            projType = mod.ProjectileType("Bloodarang");
            attackDelay = 1;
        }

        public override void TownNPCAttackProjSpeed(ref float multiplier, ref float gravityCorrection, ref float randomOffset)
        {
            multiplier = 12f;
            randomOffset = 2f;
        }
    }
}
 
I am currently having problems with the mod browser? No mods are showing up?
Same for me. It says it is offline.
I've figured it out, should be back.
I can't seem to start a world in either the server or host and play. I remember getting it to work in host and play in 1.6 (although it was practically unplayable). When I try to run the server, it ends up either telling me that it needs a backup of the world or it keeps looping through reseting game objects, loading world data, and settling liquids before it just quits. In host and play it just stays on the first loading step/screen.
We are working on a fix. Before it was using the vanilla server, so no mods we loaded by the server. You can replace tModLoaderServer.exe with the original exe if you want the old functionality back. (Which is no support, and funky things happening around walls.)
if (Main.bloodMoon = true)
Not sure, but btw, this line should be ==, not =.
 
I'm guessing this isn't compatible with the GOG version? :(
 
how do i install 0.7 version of the tModLoader be couse i cant can someone make a tutorial please i just dont know how to install the 0.7 version
:(
 
how do i install 0.7 version of the tModLoader be couse i cant can someone make a tutorial please i just dont know how to install the 0.7 version
:(
 
Well im doing my first item, and my first mod... and I'm lost. How can I add a dash to an item?
 
You should still have the source, right? When you install 0.7, your 0.6 mods won't load, but you just need to run the build command again. There are a couple things that changed in 0.7, but you can fix the code yourself or post the error and we can help.

To install 0.7, just follow the instructions in the README.txt file in the download zip. There is no need to "uninstall" 0.6.
Yeah, I've just downloaded them and took a quick look, noticed that tmodloader is now not installing, but covering. That should do the trick no matter how 0.6 was placed.
Another thing is, since the source code have been released, that how should I link tmodloader as a reference? Just like I can link terraria.exe as a reference, there are lots of hooks in tmodloader, so I think I might have a chance to use tmodloader in VS?
[DOUBLEPOST=1452993133,1452992806][/DOUBLEPOST]Oh, I entered the game and rebuild my mod. It works just like a charm! That's cool anyways.
 
Yeah, I've just downloaded them and took a quick look, noticed that tmodloader is now not installing, but covering. That should do the trick no matter how 0.6 was placed.
Another thing is, since the source code have been released, that how should I link tmodloader as a reference? Just like I can link terraria.exe as a reference, there are lots of hooks in tmodloader, so I think I might have a chance to use tmodloader in VS?
[DOUBLEPOST=1452993133,1452992806][/DOUBLEPOST]Oh, I entered the game and rebuild my mod. It works just like a charm! That's cool anyways.
Just reference the Terraria.exe. simpler than seeing up the source code.
 
Just reference the Terraria.exe. simpler than seeing up the source code.
I'm actually curious about how I am supposed to modify the maxlife of a player in 0.7 like the vanilla life crystal? bluemagic123 said it may be possible in 0.7, and I discovered there are lots of hooks about player in 0.7. So is that possible now?
[DOUBLEPOST=1452997695,1452997500][/DOUBLEPOST]Wow, so I tried to link terraira.exe, then VS said it can't be looked in objective browser... any idea?
 
I'm actually curious about how I am supposed to modify the maxlife of a player in 0.7 like the vanilla life crystal? bluemagic123 said it may be possible in 0.7, and I discovered there are lots of hooks about player in 0.7. So is that possible now?
It's possible by modifying the value of player.statLifeMax2 in one of the update hooks.
 
Back
Top Bottom