EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   How to Reference Names with Space? (https://www.eq2interface.com/forums/showthread.php?t=1814)

Zonx 03-10-2005 07:53 PM

How to Reference Names with Space?
 
The bag window uses spaces in all the slot names ('Slot 10' for example). Anyone know how I can set values/trigger events on those objects with spaces in their names?

I can't change the object names without breaking bag behavior :/

References I've tried...
parent.slot 10
parent.'slot 10'
parent.(slot 10)
parent.[slot 10]
parent.{slot 10}
parent.slot~10
parent.slot`10
parent.slot@10
parent.slot#10
parent.slot$10
parent.slot%10
parent.slot^10
parent.slot&10
parent.slot*10
parent.slot(10
parent.slot)10
parent.slot_10
parent.slot{10
parent.slot}10
parent.slot\10
parent.slot|10
parent.slot:10
parent.slot;10
parent.slot/ 10
parent.slot\ 10
parent.slot%2010

Talyns 03-10-2005 08:17 PM

Quote:

Originally Posted by Zonx
The bag window uses spaces in all the slot names ('Slot 10' for example). Anyone know how I can set values/trigger events on those objects with spaces in their names?

I can't change the object names without breaking bag behavior :/

References I've tried...
parent.slot 10
parent.'slot 10'
parent.(slot 10)
parent.[slot 10]
parent.{slot 10}
parent.slot~10
parent.slot`10
parent.slot@10
parent.slot#10
parent.slot$10
parent.slot%10
parent.slot^10
parent.slot&10
parent.slot*10
parent.slot(10
parent.slot)10
parent.slot_10
parent.slot{10
parent.slot}10
parent.slot\10
parent.slot|10
parent.slot:10
parent.slot;10
parent.slot/ 10
parent.slot\ 10
parent.slot%2010

If you want to manipulate say the visible property of slot 10 it would be
'Parent.Slot 10.Visible'=true

Zonx 03-11-2005 06:18 AM

Hmm... prety sure I tried that and it ignored everything befor the space. Anyways I got around it.

I'll try the quotes again. Could be I just THOUGHT I tried it cause its so obvious.

Zonx 03-13-2005 09:24 AM

Yep color me dum, the quotes worked fine.

Thx T :)

Kosmos 03-13-2005 09:46 AM

While your working with this mod you might want to consider an idea if you haev not already done so.

If you use standard labels for these bags, it seems to me that it would be possible to include a button on the bank window that would open all bank bags.

From the list there is
bag_open (may take the label after the command)

there is also
get_bag_label (might return the value if the bag selected, or move the bag from bank to inventory?) not sure on syntax

label_bag (probably sets the bag label)

I thought those might help if you hadn't alread found them.
It would be very useful to be able to toggle bank bags.
seems it might be possible to do the open_bag <bag_label> type command and get it to open whatever bag you are addressing. ??
You could just repeat the command for each of the standard bag labels.

Zonx 03-13-2005 11:21 AM

Aye, the stupid spaces stumped me when I messed with the bank window previously. I'll look at it again. I suspect it'll be much easier now. Prety sure all that's needed is a button that sets Press=true for each slot ;)

get_bag_label probably returns the player defined bag name (they call it a label in game). label_bag I assume sets the bag label.

I have not yet found a way to target specific bag windows or examine windows from other windows but we can activate slots :)

Kosmos 03-13-2005 11:47 AM

Quote:

Originally Posted by Zonx
Aye, the stupid spaces stumped me when I messed with the bank window previously. I'll look at it again. I suspect it'll be much easier now. Prety sure all that's needed is a button that sets Press=true for each slot ;)

get_bag_label probably returns the player defined bag name (they call it a label in game). label_bag I assume sets the bag label.

I have not yet found a way to target specific bag windows or examine windows from other windows but we can activate slots :)


the default labels are probably just indexed like bank_bag_label 0 or something like that. I'm not sure, I've not played with the bank window.

You could just define the bag labels in the XML with the bag_label then
do an OnPress="open_bag_label=bag_1 etc..etc.."
Arn't the slots in the bank labeled, rather than the bags themself?

Like when you create a setting for position. its saved for that slot, not for that bag right? So maybe address the slot labels rather than the bag labels?

Man that would be nice to get something like that working.

