Standalone [1.3] tModLoader - A Modding API

I cant recompile it because it is not valid win32 file
And if I try to run terraria modded exe it shows me this:
13dOvaF.png
 
Alright, GUIDE TO MOUNTED NPCs!!!!
Here is something I made from looking at the Scutlix. Note that these types of NPC seem to consist of 3 NPCs, lets call them Top, Bottom, and TopAlone.
  • Top is the only one that is spawned naturally through CanSpawn. When it is spawned, it immediately spawns a Bottom to go with it. The AI code from then on just mimics the Bottoms position, velocity, and spriteDirection. When bottom is dead, the AI code tells it to transform into TopAlone npc.
  • Bottom controls how the NPCs move as a unit. When it moves, Top moves with it automatically. Can be programmed in a similar manner to any other NPC.
  • TopAlone is the NPC that is created when Bottom dies. Can be programmed in a similar manner to any other NPC.
So really, the only special considerations is that
  1. Bottom and TopAlone don't spawn naturally (well, you can if you want, doesn't matter either way.)
  2. Top's AI code must spawn Bottom, mimic it's behavior, and transform into a self moving NPC on Bottoms death.
Here is a download to my test mounted NPC. Remember to place these in the NPC folder and to change the namespace to match your mod's. You should be able to build off these. Also note that Top will shoot lasers at you, yay. You can learn from this example. I've commented the code as well as I saw fit, but if you can't figure things out, just ask.

Here it is in action.
anUpox1.png
Thanks so much - er, for the code, not really the art. ;) - it was really helpful!
 
Alright, GUIDE TO MOUNTED NPCs!!!!
Here is something I made from looking at the Scutlix. Note that these types of NPC seem to consist of 3 NPCs, lets call them Top, Bottom, and TopAlone.
  • Top is the only one that is spawned naturally through CanSpawn. When it is spawned, it immediately spawns a Bottom to go with it. The AI code from then on just mimics the Bottoms position, velocity, and spriteDirection. When bottom is dead, the AI code tells it to transform into TopAlone npc.
  • Bottom controls how the NPCs move as a unit. When it moves, Top moves with it automatically. Can be programmed in a similar manner to any other NPC.
  • TopAlone is the NPC that is created when Bottom dies. Can be programmed in a similar manner to any other NPC.
So really, the only special considerations is that
  1. Bottom and TopAlone don't spawn naturally (well, you can if you want, doesn't matter either way.)
  2. Top's AI code must spawn Bottom, mimic it's behavior, and transform into a self moving NPC on Bottoms death.
Here is a download to my test mounted NPC. Remember to place these in the NPC folder and to change the namespace to match your mod's. You should be able to build off these. Also note that Top will shoot lasers at you, yay. You can learn from this example. I've commented the code as well as I saw fit, but if you can't figure things out, just ask.

Here it is in action.
anUpox1.png
@jopojelly / @bluemagic123 - Yes - so I tried to spawn it using an item, then it spawned incorrectly. The rider spawned away from it and did not budge while the mount acted normally.

EDIT: I manipulated the code a bit - a different projectile being fired - and I cannot see how it isn't working.
 
Last edited:
Hello people! I need some help with something. Every single one of the modded items for some reason have white spaces around them instead of being empty. For example:
FjGuemE.png
<--- This happens with every modded item. This includes armors, tools, etc.. It's not just one mod either. I have 3 mods installed: Tremor Remastered, Quality of Life (Combined with EldAccessories), and AeONS of Terraria. I would check if this was already fixed, but I'd rather not go through 125 other pages :p Anyway, please help if you can!
 
I cant recompile it because it is not valid win32 file
And if I try to run terraria modded exe it shows me this:
13dOvaF.png
Try following the instructions in the README file.

Hello people! I need some help with something. Every single one of the modded items for some reason have white spaces around them instead of being empty. For example:
FjGuemE.png
<--- This happens with every modded item. This includes armors, tools, etc.. It's not just one mod either. I have 3 mods installed: Tremor Remastered, Quality of Life (Combined with EldAccessories), and AeONS of Terraria. I would check if this was already fixed, but I'd rather not go through 125 other pages :p Anyway, please help if you can!
That... is truly weird. It's these isolated problems that are the hardest to fix :(
 
@jopojelly / @bluemagic123 - Yes - so I tried to spawn it using an item, then it spawned incorrectly. The rider spawned away from it and did not budge while the mount acted normally.

EDIT: I manipulated the code a bit - a different projectile being fired - and I cannot see how it isn't working.
Zip up your project and let me see. Also, sometimes a different projectile will kill the enemy that is shooting it, is projectile.hostile true?
 
Um... Alright...
0yPbQKt.png

This is an Iron Shield. The things above and below it are a piece of Charcoal and a Wooden Shield. These items are from the Tremor Remastered mod. How can this weird thing happen to some items and not others, even if they're from the same mod?! I'm going to restart my computer now. It probably won't help anything, but it's worth a shot at this point.

EDIT: Nothing's helping. :(
 
Last edited:
Zip up your project and let me see. Also, sometimes a different projectile will kill the enemy that is shooting it, is projectile.hostile true?

There are a couple of things it could be, but my first inclination would be to make sure the sprites are saved correctly with regards to the alpha channel. Since it's supposedly happening to some sprites and not others, even from the same mod, this is the most likely scenario. Are there any overlaps between the three mods? Perhaps one works and overrides that shield. Is it only shields, only accessories, or is it seemingly random?

If it were a problem with video drivers you'd expect it to affect all the items. It could be a problem with tML, but again it would be strange that it works for some items within a mod and not others.
 
Back
Top Bottom