EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > General Discussion > Dev Shack

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 12-05-2008, 01:59 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default UI Builder Changes

I just realized that I made a change back in August so that the Left, Top, Width and Height functions would take a float value but apparently I forgot to push the version out to the patcher.

I'm going to do that today, but first I'm going to try to add an Int() function that will convert a value into and integer.

If you'd be interested in testing this version out before I patch it, I can send you a copy today. Just PM me your email address. I'd like to make sure the changes don't break anything.
Reply With Quote
  #2  
Unread 12-05-2008, 02:17 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default

While I'm working on this Evaluation hook, are there any other simple functions that would save you some work? I was thinking about adding int, abs, floor and ceil functions.
Reply With Quote
  #3  
Unread 12-05-2008, 02:41 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

The int() function would be great, that would simplify many things. However we are currently using left, top, width, height not only to convert float to int, but also to shave off other characters at the end of a numeric string, such as a percentage sign. Therefore it would be great if the int() function would do that as well.

Your change will require a lot of mods to be changed (at least I assume that this does not only affect UIbuilder but also the ingame scripting engine) but this is a welcome change.

You can send me a copy of UIbuilder for testing although I'm more anxious to test in game on Test.
__________________
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
  #4  
Unread 12-05-2008, 02:48 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
Send a message via ICQ to Landiin Send a message via AIM to Landiin Send a message via MSN to Landiin Send a message via Yahoo to Landiin
Default

haven't used the live one in a while, been using the last one you sent me. Just figured you wasn't as forgetful as me o_O Ya send me the new build and I'll run it. I'll email you also.

As for more function
A function like Windows StringCchCopyW API would be killer

edit
Changed Copy to StringCchCopyW, I've use my own wrapper for to long now..
__________________
Landiin's EQ2MAP Updater Discussion Download

Last edited by Landiin : 12-05-2008 at 03:15 PM.
Reply With Quote
  #5  
Unread 12-05-2008, 03: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 gm9 View Post
The int() function would be great, that would simplify many things. However we are currently using left, top, width, height not only to convert float to int, but also to shave off other characters at the end of a numeric string, such as a percentage sign. Therefore it would be great if the int() function would do that as well.

Your change will require a lot of mods to be changed (at least I assume that this does not only affect UIbuilder but also the ingame scripting engine) but this is a welcome change.

You can send me a copy of UIbuilder for testing although I'm more anxious to test in game on Test.

Hmm, can you give me an example? With the old version of our UI library, Left,Top,Width and Height were parsing the text as a Long value. If it encountered a non-numeric digit it should have failed and not set the value of the property. So I'm not sure how you are using it to strip non-numeric characters.
Reply With Quote
  #6  
Unread 12-05-2008, 03:51 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

I think gm9 meant to say we're using Top, Left, Width and Height to get Integers after we put values into the comma delimited values like Location and Size.

Not sure about percentages. Been outta the loop with stuff the past few weeks.


