Standalone [1.3] tModLoader - A Modding API

So instead i could combine different ores together to make new ones ? At forges
Yes, that's a possibility. If you have any other small questions, please try to ask them in the conversation I started with you. This is taking up a lot of space on the tModLoader thread :)
 
I have some questions.
  1. Does anyone (Except of Bluemagic) knows how to change the sprites and hitbox of a weapon that NPCs uses for attacking monsters?
  2. Are segmented mobs (Worms-like) supported right now?
  3. Is it possible to make ore generations right now or not?
 
One short question but it may be simple like tapi. Is the coding for the mobs and sprites and weapons and etc. The same as tapi?... Or is it a different line of code because I've been searching for a tutorial everywhere and I can't find one. %:sigh:
 
I have some questions.
  1. Does anyone (Except of Bluemagic) knows how to change the sprites and hitbox of a weapon that NPCs uses for attacking monsters?
  2. Are segmented mobs (Worms-like) supported right now?
  3. Is it possible to make ore generations right now or not?
1) I'd think the hitbox would be the size of the sprite (though don't take my word on that as I've yet to delve into that part of coding and are not the best coder).
2) not sure
3) World Hooks haven't been added yet
 
I have some questions.
  1. Does anyone (Except of Bluemagic) knows how to change the sprites and hitbox of a weapon that NPCs uses for attacking monsters?
  2. Are segmented mobs (Worms-like) supported right now?
  3. Is it possible to make ore generations right now or not?
1. I don't know if you can modify the Rectangle of the hitboxes themselves, but the TownNPCAttackSwing takes two arguments (which represent width and height) and
DrawTownAttackSwing also has a 'ref Texture2D' so you can also modify the graphics. As for the projectiles: I think you just have to make your own custom projectile and modify the hitbox of the projectile in the projectile class itself.
2. Segmented enemies sure are possible, if you use the right AI and draw function. I made a custom Grappling hook in tModLoader, which uses a drawing similar to a segmented NPC.
3. No, there probably is a way to randomly spawn your own ores, but this would've to be done VERY hacky/cracky. So I'd advice to wait for the World hooks.

EDIT:
I've been Ninja'd!


[DOUBLEPOST=1443451118,1443450912][/DOUBLEPOST]
One short question but it may be simple like tapi. Is the coding for the mobs and sprites and weapons and etc. The same as tapi?... Or is it a different line of code because I've been searching for a tutorial everywhere and I can't find one. %:sigh:
The code itself may differ slightly (for example the functions that call AI/Draw and such). One major difference is that you can't use .json files and have to put name, width and height and such in the SetDefaults() function inside a NPC/Weapon.
Any logic you've written for tAPI might need small adjustments, but if you understand C#/programming, I'm sure it won't be a difficult task.

EDIT:
Sorry again for the double post, it seems some of my edits are not edits at all.
 
I have some questions.
  1. Does anyone (Except of Bluemagic) knows how to change the sprites and hitbox of a weapon that NPCs uses for attacking monsters?
  2. Are segmented mobs (Worms-like) supported right now?
  3. Is it possible to make ore generations right now or not?
1. If you're talking about vanilla town NPCs, then use these hooks:
https://github.com/bluemagic123/tMo...gnpc-npc-ref-int-itemwidth-ref-int-itemheight
https://github.com/bluemagic123/tMo...t-itemsize-ref-float-scale-ref-vector2-offset
2. They've been supported ever since the NPC hooks were added. Just like in tAPI, you just need to know either how to program them or which code you need to copy.
3. At the moment it isn't possible on world generation. You can make them generate when a boss is killed or something, but until I add ModWorld it won't be possible to customize how much ore spawns based on how many times you've defeated the boss, etc.

One short question but it may be simple like tapi. Is the coding for the mobs and sprites and weapons and etc. The same as tapi?... Or is it a different line of code because I've been searching for a tutorial everywhere and I can't find one. %:sigh:
What exactly do you mean? Have you looked at the example mod in the first post?
 
I hope this doesn't seem random but I made this profile and everything to ask for help because I am so confused...

Well basically, I wanna recreate JoJo's Bizarre Adventure ideas, Stands. I thought making a new summoning item would help.
 
I hope this doesn't seem random but I made this profile and everything to ask for help because I am so confused...

Well basically, I wanna recreate JoJo's Bizarre Adventure ideas, Stands. I thought making a new summoning item would help.
There is currently no support for custom Buffs, thus no easy way of implementing summons/summoning items. IF you were to take the hard way... God knows how long it'd take you to implement it, so my advice: wait for the Buff hooks.
 
There is currently no support for custom Buffs, thus no easy way of implementing summons/summoning items. IF you were to take the hard way... God knows how long it'd take you to implement it, so my advice: wait for the Buff hooks.
Dang... You beat me to it. (Just barely before I almost posted it :D.)
 
