@pain,
As promised, here's some data to look at. I'll use the Bless spell, since I know there was at least one column that was different there.
I know you already know all this, but this helps me through the process
Here is the original entry from Tony's distribution:
From HenchSpellDef.NSS:
HenchSetSpellBuffEntry(SPELL_BLESS, HENCH_SPELL_INFO_SPELL_TYPE_BUFF, 1, HENCH_SPELL_INFO_CONCENTRATION_FLAG | HENCH_SPELL_INFO_MEDIUM_DUR_BUFF ,
9.144, SHAPE_SPHERE | HENCH_SPELL_TARGET_RANGE_LONG | HENCH_SPELL_TARGET_SHAPE_LOOP | HENCH_SPELL_TARGET_REGULAR_SPELL,
HENCH_EFFECT_TYPE_ATTACK_INCREASE | HENCH_EFFECT_TYPE_SAVING_THROW_INCREASE,
0, 0, 0,
0.04)
I know from the above data, that each column is comma separated, and each bit flag in that column is separated by a pipe.
The only deviation from that (that I can tell) is that the SpellInfo column is actually the spell type, spell level, and some flags concatenated into a single value. Also, TargetInfo concatenates Radius and the flags.
The bit flags are descriped in hench_i0_spells and correspond to the henchspells.2da as follows (sorry if formating makes this look bad)
id SpellInfo TargetInfo EffectTypes DamageInfo SaveType SaveDCType
6 369632259 67180260 516 **** 0 ****
NeverWorker correctly reports the following information about each column.
SpellInfo: (369632259)
Level = 1
Type = Buff
Flags = Concentration
Duration = Medium
Effect Types: (516)
Flags = Saving Throw Increase, Attack Increase
Target Info: (67180260)
Radius = 9.1
SpellShape = ???? (edit: this is missing)
Range = Long
Flags = Loop, Regular Spell
Damage Info: (****)
Null (****)
Save Type: (0)
Save 1 = Null, Effect Only
Save 2 = Null, Effect Only
Flags = Null
Custom Type = No Check
However, if I clear everything out of the row (make everything null) and re-enter it with NeverWorker, setting all the flags and entries the same as above, I see two discrepancies, which seems to cause the AI to ignore the spell as a castable buff.
Spell Info = 533507
Target Info = 67180256
TargeInfo is pretty close, only 4 off from the other bit total. I believe that is attributed to the fact that NeverWorker only counts Radius to 1 decimal place, but Tony's script counts to 3. i.e 9.1 can be entered in NeverWorker, but if you look at HenchSpellDef.NSS, Tony counted it out to 9.144. That may account for the discrepancy there. However, I don't think that would cause the AI to ignore the entry. Probably something you could look at, though.
SpellInfo is significantly different, and I think this the column that is missing some kind of bit flag. The bit total is off by 369098752 (or 16000000 in hex). So, just for kicks, I tried changing the bit flags the same way on the next 3 spells, and they were all off by the same amount! ID 9, however was off by 369098764 (1600000C), 12 more than the others (maybe the spell type 'Attr Buff' is set incorrectly?). Line 10 was back to the same dif as the other 3. That's where I stopped. I'm sure there is a pattern in there somewhere.
Anyway, I hope this is of help to you in some way.
Best,
Red
Edit:
Actually, on TargetInfo, the spell shape is missing... that's why it's off by 4.
const int HENCH_SPELL_TARGET_SHAPE_MASK = 0x00000007;
// standard spell shapes in mask
/*
int SHAPE_SPELLCYLINDER = 0;
int SHAPE_CONE = 1;
int SHAPE_CUBE = 2;
int SHAPE_SPELLCONE = 3;
int SHAPE_SPHERE = 4;
*/
const int HENCH_SHAPE_NONE = 7; // indicates no shape
const int HENCH_SHAPE_FACTION = 6; // indicates faction targets
Modifié par RedRover72, 13 mai 2012 - 12:33 .