Friday, March 27, 2009

Java: Hotline Update #9

Another round of changes was made to the Hotline program. This time around we were adding a single option, "India Inquiries", however two current options were removed as well, "Symbian" and "Blackberry". The reasoning for this is that not very many of either comes into the call center so there isn't any need to track them anymore. That and management has made any decisions they wanted about the devices with this OS.

This time around I was able to make the changes before it had to go live, as a result no need to recreate individual rep data. The changes consisted of removing two JButtons from the display and replacing them with a single one for the new option. Along with that in the ReportPanel class I had to extend the If-Else statement controlling which options were displayed in the report output. The month of March 2009 has a unique display so that had to be taken into account.

(Integer.parseInt(targetMonth) == 3 && Integer.parseInt(targetYear) == 2009)

Beyond that everything else remained the same in the program. This update will be made at the beginning of next month.

Tuesday, March 24, 2009

Java: CharSi Update #23

Saving the character information turned out to be easier than I first expected. JMenuItems were added to the File JMenu for saving purposes. One for simply saving the currently opened character and the other (Save As...) to assign a new name to the virtual character's save file.

When saving the character information all of it is saved to a text file with each component on a different line. For example part of a character's file could look like the following.

Paladin
1
20
1
1
20
1
1
20
0
0
1
1

The information is saved in a specific order. First the charType from the Skills class, followed by the values of all the skill point arrays, then each piece of equipment and finally with all of the user inputted values from the Stats panel (character level, user inputted Strength, difficulty level and so forth).

Saving a character takes only a second, opening one takes about 10-20 seconds due to all of the updates that occur every time a component's value is changed. Opening a character basically takes each line of the text file and assigns it to the appropriate variable. However when each variable is altered that prompts a re-evaluation of all the final character values. This re-evaluation works fine when altering a single value manually, such as adding 100 points into Vitality. But when it is run after each variable change it does slow down the opening of the character a bit. Not sure if there is a way around that, but I'll look into it.

I did have some issues when opening characters, all due to pretty basic mistakes on my part but they took quite a long time to track down. The main one was that they program wouldn't update the user inputted stat values correctly. Every time a character was loaded the values of vitality, energy, strength and dexterity revered back to their base values. Upon checking variables I did notice that the correct numbers were being saved into the variables that handle this information.

This meant that I had to find the spot in the code where things information was stopped from being applied correctly. I used a brute force method to do this. In the Open method code I broke the code up into 5-10 line sections and one at a time checked the desired variable before and after the code block. The variable value was output in the command prompt in each instance. If it's value was correct I moved onto the next code block, if it wasn't I took each line of code in that block one at a time to find where the problem was.

Eventually I found that the program wasn't saving the type of character correctly and as a result couldn't assign any values to the stat fields as the variables weren't being updated. The code that caused all the problem was this:

character = input.substring(index1, index2);
Skills.charBox.setSelectedItem(character);
Skills.charType = Skills.charType.substring(0,0);
Skills.charType = Skills.charType.concat(character);

It was the second two lines that were the problem. Worst part was they were completely unnecessary, the first two lines update the appropriate variables correctly so no other changes needed to have been made. Once the last two lines were removed everything worked correctly.

Now it's possible to save and open virtual characters and name them however desired. This coupled with all of the other changes I've made constitutes a significant alteration of the original program, and therefore means I posted an update in the DII forums. The new program can be downloaded here. My To-Do list is much smaller now and mostly contains checks to ensure the user input is valid or code cleanup. The only major component I'll be adding will be a new tab that will contain all of the breakpoint values for FCR, FHR, IAS and block speed. I intend this page to show where the current character's value is, which breakpoint they have hit and how many points are needed to hit the next breakpoint. It should be a fairly straightforward page, but I will have to think about how to make it available when the application is in Standalone mode.

Saturday, March 14, 2009

Diablo II: Patriarch Jade

Jade is a Tesladin, a paladin that utilizes the Holy Shock aura to deal damage to his enemies. I've never actually built such a character before, the closest I've come is a hybrid Teslafroster. This character is going to be build like a tank, but one that can also deal out significant amounts of damage. Still, he'll be able to solo the game without skipping any areas or monsters.

Jade started off untwinkled, as do pretty much all of my characters. As his main aura of Holy Shock doesn't become available until level 24 I knew that he would be a slow starter, and I wasn't disappointed. Using both a level one Holy Fire or Holy Freeze aura for the beginning Jade slowly but surely worked his way through the first two acts. It wasn't until the end of Act II that Holy Shock became available and Jade's power began to increase to a decent level.

Once that happened he took off in terms of ripping apart his enemies. Since there aren't really any immunites in Normal, once Holy Shock was available he walked through the rest of the difficulty without much problem. The only spot he hit a snag was the Chaos Sanctuary, unfortunately. In this area Jade attempted to lure all of the Doom Knights away from their Oblivion Knight overlords so they could be dealt with away from any possibility of being cursed with Iron Maiden. The plan was working quite well, until an OK followed the DKs and caught Jade mid-Zeal cycle.

That turned out to be his only death in Normal. Everything beyond that posed no problems and very quickly Jade was in Nightmare, where things went pretty much the same up until Act II. At this point Jade's damage output was pretty much set but he hadn't really paid that much attention to defense, nor to placing any points into his stats. I was attempting to waste as few points as possible and it cost me a pair of deaths in the desert. Mods of monsters were dealing decent damage to Jade due to low life and zero block (no dexterity) so it really was only a matter of time before that caught up to me.

At this point Jade was level 54 and therefore could equip all of his endgame equipment, so he did. That enabled me to place all of his stat points as well. From this point onward Jade was a Juggernaut and simply ripped through the rest of Nightmare with no problems, even at p8.

Which leads us to Hell difficulty. Due to his ease of dealing with the latter stages of NM and my experience with Lucian I decided to tackle Hell at p3 instead of my normal p1. This lasted all the way to the end as Tesladins are fairly overpowered creatures. Lightning immune mobs did give Jade pause, but none ended up taking too long for him to eliminate. As such progress through Hell as made at a decent pace. I can't say any particularly weird occurrences or situations appeared in Jade's journey.

As such he dealt with everything that was thrown his way, including a pair of LI Ancients. This was followed by OKs in the WSK level 2, Gloams in level 3 and OKs and Gloams in the Throne Room. Apparently the game was making sure I had an ultimate challenge to end Jade's questing, which I didn't mind. Jade wiped out the opposition and then handily defeated Baal's minions and Baal himself to end his journey.

Some interesting facts about Jade. His mercenary was a Defiance Desert mercenary and with the aura Jade's defense was around 12k, which is above the 10k mark where defense actually means anything. This is why he maxed out Holy Shield, as normally I leave that at level 5 and simply recast it more often. As a result Jade was a very good tank and could stand up to just about anything, which was a big reason why he didn't have too many extremely challenging situations to deal with in Hell. More often than not I didn't even realize I was facing a boss until it was time to pick up the loot.

I don't have any future plans for Jade. Perhaps he'll join a multiplayer game or two, but for now he's retired.

Stats:
Level 84
Strength - 78(165)
Dexterity - 86(136)
Vitality - 336(383)
Energy - 15(27)

Life - 1367(1214)
Mana - 197(139)

Lightning Resistance - 95
Fire Resistance - 90
Cold Resistance - 90
Poison Resistance - 90

Skills:
Holy Shock - 20(23)
Resist Lightning - 20(23)
Salvation - 20(23)
Holy Shield - 20(25)
Zeal - 4(9)
Fanaticism - 1(4)

Equipment:
Weapon: Cresent Moon Phase Blade
Switch Weapon: Baranar's Star
Armor: Guardian Angel (15% IAS jewel)
Shield: Herald of Zakarum (Pdiamond)
Switch Shield: eth Herald of Zakarum
Boots: Goblin Toe
Belt: ID Detail
Gloves: IK Forge
Helm: Rockstopper (15% IAS jewel)
Ring 1: Raven Frost
Ring 2: Nature's Peace
Amulet: Saracen's Chance

Mercenary (Defiance Desert Warrior)
Helm: Tal's Mask
Armor: Shaftstop
Weapon: Reaper's Toll

Hellforge
NM - Ko
Hell - Lem

Diablo II: Tesladin Skill Layout

A Tesladin is a paladin type character that utilizes the Holy Shock aura to add lightning damage to his attacks. This coupled with a quick Zeal attack cycle means the character can deal high damage amounts to multiple monsters in a short amount of time. There are several variations of the Tesladin build to deal with immunities. Some require the build to become a hybrid with Holy Freeze as a backup skill. Others have the build become a lightning-physical hybrid. I decided on the latter method as I've build a Teslafroster already and wanted something a little different. The skill setup is as follows:

Might - 1
Sacrifice - 1
Smite - 1
Holy Fire - 1
Holy Bolt - 1

At level six the character receives an attacking fire bonus from Holy Fire, after having used Might for the very beginning of the game. While not the most damaging skill, Holy Fire will allow the character to deal respectable amounts of damage if some +skill equipment can be found. This is good as the skill has to last the character up to level 18 with only a single hard skill point invested.

Charge - 1
Zeal - 1

At level twelve Zeal becomes available and replaces normal attacking as the default attack. This coupled with Holy Fire allows the character to deal with any monsters encountered without too much difficulty.

Zeal - 4
Blessed Hammer - 1
Holy Freeze - 1

At level eighteen Holy Freeze replaces Holy Fire as the aura of choice. It deals slightly more damage with a single invested skill point, but more importantly the aura slows down all monsters at this level. As a result the character's survivability increases dramatically. The aura also provides the character with a chance to shatter any monsters killed, a definitely bonus when facing monsters that can be resurrected, such as skeletons and fallen.

Holy Shield - 1
Holy Shock - 1
Resist Lightning - 9

At level 24 the main aura of Holy Shock becomes available to replace Holy Freeze. Along with this all extra skill points are placed in Resist Lightning, a synergy of Holy Shock, to increase the aura's damage even more. While Holy Shield received a point, the skill itself really isn't used in Normal beyond when engaging Act bosses, as the mana investment and low timer are simply prohibitive at level 1.

Holy Shock - 20

At level 43 the main aura is maxed and the character is dealing a respectable amount of damage. Offensively the character is very powerful, but it must be remembers that defensively he is fairly fragile due to not utilizing Holy Shield consistently.

Resist Lightning - 20

At level 50 the character is done maxing the main synergy to Holy Shock and his damage is significant. That coupled with a Zeal cycle that deals the maximum number of hits per cycle and this character can pretty much rip through any mod he encounters at this point, as lightning immunities won't show up until later in Nightmare.

Blessed Aim - 1
Concentration - 1
Fanaticism - 1

At level 53 Fanaticsm becomes available, as the way this character will deal with lighting immunes when they begin to show up. The general idea is to have a high damage weapon on switch with Fanaticism active on that switch. When LIs are encountered the character will switch to the alternative weapon/aura to deal with these monsters. It's best to ensure that the switch weapon has some decent elemental damage (not lightning) just in case a dual LI/PI monster is engaged.

Holy Shield - 20

At this point a decision must be made. If the plan is to make this character an excellent tank and concentrate on increasing defense about the 10k mark, then Holy Shield is the next skill to complete and will be done by level 70. This ensures that Holy Shield won't run out in the middle of a fight and provides a huge defensive bonus to the character so monsters have a much harder time hitting him to begin with. Couple that with the increase in blocking percentage that makes 75% simple to achieve and this character is going to be tough to hurt. If however defense isn't high on the list of necessary the increasing damage potential should be, so Salvation is the next skill to max instead to finish off all of Holy Shock's synergies, although a few more points into Holy Shield is recommended to increase the timer and the chance to block to acceptable levels. Say 5 hard points total.

