Standalone [1.3] tModLoader - A Modding API

I have a quick question, will it be fine if i have tModLoader installed and opened and join the normal server that was hosted with normal terraria. By "will it be fine" i mean will it be consider cheating/will it change the gameplay on the server ?
It won't work on purpose.
 
Need help with making ore spawn once i destroy an alter,
So basically i was told to do this or something like this

get a GlobalTile, then call the KillMultiTile Hook
then check
if (tile.type = TileID.Altar)
or something, then activate something like a bool in the ModWorld
then generate the ore if that Bool is true

I undersand whats being said but have no idea how to go about it.
 
According to the date that Bluemagic123 posted this thread, it has been a full year since its release! Hooray! (Please tell me if this is true)
 
does anyone know how i can add a dust to a player/npc under a buff/debuff??

i would like to make a buff called "PhasedFlames" draining 8 hp per sec and displaying a light blue particle

thx for the replies
 
In the buff:
Code:
        public override void Update(Player player, ref int buffIndex)
        {
        ...
        ...
        //Example:
if (Main.rand.Next(10) == 0)
{
int idx= Dust.NewDust(player.position, player.width, player.height, DustID.Electric);
Main.dust[idx].noGravity = true;
}
        }
Normally, no problem, this is functionnal.
You apply same thing with the method:
public override void Update(NPC npc, ref int buffIndex)
 
thanks for your help m8!
i have another question, how do i display a sprite above a buffed/debuffed npc/player??

(also i will add Helper Items to my mod, as thx for everyone who helps ;D)
 
npc.lifeRegen and player.lifeRegen .

You can put lifeRegen-=8 or lifeRegen=-8 , second for example is the poison, etc where you cannot regen, the first, if you have more than 8hp per seconde, you have now 0 hp per second. Always people use second, i think.


For display a sprite above a player, this is more complex and i have not time explain now (i need go sleep, ah ah).
 
where exactly do i put it??

using Terraria;
using Terraria.ModLoader;
using SacredTools.NPCs;

namespace SacredTools.Buffs
{
public class PhaseFlames : ModBuff
{
public override void SetDefaults()
{
Main.buffName[Type] = "Phasing Flames";
Main.buffTip[Type] = "Losing life";
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = true;
//here???
}

public override void Update(Player player, ref int buffIndex)
{


//Example:
if (Main.rand.Next(1) == 0)
{
int idx= Dust.NewDust(player.position, player.width, player.height, mod.DustType("PandolarDust"));
Main.dust[idx].noGravity = true;
//or here??
}
}

public override void Update(NPC npc, ref int buffIndex)
{
//Example:
if (Main.rand.Next(1) == 0)
{
int idx= Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("PandolarDust"));
Main.dust[idx].noGravity = true;
}
}
}
}
 
npc.lifeRegen=-8; on Update for npc and same thing for player x) , but not in the if(rand)

and oh, Main.rand.Next(1) == 0 is a classic error for a beginner.


In all code, when you put a max value, this is the limit. Because always begin to 0. So your if(Main.rand.Next(1)==0) is just a if(TRUE) so go that. You need put 2, not 1
 
public override void Update(NPC npc, ref int buffIndex)
{
//Example:
if (Main.rand.Next(1) == 0)
{
int idx= Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("PandolarDust"));
Main.dust[idx].noGravity = true;
}
npc.lifeRegen=-8;
}

like this??
 
ok
[doublepost=1468024021,1468023911][/doublepost]also is it possible to create biomes yet?
and, i wanna make a ore which spreads over obsidian kinda like chlorophyte does on mud
[doublepost=1468024197][/doublepost]hmmmm..... i did the thing like you said... but it only does one damage to the debuffed NPCs
 
also, could someone help me wih this sprite?? im good at weapons and stuff, but Town NPCs are hard to sprite ._.

everyone who helps will get credited!
 

Attachments

  • an unfinished pandolar NPC 2.png
    an unfinished pandolar NPC 2.png
    6.9 KB · Views: 180
Back
Top Bottom