Setting and Calling XTargets without UF

Soandso

New member
Joined
Apr 14, 2011
Messages
8
Reaction score
0
Points
0
I have some questions before I start mucking around with this idea I have. Please note that I am very new to coding for MQ but I'm learning fast. My question concerns the extended target aspect of EQ. I wasn't playing when UF came out so I don't have much fundamental knowledge of the XTarget's use in normal EQ so I'm only theorycrafting here. In fact, I'm going to talk through my thought process as I'd like some feedback on the whole thing (this is a learning practice for me).

I have logged in a toon on the one account I have that has UF so that I could see the functionality of the XTarget window. Then I learned that even if your on the TLP a macro can access the XTargets because the data is still there you just can't open the window.

As I understand it the TLP and the regular servers are running the same base server code so my theory is that if the only thing keeping the TLP from using the Xtargets in normal play is the deactivation of the window itself then that may be true for any account without UF.

So, do you think or does someone know for sure can a non-UF account access the Xtarget functionality through macros? If so, is there an example somewhere?

Secondly I've done some searching but I'm not finding the info I'm looking for on really working with Xtargets in macros. Most people seem to talk like their audience already understands some fundamentals which makes sense since most of you have been around before, during and after the implementation of this feature. I really try to help myself first but I'm not getting very lucky here.

Is there somewhere someone can point me to with info about manipulating Xtargets via macros? Something more tutorial, wiki or guide like?

Thanks for any feedback, ideas or help.
 
There isn't really much to manipulate with XTargets in macros. You can access the data, get Spawn IDs and Names, but I don't know of any method of changing the XTarget type other than using the UI.

With that said, yes non UF accounts are currently receiving XTarget data even though they don't get the window. Whether or not Sony realizes this and changes it in the future who knows.

Here is the MQ2 Wiki on the datatype.
http://www.macroquest2.com/wiki/index.php/DataType:xtarget

Mostly what you do is loop through the XTargets (${Me.XTarget} will return the number of XTargets with an ID), and use the XTarget.ID with the Spawn TLO to get information about that spawn. So it would look something like this:

Code:
/declare x int local

if (${Me.XTarget}) {
   /for x 1 to ${Me.XTarget}
      /echo XTarget ${x} is ${Spawn[ID ${Me.XTarget[${x}].ID}].Name}
   /next x
}

I've submitted code to the macroquest2.com devs before to make the XTarget data type inherit the spawn data type to avoid having to filter it through the Spawn TLO, but it never got added to the compile. I'm not sure why it wasn't added, but hopefully one day it gets added to make it easier to simply directly access the spawn data :)
 
You submit it to HTW and see if he can get it added to our compile? Might be a good way to get it introduced into the stock compile.
 

/facepalm

Not sure how I missed that. Thanks for that link. And very much for your explanation. I even understood a little of it.

I went on to my one UF account and set up a custom xtarget window then compared the ini files.

It added a section in the toon_server.ini that looks like this:

[ExternalTargetRoles]
Current=1^Autosave^3^0^2^Lizard^1^2^Mortenson^2^2^Orche

Those names are random PCs that were running around the zone. Since if I copy the ini to another toon the new toon then inherits the xtarget setup there's obviously some way to manipulate even if not ideal or easy to do in game. Something to play with at least that may teach me something.

So is watching this thought process like watching a toddler trying to do basics for you old timers?

Adult1: I told her that's hot.
Adult2: She'll learn.
Me: Damn that's hot!
Adult2: See?
Me: Damn, still hot!
Adult2: ...eventually.
 
Well, I don't like just changing core stuff from MQ2, which in turn makes things have to be maintained differently between them and us (such as macros, huds, etc.). That given, I am more than happy to add stuff.

I just got through adding a Spawn member to the TLO, so that at least saves you a step. It'll be in the next mq2main I push.

Example: ${Me.XTarget[0].Spawn.X}

htw
 
If you want XTargets early. then make a hud setting for:

Code:
XTarget1=3,130,350,255,255,0,${If[${Me.XTarget[1].ID, ${Me.XTarget[1]} - ${Spawn[${Me.XTarget[1].PctHPs}]},]}
XTarget2=3,153,350,255,255,0,${If[${Me.XTarget[2].ID, ${Me.XTarget[2]} - ${Spawn[${Me.XTarget[2].PctHPs}]},]}
etc.. do for 1-5.

Supposing you can access the info, that would do it.

To access the window target info, Role0-19 are coded in, can access 7 max via AA in normal EQ even though 20 are coded in:
${Window[ExtendedTargetWnd].Child[ETW_Role0]}

then /notify what you want under the other windows

If someone can figure out a flag that gives us access we could get up to 20 right now because they are in place and ready to go.
 
Pete, don't those 'roles' show up as the Type member of the XTarget? Like, Me.XTarget[1].Type

??

htw
 
I mean to actually change the roles via /notify for the hidden window. since he still has access to them, they are just perma hidden on progression i guess. i dont really know how its coded in. i dont know if those roles are stored client or server side. i would assume client, but ive been wrong before!

EDIT:

On live servers, there are 20 extended targets that are coded in. we only see 5-7 depending on AAs, but the other windows are there if you /window ExtendedTargetWnd. we have access to them even though they are hidden. there may be a way to manipulate that.
 
Last edited:
Ok, I just added the capability to the MQ2MMOTLO plugin, and uploaded to update server.

Usage: /setrole
  • | [<index>(index) (role name)<role name="">]</role></index>


  • Ex: /setrole list

    or

    Ex: /setrole 2 mercenary

    or

    Ex: /setrole 4 "mercenary target"

    htw
 
Well, I don't like just changing core stuff from MQ2, which in turn makes things have to be maintained differently between them and us (such as macros, huds, etc.). That given, I am more than happy to add stuff.

I just got through adding a Spawn member to the TLO, so that at least saves you a step. It'll be in the next mq2main I push.

Example: ${Me.XTarget[0].Spawn.X}

htw

Awesome! Thanks htw :)
 
Both fantastic additions! Thanks HTW. Now I need to go back and make some much appreciated changes in my macros sometime soon!
 
Well, I don't like just changing core stuff from MQ2, which in turn makes things have to be maintained differently between them and us (such as macros, huds, etc.). That given, I am more than happy to add stuff.

I just got through adding a Spawn member to the TLO, so that at least saves you a step. It'll be in the next mq2main I push.

Example: ${Me.XTarget[0].Spawn.X}

htw

I know you try to stay away from that but it could be one of those things they see the ground work and beta testing is already done and throw it in after an update or two. Guess I am always hoping for more friendly workings within the community.