Standalone [1.3] tModLoader - A Modding API

Dang... im not able to open the batch file. I need help, every time i open it the window closes immediently
[DOUBLEPOST=1442455427,1442455390][/DOUBLEPOST]How do i fix this?
Are you sure it's not working? Try looking in the tModLoader folder to see if the modded Terraria.exe appeared there.
 
Go to your steam library then right click steam then you will click properties and find the "open file location" button and press it. You will find it there.
Are you sure i right click steam? well anyways i right clicked terraria and hit properties but nothing said open file location so i hit browse local files but nothing opened.
 
It should open a folder like "C:\program files (x86)\steam\steamapps\common\terraria" Have you tried finding this folder? You should find the executable in this folder.
I think i got it but i dont know what i do with the files now because i got the file and everything but im not able to run the terraria in the tModLoader folder
[DOUBLEPOST=1442467066,1442467012][/DOUBLEPOST]
I think i got it but i dont know what i do with the files now because i got the file and everything but im not able to run the terraria in the tModLoader folder
It says it cant run on my computer (windows 8) and i should check with the publisher
 
I think i got it but i dont know what i do with the files now because i got the file and everything but im not able to run the terraria in the tModLoader folder

From the readme:
"To install, find your vanilla Terraria.exe file then copy it into the Vanilla folder. Run the Patch.bat file, then the modded Terraria.exe should appear in the tModLoader folder. Copy this modded file back to where you found your vanilla Terraria.exe."

It says it cant run on my computer (windows 8) and i should check with the publisher
Are you sure you have vanilla Terraria 1.3.0.8 and not something else? Vanilla terraria should be 6497 kb and the tmodloader version should be 6649 kb in windows explorer. Check these values.
 
Why gores won't appear?

Code:
    public override void HitEffect(int hitDirection, double damage)
    {
        if(npc.life <= 0)
        {
            for(int k = 0; k < 20; k++)
            {
                Dust.NewDust(npc.position, npc.width, npc.height, 151, 2.5f * (float)hitDirection, -2.5f, 0, default(Color), 0.7f);
            }
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore1"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore2"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BloodmoonWarrior3Gore1"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BloodmoonWarrior3Gore2"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore1"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore2"), 1f);
        }
}

And how to make NPC attack with melee?
Should I use this?
Code:
public virtual void DrawTownAttackSwing(NPC npc, ref Texture2D item, ref int itemSize, ref float scale, ref Vector2 offset)
 
Last edited:
Why gores won't appear?

Code:
    public override void HitEffect(int hitDirection, double damage)
    {
        if(npc.life <= 0)
        {
            for(int k = 0; k < 20; k++)
            {
                Dust.NewDust(npc.position, npc.width, npc.height, 151, 2.5f * (float)hitDirection, -2.5f, 0, default(Color), 0.7f);
            }
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore1"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore2"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BloodmoonWarrior3Gore1"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BloodmoonWarrior3Gore2"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore1"), 1f);
            Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/UndeadGore2"), 1f);
        }
}

And how to make NPC attack with melee?
Should I use this?
Code:
public virtual void DrawTownAttackSwing(NPC npc, ref Texture2D item, ref int itemSize, ref float scale, ref Vector2 offset)
If your gores aren't appearing, it's likely a problem somewhere else in the mod.

If you mean how to make NPCs swing stuff like expert zombies, I haven't looked into the code for that yet.
 
Is there a way to add your own music and music boxes?

Also, what is the Ai Style of the Death Sickle Projectiles?
 
Last edited:
From the readme:
"To install, find your vanilla Terraria.exe file then copy it into the Vanilla folder. Run the Patch.bat file, then the modded Terraria.exe should appear in the tModLoader folder. Copy this modded file back to where you found your vanilla Terraria.exe."


Are you sure you have vanilla Terraria 1.3.0.8 and not something else? Vanilla terraria should be 6497 kb and the tmodloader version should be 6649 kb in windows explorer. Check these values.
I have Terraria 1.3.0.8 but is right version for it is tModLoader v0.5 right?
 
9/17/2015 3:20:09 PM
System.DllNotFoundException: Unable to load DLL 'CSteamworks': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Steamworks.NativeMethods.SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID)
at Terraria.Social.Steam.CoreSocialModule.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
at Terraria.Program.LaunchGame(String[] args)

Uhhhhhhhhhhhhh?
 
I have Terraria 1.3.0.8 but is right version for it is tModLoader v0.5 right?
Yes, that is the right version.

9/17/2015 3:20:09 PM
System.DllNotFoundException: Unable to load DLL 'CSteamworks': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Steamworks.NativeMethods.SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID)
at Terraria.Social.Steam.CoreSocialModule.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
at Terraria.Program.LaunchGame(String[] args)

Uhhhhhhhhhhhhh?
You made sure to copy the modded exe back to where you got the vanilla exe from, right?
 
When i copy the modded exe to the folder do i remove the normal one? Also when i tried to open it the thingy said "This app cant run on your PC. To find a version for your PC, check with the software publisher."
 
When i copy the modded exe to the folder do i remove the normal one? Also when i tried to open it the thingy said "This app cant run on your PC. To find a version for your PC, check with the software publisher."
Yes, you either need to remove or rename the normal one.
For that other problem, it might work if you try patching a fresh new copy of Terraria; that's worked for about half the people with that problem.

I meant NPCs swing stuff like Dye Trader (He uses sword as weapon).
You'll have to look through the documentation for ModNPC; the reason I toiled away at the documentation was so that I wouldn't have to explain everything here.
 
I think i got it but i dont know what i do with the files now because i got the file and everything but im not able to run the terraria in the tModLoader folder
[DOUBLEPOST=1442467066,1442467012][/DOUBLEPOST]
It says it cant run on my computer (windows 8) and i should check with the publisher
About the 'check with the publisher', make sure you are running Windows 8, not Windows RT 8. If you are using a Surface RT, it runs RT 8. RT 8 does not support custom programs.
 
im really new to modding and coding in general And would like to ask a question how would i go about changing where a modded enemy spawns?
 
Im as noob as it gets to modding terraria. I know VERY little C# and was wondering if anyone would be willing to direct me in making a simple item mod. i think once i am shown some of the basics i can figure out the rest. I would greatly appreciate it.
 
Back
Top Bottom