Salvation - 20

If the defense route was taken then only Holy Shield is maxed then Salvation is maxed as well to finish off the damage potential of Holy Shock. This is completed at level 84 and finishes off the skills for this character. If any additional skill points become available they can be placed in either Zeal for greater Attack Rating or into Defiance as a synergy for Holy Shield and increased defense.

Final Skill Distribution:

Holy Shock - 20
Holy Shield - 20
Resist Lightning - 20
Salvation - 20
Zeal - 4
Fanaticism - 1

Tuesday, March 10, 2009

Diablo II: Pindlethon V

A Pindlethon is an event run about once per year in the SPF. The basic idea is that each participant kills Pindleskin two thousand times during the month long event. Each elite unique and set item is considered a qualifier and those numbers are tracked. The participant with the best 5 items wins. Normally the top few players get to take an item or two from those below them, but that was left out of this Pindlethon. That was something I don't mind too much since I am not a big fan of losing my best items or any grailers I might have picked up along the way. I'd survive it, but still not be too keen about the idea.

During the Pindlethon I placed all my qualifiers into an ATMA stash, and then once the tournament was over I promptly put them all into my general stashes. As a result I don't actually have hard numbers or data as to what I found. However I do recall my finds being one S/U per every 90-100 runs. Much higher percentage than a lot of the other runners. But at least I got my times down to around 25 seconds per run. It means I didn't waste too much time with this one, and found several grailers to boot.

My top 5 were:
1. Ohm Rune
Can be Inserted into Socketed Items
Weapons: +50% Enhanced Damage
Helms: +5% to Maximum Cold Resist
Armor: +5% to Maximum Cold Resist
Shields: +5% to Maximum Cold Resist
Required Level: 57
Item Version: 1.10+ Expansion

2. Mara's Kaleidoscope
Amulet
Required Level: 67
Item Version: 1.10+ Expansion
Item Level: 86
Fingerprint: 0xab5702d1
+5 to Strength
+5 to Energy
+5 to Dexterity
+5 to Vitality
All Resistances +29
+2 to All Skill Levels

3. Shadow Dancer
Myrmidon Greaves
Defense: 126
Durability: 12 of 24
Kick Damage: 83 to 149
Required Strength: 166
Required Level: 71
Item Version: 1.10+ Expansion
Item Level: 86
Fingerprint: 0x9f37c26a
+21 to Dexterity
+75% Enhanced Defense
Requirements -20%
30% Faster Run/Walk
30% Faster Hit Recovery
+1 to Shadow Discipline Skills (Assassin Only)

4. Earth Shifter
Thunder Maul
Two-Hand Damage: 116 to 637
Durability: 51 of 60
Required Strength: 253
Required Level: 69
Mace Class - Slow Attack Speed
Item Version: 1.10+ Expansion
Item Level: 86
Fingerprint: 0x9c7f08bd
+254% Enhanced Damage
10% Increased Attack Speed
10% Faster Cast Rate
150% Damage to Undead
33% Chance of Crushing Blow
+7 to Elemental Skills (Druid Only)
25% Chance to cast Level 14 Fissure on striking
Level 14 Volcano (17/30 Charges)

5. Trang-Oul's Girth
Troll Belt
Defense: 155
Durability: 12 of 18
Required Strength: 91
Required Level: 62
Item Version: 1.10+ Expansion
Item Level: 86
Fingerprint: 0x49f4ea27
+66 to Life
+40 to Mana
+30 to Maximum Stamina
+92 Defense
Replenish Life +5
Requirements -40%
Cannot Be Frozen

