Marine Holds Weapons?
Marine Holds Weapons?
Hello, I'm new here and new to the idea of posting in a forum, but I've been busy finding, playing, dissecting, and making wads for ZDoom, GZDoom and Skulltag for a while now (without distributing them).
I've been looking, but I haven't found anything that shows what weapon the Doom Marine is holding during the game. I understand that in solo gaming, this isn't really an issue, but my friends and I do a lot of DM and coop, and it would be nice to see what weapon I'm fighting alongside or against.
Is there any wad out there that displays what the marine is holding? I found wads with classes in it that show ONE weapon, but I couldn't find anything else.
So, I created a wad with a playable marine class whose sprite changes when holding each of the vanilla weapons. Everything is done in DECORATE so that no level scripting or changes are necessary. If there's nothing else out there that can do this, I suspect it could be useful to the community.
The DECORATE file is fairly complicated, but the coding is done. I just need to know how I should distribute this, or if I should even bother with it if there's something better out already.
I've been looking, but I haven't found anything that shows what weapon the Doom Marine is holding during the game. I understand that in solo gaming, this isn't really an issue, but my friends and I do a lot of DM and coop, and it would be nice to see what weapon I'm fighting alongside or against.
Is there any wad out there that displays what the marine is holding? I found wads with classes in it that show ONE weapon, but I couldn't find anything else.
So, I created a wad with a playable marine class whose sprite changes when holding each of the vanilla weapons. Everything is done in DECORATE so that no level scripting or changes are necessary. If there's nothing else out there that can do this, I suspect it could be useful to the community.
The DECORATE file is fairly complicated, but the coding is done. I just need to know how I should distribute this, or if I should even bother with it if there's something better out already.
- Unknown_Assassin
- Posts: 2468
- Joined: Wed Apr 12, 2006 5:17 pm
- Location: Where dead carcasses lie
- Contact:
Re: Marine Holds Weapons?
I don't think anyone have done this yet.
You'd probably be the first one.
You'd probably be the first one.
Re: Marine Holds Weapons?
Hmm, I was entertaining the idea of doing this myself, but it seems I've been beaten. 
By all means, pop up a thread in the Projects forum and put up a beta. It's a good place to start, as people will be able to bugtest the wad to make sure it's all ironed-out before release. I can see some big use coming from this on Skulltag.
Have you happened to check out Xim's marine sprites yet? It's possible those are the same ones you've used, but it's worth a look anyway just in case.

By all means, pop up a thread in the Projects forum and put up a beta. It's a good place to start, as people will be able to bugtest the wad to make sure it's all ironed-out before release. I can see some big use coming from this on Skulltag.
Have you happened to check out Xim's marine sprites yet? It's possible those are the same ones you've used, but it's worth a look anyway just in case.
Re: Marine Holds Weapons?
I'm very excited about this, if you really got it work.
I'm making a mod, which point of view is 3rd person, so it will be useful and important to have different sprite set for each weapon in solo gaming.

- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: Marine Holds Weapons?
AFAIK, I and Daniel (ARSENAL and ARMAS series mod maker) have done such wads. However, I don't know what happened to mine. 
It's pretty easy, actually.

