EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   text vars in ui xml (https://www.eq2interface.com/forums/showthread.php?t=6236)

Celestian 06-02-2006 11:48 PM

Player name/target name is text from UI mod problem
 
I've got a click to cast button on a group menu and when they press it I also have it gsay Focus healing %T. However when it fires it actually says %T not PlayerName.

I can only assume the UI has to use something else, how would I get the players target in there?

Pixi 06-03-2006 03:49 AM

Seems to me (blissfully ignorant that I am) that there are two different interpreters in this situation. One that reads and renders your XML code and another that interprets your chatline commands and returns text depending on what is targetted. I'm pretty sure there should be a command that works like "%T" but is written more like "target.name" in your XML file.

Of course, I could be totally wrong too but it just seems logical to me in that quirky computer geeky kind of way hehe.

mother9987 06-03-2006 05:50 AM

I don't personally use click to cast for anything, but...

My experience with changing targets in a macro and saying something to the group is that the target change actually happens a split second after the macro runs, while the /gsay happens immediately.

For example:
/target_pet
/gsay %t has outlived it's usefulness and must die!
/pet getlost

Which I use on my coercer would always put the name of the tank on the group line, since I tend to keep the tank targetted. Even though after the macro ran, I would properly have my ex-pet targetted so I could root, mez, recharm, or nuke him as I see fit.

It was good for many a laugh, but it did annoy me. So, for my marco, I ended up replacing %t with "My ex-pet".

So, good luck! But you might just have an intractable timing problem.

Celestian 06-04-2006 05:05 PM

Let me try this again and perhaps people can understand better my problem:

I am having trouble finding out how to place a target name or player name into text output by a UI mod.

I currently have a group mod that has a push to cast option (like the click to cure stuff) and I want to alert my group when I use that spell on that player. It would do something like

OnPress="useability Focused Intercession;gsay Focus healing %T, stunned for the duration"

The spell fires off on the player properly however the text comes to the gsay channel just like above, %T is %T, not the target. I've tried using GameData fields for the name as well and it does the same.

Is there a way to do this?

Talyns 06-04-2006 06:18 PM

you might be able to do something like this:

Onpress = "
useability Focused Intercession
gsay ('Focus healing ')##(Parent.Parent.Target.Name.LocalText)##(', stunned for the duration') "

Celestian 06-04-2006 07:59 PM

I tried:

useability Focused Intercession ; gu ('Focus healing')##(Parent.Parent.Target.Name.LocalText)##(',stunned for the duration')

And it didnt display anything at all this round of tests. Note I used /gu for testing but that produced the same results as the original as well.

I am not familiar with this type of formating so posted what I used here case I did something incorrect.

Pixi 06-04-2006 08:00 PM

Aha!

I knew it, my geeky senses were true!

Now where are my spandex, it's time to go save the world...

Celestian 06-06-2006 02:47 AM

I am still trying to figure this out and wanted to ask a few questions.

How do you know the depth of the parent.* ?

How do you know the variable names? For example if I want to get the name of the target from the eq2ui_mainhud_player.xml how would I know the variable name/depth?

Is there a doc on this I can read and not annoy people with silly questions?

pooka 06-06-2006 06:42 AM

1 Attachment(s)
Look at the tree structure in UIBuilder. (Generally) Every level up is a 'parent' ... every level down follow the path.

Celestian 06-07-2006 04:52 PM

I did some testing from MainHUD/Player/TemplarPage/FocusHealPage/FocusHealButton using this on OnPress:
say Testing;say(Parent.Parent.Parent.Parent.Target.v0.Name.LocalText)

I also tried the same but with 3-5 Parents just to see if I messed up my tree counting.

However all it would do is say "Testing" and nothing else. I expected it would say:

You say 'Testing'
You say 'Celestian'

But no text would come out at all. Not even the "Debug" text.

I also did a test by just making something right off MainHud/TEST01/TestButton

I had it simply report target just as above and did from 4 parents to 1 and it would never show any text even the "Debug:" part either. I am sure I am missing something simple just dont know what.

Celestian 06-12-2006 05:37 PM

Here is what I ended up using that worked. I've not tweaked it much but it works.

This is from MainHUD/Player, basically it casts Focus Intercession on me. I plan to use the same thing on my GroupMembers.

<Button LocalTooltip="Focused Benefaction" Name="FocusedHealingButton" OnPress="
Parent.FocusedHealingButton.sPlayerName=Parent.Parent.Parent.Parent.Target.v0.Na me.LocalText
msgTXT=(&apos;STUNNED while Focus healing &apos;)##(Parent.FocusedHealingButton.sPlayerName)
gsay=&apos;abc123&apos;
gsay=(msgTXT)
gsay=(msgTXT)
useability Focused Intercession" Opacity="0.000" ScrollExtent="20,20" Size="20,20"></Button>

Zonx 06-14-2006 11:28 AM

Just spotted this thread, yah I think your initial problem was in not properly formatting the gsay command and/or repeating it.

gsay=(sometext %t)
gsay=(sometext %t)

would probably work.

Dunno but the client may also not like cap "%T". I've always used lowercase with no probs.

If you haven't already, you may want to check if your button works when using the other con system. Not sure if v0 recieves values if v1 is shown.


All times are GMT -5. The time now is 02:15 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI