I have to confess that I like the new GUI interface operations and how we can, as builders, develop various feedback and displays for our players. To me it adds a new dimension to the game, and allows me to help structure a module to keep players aware of events and help keep the plot focused. Or, I may also be able to design an interface to make use of new and complete independent systems that make the world of Althéa unique.
The only problem is that XML is new to me, much like script was when I first encountered it. However, whereas script appeared more logical, XML requires a little more forethought, as much of what you are doing is building something visual with numbers (or so it seems to me). In script the objects to code with were mostly already present, whereas XML is more like coding the object in the first place.
Therefore, if I wanted to make more use of the new GUI interface, I needed to start looking at what others have done and pull them apart to understand it. To help me in this project, I copied and printed off the small amount of information available at Obsidian's XML Blog. The XML information is on the first few pages (oldest) of the blog. I then opened up some XML files that others have written and started to try to make sense of everything.
I found that if I copied the text into something like Word and then highlighted different sections according to when each "function" appeared to start and end, I began to see a pattern among the otherwise just "rush" of text. Then, comparing the highlighted code with the information I copied from Obsidian, I could begin to see how the functions were being used, and even managed to start editing my example XML to test in game. The results were encouraging, and while I am not going to be making many of my own to begin with, I do believe I have enough knowledge now to be able to work on someone else's XML file and alter it for what I need. As there are quite a few official and unofficial files available, I should be able to do what I need when the time comes. (I will let you know.)
Here are some of the XML commands that I have started to get to grips with:
< !-- COMMENTS HERE -- >: How to make comments in the XML code.
- UIScene : Defines the main GUI size, placing and function. (The box that appears.)
- UIText : Places text within the main GUI.
- UIButton : For placing a button, but appears to rely a lot of UIFrame for visual look.
- UIFrame : Appears to be used with UIButton to define an image.
Feel free to comment on XML coding if you can help enlighten me to anything or lead me to a better understanding of it. There are still a few functions that I need to look at more closely and learn how all the different parameters interact with other, including:
- UIObject : Appears to be used with most other functions in some way.
- UIListBox : Has similarities with UIPane.
- UIScrollBar : Appears to be used UIListBox (among others).
I am pleased to report that my Readable Books hak has been very well received from the NWN2 community, and so far, has received all tens for its contribution. :) (Link to the mod is on the left.) Note, I originally uploaded this module into the mods section, but later had it transferred to the Custom UI section, which is more appropriate. This has, however, made some of the comments normally shown within the "View Comments" section unavailable. They can, however, still be read from the comments below the module listing.