Friday, November 14, 2008

Java: CharSi Update #10

Now that the Runeword Wizard portion of the program is completed I can turn my attention back to the main goal of this application, namely the ability to virtually equip a character with items and see those stats. To do this I need a list of available pieces of equipment that can be displayed in the item JList.

Similar to the way runewords are handled with the Runeword Wizard I decided upon text files, one for each possible item. Granted an access database or something similar would be a bit more efficient in the long run, but since I have no idea how to hook one up the application text files remain my only alternative beyond hard coding each item's stats into the class files.

Before these files could be created I needed to generate a list of all possible mods that can spawn on items. This is needed for two reasons; first to be able to consistently word a mod in the text files and secondly to lay the basis for the array of arrays necessary to compare possible mods to mods actually present and update the correct variables within the program. The second part is far into the future so I'm not worrying about that yet, however wording the mods right is something I must worry about. If I misspell a mod then when the text file is searched for that mod it won't be found due to a typo, and as a result the information displayed will be inaccurate. As a result I must be very careful when creating the text files, such as the one seen below.

Vampire Gaze
Grim Helm
Required level: 41
Required strength: 58
Defense: 252
Durability: 40
+100% Enhanced defense
Adds 6-22 cold damage over 4 seconds
15% Slower stamina drain
6-8% Life stolen per hit
6-8% Mana stolen per hit
Damage reduced by 15-20%
Magic damage reduced by 10-15

The files themselves are organized in subfolders that separate set/unique/white(normal) items based on whether they are normal, exceptional or elite. This makes displaying the list of item matches much easier in the JList component if all the normal set items are stored separate from the unique items.

Once the files were created, the code then needed to be generated that could search them and display the correct items dependent on which checkboxes the user had selected. A pair of methods were created for this purpose, one being the workhorse and the other calling the first dependent on what folder location was being utilized. A basic setup of the first method is below.

if(normalFlag){
if(whiteFlag){
location = location.concat("Normal/White/");
AddToList(location);
location = location.substring(0,11); //revert string back to original form
}
if(setFlag){
location = location.concat("Normal/Set/");
AddToList(location);
location = location.substring(0,11); //revert string back to original form
}
if(uniqueFlag){
location = location.concat("Normal/Unique/");
AddToList(location);
location = location.substring(0,11); //revert string back to original form
}
}

The folder location is passed to the workhorse method (AddToList) and all files in that location are dumped into an array of Strings. That list of Strings is then shortened to remove the .txt portion of the filename and then added to the DefaultListModel governing the item JList component. This allows the items to appear in the item JList component. Once in this component the JList Listener is then added that once an item is selected its corresponding text file is displayed in the JTextArea. The layout of the listener is the same as the method shown above.

The next step is to then transfer this same code to the class files for the other equipment types. I do realize that by grouping items in such broad terms the generated lists for the weapon types will be quite extensive. I've considered changing that class file into a JTabbedPane, one for each weapon type, except that there are fifteen different weapon types and that would lead to quite a bit of duplicate code. Another alternative is to add another set of checkboxes, one for each weapon type, that the user can select which weapon types to display. This would make the code quite a bit longer and require a new component added to the GUI to display these choices. I haven't decided which way I wish to go, or if I simply want to leave it as is and have a long list of items displayed. As a result I'm going to skip the weapon class update for now and concentrate on the others.

Tuesday, November 11, 2008

Diablo II: Patriarch Lucian

I have patted a single Druid in my D2 career, and that was on Battle.net. Since one of my goals for this year was a pat/mat of each class I have so work to do. So a Druid was decided to be my next character, mostly because I have no idea what type of Barbarian to build. Specifically this character will be a Fury werewolf Druid. I have a nice 298% ED Ribcracker collecting dust in my ATMA stash so time to put it to use. And so Lucian was born. The name comes from the movie Underworld, where the leader of the Lycan (werewolf) clan is a fellow of the same name. Seemed fitting.

