Expanding ammo types beyond 4?

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
MDave
Posts: 76
Joined: Mon Dec 17, 2007 7:08 pm

Expanding ammo types beyond 4?

Post by MDave »

I know you can make extra ammo types by defining them in qc, but how could I make extra ammo types that would show up on the status bar in the engine code, with their corresponding icon? Is there a way of having extra ammo types without breaking quake compatibility? It's quite important for the total conversion I'm making, so I'm wondering if I should go ahead and break it for the sake of my project. I don't think many people would want to use my version of the glquake engine primarliy for playing standard quake and its mods, anyhow. If I don't get many responses, then its probably safe to break compatbility then :P
MDave
Posts: 76
Joined: Mon Dec 17, 2007 7:08 pm

Post by MDave »

I found the answer, and its rogue ;) had to hunt down the qc though, and that wasn't easy.
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

Yes, Rogue can do it, but it's kinda hacky, as the engine doesn't have access to the definitions for the new ammo types (not to mention the correct icons to load). You'll really need to modify the engine if you want to do this properly, which means (1) supplying your own engine with the mod, (2) having other people not being able to run your mod on their own favourite engines, and (3) risking a break in compatibility between your engine and other mods.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
MDave
Posts: 76
Joined: Mon Dec 17, 2007 7:08 pm

Post by MDave »

Well, I've managed to not break compatability, and I've decided to use Fitzquake now instead of glquake for the base foundation :) due to having more modern features (like easily changing resolutions on the fly! wohoo!) and the very handy r_showbboxes and other developer handy features :) I'm going with packaging the engine with the mod. The mod can be run in other engines too, just you won't have the proper hud displays and 255 color transparency for models and brushes. I'll post a link to it once I finish it up, I'm nearly done :)
Lardarse
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Post by Lardarse »

As you've discovered: Having weapons use ammo other than the 4 types is easy. It's displaying it that's tricky.

You can always display the ammo of the current weapon though, with self.currentammo, so you could in theory have a 5th ammo type displayed there (and not have any of the other weapons display in that area), but it would imply that it's more important than the other 4 ammo types.

If you want to drop armor from your mod, you could use the space on the left, except that the pentagram obscures that number, so you could use the pent as an infinite ammo powerup instead. But this is all moving away from what Quake is, which you may not see as a bad thing...

The other thing you could do is use the various print functions to let the player look at what they ahve by jsut pressing a button, but there are limitations to be dealt with there as well...
Post Reply