Uhhh... @bluemagic123 I hopped on to visual studio and was gonna work on my mod but all of a sudden everything in the Terraria.ModLoader namespace turned into an error. I don't think I have anything to take a screenshot but this is really weird.

Edit: Also I'm working on this mod with my friend and he said he made a change that made the mod work because it was kind of buggy at first and we are using GitHub for it and I don't exactly know why that might effect my mods that I made on my computer and not cloned from GitHub. I don't know if this is useful or not but I'm just gonna put this here just in case it does.
 
Uhhh... @bluemagic123 I hopped on to visual studio and was gonna work on my mod but all of a sudden everything in the Terraria.ModLoader namespace turned into an error. I don't think I have anything to take a screenshot but this is really weird.

Edit: Also I'm working on this mod with my friend and he said he made a change that made the mod work because it was kind of buggy at first and we are using GitHub for it and I don't exactly know why that might effect my mods that I made on my computer and not cloned from GitHub. I don't know if this is useful or not but I'm just gonna put this here just in case it does.
It's probably a reference problem. Since it is on GitHub, you could check the commit and see what your friend changed (most likely, the .csproj file). If you can't figure it out, you can link to the github and I could probably figure it out.
 
It's probably a reference problem. Since it is on GitHub, you could check the commit and see what your friend changed (most likely, the .csproj file). If you can't figure it out, you can link to the github and I could probably figure it out.
What is weird is that I don't even get errors in the GitHub mod but I do in my own personal ones and those errors didn't even happen before. Here's the link...


https://github.com/napen123/DaringDangerMod

This is only a little test mod right now because we are still getting things working (and if you could help with what we are trying to do with the sword (look right before the recipe code) because I actually want to get that kind of thing working in my normal mod).
 
What is weird is that I don't even get errors in the GitHub mod but I do in my own personal ones and those errors didn't even happen before. Here's the link...


https://github.com/napen123/DaringDangerMod

This is only a little test mod right now because we are still getting things working (and if you could help with what we are trying to do with the sword (look right before the recipe code) because I actually want to get that kind of thing working in my normal mod).

Everything is all good for me when I cloned it and opened it up. Are you saying that this mod didn't work, or that other mods you are working on that are not this mod don't work. What is the connection?
 
Uhhh... @bluemagic123 I hopped on to visual studio and was gonna work on my mod but all of a sudden everything in the Terraria.ModLoader namespace turned into an error. I don't think I have anything to take a screenshot but this is really weird.

Edit: Also I'm working on this mod with my friend and he said he made a change that made the mod work because it was kind of buggy at first and we are using GitHub for it and I don't exactly know why that might effect my mods that I made on my computer and not cloned from GitHub. I don't know if this is useful or not but I'm just gonna put this here just in case it does.
Sometimes Visual Studio just thinks everything's an error while it's still loading up. Does it still show up as errors when you build the project?
 
Everything is all good for me when I cloned it and opened it up. Are you saying that this mod didn't work, or that other mods you are working on that are not this mod don't work. What is the connection?
My other mods all of a sudden got these errors on most things that are from TModLoader that are essential to actually make a mod and these are both ones I myself created through visual studio and that one was created originally by a friend. The connection was that those errors only appeared after my friend made those changes. (Those errors are the ones with the little red underlines when your in Visual Studio, not when you try to build them even though I haven't yet seen what happens when I try to build it but I can guess. Also my friend has no access to my other mods without hacks.)
[DOUBLEPOST=1443482863,1443482601][/DOUBLEPOST]
Sometimes Visual Studio just thinks everything's an error while it's still loading up. Does it still show up as errors when you build the project?
Ok I fixed it and the problem was that because I play multi with my friend I switch the exe files and so I apparently forgot to switch back to the TModLoader one so it didn't see the Terraria.ModLoader stuff because I had the wrong Terraria.exe file.

Edit: Dang forgot about the double post stuff lol sorry Administrators.
 
^ Is the switching really needed? I just keep both modded and vanilla terraria .exes in the same folder in steam. The renamed modded terraria file doesn't care what it's named, as long as it can reach the contents folder. Launching either one will work
70f1967e5e.png
 
^ Is the switching really needed? I just keep both modded and vanilla terraria .exes in the same folder in steam. The renamed modded terraria file doesn't care what it's named, as long as it can reach the contents folder. Launching either one will work
70f1967e5e.png
Idk but I just switch them out because I don't want to go find the folder every time and I suspect that it could get pretty buggy launching from steam. Plus all I have to do is go to the tmodloader and vanilla terraria folders and just copy one of those and paste it over there.
 
Idk but I just switch them out because I don't want to go find the folder every time and I suspect that it could get pretty buggy launching from steam. Plus all I have to do is go to the tmodloader and vanilla terraria folders and just copy one of those and paste it over there.

I just make a shortcut to the folder from my desktop, and I've done the same for my Mod Sources folder as well
 
Back
Top Bottom