EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   Request (https://www.eq2interface.com/forums/forumdisplay.php?f=25)
-   -   curses window (https://www.eq2interface.com/forums/showthread.php?t=15828)

dx2 07-21-2011 12:08 PM

curses window
 
Trying to get this running. Window shall show curses when they appear:

I am looking for something that is equivalent to ontextchanged just for icons (like oniconchanged) (is there some kind of workaround?)

Code:

<?xml version="1.0" encoding="utf-8"?>
<Page eq2usescomwndcontrols="true" Location="248,321" MaximumSize="16384,16384" MinimumSize="100,31" Name="CurseActivity" PackLocation="center,bottom" ScrollExtent="196,31" Size="196,31" UserMovable="true" UserResizable="true">
<Text DynamicData="GameData.Self.Subclass" Name="ini" OnTextChanged="show_window Custom.CurseActivity" />
<TextStyle Algorithm="Simple" FontName="Arial" Language="english" Leading="-2" Name="FontArial13T" PointSize="13" UseCachedFont="true" />
<Composite AbsorbsInput="false" Location="1,1" Name="Composite" PackSize="a,a" ScrollExtent="194,29" Size="194,29" SpacingType="Fill">

<Page AbsorbsInput="false" Location="2,0" MaximumSize="16384,27" MinimumSize="95,27" Name="1" OnHide="Icon.DynamicData=&apos;&apos;" OnShow="Icon.DynamicData=&apos;/GameData.Raid.Member_1.Effect5&apos;" PackSize="a,f" ScrollExtent="191,27" Size="191,27" Visible="true">
<Text AbsorbsInput="false" DynamicData="Parent.Parent.Parent.MainHUD.Raid.Volume.Group1.Member1.Basic.Name.Text" Font="/TextStyles.Normal.NormalStyle" Location="29,14" Name="Target" Opacity="0.900" PackLocation="NNN" PackSize="a,f" ScrollExtent="96,12" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Size="96,12" TextAlignment="Left" TextColor="#D5D5D5" />
<Button BackgroundColor="#FF0000" BackgroundOpacity="0.000" Location="29,15" Name="TargetButton" OnHoverIn="BackgroundOpacity='0.300' TRG=Parent.Parent.Raid.Volume.Group1.Member1.Basic.Name.Text" OnHoverOut="BackgroundOpacity='0.000'" OnPress="target TRG" PackLocation="NNN" PackSize="a,f" ScrollExtent="96,11" Size="96,11" Style="/ButtonStyles.BoxButton" Tooltip="Target" />
<Icon AbsorbsInput="false" DynamicData="/GameData.Raid.Member_1.Effect5" BackgroundTint="#000000" IconStyle="/IconStyles.effect" Location="0,2" MouseOverColor="#FFFF00" Name="Icon" PackLocation="Left,Top" ScrollExtent="25,25" Size="25,25" Visible="false" />
</Page>

<Page AbsorbsInput="false" Location="2,29" MaximumSize="16384,27" MinimumSize="95,27" Name="2" OnHide="Icon.DynamicData=&apos;&apos;" OnShow="Icon.DynamicData=&apos;/GameData.Raid.Member_2.Effect5&apos;" PackSize="a,f" ScrollExtent="191,27" Size="191,27" Visible="true">
<Text AbsorbsInput="false" DynamicData="Parent.Parent.Parent.MainHUD.Raid.Volume.Group1.Member1.Basic.Name.Text" Font="/TextStyles.Normal.NormalStyle" Location="29,14" Name="Target" Opacity="0.900" PackLocation="NNN" PackSize="a,f" ScrollExtent="96,12" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Size="96,12" TextAlignment="Left" TextColor="#D5D5D5" />
<Button BackgroundColor="#FF0000" BackgroundOpacity="0.000" Location="29,15" Name="TargetButton" OnHoverIn="BackgroundOpacity='0.300' TRG=Parent.Target.LocalText" OnHoverOut="BackgroundOpacity='0.000'" OnPress="target TRG" PackLocation="NNN" PackSize="a,f" ScrollExtent="96,11" Size="96,11" Style="/ButtonStyles.BoxButton" Tooltip="Target" />
<Icon AbsorbsInput="false" DynamicData="/GameData.Raid.Member_2.Effect5" BackgroundTint="#000000" IconStyle="/IconStyles.effect" Location="0,2" MouseOverColor="#FFFF00" Name="Icon" PackLocation="Left,Top" ScrollExtent="25,25" Size="25,25" Visible="false" />
</Page>
 
...
...
...

</Composite>
<Page AbsorbsInput="false" Name="WindowFrame" PackSize="a,a" ScrollExtent="196,31" Size="196,31">
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Location="-1,-2" Name="Frame" PackLocation="left,top" PackSize="a,a" RStyleDefault="/WindowElements.DesktopWindowFrame.data.frame.rect" ScrollExtent="198,34" Size="198,34" />
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Location="-1,-2" Name="Bkg" PackLocation="left,top" PackSize="a,a" RStyleDefault="/WindowElements.DesktopWindowFrame.data.bkg.rect" ScrollExtent="201,36" Size="201,36" />
</Page>
</Page>

realized that auto cures would be possible with icon change event ^^

gm9 07-21-2011 03:12 PM

IIRC the icons fire an OnShow event for each new detriment. Again IIRC SOE asked that an auto cure mod that had been uploaded here to be removed from the site because of automated game play.

dx2 07-21-2011 04:52 PM

ty.
the rule makes sense + current content requires certain curses not to get cured.

dx2 07-22-2011 05:07 PM

Are names in the raid window protected ?
If I access them via
MainHUD.Raid.Volume.Group1.Member1.Basic.Name.FullName
or
MainHUD.Raid.Volume.Group1.Member1.Basic.Name.Text

it gives me the static text.

Drumstix42 07-22-2011 06:04 PM

Kinda skimmed through this thread, but if you use the Effect dynamicdata for curses/other detriments in a Text object, and use OnTextChanged (and check if it's greater than 0 for example), you can keep track of things fairly easily.

dx2 07-22-2011 06:08 PM

ah nice, wasnt aware of the possibility that it can be held be a text object

EQAditu 07-23-2011 12:56 AM

Quote:

Originally Posted by gm9 (Post 97889)
IIRC the icons fire an OnShow event for each new detriment. Again IIRC SOE asked that an auto cure mod that had been uploaded here to be removed from the site because of automated game play.

^^ (Guilty) :rolleyes:

There are some automated things you can get away with and some that you cannot. My auto-cure script was more of a programming challenge than anything else. It was meant more as a click a button and it would cure one thing that needed to be cured(unless configured to ignore a certain type on a certain player)... but I left in the auto-cure element "for fun". Ironic that the optional part got it the bad kind of attention.

Anyways, the OnShow will indeed fire when the icon becomes visible but it will not refire for a second detriment of that type and you can't avoid firing it when the detriment is uncurable. It's possible someone is smarter than me and figured out how to pull the number from the icon, but I couldn't.

Drumstix42 07-23-2011 04:01 AM

Using what I said above works fine. I use a CureFinder in my UI, but it's not automated. You have to trigger it manually each time. Also as stated, there's content where curing the first curse you come across isn't necessarily a good thing :rolleyes:

dx2 07-23-2011 04:18 PM

I noticed that the OnShow, or OnTextChenged events that are triggered by the Dynamic Data does execute twice at once,
first time the variable is evaluated correctly, the second time it does show the variable name itself (like Parent.Volume.Group1.Member1.Basic.Name.FullName)
To test it I use this code and engage into a solo encounter that casts a trauma effect:

Code:

<Icon AbsorbsInput="false" DynamicData="/GameData.Raid.Member_0.Effect1" BackgroundTint="#000000" IconStyle="/IconStyles.effect" Location="0,2" MouseOverColor="#FFFF00" Name="Icon" PackLocation="Left,Top" ScrollExtent="25,25" Size="25,25" Visible="false"  OnShow="raidsay Parent.Volume.Group2.Member1.Basic.Name.FullName" />

Drumstix42 07-24-2011 02:51 AM

I found a lot of annoying things like that which happen with changing dynamic data.

Best method I found for only triggering things once was trigger a button or something that saves what the "last data" was and compares it before triggering. If it's the same value as last time, you simply don't trigger anything.

Just an example of sorts, but anything automated in the UI is prone to get executed multiple times when dealing with the data feed :(

dx2 07-24-2011 05:31 AM

Thanks for the hint with the button, I didn't manage to solve it with string comparison but with this:

Code:

<Text Name="ClockSignal" Visible="false" DynamicData="/GameData.General.Time" Size="0,0" orig="Parent.UpdateData.press=true"        OnTextChanged="
OnTextChanged=''
Parent.UpdateData.press=true
"></Text>
<Button Name="UpdateData" Visible="false" OnPress="
<here comes the code that should not get executed twice>
Parent.ClockSignal.OnTextChanged=Parent.ClockSignal.orig
" />

However using this method I do get the variable name again and not its content. But at least I got a step forward to fix the problem.

Drumstix42 07-24-2011 10:35 AM

I don't remember what the FullText thing was started from (I kinda remember having to deal with it), but looking in just my normal code of my raid window, I'm just using Name.localtext

Maybe you can try that.

I've also used the game time to trigger stuff since it updates often. My initialization code for windows uses fake "loops" with a counter that triggers code with the in-game time.

dx2 07-25-2011 11:02 AM

I tried several variables: localtext, text, FullName

The automated way of assigning variables triggered by the GameData.General.Time might be screwed, or it is intended to prevent automazation, or something is missing...

Drumstix42 07-25-2011 03:21 PM

Not really sure what you're doing, but the only time I ever parse the name is when code goes to do the "useabilityonplayer parent.parent.blah.blah" and it never fails.


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

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