Standalone [1.3] tModLoader - A Modding API

thanks, but now I need the other two

Faster return
penetration

can you help?
The return speed of each Boomerang is hard-coded into it's AI according to it's type, but most work by reversing it's velocity on impact and setting projectile.ai[0] to 1 to tell it to home in on it's owner. You could modify it's AI using PreAI or PostAI, but that might be tricky. Have you tried setting it's type to the type of a projectile that's behaviour is closer to what you want?

It seems that type 301 which is the Paladin's Hammer is one that doesn't bounce on impact, but that may be way too fast for what you want.
 
I need help with this
Code:
Tiles/MLGTileBlock
  at Terraria.ModLoader.Mod.GetTexture(String name)
  at Terraria.ModLoader.ModLoader.GetTexture(String name)
  at Terraria.ModLoader.Mod.SetupContent()
  at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
not too sure if this has already been answered, but it seems that either a mod, or tmod itself has removed aglets, anklets of the wind, and spectre boots as materials, if this is indeed a tmod bug, could it possibly be looked at?
i have the same issue as you. spectre boots doesnt build into anything. i have tremors/thorium etc installed still not fixed
 
Hooks. What are they? You speak about it, but I don't know what is that.
[doublepost=1465562517,1465562265][/doublepost]I bet there is already post about it, but I'm too lazy to find it out. I'm creating boomerang and I want to limit the player, so he could only run one boomerang and wait until it reaches player, and only then he will be able to launch it again.
 
Ah, I don't know about Jeg, however that does explain why those debuffs didn't show for me, but my buff and the 'calmed' buff did show.
Yeah, I did have the Ankh Shield equipped...
My bad. While my buff still isn't working, this just shows that it's my problem and not a problem with tModLoader - so I should be able to fix it. I'll just copy the example mod more closely to see what I'm doing wrong. Thanks guys.

Edit: Yep, it was just me being stupid. Problem solved.
 
Last edited:
How to draw the monster's shadowy trail behind him, like the Corruptor, Possessed Armor, etc.? I found in Terraria source code something like this (it just was for monsters of type Skeletron Prime, Possessed Armor), but when you add in the game does not give the desired effect...

public void UpdateNPC(int i)
{
for (int num74 = npc.oldPos.Length - 1; num74 > 0; num74--)
{
npc.oldPos[num74] = npc.oldPos[num74 - 1];
}
npc.oldPos[0] = npc.position;
}
 
How do you generate ores in-game (similar to breaking Demon Altars) but restricted to certain tile types or regions? A friend is using WorldGen.TileRunner, which provides control over the ore's X and Y positions, but not tile replacement - the ore can spawn in any tile, including furniture.
 
The return speed of each Boomerang is hard-coded into it's AI according to it's type, but most work by reversing it's velocity on impact and setting projectile.ai[0] to 1 to tell it to home in on it's owner. You could modify it's AI using PreAI or PostAI, but that might be tricky. Have you tried setting it's type to the type of a projectile that's behaviour is closer to what you want?

It seems that type 301 which is the Paladin's Hammer is one that doesn't bounce on impact, but that may be way too fast for what you want.

That is a bit fast. So I'm guessing that I'll have to use pre/postAI for this. The problem for me there is that I have never tried to use those and don't know anything that you can do with those or even where to start. I understand it would be tricky, but not impossible, right?
 
I need help with this
Code:
Tiles/MLGTileBlock
  at Terraria.ModLoader.Mod.GetTexture(String name)
  at Terraria.ModLoader.ModLoader.GetTexture(String name)
  at Terraria.ModLoader.Mod.SetupContent()
  at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