Zonx 03-13-2005 10:30 PM

Played with this a bit earlier. None of the following opened the bag

'Character.slot 1.activated'=true
'Character.slot 1.press'=true
'Character.slot 1.set'=true
'Character.slot 1.doublepress'=true
'Character.slot 1.doubleclick'=true

I'll play with it somemore, but slot activation simple might not be supported for macroing reasons.

Kosmos 03-14-2005 12:51 AM

Quote:

Originally Posted by Zonx
Played with this a bit earlier. None of the following opened the bag

'Character.slot 1.activated'=true
'Character.slot 1.press'=true
'Character.slot 1.set'=true
'Character.slot 1.doublepress'=true
'Character.slot 1.doubleclick'=true

I'll play with it somemore, but slot activation simple might not be supported for macroing reasons.

How about something like

create a button and then do
OnPress="open_bag=(Parent."Slot 10")" ??
Now you've gone and got me curious. Deathbane doesn't think this can be done, which leads me to beleive it can't be done. But.. I thnk that was said about the multiple display custom profiles also.

Zonx 03-14-2005 09:01 PM

get_bag_label opens the bag labeling window, but without the correct method of addressing bags, its useless.

bag_label should return a player defined bag label, but again its useless without a way to address bags.

bag_open appears to be partially functional. It accepts 3 digits as arguments. The first digit controls what is displayed in the resulting window.
0 seams to open whatever was last opened, without triggering slot visability events.
-1 not sure what this is opening. Defaults to a 25 slot bag unless something else alters the window.
-2 not sure what this is opening. Always results in an empty 6 slot bag without triggering slot visibility events. My guess is that its openeing a default quest satchle.
-3 opens the Bank Vault without triggering slot visibility events
-4 opens Shared Vault without triggering slot visibility events
-5 opens House Vault without triggering slot visibility events, but only shows bags if you're in your house.

The second didit identifies the primary bag window position to use.

The third digit identifies the bag-within-a-bag window position to use.

Haven't found any way to fill one of these windows with the contents of a specific bag or control the window's size/slot visiblity.

In any case, since this command takes multiple arguments, its unlikely we'll get it working with button event scripts.

Deathbane27 03-14-2005 09:15 PM

Quote:

Originally Posted by Zonx
In any case, since this command takes multiple arguments, its unlikely we'll get it working with button event scripts.

That problem has been canned. Use single quotes instead of parenthesis.

OnEvent="say='blah blah blah blah blah' say='blah blah blah blah blah'"
OnEvent="bag_open='1 2 3'"

We can do almost any in-game command with UI event scripts now.

Edit: Er... unless you need to reference something within the quotes. Nuts.

Kosmos 03-15-2005 04:35 AM

Well, I can't encourage you to continue on this path enough! I already know more about this than I did, which is good and at least the information is here.
Getting the bag contents to populate may be another issue.


One thing I would like to point out with some of the things I've noticed.

The bank appears to remember 'slots' and not bags.
The slots settings seem to override the bag settings.

Like the position that a bag opens to seems to be kept with the bag when you have it in your inventory. But when you have a bag in the bank, it seems to appear to keep the settings of the slot, and not the bag.

My 'shared' bank slots are the only ones I still have issues with.
The won't save their posisitons.

Zonx 03-15-2005 05:21 AM

Well for example bag_open anynum 0 0 will open a container window in the position of your first inventory bag.

Anynum 1 0 will open the second inventory location.

Anynum 0 1 will open the first location saved for a bag in the first slot inside your first inventory bag.

Most of those first digit settings don't trigger any slot visibility or window sizing, so the number of slots shown will be whatever was last opened in that position. If nothing was opened normally in that position, all 25 possible slots will be shown.

The various Vault settings dump the vault's contents into the window, but they don't trigger visibility or window size. If you opened a 4 slot bag into position 0 0, dumping the Bank Vault into that position only shows 4 slots.

I suspect there's some additional arguments for this command that tell it what specific bag to fill the window with, and maybe how many slots to display, but nothing I tried produced any noticable results beyond what I mentioned above. It could be the command wasn't fully implemented.

