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

Damage format

limen

New Member
Joined
Feb 6, 2025
Messages
8
Reaction score
0
Hello.
I would like to change the format of damage/healing in my TFS 1.42 10.98. For example, instead of 1000, I would like to display -1k, and instead of 15,300, I would like to display -15.3k.
Would it be easier to do this on the OTClient side or the server side? Any Tips?
 
Solution
Do you know where I can look for displayed damage and healing in OTClient?
look for
LUA:
case Otc::MessageDamageDealed:

and change value that is passed to
Code:
g_map.addAnimatedText(std::make_shared<AnimatedText>(std::to_string(value[j]), color[j]), pos);
change it to sum like this

Code:
#include <iomanip>
#include <sstream>

case Otc::MessageDamageDealed:
case Otc::MessageDamageReceived:
case Otc::MessageDamageOthers:
{
    const auto& pos = getPosition(msg);
    std::array<uint32_t, 2> value{};
    std::array<uint8_t, 2> color{};

    // physical damage
    value[0] = msg->getU32();
    color[0] = msg->getU8();

    // magic damage
    value[1] = msg->getU32();
    color[1] = msg->getU8();
    text =...
Back
Top