Tuesday, March 8, 2016

Modding D2: Casting Delay

In Diablo II patch v1.07, Blizzard added casting delays to many skills to "prevent slow down of graphical performance and to avoid abusive use of the skills." I am going to remove these casting delays, since:

  • Modern PCs can handle the graphical load
  • Encourages players to increase maximum mana & mana regen, and invest in energy
  • Moving around creates a DPS loss, hence players need invest more in defensive options
  • Balancing skills is easier

I aim to remove casting delays whenever possible, while keeping the amount of missiles on screen low enough to prevent lag.

Note: 1 second = 25 frames.

Sorceress Skills

Sorceress cast rate is 7-13 frames (4-7 up to action frame) for everything except Lightning/Chain Lightning.

Fire Wall

  • Casting delay: 35 frames (39-42 including action frame) removed
  • Fire duration: 89 frames -> 35 frames (stack up to 3-5)

Meteor

  • Casting delay: 30 frames (34-37 including action frame) removed
  • Fire duration: 14(+15 per level) frames -> 25 frames
  • 60 frame delay between casting and impact.

Hydra

  • Casting delay: 40 frames (44-47 including action frame) removed
  • Hydras last 10 seconds (250 frames)
  • There is a maximum of 99 Hydras (33 packs) per character.

Blizzard

  • Casting delay: 45 frames (49-52 including action frame) removed
  • Duration: 100 frames -> 50 frames (stack up to 4-7)
  • Ice shards randomly fall every 4 frames -> 8 frames (25 -> 7 total).

Frozen Orb

Frozen Orb spawns ice bolts every frame, which cannot be modified without changing its visuals.
  • Casting delay: 25 frames (29-32 including action frame)
  • Duration: 30 frames
  • Spawns 1 ice bolt every frame, and 16 ice bolts when exploding, for a total of 46 ice bolts.

Paladin Skills

Paladin cast rate is 9-15 frames.

Fist of the Heavens

  • Casting delay: 25 frames (31-34 including action frame) removed

Amazon Skills

Immolation Arrow

  • Casting delay: 25 frames, use attack rate removed
  • Fire duration: 99 frames -> 25 frames (stack up to 2-4)
  • Note: This skill may need reworking.

Poison Javelin

  • Casting delay: 15 frames, use attack rate removed
  • Note: This skill may need reworking.

Plague Javelin

  • Casting delay: 100 frames, use attack rate removed
  • Note: This skill may need reworking.

Valkyrie

This has a casting delay possibly to prevent rerolling randomly generated equipment.

Druid Skills

Druid cast rate is 10-18 frames (6-10 up to action frame).

Firestorm

  • Casting delay: 15 frames (21-25 including action frame) removed
  • Fire duration: 14 frames
  • Spawner missile travels for 40 frames.

Molten Boulder

  • Casting delay: 50 frames (56-60 including action frame) removed
  • Fire duration: 36 frames (stack up to 2-4)

Fissure

  • Casting delay: 50 frames (56-60 including action frame) removed
  • Duration: 80 frames -> 40 frames (stack up to 3-4)
  • Each crack lasts 84 frames.
  • Cracks randomly appear every 6 frames -> 12 frames (14 -> 4 total).

Volcano

Similar to Frozen Orb, Volcano cannot have its delay removed without significantly changing its visual effects.
  • Casting delay: 100 frames
  • Duration: 150 frames
  • Launches rocks beginning at 5th frame and every 2 frames afterwards, up to 62 total.

Armageddon/Hurricane/Werewolf/Werebear

These skills apparently require a casting delay to synchronize the client and the server, hence their delays are not removed.

Assassin Skills

Shock Web

  • Casting delay: 15 frames, use attack rate removed
  • Duration: 90 frames -> 45 frames (stack up to 3-6)

Blade Sentinel

  • Casting delay: 50 frames, use attack rate removed
  • Duration: 100(+12 per level) frames
  • Next delay: 25
  • There is a maximum of 5 traps per character.

Dragon Flight

  • Casting delay: 25 frames, use attack rate removed

Shadow Warrior/Shadow Master

These skills have a casting delay possibly to prevent rerolling randomly generated equipment.

Thursday, March 3, 2016

Modding D2: Monsters

Monster Stats Per Level

Monster attack rating, defense, and life are nerfed in Nightmare and Hell.

Monster attack rating is reduced to make player defense more important, even in smaller doses. This makes strength--necessary for high-defense equipment--more important for all characters.

Monster defense is reduced to match monster attack rating, otherwise Confuse, Attract, Revive, Conversion, and Mind Blast will be useless.

Monster life is nerfed in Nightmare and Hell, so that:
  • Thorns, Iron Maiden, etc. actually kills monsters.
  • Skill damage and synergy does not become massively inflated.
  • Players don't need to farm unique items to solo Hell.

Monster Attack Rating

Individual attack rating of monsters are closer to 100% of the level-dependent values in MonLvl.txt. This allows defense to behave in a more consistent fashion. Specifically, the following formula is applied to coerce attack rating values closer to 100%:

(new attack rating %) = sqrt( 100 × (old attack rating %) )

AI Delay and Wake Up Distances

Monsters attack much faster and notice players from further away.

Monster AI delays (aidel columns in MonStats.txt) in Normal/Nightmare/Hell are reduced to 7/5/3.

Monster wake-up distances (aidist columns in MonStats.txt) in Normal/Nightmare/Hell are increased to 50/60/70. Note: These values are recommended by Brother Laz.

Special Monster Properties

Some monsters have special properties.
Antifreeze
This monster cannot be chilled or frozen.
Coldfury
This monster becomes faster when chilled.
Dry Skin
This monster is resistance to leeching (life steal/mana steal reduced by 50%).
Inorganic
This monster cannot be leeched from.
Armored
This monster gains Damage Reduction and Magic Damage Reduction relative to its level.

Special Monster Stats

Special monsters are nerfed to make boss packs less of a threat, and to counter the buffs applied to normal monsters. Note: These settings are controlled by MonUMod.txt and DifficultyLevels.txt.

Minions

  • Bonus HP(Normal / Nightmare / Hell) : 100% / 75% / 50% → 20% / 15% / 10%
  • Attack rating (Extra Strong minions): +50% → +10%
  • Enhanced Damage (Extra Strong minions): +75% → +15%
  • Elemental bonus damage*: 0% / 33-50% / 33-50%
  • ED/AR modifier per difficulty: 90% / 75% / 66% → 100% / 80% / 60%

Champions

  • Bonus HP(Normal / Nightmare / Hell)** : 200% / 150% / 100% → 40% / 30% / 20%
  • Attack rating***: +75% → +15%
  • Enhanced Damage****: +100% → +20%
  • Bonus cold damage (Ghostly): 33-50% / 33-50% / 33-50%
  • ED/AR modifier per difficulty: 90% / 75% / 66% → 100% / 80% / 60%

Uniques

  • Bonus HP(Normal / Nightmare / Hell) : 300% / 200% / 100% → 60% / 50% / 40%
  • Attack rating (Extra Strong uniques): +100% → +20%
  • Enhanced Damage (Extra Strong uniques): +150% → + 30%
  • Elemental bonus damage*: 66-100% / 66-100% / 66-100%
  • ED/AR modifier per difficulty: 90% / 75% / 66% → 100% / 80% / 60%

* Applies to Cold Enchanted, Lightning Enchanted, Fire Enchanted, Poison Enchanted, Spectral Hit, and Mana Burn unique bosses.
** Berserkers have 1/4 hit points and Possessed have 2x hit points.
*** Berserkers receive 4x attack rating bonus.
**** Berserkers receive 3x enhanced damage bonus.

References

Friday, February 12, 2016

Modding D2 - Removing Attack/Defense

Edit: I am going to ditch the idea. As Brother Laz points out, "there is nothing inherently wrong with defense rating to make it worth going through all this effort to replace it with a % damage reduction."

Why Remove Attack and Defense?


Attack and defense are poorly balanced in vanilla D2.

From the player's viewpoint, missing attacks is not a positive experience. Also tanking based on defense is unreliable and potentially dangerous. Obsoleting the hit/chance formula removes a complicated aspect of the game.

Proposal


Both players and monsters have high attack rating and negative defense; armors provide Damage Resistance +% instead of defense. Players' damage resistance is affected by Nightmare/Hell penalties. Ranged attacks never miss.

Removing attack/defense would also obsolete the following properties on items:

  • Bonus Defense
  • - Enemy Defense per Hit
  • Target Defense -%
  • Bonus Attack Rating
  • Ignore Target Defense

The following socket items would have to be given new functions:

Socket ItemEffect on WeaponsEffect on ArmorEffect on Shields
Amethysts+40/60/80/100/150 AR+3/4/6/8/10 to Strength+8/12/18/24/30 Defense
Diamonds+28%/34%/44%/54%/68% Damage vs Undead+20/40/60/80/100 AR+6%/8%/11%/14%/19% to Resist All
El rune+1 Light Radius, +50 AR+1 Light Radius, +15 Defense
Eld rune+75% Damage vs. Undead, +50 Attack Rating vs. Undead
Nef rune+30 Defense vs. Missile
Eth rune-25% Target Defense
Pul rune+75% Damage to Demons, +100 AR against Demons+30% Defense
Gul rune+20% AR
Jah runeIgnores Target Defense

But What Is Armor Good For?


All armor items provide physical resistance(AKA Damage Resistance). To encourage players to wear heavy armor, physical resistance is subject to Nightmare/Hell penalties. Unfortunately I have no idea how to implement this purely with text files. The best method I can think of is to add a hidden passive skill that provides negative physical resistance based on character level.

Players will have much more Life. To prevent blocking from becoming even more dominant, base blocking chance is drastically reduced. Thorns damage would have to be nerfed.

Other Changes


Running has lesser penalties than in vanilla. To compensate for this, increase walk speed and reduce overall stamina so players have to run strategically.

Wednesday, February 10, 2016

Visual C++ 2003 Toolkit

Back in 2011 I needed to make Win32 API programs without installing Visual Studio, and was forced to work with Visual C++ Toolkit 2003, the Platform SDK, and Code::Blocks. Back then, the VC2003 toolkit was still available on many places around the web, but I kept a copy on my Google Drive out of habit.

Fast forward to 2016, VC2003 toolkit is next to impossible to find on the web. I only recently found the forgotten copy of the installer in my drive, and until I have a decent file hosting server, I plan to link it here.

Wednesday, February 3, 2016

Diablo II Modding Resources

Phrozen Keep Guides


Librarian's D2 FAQtoids


The Amazon Basin Wiki

This particular website was unfortunately down for several months, but it looks like the wiki is back up again!


단군폰트 (DgKorFont.mpq)

한글판 디아블로 2의 글씨체를 바꾸는 커스텀 폰트 파일이다. 직접 설치할 수는 없고, 여기서 내려받은 뒤 MPQ Editor로 디아블로 2 설치 폴더에 압축을 풀고 나서 디아블로 2 실행 시 -direct -txt 옵션을 넣어주면 된다.

Wednesday, April 8, 2015

판결 - 프란츠 카프카

처음 시 소설을 읽고 어리둥절해서 한 번 더 읽어보았으나 당혹스러웠다. 주인공의 독백과 주인공의 아버지의 말은 서로 다른 진실을 가리키고 있는데, 그 중 누가 진실인지 카프카는 끝까지 제대로 밝히지 않는다. 주인공이 믿을 수 없는 화자(unreliable narrator)이거나, 어느 비평에서 말한 대로 주인공의 아버지가 그저 노망난 사람일 것이다.

지금까지 내가 읽어본 소설에서는 '믿을 수 없는 화자'를 추리/범죄소설의 트릭으로 활용하거나(가령 애거사 크리스티의 여러 소설 등), 보편적인 사회적 가치와 명백히 어긋난 주인공에 대해 독자가 공감할 수 있게 하기 위한 장치(주인공이 흉악한 범죄를 저지르는 여러 소설...시계태엽 오렌지가 이런 부류라고 들었는데, 아직 읽어보거나 영화를 보지 못했다)였다. 다만 첫 번째 경우에는 소설 결말에 가서 화자가 바뀌거나 진실을 간접적으로 고백하는 형식으로 독자에게 반전을 알려주고, 두 번째 경우에는 여러가지 은유적인 장치를 통해 독자가 가치관의 충돌(values dissonance, TV Tropes에서 좋아하는 용어)을 깨닫게 해 준다. 하지만 <판결>에서는 이러한 어떤 요소도 없기 때문에 독자(내)가 주인공이 사기꾼이라는 것을 확신할 수 없다.

그런 한편 주인공의 아버지의 말과 주인공의 태도를 봐도 무언가 수상하다. 아버지가 주인공을 다그칠 때 주인공은 제대로 항변하기보다는 채찍 앞에 웅크리는 짐승처럼 벌벌 떠는 모습이였다. 물론 이것이 일부 서평에서 말한 대로 카프카 자신의 모습이 투영된 것으로 보일 수도 있지만, 나는 주인공이 단순히 아버지에 대한 두려움 때문에 항변하지 못한 것뿐 아니라, 실제로 스스로의 양심에 걸리는 무언가가 있었기에 태연하지 못했던 것은 아닐까 하고 생각한다. 다만 이 의견은 다소 위험할 수 있는 것이, 대개 집단괴롭힘이나 왕따 등의 지속적인 폭력 범죄에 노출된 피해자에 대해 '왜 반항하지 못했냐'라며 가해자가 마땅히 져야 할 책임을 떠넘기는 구실처럼 들린다. 따돌림과 집단괴롭힘을 직접 겪어봤던 입장으로서 내가 이렇게 생각하게 된다는 것이 소름끼치기도 한다. 뭐, 따지고 보면 주인공의 친구에 대한 주인공 자신의 독백 역시 다소 모순적인 요소가 약간 있었으니, 어느 정도 의구심이 들 만하다.

이래저래 참 혼란스럽고 불편한 글이다. 왜 카프카는 결론을 내지 않았을까? 창작물에서 작가가 결말에 대해 '독자에게 맡기는' 경우는 많지만, 그런 경우에도 어느 한 가지의 결론을 먼저 생각한 뒤, 이에 대해 조금이나마 더 손을 들어주는 단서를 한두 개 제시하여 독자의 마음을 간지럽힌다. 하지만 <판결>에서는 이와 관해 어떠한 단서도 주지 않고, 주인공이 아버지의 '판결'에 순응하여 자멸(?)하는 것으로 묵직하게 끝내 버린다.