Jump to content


Photo

Target by ID or Index


    19 replies to this topic

    #1 Wabafet

    Wabafet

      Newbie

    • Members
    • Pip
    • 3 posts

      Posted 14 May 2015 - 04:32 AM

      Hello,

       

        I have recently started developing addons and haven't been able to figure something out.  Is there a way to target something in game with its ID or index?  All I have managed to find is for the reverse.  I could cycle targets to find the matching IDs but I was hoping there was a better way.  Also, what is the difference between a character's id or index?

       

      Thank you



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 14 May 2015 - 06:35 AM

      windower.ffxi.get_mob_by_id(id)
      windower.ffxi.get_mob_by_index(index)

       

      The index is the position of an NPC or PC in the zone's entity array. For mobs and friendly NPCs it's always the same value, for players and pets it differs based on when they spawned into the zone. For mobs and friendly NPCs it's a value between 0x000 and 0x400, for players it's between 0x400 and 0x700 and for pets it's between 0x700 and 0x800.

       

      The ID is a globally constant value for both NPCs and PCs. While NPCs have a constant index as well, the ID is the constant for PCs as well, even across servers. For players it's a value between 0x00000000 and 0x00FFFFFF, for NPCs it's anything above that. The first byte is 0x01 for almost every NPC. If it's 0x01, then the structure is as follows:

      0xAABBBCCC

       

      Here AA is 1, BBB is the zone ID and CCC is the NPC's index. For example if we take the ID of Harvetour in West Ronfaure, which is 17187549, and convert it to a hexadecimal value, we get 0x010642DD. If we split it up into the three parts as defined above, we get 0x01 for AA, 0x064 for BBB and 0x2DD for CCC. 0x064 is 100, which is West Ronfaure's zone ID, 0x2DD is 733, which is the Harvetour's index.

       

      This only works for NPCs where the AA part is 1. There are certain mobs that have 2 for the first byte, which are all (to my knowledge) in Meeble Burrows, and there are a few other NPCs (like certain doors) that have 4 for the first byte. They may not follow the same pattern.



      #3 Wabafet

      Wabafet

        Newbie

      • Members
      • Pip
      • 3 posts

        Posted 14 May 2015 - 07:09 AM

        Sorry, I should have been more specific.  I was wondering if there is a way to target a character given its ID or index.  For example, while two-boxing if I could pass the index of a monster I have targetted via an ipc message and have the other character target it for a spell.

         

        Thank you for the explanation of those, it makes perfect sense now.



        #4 Arcon

        Arcon

          Advanced Member

        • Windower Staff
        • 1189 posts
        • LocationMunich, Germany

        Posted 14 May 2015 - 07:25 AM

        Sorry, you were clear, I just misread based on the title. There currently is no way to do something like that (other than hacking around with /assist), but I'll look into exposing it this weekend. It would help if you submitted a feature request for that on our issue tracker.



        #5 Wabafet

        Wabafet

          Newbie

        • Members
        • Pip
        • 3 posts

          Posted 14 May 2015 - 08:14 AM

          It would be great if you could add that.  I have created the request (#1273) in hopefully the correct place.

           

          https://github.com/W...Lua/issues/1273

           

          Thank you again!



          #6 evan64

          evan64

            Newbie

          • Members
          • Pip
          • 7 posts

            Posted 21 May 2015 - 06:58 PM

            As someone who plays six summoners please please pleaaaase add this in. :D



            #7 Arcon

            Arcon

              Advanced Member

            • Windower Staff
            • 1189 posts
            • LocationMunich, Germany

            Posted 21 May 2015 - 09:19 PM

            Sorry, the FFXI update surprised me, and my weekend was spent cleaning up after SE. I'll try to look into it this weekend. I hope there are no surprise updates planned for it <_<



            #8 Fornax

            Fornax

              Newbie

            • Members
            • Pip
            • 3 posts

              Posted 10 August 2015 - 07:15 PM

              I would like to see this feature implemented as well. :)



              #9 zaxtiss

              zaxtiss

                Advanced Member

              • Members
              • PipPipPip
              • 49 posts

                Posted 11 October 2015 - 06:22 AM

                Bump any idea if this is going to be added at all?

                #10 Arcon

                Arcon

                  Advanced Member

                • Windower Staff
                • 1189 posts
                • LocationMunich, Germany

                Posted 11 October 2015 - 06:49 PM

                Yes, together with the next Hook update, which will probably coincide with the next FFXI version update, since we will need to recompile all plugins along with it.



                #11 zaxtiss

                zaxtiss

                  Advanced Member

                • Members
                • PipPipPip
                • 49 posts

                  Posted 12 October 2015 - 06:13 AM

                  sweetness!!!



                  #12 Fornax

                  Fornax

                    Newbie

                  • Members
                  • Pip
                  • 3 posts

                    Posted 15 May 2016 - 05:59 PM

                    Was this ever implemented, or is it still being planned?



                    #13 doktorjake

                    doktorjake

                      Newbie

                    • Members
                    • Pip
                    • 6 posts

                      Posted 12 October 2016 - 01:51 AM

                      bump

                       

                      this would be really incredible to have. Hope you implement it!



                      #14 thatdudegrim

                      thatdudegrim

                        Newbie

                      • Members
                      • Pip
                      • 6 posts

                        Posted 29 October 2016 - 06:02 PM

                        Hello, was this feature ever implemented or are there any plans to implement it?



                        #15 doktorjake

                        doktorjake

                          Newbie

                        • Members
                        • Pip
                        • 6 posts

                          Posted 21 January 2017 - 04:03 AM

                          Are there any updates on this? Alternatively, is there a better place to check the status of developing features like this? For example, a feature list with options to vote on most wanted updates?



                          #16 Sammeh

                          Sammeh

                            Member

                          • Members
                          • PipPip
                          • 24 posts

                            Posted 23 January 2017 - 10:53 PM

                            Are there any updates on this? Alternatively, is there a better place to check the status of developing features like this? For example, a feature list with options to vote on most wanted updates?

                             

                            I haven't found an ability to target specifically.  However - what are you trying to accomplish? Can be done with an action packet toward the mob by ID/actor.  So while the gui may not simply target - you can issue an action (such as engage, cast spell, use JA etc) against a target based on building a packet and sending it.  This gets quite close to 'bot'ish which is pretty shunned around here though.



                            #17 deadman80

                            deadman80

                              Member

                            • Members
                            • PipPip
                            • 29 posts

                              Posted 24 January 2017 - 03:45 AM

                              I haven't found an ability to target specifically.  However - what are you trying to accomplish? Can be done with an action packet toward the mob by ID/actor.  So while the gui may not simply target - you can issue an action (such as engage, cast spell, use JA etc) against a target based on building a packet and sending it.  This gets quite close to 'bot'ish which is pretty shunned around here though.

                               

                              Pretty much what every multiboxer wants, which is the ability to pass your primary character's target to your alts. I tend to rely on <bt> a lot for this purpose, so I don't have to actually target anything w/ my second character, but <bt> tends to fail miserably in multi-target situations.  Sometimes it simply fails completely, sometimes it works but targets something other than your primary target, and neither of those are Good Things.  If there is a way to ensure that your non-primary accounts all target your primary's focused target, it would be a grand blessing for many of us. XD

                               

                              I'd personally prefer this feature to be more on the built-in command side rather than some sort of targeting syntax modification.  Whether it's added to the core program or as a plugin doesn't terribly matter, and that way we could hopefully reduce the "bot-ish" potential down to a bare minimum. I'd imagine that if implemented as an addon, the coding would be quickly adapted to more malevolent intents than only making your alt target your target reliably.



                              #18 Iryoku

                              Iryoku

                                Advanced Member

                              • Windower Staff
                              • 488 posts

                                Posted 27 January 2017 - 03:07 AM

                                That's already very easy to do. That's exactly what the /assist command is for, to target some other entity's current target. You can even use it on enemies to see who they're targeting.



                                #19 deadman80

                                deadman80

                                  Member

                                • Members
                                • PipPip
                                • 29 posts

                                  Posted 09 February 2017 - 02:43 AM

                                  That's already very easy to do. That's exactly what the /assist command is for, to target some other entity's current target. You can even use it on enemies to see who they're targeting.

                                   

                                  I've tried using /assist, and it causes some undesired actions in certain cases. (ie: While on /follow targeting my main, using /assist on my alt will cause my alt to run into melee range locked on to the main's combat target.)  In other words, doesn't work reliably for what I want to do.  <bt> works great for single target combat, but tends to fail miserably in multi-target scenarios (either targeting randomly or simply failing to execute the command.)  Being able to pass a currently targeted mob's ID for targeting purposes should be able to bypass all of the associated issues of currently available methods. 



                                  #20 zaxtiss

                                  zaxtiss

                                    Advanced Member

                                  • Members
                                  • PipPipPip
                                  • 49 posts

                                    Posted 06 April 2017 - 03:11 PM

                                    there is one way to use the /assist still and not have them run into melee range.

                                    you can send the numpad7 key to all your alts to stop the follow and then send the /assist command thats one way to do it.

                                    normally i jus t place my mules in there spots and then pull on my main char/tank char

                                    then send the assist command.






                                    1 user(s) are reading this topic

                                    0 members, 1 guests, 0 anonymous users