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

missing nightmare outfit/addons [TFS 1.2]

skic

Member
Joined
Aug 15, 2020
Messages
58
Reaction score
13
Hey guys I'm missing nightmare outfits/addons, can someone explain to me how I can add this outfit? Which file I have to edit?

Here's my outfit.xml:
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<outfits>
    <!-- Female outfits -->
    <outfit type="0" looktype="136" name="Citizen" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="137" name="Hunter" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="138" name="Mage" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="139" name="Knight" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="140" name="Noblewoman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="141" name="Summoner" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="142" name="Warrior" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="147" name="Barbarian" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="148" name="Druid" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="149" name="Wizard" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="150" name="Oriental" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="155" name="Pirate" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="156" name="Assassin" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="157" name="Beggar" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="158" name="Shaman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="252" name="Norsewoman" premium="yes" unlocked="yes" enabled="yes" />

    <!-- Male outfits -->
    <outfit type="1" looktype="128" name="Citizen" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="129" name="Hunter" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="130" name="Mage" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="131" name="Knight" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="132" name="Nobleman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="133" name="Summoner" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="134" name="Warrior" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="143" name="Barbarian" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="144" name="Druid" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="145" name="Wizard" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="146" name="Oriental" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="151" name="Pirate" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="152" name="Assassin" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="153" name="Beggar" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="154" name="Shaman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="251" name="Norseman" premium="yes" unlocked="yes" enabled="yes" />
</outfits>

Thanks
 
Solution
Ye I'm using celohere/forgottenserver (https://github.com/celohere/forgottenserver), its ninjalulz dowgrade but celohere is maintaining it.
Post automatically merged:

