View Single Post
  #8  
Unread 08-05-2006, 04:36 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

What most have said is true but it's not as limited as they make out. The only thing to keep in mind is you have to stay with their naming scheme of the UI tree. Other then that you are free to do what ever.

Most onscreen windows are in the module MainHud. Also keep in mind; just because you are editing the target window doesn't mean it has to be the target window, you can make the player window the target window. It all depends on what gamedata you use in the root node of a window.

Every window is made up of objects. The most common object is the page object. <page name="blah" /> Each object has a set of event handlers, such as OnShow, OnHide, OnActivated, Ondeactivated and ect.. Through these event handlers you can add your script.

The Script engine SOE has provided IS very limited. You can't do any manipulation of strings you have basic math operation. Scripts are executed top to bottom right to left.

Through scripts you can modify any property of any object in the UI but you have to call it from where you are in the UI. Example;

<page name="PageOne" OnShow="PageTwo.b1.localtext=Blah" Size="1,1">
<page name="PageTwo" Size="5,5">
<button localtext="Hrmm" name="b1" OnPress="Parent.Parent.Size=2,2"/>
</page>
</page>

Look at the OnShow event handler;

PageTwo.b1.localtext=Blah

See how I got through the layers/child object to get to where I want to go. I access each child object by its name.

Look at the OnPress envent handler.

Parent.Parent.Size='2,2'

I have to go up 2 object via the Parent directive to access PageOne's size. If I wanted to access PageTwo's Size I would of only use on Parent directive. So kind of look at the UI tree as a directory tree and you have navigate it that way replace .. with parent. :P

Prophet was brought up and he might use some advanced scripting I don't know never looked but you should take a look eq2map's code, eXteme's group and start button has some good script to look at for controlling what images are displayed based on class. Fetish's mods have some nice advanced scripting in them also.

The best thing to do is download some of the top mods, rip them apart to see what makes them tick.
__________________
Landiin's EQ2MAP Updater Discussion Download

Last edited by Landiin : 08-05-2006 at 04:42 PM.
Reply With Quote