It's pretty easy, actually.
Re: Marine Holds Weapons?
Well, could you tell me how is it done? I know it could be done with morphing, but it would be cool that the only coding happens in Decorate, like the starter of this topic said.
- Captain Ventris
- Posts: 4608
- Joined: Mon Jul 31, 2006 4:25 pm
- Location: San Antonio, TX
Re: Marine Holds Weapons?
It is actually easy. Modify the default weapons to give a custom inventory item when selected, and to have it taken when deselected. Each of the Player's states checks for these items, and when it finds the item currently in possession, is jumps to the version of that state that has the correct graphics. I don't know if that's how he did it, and there could be much more efficient ways to do it.
- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: Marine Holds Weapons?
And as far as I know, if you want to have it cut as short as possible, you can use just one dummy item with a large max amount (pertaining to the max. amount of weaponry you have.) and check for it in the Spawn (If you have standing frames) or See (Walking frames) states.
I could also try and define every number with it's own name to make it easier to know which amount of said item equals which weapon, but I'm not sure if that'd work.
I could also try and define every number with it's own name to make it easier to know which amount of said item equals which weapon, but I'm not sure if that'd work.
Re: Marine Holds Weapons?
Mr. Green has already tried to do it like that, but there's an inexplicable bug.
The Decorate in his testwad looks like this:
However, Missile, Melee and Pain states are working fine.
Mr.Green's test wad can be downloaded here: http://www.sendspace.com/file/u866d2
A solution to that would be veeery nice.
The Decorate in his testwad looks like this:
Spoiler:When the shotgun is selected, the See state is not working. It is just looping the PLA 3 A sprite in the Spawn state when the player is moving. That's the bug.

Mr.Green's test wad can be downloaded here: http://www.sendspace.com/file/u866d2
A solution to that would be veeery nice.

Re: Marine Holds Weapons?
Code: Select all
Spawn:
PLA2 A 0 A_JumpIfInventory ("ShotgunThing",1,2)
PLA2 A 10
Loop
PLA3 A 10
Goto Spawn+4
Code: Select all
Spawn:
PLA2 A 0 A_JumpIfInventory ("ShotgunThing",1,"ShotgunSpawn")
PLA2 A 10
loop
ShotgunSpawn:
PLA3 A 10
loop
Re: Marine Holds Weapons?
Didn't work.
The first one just looped the sprites althought the player wasn't moving and the second one gave me the same result as was the original.
Thanks for the shots anyway.

Thanks for the shots anyway.

Re: Marine Holds Weapons?
Omg, I did it!!! 

Code: Select all
Spawn:
//Here A_JumpIfInventory for a PistolThing, so it goes straight to PLA2-sprites when the game starts.
PLA3 A 10
PLA2 A 0 A_JumpIfInventory ("ShotgunThing",1,2)
PLA2 A 10
Goto Spawn+1
PLA3 A 0
Goto Spawn
See:
PLA2 A 0 A_JumpIfInventory ("ShotgunThing",1,5)
PLA2 ABCD 4
Goto Spawn+1
PLA3 ABCD 4
Goto Spawn
Last edited by Sinfis on Thu Apr 16, 2009 9:50 am, edited 2 times in total.
Re: Marine Holds Weapons?
Awesome, and now for all the other weapons. I got all the sprites collected together in the Helper Marines wad.
- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: Marine Holds Weapons?
Alternatively, if you're too lazy to dabble with jumping via frames, you can just, say, use..
I tweaked your code to also be broken/fixed/bastardized/whatever, considering I found a particular flaw before.
I tweaked your code to also be broken/fixed/bastardized/whatever, considering I found a particular flaw before.
Code: Select all
Spawn:
//First frame of Spawn does NEVER, EVER allow for any action to work, except when it goes into loop.
//So, this is why we introduce a "filler" frame, to not give a hernia to all those other poor action functions.
PLA2 A 0
PLA2 A 0 A_JumpIfInventory ("ShotgunThing",1,"Spawn.Shotgun")
PLA2 A 10
Goto Spawn+1
Spawn.Shotgun:
PLA3 A 10
Goto Spawn
See:
PLA2 A 0 A_JumpIfInventory ("ShotgunThing",1,"See.Shotgun")
PLA2 ABCD 4
Goto Spawn+1
See.Shotgun:
PLA3 ABCD 4
Goto Spawn
Re: Marine Holds Weapons?
More accurately, functions on the first frame an actor exists are never executed. Better wait of explaining that.Blade Nightflame wrote:First frame of Spawn does NEVER, EVER allow for any action to work, except when it goes into loop.