Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Adding new weapons

edited 2014 Mar 27 in DOOM
Hello.

I've seen this discussed previously (http://dengine.net/forums/viewtopic.php?f=13&t=1528&p=9915&hilit=new+weapon#p9915), and didn't want to post in an old thread.

Also, please forgive me if what I'm about to ask has already been answered in detail, but searching of the forum hasn't shown me discussions covering what I'm looking for. If this post doesn't belong in this thread, once again, my bad.

I've been examining the doom source and pk3, and I've seen how there are IDs defined in the "info.h" and libdoom.pk3 "sprites.ded" files. There, the "info.h" enums have an order that the "sprites.ded" observe.

I've tried adding my own ID for a pink version of the shotgun to the end of these enumerations/files, "SPR_WSHG" and "WSGH". My game wad contains my new doom sprites "WSHGA0", "WSHGB0", WSHGC0", "WSGHD0". I re-assigned the libdoom.pk3 "objects.ded" shotgun definitions to use my "WSHG" instead of "SHTG".

In game, when I switch to the weapon, the game quits and gives me an error "Invalid sprite ID". In the source, this is thrown when a given sprite ID is not found in the existing list of SpriteGroups.

I feel like I'm close but am missing something. Is there a step that I'm not seeing for making the game detect my content?

Is the issue that I should be creating a new weapon completely, rather than modifying the existing shotgun definition?

Thanks for reading.

Comments

  • if i was to do that i would make a new weapon rather using an existing one since it is a core weapon. but i am unfamiliar with the source.
Sign In or Register to comment.