On a side note, I also tried a bunch of things to trigger a double click with no luck :(

Zonx 03-15-2005 05:29 AM

Quote:

Originally Posted by Deathbane27
We can do almost any in-game command with UI event scripts now.

Edit: Er... unless you need to reference something within the quotes. Nuts.

Aye, and that's the prob. I think this command (if it even works) expects a bag reference as one of the arguments. Tried OnHoverIn=bag_open on a bank slot, but that just did the default bag_open (same as /bag_open 0 0 0).

Oh, another odd thing I discovered dorking with this... there apears to be a _HUD layer between bag windows and root, not the expected root.Inventory.Bag.

Kosmos 03-15-2005 09:54 AM

Quote:

Originally Posted by Zonx
Aye, and that's the prob. I think this command (if it even works) expects a bag reference as one of the arguments. Tried OnHoverIn=bag_open on a bank slot, but that just did the default bag_open (same as /bag_open 0 0 0).

Oh, another odd thing I discovered dorking with this... there apears to be a _HUD layer between bag windows and root, not the expected root.Inventory.Bag.


First of all, try using decimal numbers. 0.0 1.0 2.0
I've run into a couple issues where it can cause problems if you dont have a decimal in there.

Do I understand correctly that you can
Open a bag, and have it display its contents if it's in the inventory window, but not if its in the bank window? with the command?
But you can't get the commnad to work with an OnPress event for a button?

Kosmos 03-15-2005 10:41 AM

Quote:

Originally Posted by Zonx
Aye, and that's the prob. I think this command (if it even works) expects a bag reference as one of the arguments. Tried OnHoverIn=bag_open on a bank slot, but that just did the default bag_open (same as /bag_open 0 0 0).

Oh, another odd thing I discovered dorking with this... there apears to be a _HUD layer between bag windows and root, not the expected root.Inventory.Bag.


bag_open %d %d %d It's looking for decimal numbers.

If I understand you correctly "/bag_open 3.0 1.0 0.0" should open the top left vault spot in the bank window.
I didn't get a chance to play with this last night at all, so not sure if htat would work.
Are you getting bags to show the contents at all or is it just pulling up container windows?
The double click is what makes the server push this data to the container right? So what you are saying is without that event the containers are going to be empty?

Zonx 03-15-2005 02:02 PM

/bag_open -3.0 0.0 0.0

opens the Bank Vault in the first container position.

I did try various decimal combination with no noticble effect. Float seams to be ignored.

Using zero as the first digit seams to fill windows with whatever last filled the spot with a normal open, so if you've already opened a bag normally to that position, it will open the bag.

It doesn't trigger any of the bag's usual slot visibility and resize events, so if you're using the typical method of customizing bags, stuff can look wonky. For instance, my bags open with only 1 slot visible, but the title and contents of the visible slot are there.

Kosmos 03-15-2005 02:21 PM

Quote:

Originally Posted by Zonx
/bag_open -3.0 0.0 0.0

opens the Bank Vault in the first container position.

I did try various decimal combination with no noticble effect. Float seams to be ignored.

Using zero as the first digit seams to fill windows with whatever last filled the spot with a normal open, so if you've already opened a bag normally to that position, it will open the bag.

It doesn't trigger any of the bag's usual slot visibility and resize events, so if you're using the typical method of customizing bags, stuff can look wonky. For instance, my bags open with only 1 slot visible, but the title and contents of the visible slot are there.

Well that sounds promising, it's just a matter of getting the syntax down then? If the bags opening, and your goodies are in it, that's a very, very good start.
Fumbling in the dark on this stuff 90% of the time arn't we!

I've got a realy, really silly question.

I've yet to see a single, OnEvent reference in ANY of the XML files.
Can you explain to me how this works. Everythign we do we tie to some event, but why is it that the XML files that come with the game don't have anything at all for any of the events??

Kosmos 03-15-2005 02:27 PM

Quote:

Originally Posted by Zonx
/bag_open -3.0 0.0 0.0

opens the Bank Vault in the first container position.

I did try various decimal combination with no noticble effect. Float seams to be ignored.

Using zero as the first digit seams to fill windows with whatever last filled the spot with a normal open, so if you've already opened a bag normally to that position, it will open the bag.

It doesn't trigger any of the bag's usual slot visibility and resize events, so if you're using the typical method of customizing bags, stuff can look wonky. For instance, my bags open with only 1 slot visible, but the title and contents of the visible slot are there.

Perhaps the bankslots are treated differently than the inventory slots.
Perhaps they are treated as bags witiin bags, that might explain why they seem to work differently.
the last argument that pointed to a slot within in the bags.
3.0 1.0 0.0 tells it ot open bank vault, slot 1, and slot one of the bag inside that slot

perhaps each slot in a bag has to be opened this way, and that would get all the slots to show.
bag_open 3.0 1.0 0.0 (first slot of the bag)
bag_open 3.0 1.0 1.0 (secnod slot of the bag) etc...


We probably cant get the frames or styles to work unless we can address then enitre bag. But the above way migth be a way to open all the slots of all the bags.

EDIT:
One other question.
in the bank window main page XML.
If you put OnShow="bag_open=-3.0 0.0 0.0 bag_open=-3.0 0.0 0.0"
Does it open the bag with the contents in it, if you already had a bag opened in that spot previously?

I'm thinkign this command might have gotten a bit nerfered because the bags used to be hardcoded into certain positions right?
My shared vaults still appred to be that way. I can't get them to save positions.

I'm going to have to monkey with tonight when I get home from work.

Zonx 03-16-2005 01:39 AM

I don't think its really opening a bag so much as a window in a position, and since you already opened it normally... HEY look there's stuff in there :p

The exact same command returns an empty 25 slot bag if you just logged in.

I haven't managed to see the contents of a Vault bag using this command, period.

RE: your general OnEvent question... XML is by deffinition a tool for opening some other code base up for external manipulation without touching the real codebase. SOE developers don't use OnEvents because they have direct access to the C++(or whatever language they use) methods those XML commands call.

For example, we can't trigger double-clicks because SOE hasn't written an XML hook that triggers the C++ method they use.

This is what ppl mean when they say stuff is hard-coded. SOE writes code on their end that isn't exposed to us for XML manipulation. Bags happen to be one of those notoriously hard-coded windows. You double-click a slot in-game and stuff happens on the server side to auto-magically show the correct number of slots and shrink the window down. None of that auto-magic stuff is exposed to us, so bag mods wind up doing backflips to over ride what SOE assumes will be the correct size.

There are rare occations where SOE uses OnEvents to trigger Effectors. The Player window uses OnAutoattack to trigger the color effector that flashes the player name ;)

Kosmos 03-16-2005 04:14 AM

Quote:

Originally Posted by Zonx
I don't think its really opening a bag so much as a window in a position, and since you already opened it normally... HEY look there's stuff in there :p

The exact same command returns an empty 25 slot bag if you just logged in.

I haven't managed to see the contents of a Vault bag using this command, period.

RE: your general OnEvent question... XML is by deffinition a tool for opening some other code base up for external manipulation without touching the real codebase. SOE developers don't use OnEvents because they have direct access to the C++(or whatever language they use) methods those XML commands call.

For example, we can't trigger double-clicks because SOE hasn't written an XML hook that triggers the C++ method they use.

This is what ppl mean when they say stuff is hard-coded. SOE writes code on their end that isn't exposed to us for XML manipulation. Bags happen to be one of those notoriously hard-coded windows. You double-click a slot in-game and stuff happens on the server side to auto-magically show the correct number of slots and shrink the window down. None of that auto-magic stuff is exposed to us, so bag mods wind up doing backflips to over ride what SOE assumes will be the correct size.

There are rare occations where SOE uses OnEvents to trigger Effectors. The Player window uses OnAutoattack to trigger the color effector that flashes the player name ;)

Imagein the light buld over my head going 'ding'.
I dinked with this last night and understand what you were saying now abou the bags. I was misunderstanding when you said that it had the contents in there.

As far as the OnEvent stuff, I get that now! I really appreciate the help on that. It helped me understand a PM I got from SOE Boddy also. I think they are trying to give us access to the OnDoubleClick and On SelectEvents.
At least he expressed that he thought it would be useful for us, and at this point we are very limited to what we can do.

Zonx 03-16-2005 08:56 AM

Quote:

Originally Posted by Kosmos
I think they are trying to give us access to the OnDoubleClick and On SelectEvents.
At least he expressed that he thought it would be useful for us, and at this point we are very limited to what we can do.

That would be AWSOME! Hope its soon :D


All times are GMT -5. The time now is 08:32 PM.

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