EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   Problem with pet detriments (https://www.eq2interface.com/forums/showthread.php?t=17573)

Sigrdrifa 07-23-2013 08:39 PM

Problem with pet detriments
 
I have been working with a slightly modified Aseekias Conjy Pet Window, and now that all mages have "Cure Magic", I wanted to update it to show the four detriments on my pet, and clicking any of them casts "Cure Magic".

I have worked with it in the UI Builder, and here's what I have now.



The buttons are, left to right, Trauma, Nox, Elemental, and Arcane. The inactive versions show up as expected. When I take my pet out into the wilds and fight stuff, indeed, a Trauma detriment lights up Button 1, Noxious, Button 2, and so on.

My problem is that instead of lighting up the buttons with the expected detriment images, I get:
  • Button 1: Pet being hit with a Trauma detriment lights up on Trauma button as expected.
  • Button 2: Pet being hit with a Noxious detriment lights up on the right button, but shows Arcane.
  • Button 3: Pet being hit with an Elemental detriment lights up on the right button, but shows Noxious.
  • Button 4: Pet being hit with an Arcane detriment lights up on the right button, but shows Elemental.

I am at a complete loss. I can't figure out what I have done wrong. Can any of you more experienced UI developers steer me right? I'm attaching the XML file.

Sigrdrifa 07-24-2013 07:03 PM

1 Attachment(s)
I guess it would help if I actually attached the file! :rolleyes:

Darqwood 07-24-2013 08:54 PM

Have not loaded this into the game yet, but the first thing that sticks out to me is the order of the icons -- try changing the references to 1 2 3 4 and see if the detriments will behave themselves:



Sigrdrifa 08-08-2013 11:40 AM

Quote:

Originally Posted by Darqwood (Post 104036)
Have not loaded this into the game yet, but the first thing that sticks out to me is the order of the icons -- try changing the references to 1 2 3 4 and see if the detriments will behave themselves:

I have tried your suggestion, and nope, that's not it.

lordebon 08-08-2013 12:59 PM

My guess is that you're running into some hardcoding by rearranging the detriments (and most importantly not consistently changing the Effect# names along with the DynData). Normally detriments go (left to right) trauma, arcane, noxious, elemental, curse; you have them going trauma, noxious, elemental, arcane, curse.

So when the pet gets hit by noxious, it's lighting up the second icon, since you have moved it to the second spot in the XML, but showing the icon for arcane, which is normally in that slot. If you look at the default window code for the various detriments (and even in your code), the IconStyle for all the detriments is the same, IconStyles.effect (and that points to something that never gets used in that context, an icon of an orange downward explosion thing). The icon thus has to be hardcoded in to determine which detriment icon to show by which icon it is in the XML.

If you really want the icons to be in that nonstandard order (and admittedly I'd be curious why), something to try would be to change the names of the icons. In other words, on line 57 change the name to "Effect3" rather than "Effect2," since the game is most likely using that name parameter to determine which icon to show when it's active. Do that on 58 and 59 as well and my best bet is it'll work as desired then.


All times are GMT -5. The time now is 05:40 PM.

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