View Single Post
  #1  
Unread 03-17-2005, 12:10 PM
Kosmos's Avatar
Kosmos Kosmos is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Lucan DLere
Posts: 581
Default eq2ui_mainhud_maintained.xml (Notes) Futuer Abandoned Projects?

Hey guys, Laffs and I dinked with this yesterday for quiet a bit and I thought I would share what we found. Maybe there is someone out there that can get this to work, but it looks unlikely. I'll explain why.

The goal was to have a Maintained spell window that had a small X in the top right hand corner of the icon. Clicking that small X would cancel the maintained effect. I've included a semi-working demonstration.
The mod uses the cancel_maintained command which takes a %d for the value.

So here's the tricky party. Which I'm sure is no accident.
The Mod works the first time IF you have spells already maintained when you log on. After some doing some testing we came up with a good guess of whats happening.
The index number of the spells changes.
There does not appear to be an index number set for the spells themselves, nor for the slots.
So addressing slot one as cancel_maintained 0.0 only works once, if you already had a spell in that slot. Or after zoneing.

Here is how it appears to be working.
Quote:
Spell#1 is cast, and goes into Slot#1 with an index of 1.0 (Since its' the first spell you have cast.)
Spel#2 is cast, and goes into Slot#2 with an index of 2.0 (Second Spell You have cast)
Spell#3 is cast, and goes into Slot#3 with an index of 3.0(Third spell you have cast)
Now at this point typing in the command line cancel_maintained 1.0, or 2.0, or 3.0 would cancel the appropriate maintained spells.
The .XML I've included is set to start at 0.0 so if you have a spell in slot#1 when you log on, or after you are done with a zone, that slot has a spell with the index of 0.0 so it will work, as well as the rest of them.
If you have no spells in any maintained slots when you log on. The first spell you cast will get an index of 1.0 rather than 0.0 so all of the buttons will be one index off.

Now...Here's where it gets complicated. Take the above example.
Quote:
Spell#1 the first spell you cast with the index of 1.0 wears off.

Re-Cast Spell#1 and it goes into Slot#1 but now it has an index of 4.0 (Since it's the 4th spell you have case)
Typing cancel_maintained 0.0 will no longer work. Because that spell is now maintained spell 4.0 even though it's in Slot#1.

So using the cancel_maintained command takes the decimal argument of the n^th spell that you have case since been logged on this session.
The index is re-set to 0, on zoneing.
So every maintained spell that you cast increases this index, and it's not tied to specific spell.
As far as I know, with our current math functions, we could not keep track of this index in relation to specific spells. Something like 'pathfinding' could have any index in the world, and unless I knew what the index number is, there is now way i can find to cancel it, unless you right-click and do cancel.

If there was a way to read the index from the spell currently in the slot, then we could get this to work, but I've not been able to figure out how to do that.
Attached Thumbnails
Click image for larger version

Name:	Maintained.jpg
Views:	511
Size:	126.6 KB
ID:	1899  
Attached Files
File Type: xml eq2ui_mainhud_maintained.xml (14.3 KB, 422 views)
__________________
Kosmos
Qeynos Ranger (Retired)
Lucan D'Lere

Last edited by Kosmos : 03-17-2005 at 12:13 PM.
Reply With Quote