Code:
iMathEvaluation=4+4
Parent.Location=(iMathEvaluation ## ', 0')
Random.Value.That.Needs.To.Be.Int=Parent.Left
Simple function requests? Hmm... I coulda sworn I had some ideas. You've put me on the spot now!
__________________
"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 : 12-05-2008 at 03:58 PM.
Reply With Quote
  #7  
Unread 12-05-2008, 03:52 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
Send a message via AIM to dragowulf Send a message via MSN to dragowulf
Default

I'm not sure if this is UIBuilder related or not, but LocationEffector does not work vertically. I tried this in UIBuilder and it did not work.
__________________
May Jesus Have Mercy On Us
Reply With Quote
  #8  
Unread 12-05-2008, 04:29 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by Drumstix42 View Post
I think gm9 meant to say we're using Top, Left, Width and Height to get Integers after we put values into the comma delimited values like Location and Size.

Not sure about percentages. Been outta the loop with stuff the past few weeks.


Code:
iMathEvaluation=4+4
Parent.Location=(iMathEvaluation ## ', 0')
Random.Value.That.Needs.To.Be.Int=Parent.Left
True for comma delimited values.

Percentages is actually something I thought you discovered Drumstix, lol. To shave off percentages I think you can use the Top, Left, Width, Height directly:

Code:
Left=Parent.Spell_Cast_Percent.Text
Or my code has a bug, which is a possibility.

Edit: Yup, you discovered it: http://www.eq2interface.com/forums/s...9&postcount=13
__________________
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 : 12-05-2008 at 04:37 PM.
Reply With Quote
  #9  
Unread 12-05-2008, 05:03 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default

That makes sense that you're using Top,Left etc to read out an integer. All that I changed is when you set the Top,Left values, it will now properly parse a float and treat it like an int. So even though you'll have an int() function now, you won't need to use it to do something like.

Control.Left = 5 + 10

I just finished writing the int() function and made sure it works with any non-digit character. It'll strip spaces off the front too, so basically it'll look for a dash and then numbers. When it hits a non-number it'll terminate and return what it found.

These changes will not go live in the game until the next GU. I'm not sure when we are going to push them to test, but if you want to test script sooner, I can send you a copy of the new UI builder.
Reply With Quote
  #10  
Unread 12-05-2008, 05:16 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

That's great. So how is it implemented, classic way like this?

Code:
intValue=int(floatValue)
__________________
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
  #11  
Unread 12-05-2008, 05:19 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

Quote:
Originally Posted by gm9 View Post
lol, I've been sick past few days, so I'm a bit out of it
__________________
"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
  #12  
Unread 12-05-2008, 05:20 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

While you were asking about other simple functions: We do not have any string manipulation possibilities, maybe some standard string manipulation functions could be introduced? E.g. one thing we currently cannot do is remove a color code from a string. In other instances I might want to explode() a string or at least get the substr() until the occurance of a specific character in the string.

And to squeeze my constant request in: Non-ASCII support in UI scripting would be very very very helpful.
__________________
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
  #13  
Unread 12-05-2008, 05:22 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

Quote:
Originally Posted by Drumstix42 View Post
Simple function requests? Hmm... I coulda sworn I had some ideas. You've put me on the spot now!
Ohh I remember now... we were trying to convert certain dynamic data values that had %'s and decimals I think? and there was no way to do that.

12.9% for example, and the reasoning originally was because we wanted to subtract and add percentages. Direct reasoning because there was no dynamic data available outside a tooltip for avoidance percent.
__________________
"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
  #14  
Unread 12-05-2008, 05: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
Send a message via AIM to dragowulf Send a message via MSN to dragowulf
Default

Quote:
Originally Posted by gm9 View Post
And to squeeze my constant request in: Non-ASCII support in UI scripting would be very very very helpful.
lol.......This is for other languages, correct?

and what is explode() & substr()
__________________
May Jesus Have Mercy On Us

Last edited by dragowulf : 12-05-2008 at 05:33 PM.
Reply With Quote
  #15  
Unread 12-05-2008, 05:35 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

exploding a string returns a portion of a string up to a certain point.
substr is to get a sub portion of a string, similar to above, in a different 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
  #16  
Unread 12-05-2008, 05:38 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Non-ASCII is mostly an issue on localized servers, yes, but theoretically you can run into the same issues on English servers. It also breaks some default UI functions on localized servers.

With explode(delimiter, input) I meant a function to split a string into an array based on the occurance of the delimiter string. E.g. explode(",", "123,456") you'd end up with a "123" string and a "456" string.

With substr(input, start, length) I was referring to a substring function that returns part of a string.

EDIT: Drumstix ninja'd me.
__________________
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
  #17  
Unread 12-05-2008, 06:04 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default

I was just implementing the abs() function and had an idea.

I am making this function work for floating point numbers, so I take the value passed into abs() and parse it as a float. After calculating the absolute value I have to turn the float back into a string. This has the unfortunate side effect of doing what all the other math functions would do.

so... abs(-4) would output 4.000

I decided to modify our floating point parser which currently takes a precision value (defaults to 3) and make it so I can pass a precision of -1 to indicate that it should not use trailing spaces. So now abs(-4) equals "4" while abs(-4.5) would still equal "4.5".

Now to the interesting part. I got to thinking that there's no reason why the output of the math functions should always return a precision of 3. If anything it should use this new change I made and only return the precision necessary. So 4 + 5 = "9" and not "9.000". 2 / 4 would = "0.5" and not "0.500".

So my question is, would this mess any of your mods up? Are there situations where you are relaying on a precision of 3 by default?

Oh, one other thing. I found a bug that was fixed. Wanted to give you a heads up in case this would affect you.
Currently if you try to use a negative floating point number in script, it will stop parsing the number when it hits the period. I've fixed this so now you write -4.5 and it'll work instead of returning -4.

Last edited by SOE-Rothgar : 12-05-2008 at 06:08 PM.
Reply With Quote
  #18  
Unread 12-05-2008, 06:17 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

That is great, this facilitates a whole lot of things.

There will however be an impact on mods since currently due to the know precision of 3 we right align numbers and "hide" the decimals. Now if decimals are not shown anymore by default that will mess up the placement and thus the display of numbers in a couple of mods.

But since the placement was only done that way to get rid of the decimals in the first place personally I'd say go ahead with your change.
__________________
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
  #19  
Unread 12-05-2008, 06:37 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
Send a message via ICQ to Landiin Send a message via AIM to Landiin Send a message via MSN to Landiin Send a message via Yahoo to Landiin
Default

Quote:
Originally Posted by SOE-Rothgar View Post
So my question is, would this mess any of your mods up? Are there situations where you are relaying on a precision of 3 by default?
Who cares, this is a big improvement, people can recode easy enough for this.

StringCchCopy and StrPos is all we really need for stings and its low lever so it would be easy to make a UI wrapper for. But yea if u wanna go all out and make explode, left, right, substr I will not complain :P

Really if your gonna go that far might as well put in a language interpreter for Lua or some other common OO scripting language.
__________________
Landiin's EQ2MAP Updater Discussion Download

Last edited by Landiin : 12-05-2008 at 06:40 PM.
Reply With Quote
  #20  
Unread 12-05-2008, 06:51 PM
SOE-Rothgar SOE-Rothgar is offline
A Griffon
Yes this person is from Daybreak!
 
Join Date: Aug 2007
Server: Unrest
Posts: 208
Default

Sounds good. I know that going back and tweaking things will probably be a pain and several hours of work for many of you but hopefully in the long run this will be much better going forward.

If no one has taken the time to say it recently, we really appreciate all the trouble you guys go through to help make the game more fun for everyone. I'm just doing the job I get paid to do, but you guys are really putting in a lot of effort and it means a lot not only us at SOE but certainly to all of the players.

I've pretty much got all the changes wrapped up for today so if you think you want to test out the new UI Builder this weekend, shoot me a PM on here with your email address, or just email me at [email protected] and I'll send you the latest version.

Here are a summary of the changes for those that don't want to read back through the entire thread.

* Top, Left, Width, Height properties now accept floating point numbers
* The results of math operations no longer return 3 decimal places.
* Fixed a bug with negative floating point numbers not parsing correctly
* UIScript now supports the following functions:
int() - return the integer portion of a value
abs() - absolute value
floor() - return largest integral number less than x
ceil() - return smallest integral number greater than x

Last edited by SOE-Rothgar : 12-05-2008 at 06:54 PM.
Reply With Quote
  #21  
Unread 12-05-2008, 07:18 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
Send a message via AIM to dragowulf Send a message via MSN to dragowulf
Default

Quote:
Originally Posted by SOE-Rothgar View Post
Sounds good. I know that going back and tweaking things will probably be a pain and several hours of work for many of you but hopefully in the long run this will be much better going forward.

If no one has taken the time to say it recently, we really appreciate all the trouble you guys go through to help make the game more fun for everyone. I'm just doing the job I get paid to do, but you guys are really putting in a lot of effort and it means a lot not only us at SOE but certainly to all of the players.

I've pretty much got all the changes wrapped up for today so if you think you want to test out the new UI Builder this weekend, shoot me a PM on here with your email address, or just email me at [email protected] and I'll send you the latest version.

Here are a summary of the changes for those that don't want to read back through the entire thread.

* Top, Left, Width, Height properties now accept floating point numbers
* The results of math operations no longer return 3 decimal places.
* Fixed a bug with negative floating point numbers not parsing correctly
* UIScript now supports the following functions:
int() - return the integer portion of a value
abs() - absolute value
floor() - return largest integral number less than x
ceil() - return smallest integral number greater than x
This might mess up a few mods, but it's an easy fix. These are all great additions that will help clean up much of our code and clear a path for an easier and broader way of scripting.

With that said..any chance of adding any more event trigger functions?
__________________
May Jesus Have Mercy On Us

Last edited by dragowulf : 12-05-2008 at 07:24 PM.
Reply With Quote
  #22  
Unread 12-05-2008, 07:25 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by SOE-Rothgar View Post
If no one has taken the time to say it recently, we really appreciate all the trouble you guys go through to help make the game more fun for everyone. I'm just doing the job I get paid to do, but you guys are really putting in a lot of effort and it means a lot not only us at SOE but certainly to all of the players.
I don't think anyone from SOE has ever taken the time to say this. I tip my hat to you.
__________________
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
  #23  
Unread 12-05-2008, 07: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

Quote:
Originally Posted by dragowulf View Post
With that said..any chance of adding any more event trigger functions?
Event triggers can be pretty easy to add. What did you have in mind?
Reply With Quote
  #24  
Unread 12-05-2008, 07:39 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by SOE-Rothgar View Post
Event triggers can be pretty easy to add. What did you have in mind?
If they are easy:
  • OnChange
  • OnMouseDown
  • OnMouseUp
  • OnFocus
  • OnBlur
  • OnResize
  • OnLoad (= either for a <Page> or a specific dynamic data element, indicating when the element has been populated with data - this is an issue because dynamic data OnShow fires before the actual data is displayed)
  • ... I'll probably think of more

PS: As you discussed with drago: OnAutoAttack
__________________
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
  #25  
Unread 12-05-2008, 07:58 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
Send a message via ICQ to Landiin Send a message via AIM to Landiin Send a message via MSN to Landiin Send a message via Yahoo to Landiin
Default

Quote:
Originally Posted by gm9 View Post
PS: As you discussed with drago: OnAutoAttack
I wouldn't want just a generic one.. If we are making them..

OnPrimaryAA
OnSecondaryAA
OnRangedAA

but this could be DD element and not an event off a object IMO but either works.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:37 AM.


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