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

[OTCv8] Auras and wings

just answered the question of Nokturno
sorry for the confusion. use the gesior with .xml guide

otcv8 is different from mehah client
I didn't find it in the source tfs 1.5 8.0

protocolgame.cpp
C++:
#if CLIENT_VERSION >= 854
    playermsg.addByte(player->canWalkthroughEx(creature) ? 0x00 : 0x01);
#endif

    playermsg.addString(creature->getShader());
    playermsg.addByte(static_cast<uint8_t>(creature->getAttachedEffectList().size()));
    for (const uint16_t id : creature->getAttachedEffectList())
        playermsg.add<uint16_t>(id);
}

void ProtocolGame::AddPlayerStats() const
C++:
 playermsg.addByte(podiumVisible ? static_cast<uint8_t>(podiumVisible->getInt()) : 0x01);
    }
#endif

    playermsg.addString(item->getShader());
}

void ProtocolGame::parseExtendedOpcode(NetworkMessage & msg) const

how to resolve with this?
 
I didn't find it in the source tfs 1.5 8.0

protocolgame.cpp

C++:
 playermsg.addByte(podiumVisible ? static_cast<uint8_t>(podiumVisible->getInt()) : 0x01);
    }
#endif

    playermsg.addString(item->getShader());
}

void ProtocolGame::parseExtendedOpcode(NetworkMessage & msg) const

how to resolve with this?

paste here
this is a "[OTCv8] Auras and wings" post. I only answered Nokturno question. If you have doubts, I recommend that you open another post, so as not to confuse future users who see this post.
 
I still don't know why I haven't announced it yet or made a release, but Mehah does have "attachedeffects"

1.- need this in your server
by mehah

2.- edit this in client
by mehah

3.- and Enable Feature

Lua:
g_game.enableFeature(GameItemShader)
g_game.enableFeature(GameCreatureShader)
g_game.enableFeature(GameCreatureAttachedEffect)

mehah have :
  • attachEffect (Apng(ThingExternalTexture) // dat effect(ThingCategoryEffect) // dat outfit (ThingCategoryCreature) WITH OFFSET
  • shader (map // creature // item // widget )
4.- Edit
A] Client
edit this .lua game_attachedeffects/effects.lua with these functions

Code:
--[[
    register(id, name, thingId, thingType, config)
    config = {
        speed, disableWalkAnimation, shader, drawOnUI, opacity
        duration, loop, transform, hideOwner, size{width, height}
        offset{x, y, onTop}, dirOffset[dir]{x, y, onTop},
        onAttach, onDetach
    }
]] --

B] Server
Example :
Lua:
        player:setShader("Outfit - Rainbow")
        player:attachEffectById(7) -- id is game_attachedeffects/effects.lua
        player:attachEffectById(8) -- id is game_attachedeffects/effects.lua
        player:attachEffectById(9, true) -- Temporary Effect -- id is game_attachedeffects/effects.lua
        player:setMapShader('Map - Heat', true)
Lua:
        item:setShader(<shader name>)
I test in 1.5 nekiro 8.00 and work perfectly


View attachment 75449
one question does this work with effects or the same as aura and wings?
 
one question does this work with effects or the same as aura and wings?

work same. just change Apng(ThingExternalTexture) [image of data/images/game/X/x.png] // dat effect(ThingCategoryEffect) spr of effect label of dat // dat outfit (ThingCategoryCreature) spr of outfit label of dat

example if you have aura or wings in "dat outfit"
ID_DAT_OUTFIT = 1366


1684003806942.png

you need ThingCategoryCreature

AttachedEffectManager.register( ID_client , 'NAME', "ID_DAT_OUTFIT", ThingCategoryCreature, {
dirOffset {
}
})

the code is
Lua:
AttachedEffectManager.register(120, 'Bat Wings', 1366, ThingCategoryCreature, {
    speed = 2,
    dirOffset = {
        [North] = {-16, -0,true},
        [East] = {-10, -0},
        [South] = {-16, -0},
        [West] = {-10, -0}
    }
})


1684004621513.png

if you wonder you can have it at the same time effect, aura and wings ? can


ERROR 502 said:
this is a "[OTCv8] Auras and wings" post. I only answered Nokturno question. If you have doubts, I recommend that you open another post, so as not to confuse future users who see this post.
 
Last edited:
@Error 502 Hello again I have a question, what happens is that e been using the aura and I am realizing that in order to activate the player's outfit must be in outfit.xml if not, the aura is not activated, my question is that I can edit so that it is not so and I can activate the aura in any outfit. I have tfs 1.3 v8 and OtclientV8

Recording 2023-05-15 at 20.24.13.gifRecording 2023-05-15 at 20.26.27.gif
Here I leave 2 gif showing when I do not have outfit and when I have
 
Hello, I managed to compile my origin (source code), but I'm having difficulties in assembling wings and auras, among others. Can someone help me? I activated V8 and nothing works.. just mounts work normally.. I wanted auras and wings...
g_game.enableFeature(GameWingsAndAura)
g_game.enableFeature(GameOutfitShaders)
g_game.enableFeature(GameWingOffset)
 
Hello, I managed to compile my origin (source code), but I'm having difficulties in assembling wings and auras, among others. Can someone help me? I activated V8 and nothing works.. just mounts work normally.. I wanted auras and wings...

change this
Lua:
        if (outfit.lookWings != 0) {
        Wing* wing = wings.getWingByID(outfit.lookWings);
to
Lua:
    if (outfit.lookWings != 0) {
        Wing* wing = wings.getWingByClientID(outfit.lookWings);

change this
Lua:
Aura* aura = auras.getAuraByID(outfit.lookAura);
to
Lua:
Aura* aura = auras.getAuraByClientID(outfit.lookAura);
 
change this
Lua:
        if (outfit.lookWings != 0) {
        Wing* wing = wings.getWingByID(outfit.lookWings);
to
Lua:
    if (outfit.lookWings != 0) {
        Wing* wing = wings.getWingByClientID(outfit.lookWings);

change this
Lua:
Aura* aura = auras.getAuraByID(outfit.lookAura);
to
Lua:
Aura* aura = auras.getAuraByClientID(outfit.lookAura);
now yes it worked fine thank you very much!!!
 
what is the function to add wings to the player? Like, player:addWings? And player:addAuras?
Because I'm trying to put a system in which the player clicks on the item to get wings and auras, in addition to having a store that will deliver. Would it be necessary to use wingId and auraId?
 
Basi
what is the function to add wings to the player? Like, player:addWings? And player:addAuras?
Because I'm trying to put a system in which the player clicks on the item to get wings and auras, in addition to having a store that will deliver. Would it be necessary to use wingId and auraId?
Basically copy/paste Player.hasMount and Player.addMount to replicate aura, wings, shader.
 
you can share ??
What would you like to share? It's already here, isn't it? Or do you want a function to add to the player? If so, it's available here.
 
Last edited:
hellow i can tried to add it but I have a problem. Here are the mistakes

/home/Naruto/src/protocolgame.cpp: In member function ‘void ProtocolGame::parseSetOutfit(NetworkMessage&)’:
/home/Naruto/src/protocolgame.cpp:839:24: error: ‘otclientV8’ was not declared in this scope
839 | newOutfit.lookWings = otclientV8 ? msg.get<uint16_t>() : 0;
| ^~~~~~~~~~
/home/Naruto/src/protocolgame.cpp: In member function ‘void ProtocolGame::parseToggleMount(NetworkMessage&)’:
/home/Naruto/src/protocolgame.cpp:851:6: error: ‘otclientV8’ was not declared in this scope
851 | if (otclientV8 >= 254) {
| ^~~~~~~~~~
/home/Naruto/src/protocolgame.cpp: In member function ‘void ProtocolGame::sendOutfitWindow()’:
/home/Naruto/src/protocolgame.cpp:2857:5: error: ‘otclientV8’ was not declared in this scope
2857 | if (otclientV8) {
| ^~~~~~~~~~
/home/Naruto/src/protocolgame.cpp: In member function ‘void ProtocolGame::AddOutfit(NetworkMessage&, const Outfit_t&)’:
/home/Naruto/src/protocolgame.cpp:3149:6: error: ‘otclientV8’ was not declared in this scope
3149 | if (otclientV8) {
| ^~~~~~~~~~
 
I've never tested/added that feature on any server, but with links you will find in this thread multiple OTSes made it 'work'.

What are auras?
It's extra outfit in .dat/.spr rendered before (default)/after rendering player outfit. Ex. of aura with both effect:
View attachment 74195
  • before (under) outfit: fire effect on ground
  • after (on top of) outfit: fire effect on legs/body

What are wings?
Name says everything. That are wings rendered like 3rd addon on player's outfit back, but with possibility to wear same wings with any outfit (not assigned to 1 outfit like addon). In .dat/.spr it's just another outfit.
It's hard to use wings without 'Bones' feature in .dat, that let you position wings for every outfit (set offset for north/east/south/west directions). Someone sells DatEditor with that 'Bones' feature. I don't remember who.

How to add auras and wings to your server?
First you need to apply changes on server side for these systems (TFS 1.x example code):
Then you must edit file modules/game_features/features.lua in OTCv8:
and under:
Lua:
-- you can add custom features here, list of them is in the modules\gamelib\const.lua
add:
Lua:
g_game.enableFeature(GameWingsAndAura)
It's enables basic version of Auras and Wings. Auras are rendered before (below) outfit of player.
Config of auras in on server in file data/XML/auras.xml ex.:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<auras>
    <aura id="1" clientid="368" name="Widow Queen" speed="20" />
    <aura id="2" clientid="369" name="Racing Bird" speed="20" />
    <aura id="3" clientid="370" name="War Bear" speed="20" />
</auras>
Player with 'Aura ID 1' will get extra 20 speed and in OTCv8 it will render outfit 368 under his outfit. In outfit 368 you must put animation of aura you want to add to player.

There are also other features you can enable, to change rendering of Auras:
1. Draw aura after outfit (on top of it):
Lua:
GameDrawAuraOnTop = 109
2. Use 2 layers of outfit from .dat/.spr to draw single aura before and after outfit (below it and on top of it):
Lua:
GameAuraFrontAndBack = 115 -- To use that: First layer is bottom/back, second (blend layer) is top/front
3. I don't know what it is, but someone needed it, so it's in OTCv8:
Lua:
GameBigAurasCenter = 119 -- Automatic negative offset for aura bigger than 32x32

Everything perfectly working, until showing on the Otcv8, it shows correctly but choosing the wings and pressing "ok" nothing happens.
What i missed ?
 
change this
Lua:
        if (outfit.lookWings != 0) {
        Wing* wing = wings.getWingByID(outfit.lookWings);
to
Lua:
    if (outfit.lookWings != 0) {
        Wing* wing = wings.getWingByClientID(outfit.lookWings);

change this
Lua:
Aura* aura = auras.getAuraByID(outfit.lookAura);
to
Lua:
Aura* aura = auras.getAuraByClientID(outfit.lookAura);
@alejandro762 You must make a change here in your font for it to work.
 
Back
Top