Median 2008: Demon Seeds and other Monster-Summoning Skills

Weekly updated column for helping skill development. Users can't directly post requests but a PM or mail can be sent to Skill-Clinician.

Moderator: Skill Clinician

Post Reply
User avatar
Junior Member
Posts: 154
Joined: Sat Apr 26, 2014 9:19 am
Korea South

Median 2008: Demon Seeds and other Monster-Summoning Skills

Post by mmpx222 » Fri Jun 26, 2020 5:32 pm


This article analyzes the internals of Median 2008, made by Brother Laz, and ancestor to the popular Median XL mod. It aims to help future modders (including myself) create interesting skills and effects.

Credits to Brother Laz for his amazing work, as well as Joel and all others who worked on Median.

Median 2008 v157b appears to be the last version that still contains the source TXT files. Later versions provide only compiled BIN files and dummy TXT files, possibly to prevent hacking and/or plagiarism. This means that I am forced to examine old solutions to problems that may be solved with new, better modding techniques. However, given the long history of the mod, I doubt there are many new tricks that Brother Laz didn't know at that time.

Note: When discussing server hit parameters in Missiles.txt, I use srvHitPar1 instead of sHitPar1 to avoid the forum censorship.

Demon Seeds, and How to Spawn Corpses

This skill spawns multiple corpses in a fan-shaped area. To do so, it spawns multiple instances of demon seed in air, which is a missile spawns the corpses.

The skill itself is very similar to the Shock Web skill in cLoD. It uses the server/client do functions 43/5:

Code: Select all

skill = 'Demon Seed'
charclass = 'nec'
skilldesc = 'demonseed'
srvdofunc = 43
cltdofunc = 5
prgcalc1 = '1+(blvl/5)'
srvmissile = 'demon seed in air'
cltmissile = 'demon seed in air'
aurarangecalc = '4+(blvl/5)'
# ... snip unimportant parts ...
delay = '280-dm12'
Param1 = 0
'*Param1 Description' = 'timer loss min'
Param2 = 200
'*Param2 Description' = 'timer loss max'
The demon seed in air is a fairly plain Shock-Field-In-Air missile. It uses the server/client hit functions 36/44 to ensure that the missile ignores everything in its path and always collide at the end of its range. When it collides, it spawns demon seed on ground:

Code: Select all

Missile = 'demon seed in air'
pSrvDoFunc = 1
pCltDoFunc = 1
pSrvHitFunc = 36
pCltHitFunc = 44
Vel = 12
MaxVel = 12
Range = 50
# ... snip unimportant parts ...
InitSteps = 1
Activate = 0
LoopAnim = 0
CelFile = 'expansion\FireSpikes'
# ... snip unimportant parts ...
CollideType = 6
LastCollide = 1
Size = 1
AlwaysExplode = 1
Explosion = 1
NoMultiShot = 1
HitShift = 8
NumDirections = 32
HitSubMissile1 = 'demon seed on ground'
CltHitSubMissile1 = 'demon seed on ground'
The demon seed on ground missile does the actual work of spawning the corpse. It uses the missile hit function 6 (which is unused in cLoD) to spawn a monster. More details below:

Code: Select all

Missile = 'demon seed on ground'
pSrvDoFunc = 1
pCltDoFunc = 1
pSrvHitFunc = 6
srvHitPar1 = 0
srvHitPar2 = 0
Range = 14
Light = 4
# ... snip unimportant parts ...
InitSteps = 0
Activate = 0
LoopAnim = 0
CelFile = 'expansion\FireSpikeExplode'
# ... snip unimportant parts ...
CollideType = 3
Collision = 1
ClientCol = 1
ClientSend = 1
Size = 2
AlwaysExplode = 1
SoftHit = 1
Trans = 1
HitShift = 8
NumDirections = 8
HitSound = 'succubus_msissile_impact'
The missile hit function 6 uses two parameters:
  • srvHitPar1 = 0 specifies the ID of monster (in Skills.txt) to spawn. In this case, srvHitPar1 = 0 is the Skeleton (skeleton1).
  • srvHitPar2 = 0 specifies the ID of monster's animation mode (row index in MonMode.txt) to spawn. In this case, srvHitPar1 = 0 is the DT mode, or "death". This makes the Skeleton spawn as a corpse.
Before dissecting this skill, I unsuccessfully tried to spawn monsters in DT mode using the skill do functions for Clay Golem (56), Bone Wall (60), and Summon Spirit Wolf (119). However, I ran into a variety of glitches:
  • Sometimes, the corpse would spontaneously come back to life and attack nearby monsters.
  • Sometimes, casting Corpse Explosion or Raise Skeleton on the corpse would not consume it, allowing infinite casts.
  • Enemy monsters would approach the corpse and try to attack it, as though it was alive.
In the end, it appears that the most reliable and bug-free way to spawn corpses is to use the missile hit function 6.

Other Monster-Summoning Skills

Median 2008 also has several skills that spawn hostile monsters. Some of them use srvHitPar2 = 1, which refers to the NU (neutral) mode, to spawn living monsters.
D2TXT / D2INI - Python scripts for editing TXT files, or converting between TXT ↔ INI files

Post Reply

Return to “Skill Clinic”