Standalone [1.3] tModLoader - A Modding API

Hey, I'm trying to make a slime variant, can someone help me?
[doublepost=1509596195,1509596110][/doublepost]Oops, I accidentally sent my clipboard image too. Sorry.
 

Attachments

  • upload_2017-11-2_15-14-23.png
    upload_2017-11-2_15-14-23.png
    303 bytes · Views: 139
Possible Bugs: (I apologize if this is not a place to dump bugs; I have no idea where else to do it...)

I got the latest version this week from the first page, so it's recent. Even with no mods active, the only "Sensor" I can place is the Day sensor. Every other Sensor either "mines itself" immediately, becoming a pick-up item, or erases itself from the world instantly. (The "Any" Liquid Sensor.)

Can anyone reproduce this? I did this in a new world with a new character in tModLoader 0.10.1 on Terraria 1.3.5.2 with no mods active and the bug persisted, so I can only conclude that it might be a bug with tModLoader. I apologize if this was reported already. Sensors aren't that uncommon to use, so...

--------------
Here's another bug I might've found, but it doesn't happen when only HERO's mod is enabled in a new character in a new world. I can hop into a world I had already with a new character and do this and the bug happens, but not in a new world with a new character and only the HERO's mod enabled. Neat.
Additionally, this is happening.
AoTdVTm.png

That's within twenty seconds of me creating a new character and entering the world, then using HERO's mod to give them a cosmic car key. Some kind of weird shadow effect. Again, it's a new character, freshly made. They have absolutely nothing else equipped.
 
Last edited:
I recently installed tModLoader so I could do a modded server with friends, but I've run into a bit of a problem.

eNbWXhi.jpg

This is after I followed the instructions of placing it into my Terarria folder and attempting to run it.
 
I recently installed tModLoader so I could do a modded server with friends, but I've run into a bit of a problem.

eNbWXhi.jpg

This is after I followed the instructions of placing it into my Terarria folder and attempting to run it.
Well, since you already manually installed, you don't need to run the installer. In the future, if something you download has a file called README.txt, read it.
 

Hello @grim 3 and welcome to TCF (Terraria Community Forums)

Posts that contain only emotes within them are considered lack of content. We require members to have a minimum of relevant content to contribute to a Thread Topic when posting.

In the future, please try to add more content to your posts to contribute to the Thread Topic. If you have any questions about how the Forums work, you can always PM (Private Message) Myself or any Moderator. :)
 
11/3/2017 3:25:55 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, Boolean monoArgs)
Can someone please help me?
 
11/3/2017 3:25:55 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, Boolean monoArgs)
Can someone please help me?
https://github.com/blushiemagic/tMo...tfoundexception-unable-to-load-dllcsteamworks
 
Oh, also, while using the ExampleGun template, I got these errors, which are located in the section used for converting bullets to different bullets


c:\Users\User\Documents\My Games\Terraria\ModLoader\Mod Sources\SlimeCannon\Items\Gs.cs(50,36) : error CS0246: The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?)

c:\Users\User\Documents\My Games\Terraria\ModLoader\Mod Sources\SlimeCannon\Items\Gs.cs(57,30) : error CS0246: The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?)

c:\Users\User\Documents\My Games\Terraria\ModLoader\Mod Sources\SlimeCannon\Items\Gs.cs(57,49) : error CS0246: The type or namespace name 'Vector2' could not be found (are you missing a using directive or an assembly reference?)
 
Possible Bugs: (I apologize if this is not a place to dump bugs; I have no idea where else to do it...)

I got the latest version this week from the first page, so it's recent. Even with no mods active, the only "Sensor" I can place is the Day sensor. Every other Sensor either "mines itself" immediately, becoming a pick-up item, or erases itself from the world instantly. (The "Any" Liquid Sensor.)

Can anyone reproduce this? I did this in a new world with a new character in tModLoader 0.10.1 on Terraria 1.3.5.2 with no mods active and the bug persisted, so I can only conclude that it might be a bug with tModLoader. I apologize if this was reported already. Sensors aren't that uncommon to use, so...

Getting the same thing here too, though once I disabled every mod I had the Logic Sensor Player Above started working. But I can confirm that any mods loaded pretty much breaks all the sensors aside from Day. Didn't try the night, but I did do the liquids and they poofed as described. Same tModLoader version, and I'm using Terraria through Steam. But everything pointed to tMod itself rather than the mods.
 
Getting the same thing here too, though once I disabled every mod I had the Logic Sensor Player Above started working. But I can confirm that any mods loaded pretty much breaks all the sensors aside from Day. Didn't try the night, but I did do the liquids and they poofed as described. Same tModLoader version, and I'm using Terraria through Steam. But everything pointed to tMod itself rather than the mods.

