1.10 Missile Function file guide

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

User avatar
mishy23
Retired staff
Arch-Angel
Posts: 1313
Joined: Mon Mar 22, 2004 6:44 pm
Location: Middle of Nowhere, Wisconsin
Contact:

1.10 Missile Function file guide

Post by mishy23 » Sat Feb 05, 2005 5:16 am

Here is a file guide preview for missile.txt functions, please comment if it is uesful information, and if liked I can submit it for file guide status.

***NOTE*** - because of forum parser, I am unable to post the
term s H i t P a r 1 as it contains a bad word :) this term will be refered to as s-Hitpar1 from here on out.

I. PURPOSE

This guide is specifically created to help explain most of the missile move/hit/damage functions,
and how they can be used to create new and interesting skills.
The information in this guide is from personal experience with modding the text files and information
learned from the Phrozen Keep forums.


II. BASIC FUNCTIONS

To begin with the most important things to understand are the different functions D2 uses for missiles and
how I will refer to them. The 5 important functions and their columns are as follows:

pCltDoFunc - gets called on the client side for every frame of missiles existence,
PCltHitFunc - gets called on the client when the missile hits something.
pSrvDoFunc - gets called on the server side for every frame of missiles existence,
pSrvHitFunc - gets called on the server when the missile hits something.
pSrvDmgFunc - gets called right before missile damage is applied, is used to modify damage in specific ways.

I refer to pCltDoFunc/pSrvDoFunc together as the missile's Move function,
and when I say the missile's Move function is 19/15, I mean that pCltDoFunc is 19 and pSrvDoFunc is 15.

I refer to pCltHitFunc/pSrvHitFunc together as the missile's Hit function,
and when I say the missile's Hit function is 30/29, I mean that pCltHitFunc is 30 and pSrvHitFunc is 29.

I refer to pSrvDmgFunc as the missile's Damage function

Client and Server functions are tied together, a simple way to explain these two separate sides of the same
coin is that the client side handles graphics and effects, while server side handles damage and game mechanics.

I never mix and match client/server functions that were not made to work together otherwise you will almost certainly experience client/server desynch. I will not go into this further, if interested in how D2 handles client/server issues you will have to look elsewhere.


III. SPECIFIC MOVE FUNCTIONS

Move Function 1/1 - (Ex: firebolt) This is a very basic move function that many normal missiles use. All missiles need a move function and if all your missile does is move forward at a specified velocity for a specific range, this is what you would use. You may use an ExplosionMissile if you wish.

Move Function 1/3 (Ex: thunderstorm1) This server move function usually used in conjunction with client hit function 1 for simplicity, but can be combined with other client functions. It is how you get a missile to appear but not move in any direction. In many cases it is used to move downwards (from the sky) but that is mostly the animation display and the missile is non-moving, it is used for blizzard shards and thunderstorm bolts. These missiles deal one time damage to whatever they strike when they hit the 'ground'

Move Function 3/2 - (Ex: poionjav) This creates a normal missile that has a trail behind it as it travels. As normal missile travels forward the submissile specified in the fields submissile1/cltsubmissile1 trails behind it. Missile uses srvcalc1/cltcalc1 for #subloops, not sure exactly what subloops does, but probably display of trail. The trailing missile also does damage and usually should use move function 4/3 (see below). The trailing cloud is automatic when missile moves, and is not dependant on a hit function at all.

Move Function 4/3 - (Ex: poisonjavcloud) This submissile is the trailing poison cloud of Poison Javelin. Param1 is used for slow drift, speed in 4ths. Param2 is used for fast drift, speed in 4ths. These control the speed of how long the clouds last. Cltparam1 is used for spawn rate, cltparam2 is used for number of clouds, cltparam3 is used for radius of cloud. The clt params are graphical only and damage will only be down near the center of these clouds no matter how large cloud radius is made (depends on size column for how game determines how big cloud is for hitting purposes, only 1-3 size seems valid from testing). The range of this missile is the maximum length the cloud can be, I believe. This missile creates the submissile cltsubmissile1 which is graphic display only, this is used as a fading out secondary cloud, it can be left out).
The server function of 3 after further testing seems to mean the missile does not actually move, and is used for all sorts of missiles like this cloud effect and missiles that fall from the sky like blizzard shards and lightning bolts. Damage is a one time effect, and you may need to use nextdelay to avoid constant damaging, currently it is used for mostly poison based spells so reapplying the poison every frame while within the cloud does not cause any bad side effects.

Move Function 5/5 - (Ex: blaze) This is the move function blaze and firewall use to create the burning flames on the ground, albeit this missile doesn't move per se, but it actively stays in one place and causes damage per frame. Even though this is a move function it uses s-Hitpar1 and dParam1 as softhit chance, this just controls how often the sound and graphic of getting hurt display when in this fire patch. This missile specially uses Damage function of 3(see below). Firewall uses a damage rate of 41, which affects magic damage reduction and its uses against it. Remember damage is done per frame per damage function #3, so damage can sky rocketed quite quickly for skills based off this missile. Usually hitshifts are used to reduce the damage to a usable rate. Range seems to be duration of fire patch, but the skill may override this.

Move Function 6/6 - (Ex:firewallmaker) This is a firewallmaker missile, which means this missile will create a patch of fire, move a little and create another patch until its made a firewall the length of its range. It uses CltParam1 for no light freq which I believe is radius of light firewallmaker creates, haven't tinkered enough to know exact results. This missile actually doesn't create any damage, it is creating the firewall patches that do the actual damage. It creates submissile1 which is the server missile that does actual damage, and creates submissile1/2/3 which are client/graphic-only missiles, making the firewall look more solid and varied. From experience the firewallmaker and other missiles that use this function actually create 3 firewall patches on top of each other, so the expected damage the firewall does is multiplied by 3. Take this into account when balancing spell damage.

Move Function 6/13 (Ex: firestormmaker) Similar to firewallmaker, this missile function creates patches of fire and uses the exact same client effect to pull this off, obviously behind the scenes it is slightly different because of the new server move function. This missile calls the client missiles cltsubmissile1/2/3 for graphic effects, and calls server submissile, submissile1 to do the damage. It also uses the same param1 as firewallmaker - no light freq - which I am unsure the exact effects of. I cannot tell the exact differences that the server function does here differently then move function 6/6, but it seems the server submissile this missile creates automatically will do per-frame damage possibly, as the submissile firestorm is not set up to do fire damage per frame, but as we know in game it does have this effect. Of course it could be the skill functions doing this, so I’m not 100% sure. Overall I’d stick with firewallmaker when you want this sort of effect.

Move Function 7/7 (Ex: guidedarrow) This missile movement uses param1/cltparam1 to determine in how many frames it retargets its flight path and param2 to determine radius it looks in for new target. Now don’t get your hopes up too high - these movement parameters mean nothing unless the skill functions are using them. So while this does help control how guided missiles retarget, it does nothing unless you are using the skill function that uses this information correctly. I am very disappointed with the results of this function.

Move Function 8/1 (Ex: lightningbolt) This is a neat movement function that allows you to do lightning bolt effects and other trailing effects. It uses cltparam1 for subloops which effect I’m unsure of, but is graphical in nature. If you notice this missile will almost always be invisible, this is done by using Celfile ‘null’ and anim len 2. The reason this is invisible is that it spawns cltsubmissile1 which is a client missile of the trailing missile. Damage is actually done with this invisible main missile, but all the graphics are done with the submissile. One important point is that the submissiles range is actually the length of the graphic. I have enjoyed creating trailing effects with numerous missile graphics to make some neat effects.

Move Function 9/1 (Ex: meteorcenter) This movement function allows a missile to fall from the sky, it has a few parameters for movement and speed of its submissiles including: cltparam1 which is total number of frames missile will ‘delay’ before falling, cltparam2 and cltparam3 are fallrate and sliderate which control the speed/direction of the falling submissile somehow. Play around and see if you can find any different values that work well. These client parameters all involve the submissiles; the main missile is actually a display graphic on the ground and, in the case of meteor, is that blinking ring that shows where the meteor will eventually strike, you can make this indicator missile invisible if you want. This move function calls two submissiles, cltsubmissile1/2, the first one being the falling object ‘meteor’ and the second being the ‘tail’ of this meteor. These submissiles are graphic display only. This main missile does damage after the delay is over and the meteor is deemed to hit the ground. This function is almost always used in junction with hit function 18/14 which are the hit functions for meteor. I am unsure if the main missile will deal damage with out these hit functions also, as it will not have appropriate radius parameters.

Move Function 11/1 (Ex: corpseexplode) Not much to tell about this function, seems to cause explosion missiles with main missile and is used with most corpse targeting skills. I’m assuming all the move function really does is cause the missile to not move and possibly offset graphic so it appears lower towards ground to be more applicable with where a corpse would be. It possibly uses range as a radius as to where it can do damage, but most of these skills have special functions that probably deliver damage in strange ways. This function would be applicable for client explosions needed to be displayed at a ground level.

Move Function 13/10 (Ex: blizzardcenter) This is a neat little move function that creates an invisible missile that spawns other missiles in a base radius every X frames. The radius is param1, and the # of frames is param2. The range for this skill is actually the duration the missile exists spawning other submissiles. The submissiles this missile creates are submissile1 for server side, and cltsubmissile1/2 for client side, so you can have two different missile types appearing but only one really is being called on for damage and effects. You can get some interesting effects, including emulating trap effects and such with this move function. Only submissiles do damage - this main missile is invisible and creates the submissiles only and does no damage on its own.

Move Function 18/1 (Ex: bonespear) this movement function is pretty basic but has a special component that makes it useful. First of all it uses cltparam1 for subloops like a lot of missiles that have trailing effects. The special component is that it has a trailing missile right behind the main missile, making this a 2 part projectile. It’s used to display a nifty propulsion effect behind the main missile. This 2nd part of the missile is called with cltsubmissile1 and is a graphic effect only; the main missile actually does damage.

Move Function 19/15 (Ex: frozenorb) Okay, this is a lot of people's favorite missile functions since both the move and hit functions are very useful. The move function actually spawns new missiles every few frames during its movement. This main missile is graphical only and actually does no damage, but is made to travel along and constantly spawn new 'bolt' missiles. It may seem like the 'orb' is doing its own damage but that is because all newly created bolts instantly hit anything in contact with this missile when they are spawned. Okay the meat and potatoes: Param1 is frequency that a new missile is spawned; a value of 1 means a new missile is created every single frame. Param2 is direction increment. The new missiles will spawn in a circular pattern and the increment is how far around this circle the next missile’s direction is. A full circle is 64, so if you make the direction increment 64 for each new bolt, the bolt will constantly shoot out in the same direction (lower right is the default of first missile I believe). Use the same values for cltparam1/2. Now the move function calls these new missiles in submissile1 and cltsubmissile1, any and all sorts of missiles can be spawned this way. Some of the most graphic-intensive, overpowered spells can be made with the touch of a button using this move function. Read the hit function 30/29 for more frozen orb information.

Move Function 48/25 (Ex: eruptioncenter) I am unsure how much control this missile actually has, and hopefully what I write below is not actually controlled by the skill function. The missile is invisible and seems to be able to spawn damaging missiles around it in a specific radius every X frames. This missile’s range is actually its duration. This is where I am unsure how much control the missile can have without a direct skill function, as I am unsure where the params are passed for this missile. It needs a param for radius to spawn new missiles in and a param for how frequent to spawn a new missile. Hopefully these can be used in param1/2, cltparam1/2 or somewhere else. The new missiles that are called are named in submissile1 and cltsubmissile1/2, so you can have 2 missiles for the graphic effect, and 1 to deal the actual damage. The damaging server submissile usually is set up with damage function 8 to work correctly.

Move Function 50/28 (Ex: volcano) This is the move functions for volcano and is more complex then I first gave it credit. While this missile is basically a ‘base’ that lies on the ground it seems able to do damage itself to anything standing on it, The missile is also firing multiple submissiles off depending on the parameters. Param1/cltParam1 tells it the frequency to fire, while Param2/cltParam2 tells it the radius that these submissiles can fall within. While range is again the duration these missiles will be fired for. Param3/cltParam3 sets at what frame to start firing the first missile after it is first created, Param4/cltParam4 set at what frame to stop firing new missiles, and Param5/cltParam5 is for lob, possibly meaning the angle or something similar. This missile has a nextdelay so that it can’t continuously hit the same monster that is standing on it and can only damage every X frames (I advise keeping this). Now the submissiles it shoots are submissile1 and cltsubmissile1. A strange thing is these submissiles usually do no damage, but instead are set up with their own hit functions to pass their damage on to their hitsubmissiles, which actually do damage to the ground area they land at. Following that chain gets complex so look at the volcano missiles for some help. This move function itself does at least create a damaging missile that does not move, but can fire off other missiles for either light show effects or if you chain the missiles correctly for more explosion damage. You could mod this missile to be spikes on the ground that hurt whatever touches them, and possibly have some cool blood flying through the air as eye-candy. I’d only mess with this function if you are comfortable with more complex setups.

*NEW*
Move Function 46/22 (Ex: advlighttrailingjav) Surprisingly useful, after testing I found this is another move function that spawns a missile while it moves like frozenorb. It is slightly different in that the submissiles it spawns have a subloop (lightning bolt) effect making it seem like one connected missile, and cause of the timing of movement, sort of look like a wake in water. This submissile can carry damage, and moves perpendicular to the missile it is spawned from. I can't determine how often the submissile is spawned as it forms one continuous line, and there is no control to change number of frames in any form. Submissiles keep spawning until original missile ends its range. Param1 and CLtparam1 is used for subloops, its default is 3 and changing it does not seem to do much as far as I can tell.


IV. SPECIFIC HIT FUNCTIONS

Hit Function 1/1 (Ex: fireball) It is used for fireball-like missiles that explode in a radius when they hit. s-Hitpar1 is used to determine damage radius of explosion. cHitpar1 determines graphical explosion radius, and cHitpar2 determines density of explosion (effects graphic?). This missile calls explosionmissile and clthitsubmissile1 as submissiles, one of these is stretched to display radial explosion.

Hit Function x/3 (Ex: bombonground) This missile deals damage in a radius from wherever it is spawned, either using s-Hitpar1 or aurarange can be used in skills for calculations if s-Hitpar1 is left blank. This can be used sort of like a staticfield attack - hit everything around caster in a radius. But it must have damage set up and cannot be calculated to do % of damage based on monster hit points, though with some neat synergy calculations it could definitely do damage based on specific player stats. (For example, 50% of player’s current HP in damage to everything around player. Just have min/max damage be 1, and synergy be stat(‘hitpoints’.accr)*50.) Obviously no client side hit effect is set up with this function, so assign an appropriate client-side function for whatever you are attempting. In my above example try using client hit function 1 (same as fireball uses) and set up appropriate radius and density for explosion graphics.

Hit Function x/4 (Ex: explodingarrow) This just talks about the server-side hit function 4 which is commonly mixed together with various client-side functions. This server function calls hitsubmissile1 on collision. This submissile can produce many types of damage. But a client side function will be needed to add a graphical display to this (one good example is client hit function 14). It is common for this submissile to be a radius effect explosion (see hit function 1/1, but since this is a server side only missile, only x/1 is needed to be used as client side is handled by other missiles)

Hit Function 9/7 (Ex: holybolt) While some of this missile is controlled by the skill functions, this missile is moddable for some nice effects. s-Hitpar1/cHitpar1 determine if missile can heal player (0=no 1=yes). Use of collide columns determine if missile stops after hitting player/monster. s-Hitpar2/cHitpar2 determines what types of monster it can hit (0=all 1=undead 2=demon). One issue, though, is the missile is hard coded to collide with undead but not with other types of monsters so it causes some desync if you are using it for something besides undead only. Some fancy collide setups may help correct this. This hit function uses ProgOverlay if it hits a player (displays healing overlay). This missile uses clthitsubmissile1 when it hits a monster, an explosion-like, graphic-only missile.

Hit Function 10/0 (Ex: chargedbolt) This is a nice generic hit function usable for many missiles that do not already use another hit function. It has only one use and it is graphical only, it will display the ProgOverlay overlay on any target hit by this missile. A lot of lightning skills use this to display the lightning flash on enemies when they are hit, but you can create new overlays to have fancier on-hit graphics, like a small lightning bolt striking target when the missile hits them, etc. I like using hit overlays, as it is a quick and easy way to spice up a skill graphically with little work. (There, you now know one of my best-kept secrets.)

Hit Function 12/9 (Ex: immolationarrow) This missile creates hitsubmissile1 when it hits something. s-Hitcalc1 is the duration of the submissile, and s-HitPar1 is fire graphic radius, while s-HitPar2 is damage radius, if these fields are left blank than this info is read from skill file calc1 and calc2 fields. Param1 is listed as radius possibly, but seems unused by the missile (possibly used by skilldesc for radius info).
Oh yes, client-side this missile uses clthitsubmissile1/2/3 as graphic-only effects for pretty fire. It is best to use a submissile that can use the parameters set up by these functions, which of course would be a radius effect that damages per second (hit func 5/5 and damage func 3). You can of course try other missiles but they might still be trying to damage things using radius effect.

Hit Function 13/10 (Ex: guidedarrow) This hitfunction doesn’t do too much, and is used with guided-missile-type attacks. I believe this function references the hard coded ability of piercing with guided missile attacks, in that they can only pierce X amount of times before they disappear to prevent endless piercing guided missiles. I believe it is set up to be 4 times max that these missiles can pierce. These missiles actually do not have the pierce column activated, so this hit function overrides that columns’ ability it seems. If you put a 1 in pierce column and leave out this hit function, guided arrow might be able to hit unlimited times (until range is exhausted).

Hit Function 14/x (Ex: freezingarrow) This just talks about the client-side hit function 14 which is commonly mixed and matched with other server-side hit functions. All this hit function does is call clthitsubmissile1/2 for graphic display of explosion. (Blizzard really likes using multiple explosion missiles to create cool effects.) Now, you need an actual server-side hit function to do any damage or effects in addition to this, or all you have is a neat explosion that does no damage. Both submissiles display for each collision.

