Jump to content


Photo

monster_abilities.lua missing all Fomor abilities causing runtime errors.


21 replies to this topic

#1 Skyrant

Skyrant

    Member

  • Members
  • PipPip
  • 27 posts

    Posted 31 October 2014 - 11:34 AM

    OhShi is causing runtime errors when mobs use abilities not in the monster_abilities.lua file.
     
    >> OhShi: Lua error (runtime) - ohshi/helper_functions.lua:62: attempt to index field '?' (a nil value)
     
    This should either be "try/catched" and handled or the abilities should be added to the monster_abilities.lua file.
     
    I have put in some debug code to find out what these are and they should be added as these mobs are all over dynamis (Hydra) and other areas of the game. I don't know anything but  the ID and english name though:
     
    [243] = {id=243,en="Aegis Shism",ja=""},
    [244] = {id=244,en="Dancing Chains",ja=""},
    [248] = {id=248,en="Grim Halo",ja=""},
    [249] = {id=248,en="Nether Spikes",ja=""},
    [250] = {id=250,en="Carnal Nightmare",ja=""},
    [251] = {id=251,en="Aegis Shism",ja=""},
    [252] = {id=252,en="Dancing Chains",ja=""},
    [253] = {id=253,en="Barbed Crescent",ja=""},
    [255] = {id=255,en="Dimensional Death",ja=""},
     
    PS: There are likely more and i will add them once i find them.


    #2 Arcon

    Arcon

      Advanced Member

    • Windower Staff
    • 1189 posts
    • LocationMunich, Germany

    Posted 31 October 2014 - 07:42 PM

    Monster abilities are gathered from the DAT files, if those are not in there they're either stored in a different location or our parser is broken in some way. I can examine it at some point, but I have some other things to look into atm. If you wanna take a look yourself, you can find it here.



    #3 Skyrant

    Skyrant

      Member

    • Members
    • PipPip
    • 27 posts

      Posted 01 November 2014 - 12:09 AM

      Yes they are missing you can verify by attacking a Samurai type mob in dynamis and have him use his 2h. (make sure OhShi is active to actually get the error).

       

      Is there a reason there are no abilities below ID 256? Looks really weird to me as these are ALL below ID 256.



      #4 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 01 November 2014 - 06:29 AM

      Yes they are missing you can verify by attacking a Samurai type mob in dynamis and have him use his 2h. (make sure OhShi is active to actually get the error).

       

      It's not that I didn't believe you :) Was just saying, we didn't compile them manually, but extract them from the DATs, and that presents us with two possible "error" cases. Although now I don't think it's an error at all that they are missing, see below.

       

      Is there a reason there are no abilities below ID 256? Looks really weird to me as these are ALL below ID 256.

       

      What I believe is going on is that those aren't actually monster abilities in that sense, but rather weapon skills that happen to be used by monsters (they are humanoid monsters after all). Here is an excerpt from the end of weapon_skills.lua:

       

      [241] = {id=241,en="Netherspikes",ja="剣山獄",element=6,icon_id=46,prefix="/weaponskill",range=7,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [242] = {id=242,en="Carnal Nightmare",ja="白昼夢",element=6,icon_id=46,prefix="/weaponskill",range=7,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [243] = {id=243,en="Aegis Schism",ja="破鎧陣",element=6,icon_id=46,prefix="/weaponskill",range=7,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [244] = {id=244,en="Dancing Chains",ja="舞空鎖",element=6,icon_id=46,prefix="/weaponskill",range=7,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [245] = {id=245,en="Barbed Crescent",ja="偃月刃",element=6,icon_id=46,prefix="/weaponskill",range=11,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [246] = {id=246,en="Shackled Fists",ja="連環拳",element=6,icon_id=46,prefix="/weaponskill",range=2,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [247] = {id=247,en="Foxfire",ja="跳狐斬",element=6,icon_id=46,prefix="/weaponskill",range=2,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [248] = {id=248,en="Grim Halo",ja="輪天殺",element=6,icon_id=46,prefix="/weaponskill",range=2,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [249] = {id=249,en="Netherspikes",ja="剣山獄",element=6,icon_id=46,prefix="/weaponskill",range=7,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [250] = {id=250,en="Carnal Nightmare",ja="白昼夢",element=6,icon_id=46,prefix="/weaponskill",range=7,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [251] = {id=251,en="Aegis Schism",ja="破鎧陣",element=6,icon_id=46,prefix="/weaponskill",range=7,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [252] = {id=252,en="Dancing Chains",ja="舞空鎖",element=6,icon_id=46,prefix="/weaponskill",range=7,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [253] = {id=253,en="Barbed Crescent",ja="偃月刃",element=6,icon_id=46,prefix="/weaponskill",range=11,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [254] = {id=254,en="Vulcan Shot",ja="バルカンショット",element=6,icon_id=46,prefix="/weaponskill",range=12,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},
          [255] = {id=255,en="Dimensional Death",ja="次元殺",element=6,icon_id=46,prefix="/weaponskill",range=2,skillchain_a="",skillchain_b="",skillchain_c="",targets=32},


      #5 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 01 November 2014 - 06:37 AM

      Damn it, for some reason it cut off most of my post.... hate this shitty editor <_<

       

      Anyway, the reason for the above is that monster abilities and weapon skills are parsed from the same DAT (partially anyway, monster abilities are actually constructed from two DATs, this one contains certain monstrosity-related abilities) and later split up into different categories in the post-processing step. As you can see this is a general DAT for ability-type actions, it includes job abilities, job traits, weapon skills and monster abilities. However, the latter two are not continuous, they are actually quite far apart in the DAT. It's actually a coincidence that one starts where the other ends here (or well, probably not a coincidence but unrelated to the problem). After the separation step, monster abilities start at 0 as well, however we then manually shift them all up by 0x100. This is done so their ID matches the ID in the packet and in memory, so it's easier to use them and not have users manually have to add the offset every time it needs to use the resources.

       

      Tl;dr you can fix it by making it check for weapon skills if the ID is lower than 0x100, since that means it cannot possibly be a monster ability.



      #6 Skyrant

      Skyrant

        Member

      • Members
      • PipPip
      • 27 posts

        Posted 02 November 2014 - 12:11 PM

        Doing a check on ID would be one dirty solution but the question is: Do we really need to differentiate between /weaponskill and /monsterskill for the purpose of the monster_ability.lua? Mobs can use all player weapon skills as abilities so it should be in that file too.

         

        Tried fixing it by checking for typ = 'ws' but this will not work since Condemnation and Hecatomb wave are classified as 'ws' but is not in the weapon_skills resource but in the monster_abilities resource.

         

        Another reason to have all the abilities/spells/weaponskills in the monster_ability.lua

         

        KaFqey6.png



        #7 Arcon

        Arcon

          Advanced Member

        • Windower Staff
        • 1189 posts
        • LocationMunich, Germany

        Posted 02 November 2014 - 06:10 PM

        There is little sense in combining the two. It's not intuitive (since they're different in players' minds) and aside from them using a distinct ID pool there's no connection the two have.



        #8 Iryoku

        Iryoku

          Advanced Member

        • Windower Staff
        • 488 posts

          Posted 03 November 2014 - 07:25 AM

          Specifically, there are different sets of packets for each, and different offsets need to be applied to the different sets of abilities. Even though they are in the same .DAT file leaving them in the same resource just complicates things for addon devs.

           

          However, this may be a case where the data should be duplicated. I haven't looked into this enough to say for sure.



          #9 Skyrant

          Skyrant

            Member

          • Members
          • PipPip
          • 27 posts

            Posted 03 November 2014 - 03:04 PM

            It is fixed now by checking for <= 255 but there is something fundamentally wrong in the whole processing if the type is reported as "ws" although whatever the mob used is in the monster abilities resource.



            #10 Iryoku

            Iryoku

              Advanced Member

            • Windower Staff
            • 488 posts

              Posted 03 November 2014 - 07:41 PM

              Please, feel free to submit a patch for ResourceExtractor.



              #11 Arcon

              Arcon

                Advanced Member

              • Windower Staff
              • 1189 posts
              • LocationMunich, Germany

              Posted 03 November 2014 - 08:01 PM

              I'm not sure if that's really a resource issue... how does it determine whether or not it's WS? I don't think it's a Windower thing, it's probably a DynamisHelper issue.



              #12 Iryoku

              Iryoku

                Advanced Member

              • Windower Staff
              • 488 posts

                Posted 04 November 2014 - 07:10 AM

                The real problem is that RE has no way to determine if a weapon skill a monster-only weapon skill or not.

                 

                All spells, abilities, traits, weapon skills, and monster abilities are loaded from a single file DAT# 0051. At this point none of them have any names, and we also split things into two categories, spells, and actions, with actions being a combined list of all abilities, traits, weapon skills, and monster abilities. Next we load all of the following string table files into lists for the post-processing step to combine with the data from DAT# 0051

                 

                EN   JP
                1B7B 1B7A Monster Abilities                   # All of the other monster-only abilities live in here
                D966 D8EE Regions
                D971 D8F9 Auto-translation Strings
                D98F D917 Key Items
                D995 D91D Abilities, Traits, Weapon Skills    # The ones you say are missing live in here
                D996 D91E Spells
                D998 D920 Titles
                D8A9 D8EF Area Names (D8AA is also loaded for EN search names)
                D9AD D935 Status Effects
                D8AB D8F0 Job Names (D8AC is also loaded for EN abbreviations)
                 
                The post-processing step further subdivides the actions into separate ability, trait, and weapon skill lists, and applies adjustments to the IDs so that they match the IDs used in packets.
                 
                There is no obvious way tell, at any point in this process, that Netherspikes is a monster-only weapon skill, or that Aeolian Edge can be used by players short of hardcoding the distinction into fixes.xml, and you haven't made a compelling argument that we should do that.


                #13 Skyrant

                Skyrant

                  Member

                • Members
                • PipPip
                • 27 posts

                  Posted 05 November 2014 - 09:45 AM

                  Don't get me wrong, i am not trying to be difficult here just trying to figure out if there might be a smarter way to do this as it is a fact that mobs use ALL player weaponskills (go to inner ra'kaznar and fight some fomors there, they use all player WS). It is also a fact that Aegis Schism is not a player weapon skill. It is a monster ability yet it lives in the weapon_skills.lua

                   

                  ----

                   

                  So the question remains: Does it make sense to duplicate the weapon_skills.lua into the monster_abilities.lua?

                   

                  ----

                   

                  This of cause can all be fixed by putting some checks into every AddOn that uses these resources (ID <= 255) but they would not have to do that if it where duplicated and it might be more transparent for future AddOn development.

                   

                  Just my 2 cents.



                  #14 Arcon

                  Arcon

                    Advanced Member

                  • Windower Staff
                  • 1189 posts
                  • LocationMunich, Germany

                  Posted 06 November 2014 - 06:22 AM

                  Personally I think that there are three things we can do, I'll comment on each of them:
                  1. Nothing. I don't think leaving it as it is is really a bad choice, the amount of work to do for addons that worry about it is minimal, and this conserves the logical separation of the two categories.

                  2. Duplicate weapon skills into monster_abilities.lua for IDs < 256. This would save a little bit of work and it would make sense since "monsters" are also able to use them (if you consider Fomors monsters, more technically: "enemies").

                  3. Reduce the ID for everything in monster_abilities.lua by 256 and completely separate it from weapon skills. This would have no direct benefit for developers (on the contrary, they'd have to subtract 0x100 from the value in the packet), but it mirrors how the game handles it internally and clearly indicates what is what because values above and under 256 have to be treated differently. The only reason we increased it by that amount in the first place was as a convenience for addon developers, but as a result we have contaminated the resources in the sense that it takes more manual adjustment of the data and that monster_abilities.lua are the only resources that do not start at 0, despite starting at 0 internally.

                   

                  Due to the effect the third option would have on currently released addons, I'd recommend against doing that, although if we ever start from scratch I'd be voting for that. Could keep that in mind for v5.

                   

                  Also, Aegis Schism is technically a weapon skill, not a monster "ability" although the latter term isn't well defined. Point is, it's in the DAT category for weapon skills and not in the DAT category for monster abilities. Also only "monsters" with weapons (i.e. Fomors, which I wouldn't call monsters, lore-wise) can use it. That it does not depend on the weapon is a technicality as much as the opposite.

                   

                  Anyway, I'm open for suggestions about what to do. Let me know your opinions.



                  #15 Iryoku

                  Iryoku

                    Advanced Member

                  • Windower Staff
                  • 488 posts

                    Posted 06 November 2014 - 11:53 AM

                    I think that resources should mirror the packets. Each distinct ID range used by packets should be a separate resource. Duplication should only occur if a subrange of one resource is utilized by a second packet with a different id offset.



                    #16 Skyrant

                    Skyrant

                      Member

                    • Members
                    • PipPip
                    • 27 posts

                      Posted 06 November 2014 - 03:23 PM

                      It's really simple.

                       

                      From a developer point of view if i include the monster_ability resource i expect all packets that monsters would send to be defined there. Currently this is not the case and i have to take a leap to actually find out that all these packets are defined in the weapon_skill resource which for me logically belongs to the player.

                       

                      It's no problem leaving it as it is but it is far from logical from an API perspective.



                      #17 Iryoku

                      Iryoku

                        Advanced Member

                      • Windower Staff
                      • 488 posts

                        Posted 06 November 2014 - 08:06 PM

                        It's really simple.
                         
                        From a developer point of view if i include the monster_ability resource i expect all packets that monsters would send to be defined there. Currently this is not the case and i have to take a leap to actually find out that all these packets are defined in the weapon_skill resource which for me logically belongs to the player.
                         
                        It's no problem leaving it as it is but it is far from logical from an API perspective.

                         
                        Sorry, but no, this is not how it's intended to work. Resources are not intended to be broken into groups from a conceptual point of view. They are intended to reflect the way the game actually represents things, either in memory or in packets. If the game uses a single set of IDs to represent spells and abilities, then that's the way resources would be structured. It doesn't. Spells and abilities have separate overlapping ranges of IDs, so we reflect with two separate resources. The weapon_skill resource doesn't belong to the player, it belongs to a specific class of action packet regardless of the entity that generated it. So it really comes down to two possibilities:

                        • The same category action packet is used both for enemies using "weapon skills" and for enemies using "monster abilities" for whatever definition of those terms you want to use, and/or the ID ranges do not overlap or conflict in any way.
                          In these cases the resources can and usually should be combined.
                           
                        • Different categories of action packets are used for these things.
                          When this is the case the resources should not be combined, even if it seems like it would make sense on a conceptual level.

                        In some cases these rules are not followed for historical reasons. As I no longer play, and it has been too long for me to remember details like this, I'm not sure which of these cases would most apply here. I suspect the first would apply in this case, but someone else is going to need to confirm this. I seem to recall something to do with monstrosity being the reason the monster abilities were split off in the first place though, so that would need to be checked. BattleMod is also likely going to be affected by any change we make here, so the cost of making the change now is very high. It may be better to put off any change until the next major release.



                        #18 Byrth

                        Byrth

                          Advanced Member

                        • Members
                        • PipPipPip
                        • 85 posts

                          Posted 06 November 2014 - 09:03 PM

                          The values from the monster_abilities and weaponskills resources are both used to fill the same special character code in SE's message .dats. Right now Battlemod does just use a < 256 filter to determine which resource to pull from, but it does make sense to keep them separate because they are in separate .dats, are handled differently by packets, and so forth. For instance, there is a packet that tells you which job abilities, traits, and weaponskills you currently have access to. Monster abilities aren't in that packet and are unlocked by a completely separate packet.

                           

                          Here is how the system probably works:

                          A : weaponskill .dat - This contains humanoid usable weaponskills, complete with all the normal ability information.

                          B : monster_ability .dat #1 - This is basically just a string table of the TP move names that monsters use. It was sufficient pre-monstrosity and is probably still what SE uses to decode action packet messages.

                          C : monster_ability .dat #2 - This contains monstrosity usable weaponskills, complete with all the normal ability information.

                           

                          At the moment we merge B and C. Merging A, B, and C (or A and C) would probably be an option, but it would destroy the distinctions that the game makes between official weapon skills and their jury rigged Monstrosity system. There are times when you just want weaponskills or just want monsterabilities, so I'd vote we keep them separate and just use <256 for action packets, which are the only place I know of that treats the resources as being combined.



                          #19 mujihina

                          mujihina

                            Newbie

                          • Members
                          • Pip
                          • 6 posts

                            Posted 06 November 2014 - 09:17 PM

                            Couldn't you just use the category value in the action event to figure out which resource to check when the move finishes?

                             

                            Category values:

                             

                            1. ??
                            i.e. 3 vs 6 vs 11, etc?


                            #20 Byrth

                            Byrth

                              Advanced Member

                            • Members
                            • PipPipPip
                            • 85 posts

                              Posted 06 November 2014 - 09:51 PM

                              No, because some actions have a category that doesn't match their resource. For instance, Jump and Mug are both abilities that generate Category 3 packets.

                               

                              If you want to know what resource you should use, you need to look at the special characters in the message. In cases where there is no message, I've also seen no evidence that SE knows exactly which ability/ws is being used.






                              1 user(s) are reading this topic

                              0 members, 1 guests, 0 anonymous users