Lucian started out whacking away at monsters with his starter equipment and things went rather well. Due to this being a purely physical damage build I am allowing myself some twinkling before reaching Hell. Specifically the weapon may be twinkled, but nothing else. This lets me use items like the Hellplauge and Bonesnap that would otherwise remain idle in my stash. Such twinkling made Lucian's progress move at a decent pace, but nothing absurd.

Resistance troubles plagued Lucian from the start and as expected the first Act was fairly uneventful, but Act II gave him real problems. Specifically the lightning beetles and their charged bolts were the culprit of many a NDE. For this reason Lucian traded in the rogue mercenary for a desert warrior one, so that someone else could tank these monsters.

Along the way Lucian became quite fond of his summonable companions, especially the ravens.
His constant companions in the beginning were a pair of ravens, a dire wolf and an oak sage spirit. The ravens were key in keeping the mobs a bit off balance with the constant attacks and blindings. As a result Lucian wasn't overwhelmed and could hold his own, even with low resistances and no hard points spend in Vitality.

All of this changed however in the beginning of Act IV. Lucian was level 29.5 going in and it only took clearing the first area to raise his level and gain his endgame skills, specifically Grizzly and Fury. The grizzly makes a much better tank than the single dire wolf Lucian had up to this point, so he traded. As for Fury, suddenly monsters were dying so much faster it was fantastic. Also made Bonesnap a bit faster of a weapon. Very soon after Lucian reached level 31 and could equip his endgame weapon, Ribcracker. Oddly enough his damage output dropped when replacing the Bonesnap, but the speed of attacks increased dramatically and that more than made up for the small damage output reduction.

Suddenly Lucian was breezing through the rest of Normal. No NDEs, no interesting drops but also no problem handling the Chaos Sanctuary and both Diablo and Baal at P8. Even Iron Maiden wasn't an issue as Lucian would cast a dire wolf on the Oblivion Knights and that would keep them occupied just long enough for him to deal with the Doom Knights before knocking off the OKs as well. Also helped that a Cathan's Seal dropped early in Act IV and the 6% life leech made it so that Lucian didn't need to use health potions anymore, reducing the amount of times required to return to town while questing.

Nightmare was very much the same, at first. Once Lucian arrived in the desert his mercenary companion had difficulties staying alive. That, coupled with the ghost packs that were encountered everywhere and kept burning off all of Lucian's mana, made the trek through the desert quite long and dangerous. As it was that is where Lucian met his first, followed by a few other, death. His cold resistance is -30% currently and up to this point he had base vitality. The combination meant that each cold enhanced boss encountered killed him off. I finally broke down and placed 125 points into Vitality, so his life is over 1100 and deaths aren't occurring anymore.

Lucian cruised through the rest of Nightmare without too many difficulties. Did drop the player settings to 3 for the Chaos Sanctuary so that Oblivion Knights weren't too difficult to handle. Other than that everything, including the Ancients were done at P8. The mercenary liked to take a dirt nap quite often the closer they got to Baal, against the minions he must have been resurrected at least a dozen times. Once Baal was defeated a few NM Baal runs were performed to level everyone to 76 so that all the endgame equipment could be used. Then it was onward to Hell.

Hell proved to be a bit easier than expected. From the other patriarch threads in the SPF I assumed that entering Hell with a non-upped Ribcracker and no Fortitude I would have a difficult time, since all monsters have 50% physical resistance. That didn't turn out to be the case at all. Lucian breezed through the first three acts without any difficulties. All through Normal and Nightmare he quested with a grizzly but now in hell the dire wolves come into play, and they held up nicely.

Mehpisto was a pushover, getting to him was a bit more difficult. In one of the side rooms Lucian encountered a double boss pack of Blood Lords coupled with a champion pack of the same monsters, along with the unique council member I expected. Needless to say the dire wolves died instantly since they don't do so well against elemental attacks. The grizzly came out and tanked the lords while Lucian and his merc concentrated on one Blood Lord at a time. Eventually they were all dealt with and Mephisto was handled without having to use a single potion. Lucian recast the dire wolves in preparation for Act IV.