Hit Function 16/12 (Ex: chainlightning) Now here is a hit function everyone will have fun with. This changes any missile into a chain missile. s-Hitpar1 is the rang - if left blank it will read par1 from skills. This range is how far of a radius it will look to jump to a new target, so the higher this is the crazier the missiles will be jumping around the screen. Be careful, though, as too high of a range here can cause the missile to desync. cHitpar1 is the client radius and, again, client- and server-side should be the same to avoid desync. These missiles should definitely have a nexthit/delay to avoid bouncing back and forth causing excess damage quickly. This hit function allows a progoverlay to display on all targets. One drawback is it is the skill function itself that controls the amount of times this missile can ‘bounce’ so you lose some control if this missile is used as a submissile from something else. It is possible a missile param can control the number of bounces too but I have not tracked it down yet.

Hit Function 18/14 (Ex: meteorcenter) This is the hit functions for a meteor-like skill. While the move functions control the meteor falling display, the hit functions do the rest of the job including using s-Hitpar1 to determine radius that main missile damages and other various parameters for graphic displays. s-Hitpar2 is labeled ‘fire increment’, and is used somehow to figure which of the client displays to use and how, as this missile calls 4 client missiles - clthitsubmissiles1/2/3/4 - for explosion/flash/fire/fire displays. Also this missile calls hitsubmissile1, which is a server missile that deals additional damage. The parameters cHitpar1/2/3 refers to the client submissiles somehow and I believe it is either the number of frames each missile is displayed for or the probability these graphics are chosen. The server missile in this case is a fire that is left after ‘meteor’ hits. It uses the basic firewall move functions 5/5 and damage function 3. You could obviously mod any missile into this server missile. It could be another one-time damage in a radius, but this would just create a double hitting missile attack from above, so if you don’t want a per second secondary damage, its probably best to just not call this hitsubmissile.

Hit Function 19/x (Ex: blizzard1) This is just about the client-side hit function 19, which is commonly mixed and matched with other server-side hit functions. All this hit function does is call clthitsubmissile1/2 for graphic display of explosions. This is almost identical to client hit function 14. This hit function makes one of the two clthitsubmissiles to display on each collision, I believe the chance for each missile spawning is 50%. It seems this client function also uses cltparam1/2 to determine fall distance and rate of the missile - upon further study it does not seem like this is done with the move function as I first thought.

Hit Function 25/20 (Ex: lightningfury) Another favorite hit function of many people, this function allows a missile to split upon collision into multiple more missiles. s-Hitpar1 determines radius it will search in for new targets when it hits, and s-Hitpar2 is the maximum number of new missiles it will create upon hitting, when this missile splits it creates X new submissiles where X is the number of targets in search radius, capped at the maximum number of targets assigned. Fill in cHitpar1/2 the same as the s-Hitpars to avoid desync. This hit function calls the new missiles, hitsubmissile1/clthitsubmissile1 upon collision; these submissiles are created multiple times as it states above and each missile’s new direction is towards one of the targets. It has been noted that this missile can desync between client and server on occasions. I am unsure of the cause of this so far.

Hit Function 24/x (Ex: bonespear) A simple hit function that is client-side only. This function causes an explosion missile to be called with clthitsubmissile1 and the explosion missile can also be set up for a double explosion effect that Blizzard likes so much to try and give graphics some depth.

