EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #26  
Unread 01-26-2009, 04:29 PM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

Quote:
Originally Posted by gm9 View Post
If you want a suggestion, that code was just a quick search & replace from me, if you want to make it easily modifiable you'd define the spells to be filtered only once in the root (or an <include>). Also to reduce the size you could have only have one instance of the filtering code and call it from each of the pages (passing the number), but that isn't really necessary.
Well the spell would have to be filtered out each time the text changes. So my question is how would I do this with the include? And the passing the number?

If I can do the same thing with a smaller file, then I'd like to go that route. But most of these things with includes I don't really understand. I still feel like a newbie with this stuff.
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #27  
Unread 01-26-2009, 04:43 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Well you know you can traverse the xml tree so put your

1a=
2b=
3c=

in the <include> at the root of the page, and then always reference this via Parent.Parent. ... - that way you only need to define it once, makes it easier to edit it.

And the other things is you could put the actual hiding code in a button at the root and have the individual pages call it in the same ways (Parent.Parent. ... .Press=true). You'd need to pass the reference of the page to the button as well, e.g. Parent.Parent. ... .CallingPage=Parent.Name and then show/hide that page.

PS: Looking at your actual code I still don't get why you have all that scripting in their configuring the dynamic data objects? Why is that needed, why not just show/hide the entire page?
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.

Last edited by gm9 : 01-26-2009 at 04:46 PM.
Reply With Quote
  #28  
Unread 01-26-2009, 05:22 PM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

Quote:
Originally Posted by gm9 View Post
PS: Looking at your actual code I still don't get why you have all that scripting in their configuring the dynamic data objects? Why is that needed, why not just show/hide the entire page?
Less dynamic data is actually loaded which is better on the system performance.
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #29  
Unread 01-26-2009, 05:23 PM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default

Personally as a Defiler and a Raider(the worst combo for spam buffs that you don't care about!) I cant exatcally think of a use for this, I guess you could use some of your code to modify it into my proposed maintained window. But at what cost to performance?

Link to proposed maintained window.
Reply With Quote
  #30  
Unread 01-29-2009, 09:43 PM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

A timer for debuffs/buffs/heals to track when to reapply them. I'm not big on certain maintained until cancelled buffs and some others I could care less about. I like a visual progress bar representation that helps me figure out when a target is mezzed or mez breaks and how long, and when to reapply buffs/debuffs. I like to have a window on the side of the center of my screen to track these. It seems to all boil down to personal preference. Kind of like how you like to be really minimalistic.

As to gm9:
I can't figure out how to use includes and text files to make it easier. It seems like you would still need a hell of a lot more coding and it would be more taxing on system resources.
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #31  
Unread 02-02-2009, 08:30 AM
nluerdarea nluerdarea is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jan 2005
Server: Crushbone
Posts: 115
Default

Wow, this would come in really handy!

Once you get it all figured out, I'd love for this to be released
(I'll even do some testing for you if you want)
__________________
Reply With Quote
  #32  
Unread 02-05-2009, 01:47 AM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

I remember seeing a thread that a dev added or is allowing greater than and less than values now. Can someone link me the thread?

Oh and I would like to know how I could do something like "greater than 0 but less than 75"
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #33  
Unread 02-05-2009, 02:44 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Code:
iValue=10
COND=iValue > 0 && iValue < 75
Parent...Value=COND ? true : false
^ should work
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #34  
Unread 02-05-2009, 02:54 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

I see what gm9 is getting at about reducing the used code. I did a similar include/config file with my Statbar and used a Top-Level-of-tree-located button, which gets pressed instead of repeated the same long amount of code multiple times.


To pass on the number, you can simply make a custom value on the button itself called something like "iPassedNum" or something shorter...

First set that number.
Then press the button. Have the onPress code in the button be the code you already have used a bunch of times, using the number value in the string (use the concatenated stuff... ##)

You could get fancy with your config.
Maybe use a Data object:
Code:
<Data Name="1" SpellName="Tyrannical Mind"/>
<Data Name="2" SpellName="Spell Lash"/>
<Data Name="3" SpellName="Haruspex"/>
<Data Name="4" SpellName="NULL"/>
<Data Name="5" SpellName="NULL"/>
<Data Name="6" SpellName="NULL"/>
<Data Name="7" SpellName="NULL"/>
<Data Name="8" SpellName="NULL"/>
<Data Name="9" SpellName="NULL"/>
<Data Name="10" SpellName="NULL"/>
The check in the button:
Code:
1a=(Text == DataPage.1.SpellName)
2b=(Text == DataPage.2.SpellName)
3c=(Text == DataPage.3.SpellName)
4d=(Text == DataPage.4.SpellName)
5e=(Text == DataPage.5.SpellName)
6f=(Text == DataPage.6.SpellName)
7g=(Text == DataPage.7.SpellName)
8h=(Text == DataPage.8.SpellName)
9i=(Text == DataPage.9.SpellName)
10j=(Text == DataPage.10.SpellName)
COND=1a || 2b || 3c || 4d || 5e || 6f || 7g || 8h || 9i || 10j
As you can see.. you could get fancy, making it much easier to modify for different classes, and save some coding in the end when the list of buffs you're check gets longer... Especially if you did something like loaded it by your subclass or something spiffy for big config files

Please excuse any coding type-o's/mistakes, lol
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 02-05-2009 at 03:13 AM.
Reply With Quote
  #35  
Unread 02-05-2009, 04:02 AM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

Quote:
Originally Posted by Drumstix42 View Post
Code:
iValue=10
COND=iValue > 0 && iValue < 75
Parent...Value=COND ? true : false
^ should work
What does IValue represent? Or is that just the Value of the property you're trying to do this to?


The other stuff above I seem to understand much better now. I'll probably convert my next version for that.
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #36  
Unread 02-05-2009, 05:43 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

iValue is just a random variable name he chose. Drum's code needs a slight modification though, you'd need to put it like this (as with the OR || code):
iValue=10
a=iValue > 0
b=iValue < 75
COND=a && b
(with a and b being other random variable names.)
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #37  
Unread 02-05-2009, 12:19 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Ok, that makes sense. Since they're 2 different statements, and you're checking if both are true. I forget to break the checks into separate checks sometimes. Some times just hard to do the K.eep I.t S.imple (S.tupid) method
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #38  
Unread 02-05-2009, 01:55 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

I hear you, EQ2 coding is a bit particular.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #39  
Unread 02-06-2009, 01:15 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default

We could always modify the client to use Lua as its scripting language, but then you'd have to re-write every line of your UI code.

Actually...

We could do something like look for a string at the beginning of a script command like "<Lua>" and if it exists, parse the script with a lua interpreter, otherwise pass the script to the existing interpreter.

*wheels start churning*

Last edited by SOE-Rothgar : 02-06-2009 at 01:19 PM.
Reply With Quote
  #40  
Unread 02-06-2009, 01:26 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

lol Rothgar's got himself another project.

It's probably a bit late in the game for LUA, my first priority is still to finally get eq2's scripting engine fixed to handle Unicode character encoding. After all certain default UI features that are not hardcoded but use scripting are also broken on international servers because of this. There, I said it again.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #41  
Unread 02-06-2009, 02:43 PM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

Quote:
Originally Posted by SOE-Rothgar View Post
We could always modify the client to use Lua as its scripting language, but then you'd have to re-write every line of your UI code.
I'm down for that! I'd resurrect eXtremeUI if you guys added a real scripting language.

Not saying you guys haven't done a super fantastic job making the UI even easier to mod. I just hate having to do 10 steps to get 1 thing done.

Come to think of it, you could do it in a way people wouldn't have to recode every line of their UI. Just add new evens LUAOnShow, LUAOnHide... etc..
__________________
Landiin's EQ2MAP Updater Discussion Download

Last edited by Landiin : 02-06-2009 at 02:47 PM.
Reply With Quote
  #42  
Unread 02-06-2009, 02:45 PM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

Quote:
Originally Posted by gm9 View Post
It's probably a bit late in the game for LUA
Hush you, nothing is to late.. I vote make this your #1 Rothgar
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #43  
Unread 02-06-2009, 04:30 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default

Yeah, I considered that we could have separate functions for lua commands, and then I decided that it would be much easier to add a new property to UIWidget "UseLuaScript" and if that property is set to true then all functions would be processed using the lua interpreter.

I talked to a coworker who is a big lua fan and has been doing lots of server-side lua work and he was pretty excited about this idea too. He's the type of guy that likes working on little side-projects too, so I'm thinking maybe I'll keep pestering him to do it.

With a lua script engine we'd have true function calls and we could expose a whole lot more of our UI to scripting. It would be much easier to create functions for reading/writing your own data to the new xml file. You'd also get all the built-in functions for lua. It would be nice being able to create local variables that don't turn into widget properties. The lua environment would be implemented on a window basis, so while each event would have its own stack space, you could declare global variables on a window level and they'd persist between function calls. So you wouldnt have to store data in widgets.

Implementing the "UseLuaScript" property would let existing UI's continue using UIScript even down to a widget level.
Reply With Quote
  #44  
Unread 02-06-2009, 04:38 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Actually if you properly implement it LUA should be unicode or even binary compatible. Don't mess it up!
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #45  
Unread 02-06-2009, 06:48 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Haha.

INI's saved as editble XML...
A possible in-game replacement of EQ2.ini setting files...
New UI script functions and events...
Talk of LUA function scripting...

Holy cow, EQ2 UI is really coming together this year. Can I get a hoorah for 2009?
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #46  
Unread 02-06-2009, 06:51 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Hoorah.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #47  
Unread 02-06-2009, 07:09 PM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

Quote:
Originally Posted by SOE-Rothgar View Post
Yeah, I considered that we could have separate functions for lua commands, and then I decided that it would be much easier to add a new property to UIWidget "UseLuaScript" and if that property is set to true then all functions would be processed using the lua interpreter.
Yea that's even a better idea.

Quote:
Originally Posted by SOE-Rothgar View Post
The lua environment would be implemented on a window basis, so while each event would have its own stack space, you could declare global variables on a window level and they'd persist between function calls. So you wouldnt have to store data in widgets.
I would think you would implement it at root level. While lua isn't a OO language out of the box there are packages out that adds OO to the lua language. Ether way I'm looking forwards to it.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #48  
Unread 02-06-2009, 07:35 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default

Quote:
Originally Posted by Landiin View Post
I would think you would implement it at root level. While lua isn't a OO language out of the box there are packages out that adds OO to the lua language. Ether way I'm looking forwards to it.
You're right, it would be done this way. I was just trying to give an example of using data out of scope of the local event.
Reply With Quote
  #49  
Unread 02-06-2009, 11:36 PM
dragowulf's Avatar
dragowulf dragowulf is offline
A man among men
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Nagafen
Posts: 934
Default

Darn it. I'm just getting the hang of EQ2's XML..does this mean that I'm going to need to learn LUA (which means more questions for me to ask, which is bad for you guys because you have to answer) to maintain awesome status?

I'm still down for it however or if you guys decide to do it.

Is LUA more hard than EQ2 XML?
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #50  
Unread 02-07-2009, 04:56 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Lol. I haven't scripted with it myself before, but I've looked it over.

It's a normal scripting language (not tags like XHML) allows functions/methods, classes, code comments, etc...

http://lua-users.org/wiki/ClassesAndMethodsExample

I think it's more unfortunate than "too late in the game" for lua to just be implemented now. As in, it would have been awesome to see this sooner. No complaints though. Looking forward to any more info on this going into development status.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:30 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI