Da Rock Posted January 2, 2007 Share Posted January 2, 2007 I was messing with creating the "missing" 3 spells (Bear's Endurance, Fox's Cunning and Owl's Wisdom) that should accompany Bull's Strength, Cat's Grace and Eagle's Splendor and learned a few things that could help any IWD2 modders out there... Miscellaneous For Arcane casters there are 24 slots for spells at character creation (6x4) and in the spellbook (3x8), yet 30 slots at levelling up (6x5). Here are the list of slots, and how many slots are used up: 1 - 19; 2 - 25; 3 - 21; 4 - 26; 5 - 22; 6 - 26; 7 - 17; 8 - 14; 9 - 9 Without creating some extreme items, an arcane caster is never going to to be able to cast more than 24 spells, so we can use 30 as a limit (except for level 1) for new spells. LIST****.2DA files contain the references to spells used in the game. listmage and listdomn are in alphabetical order - adding a spell to the end causes the spell at character creation and levelling up to appear at the end. RACESPAB.2DA contains a list of 2DA file references for each race. Each of these 2DA files contains a list of Innate Spells the race has. SPELL.IDS and SPLSTATE.IDS are used for spell effects and scripts. If you want to set "Immunity From" type effects (for existing spells, or your own to prevent multiple casting), you will need to add lines here. In spell.ids, each entry starts with 4 digits. The first digit is 1, 2 or 3, based upon its use: 1 = divine caster; 2 = arcane caster; 3 = Innate/trap The last three digits are equivalent to the last digits of an spl file, e.g. SPWI101 (Wizard's Grease) entry is 2101 in spell.ids Portrait Icons For this, you need 4 files - states.bam, states2.bam, statdesc.2da, effects.src. Let's look at each one... states.bam This file contains the portrait icons displayed inside the small portrait of the main GUI. The bam file has 255 sequences, starting at 65 and ending at 210. There are 141 frames in total. All empty sequences use frame 37. To add a new icon, create a 10x10 image (with the "shadow" (pinkish) background colour), insert a frame (142+) and replace frame 37 with your new one. states2.bam This file contains the "states" in the Character record. It is exactly the same as states.bam with two exceptions: images are 12x13 pixels and use the "blank" (blue/green) background colour. statdesc.2da This file contains the string references that appears next to the icon in the Character record. You will probably need dialog.tlk changed if you add new spells. effects.src This is not really needed, but you can add your descriptions to effects 142 and 169. Casting Time The values go from 1 to 10. There are no spell descriptions with a casting time of 10. Why? 10 equals a round, or 7 seconds. So a casting time of 1 equals 0.7 real time seconds. Spell Duration This is what screwed me up at first - and there are still a few things I don't know about... The 3 spells I was playing with would last 10 minutes/round. Here are a few fields in an SPL file that you need to look at (0xnn describes the offset in the spl file): Flags (0x18) = Flag 14: Simplified Duration I have no idea exactly what this is, but it seems to be used for most "n rounds/minutes/hours per level" spells (oddly though, Bull's Strength does NOT). Any ideas what this really does would be welcome. Spell Duration - rounds / level (0x72) For a duration linked with the caster level. Spell Duration - rounds (0x73) For a constant duration. EFFECT extended header - Duration (0x0e) This seems to be set in seconds, where 7 equals a round. I saw the whole duration calculation being pretty screwed at first, but the first thing you have to learn is that "minutes" and "hours" are NOT real time (check existing spell descriptions)! Now, this is where it gets crazy... I picked 4 spells that last 10 minutes/level. All have simplified duration and have 10 at 0x72. So how can 10 rounds/level equal 10 minutes/level? It got odder from there. Here are the four spells and the "Duration" values in their effects extended header: Invisibility = 1680 Invisibility Sphere = 3000 Protection From Arrows = 350 Symbol of Pain = 770 I am at a total loss as to why 4 spells that last the same amount of time have vastly different extended header effect durations. Are they really 10 minutes/level? Does Simplified Duration negate the need for this extended header duration? Or do these durations only effect enemies? Crazier still, let us look at 3 priest spells: Bless, Bane and Faerie Fire. All are supposed to last 1 minute/level. However, Bless and Bane have 10 at 0x72 (same as 10 minutes/level!), while Faerie Fire has 3. All "Duration" values in the extended header are 0. Remember minutes/hours is NOT real time? Well, I decided to test in-game some spells. The times are approximate, give or take 1 or 2 real time seconds. The following are all described as lasting 1 minute/round: Bless (level 1, Battleguard) = 1:10 Bless (level 1, Battleguard's Domain spell) = 2:23 Blur (level 3, Illusionist) = 1:02 Blur (level 4, Illusionist) = 1:23 Blur (scroll - cast at level 6) = 2:05 Protection From Evil (level 1, Watcher of Helm) = 0:24 Protection From Evil (level 1, Watcher of Helm's Domain spell) = 0:41 However, Bless has 10 at 0x72 (already said) while Blur and Protection From Evil (priest) have 3 at 0x72 (like Faerie Fire). Let us now look at Mage Armor. This was not fun to time, as it is supposed to last 1 hour/level. In fact it lasts about 5:48. What is interesting, is that at 0x72, the value is 50. Why is it interesting? Well, It is supposed to last 5 times longer than Bless - and it does! Ok, not so interesting, but here are the results (based on my timings being slightly inaccurate): One "minute" lasts 3 rounds, or 21 seconds. Ten "minutes" lasts 10 rounds, or 70 seconds. One "hour" lasts 50 rounds, or 5 minutes 50 seconds (350 seconds). Eight "hours" lasts 2400 (e.g. Iron Skins) or 3000 (e.g. Blindness) seconds. One "day" lasts 9000 seconds (2.5 hours as opposed to 2 hours the manual specifies). Unfortunately, it also shows that the spell description for Bless (and therefore Bane) is wrong. So how many other spells are described with incorrect durations? Well, you can see in the above results that either Iron Skins or Blindness is wrong for a start... Domain Spells Looking at "Bless" from my timings above, I thought "domain spells last twice as long!". So I immediately went to test it on Executioner's Eyes (20 rounds instead of 10 - yes!). This spell is "constant", so I wasn't surprised that it lasted the "correct" amount of time - 10 rounds, or 70 seconds. So I wanted to know if this domain/timing anomoly affected ALL "variable" length Domain spells. As usual, I wasted precious seconds of my life timing the following: Bless (level 1, Battleguard) = 1:10 Bless (level 1, Battleguard's Domain spell) = 2:23 Bless (level 1, Demarch) = 1:10 Bless (level 3, Battleguard) = 2:20 Bless (level 3, Battleguard's Domain spell) = 3:28 Death Armour (level 3, Necromancer) = 0:21 Death Armour (level 3, Stormlord's Domain spell) = 0:28 Minor Mirror Image (level 1, Illusionist) = 0:28 Minor Mirror Image (level 1, Demarch's Domain spell) = 0:35 Minor Mirror Image (level 2, Illusionist) = 0:35 Minor Mirror Image (level 2, Demarch's Domain spell) = 0:42 Sanctuary (level 1, Silverstar) = 0:07 Sanctuary (level 1, Silverstar's Domain spell) = 0:14 I did test a couple of other spells and it appears that Domain spells are cast as though they are 1 level higher. What screws this up is Recitation: Recitation (level 7, Battleguard) = 0:48 Recitation (level 7, Battleguard's Domain spell) = 0:48 The only thing I can think of here is that this spell has no effects as such, but uses the spells EFFR1 and EFFR2 instead (these are what cause the Recitation effect). Link to comment
This topic is now archived and is closed to further replies.