Hit Function 30/29 (Ex: frozenorb) Ah, finally the hit function for this very versatile missile. This hit function creates a nova-like burst upon collision and it is the only way to create a nova as a submissile. First the parameters: s-Hitpar1/cHitpar1 is listed as increment and this is used to determine how far apart nova projectiles are I believe, the nova defaults to 16 missiles, but it is possible with smaller increments this would create more (possibly 64/increment = # of missiles, since 64 is the total number of increments in a full circle). The submissiles created are hitsubmissile1 and clthitsubmissile1 for the nova missile. Any missile can be used but frozenorb does use a special move function for its nova (20/16). Check this out for an interesting movement option. Now, this missile function has tons of applications and I’ll quickly cover a frequently asked question: people are always wondering how to add a nova at the end of a missile. For example, they want a projectile missile that turns into a nova when it hits. This is quite simple, basically you are using half of a frozen orb, just its hit function and not its move function. So use 30/29 as your hit function and 1/1 as your move function, or any other applicable move function as you see fit. Now your missile will burst into a nova using hitsubmissile1 when it collides with anything. Want to go crazy? Make the nova hitsubmissile also use the 30/29 hit function and you'll have novas that explode into more novas.

Hit Function 32/31 (Ex: firehead) A very nice hit function that vampires use to steal life with elemental attacks. This hit function will allow the missile to do its normal elemental damage and then lifesteal a percentage of this damage (possibly 50%). The missile hits a radius effect exactly like a fireball would, using cHitpar1 for radius and cHitpar2 for density, but since these are client parameters only it’s possible this hit function still only will hit one target. This function allows a progoverlay on caster (not target), preferably the lifeleech overlay to show it’s leeching. Clthitsubmissile1/2 for explosion effects, again supporting that while set to do a radius explosion, doesn’t have any server-side support so will only hit one creature, but try it out and find if it does do damage to everything in its radius.

Hit Function x/43 (Ex: healingvortex) used by monsters to heal themselves, this function can be used with any missile to heal when it hits instead of do damage. It seems to work only with missiles that do physical damage. This missile is not picky and will target anything including players, monsters, hirelings, summons, etc…and will heal anything it collides with. While no client-side effect occurs, it uses a progoverlay to display healing effect.

Hit Function 44/36 (Ex: shockfieldinair) the famous SFIA hit function. This missile will not collide with anything it touches, it only collides when it reaches the end of its range and is determined to auto collide(with ground). It uses collide type 6, which is different than some missiles. The movement is sometimes of an arc, but this is actually determined by the skill functions that call it, so if this is a submissile it will just move in a straight line without colliding with anything and then explode at the end of its range. This is very useful for spawning submissiles of any type at a predetermined distance without anything interfering with it. This missile calls hitsubmissile1/clthitsubmissile1 when at end of its range.

*NEW*
Hit Function 51/45 (Ex: advlighttrailingjav) after much testing this missile function is pretty good. When missile hits anything it spawns a multitude of hitsubmissile and clthitsubmissile. It uses s-hitpar1/2 and chitpar1/2 for number of bolts and random path. Number of bolts is the number of hitsubmissiles spawned, after thorough testing I am almost certain this spawns X+8 missiles, so if you put 18 for the number of bolts, it is actually 26 missiles that spawn. Random path can be a 0 or 1, 0 means all missiles spawn evenly distributed in a circle around you and go straight outwards, 1 means that all missiles spawn in the same sort of circle but travel randomly outwards like a charged bolt. Very useful, already made a bow skill using this missile function, see move function for more advlighttrailingjav for some more info on this missile. AFTER FURTHER TESTING: using 1 for number of bolts, causes only 1 bolt to actually spawn on collision, this missile ALWAYS moves directly east. There must be a mirror effect happening with higher numbers, but usually seems to be 6-8 more bolts than you specify. If anyone knows formula let me know.


V. SPECIFIC DAMAGE FUNCTIONS

Damage Function 1 (Ex: firearrow) This damage function allows a percentage of the damage to be converted to a certain element. This function uses dmgcalc1 to determine the percentage of conversion, and in some cases this is using dl12 which is the same as when skills use ln12, except it is using the dparams for the base and per level params. (example, firearrow uses dmgcalc1=dl12 dparam1=3 dparam2=2, meaning it converts 3%base +2% per level of skill)

Damage Function 2 (Ex: icearrow) This damage function is very neat: it converts cold length into freeze length, so if you use this damage function on any missile that does cold damage instead of chilling opponent for X seconds, it will freeze them solid. I have not tried this on a different elemental than cold, it would be interesting to see if it would freeze based off the elen column still for fire or ltng missiles. This function uses dParam1 to determine percentage of conversion. Usually you would use 100 to convert 100% of cold length to freeze length, but you could use for example 50 here, so it only freezes for half the length it would normally chill for. I am unsure if it would still chill for the other 50% of the time or if effect is just shortened.

Damage Function 3 (Ex: firewall) This damage function makes it so the spell is doing damage per frame. This allows the fire to continually damage a target standing in it. Most fire missiles that do continual damage will use this sort of a damage function. Remember to balance damage appropriately. You can use this damage function to create new skills that use lightning or cold to do damage per second.

Damage Function 4 (Ex: iceblast) This is another freezing damage function, it will cause the missile to freeze everything in a radius around it when it hits something, exactly like iceblast. It uses param1 to determine radius of freeze explosion. It seems both damage and freeze ability are added to radius specified with this function; freeze length is read from Elen. This damage function may be able to be used to do radius damage with any missile and if Elen is 0 will not freeze.

Damage Function 5 and 13 (Ex: blessedhammer) This is a special damage function. Blessed hammer does do bonus damage vs. undead and it is possible to do bonus damage to demons with this as well. The game has two missiles for blessedhammer, one using damage function 5 and one using 12. Currently the game is using the missile with damage function 5 and has the following differences from the other blessed hammer missile: holy=3 and pierce=1. Both these damage functions use dparam1 for bonus% to undead and dparam2 for bonus% to demons.

Damage Function 7 (Ex: warcry) Very nice function that allows missile to stun in addition to doing damage. It uses dparam1 for stun length; if this param is left as 0 and a skill is specified for this missile it will read ln12 from the skills file. I have been able to use this stunning effect without any problems in a number of different types of missiles.

Damage Function 8 (Ex: eruption) Used by the cracks that eruption skill creates, this is the one damage function I am unable to determine what it is doing as no parameters are being used that I can see. The skill itself is passing the calc1 for radius, and calc2 for frequency of the cracks and it could be something to do with that but that is not really damage-related. Possibly the radius effect is what is being used here, as maybe each crack is only one small point, and the damage function is determining radius. Let me know if anyone has any ideas.

Damage Function 9 (Ex: twister) Very similar to function 7, this skill passes the dparam1 for stun length. The only seen difference is that if missile.txt is left as a 0 for stun and stun length is read from skills file, it only reads par2, while function 7 uses ln12.

Damage Function 10 (Ex: bladesofice) Not very much telling you what this damage function does either. I suspect that since it is used as the third charge-up for blades of ice, that this is probably the fix they put in place that allows the blades of ice skill to be able to freeze, since prior to patch 1.10 this skill did not work as advertised. As it seems to be a fix for a specific skill, I cannot see how it would be useful for any custom-made skill, though if you’re bored and want to try it out, it seems it might allow your missile to freeze. More speculation, since the third charge of blades of ice releases a missile that is supposed to do no damage but add freeze length, it looks like they could not get the freeze to apply when 0 damage was done by missile, so missile is set up to do 1-1 damage. It’s possible this damage function is clean up in that it allows the missile to do the 1 damage and freeze, but then heals back that 1 damage and/or takes the damage back somehow. This is definitely just a quick-fix situation that really has no use outside of this specific skill.

Damage Function 11 (Ex: rabiescontagion) A very interesting function that I am looking for more information on currently. No params are passed with this function and I am very interested in testing out if this is what controls the poison damage being passed to other monsters that come near the infected monster. Unfortunately this is probably all done with the skill functions, but I am hoping it is possible this damage function allows other missiles to be contagious, and if that’s the case its possible that other elemental types might even work. Because rabies damage isn't normal poison damage, its possible this damage function is used to have the damage per frame work correctly for this missile.

Damage Function 12 (Ex: lightningjavelin) This converts a percentage of damage to elemental damage just like damage function 1. I believe the difference is that this damage function bases the damage conversion on the thrown damage instead of the normal melee damage. This function would be a good way to make the missile damage based on thrown weapon damage when it is used in damage calculations - just keep conversion% at 0 if that side effect is not wanted.

Damage Function 14 (Ex: moltenboulder) This damage function seems to cause the knockback feature of moltenboulder. dparam1 is used for size and I am unsure what this exactly does; my theory is 1 means small and 2 means large and 3 possibly means both and this is the size that the boulder can knockback. As a default, molten boulder uses a 1 here and I believe from experience it is true that moltenboulder can only knockback small monsters and not large. Dparam2 is used for knockback%.


VI. TIPS AND TIDBITS

1) The 'SKILL' column is a very important column in missiles.txt. If you specify a skill name in this column, all damage and damage-related information is taken from the skills.txt entry for this skill name rather than from the missiles.txt entries. If you leave this column blank all damage and damage-related entries will be taken straight from this missile entry. Remember, some missiles are referred to only as a client missile and will be a graphic display only. If a missile is not called as a server missile it will not do any damage.

2) Missile functions are totally different than skill functions, though they do use the same sort of setup. While many skills that use missiles have many of their abilities controlled by the missile functions, some skills are using their specific skill functions to create a missile effect. These skill functions cannot be duplicated using just missiles in many cases. For example all of the Nova missiles are actually single missiles that shoot straight forward. It is the skill function, not the missile function that creates the nova effect of 32 missiles firing in a circular range. Another big example is the guided arrow and bone spirit missiles' ability to track a target are controlled by the skill functions and not by the missile functions. So you cannot plug in these missiles to other skill functions and expect them to still be homing. This guide will not get into skill functions at this time.

3) To quickly change the graphical look of a skill all you need to do is change its Celfile, which is the .dcc file that contains the graphics. All overlays, missiles and monsters are stored as .dcc files and can be used as missile graphics. The default location for missile files are /data/global/missiles/ so if you wish to use a monster or overlay dcc file you will have to copy it and place it in this folder as well. The biggest thing to remember when changing a CelFile is to also change the AnimLen which is the number of animation frames for your missile file. To figure out how many frames your missile has, either see what anim len is being used for where you are borrowing this graphic from or use a nice program like CV52, which is a great program for viewing dcc files. The AnimLen is only the number of frames for one direction not total number of frames for all directions, so you might have to manually count. Check out the /data/global/missile/extra/ and /data/global/overlay/extra folders in d2data.mpq for extra graphics supplied with D2 but not used. There, now you know one of my secrets.
Last edited by mishy23 on Thu Mar 03, 2005 1:17 am, edited 6 times in total.
{Modding status: Project X}

User avatar
Vendanna
Hosted Forum Moderator
Arch-Angel
Posts: 1387
Joined: Sun Nov 24, 2002 4:55 pm
Location: Cartagena (Spain)

Post by Vendanna » Sun Feb 06, 2005 12:34 am

I'll say Thank you twenty times in a row for the comprensive fileguide of what the missiles functions are for. (I suppose there are more functions, but with those at least its possible to understand what are you doing wrong)

I'll give this file guide a 10 over 10. and suggest to the moderators to have it on a place it doesn't go to oblivion. ;)
"Mysteries are revealed in the light of reason."

Black Omen's production

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12062
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U

Hand-picked

Re: 1.10 Missile Function file guide

Post by Myhrginoc » Sun Feb 06, 2005 8:31 am

We can start by making it sticky for now. :mrgreen: Good work indeed!!
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
Brother Laz
Forum Legend
Dominion
Posts: 6715
Joined: Mon Jun 03, 2002 10:06 am
Location: Fallen Like Lightning
Contact:

Hand-picked

Post by Brother Laz » Tue Feb 08, 2005 12:41 pm

Some notes:

- you missed the very handy advlighttrailingjav hit function. This sucker emits a circle of charged bolts on hit, looking very similar to the charged bolts emitted by claws of thunder or lightning enchanted monsters. There is something weird with the parameter that controls the number of bolts; the actual number of bolts emitted is off by a couple of bolts, not sure how it works. I believe you can set the random path parameter to 0 and it will emit a solid nova, and you can set number of bolts to 1 to spawn a serverside missile on impact, which can be used for many useful purposes, such as dropping a blizzard on the point of impact.

- you also missed the tornado move function. It may be situational but it saves a frozenorb move function, submissile and frozenorb hit function for missiles that inflict [physical] damage around them when they move.

- also, if you want a blizzard, always use the regular blizzardcenter move function and not the monblizcenter one, which has randomness issues and tends to pummel single spots in its area with continuous blizzard shards, and has bult-in desync to boot.

[edit: removed incorrect paragraph about hardcoded elemental damage]
Last edited by Brother Laz on Tue Feb 08, 2005 12:59 pm, edited 2 times in total.
19.may.2007 | Adun Tori Laz.
Median XL released!
Flesyht sa ruobhgien yht etah.


y dont u play the game the way its supposta be played? -SlothNathan

User avatar
kingpin
Senior Admin
Cherub
Posts: 10932
Joined: Sat Jan 11, 2003 12:51 pm
Contact:
Sweden

Hand-picked

Re: 1.10 Missile Function file guide

Post by kingpin » Tue Feb 08, 2005 12:52 pm

- I believe the various firewall flames, fireball explosions and eruption are hardcoded to inflict only fire damage, and the blizzard functions are hardcoded to inflict cold damage.
If you clone the skill/missile you have at least no problem to make blizzard deal any damage type you want.

Look at blizzard, armageddon and meteor, if I remember right those use same srvDoFunc.

User avatar
mishy23
Retired staff
Arch-Angel
Posts: 1313
Joined: Mon Mar 22, 2004 6:44 pm
Location: Middle of Nowhere, Wisconsin
Contact:

Re: 1.10 Missile Function file guide

Post by mishy23 » Tue Feb 08, 2005 1:40 pm

Wow, your correct totally overlooked advlighttrailingjav and tornado,
I think i originally had notes on tornado, but it looked like it wasn't as useful as I first thought will have to revisit.


Expect a follow up for tornado and advlighttrailingjav, plus a few others I accidently left off like baal cold maker/wake of destruction, rabies plague, and some other minor ones, guess I rushed things in the end ;)

You will never see anything on molten boulder, that *EXPLETIVE* missile has cursed me from day one and I have removed this spell without prejudice from my mod :p

-Mishy
{Modding status: Project X}

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Post by Joel » Tue Feb 08, 2005 1:49 pm

Molten boulder actually have a neat effect to randomly bounce when colliding.
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
Brother Laz
Forum Legend
Dominion
Posts: 6715
Joined: Mon Jun 03, 2002 10:06 am
Location: Fallen Like Lightning
Contact:

Hand-picked

Post by Brother Laz » Tue Feb 08, 2005 1:52 pm

Mishy" wrote:Damage Function 14 (Ex: moltenboulder)
[...]
[...]
You will never see anything on molten boulder, that *EXPLETIVE* missile has cursed me from day one
Yes indeed. :)
19.may.2007 | Adun Tori Laz.
Median XL released!
Flesyht sa ruobhgien yht etah.


y dont u play the game the way its supposta be played? -SlothNathan

User avatar
mishy23
Retired staff
Arch-Angel
Posts: 1313
Joined: Mon Mar 22, 2004 6:44 pm
Location: Middle of Nowhere, Wisconsin
Contact:

Re: 1.10 Missile Function file guide

Post by mishy23 » Tue Feb 08, 2005 5:15 pm

Well the damage function that causes the KB is sorta neat,
I still stand by my own hypocrisy though that the rest of it is junk,
maybe I have a deep childhood hatred towards bouncing missiles.
Or maybe thats my X's fault.
-mishy
Last edited by mishy23 on Tue Feb 08, 2005 5:17 pm, edited 1 time in total.
{Modding status: Project X}

User avatar
reiyo_oki
Retired staff
Arch-Angel
Posts: 1275
Joined: Thu Aug 28, 2003 5:39 pm
Location: Rhuidean, the city of dreams
United States of America

Post by reiyo_oki » Thu Feb 10, 2005 2:42 am

Damage Function 8 (Ex: eruption) Used by the cracks that eruption skill creates, this is the one damage function I am unable to determine what it is doing as no parameters are being used that I can see. The skill itself is passing the calc1 for radius, and calc2 for frequency of the cracks and it could be something to do with that but that is not really damage-related. Possibly the radius effect is what is being used here, as maybe each crack is only one small point, and the damage function is determining radius. Let me know if anyone has any ideas.

Damage Function 8 (Ex: twister) Very similar to function 7, this skill passes the dparam1 for stun length. The only seen difference is that if missile.txt is left as a 0 for stun and stun length is read from skills file, it only reads par2, while function 7 uses ln12.
You kinda forgort #9....I think the second 8 was supposed to be 9, was it not?

Also, is there a damage function 13? Or does it just skip to 14?

Reality is different for each person; What one person sees, another does not. It's all a matter of perspective. This is my reality, I'll live it as I choose.

"Qui desiderat pacem, praeparet bellum"
"Who desires peace should prepare for war."
- Vegetius De Rei Militari III

User avatar
mishy23
Retired staff
Arch-Angel
Posts: 1313
Joined: Mon Mar 22, 2004 6:44 pm
Location: Middle of Nowhere, Wisconsin
Contact:

Re: 1.10 Missile Function file guide

Post by mishy23 » Thu Feb 10, 2005 1:12 pm

Good eye, you are correct tornado uses damage function 9, I editted original post to fix this.
And for damage function 13, look at damage function5, its the same thing, basically the old version of blessed hammer,
-Mishy
Last edited by mishy23 on Fri Feb 11, 2005 5:18 pm, edited 1 time in total.
{Modding status: Project X}

User avatar
Brokklu
Posts: 33
Joined: Sun Nov 07, 2004 10:00 am
Location: Malta

Re: 1.10 Missile Function file guide

Post by Brokklu » Thu Feb 10, 2005 1:34 pm

I just wanted to thank you for the effort you've taken to post this one in. It was only last month that we were discussing the subject and you were explaining SFIA to me cuz I was looking for a missiles file guide just like this! A toast to you and all d2 modders :beer:

I've recently taken a liking to the blessed hammer movement function (as Mishy23 would call it) I know the dmg function is explained but the movement function is quite unlike any other missile in the game. I'd like to be able to edit the formula and make it circle around the character for a few seconds instead of haphazourdly whizzing around and bumping into the scenery and stuff :P

Geez I hope I didn't have to open another thread for that question??
Last edited by Brokklu on Thu Feb 10, 2005 3:43 pm, edited 2 times in total.

User avatar
marhawkman
Retired staff
Angel
Posts: 627
Joined: Thu May 13, 2004 2:21 am
Location: CO

Re: 1.10 Missile Function file guide

Post by marhawkman » Thu Feb 10, 2005 7:51 pm

You also seem to have left out the functions for Vengeance. Or is the weird damage effect hardcoded to the skill alone?
Currently working on making an Andariel Player character.
Status of my Mod: Assimilated

User avatar
Darque
Retired staff
Arch-Angel
Posts: 1052
Joined: Fri Aug 01, 2003 9:04 am
Location: Poplar Grove, IL
Contact:

Post by Darque » Thu Feb 10, 2005 8:14 pm

Vengeance does not use any missiles...
Diabolic Studios Web Site | Forum
THoC Beta v8.1Download | Feedback

Infinitum Web Site
Read The Forum Terms of Service

User avatar
marhawkman
Retired staff
Angel
Posts: 627
Joined: Thu May 13, 2004 2:21 am
Location: CO

Re: 1.10 Missile Function file guide

Post by marhawkman » Fri Feb 11, 2005 12:01 am

Ooops... I forgot MISSILE file guide.......

Vegeance is a melee skill...

Okay I'll have to ask the question then.
Currently working on making an Andariel Player character.
Status of my Mod: Assimilated

User avatar
mishy23
Retired staff
Arch-Angel
Posts: 1313
Joined: Mon Mar 22, 2004 6:44 pm
Location: Middle of Nowhere, Wisconsin
Contact:

Re: 1.10 Missile Function file guide

Post by mishy23 » Fri Feb 11, 2005 1:15 pm

Yep alot of stuff is in the skill functions, maybe one day i'll get to them as well but hey are more complex and harder to test.

As for blessed hammer, its another very nice ability that they unfortunately tied to the skill functions instead of the missile itself (like guided), so to get that blessed hammer swirl, you have to use a blessed hammer skill function, and you can't edit the path of the missile :(
You could add some interesting hit functions though to the missile to make it do some interesting effects, for example I have a blessed hammer that uses firewallmaker move function creating a firewall on the ground in the blessed hammer pattern.
-Mishy23
{Modding status: Project X}

User avatar
RicFaith
Retired staff
Arch-Angel
Posts: 1576
Joined: Fri May 24, 2002 7:12 am
Location: Back where the weather is too hot
Contact:

Hand-picked

Re: 1.10 Missile Function file guide

Post by RicFaith » Fri Feb 11, 2005 2:14 pm

[quote=mishy23";p="211644"]You could add some interesting hit functions though to the missile to make it do some interesting effects, for example I have a blessed hammer that uses firewallmaker move function creating a firewall on the ground in the blessed hammer pattern.
-Mishy23[/quote]

We need a thread that lists these interesting skills so all can go 8-O
Honestly, where do you put what to do that? I'm guessing the Move and Hit clt and svr or something like that?

User avatar
Brokklu
Posts: 33
Joined: Sun Nov 07, 2004 10:00 am
Location: Malta

Re: 1.10 Missile Function file guide

Post by Brokklu » Fri Feb 11, 2005 4:38 pm

Reg: Blessed Hammer being tied to the skill function (mishy23)

I had seen Blessed Hammer in the Missiles.txt and didn't realise that it was calling the actual skill (silly me) I should have realised as it doesn't have any "movement functions" like other missiles do.

P.s. you're suggestion on the firewallmaker witht he blessed hammer is tops would it also be possible to add additional hammers per level or would that be going too far?

-----------------------------------------------------------------------------------

ok so that's another one tied to the skills and not missiles thankyou for your help :)
Last edited by Brokklu on Fri Feb 11, 2005 7:53 pm, edited 1 time in total.

User avatar
Kraj
Retired staff
Angel
Posts: 955
Joined: Tue May 28, 2002 8:57 pm
Location: Chicago, IL, USA
Contact:

Re: 1.10 Missile Function file guide

Post by Kraj » Fri Feb 11, 2005 5:11 pm

[quote=Brokklu";p="211676"]P.s. would it also be possible to add additional hammers per level or would that be going too far?[/quote]
As far as I know that's not possible. The functions for multishot skills are tied to the skill not the missile just like BH, so you can't combine them.

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Re: 1.10 Missile Function file guide

Post by Joel » Fri Feb 11, 2005 8:42 pm

[quote=Kraj";p="211684"][quote=Brokklu";p="211676"]P.s. would it also be possible to add additional hammers per level or would that be going too far?[/quote]
As far as I know that's not possible. The functions for multishot skills are tied to the skill not the missile just like BH, so you can't combine them.[/quote]

Again make hammer auto explode into 1 frame FO that spawn LF missile lookign like hammer ^^ Chain chain and you can even have HUNTING multiple blessed hammer :D
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
mishy23
Retired staff
Arch-Angel
Posts: 1313
Joined: Mon Mar 22, 2004 6:44 pm
Location: Middle of Nowhere, Wisconsin
Contact:

Re: 1.10 Missile Function file guide

Post by mishy23 » Sat Feb 12, 2005 11:54 pm

You can have multiple hammers like Joel says, they just can not happen until after the first hit, so you cant make it throw more than one right away, but you can have the hammer multiply when it hits a target with hit functions,
you could have the range be very small and auto explode missile so it doesnt have to hit a monster, but will automatically hit at end of its range and split apart.

Unfortunately I have tried and have not been able to make a hammer spawn multiple hammers taht still follow the spiral movement :(

-mishy23
{Modding status: Project X}

User avatar
Sir Xavius
Junior Member
Paladin
Posts: 177
Joined: Mon Oct 04, 2004 6:27 pm

Re: 1.10 Missile Function file guide

Post by Sir Xavius » Wed Mar 02, 2005 9:55 pm

Our patient waiting becomes more strained each passing day as we wait for the Great Mishy to hand down to us the anticipated Skill Functions tableaus, the secret writings only the wisest (and most patient) modders can discover.

Make haste, my lord, the masses await your word.... :toyhorse:

User avatar
mishy23
Retired staff
Arch-Angel
Posts: 1313
Joined: Mon Mar 22, 2004 6:44 pm
Location: Middle of Nowhere, Wisconsin
Contact:

Re: 1.10 Missile Function file guide

Post by mishy23 » Wed Mar 02, 2005 11:51 pm

Well well well, too busy at the moment to create a skill function list up just yet, too busy editting my skills :P
Whenever I get done finishing all my skills up I should have time to sit down and do this (might be months :( ), looking it over it doesnt seem to hard to do.

-mishy23

EDIT: added a few things to original file, actually just move and hit functions of advlighttrailingjav, its pretty neat.
Last edited by mishy23 on Mon Mar 14, 2005 5:56 pm, edited 2 times in total.
{Modding status: Project X}

User avatar
Joel
Retired staff
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay
Contact:

Hand-picked

Moved

Post by Joel » Wed Mar 30, 2005 8:26 am

*This topic has been moved from General Mod Making to Skill Clinic*

Skill Clinician has some more notes he\'ll soon add to this references guide

User avatar
SilverShadowHell
Forum Regular
Angel
Posts: 803
Joined: Fri Apr 08, 2005 1:22 pm
Location: HERE!! on the Battlefield...
Contact:

Re: 1.10 Missile Function file guide

Post by SilverShadowHell » Sun Jun 05, 2005 9:58 pm

Hit function 13/10(guided missile)

It does not control the number of piercing capabiliti.
It is just so the missile to "recast itself" when it explodeds in mid air so it can turn to a monster the first time to hit him.

I'm now trying to make guided arrow hit multple times butt it does not work because there is no way to make it work without changing the hit function.

If you change the hit function you will have big problems. The skill will hit infinite times(till range expires) and do damage butt this only if you target a enemy otherewise it won't turn to hit a monster.
WAR!!!!!!!....... don't worry.. I'm working on it
http://iloveshaders.blogspot.com/

Post Reply

Return to “Skill Clinic”