Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Death penalties bug #14

Open
Hexaae opened this issue Nov 12, 2022 · 21 comments
Open

Death penalties bug #14

Hexaae opened this issue Nov 12, 2022 · 21 comments

Comments

@Hexaae
Copy link

Hexaae commented Nov 12, 2022

I've just learned from manual of original game (see Lives paragraph) after you die you should restart current level with pistol only and 8 shots, and "you'll also lose the points you obtained on that level"... Doesn't seem to be the case at E1L0 (secret purple level).

To sum up in general E1L0 has some issues when you die: lives get reset to 3 and you won't lose weapons...

@Hexaae
Copy link
Author

Hexaae commented Nov 12, 2022

Tested normal E1L2 and found the same issues: lives get reset to 3 when you die, and you won't lose weapons.
See #8 (comment)

@Hexaae
Copy link
Author

Hexaae commented Nov 12, 2022

Tested original DOS game and indeed even at E1L2 if you die you'll restart with pistol + 8 bullets only.
Confirmed also the fact that in the original DOS, ESC gets disabled while you die with red screen fizzle effect (a clever workaround to avoid issues with New Game while you die)...

@AFADoomer
Copy link
Owner

Ugh. It works properly only on map 1. sigh

Also: ESC cannot be disabled in GZDoom. It's checked for in native code that runs before anything that I can do with ZScript would be called.

@Hexaae
Copy link
Author

Hexaae commented Nov 13, 2022

ESC:
mmmh, other possible ideas for workarounds: can you temporarily disable some menu options, like New Game and Save Game maybe?

@AFADoomer
Copy link
Owner

The incorrect life behavior part of restarting a new game while dead should be fixed now...

I just pushed more fixes for death resets in ef5e4bf...

@Hexaae
Copy link
Author

Hexaae commented Nov 13, 2022

Mmmh, reached E1L2 with 4 lives, died and restarted with 4 lives :(

@AFADoomer
Copy link
Owner

Can you set the 'disableautosave' cvar to 1 and try again?

@Hexaae
Copy link
Author

Hexaae commented Nov 13, 2022

Done and started a new game from scratch. E1L2 with 4 lives, died and decreased correctly to 3, but pistol had 0 bullets.

@Hexaae
Copy link
Author

Hexaae commented Nov 13, 2022

A scripted autosave is required anyway when you reach a new level IMHO. I think it was normal behaviour of the original game.
Another play: saved game at E1L1, completed E1L1 to E1L2. Died at E1L2. The game restated at E1L1 last savegame (!?)

@Hexaae
Copy link
Author

Hexaae commented Nov 13, 2022

There are three situations to check:

  1. E1L1, save game and complete level. Die at E1L2 and test what happens. Then die again and see what happens.
  2. E1L1 and complete level. Die at E1L2 ans see what happens.
  3. E1L1. Die at least once. Complete level and see what happens loading new level.

@AFADoomer
Copy link
Owner

OK, I think this is as fixed as it will get as of ad603e6.

If you never save manually, then the life counter works as expected - it will decrement when you die, and stay that way when you respawn, plus all of your weapons/ammo/other inventory will be reset (and the screen will fade in from red).

If you save manually, that save point will be used when you respawn, just as if you had reloaded manually - in this case, the save is loaded normally, so your life counter won't stay decremented and your weapons won't be stripped (and you won't get a fade-in from red).

If you save manually in one level, then finish the map, the next level will decrement everything normally (until/unless you save manually again)

This all depends on the 'disableautosaves' cvar being '0'.

@Hexaae
Copy link
Author

Hexaae commented Nov 14, 2022

If you save manually, that save point will be used when you respawn, just as if you had reloaded manually

Nice. Can this be changed (or optional) to be closer to the original: you die, you respawn with penalties from the beginning of current level, always ignoring last savegame? For purists 😇

@AFADoomer
Copy link
Owner

The behavior is hard-coded in GZDoom, unfortunately. When you save a game, that save game's name is saved and blindly/automatically used as the reload map when you die, with no options for configuring the behavior.

@Hexaae
Copy link
Author

Hexaae commented Nov 14, 2022

Mmmh... I see...

Just experienced something strange BTW: saved game at E1L1, finished the level. Died at E1L2 and the game reloaded E1L1 savegame :( Can't be forced to restart/reset current level instead of following std GZDoom behavior (i.e. before it kicks in)?
Something like: fizzle death seq, then scripted forced restart level, before GZDoom routines kick in.

@Hexaae
Copy link
Author

Hexaae commented Nov 14, 2022

Another case: completed E1L1 with 2 lives left. E1L2 started with 3 lives.

@AFADoomer
Copy link
Owner

AFADoomer commented Nov 14, 2022

Just experienced something strange BTW...

Check your 'disableautosave' CVar value. It needs to be set to zero.

Another case: completed E1L1 with 2 lives left. E1L2 started with 3 lives.

Are you sure that you didn't get over 40000 points in bonus, which would give you a life?

@Hexaae
Copy link
Author

Hexaae commented Nov 14, 2022

You're right for both things :) It works as expected with disableautosave=0 (Always in Misc options?)

Is it possible to force reset current level after red screen when you die using a script, instead of GZDoom behavior auto-loading last save (in current level)?

@AFADoomer
Copy link
Owner

No, not without losing all points and saved level stats (so the end of game tally screen would be wrong)

@Hexaae
Copy link
Author

Hexaae commented Nov 20, 2022

Mmmh, ok. So this can't be exactly the same of the original game. All right, after all everybody reloads the last quick-save indeed when dies...
P.S.
Can this feature (disable auto-load of last quicksave) be asked in the official GZDoom forum/github? Maybe they can implement it...

@AFADoomer
Copy link
Owner

Requested feature here. We'll see if anything comes of it...

@nashmuhandes
Copy link
Contributor

Requested feature here. We'll see if anything comes of it...

Should be trivial to add to the engine, I'll see what I can do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants