ZDoom Pistol Start Options

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

ZDoom Pistol Start Options

Postby scroton » Sat Nov 29, 2014 5:11 pm

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/q8ia32e6o4g9sn7/pistol_start_options.zip
User avatar
scroton
 
Joined: 27 Apr 2013

Re: ZDoom Pistol Start Options

Postby scroton » Sat Nov 29, 2014 5:11 pm

Plans for the next version include implementing xlat map translation so randomized level order won't require a double screen wipe. Thanks to Gez for pointing this out.

Also will include single screen wipe support for PK's smooth animations, the zdoom-only PK smooth weapons mod, and Smooth Doom.

Additionally there will be a version that has a custom menu to make this easier, though one without will still be included for universal compatibility.

I'm aware since this was first released Edward850 has added pistol start on death functionality to the development builds of ZDoom; even though that was the original aim of this mod (despite it's name) this mod will continue, just that feature will get removed whenever that ends up getting added to an official release build.

If you want a mod to have native support (single screenwipes instead of the "universal compatibility" double screenwipes) just reply to this thread and I'll go ahead and add it in the next version.
User avatar
scroton
 
Joined: 27 Apr 2013

Re: ZDoom Pistol Start Options

Postby scroton » Sun May 22, 2016 10:22 pm

TL;DR updating this, seeking feature suggestions.

I'm going to be updating this guy over the next week or so in my downtime both to add some needed features and usability and bring him up to a better coding standard (I had things like manually zeroing all the values in an array rather than via loop and random strings on variable names for reasons unknown to present me) so that it is easier for myself or others to maintain (in the case I go missing again, someone should be able to update it or make their own version that is current, since nobody is around forever) and for any potential other modders that want to dig through my code and incorporate it into their own work. Right now it's such a mess that it's functionally unintentionally obfuscated code.

I am taking feature suggestions as well as suggestions/requests for weapon mod support. I will fulfill any suggestion/request so long as it doesn't break existing mod (including the universal option) compatibility or there's some technical or feasibility issue that means it can't be done.

Already planned updates/features:

--putting this guy up in a git; not sure how much help it will be but why not
--porting of every feature from this other pistol start mod
https://www.doomworld.com/vb/wads-mods/74385-pistol-start-mod-for-zdoom/
--continuing from above, menudef control of cvars but also a menudefless version so that cvars can be set in menu and then loaded with menudefless version for compatibility with mods that have their own menudef
--xlat so that when playing vanilla or a supported mod, there is only one screen wipe when using the random map feature, will will work without xlat being used, just with current two screen wipe behavior
--random map feature support for loading multiple iwads at the same time
--more choices for existing options, like toggling no repeat for random map and what happens on death
--the loadout feature from above mod for supported mods; due to feasibility it won't have the same level of management of vanilla doom, but you can set for instance a shotgun to spawn on top of you in a supported mod
--updating mod support to current versions of mods
--adding support for Legendoom, Trailblazer, Diaz, Demonsteele, Smooth Doom, and any requested mods
--Adding support for maps with custom names, which will be able to be shuffled with random map feature alongside iwad maps, please suggest some.
--single cvar which enables or disables the entire mod, goal is to be able to turn it off easily so that it can be kept in your autoload without interfering with other things
--universally compatible monster health multiplier
--possibly a universally compatible player health and armor multiplier, will have options to display increased health or display health as normal (with a hacky workaround so that you actually have the real health amount.)

As I said above, also taking suggestions/requests. If asking for compatibility please link to desired file if possible.
User avatar
scroton
 
Joined: 27 Apr 2013

Re: ZDoom Pistol Start Options

Postby Big C » Sun May 22, 2016 11:15 pm

Requesting pistol start (well, RIFLE start) mod for Faspons, por favor.
User avatar
Big C
 
Joined: 19 Oct 2010


Return to Gameplay Mods

Who is online

Users browsing this forum: Cardboard Marty, ClessxAlghazanth and 18 guests