• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Adding Source for custom spell effect

Exiled Pain

Fervid Learner
Joined
Jan 8, 2008
Messages
552
Reaction score
4
Sup, before anything else I post this here to make it clear cause Im not asking on a tutorial on how adding a sprite images nor spell effects into DAT editor, I would like to ask: What's needed or how to validate a new spell effect.

This is my problem:
I created new spell graphic (sprites) to add to my server, tryed to create them from scratch validating them in SOURCE and in Global.lua (or its correspondent equal depending on TFS version)... but the spell effect won't work... but if I go and replace in dateditor an existing effect, it will display the new graphics of the custom spell.. so the problem is not the graphic format nor nothing like that, I must be missing some scripting (not spell scripting that done already) just to me the effect work.. or source editing to make it work.

So could someone please help me in a step by step basis to what do I need to do to add the new effects and make them work in game.

Thanks in advance, been looking for this for months but no one has been up to the challenge nor knows how. Hope someone does this time.
 
i have tried it like billions but i think its impossible you cant add new effects you can only replace other animations with new ones :(
 
Any source experts out there that could lend a hand... must be possible, but hard... please help.
 
I'm not a Source Expert, but I think you only need to change here(const.h):

PHP:
enum MagicEffectClasses
{
	NM_ME_DRAW_BLOOD	= 0x00,
	NM_ME_LOSE_ENERGY	= 0x01,
	NM_ME_POFF		= 0x02,
	NM_ME_BLOCKHIT		= 0x03,
	NM_ME_EXPLOSION_AREA	= 0x04,
	NM_ME_EXPLOSION_DAMAGE	= 0x05,
	NM_ME_FIRE_AREA		= 0x06,
	NM_ME_YELLOW_RINGS	= 0x07,
	NM_ME_POISON_RINGS	= 0x08,
	NM_ME_HIT_AREA		= 0x09,
	NM_ME_TELEPORT		= 0x0A, //10
	NM_ME_ENERGY_DAMAGE	= 0x0B, //11
	NM_ME_MAGIC_ENERGY	= 0x0C, //12
	NM_ME_MAGIC_BLOOD	= 0x0D, //13
	NM_ME_MAGIC_POISON	= 0x0E, //14
	NM_ME_HITBY_FIRE	= 0x0F, //15
	NM_ME_POISON		= 0x10, //16
	NM_ME_MORT_AREA		= 0x11, //17
	NM_ME_SOUND_GREEN	= 0x12, //18
	NM_ME_SOUND_RED		= 0x13, //19
	NM_ME_POISON_AREA	= 0x14, //20
	NM_ME_SOUND_YELLOW	= 0x15, //21
	NM_ME_SOUND_PURPLE	= 0x16, //22
	NM_ME_SOUND_BLUE	= 0x17, //23
	NM_ME_SOUND_WHITE	= 0x18, //24
	NM_ME_BUBBLES		= 0x19, //25
	NM_ME_CRAPS		= 0x1A, //26
	NM_ME_GIFT_WRAPS	= 0x1B, //27
	NM_ME_FIREWORK_YELLOW	= 0x1C, //28
	NM_ME_FIREWORK_RED	= 0x1D, //29
	NM_ME_FIREWORK_BLUE	= 0x1E, //30
	NM_ME_STUN		= 0x1F, //31
	NM_ME_SLEEP		= 0x20, //32
	NM_ME_WATERCREATURE	= 0x21, //33
	NM_ME_GROUNDSHAKER	= 0x22, //34
	NM_ME_HEARTS		= 0x23, //35
	NM_ME_FIREATTACK	= 0x24, //36
	NM_ME_ENERGY_AREA	= 0x25, //37
	NM_ME_SMALLCLOUDS	= 0x26, //38
	NM_ME_HOLYDAMAGE	= 0x27, //39
	NM_ME_BIGCLOUDS		= 0x28, //40
	NM_ME_ICEAREA		= 0x29, //41
	NM_ME_ICETORNADO	= 0x2A, //42
	NM_ME_ICEATTACK		= 0x2B, //43
	NM_ME_STONES		= 0x2C, //44
	NM_ME_SMALLPLANTS	= 0x2D, //45
	NM_ME_CARNIPHILA	= 0x2E, //46
	NM_ME_PURPLEENERGY	= 0x2F, //47
	NM_ME_YELLOWENERGY	= 0x30, //48
	NM_ME_HOLYAREA		= 0x31, //49
	NM_ME_BIGPLANTS		= 0x32, //50
	NM_ME_CAKE		= 0x33, //51
	NM_ME_GIANTICE		= 0x34, //52
	NM_ME_WATERSPLASH	= 0x35, //53
	NM_ME_PLANTATTACK	= 0x36, //54
	NM_ME_TUTORIALARROW	= 0x37, //55
	NM_ME_TUTORIALSQUARE	= 0x38, //56
	NM_ME_MIRRORHORIZONTAL	= 0x39, //57
	NM_ME_MIRRORVERTICAL	= 0x3A, //58
	NM_ME_SKULLHORIZONTAL	= 0x3B, //59
	NM_ME_SKULLVERTICAL	= 0x3C, //60
	NM_ME_ASSASSIN		= 0x3D, //61
	NM_ME_STEPSHORIZONTAL	= 0x3E, //62
	NM_ME_BLOODYSTEPS	= 0x3F, //63
	NM_ME_STEPSVERTICAL	= 0x40, //64
	NM_ME_YALAHARIGHOST	= 0x41, //65
	NM_ME_BATS		= 0x42, //66
	NM_ME_SMOKE		= 0x43, //67
	NM_ME_LAST		= NM_ME_SMOKE,

	//for internal use, dont send to client
	NM_ME_NONE		= 0xFF,
	NM_ME_UNK		= 0xFFFF
};

if you want to add another effect:
PHP:
enum MagicEffectClasses
{
	...
	NM_ME_BATS		= 0x42, //66
	NM_ME_SMOKE		= 0x43, //67
	NM_ME_NEW1		= 0x44, //68
	NM_ME_NEW2		= 0x45, //69
	NM_ME_LAST		= NM_ME_NEW2,
	...
};

I think I only did this when I added about 6 or 7 new effects on my 8.1 Server way back, but I'm not sure...

Note: Dont forget that the effects are counted in Hexadecimal Format, so if you want to add another one after 49, it must be 4A,4B,4C,4D,4E,4F,50,51,...)
 
thanks I'll test in this next days and if it works you will be my personal OT hero... :thumbup: let you know if it does.
 
Nope... not working. Added also the effect name into constant.lua and the spell hits but the effect doesn't show. =( (and yes I added the sprite files also).

Any ideas?
Maybe have to add something somewhere else, besides const.h and constant.lua? someplace that registers the effect timing or some block somewhere that limits numer of spells like the limit on outfits maybe? Hope someone could help this is important for me, Im even willing to pay for this info (that much I need this)
 
Last edited:
G..... MAN!!! Finally someone came to my aid... I really apreciate this, if you have a paypal account pm, as a thanks I would like to donate something to you...;) if not, at least give me a link or where to go to REP ++ you.

This means a lot, Im really great full guys.
 
Back
Top