Wild_qwerty said:
Is it possible to set the projectile speed for the proto in the mapper? So we could then have slower moving projectiles or maybe really fast lasers?
If you go to the misc section and open one up, you see that there is NO settings for projectiles! The only setting is selecting the animation file. I've been plowing through all objects in the game, reordering them in the mapper, and most can be moved around but some cannot. For example, the "active items" (dynamite, plastic explosive, flare, motion detector, stealth boy) must have hardcoded PIDs in the engine, because if I change their PID numbers they no longer work. It seems that books are hardcoded too, but I just figured out (with Corpse's help) how to make them work via script (and I have 15 slots for new custom books set up).
But back to the question, on projectiles, I'm pretty sure this is another special case where things are hardcoded in the engine. The only info I know so far are the FIDs (file IDs) from itempid.h.
#define PID_FLYING_ROCKET (83886081)
#define PID_FLYING_PLASMA_BALL(83886082)
#define PID_FLYING_KNIFE (83886086)
#define PID_FLYING_SPEAR (83886087)
#define PID_FLYING_LASER_BLAST (83886089)
#define PID_FLYING_PLASMA_BLAST (83886090)
#define PID_FLYING_ELECTRICITY_BOLT (83886091)
Its interesting how things work in the engine. Files are basically just placed down in whatever order, and these FIDs are assigned based on where they land. It doesn't seem to matter what order they are in, except for some special cases where game engine code apparently references those FIDs directly. If you look at critters for example, they start with the FID number 16777217, which is hexadecial 1000001, and also 2 to the power of 24, or in geekspeak they start at the 25th bit address. I proved that I can make a new critters.lst and change everything around, and the 1st critter will always be 16777217, the rest in ascending addresses from there.
For projectile animations, I don't see a misc.lst equivalent of the critters.lst or items.lst. However, I am pretty sure if you drop a new animation in \art\misc, in the mapper it will show up when you toggle the projectile PID (while editing a weapon PID). It may not work until one of the existing protos are cloned. The cloned proto will have to be edited with a hex editor, changing its ID number and the FID (in hex) that points to the new animation file. I know because I'm almost done editing all of the item protos, and I did all the critters.
If you get me a projectile animation, I will have a go at trying to make it work. Hopefully the handling of projectiles isn't strictly hard-coded like the active items. If it is, we may be SOL for adding new animations. However, I could probably find out fairly quickly. If we're lucky, projectile associations are dynamically assigned. As for speed, I doubt in can be changed unless someone has info on what exactly is in the misc protos. Speed may be one of the settings, but does anyone know the specs on misc? Lots is known about critters and items, not much about the other stuff (I think) ...