From: Marzo J. <ma...@ya...> - 2005-07-02 03:16:36
|
--- Jeff Freedman <je...@mo...> wrote: > Marzo Junior wrote: > > OK, I tried to do this, but I am wondering if > >there isn't a better way. I have been thinkering > >with explosions (as the dev list shows), and so > >far, I got the following results (from the > >original): > I haven't looked at this for a long time, but recall > hard-coding (some) explosions in effects.cc. Sadly, I was going the same way. I have a few ideas which might change that, though; I am still looking into it. > It would be nice if they could be found in > the "ammo" data (which I think we've pretty much > decoded now), but I don't think it exists there. After you mentioned that, I took a look at ammo.dat to see if it might be there. Part of the data IS there, indeed, but not the sprite effects information. The unknown bytes are the key; I managed to discover part of what they mean. For the curious, here is what I found out (not mentioning the known bytes): * Bytes 4-5 are a projectile shape. More specifically, it encodes which shape will be used to *draw* the projectile. This does not apply to the cannon, death vortex and delayed blast, but does for everything else. * Byte 7 is flags. The flags are: 0x01 -> Magic damage? (guess) 0x02 -> Lucky? (pretty sure, as it is unique to lucky arrows -- or the extremelly rare sleep arrows of SI. Both arrows appear to hit all the time...) 0x04 -> Missile bounces back when hits an obstacle. If an NPC is on the way, the missile hits is and stops the return "home". The missile is always consumed (but see flag 0x20, below). This one is not used in either game. 0x08 -> The missile won't harm party members. Also not used in either game. 0x10 -> Appears to prevent missiles from dropping to the ground when you miss your target; normally, missiles appear on the ground (or have a chance to, I'm not sure) when you miss your target. There is an additional (important) note about this flag below. 0x20 -> The projectile is not consumed. Removing this flag has no effect on juggernaut hammers or similar which return due to a weapon flag. There is an additional (important) note about this flag below. 0x40 -> Bursts/explodes. Yes, burst arrows! It does not specify which sprite shape, so it must still be hard-coded. In the original, only the burst arrows really burst as they should, all others I tested explode with sprite anim 5. The missile is *always* destroyed, even if flag 0x20 is used (but juggernaut hammers and such still return -- but explode on the way back too!). Special mention goes to flags 0x10 and 0x20; when combined together, they are a marker for (shape-dependent) special behaviour. Death Vortex and Energy Mist have it, as well as shapes 566 (glimmer), 70 and 74 (both "light") -- none of the latter 3 seem to be used anywhere, and the latter 2 are not even there in SI. If you clear either of the flags, Energy Mist and Death Vortex work similar to how Delayed Blast works in Exult now (i.e., a translucent projectile flies to the destination and explodes -- using the correct sprite animation for the shape). That is what I found out. I haven't tested the other unknown bytes -- they are all zero anyway. Later, Marzo Sette Torres Junior ma...@fi... ma...@ya... ma...@ta... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |