• 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 remove blood from corpse

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
993
Solutions
5
Reaction score
55
Hello,
so race="blood" after you die makes blood appear on your corpses so i im trying to remove that blood splash from specific monster so i did corpse="0" so corpse wont appear on creature after he die but the problem is that blood still appears so how can i remove it? P.S need to keep same physical style dmg. USING TFS 1.2
 
Solution
You can make it with source edits game.cpp
C++:
void Game::combatGetTypeInfo(CombatType_t combatType, Creature* target, TextColor_t& color, uint8_t& effect)
{
    switch (combatType) {
        case COMBAT_PHYSICALDAMAGE: {
            Item* splash = nullptr;
            switch (target->getRace()) {
                case RACE_VENOM:
                    color = TEXTCOLOR_LIGHTGREEN;
                    effect = CONST_ME_HITBYPOISON;
                    splash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_SLIME);
                    break;
                case RACE_BLOOD:
                    color = TEXTCOLOR_RED;
                    effect = CONST_ME_DRAWBLOOD;
                    if (const Tile* tile = target->getTile()) {...
You can make it with source edits game.cpp
C++:
void Game::combatGetTypeInfo(CombatType_t combatType, Creature* target, TextColor_t& color, uint8_t& effect)
{
    switch (combatType) {
        case COMBAT_PHYSICALDAMAGE: {
            Item* splash = nullptr;
            switch (target->getRace()) {
                case RACE_VENOM:
                    color = TEXTCOLOR_LIGHTGREEN;
                    effect = CONST_ME_HITBYPOISON;
                    splash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_SLIME);
                    break;
                case RACE_BLOOD:
                    color = TEXTCOLOR_RED;
                    effect = CONST_ME_DRAWBLOOD;
                    if (const Tile* tile = target->getTile()) {
                        if (!tile->hasFlag(TILESTATE_PROTECTIONZONE)) {
                            splash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_BLOOD);
                        }
That's how it looks like in 1.3, It shouldn't be so different in 1.2 just remove the line
C++:
splash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_BLOOD);
And keep race in monster blood normal but that will make no blood at all for all monsters.
 
Last edited:
Solution
maybe
monsters.h line 691
Code:
    if ((attr = monsterNode.attribute("race"))) {
        std::string tmpStrValue = asLowerCaseString(attr.as_string());
        uint16_t tmpInt = pugi::cast<uint16_t>(attr.value());
        if (tmpStrValue == "none" || tmpInt == 0) {
            mType->info.race = RACE_NONE;
        } else if (tmpStrValue == "venom" || tmpInt == 1) {
            mType->info.race = RACE_VENOM;
        } else if (tmpStrValue == "blood" || tmpInt == 2) {
            mType->info.race = RACE_BLOOD;
        } else if (tmpStrValue == "undead" || tmpInt == 3) {
            mType->info.race = RACE_UNDEAD;
        } else if (tmpStrValue == "fire" || tmpInt == 4) {
            mType->info.race = RACE_FIRE;
        } else if (tmpStrValue == "energy" || tmpInt == 5) {
            mType->info.race = RACE_ENERGY;
        } else {
            std::cout << "[Warning - Monsters::loadMonster] Unknown race type " << attr.as_string() << ". " << file << std::endl;
        }
    }

and add race="none" or race="0"
 
Last edited:
race="none"
Do not exist
maybe
monsters.h line 691
Code:
    if ((attr = monsterNode.attribute("race"))) {
        std::string tmpStrValue = asLowerCaseString(attr.as_string());
        uint16_t tmpInt = pugi::cast<uint16_t>(attr.value());
        if (tmpStrValue == "none" || tmpInt == 0) {
            mType->info.race = RACE_NONE;
        } else if (tmpStrValue == "venom" || tmpInt == 1) {
            mType->info.race = RACE_VENOM;
        } else if (tmpStrValue == "blood" || tmpInt == 2) {
            mType->info.race = RACE_BLOOD;
        } else if (tmpStrValue == "undead" || tmpInt == 3) {
            mType->info.race = RACE_UNDEAD;
        } else if (tmpStrValue == "fire" || tmpInt == 4) {
            mType->info.race = RACE_FIRE;
        } else if (tmpStrValue == "energy" || tmpInt == 5) {
            mType->info.race = RACE_ENERGY;
        } else {
            std::cout << "[Warning - Monsters::loadMonster] Unknown race type " << attr.as_string() << ". " << file << std::endl;
        }
    }

and add race="none" or race="0"
To add new race it would require not just monster.h edit, im pretty sure
 
if it is the only thing that you should edit.
You mean it is? But anyway i edited RACE_UNDEAD since i dont use it to make it same as a "Blood" type hit just without blood, just wasnt able to figure out how to add blood splash when you hit a damage.
 
If you search carefully in all its sources, the only relationship with the race, you can find it in the game.cpp file
the race is only a reference for monsters, so the game knows whether it should create blood or not, as well as the effects of the blows.

Code:
void Game::combatGetTypeInfo(CombatType_t combatType, Creature* target, TextColor_t& color, uint8_t& effect)
 
If you search carefully in all its sources, the only relationship with the race, you can find it in the game.cpp file
the race is only a reference for monsters, so the game knows whether it should create blood or not, as well as the effects of the blows.

Code:
void Game::combatGetTypeInfo(CombatType_t combatType, Creature* target, TextColor_t& color, uint8_t& effect)
Yea i know thats why i did
C++:
                case RACE_UNDEAD:
                color = TEXTCOLOR_RED;
                effect = CONST_ME_DRAWBLOOD;
                splash = Item::CreateItem(ITEM_SMALLSPLASH);
I though it will create blood splash when i deal a hit, but it created blue blood splash lul
 
you must add the color to the function.
per example:
Code:
FLUID_GREEN,
FLUID_BLOOD

that:
Code:
splash = Item::CreateItem(ITEM_SMALLSPLASH, FLUID_BLOOD);
 
Back
Top