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

Change damage numbers to text (example 10000 to 10k) [TFS 1.4]

beenii

Well-Known Member
Joined
Jul 26, 2010
Messages
580
Solutions
1
Reaction score
57
Hey I'm wondering if its possible to change damage numbers to text instead. When the damage getting dealt is above 1,000,000 it would say 1m instead and then 1,1m 1,2m etc... Is that possible?


where in the source can i change to damage text?
I use otclient I have the doSendAnimatedText function

and for the official tibia 12 client, I plan to use:
TALKTYPE_MONSTER_SAY
 
Can someone tell me where in the source code the damage is sent in numbers, to try to modify it? :)
 
In earlier client versions the server would send damage numbers as floating/animated text to the client so changing "10000" to "10k" would be a small change. In the current version it seems that damage numbers are sent as extra data in ProtocolGame::sendTextMessage so it's no longer trivial to do the same change.

You said you'd use TALKTYPE_MONSTER_SAY to send the numbers but then you'd need to send extra status messages to keep those "You lose X hitpoints ...." log messages and also figure a way to differentiate normal damage, mana damage, healing, and mana drains/gains.

To wrap it, the TextMessage struct is filled in Game::combatChangeHealth and Game::combatChangeMana (in game.cpp) and sent by ProtocolGame::sendTextMessage (in protocolgame.cpp) so these are the functions you may want to look into.
 
In earlier client versions the server would send damage numbers as floating/animated text to the client so changing "10000" to "10k" would be a small change. In the current version it seems that damage numbers are sent as extra data in ProtocolGame::sendTextMessage so it's no longer trivial to do the same change.

You said you'd use TALKTYPE_MONSTER_SAY to send the numbers but then you'd need to send extra status messages to keep those "You lose X hitpoints ...." log messages and also figure a way to differentiate normal damage, mana damage, healing, and mana drains/gains.

To wrap it, the TextMessage struct is filled in Game::combatChangeHealth and Game::combatChangeMana (in game.cpp) and sent by ProtocolGame::sendTextMessage (in protocolgame.cpp) so these are the functions you may want to look into.
Thank you I'll check it to see if I can do it


If I'm correct 10.98 preserves animated text, and can I use strings there for damage?
 
Back
Top