Wednesday, April 4, 2007

Java: AMAS

AMAS is an acronym for 'A Mini Arreat Summit', in reference to The Arreat Summit which is an online website devoted to Diablo II. AMAS has some similar information but it is organized in a way that is more convenient to view and also is available offline.

AMAS is the most complex program I've made individually to date. It incorporates everything from previous programs but expands on them quite a bit as well. The new features with this program are tabbed panels, input and output files and embedded graphics. We'll discuss each panel individually.


The newer patches of the program introduced a new concept, Runes. Up to this point only jewels and gems could be placed in open sockets of items to give those items an additional bonus. Runes each have special properties that may change depending on which item the are placed in. The runes can also be combined to create newer, more powerful runes using the Horadic Cube. This panel provides both the properties of the runes and the recipes needed to create them. The runes are laid out using a RadioPanel with the Grid layout. The rune pictures are saved on the hard drive and called for when the buttons are initialized. When a rune picture is selected the appropriate text file's content is written into the TextArea field.


Runes added a different twist, as along with having their own properties they could
also be added to certain items in such a combination that would give the item special properties not inherent with the runes themselves. The items used had to be either white (normal) or grey (ethereal) and have the exact number of sockets as the number of runes used. Keeping all of these runewords straight is difficult and a quick reference is required. This panel introduced the need for multiple drop-down menus to organize the runewords in a logical manner. However only one menu could be used at a time and at the beginning of each ActionListener the other menus are reset manually so that two runewords weren't selected at the same time. Each runeword is a separate text file on the
hard drive, as is each listing of the available items for the runeword itself.


This panel's information is associated with runeword creation. Only certain items may have sockets and then the number of available sockets varies greatly. Determining which items are available to create certain runewords is extremely useful in deciding if a normal item should be saved or sold ingame. The items are sorted depending on if they are class specific or by item type (shields, armor...etc). When an item is selected its associated graphic is also displayed to make recognizing them ingame easier. This panel is written so that when a selection is made in the first drop-down menu it populates the rest of the panel to correspond. Then the bottom drop-down menu is used to select the type of item to display. As a result listeners are needed for each drop-down and all of the information is saved on the hard drive in text files or as graphics.


The Horadric cube is a very useful piece of equipment, allowing the player to create
wonderful items or upgrade the ones they already posses into more powerful versions, among other things. The amount of recipes available is vast, however most are not used or were already covered by the Runes panel. Therefore this panel only displays the most commonly used and useful recipes. The options are displayed in Radobutton format with each button linked to a text file on the hard drive.


Each curse from a Necromancer, or certain monsters, has a different display over the
affected avatar. Some of these are fairly similar and keeping them straight can be quite difficult. The curse would be selected from the drop-down menu and this would display a graphic of the curse in action along with some statistics as to the function of this curse. The statistics are stored in individual text files on the hard drive.


Each aura for the Paladin has a different display under the Paladin's feet, or
monster's feet depending on the aura. Some of these are, like the curses, fairly similar and keeping them straight can be difficult. It is also rather unhealthy to mistake one aura for another ingame. The curse would be selected from the drop-down menu, split into offensive and defensive auras for simplicity, and this would display a graphic of the aura in action along with some statistics as to the function of this aura. The statistics are stored in individual text files on the hard drive.

This program took months of coding a few hours a week to create. Due to the size of
the program and all of the associated text files and graphics it is not possible to bundle the entire program into one executable. Instead AMAS works very much like a real program in that it has a folder on the hard drive containing all of its program files. The installer used is only a Zip file currently, however I am looking into freeware installers that could be used to install this program in a more official manner.

No comments: