• Console & Mobile Terrarians - news for 1.4.4.9! iOS and Android 1.4.4.9 out now. PS and Xbox should be very soon. Switch and Amazon are in submission. Great way to end the year - everyone on the same version of Terraria! More details HERE.

Standalone [1.3] tModLoader - A Modding API

Snrasha

Terrarian
Question:
I have create a beam:
laser2g.gif

I use PreDraw for that, but problem, in multiplayer, the others player cannot see that!
And i have not problem with laser create per a npc, but like this is the same than my projectile, i have not idea how display for others players ^^'.
Thank.
 

Dan Yami

Empress of Light
and another question,
i wanna make an accessorie which blocks a debuff, wat do i need to add onto the item to make the debuff un-inflictable??
 

Solo-Ion

Dungeon Spirit
Hi, I've run into a bit of a problem. I've been working on one part of my mod, and recently tested an item that I have had working for months now. It is still working fine in single player, but has stopped working in multiplayer altogether. I did a little bit of debugging, and found that the hook UseItem doesn't seem to be called on a server anymore. I used the following code to test this.
Code:
public override bool UseItem(Player player)
{
    Main.NewText("UseItem");
    Console.WriteLine("UseItem");
//ect...
My mod is kind of dependant of this being called on the server. Is there some reason why this and several other item related hooks are no longer being called on the server, or has Console.WriteLine been disabled somehow?

Thank you for your time.
 

Iriazul

Terrarian
Hi, I've run into a bit of a problem. I've been working on one part of my mod, and recently tested an item that I have had working for months now. It is still working fine in single player, but has stopped working in multiplayer altogether. I did a little bit of debugging, and found that the hook UseItem doesn't seem to be called on a server anymore. I used the following code to test this.
Code:
public override bool UseItem(Player player)
{
    Main.NewText("UseItem");
    Console.WriteLine("UseItem");
//ect...
My mod is kind of dependant of this being called on the server. Is there some reason why this and several other item related hooks are no longer being called on the server, or has Console.WriteLine been disabled somehow?

Thank you for your time.
In my experience, Main.NewText itself should be called on the server (same as when the server displays the chat input of every player).
So if this is never called on the server, my guess is that it never reaches the server(?).
 

Dan Yami

Empress of Light
guys im back and i need help AGAIN.
so, i wanna make a Buff, given by a potion called "Ancient Waters", the Buff is Called Pandolars Blessing and it should give +50 max health, +2 increased regen, and 15% more dmg on everything, ontop of that a sprite is displayed above the buffed player (its a Pandolar God, with little dust below it)

you dont need to put the whole code there for me to copy, u can if u want, but a few codes here and there and explanation where to put em would be nice, i think the stuff with the sprite above the player is similar to how a sprite is displayed on a boss when its low health (like al0n37 showed in his Boss Second Stage video).

thx for the replies! ^-^
 

Joost8910

Dungeon Spirit
Multiple things that I need help with:
1. Making a big mimic
2. Making a custom death animation for an enemy
3. Making an enemy move faster
4. Making and enemy fly towards the player at high speeds when they get too far away and using a custom animation when that happens
 

Lolkat

Skeletron Prime
guys im back and i need help AGAIN.
so, i wanna make a Buff, given by a potion called "Ancient Waters", the Buff is Called Pandolars Blessing and it should give +50 max health, +2 increased regen, and 15% more dmg on everything, ontop of that a sprite is displayed above the buffed player (its a Pandolar God, with little dust below it)

you dont need to put the whole code there for me to copy, u can if u want, but a few codes here and there and explanation where to put em would be nice, i think the stuff with the sprite above the player is similar to how a sprite is displayed on a boss when its low health (like al0n37 showed in his Boss Second Stage video).

thx for the replies! ^-^
I don't know how to do the sprite thing, but this should work for the rest of the stuff.
Code:
public override void Update(Player player, ref int buffIndex)
{
        player.lifeRegen += 2;
        player.statLifeMax2 += 50;
        player.magicDamage += 0.15f;
        player.meleeDamage += 0.15f;
        player.rangedDamage += 0.15f;
        player.thrownDamage += 0.15f;
        player.minionDamage += 0.15f;
}
 

Future_Gamer

Skeletron Prime
............HELP I cant go to Terrarai it not letting me ???

It keep saying go to steam client but I do that and it still NOT working ;-; HELP!!!!
 
Last edited:

Snrasha

Terrarian
I have success, use examplemod:
In ExamplePlayer, this is :
public static readonly PlayerLayer MiscEffects
avec
public override void ModifyDrawLayers(List<PlayerLayer> layers)

After 10 hours of research, and after 1 hour when i have found:
http://imgur.com/ZaL4tLp

You can alone for that without problem.
 

Snrasha

Terrarian
I have say you how --', you have just read the code than i have past you? Just with that, i have create that. (and other thing, also, but not for sprite above player)

You are a coder, you need go alone a day ^^.
 

Dan Yami

Empress of Light
oh, i think i might have confused you, i mean LITERALLY above the player, not above the Player Sprite, it should be HOVERING above the player, like the skull from the ExampleMod, but the Debuff Undead.cs doesnt have anything that helps ._.
 

Snrasha

Terrarian
And yes, you do not understand.

You have just read a small? Why he exist:
public static readonly PlayerLayer MiscEffects

And:
public static readonly PlayerLayer MiscEffectsBack


And why he exist, PreDraw and PostDraw?

You understand now? MiscEffects put above the player, then you decide where you want put the sprite. The MiscEffectsBack put belove the player than you decide where put the sprite.

ExampleMod is ExampleMod, you found all things than you need. (Except new biome)
 
Top Bottom