That was a mistake. Keeping them alive against the harder hitting monsters of that act proved to be quite the task as they needed constant recasting. So Lucian switched back to grizzly which could pretty much be cast and forgotten about. In the meantime I put all available skill points into Dire Wolf in order to increase their life so I could use them again. As it turned out they were useful, in the Chaos Sanctuary. My way to avoid Iron Maiden was to cast three dire wolves at the OK's feet, then deal with their minions. It worked quite well, except once. I was IMed and meant to cast dire wolf but instead misclicked and furied a doom knight. Obviously I died quite quickly, up to this point my only death in Hell.

As it turned out Infector of Souls ended up much harder than Diablo himself, since IoS spawned immune to physical and with a Conviction aura. Much casting of grizzly was needed to keep the pack at bay for a few seconds while Lucian engaged on minion at a time. Eventually they were all dealt with so Lucian could resurrect his mercenary companion and deal with Infector himself. One thing to note is that my hellforge drop was a Hel rune, the lowest possible one. The past four characters I've finished have had drops of Io-Hel-Hel-Hel, apparently my luck in respect to runes continues.

The last act was ripped through like nothing else. I didn't intend to play it all in one sitting, but that's what happened. None of the normal areas held down Lucian much, except for a few places. The Frozen River contained Fanaticism enhanced Succubus in large numbers that gave Lucian fits, and required quite a few mercenary resurrections. A pack of Might enhanced Blood Lords didn't help matters in the Glacial Trail, but all were manageable. Eventually the Ancients were encountered and defeated after a long protracted battle where they were split up and dealt with one at a time.

The World Stone Keep help the normal assortment of Flayers, Oblivion Knights and Gloams. Each dealt with in the normal way; straight up assault, spammed dire wolves or using a distractionary grizzly respectively. And then there were Baal's minion waves, which didn't last long. With Life Tap active and a decent life leech possible to boot Lucian was able to tank all of them, including Lister's entire pack. After that Baal was almost anti-climatic as he fell without summoning a single clone or teleporting more than twice.

A few notes about this build. A Fury Druid is definitely overpowered for P1 Hell, and that's without Fortitude or and upgraded Ribcracker. I can't image what this character would be like with both of those, but it's definitely enough to keep Baal awake at night. The character himself had no way of dealing with physical immunes, such as Ghosts. Instead he relied on the mercenary with his chance to cast Decrepify for these situations. Now the only problem with this was that Life Tap from the gloves or being blinded by a raven attack overrode Decrepify on a semi-regular basis, which was a bit annoying. I can see using a different pair of gloves, if a better one existed. However Life Tap definitely had it's uses and saved both Lucian and his mercenary's lives in more than one occasion. So overall I'd stick with the setup and just live with the fact that physical immunes will take a little longer than normal to eliminate.

Stats:
Level 82
Strength - 78(111)
Dexterity - 40(91)
Vitality - 362(362)
Energy - 20(50)

Life - 910(929)
Life in Werewolf form: 2556
Mana - 182(325)

Lightning Resistance - 75
Fire Resistance - 75
Cold Resistance - 60
Poison Resistance - 70

Skills:
Summon Grizzly - 1(5)
Heart of the Wolverine - 17(21)
Summon Dire Wolf - 10(14)
Lycanthropy - 20(27)
Werewolf - 20(27)
Fury - 20(27)
Raven - 1(5)

Equipment:
Weapon: Ribcracker (Shael)
Armor: Wire Fleece 'Smoke'
Boots: Gore Rider
Belt: String of Ears
Gloves: Dracul's Grasp
Helm: Jalal's Mane
Ring 1: Raven Frost
Ring 2: FR 6%, PR 29%, 5% ML, 36 AR
Amulet: 17 dex, 43 mana, 12% resist all, +2 Druid levels

Mercenary (Might Desert Warrior)
Helm: Vampire Gaze
Armor: Duriel's Shell
Weapon: The Reaper's Toll

Hellforge
NM - Lum
Hell - Hel

Monday, November 10, 2008

Diablo II: Fury Druid Skill Layout

