• 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!

Solved remove default combat effects

whitevo

Feeling good, thats what I do.
Joined
Jan 2, 2015
Messages
3,454
Solutions
1
Reaction score
627
Location
Estonia
I find it quite annoying that every time I want to some certain type of damage it always comes with the default magic effect.

Where in source I can remove them so that if I use this function, there wont be any fire effect on target.
doTargetCombatHealth(cid, targetID, FIRE, min, max, effect, origin)

Also the other thing what is bugging me is that, if effect is nil. it also crashes the client.
doTargetCombatHealth(cid, targetID, type, min, max, NIL, origin)

It would be awesome If function looks like this doTargetCombatHealth(cid, targetID, type, damage, origin)
But it would be good enough if all types would loose their DEFAULT effect
 
I find it quite annoying that every time I want to some certain type of damage it always comes with the default magic effect.

Where in source I can remove them so that if I use this function, there wont be any fire effect on target.
doTargetCombatHealth(cid, targetID, FIRE, min, max, effect, origin)

Also the other thing what is bugging me is that, if effect is nil. it also crashes the client.
doTargetCombatHealth(cid, targetID, type, min, max, NIL, origin)

It would be awesome If function looks like this doTargetCombatHealth(cid, targetID, type, damage, origin)
But it would be good enough if all types would loose their DEFAULT effect
Did you try CONST_ME_NONE?
 
@whitevo It's simple to do, you need to add empty effect in tibia.dat, then you need register it in sources, for example:
const.h
Code:
CONST_ME_CONFETTI_HORIZONTAL = 75,
CONST_ME_CONFETTI_VERTICAL = 76,
CONST_ME_EMPTY = 77,   --- this is empty effect
Then you need to change default effect for your damage type, for example:
game.cpp
Code:
case COMBAT_EARTHDAMAGE: {
            color = TEXTCOLOR_LIGHTGREEN;
            effect = CONST_ME_EMPTY;   --- here you set default effect
            break;
        }
That's all.
Tested on TFS 1.0! For 99,99%, it will work also on other versions :)
Cheers.
 
Last edited:
no idea how do to that, but would this work?

Code:
case COMBAT_EARTHDAMAGE: {
            color = TEXTCOLOR_LIGHTGREEN;
            effect = CONST_ME_NONE;
            break;
        }
No, I don't know why at all, but I had same problem at 0.3 version.

I checked TFS 1.2 sources.
If you can see, in your const.h, there are already empty effects, so you don't have to add new one in tibia.dat:
Code:
// 77-157 are empty
So just do like I said, register effect number 77:
Code:
CONST_ME_EMPTY = 77,
and set default effect like this:
Code:
case COMBAT_EARTHDAMAGE: {
            color = TEXTCOLOR_LIGHTGREEN;
            effect = CONST_ME_EMPTY;
            break;
        }

My english isn't good, but I hope you understood! :)
 
Last edited:
no idea how do to that, but would this work?

Code:
case COMBAT_EARTHDAMAGE: {
            color = TEXTCOLOR_LIGHTGREEN;
            effect = CONST_ME_NONE;
            break;
        }
Thats a hacky solution, creating new combats just to have a combat with no effect is stupid.
The function is bugged, it should force the magic effect not add another above it. So i'm fixing it and sending a pull request, plus I'm adding a new effect "CONST_ME_DEFAULT", that will use the default effect from the combat and not force anything (Kinda what const_me_none is doing now).
 
@whitevo It's simple to do, you need to add empty effect in tibia.dat, then you need register it in sources, for example:
const.h
Code:
CONST_ME_CONFETTI_HORIZONTAL = 75,
CONST_ME_CONFETTI_VERTICAL = 76,
CONST_ME_EMPTY = 77,   --- this is empty effect
Then you need to change default effect for your damage type, for example:
game.cpp
Code:
case COMBAT_EARTHDAMAGE: {
            color = TEXTCOLOR_LIGHTGREEN;
            effect = CONST_ME_EMPTY;   --- here you set default effect
            break;
        }
That's all.
Tested on TFS 1.0! For 99,99%, it will work also on other versions :)
Cheers.
Cheers.
 
Back
Top