Doom monster
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > WADs & Mods > ZDoom Pistol Start Options
 
Author
All times are GMT. The time now is 22:28. Post New Thread    Post A Reply
scroton
Mini-Member


Posts: 67
Registered: 08-13


Made this for a couple of guys on a site I frequent who were dissatisfied with zdoom's handling of autosaves and pistol starts (zdoom allows for disabling of autosaving, but not autoloading, so the only way to have immediate pistol start of levels on death is to delete ALL saves for a particular wad and then not save again, since any saves, even for earlier levels, will be loaded preferentially) and thought I'd share it here.

From the readme in the zip (also included as an "about" file in the WAD itself):

Pistol_Start_Options.wad is a singleplayer (g)zdoom-only mod which allows various pistol start options for players. It is compatible with all difficulty levels, all maps using vanilla weapons, all supported mods listed below, and should be compatible with all mods using non-vanilla weapons too. It works with or without (g)zdoom's autosave enabled.

Available options via CVars are:

always_pistolstart -- setting this to "true" or 1 forces pistol starts on all levels

death_pistolstart -- setting this to "true" or 1 allows the player to keep items and weapons between levels, but if they die forces a pistol restart of the level they died on. Don't press any key after dying or this effect will be canceled and you will autoload a previous save. Default time between dying and restarting the level from a pistol start is 2 seconds.

death_pistoltime -- this is the wait time in seconds after dying before you restart the level or map-set/episode from a pistol start. Does nothing if neither death_pistolstart nor death_firstmap is enabled. Defaults to 2. The toggle function cycles through 0-5 but you can set it in console to any integer 0 or higher.

death_firstmap -- setting this to "true" or 1 causes the player to pistol start the first level in an episode or map set upon death. If you're playing a map set with a MAP## naming scheme it will boot you back to MAP01. If you're playing a map set with a E#M# naming scheme it will boot you back to the first map in the episode you're in, so long as the episode is 1, 2, 3 or 4. If you're playing a map set that uses none of the aforementioned naming schemes, it will boot you back to the first map you played, which will usually be the first map in a map set or episode (unless you started zdoom with warp parameters or used idclev.) Loading saves won't affect this; you will be taken to the map that you first played in that saved game rather than the level you loaded the save from.

random_level_order -- setting this to "true" or 1 causes the player to be warped to a random level at the start of each level. This works with all iwad maps and all pwad mapsets using either E#M# or MAP## naming format that have the full 36 or 32 levels. Maps previously visited either while this cvar was set to true or with the "warp to random map" function will not be revisited unless all have already been visited. When all maps in a WAD have been visited and the player tries to go to a new random map, the player will be notified before the list is reset and a new (previously visited) random map is warped to. Whether the player is given a pistol start reset is up to their cvar settings.

not_supported -- set this to "true" or 1 if you're playing with a weapons mod or any mod that changes the actor names of the doom weaponry or modifies what the player starts with and is NOT listed below. You will see double screenwipes when starting from a pistol start; unfortunately this is required for compatibility.

Suppported Mods:
(All versions are current versions as of 3-22-2014)
(If one of these is being played, not_supported should be set to FALSE or 0)

Project MSX (v0.2a)
Samsara (v0.30 & v0.31)
The Russian Overkill (v2.2)
Brutal Doom (V19)
Brutal Doom Sperglord Edition (V19, 11/20/13 update)
DoomRL Arsenal (Beta 7.94)
Accessories to Murder (4-21-14 update)
FKER (v1.31)
Doomtra (v08f)
The Space Pirate (V.0.1.2e)
ProjectILE (v0.07)
Burl Tumd (8/11/13 update)
DoomCW (v1.5.1, Release)
GMOTA (V0.9)
NAZIS! (V2.11 hotfix, 6/1/2012)
Fractal Doom

All of these CVars also have Toggle keys that can be bound to a key. All are by default unbound. You can also just look at them in the controls configuration if you forget what they are and want to change them in the console without exiting the game to look them up.

There is also a key which displays the options (0-2) for disableautosave and displays the current disableautosave setting. This is unbound by default. Disableautosave must be changed in the console and can't by toggled by keypress.

There is also a function which immediately forces pistol start of the current level, this too can be bound to a key and is by default unbound.

Finally, there is a function which immediately warps the player to a random level, this too can be bound to a key and is by default unbound. Whether the player is given a pistol start reset is up to their cvar settings.

Uncompiled ACS is included in the file, so feel free to look it over and/or use it for whatever project you want

Download:
http://www.mediafire.com/download/q...art_options.zip

Last edited by scroton on 11-06-14 at 22:55

Old Post 03-13-14 01:31 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
BaronOfStuff
Senior Member


Posts: 1365
Registered: 06-08


IDCLEVxx

:/

Old Post 03-13-14 12:47 #
BaronOfStuff is online now Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Xaser
Forum Staple


Posts: 2654
Registered: 07-03


Boy, it sure is a good thing nobody's suggested any hacky workarounds that don't actually help the OP ye--

BaronOfStuff said:
IDCLEVxx

...Oh.


But in seriousness, this is indeed an outstanding ZDoom feature-gap that ought to be addressed at some point. As a for-the-record, ZDoom's behavior is there so that hubs work properly, but a cvar that disables autoload for non-hubs is still a welcome (and long-overdue) thing. Good to see a temporary better-workaround, at least.

I need to get motivation to code again. :P

Old Post 03-13-14 14:25 #
Xaser is online now Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Salt-Man Z
Junior Member


Posts: 245
Registered: 08-13


Fantastic! By default I play in continuous mode, but I've always longed for the ability to force pistol start for certain WADs (the Congestion/Claustrophobia series, for example.)

I had to look up CVARs in the ZDoom Wiki, but it looks like this sort of thing is what I'm looking for, right?
code:
gzdoom.exe -iwad doom2.wad -file 1024.zip pistol_start_options.wad +always_pistolstart 1

Old Post 03-13-14 16:38 #
Salt-Man Z is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Shadow Hog
Forum Regular


Posts: 761
Registered: 07-09


I've been kind of curious about maybe making a mapset with a "lives" feature, where dying would act like "clearing" the stage, only you get sent back to the current map with one less life (or, perhaps, you'd just respawn MP-style with one less life, I dunno). If lives were zero, you'd get punted off to some "GAME OVER" level, or maybe the first map of the current episode.

Obviously save-scumming could work around this, just as it did in Wolfenstein 3D, but there's not really a whole lot that can be done about that.

Old Post 03-13-14 16:43 #
Shadow Hog is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
scroton
Mini-Member


Posts: 67
Registered: 08-13



BaronOfStuff said:
IDCLEVxx

:/



Yeah, that works too and is what they/I were doing before. The only thing is that it gets to be a pain having to type that at every level and every time you load a game after a while. Also if you have a non-boom or non-vanilla map with wonky level names and order it can take a second to figure out which level number you are actually on.


Xaser said:
I need to get motivation to code again. :P [/B]


DO EEET


Salt-Man Z said:
Fantastic! By default I play in continuous mode, but I've always longed for the ability to force pistol start for certain WADs (the Congestion/Claustrophobia series, for example.)

I had to look up CVARs in the ZDoom Wiki, but it looks like this sort of thing is what I'm looking for, right?
code:
gzdoom.exe -iwad doom2.wad -file 1024.zip pistol_start_options.wad +always_pistolstart 1



Glad this will be getting used! And yeah, that will work perfectly. You can also enter "always_pistolstart 1" in the console in-game and it will do the same thing, including archiving the cvar for later play, and will take effect immediately.


Shadow Hog said:
I've been kind of curious about maybe making a mapset with a "lives" feature, where dying would act like "clearing" the stage, only you get sent back to the current map with one less life (or, perhaps, you'd just respawn MP-style with one less life, I dunno). If lives were zero, you'd get punted off to some "GAME OVER" level, or maybe the first map of the current episode.


Sounds fun and arcadey. You probably know what you're doing, but if you want to use/look at the acs in this feel free, the uncompiled code is there in the file.

Old Post 03-13-14 19:22 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
scroton
Mini-Member


Posts: 67
Registered: 08-13


I updated pistol start options with native support for some mods; that is, they will be handled in game like vanilla is currently and not require double screen wipes to accomplish pistol starts/pistol starts on death. I also changed not_vanilla to not_supported since it's more accurate. Shouldn't require you to remove the not_vanilla cvar from your ini, but if you're having issues try that.