Outfit.cpp
Lua:
/**

#include "otpch.h"

#include "outfit.h"

#include "pugicast.h"
#include "tools.h"

bool Outfits::loadFromXml()
{
    pugi::xml_document doc;
    pugi::xml_parse_result result = doc.load_file("data/XML/outfits.xml");
    if (!result) {
        printXMLError("Error - Outfits::loadFromXml", "data/XML/outfits.xml", result);
        return false;
    }

    for (auto outfitNode : doc.child("outfits").children()) {
        pugi::xml_attribute attr;
        if ((attr = outfitNode.attribute("enabled")) && !attr.as_bool()) {
            continue;
        }...
Look type for Nightmare outfit are 268/269



How does Norseman showing then? Can you paste your outfits.xml?

Are you using custom spr/otb?

Norserman is normal.

Lua:
<?xml version="1.0" encoding="UTF-8"?>
<outfits>
    <!-- Female outfits -->
    <outfit type="0" looktype="136" name="Citizen" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="137" name="Hunter" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="138" name="Mage" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="139" name="Knight" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="140" name="Noblewoman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="141" name="Summoner" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="142" name="Warrior" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="147" name="Barbarian" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="148" name="Druid" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="149" name="Wizard" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="150" name="Oriental" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="155" name="Pirate" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="156" name="Assassin" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="157" name="Beggar" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="158" name="Shaman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="252" name="Norsewoman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="0" looktype="269" name="Nightmare" premium="yes" unlocked="yes" enabled="yes" />

    <!-- Male outfits -->
    <outfit type="1" looktype="128" name="Citizen" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="129" name="Hunter" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="130" name="Mage" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="131" name="Knight" premium="no" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="132" name="Nobleman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="133" name="Summoner" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="134" name="Warrior" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="143" name="Barbarian" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="144" name="Druid" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="145" name="Wizard" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="146" name="Oriental" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="151" name="Pirate" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="152" name="Assassin" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="153" name="Beggar" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="154" name="Shaman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="251" name="Norseman" premium="yes" unlocked="yes" enabled="yes" />
    <outfit type="1" looktype="268" name="Nightmare" premium="yes" unlocked="y" enabled="yes" />
</outfits>

I'm using OTclientv8 with files from 8.0 client.
Post automatically merged:

Nightmare outfit was added in 7.9 so It should be there.
 
If you delete one outfit (norseman for example) and add the nightmare - does it work?

I guess you are using ninjalulz downgrade? May want to check if there is any hardcoded limit for outfits.
 
If you delete one outfit (norseman for example) and add the nightmare - does it work?

I guess you are using ninjalulz downgrade? May want to check if there is any hardcoded limit for outfits.

Ye I'm using celohere/forgottenserver (https://github.com/celohere/forgottenserver), its ninjalulz dowgrade but celohere is maintaining it.
Post automatically merged:

Outfit.cpp
Lua:
/**

#include "otpch.h"

#include "outfit.h"

#include "pugicast.h"
#include "tools.h"

bool Outfits::loadFromXml()
{
    pugi::xml_document doc;
    pugi::xml_parse_result result = doc.load_file("data/XML/outfits.xml");
    if (!result) {
        printXMLError("Error - Outfits::loadFromXml", "data/XML/outfits.xml", result);
        return false;
    }

    for (auto outfitNode : doc.child("outfits").children()) {
        pugi::xml_attribute attr;
        if ((attr = outfitNode.attribute("enabled")) && !attr.as_bool()) {
            continue;
        }

        if (!(attr = outfitNode.attribute("type"))) {
            std::cout << "[Warning - Outfits::loadFromXml] Missing outfit type." << std::endl;
            continue;
        }

        uint16_t type = pugi::cast<uint16_t>(attr.value());
        if (type > PLAYERSEX_LAST) {
            std::cout << "[Warning - Outfits::loadFromXml] Invalid outfit type " << type << "." << std::endl;
            continue;
        }

        pugi::xml_attribute lookTypeAttribute = outfitNode.attribute("looktype");
        if (!lookTypeAttribute) {
            std::cout << "[Warning - Outfits::loadFromXml] Missing looktype on outfit." << std::endl;
            continue;
        }

        outfits[type].emplace_back(
            outfitNode.attribute("name").as_string(),
            pugi::cast<uint16_t>(lookTypeAttribute.value()),
            outfitNode.attribute("premium").as_bool(),
            outfitNode.attribute("unlocked").as_bool(true)
        );
    }
    return true;
}

const Outfit* Outfits::getOutfitByLookType(PlayerSex_t sex, uint16_t lookType) const
{
    for (const Outfit& outfit : outfits[sex]) {
        if (outfit.lookType == lookType) {
            return &outfit;
        }
    }
    return nullptr;
}


Outfit.h

Code:
#ifndef FS_OUTFIT_H_C56E7A707E3F422C8C93D9BE09916AA3
#define FS_OUTFIT_H_C56E7A707E3F422C8C93D9BE09916AA3

#include "enums.h"

struct Outfit {
    Outfit(std::string name, uint16_t lookType, bool premium, bool unlocked) : name(name), lookType(lookType), premium(premium), unlocked(unlocked) {}

    std::string name;
    uint16_t lookType;
    bool premium;
    bool unlocked;
};

struct ProtocolOutfit {
    ProtocolOutfit(const std::string* name, uint16_t lookType, uint8_t addons) : name(name), lookType(lookType), addons(addons) {}

    const std::string* name;
    uint16_t lookType;
    uint8_t addons;
};

class Outfits
{
    public:
        static Outfits* getInstance() {
            static Outfits instance;
            return &instance;
        }

        bool loadFromXml();

        const Outfit* getOutfitByLookType(PlayerSex_t sex, uint16_t lookType) const;
        const std::vector<Outfit>& getOutfits(PlayerSex_t sex) const {
            return outfits[sex];
        }

    private:
        std::vector<Outfit> outfits[PLAYERSEX_LAST + 1];
};

#endif

Btw nothing happens if I delete Norserman, Nightmare then look just like shaman.
 
Last edited:
Ye I'm using celohere/forgottenserver (https://github.com/celohere/forgottenserver), its ninjalulz dowgrade but celohere is maintaining it.
Post automatically merged:

Outfit.cpp
Lua:
/**

#include "otpch.h"

#include "outfit.h"

#include "pugicast.h"
#include "tools.h"

bool Outfits::loadFromXml()
{
    pugi::xml_document doc;
    pugi::xml_parse_result result = doc.load_file("data/XML/outfits.xml");
    if (!result) {
        printXMLError("Error - Outfits::loadFromXml", "data/XML/outfits.xml", result);
        return false;
    }

    for (auto outfitNode : doc.child("outfits").children()) {
        pugi::xml_attribute attr;
        if ((attr = outfitNode.attribute("enabled")) && !attr.as_bool()) {
            continue;
        }

        if (!(attr = outfitNode.attribute("type"))) {
            std::cout << "[Warning - Outfits::loadFromXml] Missing outfit type." << std::endl;
            continue;
        }

        uint16_t type = pugi::cast<uint16_t>(attr.value());
        if (type > PLAYERSEX_LAST) {
            std::cout << "[Warning - Outfits::loadFromXml] Invalid outfit type " << type << "." << std::endl;
            continue;
        }

        pugi::xml_attribute lookTypeAttribute = outfitNode.attribute("looktype");
        if (!lookTypeAttribute) {
            std::cout << "[Warning - Outfits::loadFromXml] Missing looktype on outfit." << std::endl;
            continue;
        }

        outfits[type].emplace_back(
            outfitNode.attribute("name").as_string(),
            pugi::cast<uint16_t>(lookTypeAttribute.value()),
            outfitNode.attribute("premium").as_bool(),
            outfitNode.attribute("unlocked").as_bool(true)
        );
    }
    return true;
}

const Outfit* Outfits::getOutfitByLookType(PlayerSex_t sex, uint16_t lookType) const
{
    for (const Outfit& outfit : outfits[sex]) {
        if (outfit.lookType == lookType) {
            return &outfit;
        }
    }
    return nullptr;
}


Outfit.h

Code:
#ifndef FS_OUTFIT_H_C56E7A707E3F422C8C93D9BE09916AA3
#define FS_OUTFIT_H_C56E7A707E3F422C8C93D9BE09916AA3

#include "enums.h"

struct Outfit {
    Outfit(std::string name, uint16_t lookType, bool premium, bool unlocked) : name(name), lookType(lookType), premium(premium), unlocked(unlocked) {}

    std::string name;
    uint16_t lookType;
    bool premium;
    bool unlocked;
};

struct ProtocolOutfit {
    ProtocolOutfit(const std::string* name, uint16_t lookType, uint8_t addons) : name(name), lookType(lookType), addons(addons) {}

    const std::string* name;
    uint16_t lookType;
    uint8_t addons;
};

class Outfits
{
    public:
        static Outfits* getInstance() {
            static Outfits instance;
            return &instance;
        }

        bool loadFromXml();

        const Outfit* getOutfitByLookType(PlayerSex_t sex, uint16_t lookType) const;
        const std::vector<Outfit>& getOutfits(PlayerSex_t sex) const {
            return outfits[sex];
        }

    private:
        std::vector<Outfit> outfits[PLAYERSEX_LAST + 1];
};

#endif

Btw nothing happens if I delete Norserman, Nightmare then look just like shaman.
Nightmare outfit was added in 8.1 version not in 7.9.
 
Last edited:
Solution
According to Tibia wiki, it was 7.9.

View attachment 49163
Well ,this information is wrong .
 
Well ,this information is wrong .

hmm, I guess it is wrong then. They should update that.
 
hmm, I guess it is wrong then. They should update that.
If you want to be certain that it exists in your .spr file, pull it up in Object Builder and see whether or not the looktype exists

 
Back
Top