E.J. Posted May 6, 2011 Hi all again. Could someone point me in the right direction here? I would like to either create a dehacked file that gives a weapon infinite ammo, or that increases the limit while starting the player with their ammo full. Edit; NM. I had no idea it'd be so simple. I finally bit the bullet, and installed Whacked 3. It was something along adding a single line entry for the ammo 'type'. 0 Share this post Link to post
neubejiita Posted May 7, 2011 Just set the weapons ammo type to 5, that is the fist and chainsaw ammo type, then there will be no ammo problems. http://pastebay.com/122619 Here is my super.deh for reference. Have fun. 0 Share this post Link to post
40oz Posted May 7, 2011 Also make sure you make the max ammo and pickup ammo 0 for whatever ammo types you're giving infinite ammo to. 0 Share this post Link to post
skib Posted May 9, 2011 Or with eternity extensions for BEX, you can add ammo per shot = 0 but making ammo = 5 works for Boom and DEH! 0 Share this post Link to post
E.J. Posted May 11, 2011 neubejiita said:Just set the weapons ammo type to 5, that is the fist and chainsaw ammo type, then there will be no ammo problems. http://pastebay.com/122619 Here is my super.deh for reference. Have fun. Thanks. BTW - Has anyone here ever gotten WhackEd3 to run successfully under Linux Wine? Is there any reason I shouldn\\\'t just use WhackEd2, which runs fine under it? 0 Share this post Link to post
skib Posted May 11, 2011 No, WhackEd is good. If you can get it to run! 0 Share this post Link to post
Quasar Posted May 11, 2011 Actually using the "no ammo" ammo type with any weapon pointer except the chainsaw or fist will corrupt the player's max shotgun ammo, at least in vanilla DOOM. This is because of the value of am_noammo and the layout of the player_t structure in memory:ammo[0] // am_clip == 0 ammo[1] // am_shell == 1 ammo[2] // am_cell == 2 ammo[3] // am_misl == 3 maxammo[0] // am_numammo == 4 (maxammo for bullets) maxammo[1] // am_noammo == 5 (maxammo for shotgun !!!) None of the weapon pointers except A_Punch and A_Saw bother to check that the weapon's ammo type is in range, so when they go to do this:player->ammo[weaponinfo[player->readyweapon].ammo] -= <amt>; they are committing an undefined access past the boundaries of the ammo[] array. 0 Share this post Link to post