This means it can't find the png file in mod Sources/ modnamehere/Tiles/MLGTileBlock.png
i have the same issue as you. spectre boots doesnt build into anything. i have tremors/thorium etc installed still not fixed
Yep, Tremor programming error.
Could somebody help me? I want to make my own custom tile but i dont know how :(
Copy example block. Also, check out my guide in my signature.
Hooks. What are they? You speak about it, but I don't know what is that.
[doublepost=1465562517,1465562265][/doublepost]I bet there is already post about it, but I'm too lazy to find it out. I'm creating boomerang and I want to limit the player, so he could only run one boomerang and wait until it reaches player, and only then he will be able to launch it again.
Hooks is a term for virtual methods that will be invoked by tmodloader when your mod is loaded. Google virtual and override c# for more info. Without "hooks", the code wouldn't be able to call your methods , making them do nothing.

In the can use hook, you need to check the active projectiles in the world. If there is already a projectile of the same type belonging to the player, prevent the item from being used. There should be several examples in this thread, maybe search this thread for them.
How to draw the monster's shadowy trail behind him, like the Corruptor, Possessed Armor, etc.? I found in Terraria source code something like this (it just was for monsters of type Skeletron Prime, Possessed Armor), but when you add in the game does not give the desired effect...

public void UpdateNPC(int i)
{
for (int num74 = npc.oldPos.Length - 1; num74 > 0; num74--)
{
npc.oldPos[num74] = npc.oldPos[num74 - 1];
}
npc.oldPos[0] = npc.position;
}
You need to draw the shadows yourself in predraw, using the oldPos array.
How do you generate ores in-game (similar to breaking Demon Altars) but restricted to certain tile types or regions? A friend is using WorldGen.TileRunner, which provides control over the ore's X and Y positions, but not tile replacement - the ore can spawn in any tile, including furniture.
Use OreRunner in game, not TileRunner.
 
Does anyone think they could give me a more in depth explanation on public static EquipTexture GetEquipTexture(EquipType type, int slot) and
public virtual void SetMatch(bool male, ref int equipSlot, ref bool robes)? Am I supposed to set my own slot for my modded leg texture, then set the equipSlot to that value so the chest has the texture as well...?
 
You need to draw the shadows yourself in predraw, using the oldPos array.

For example... right? :confused:
public override bool PreDraw()
{
for (int num74 = npc.oldPos.Length - 1; num74 > 0; num74--)
{
npc.oldPos[num74] = npc.oldPos[num74 - 1];
}
npc.oldPos[0] = npc.position;
}
I really do not understand how it works, forgive me for my stupidity :(
 
This means it can't find the png file in mod Sources/ modnamehere/Tiles/MLGTileBlock.png

Yep, Tremor programming error.

Copy example block. Also, check out my guide in my signature.

Hooks is a term for virtual methods that will be invoked by tmodloader when your mod is loaded. Google virtual and override c# for more info. Without "hooks", the code wouldn't be able to call your methods , making them do nothing.

In the can use hook, you need to check the active projectiles in the world. If there is already a projectile of the same type belonging to the player, prevent the item from being used. There should be several examples in this thread, maybe search this thread for them.

You need to draw the shadows yourself in predraw, using the oldPos array.

Use OreRunner in game, not TileRunner.
How do I check the active projectiles?.. :confused:
[doublepost=1465575066,1465574894][/doublepost]
I really do not understand how it works, forgive me for my stupidity :(
%D0%9A%D0%BE%D0%BC%D0%B8%D0%BA%D1%81%D1%8B-%D1%85%D0%BE%D0%BB%D0%BE%D0%B4%D0%BD%D1%8B%D0%B5-%D0%BD%D0%BE%D0%B3%D0%B8-%D0%BF%D0%B0%D0%BB%D1%8C%D1%86%D1%8B-%D0%BC%D0%B5%D1%80%D0%B7%D0%BD%D1%83%D1%82-%D0%BB%D0%B5%D0%B9%D0%BA%D0%BE%D1%86%D0%B8%D1%82%D1%8B-%D0%B8-%D1%8D%D1%80%D0%B8%D1%82%D1%80%D0%BE%D1%86%D0%B8%D1%82%D1%8B-%D0%B8-%D1%8F-%D1%85%D0%B7-2116231.jpeg
 
I'm using OnHitAnything to have a certain effect when the player attacks enemies while wearing a set of armour. However, I'd like the make it so that this effect only applies when the player deals melee damage. Is there any way I could check for what type of damage the player is dealing?
Edit: In case a kind soul is seeing this and decides he or she wants to respond, I've already figured this out.
 
Last edited:
Not sure whether this has been reported before but controller support seems to be causing a crash while reloading mods. Specifically, it happens when a world is loaded, exited and then mods are reloaded. To note I was using my keyboard most of the time despite having a controller plugged in and the crash happened essentially every single time conditions mentioned were met. As soon as I unplugged my controller, everything worked fine.

Code:
Indice oltre i limiti della matrice. (Index exceeds matrix dimension)
  in Terraria.GameInput.PlayerInput.GamePadInput()
  in Terraria.GameInput.PlayerInput.UpdateInput()
  in Terraria.Main.do_Update(GameTime gameTime)
  in Terraria.Main.Update(GameTime gameTime)
 
Back
Top Bottom