A Fury Druid is a fairly basic character. This is a druid in werewolf form that uses Fury as his main attack, with a few secondary skills for crowd control and so forth. The big debate about this type of build is what type of spirit to have, Oak Sage or Heart of the Wolverine. I went with Wolverine as in Hell all monsters have 50% physical resistance so the more damage I deal the better. Along with that due to being in werewolf form the character should have plenty of life to begin with so more isn't going to provide much of a bonus, while more damage is definitely a major plus. Since he deals purely physical damage he does need some sort of backup plan for the physical immunes that are encountered in Hell, most specifically the Ghost-type monsters. The skill setup is as follows:

Werewolf - 1
Lycantropy - 3
Oak Sage - 1

At level six a few good skills are available. Obviously the main skill Werewolf is present to increase attack speed and attack rating. However here Lycantropy is the skill being pumped for two reasons: extra life and duration. Following that theme a one point Oak Sage spirit will be used from here onward until Wolverine becomes necessary. Early on the extra life will be what keeps this character alive in dire circumstances and is a hallmark of the build in general.

Raven - 1
Spirit Wolf - 1
Lycantropy - 7
Feral Rage - 1

At level twelve the duration of Werewolf is decent and the life increase very noticeable. However a big change at this point is the availability of minions. The Spirit wolves provide tanks to spread out monster packs so they are not all concentrating on the character while the ravens will help keep the packs disorganized and ranged attackers blinded. Ravens will be useful all the way to the end of Hell.

Lycantropy - 10
Rabies - 1
Heart of the Wolverine - 1
Dire Wolf - 1

At level eighteen dire wolves replace spirit wolves as the minion of choice for tanking purposes. Their increased live along with helpful corpse disposal make them much more viable. While Heart of the Wolverine has become available, the small amount of increased damage it provides doesn't warrant switched from the Oak Sage for the time being.

Lycantropy - 20

At level twenty-seven Lycantropy is maxed and the duration of Werewolf is quite substantial so that it won't be running out in the middle of a long protracted battle anymore. Just remember to recast it from time to time after a fight. At this point the character should have a large life pool and near death experiences (NDE) should be few and far between.

Werewolf - 2
Grizzly - 1
Fury - 1

At level thirty our main offensive skill is available, Fury. The mana cost is relatively low so that this can be used right away, just keep a column of mana pots in the belt in case a mana burn monster is encountered (Ghosts). Also at this time an excellent tank becomes available, Grizzly. The grizzly has much more life than all three dire wolves put together and for much of the game will be the main minion companion, at least until we get a chance to put more points into Dire wolf to boost their life.

Fury - 20
Werewolf - 4

At level forty-nine Fury is completed and our character should be dealing quite a bit of damage rapidly. The Attack rating will be quite his so that no points need to be placed in Dexterity at all, except to wear equipment. A few charms or equipment pieces that provide straight AR is all that is required to allow a decent chance to hit once Hell is reached.

Werewolf - 10
Heart of the Wolverine - 10

At level sixty-two we get a chance to boost Heart of the Wolverine and it may now replace Oak Sage as the spirit of choice. This boots our AR that much more, as well as the damage dealt by the entire party. The mercenary will very much enjoy this boost, so make sure to equip him/her with life leech and she/he won't die very often at all.

Werewolf - 20
Heart of the Wolverine - 15

At level seventy-four Werewolf is not maximized and the character has become as fast as possible with his Fury cycles. Along with this extra damage is added by the Wolverine spirit and the character is just about ready for Hell.

Dire Wolf - 10
Heart of the Wolverine - rest

The next group of skill points goes into Dire Wolf to increase their life, which is done at level eighty. This allows the character to quest in hell with three dire wolves instead of a single grizzly to better spread out the monster packs. They still don't equal the grizzly in durability, so constant recasting is necessary. As a result the character will need to manage his minions on a regular basis as the spirit has low life, the ravens don't have too many hits available before they disappear and the dire wolves die to hard hitting monsters. Still, the main focus of the character will be melee fighting with minion management a secondary concern.

Final Skill Distribution:

Werewolf - 20
Lycanthropy - 20
Fury - 20
Heart of the Wolverine - 15
Dire Wolf - 10
Grizzly - 1