Suppported Mods:
(All versions are current versions as of 3-22-2014)
(If one of these is being played, not_supported should be set to FALSE or 0)

Project MSX (v0.2a)
Samsara (v0.30 & v0.31)
The Russian Overkill (v2.2)
Brutal Doom (V19)
Brutal Doom Sperglord Edition (V19, 11/20/13 update)
DoomRL Arsenal (Beta 6 HF13)
Accessories to Murder (12-24-13 update)
FKER (v1.31)
Doomtra (v08f)
The Space Pirate (V.0.1.1 Alpha)
ProjectILE (v0.07)
Burl Tumd (8/11/13 update)
DoomCW (v1.5.1, Release)
GMOTA (V0.9)
NAZIS! (V2.11 hotfix, 6/1/2012)
Fractal Doom

NOTE: You CAN use Pistol Start Options with mods not listed above, they'll just have two screenwipes instead of one.

If you want a particular mod supported let me know and I can add it in the next version whenever I updated it again.

OP has been updated accordingly. Download link is the same.

Old Post 03-23-14 02:10 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Megamur
Senior Member


Posts: 1400
Registered: 02-11



Shadow Hog said:
I've been kind of curious about maybe making a mapset with a "lives" feature, where dying would act like "clearing" the stage, only you get sent back to the current map with one less life (or, perhaps, you'd just respawn MP-style with one less life, I dunno). If lives were zero, you'd get punted off to some "GAME OVER" level, or maybe the first map of the current episode.

Obviously save-scumming could work around this, just as it did in Wolfenstein 3D, but there's not really a whole lot that can be done about that.


I think it would be great if there was a singleplayer survival mod like this, with either standard "booted back to the start" deaths, or instant respawns (with options to lose all equipment upon death, lose half of all your ammo, lose only your currently-equipped weapon, or lose nothing except one life). Make it compatible with ScoreDoom and then we've got something really fun happening. :)

Old Post 03-23-14 02:32 #
Megamur is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
scroton
Mini-Member


Posts: 67
Registered: 08-13


Added requested feature of having the option of having it pistol start you back at the start of the episode or mapset you're currently playing upon death.

Set the CVar death_firstmap to 1 or true to use this option. This option takes precedence over death_pistolstart, so if you have both set you will end up pistol starting the earlier map rather than the map you died on.

If you're playing a map set with a MAP## naming scheme it will boot you back to MAP01. If you're playing a map set with a E#M# naming scheme it will boot you back to the first map in the episode you're in, so long as the episode is 1, 2, 3 or 4.

If you're playing a map set that uses none of the aforementioned naming schemes, it will boot you back to the first map you played, which will usually be the first map in a map set or episode (unless you started zdoom with warp parameters or used idclev.) Loading saves won't affect this; you will be taken to the map that you first played in that saved game rather than the level you loaded the save from.

OP has been updated accordingly. Download link is the same.

As always the uncompiled ACS is included in the file, so feel free to look it over and/or use it for whatever project you want

Old Post 03-31-14 05:50 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
scroton
Mini-Member


Posts: 67
Registered: 08-13


Went ahead and integrated Map_Randomizer.wad into Pistol Start Options, as well as updating it to the new Space Pirate (V.0.1.2e)

Rather than a separate file, level randomization is now handled through a new cvar:

random_level_order -- setting this to "true" or 1 causes the player to be warped to a random level at the start of each level. This works with all iwad maps and all pwad mapsets using either E#M# or MAP## naming format that have the full 36 or 32 levels. Whether the player is given a pistol start reset is up to their cvar settings.

There is also a new function which immediately warps the player to a random level, this can be bound to a key and is by default unbound. Whether the player is given a pistol start reset is up to their cvar settings.

OP has been updated accordingly. Download link is the same.

As always the uncompiled ACS is included in the file, so feel free to look it over and/or use it for whatever project you want

Old Post 05-24-14 03:31 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Darch
Member


Posts: 301
Registered: 11-11


If I remember well, Romero says in an interview that after the concept of lives was abandoned in Doom, restarting the map from pistol start was enough punishment for dying. So that's why the maps are designed to be playable from pistol start, I suppose. Nice to have this concept back.

