Okay, here's my tuturial for making a basic weapon in EDuke32 that makes use of the built-in weapon gamevars:
1) Put all of the graphics you need for displaying the weapon in the game (.art tiles, DEFed in models, or whatever medium you are using)
2) Add all the sounds, too, with definesound and whatever sound files you are using
3) Decide what weapon slot your weapon is going on, and set the predefined values for that weapon slot to the values you want.
https://wiki.eduke32...efined_gamevars
3.1 For example, if it is going on the pistol slot and you want it to shoot ROCKETS, then in your code declare "gamevar WEAPON1_SHOOTS RPG 1"
3.2 Study the list of weapon variables and experiment with changing the values on them. Spend some time on this. Just try changing the SHOTSPERBURST on a weapon, its TOTALTIME, what it SHOOTS, the sound it makes when it shoots, etc etc etc. Spend hours on this if necessary and do not move on until you are competent at changing the more important vars and understanding what they do.
4) If needed, define a custom projectile for your weapon to shoot. Skip this step if it is going to shoot one of the projectiles already in the base game.
https://wiki.eduke32...efineprojectile
4.1 Look at the linked entry on defineprojectile. It's accurate and even has an example. If you set WEAPONX_SHOOTS to your custom projectile tile number, your weapon will shoot that projectile.
4.2 There are literally hundreds and probably thousands of custom projectiles defined in various released mods. Maybe take a look at them if you aren't sure on what values to use. You are looking for entries that say "defineprojectile" in the code.
4.3 If your custom projectile spawns something and/or has a trail, select the relevant actors for that or make them if needed.
5) If you are using your own weapon art, then use
https://wiki.eduke32...VENT_DRAWWEAPON to cancel out the hardcoded display of the weapon on your slot and then display your weapon.
5.1. E.g. if you are using the pistol slot then use "ife currentweapon PISTOL_WEAPON set RETURN -1" to cancel out the hardcoded display of the pistol.
5.2 Use the rotatesprite command to draw your weapon. This may require multiple draws depending on what is going on (.e.g if the weapon is reloading you may be drawing the weapon plus a separate hand sprite and also a clip sprite)
5.3 Weapon positioning is somewhat trial and error ,but there are many examples to look at in various mods. In general, though, you start with base x and y values for the screen coordinates that put the weapon in the right place, and you adjust those based on certain hardcoded values relating to weapon sway and bob. You want to subtract looking_angSR1 from x, add weapon_xoffset to x, add looking_arc to y, and subtract gun_pos from y (all of those constantly updated vars have wiki entries and most of the examples I alluded to use those vars to adjust positioning).
5.4 You can disregard the hardcoded weapon sway and bob stuff and make your own, though.
5.5 weaponcount in the display event is equivalent to player[].kickback_pic and obviously you want your display to change depending on the weaponcount in most cases. Since you studied the weapon properties page and experimented, you know that the max weaponcount is the WEAPONX_TOTALTIME.