Jump to content

Recommended Posts

Hello everyone,

hope you had a nice day!

I came here to ask what could be causing that if I cast Aura spell for example, the animation is performed but I don't get any effect or Affect on the character.
It's happening to me across the board on all my characters and I'm not sure where to look next.
I've tried new skill_proto.txt(db no longer in use), however even with the default 40250 version I can't get this effect.
Would anyone know anything else I could try to debug?

Thanks!

Link to comment
https://metin2.dev/topic/33469-spells-arent-being-cast/
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

skill_proto definetly fcked. You don't get the correct affect from the column setAffectFlag. It's possible that the .txt and the source's structure is not the same.

🖥️ SysAdmin — Government (HU)
🛠️ Freelance Metin2 Dev • DevOps
🐧 FreeBSD / Linux | 🛡️ Security & WAF | 🚀 Performance | 🔥 Firewalls | ⚙ Automation
Open to work - Contact me on Discord @matteo_r

Link to comment
https://metin2.dev/topic/33469-spells-arent-being-cast/#findComment-169466
Share on other sites

Hello @Matteo, you might be right.

Would you know, where I could look into the src and find the structure of this table?

I even tried exporting skill_proto from db and exporting it for skilltable.txt, but it's still the same 😕 Even got "find strange game data"

Thanks for any info! 🙂 

Link to comment
https://metin2.dev/topic/33469-spells-arent-being-cast/#findComment-169475
Share on other sites

To be more specific, I found my tokens but, I'm not sure, where it translates to specific "tags"?

enum ESkillTableTokenType
{
    TABLE_TOKEN_TYPE_VNUM,
    TABLE_TOKEN_TYPE_NAME,
    TABLE_TOKEN_TYPE_TYPE,
    TABLE_TOKEN_TYPE_LEVEL_STEP,
    TABLE_TOKEN_TYPE_MAX_LEVEL,
    TABLE_TOKEN_TYPE_LEVEL_LIMIT,
    TABLE_TOKEN_TYPE_POINT_ON,
    TABLE_TOKEN_TYPE_POINT_POLY,
    TABLE_TOKEN_TYPE_SP_COST_POLY,
    TABLE_TOKEN_TYPE_DURATION_POLY,
    TABLE_TOKEN_TYPE_DURATION_SP_COST_POLY,
    TABLE_TOKEN_TYPE_COOLDOWN_POLY,
    TABLE_TOKEN_TYPE_MASTER_BONUS_POLY,
    TABLE_TOKEN_TYPE_ATTACK_GRADE_POLY,
    TABLE_TOKEN_TYPE_FLAG,
    TABLE_TOKEN_TYPE_AFFECT_FLAG,
    TABLE_TOKEN_TYPE_POINT_ON2,
    TABLE_TOKEN_TYPE_POINT_POLY2,
    TABLE_TOKEN_TYPE_DURATION_POLY2,
    TABLE_TOKEN_TYPE_AFFECT_FLAG2,
    TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_VNUM,
    TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_LEVEL,
    TABLE_TOKEN_TYPE_SKILL_TYPE,
    TABLE_TOKEN_TYPE_MAX_HIT,
    TABLE_TOKEN_TYPE_SPLASH_AROUND_DAMAGE_ADJUST_POLY,
    TABLE_TOKEN_TYPE_TARGET_RANGE,
    TABLE_TOKEN_TYPE_SPLASH_RANGE,
    TABLE_TOKEN_TYPE_MAX_NUM,
};

Link to comment
https://metin2.dev/topic/33469-spells-arent-being-cast/#findComment-169476
Share on other sites

7 hours ago, 7teendev said:

To be more specific, I found my tokens but, I'm not sure, where it translates to specific "tags"?

