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

How to change offset for (EFFECT AND OUTFITS)

Tbol

Well-Known Member
Joined
Apr 7, 2019
Messages
529
Reaction score
56
TFS1.2
OTCV8

Is there a way to change offsets for OUTFITS and EFFECTS? Tried using objectbuilder feature but it doesnt support negative values
 
For effects u just wanna change the pos it will be casted on like


Lua:
local pos = creature:getPosition()
    pos.x = pos.x + 1
    pox.y = pos.y + 1

depends on how big is ur effect just play around with it

if u use otcv8 impretty sure its implemented but if u use different u have to add it to src for outfits
 
For effects u just wanna change the pos it will be casted on like


Lua:
local pos = creature:getPosition()
    pos.x = pos.x + 1
    pox.y = pos.y + 1

depends on how big is ur effect just play around with it

if u use otcv8 impretty sure its implemented but if u use different u have to add it to src for outfits
What if that effect is casted trough source? or w/e multiple luas. So you have to add everytime creature:getPosition? Sounds like a hard way. About outfits i have no idea thats why i created this thread
 
You would need to change the object builder and otcv8 source to accept negative offset. I don't know if there is another way to change it.
 
Stop bumping, don't you get it already? Without client source edits you can't achieve that. You would need to tweak rendering part of tiles too, otherwise tiles that are rendered first (so the one to the right and down from effect/outfit position) will cover these effects and outfits. It's already done in OTCv8, you can change that rendering just by enabling game feature but negative offsets are not supported.
 
Last edited:
What if that effect is casted trough source? or w/e multiple luas. So you have to add everytime creature:getPosition?
As it's just for your ots, not official implementation, you can edit protocolgame.cpp code that send effects to client. Put there list of effect IDs that should get tile offset -1x, -1y, so all effects send by source and LUA will get 1 tile offset.
 
As it's just for your ots, not official implementation, you can edit protocolgame.cpp code that send effects to client. Put there list of effect IDs that should get tile offset -1x, -1y, so all effects send by source and LUA will get 1 tile offset.
Is there a code example?
 
Back
Top