Old Post 05-24-14 04:57 #
Darch is online now Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
scroton
Mini-Member


Posts: 67
Registered: 08-13


ZDoom Pistol Start Options has received an update. No new features, but support has been updated for DoomRL Arsenal to bring it up to DRLA Beta 7.94. It is now up to date with the current version of all mods listed as supported. There's also been some restructuring of acs and removal of redundant code to lower the amount of acs used drastically, but this part won't affect the player. OP has been updated.

Old Post 10-30-14 06:44 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
BlackFish
Forum Spammer


Posts: 4662
Registered: 06-02


This is awesome, thanks for making this!

Old Post 11-01-14 01:07 #
BlackFish is online now Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
scroton
Mini-Member


Posts: 67
Registered: 08-13


Pistol Start Options has been updated.

When a random map is now selected, maps previously visited either while this cvar was set to true or with the "warp to random map" function will not be revisited unless all have already been visited. When all maps in a WAD have been visited and the player tries to go to a new random map, the player will be notified before the list is reset and a new (previously visited) random map is warped to.

Usage of global variables has also been reduced to 2 from 7, which means greater universal compatibility.

The previous message of "DON'T PRESS ANYTHING DUMMY" after the player had died and was awaiting a pistol start on death has been replaced with "DON'T PRESS ANYTHING" and a countdown to respawn during the last 10 seconds of delay. This works regardless of how long the delay is set to.

OP has been updated with changes and new link.


BlackFish said:
This is awesome, thanks for making this!


No problem! Glad you like it/find it useful.

Old Post 11-06-14 22:55 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Brewtal_Legend
Member


Posts: 275
Registered: 08-04


This is pretty cool. I'm particularly interested in the random level order. But is there any way to make it work with a wad that has less than 36/32 levels?

A while ago I compiled all the master levels which I usually have added as an extra episode. I always wanted them to be loaded randomly when I play and from pistol start. I made them all pistol start but couldn't figure out how to make them load randomly.

I inquired on zdoom forums about random map loading but all responses I got were that it just couldn't be done. :(

Old Post 11-07-14 07:46 #
Brewtal_Legend is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
scroton
Mini-Member


Posts: 67
Registered: 08-13


Yeah, this method can work with any number of levels, the only reason I put that is because the random map function has to have the names of all the levels in an array beforehand to work, so won't work with custom map names. Though I suppose since now that the random map function won't revisit the same map it would actually be fine with ones that use the same naming scheme with less than the full map amount, since it would just return an error but you could press random map again until you got one that worked, and it wouldn't try that same map again for a while.

I can add the master levels to this if you want, just let me know if the names are the same as they appear here or if they use a different naming scheme and if you're loading them along with Doom 2 or as a separate episode.

The only limitation to this is that the random map function doesn't directly take you to a random map on exit, instead you'll first go to the normal map the map would exit to before having a screen wipe and ending up in a random level. This is only a limitation because this is a mod though, because it's not (and cannot) modify the levels directly. If someone was making a map set they could use the same method to have every level exit to another random level (or semi-random level) and it would function just like a normal map exit.

Last edited by scroton on 11-07-14 at 10:42

Old Post 11-07-14 10:31 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11379
Registered: 07-07



scroton said:
The only limitation to this is that the random map function doesn't directly take you to a random map on exit, instead you'll first go to the normal map the map would exit to before having a screen wipe and ending up in a random level. This is only a limitation because this is a mod though, because it's not (and cannot) modify the levels directly. If someone was making a map set they could use the same method to have every level exit to another random level (or semi-random level) and it would function just like a normal map exit.


Actually you can make it so that nearly any map in Doom/Boom/Heretic/Strife format will exit randomly. Add a map translator that redefine the linetypes 11, 51, 52, 124, etc. into ACS_Execute(0, "your random exit script").

Old Post 11-07-14 11:08 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
scroton
Mini-Member


Posts: 67
Registered: 08-13


Oh wow! Thanks Gez, I didn't know that existed.

This will be much better for map randomization, and I can use it for pistol start functionality too. I can even use it in another project I'm working on, and it will save me a ton of time with that.

Old Post 11-08-14 11:00 #
scroton is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 22:28. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > WADs & Mods > ZDoom Pistol Start Options

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.