Sorry for the double post, but I think I've narrowed it down. A friend of mine was running the same mod list as I was, but he didn't update. It seems like updated mods are the culprit, though on his end it's doing it with mods disabled too. So something's definitely going on with that, but I think we need more testing to be sure. Right now I'm wiping my installation and rebuilding my mod list from scratch to see if mine does it with mods disabled as well, but if this also incidentally fixes it, I'll edit this post with findings so I don't spam the thread.

Edit:
Okay! After a series of doing a fresh installation of tModLoader there was something wonky. See, it turns out it WAS a mod, however reloading tModLoader seemed to have kept the mod in question in the cache somehow. Which was Spirit. I'm still in the process of reloading the rest of my mods, but after disabling Spirit and restarting and then created a new world the Logic Sensor Player Above was working just fine.

So the sensor not working wasn't tMod. That was Spirit. However tMod kept data saved over until a restart. Which, eh. Shame on me for not doing that in the first place, but it's definitely worth noting to restart the game to 100% disable a mod.
 
Last edited:
Sorry for the double post, but I think I've narrowed it down. A friend of mine was running the same mod list as I was, but he didn't update. It seems like updated mods are the culprit, though on his end it's doing it with mods disabled too. So something's definitely going on with that, but I think we need more testing to be sure. Right now I'm wiping my installation and rebuilding my mod list from scratch to see if mine does it with mods disabled as well, but if this also incidentally fixes it, I'll edit this post with findings so I don't spam the thread.

Edit:
Okay! After a series of doing a fresh installation of tModLoader there was something wonky. See, it turns out it WAS a mod, however reloading tModLoader seemed to have kept the mod in question in the cache somehow. Which was Spirit. I'm still in the process of reloading the rest of my mods, but after disabling Spirit and restarting and then created a new world the Logic Sensor Player Above was working just fine.

So the sensor not working wasn't tMod. That was Spirit. However tMod kept data saved over until a restart. Which, eh. Shame on me for not doing that in the first place, but it's definitely worth noting to restart the game to 100% disable a mod.

Can confirm, the Spirit Mod is causing the Logic Sensor (Player Above), Night Sensor, and Liquid Sensor(Any), to immediately break and return to the ground upon placement. We had to completely disable the mod, reload the mods, exit the game, and restart the game with the Spirit Mod still disabled to ensure any leftover data wasn't causing the issue. Simply disabling and reloading wasn't enough to prevent the above glitch from happening.

As an aside, I did not have this issue with -one- of the previous versions of Spirit Mod. I cannot say which one, as I had not updated it for at least a month.
 
I got this crash after awhile in game,
Code:
System.InvalidOperationException: Begin cannot be called again until End has been successfully called.
   at Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(SpriteSortMode sortMode, BlendState blendState, SamplerState samplerState, DepthStencilState depthStencilState, RasterizerState rasterizerState, Effect effect, Matrix transformMatrix)
   at Terraria.Main.do_Draw(GameTime gameTime)
   at Terraria.Main.DoDraw(GameTime gameTime)
   at Terraria.Main.Draw(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.DrawFrame()
   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)
Anyone know why?
 
Is there way to spawn Dust Every X Seconds? and make only spawn 1 at that time and loop until projectile dies
I haven't tested this code, but it should do what you want.
Code:
if (Main.netMode != 2) //if not a server
{
    if (projectile.timeLeft % 60 == 0) //once every second, or 60 ticks. 120 = every two seconds. 30 = twice a second
    {
        int dustID = Dust.NewDust(projectile.Center, 10, 10, 123, Main.rand.Next(-10, 10) * 1f, Main.rand.Next(-10, 10) * 1f, 100, Color.White, 1f); //spawn dust at the center of the projectile
        Main.dust[dustID].noGravity = true; //can be false if you want to
    }
}
In this code, the number 123 is the type of the projectile that will be created. Look here for a list of Dusts.
You can also change '* 1f' to a larger or smaller number to change the starting speed.
 
kinda stupid that it replaces the Original Terraria file instead of just adding itself.

I mean if you then Install the Game Launcher the TModLoader file will be replaced itself.

kinda counter productive.
 
I haven't tested this code, but it should do what you want.
Code:
if (Main.netMode != 2) //if not a server
{
    if (projectile.timeLeft % 60 == 0) //once every second, or 60 ticks. 120 = every two seconds. 30 = twice a second
    {
        int dustID = Dust.NewDust(projectile.Center, 10, 10, 123, Main.rand.Next(-10, 10) * 1f, Main.rand.Next(-10, 10) * 1f, 100, Color.White, 1f); //spawn dust at the center of the projectile
        Main.dust[dustID].noGravity = true; //can be false if you want to
    }
}
In this code, the number 123 is the type of the projectile that will be created. Look here for a list of Dusts.
You can also change '* 1f' to a larger or smaller number to change the starting speed.
Is there homing code that works like Elemental Shiv from Calamity Mod?
 
Back
Top Bottom