enum ESkillTableTokenType
{
    TABLE_TOKEN_TYPE_VNUM,
    TABLE_TOKEN_TYPE_NAME,
    TABLE_TOKEN_TYPE_TYPE,
    TABLE_TOKEN_TYPE_LEVEL_STEP,
    TABLE_TOKEN_TYPE_MAX_LEVEL,
    TABLE_TOKEN_TYPE_LEVEL_LIMIT,
    TABLE_TOKEN_TYPE_POINT_ON,
    TABLE_TOKEN_TYPE_POINT_POLY,
    TABLE_TOKEN_TYPE_SP_COST_POLY,
    TABLE_TOKEN_TYPE_DURATION_POLY,
    TABLE_TOKEN_TYPE_DURATION_SP_COST_POLY,
    TABLE_TOKEN_TYPE_COOLDOWN_POLY,
    TABLE_TOKEN_TYPE_MASTER_BONUS_POLY,
    TABLE_TOKEN_TYPE_ATTACK_GRADE_POLY,
    TABLE_TOKEN_TYPE_FLAG,
    TABLE_TOKEN_TYPE_AFFECT_FLAG,
    TABLE_TOKEN_TYPE_POINT_ON2,
    TABLE_TOKEN_TYPE_POINT_POLY2,
    TABLE_TOKEN_TYPE_DURATION_POLY2,
    TABLE_TOKEN_TYPE_AFFECT_FLAG2,
    TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_VNUM,
    TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_LEVEL,
    TABLE_TOKEN_TYPE_SKILL_TYPE,
    TABLE_TOKEN_TYPE_MAX_HIT,
    TABLE_TOKEN_TYPE_SPLASH_AROUND_DAMAGE_ADJUST_POLY,
    TABLE_TOKEN_TYPE_TARGET_RANGE,
    TABLE_TOKEN_TYPE_SPLASH_RANGE,
    TABLE_TOKEN_TYPE_MAX_NUM,
};

Check the function which loads the .txt file, its splitting it at tabs so data <tab> data is token <tab> token etc etc.

🖥️ SysAdmin — Government (HU)
🛠️ Freelance Metin2 Dev • DevOps
🐧 FreeBSD / Linux | 🛡️ Security & WAF | 🚀 Performance | 🔥 Firewalls | ⚙ Automation
Open to work - Contact me on Discord @matteo_r

Link to comment
https://metin2.dev/topic/33469-spells-arent-being-cast/#findComment-169484
Share on other sites

I'm trying to find anything, that could tell me, which tokens are actually being checked/used but nothing other then this function I found 😕

Quote

 

bool CPythonSkill::RegisterSkillTable(const char * c_szFileName)
{
    const VOID* pvData;
    CMappedFile kFile;
    if (!CEterPackManager::Instance().Get(kFile, c_szFileName, &pvData))
        return false;

    CMemoryTextFileLoader textFileLoader;
    textFileLoader.Bind(kFile.Size(), pvData);

    std::string src_poly_rand;
    std::string src_poly_atk;
    std::string src_poly_mwep;

    CTokenVector TokenVector;
    for (DWORD i = 0; i < textFileLoader.GetLineCount(); ++i)
    {
        if (!textFileLoader.SplitLineByTab(i, &TokenVector))
            continue;

        std::string strLine = textFileLoader.GetLineString(i);

        if (TABLE_TOKEN_TYPE_MAX_NUM != TokenVector.size())
        {
            Tracef("CPythonSkill::RegisterSkillTable(%s) - Strange Token Count [Line:%d / TokenCount:%d]\n", c_szFileName, i, TokenVector.size());
            continue;
        }

        int iVnum = atoi(TokenVector[TABLE_TOKEN_TYPE_VNUM].c_str());

        TSkillDataMap::iterator itor = m_SkillDataMap.find(iVnum);
        if (m_SkillDataMap.end() == itor)
        {
            Tracef("CPythonSkill::RegisterSkillTable(%s) - NOT EXIST SkillDesc [Vnum:%d Line:%d]\n", c_szFileName, iVnum, i);
            continue;
        }

        TSkillData & rSkillData = itor->second;

        const std::string & c_strSPCostPoly = TokenVector[TABLE_TOKEN_TYPE_SP_COST_POLY];
        if (!c_strSPCostPoly.empty())
        {
            rSkillData.strNeedSPFormula = c_strSPCostPoly;
        }

        const std::string & c_strCooldownPoly = TokenVector[TABLE_TOKEN_TYPE_COOLDOWN_POLY];
        if (!c_strCooldownPoly.empty())
        {
            rSkillData.strCoolTimeFormula = c_strCooldownPoly;
        }

        const std::string & c_strDurationSPCostPoly = TokenVector[TABLE_TOKEN_TYPE_DURATION_SP_COST_POLY];
        if (!c_strDurationSPCostPoly.empty())
        {
            rSkillData.strContinuationSPFormula = c_strDurationSPCostPoly;
        }

        const std::string & c_strTargetRange = TokenVector[TABLE_TOKEN_TYPE_TARGET_RANGE];
        if (!c_strTargetRange.empty())
        {
            rSkillData.dwTargetRange = atoi(c_strTargetRange.c_str());
        }

        rSkillData.strDuration = TokenVector[TABLE_TOKEN_TYPE_DURATION_POLY];


        const DWORD LevelEmpty = 1;

        const std::string & c_strMaxLevel = TokenVector[TABLE_TOKEN_TYPE_MAX_LEVEL];
        if (!c_strMaxLevel.empty())
        {
            int maxLevel = atoi(c_strMaxLevel.c_str());
            if(maxLevel > LevelEmpty)
                rSkillData.byMaxLevel = maxLevel;
        }

        const std::string & c_strLevelLimit = TokenVector[TABLE_TOKEN_TYPE_LEVEL_LIMIT];
        if (!c_strLevelLimit.empty())
        {
            int levelLimit = atoi(c_strLevelLimit.c_str());
            if(rSkillData.byLevelLimit > LevelEmpty)
                rSkillData.byLevelLimit = levelLimit;
        }
        const std::string & c_strPointPoly = TokenVector[TABLE_TOKEN_TYPE_POINT_POLY];

        bool USE_SKILL_PROTO = LocaleService_IsCHEONMA() ? false : true;

        switch (iVnum)
        {
            case 34:
            case 151:
            case 152:
            case 153:
            case 154:
            case 155:
            case 156:
            case 157:
                USE_SKILL_PROTO = false;
                break;
        }

        if (!rSkillData.AffectDataVector.empty() && USE_SKILL_PROTO)
        {
            TAffectData& affect = rSkillData.AffectDataVector[0];

            if (strstr(c_strPointPoly.c_str(), "atk")        != NULL    ||
                strstr(c_strPointPoly.c_str(), "mwep")        != NULL ||
                strstr(c_strPointPoly.c_str(), "number")    != NULL)
            {
                src_poly_rand = "";
                src_poly_atk = "";
                src_poly_mwep = "";

                string_replace_word(c_strPointPoly.c_str(), c_strPointPoly.length(),
                    "number", 6, "min", 3, src_poly_rand);
                string_replace_word(src_poly_rand.c_str(), src_poly_rand.length(),
                    "atk", 3, "minatk", 6, src_poly_atk);
                string_replace_word(src_poly_atk.c_str(), src_poly_atk.length(),
                    "mwep", 4, "minmwep", 7, affect.strAffectMinFormula);

                string_replace_word(c_strPointPoly.c_str(), c_strPointPoly.length(),
                    "number", 6, "max", 3, src_poly_rand);
                string_replace_word(src_poly_rand.c_str(), src_poly_rand.length(),
                    "atk", 3, "maxatk", 6, src_poly_atk);
                string_replace_word(src_poly_atk.c_str(), src_poly_atk.length(),
                    "mwep", 4, "maxmwep", 7, affect.strAffectMaxFormula);

                switch (iVnum)
                {
                    case 1:
                        affect.strAffectMinFormula += "* 3";
                        affect.strAffectMaxFormula += "* 3";
                        break;
                }

            }
            else
            {
                affect.strAffectMinFormula = c_strPointPoly;
                affect.strAffectMaxFormula = "";
            }
        }
    }

    return true;
}

 

If I understand it correctly, it should only need these:

dwVnum,
szPointPoly,
szSPCostPoly,
szCooldownPoly,
szDurationSPCostPoly,
dwTargetRange,
szDurationPoly,
bMaxLevel,
bLevelLimit

But even if I export it, client still end up on "Find strange game data".. 😞

This export will not brick the spells, but still won't get me any effect 😄

  • dwVnum
  • szName
  • bType
  • bLevelStep
  • bMaxLevel
  • bLevelLimit
  • szPointOn
  • szPointPoly
  • szSPCostPoly
  • szDurationPoly
  • szDurationSPCostPoly
  • szCooldownPoly
  • szMasterBonusPoly
  • szAttackGradePoly
  • setFlag
  • setAffectFlag
  • szPointOn2
  • szPointPoly2
  • szDurationPoly2
  • setAffectFlag2
  • szPointOn3
  • szPointPoly3
  • szDurationPoly3
  • szGrandMasterAddSPCostPoly
  • prerequisiteSkillVnum
  • prerequisiteSkillLevel
  • eSkillType
  • iMaxHit
  • szSplashAroundDamageAdjustPoly
  • dwTargetRange
  • dwSplashRange
Link to comment
https://metin2.dev/topic/33469-spells-arent-being-cast/#findComment-169487
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.