Overall I found seven grailers and five TC87 items. But still the prize was my only high rune (HR), the Ohm. I had found a Vex a while back in the Mephathon but lost it due to a PEBCAK problem when backing up my ATMA stashes. As a result this is my one and only HR at this point. Along with this I did gain an extra level with Malice, my Meteorb runner, bringing her to level 94 overall. So it was a very successful Pindlethon, all of my goals were accomplished so I'm happy with the results even though I didn't get more than two 3rd place votes.

Friday, March 6, 2009

Java: CharSi Update #22

Creating the GUI for the charm generator wasn't too difficult. It basically consisted of borrowing GUI pieces from other parts of the program. Since I've been doing that all along the page was up in a very short amount of time.


As expected the difficult part was creating the listeners behind the nice GUI interface. Many were fairly simple, for example the Clear JButton and Completed Items JList listener. On the other hand, other pieces were a bit more time consuming.

The list of prefix and suffixes came from a guide from the Diii.net site. Using this as my main information source I was able to setup the lists of possible values. From here creating the listeners was 75% of the entire page. First the selected item is obtained from the appropriate JList, then in the listener it is compared to all the possible options for that JList. Unfortunately the values possible differ with the size of the charm so once the mod is located then the program looks to see which JRadioButton is selected (and whose boolean flag was set to "true"). Once the charm type is identified then the String that will be tacked onto the end of the current display in the JTextArea is created.

if(mod.compareTo(AZURE) == 0){
if(smallFlag){
value = DetermineRangeValue(3,5,"Cold Resist %");
newMod = newMod.concat("Cold resist +" + value + "%\r\n");
}
if(largeFlag){
value = DetermineRangeValue(4,7,"Cold Resist %");
newMod = newMod.concat("Cold resist +" + value + "%\r\n");
}
if(grandFlag){
value = DetermineRangeValue(7,15,"Cold Resist %");
newMod = newMod.concat("Cold resist +" + value + "%\r\n");
}
}

When the Save JButton is selected a final check is done before the item is actually saved. It is possible to have both the suffix and prefix related to the same elemental damage type. Therefore a check must be made when the Save JButton is pressed before the charm is actually saved to ensure that these values are added together into the same mod line.

if(compare.indexOf("poison damage") )

The text in the JTextArea is rewritten if this is indeed the case and then the file is saved. Once saved the charms can then be added to the virtual character via a new tab in the Equipment page.

Adding and removing charms works the same way as all of the other equipment pages. The only change is the same charm may be added multiple times if desired. This avoids the need to create more than one type of charm and saves the user the hassle of scrolling through a long list of charms looking for just one more of a certain type of skiller.

One thing that was essential to this page is the charm counter display. This keeps track of how many charms of each type is already equipped to the virtual inventory and how many inventory spaces are left open. Before a charm can be added a check is made to ensure there is in face room for this charm. It can't be done on remaining spaces alone as grand charms can't be put in horizontally so only 10 total area allowed, for example.

grandFree = grandAllowed - grandCount;
if(charmSize == 3 && (grandFree == 0 || totalCount == 2))
add = false;

The checking method itself returns a boolean that is true unless it fails one of the checks such as above. It was actually easier to setup than I thought, as I was expecting to have to create an array of arrays that would replicate the physical inventory that I would fill in as charms were added. Not the best way to deal with the situation, so I'm glad the equations worked out as a much simpler solution.

Now the virtual character can be fully equipped, both with gear and charms. This includes the Battle.net only charms such as the Hellfire Torch. My next step is to create the ability to save characters so that they can be loaded in a latter program session without having to recreated them each time.

Java: Hotline Update #8

Another round of changes was made to the Hotline program today. This round was exactly the same as before, except that this time only an option for PDA Activation was added. Process was basically identical to before.

Again this was done in the month I wanted changes to take place, rather than before the reps were able to use the program. As a result I had to move all of the data created during the month out of the program and re-enter it under the correct date and representative's name to ensure the accuracy of the application.