• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 1.X+ How to set effect to correct order in TFS 1.5

mano368

Senior Support Team Member
Staff member
Support Team
Joined
Sep 2, 2011
Messages
672
Solutions
50
Reaction score
321
Location
Brazil
How to solve this problem? Anyone knows how to make effect work in correct order?

When you use exori vis, the energy spark appear below of teleport effect, but the correct way is the energy spark appear on top.

Tested in tfs 1.5 nekiro down 7.72

Thanks in advance!
 
Solution
I'd change order of execution here:

In some OTClient there's a logic to re-draw these effects in reverse order so once you fix it for CIP it won't work for OTClient ;)

Simply comment out:
C++:
/*
    if (params.impactEffect != CONST_ME_NONE) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
*/

And put this at the end of Combat::doAreaCombat
C++:
    for (Tile* tile : tiles) {
        if (canDoCombat(caster, tile, params.aggressive) !=...
if we do that, spells like utevo lux and others loose the blue/green/red effect, so we need to change:
C++:
/*
    if (params.impactEffect != CONST_ME_NONE) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
*/

to

C++:
    if (params.impactEffect == CONST_ME_MAGIC_BLUE || params.impactEffect == CONST_ME_MAGIC_RED || params.impactEffect == CONST_ME_MAGIC_GREEN) {
        Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
    }
I tried your code and tried pasted fragment of code from lursky and it works, but only for me as a player. Problem is beginning when any monster trying to attack me. Then I don't see some spells efect throwing by monsters. For example my Enlightmenet of the Cult:
XML:
<attack name="drunk" interval="2000" chance="10" range="7" target="1" duration="20000">
            <attribute key="shootEffect" value="energy"/>
            <attribute key="areaEffect" value="teleport" />
        </attack>
I see energy shot, but i don't see teleport effect, or spell from other monster - Lost Soul:
XML:
<attack name="speed" interval="2000" chance="10" radius="8" target="0" minspeedchange="-750" maxspeedchange="-700" duration="4000">
            <attribute key="areaEffect" value="yellowbubble" />
        </attack>

Here I don't see yellow bubble effect everywhere, but I see paralyze condition on myself.

P.S. I use TFS 1.5 downgrade by Nekiro 8.0 and official client Tibia 8.0
 
I tried your code and tried pasted fragment of code from lursky and it works, but only for me as a player. Problem is beginning when any monster trying to attack me. Then I don't see some spells efect throwing by monsters. For example my Enlightmenet of the Cult:
XML:
<attack name="drunk" interval="2000" chance="10" range="7" target="1" duration="20000">
            <attribute key="shootEffect" value="energy"/>
            <attribute key="areaEffect" value="teleport" />
        </attack>
I see energy shot, but i don't see teleport effect, or spell from other monster - Lost Soul:
XML:
<attack name="speed" interval="2000" chance="10" radius="8" target="0" minspeedchange="-750" maxspeedchange="-700" duration="4000">
            <attribute key="areaEffect" value="yellowbubble" />
        </attack>

Here I don't see yellow bubble effect everywhere, but I see paralyze condition on myself.

P.S. I use TFS 1.5 downgrade by Nekiro 8.0 and official client Tibia 8.0
That ia not the right fix for the problem, I even said that... now I use something different, I'll try to share as soon as possible and wait for a feedback with tests from you.
 
@kibo433
combat.cpp:

change:
C:
combatTileEffects(spectators, caster, target->getTile(), params);

for:
C:
if (params.impactEffect != CONST_ME_NONE) {
    Game::addMagicEffect(spectators, target->getTile()->getPosition(), params.impactEffect);
}

search for:
C:
combatTileEffects(spectators, caster, tile, params);

paste after(if you delete combattileeffects magicwall and others will not work):
C:
if (params.impactEffect != CONST_ME_NONE) {
    Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
}

Remember to keep the changes that Lursky gave
Check if everything is working, get back to you with feedback after testing
 
@kibo433
combat.cpp:

change:
C:
combatTileEffects(spectators, caster, target->getTile(), params);

for:
C:
if (params.impactEffect != CONST_ME_NONE) {
    Game::addMagicEffect(spectators, target->getTile()->getPosition(), params.impactEffect);
}

search for:
C:
combatTileEffects(spectators, caster, tile, params);

paste after(if you delete combattileeffects magicwall and others will not work):
C:
if (params.impactEffect != CONST_ME_NONE) {
    Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
}

Remember to keep the changes that Lursky gave
Check if everything is working, get back to you with feedback after testing
I come back with feedback, after testing. With Lursky's method and this:

change:
C:
combatTileEffects(spectators, caster, target->getTile(), params);

for:
C:
if (params.impactEffect != CONST_ME_NONE) {
    Game::addMagicEffect(spectators, target->getTile()->getPosition(), params.impactEffect);
}

M Wall working correctly, but I don't see visual effect like a yellow bubble from Lost Soul for example, but paralyze condition is appears. I don't see some visual effect from monsters, but it causes intended actions like a paralyze or any conditions.

After adding this:

search for:
C:
combatTileEffects(spectators, caster, tile, params);

paste after(if you delete combattileeffects magicwall and others will not work):
C:
if (params.impactEffect != CONST_ME_NONE) {
    Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
}

Everything works fine. If I will see some problems or bugs in future I will inform you. Thanks for code.
 
I come back with feedback, after testing. With Lursky's method and this:

change:
C:
combatTileEffects(spectators, caster, target->getTile(), params);

for:
C:
if (params.impactEffect != CONST_ME_NONE) {
    Game::addMagicEffect(spectators, target->getTile()->getPosition(), params.impactEffect);
}

M Wall working correctly, but I don't see visual effect like a yellow bubble from Lost Soul for example, but paralyze condition is appears. I don't see some visual effect from monsters, but it causes intended actions like a paralyze or any conditions.

After adding this:

search for:
C:
combatTileEffects(spectators, caster, tile, params);

paste after(if you delete combattileeffects magicwall and others will not work):
C:
if (params.impactEffect != CONST_ME_NONE) {
    Game::addMagicEffect(spectators, tile->getPosition(), params.impactEffect);
}

Everything works fine. If I will see some problems or bugs in future I will inform you. Thanks for code.
right, that's right, you need both changes to stop the lack of effect, as for mw, it just wouldn't appear if you removed the second change, in the first you change it, in the second you just paste it below
 
Back
Top