[WIP] Surrogate Save System

Post » Wed Dec 07, 2011 3:10 pm

It was originally a idea thread by me, until Queue showed up and started to do some modding awesomeness.

Here's what was original idea:
While saving only in some particular locations sounds harsh, I came up with system I saw a long time ago in some Conan game - having items, that can save your game. In Conan it was some stones, but I think in New Vegas we can use holodiscs for such purpose.
So, when you picking up any holodisc with a message, you also receive "Holodisc" item in misc. section, and whem you use it, you can save game once. After one use, it disappears. Obviously there are not enough holodiscs in game world, so adding them to some vendors and\or in some leveled lists will be good.

And here what Queue doing:

"So, in order to keep things modular and scripts reusable, I've broken them apart into 5 (so far) units:
- Dead Isn't Dead
- Disable Save Load
- Checkpoint Save System
- Item Save System
- Timed Save System

They're all within one ESP file, but by unsetting ''Start game enabled'' for the quest associated with each feature, it deactivates that portion of the mod. The tentative name for the mod itself is ''Surrogate Save System'' which abbreviates handily to SSS. Alternative or Alternate Save System had an unfortunate abbreviation. -_-

''Dead Isn't Dead'' is what I've spent most the time on and what has been terribly complicated and buggy. I kept stumbling on new ways to die where I'd be stuck in a slowmo cam forever, or where I'd die twice in a row (the second time right after respawning), or where I could do things I shouldn't while dead... you get the picture.

''Disable Save Load'' simply disables quicksave, quickload, saving via the pause menu, loading via the pause menu, and loading via the continue option at the title screen. Obviously not when you first start the game, just if you exit to the main menu.

''Checkpoint Save System'' is still largely on the drawing board. I need to figure out if I want to go the route of assigned ''Hideouts'' that you'll save at, something a little more flexible like any bed you sleep in setting a checkpoint (and triggering a save), or something more player defined, like a hotkey/item that lets you assign a location as your checkpoint, but with some sort of limitations (only unoccupied interior cells, for example). Feedback on this would be appreciated.

''Item Save System'' is based on the OP's idea: you have items that you consume to trigger a save. You're given a small amount when the mod is first loaded (including on a new game), and then you need to find (aka buy) more. I'm considering also having a ''Load'' item, so that normal saving/loading can be disabled entirely (via ''Disable Save Load'') yet you wouldn't need to exit the game entirely to manually load (an automatic load upon death would still occur if ''Dead Isn't Dead'' isn't active, though).

''Timed Save System'' simply saves every 15 minutes (over a set of 4 rotating save files) while outdoors. If you're in combat when the 15 minutes hits, it waits until combat ends to trigger the save.

Queue"
User avatar
Trent Theriot
 
Posts: 3395
Joined: Sat Oct 13, 2007 3:37 am

Post » Wed Dec 07, 2011 11:51 am

Reminds me of Resident Evil: Director's Cut where you needed ink and you had to find a typewriter to save your game. It was actually brilliant for the type of game. Besides from a modding standpoint I don't think there's a possible way to stop the player from saving - if the previous TES + FO games are of any indication.

You can easily have an item force-save when consumed but I doubt you can stop the player from saving via main menu


EDIT: I released this was in the NV forums, not Skyrim :banghead:
User avatar
maria Dwyer
 
Posts: 3422
Joined: Sat Jan 27, 2007 11:24 am

Post » Wed Dec 07, 2011 12:06 pm

You might be able to edit the game's interface to remove the save menu, and disable the quick save (and load for that matter) hotkeys via script. Not sure exactly what you'd need to do with auto-saves. I think this combined with a mod that makes it where death doesn't kill you (you get knocked out, then when you come to, you've suffered some penalty, like money or item loss) could change the game pretty dramatically, where theft and death wouldn't be quick save/load affairs (what other situations prompt saving before an attempt that this would negate?). You could probably even go the Borderlands route (or many other games) where you have checkpoints and the one you most recently were near will be where you respawn after dying.

Queue

P.S. - Dandelion Me, your English is fine: better than 99% of the gibberish on the internet. Have more confidence in yourself. You even used some colloquialisms like ''gosh'' and ''gotta.''
User avatar
Multi Multi
 
Posts: 3382
Joined: Mon Sep 18, 2006 4:07 pm

Post » Wed Dec 07, 2011 5:04 pm

As far as I can tell, this is certainly doable, and it shouldn't even require the script extender thanks to the http://geck.gamesas.com/index.php/ForceSave function.

@Dandelion Me:
Were it not for your confession at the end of your post, I'd have assumed you were a native English speaker, well done!

Cipscis
User avatar
Alister Scott
 
Posts: 3441
Joined: Sun Jul 29, 2007 2:56 am

Post » Wed Dec 07, 2011 11:04 am

As far as I can tell, this is certainly doable, and it shouldn't even require the script extender thanks to the http://geck.gamesas.com/index.php/ForceSave function.

Cipscis


Would it be possible to prevent the player from saving via quicksave or the esc button? Otherwise it wouldn't do much good if the player can save without having any 'save' holodiscs.
User avatar
Rachael
 
Posts: 3412
Joined: Sat Feb 17, 2007 2:10 pm

Post » Wed Dec 07, 2011 6:14 pm

No matter what you do, that player can just open the console and type "save X" [without the quotes, and replacing X with the name of the save).

The latest version of http://www.newvegasnexus.com/downloads/file.php?id=34759 includes my One Life module, which is my way of doing away with the PC death/reload last save. This is a new module/feature that I first added to my Fallout 3 Tweaks a few weeks ago.

With my One Life module enabled: "You no longer die; instead you now pass out and are left for dead. When you finally do come to again, you discover that you have been looted. This is my own unique concept, where your character's "death" becomes a major penalty, instead of just an inconvenient reload.
Your character is revived at your last Revival Point, based on what your stats were shortly before your death (at your last OneLife save). Your Revival Point is updated periodically and your Stats are also saved in a special OneLife scripted save about every 3 real minutes (when you are not in combat), based on your Timescale, and whenever your health drops below 20%. Both are also updated shortly after loading a saved game. Note that the two are independent, which makes your revival more random (which is quite different from just reloading your last save). You are looted of your equipped weapon, equipped armor, 90% of your caps, and 50% of your Stimpaks. Your looted weapon and armor are not destroyed, but you will have buy them back from the merchant who ended up with them. It is now later, because you were unconscious for 1.8 to 6 game hours (based mostly on your character?s Endurance, but with Strength also factored in)."
User avatar
SUck MYdIck
 
Posts: 3378
Joined: Fri Nov 30, 2007 6:43 am

Post » Wed Dec 07, 2011 2:25 pm

Would it be possible to prevent the player from saving via quicksave or the esc button? Otherwise it wouldn't do much good if the player can save without having any 'save' holodiscs.
The script extender's DisableControl function can disable quicksaves, and as Queue mentioned it should be possible to edit the save menu out of the menu XML.

Like Arwen said, users will still be able to save via the console, and I don't think you'll be able to disable mods like CASM remotely, but hopefully it will be secure enough without that.

Cipscis
User avatar
Lifee Mccaslin
 
Posts: 3369
Joined: Fri Jun 01, 2007 1:03 am

Post » Wed Dec 07, 2011 5:06 pm

First of all, thanks for the compliments :blush: .
About possibilities of realisation - I thought about something like script in Doc Mitchell's house "extended" to be always active. About quicksave - not sure, but it probably can be turned off. I saw mods for Morrowind similiar to my idea (never tried them though, heard they all screwed up and you get CTD's, but still), so I don't think it can't be done for NV. The question there is - am I the only one who wants to play something like this?
No matter what you do, that player can just open the console and type "save X" [without the quotes, and replacing X with the name of the save).

Yep, after all, it's a personal thing. But as for me - I never use a consle for cheating. One thing when I play with mod that change the rules, and another when I build my own invisible rules inside of game's rules. I mean - from that point of view, every mod that makes the game harder can be easily avoided by typing "tgm", or adding the most powerful stuff via "additem".
User avatar
Ilona Neumann
 
Posts: 3308
Joined: Sat Aug 19, 2006 3:30 am

Post » Wed Dec 07, 2011 3:06 pm

One thing when I play with mod that change the rules, and another when I build my own invisible rules inside of game's rules. I mean - from that point of view, every mod that makes the game harder can be easily avoided by typing "tgm", or adding the most powerful stuff via "additem".

My sentiments exactly.

Anyhow, I at least am also interested in this idea. Like Arwen posted, her recently released ''One Life'' module to her realism mod makes you respawn upon death, instead of having to load, which covers part of this no save/load concept, but I think I'm going to take my own stab at it over the next couple days. Arwen, my biggest hang-up with yours is that I find the death penalty too heavy handed, which works well within the concepts of your mod, but is rough enough that people would still look for ways to subvert the penalty (e.g. saving and loading on their own).

Here's the plans I've been mulling over:
- When you die, you lose a percentage of the money you're carrying, depending on what your difficulty's set to, with no money lost on the easiest, gaining either 20% or 25% loss per difficulty rank above that. You'd respawn with less than full health (maybe 25% or 50%). Any broken limbs would remain broken. Radiation would be reduced to a certain maximum, in case radiation is what killed you. On hardcoe mode, hunger/thirst/sleep would be set to a preset level, so if you die from them, you will have some leeway to get them under control, but if you die with them low, that's an additional death penalty.
- When you die, you're teleported to your last visited ''Hideout'' (aka save point), which will include the player housing, safe houses, and a select few abandoned buildings that I'll have to just pick based on their location (Jean Sky Diving, for example). Without any save point visited (on a new game, or a game just adding the mod) you'd default to Doc Mitchell's house, but his house wouldn't be a ''Hideout'' you can set after having found another ''Hideout.''
- If you die in a ''Hideout'' don't impose the money loss penalty, to help counter death loops.
- Disable the Quick Save and Quick Load hotkeys.
- Disable the save menu in the main menu when not in a ''Hideout.''
- Possibly disable the load menu when not starting up the game initially. I can't think of a valid reason to allowing loading after you're up and running, since the point would be to disable save scumming.
- Leave normal autosaves intact, to counteract crashes; you can pick up from your last autosave if the game poops out on you. With loading disabled like in the aforementioned bullet point, autosaves shouldn't provide a reasonable point of save scumming.
- Have a rotation of 4 scripted save slots that are used whenever you enter a ''Hideout'' to provide some protection from save corruption instead of relying just on the autosave slot. These 4 along with autosave would be shared regardless of character loaded, so you'd need to do manual saves occasionally; unless someone can suggest a way to have a scripted save file name that's based on character name (or some other unique identifier).

The idea would be to make LOADING be more trouble than it's worth, but let SAVING not be a big issue. You want to discourage the player from save scumming, without risking their progress. In particular, pickpocketing without Quick Save/Load has to be where loading on a failed pickpocket wouldn't be worthwhile. Limiting saving would be to discourage a player restarting the game entirely just to be able to load a save.

Also, this doesn't provide a good system to handle respawning in DLC (or rather, non-vanilla) areas. I think in those, I'd just have the player be unconscious for a while, then stand back up in place. This risks a death loop, obviously... I suppose I could designate ''Hideouts'' in the DLC areas, but there's far more issues with them than in the vanilla game (for example, in Dead Money, there are at least a couple points of no return that would likely have to be accounted for).

I had also considered a stiffer ''insurance''-based death penalty, where you'd have to be carrying more money than a certain percentage value of your items, else you'd risk losing items upon death (in addition to your money), but even that idea was enough to get me thinking about ways to get around a system I, myself, will be trying to implement. The Diablo 2 style money loss sounded like enough of a loss to make me avoid death, without going through the trouble of save scumming to avoid the penalty.

Queue
User avatar
Michael Korkia
 
Posts: 3498
Joined: Mon Jul 23, 2007 7:58 pm

Post » Wed Dec 07, 2011 1:53 pm

Like Arwen posted, her recently released ''One Life'' module to her realism mod makes you respawn upon death, instead of having to load, which covers part of this no save/load concept, but I think I'm going to take my own stab at it over the next couple days. Arwen, my biggest hang-up with yours is that I find the death penalty too heavy handed, which works well within the concepts of your mod, but is rough enough that people would still look for ways to subvert the penalty (e.g. saving and loading on their own).

You have to understand that so far, I've only released what is essentially a Beta version of my One Life module (which is why I called it "experimental").
And, so far, I have received very little feedback from anyone who has tried it.
I will be refining it a bit (my NV version has better scripting than my FO3 version, which I release first). And I'll be making it a bit less harsh.
Plus the my current version of One Life is only not a stand-alone mod, since it has to address my Med-Tec module's Injuries and Needs. I may eventually release an independent version.
User avatar
louise fortin
 
Posts: 3327
Joined: Wed Apr 04, 2007 4:51 am

Post » Wed Dec 07, 2011 9:52 am

I think it's a great enough concept that I hope you do (release a stand-alone version, as well, that is). If it's not obvious, I found inspiration in your One Life module; my critique mainly came out of a desire to accomplish a (perceived) different goal with a similar system. From my perspective, I saw your One Life module as an answer to the problem of ''reloading due to death abruptly destroys suspension of disbelief'' or in other words: ''loading isn't realistic.'' I want to address the issue of ''Fallout games encourage you to save/load for random skill checks like pickpocketing'' by firstly changing the save/load system itself to discourage loading (checkpoint saves, and inconvenient loading), and the respawn-instead-of-death aspect is actually secondary to that, just to remove a situation that traditionally requires a load.

Queue
User avatar
Yvonne Gruening
 
Posts: 3503
Joined: Mon Apr 23, 2007 7:31 pm

Post » Wed Dec 07, 2011 5:39 pm

So as I've been working on my own take, a couple things I've ''discovered'' along the way:
- I can keep a tally of the number of times the player has died.
- I can keep a tally of the number of times the player has loaded (this can easily be done regardless, I had just never considered doing so before).
- GetKnockedState doesn't work on the player, or if it does, at least it never returns anything but 0 when I've tried it.
- Effects don't drop when the player is unconscious (anyone know any tricks to make an effect drop off an unconscious actor, or at least the player?).
- The game clearly wasn't meant for the player to not die (shocking, I know).

I was expecting to list more things, but the ones I didn't list are even more banol than the ones I did list, stuff having to do with the camera, player health, and action point regen. It's going well though; I'm wrapping up the ''can't die'' portion of the script, will then move on to the save/load disabling, and then to the checkpoints.

Queue

P.S. - I realize this is a far cry from Dandelion Me's original thoughts, but part of what I'm doing includes disabling easy saving/loading. Ultimately, the checkpoint saving should be easily replaced with a use-item-to-save system, and the respawn-on-death can just get the axe. I'm experimenting.
User avatar
Alexandra walker
 
Posts: 3441
Joined: Wed Sep 13, 2006 2:50 am

Post » Wed Dec 07, 2011 5:11 am

I've just about nailed the ''can't die'' part of my mod. More ''discoveries'':
- Having high dehydration, radiation, etc. when dead (but where you can't die) triggers some sort of wacky drunken stagger. As best as I can figure, this was something they had considered as an ultimate penalty, but instead changed it out for death. It seems to be hardcoded and usurps player control (and can lead to the camera spinning wildly), so took some doing to work around. EDIT - This was actually caused by the death penalty via 10000 damage spell effect. Dying to any effect caused this. Was a #@$&% to work around this issue.
- Manually changing the player's look angle via SetAngle can restart the falling unconscious animation, which is svcky.
- Even while ''dead,'' IsTurning still returns true if the player is moving the mouse right/left, but IsMoving doesn't return true.

So, onto save/load disabling. Obviously, Quicksave and Quickload are a cakewalk to disable. Normal Save and Load are proving slightly trickier, as I'd prefer to not manually edit the XML file, but instead do it via script, but...

Time to ask for help on something that seems trivial, so I hope I'm making a simple mistake.

I'm failing to access the Pause Menu (when you hit escape in-game, the menu that includes Continue, Save, Load, etc.) with the NVSE UI functions. I've worked with them pretty extensively before, and have done all sorts of crazy stuff with the HUD and Pipboy menus, but something trivial like the following isn't correct:
GetUIFloat "Pausemanu\alpha"

It returns as if that UI element doesn't exist. More specifically, ''Pausemanu'' doesn't seem to be valid, even though that's what it's named in the XML file. Has anyone worked with the UI functions and the Pause Menu before, and know what I'm missing?

Queue
User avatar
JeSsy ArEllano
 
Posts: 3369
Joined: Fri Oct 20, 2006 10:51 am

Post » Wed Dec 07, 2011 5:58 pm

"StartMenu" is used as the pause menu as well. You can disable Save and Load with:

SetUIFloat "StartMenu/NOGLOW_BRANCH/main_container/lb_item_hotrect:2/_enabled" 0SetUIFloat "StartMenu/NOGLOW_BRANCH/main_container/lb_item_hotrect:3/_enabled" 0

User avatar
Kat Stewart
 
Posts: 3355
Joined: Sun Feb 04, 2007 12:30 am

Post » Wed Dec 07, 2011 9:39 am

That One Life Module should be its own mod, that's an interesting concept.
User avatar
Breanna Van Dijk
 
Posts: 3384
Joined: Mon Mar 12, 2007 2:18 pm

Post » Wed Dec 07, 2011 8:29 am

Ok, so thanks to Pelinor, I've now got ''can't save/load'' done. I've also knocked ''respawn on death'' outta the park I think (short of playing the death music when you ''die''). That just leaves a penalty for dying, checkpoint saving and use-item-to-save saving to implement, which I'll hammer out over the next couple days.

Some of the fun stuff I wrapped up with ''respawn on death'':
- Dying to radiation/dehydration/hunger/sleep dep. was a doozy to handle.
- Dying while sitting on something was occasionally wacky.
- Dying while in first person versus third person.
- Dying with a weapon out (when you get back up, the gun will have fallen out of your hand, and in third person, when you fire, your gun shoots from where it's lying on the ground).
- The death detection misfiring when entering/exiting menus (partially my fault, but also just an issue with quest script delay).

Lesson's learned:
- DisablePlayerControls's MovementFlag can have stupid side-effects.
- There are more ways to hide the HUD than there are to detect if it's hidden.

I followed Arwen's lead with a fade-to-black on death, though I ended up using a different image space modifier. Death takes 10 seconds, then you head to respawn, then ''reviving'' takes 10 seconds, so I used DLC01AmbushFadeToBlackISFX instead of FadeToBlackPermanent because it lasts a few seconds longer.

Queue
User avatar
Trevor Bostwick
 
Posts: 3393
Joined: Tue Sep 25, 2007 10:51 am

Post » Wed Dec 07, 2011 7:32 pm

That One Life Module should be its own mod, that's an interesting concept.

I kept hoping that someone who was much better at scripting would release something like this, but I finally decided to give it a try. I do plan on releasing an independent version of my One Life mod, once I get this more finished. My released versions (for my Fallout 3 and New Vegas mods) is more of a beta. I released them so that they could be tested by someone besides me. The only reason that the current version is part of my Realism Tweaks is that, in order to make it compatible with my Med-Ted injuries and needs, it requires my mod's Core Master. Removing my Realism Tweaks' dependency will be the easy part. I have a new version about ready to release as part of my v.3.2. of my NV Tweaks.

Queue, I'm finding that the game HATES to have the death-reload interrupted (or messed with).
And that saving a Con_Save game at the last minute often results in a messed up save (which may or may not load).
So I'm now limiting my Con_Save OneLife saves to periodic saves, when you health isn't too low and when you're not in combat.

And I've reverted to my previous method, of triggering the OneLife restoration just before your HPs bottom out . . . thereby eliminating all the issues that are attached to the default death/reload. When the player dies instantly (as in taking a sudden, major HP hit), my OneLife save will be reloaded. This is still not perfect by any means, but what I now have seems to be much more stable than my previous attempt.
User avatar
Niisha
 
Posts: 3393
Joined: Fri Sep 15, 2006 2:54 am

Post » Wed Dec 07, 2011 6:10 am

Besides drowning and falling to your death, can anyone think of any other ''non-standard'' deaths? Like dying of radiation/hunger/thirst/sleep deprevation, drowning and falling deaths require special handling, and if there are other special types of death, knowing about them now could save me trouble later on.

Queue
User avatar
RUby DIaz
 
Posts: 3383
Joined: Wed Nov 29, 2006 8:18 am

Post » Wed Dec 07, 2011 6:48 pm

So, the bad news is that solving issue revolving around falling and drowning deaths set me back a couple days, but the good news is, I can share the exact formulas New Vegas uses for falling and drowning damage.

So, here goes...

Falling relies on 5 Game Settings:
fJumpFallHeightMin
fJumpFallHeightExponent
fJumpFallHeightMult
iFallLegDamageChance
fFallLegDamageMult

There are at least a couple more game settings that SEEM related to falling, but I couldn't figure out, what, if any, connection they had.
- fJumpFallHeightMin is the distance the player has to fall before they'll take any falling damage. The default is 600. If you fall exactly 600, due to rounding errors or something, you can sometimes be healed for like 0.01 health.
- fJumpFallHeightExponent is part of the falling damage formula. By default it's 1.65. I'll get to it in a sec.
- fJumpFallHeightMult is a multiplier applied to the damage. By default it's 0.025.
- iFallLegDamageChance is the chance when you take falling damage that either (or both) of your legs will be hurt. By default it's 50, meaning a 50% chance of hurting a leg when you fall. The 50% chance is rolled for each leg so you have a 25% chance of hurting neither, 25% chance for left on, 25% chance for right only, and 25% chance to hurt both.
- fFallLegDamageMult is the amount of falling damage that is also applied to a leg if it takes damage from a fall. By default this is 0.5, so if you fall for 100 damage, and a leg takes damage, it'll take 50 (100 * 0.5) damage as well.

So the formula is:
fFallingDamage = (fFallHeight - fJumpFallHeightMin) ^ fJumpFallHeightExponent * fJumpFallHeightMult
if iRandomNumber < iFallLegDamageChance
fLeftLegDamage = fFallingDamage * fFallLegDamageMult
if iRandomNumber < iFallLegDamageChance
fRightLegDamage = fFallingDamage * fFallLegDamageMult

Obviously this isn't using any proper code in particular.

Now on to drowning...

Drowning relies directly on 3 Game Settings:
fActorSwimBreathBase
fActorSwimBreathMult
fActorSwimBreathDamage

but it also depends on the player's HealRate actor value, which is determined by their Endurance actor value and a handful of Game Settings that give a certain HealRate based on Endurance.

fBreathDuration = player.GetAV HealRate * fActorSwimBreathMult + fActorSwimBreathBase

Much simpler than falling damage. fActorSwimBreathBase is 10 by default. The player will always get at least 10 seconds of air. fActorSwimBreathMult is 0.5 by default, and is multiplied by the player's HealRate, which is either 0, 5 or 10 (again, by default). So the player either gets 10, 12.5 or 15 seconds of air at 1-5, 6-8 and 9 or 10 endurance, respectively. I think I got the HealRate's right there... regardless, in a script all you'd need to do is check the player's HealRate.

Once the player starts drowning, they take their max health multiplied by fActorSwimBreathDamage (0.2 by default) damage per second.

fDrowningDamage = player.GetBaseAV Health * fActorSwimBreathDamage

However, the damage isn't dealt in one second pulses, it's dealt spread out over the course of a second, so say you're going to do damage 10 times per second to the player, you'd then divide fDrowningDamage by 10, and deal that lower amount 10 times per second. I don't know how often the game actually damages the player while drowning, but it's very often. Maybe even a little damage every frame? Regardless, without any health buffs (like from Buffout) or healing, a player will die within 5 seconds once they start drowning, since drowning damage is their max health divided by 5 (by default).

Oh, and if the player has waterbreathing or has godmode on, their remaining air is kept full / is refilled.

Why did all of this matter? If I let the engine kill the player via falling or drowning, it gets stuck in an infinite VATS cam, so I had to disable the game doing damage for falling/drowning, and do the damage to the player myself. Stupid, but that's why I figured out the exact formulas the game uses so as to imitate them precisely.

So NOW I think I've nailed ''respawn on death'' and in the interim I tied up some loose ends with ''disable save/load'' regarding exiting to the main menu. And now I can actually start on setting respawn checkpoints.

Queue
User avatar
Caroline flitcroft
 
Posts: 3412
Joined: Sat Nov 25, 2006 7:05 am

Post » Wed Dec 07, 2011 11:42 am

Simplifying the Save system could require a non standard approach. Remove all player interjection: 2 dozen separate autosaves with the character state appearing after they have crossed that threshold. Because a multi-autosave system could potentially work against exploration outdoors: set a clock also for every 45 minutes outdoors. Given the option to manually save I keep an internal chronometer ticking so as to remind myself every 20-30 minutes that I need to save; thus, making the player risk their progress a little but not totally, lends this compromise efficacy. Maybe the reason autosaves up till now were so unstable is that it's only a singular file and Gamebryo is only reliable when dealing with many save files.
p.s. not a modder, just interested in the limits of Fallout
User avatar
Noraima Vega
 
Posts: 3467
Joined: Wed Jun 06, 2007 7:28 am

Post » Wed Dec 07, 2011 5:07 am

I found another goofy bug with what I'm going to call ''Dead Isn't Dead'' from here on: if you die at the edge of or in water, and get back up, the game can fail to realize you're still in water and so it lets you walk around underwater (also it doesn't give you limited air). I didn't isolate exactly what causes it (I was more interested in a solution to the problem), but for those folks who want to be able to walk underwater (while, say, wearing power armor), it is technically possible; you'd check for the breath meter, then do terrible things to the player to trigger the engine to ''forget'' he's underwater. It has something to do with knocking him out with fatigue, setting/clearing the unconscious flag or maybe making him essential then killing him (and then standing him back up); I'm not sure exactly what was making it happen.

So, in order to keep things modular and scripts reusable, I've broken them apart into 5 (so far) units:
- Dead Isn't Dead
- Disable Save Load
- Checkpoint Save System
- Item Save System
- Timed Save System

They're all within one ESP file, but by unsetting ''Start game enabled'' for the quest associated with each feature, it deactivates that portion of the mod. The tentative name for the mod itself is ''Surrogate Save System'' which abbreviates handily to SSS. Alternative or Alternate Save System had an unfortunate abbreviation. -_-

''Dead Isn't Dead'' is what I've spent most the time on and what has been terribly complicated and buggy. I kept stumbling on new ways to die where I'd be stuck in a slowmo cam forever, or where I'd die twice in a row (the second time right after respawning), or where I could do things I shouldn't while dead... you get the picture.

''Disable Save Load'' simply disables quicksave, quickload, saving via the pause menu, loading via the pause menu, and loading via the continue option at the title screen. Obviously not when you first start the game, just if you exit to the main menu.

''Checkpoint Save System'' is still largely on the drawing board. I need to figure out if I want to go the route of assigned ''Hideouts'' that you'll save at, something a little more flexible like any bed you sleep in setting a checkpoint (and triggering a save), or something more player defined, like a hotkey/item that lets you assign a location as your checkpoint, but with some sort of limitations (only unoccupied interior cells, for example). Feedback on this would be appreciated.

''Item Save System'' is based on the OP's idea: you have items that you consume to trigger a save. You're given a small amount when the mod is first loaded (including on a new game), and then you need to find (aka buy) more. I'm considering also having a ''Load'' item, so that normal saving/loading can be disabled entirely (via ''Disable Save Load'') yet you wouldn't need to exit the game entirely to manually load (an automatic load upon death would still occur if ''Dead Isn't Dead'' isn't active, though).

''Timed Save System'' simply saves every 15 minutes (over a set of 4 rotating save files) while outdoors. If you're in combat when the 15 minutes hits, it waits until combat ends to trigger the save.

Queue
User avatar
Jessica Thomson
 
Posts: 3337
Joined: Fri Jul 21, 2006 5:10 am

Post » Wed Dec 07, 2011 9:12 am

I'm finding that the game HATES to have the death-reload interrupted (or messed with).
And that saving a Con_Save game at the last minute often results in a messed up save (which may or may not load).
So I'm now limiting my Con_Save OneLife saves to periodic saves, when you health isn't too low and when you're not in combat.

I've been fine-tuning my ''Dead Isn't Dead'' script so that it's reusable outside of just what I have planned for it. Basically, I think I've covered all the stupid screwy bugs that can happen with trying to save the player from death, but split off everything non-critical so that if another modder wanted to, they could replace the non-critical stuff with whatever they wanted to do in regards to the player dying, respawning and reviving. The OnDeath, OnRespawn and OnRevive segments of code are handled by 3 separate Quest Stage Scripts.

For example, the non-critical sections work (by my defaults) as follows:
- OnDeath reduces sleepdep/hunger/dehydration/radiation to a max of 800, starts a fade-to-black effect, and plays the death music
- OnRespawn checks if there's a valid respawn point set and teleports the player there (and removes money from the player as a penalty), otherwise does nothing
- OnRevive makes sure the fade-to-black effect has cleared, and sets the player's current health

Another modder could instead do totally different things at those three points, without having to worry about breaking the death prevention. There are some special things another modder would have to keep in mind (namely that the script flagging the player essential makes the mod uninstall-unfriendly so either the mod needs an uninstall script that the player is expected to run or the player needs to be instructed on what console command to type after removing the mod to un-essential themself, and that I had to do TERRIBLE things with some vanilla game Base Effects which is really only an issue if your mod adds new Base Effects that damage health) but otherwise, it should be quite reusable.

Also, another mod that uses the ''Dead Isn't Dead'' script packaged within their own mod (which is how I intend for it to be used) would currently collide catastrophically with any other mod that uses the same script, so I should probably set up some sort of singleton mechanic in it for safety.

Queue

P.S. - If anyone suspects I just like talking to myself in this thread, I've been using it to leave development notes for myself as I work on this. I don't really care if anyone else enjoys or detests seeing my thought processes publicly dispensed; these posts are for me to keep track of my work with the side benefit of discussion if anything piques anothers' interests.
User avatar
Sammygirl500
 
Posts: 3511
Joined: Wed Jun 14, 2006 4:46 pm

Post » Wed Dec 07, 2011 2:19 pm

@Queue

Not at all! This log of sorts that you are doing is giving me a lot of insight into things concerning scripting and gamesettings! So... thanks :D
User avatar
Shiarra Curtis
 
Posts: 3393
Joined: Thu Jan 04, 2007 3:22 pm

Post » Wed Dec 07, 2011 5:38 am

Ok so:
- I've got a singleton mechanic in for ''Dead Isn't Dead''
- have laid the foundation for the ''Checkpoint Save System'' (it defaults to your original New Game spawn position next to a bed in Doc Mitchell's house)
- have the barebones initial work done for the ''Item Save System'' (the item itself is ready, and the scripts for the system are being built up)
- consider the ''Timed Save System'' done and ready
- consider the ''Disable Save Load'' quest/script done and ready
- consider ''Dead Isn't Dead'' ready barring finding more flaws (which I've stumbled over a couple as I've gotten the ''Checkpoint Save System'' up and running)

Something I wasn't expecting: if you MoveTo the player to another cell, even if it requires a load, the loading screen doesn't show, so any running scripts won't get any cycles of MenuMode.

Humorously, the best ''effortless'' respawn point I've found so far are bathtubs. You can simply MoveTo the player to one, and he'll be lying in it, unconscious, and stand up in the center, able to hop out, without clipping issues, etc.

On the other hand, beds, chairs, couches, etc. all have issues of various sorts, so you can't (or at least shouldn't) just MoveTo the player to them. I'll likely have the ''Checkpoint Spawn System'' drop a marker or something when a checkpoint is set, but I hate doing that: I'd rather use existing resources rather than adding (invisible) clutter to the game world.

I've also brainstormed a method to disable save/load via the console, but it's very heavy-handed and would partially cripple console use, so if I do decide to implement it, it'll be optional and off by default. I figure if someone is the type of person to use the console to cheat, they're the sort who'd find the anti-instant-gratification of this mod not to their liking, and they wouldn't be using it anyway.

Queue
User avatar
Lory Da Costa
 
Posts: 3463
Joined: Fri Dec 15, 2006 12:30 pm

Post » Wed Dec 07, 2011 2:33 pm

So currently I'm actually hijacking the player's new game spawn point marker. It's only used in the initial quest (at best?), so I figure it's safe to just move around as I see fit to use it and it avoids a PlaceAtMe'd marker (or editing a cell to add a persistent marker object to use). I'm also checking new interior cells on cell change for the following two conditions to decide if it's checkpoint worthy:
1) are there any Bathtub01's or BathtubClean01's in here?
2) are there any NPCs in here? (determined via GetNumRefs 200 0 0)
If there's a bathtub and no NPCs, then it moves the checkpoint respawn marker to the bathtub and saves.

If anyone knows the technical specifics on PlaceAtMe where I could use it where whatever marker I place via it would safely (aka without leaving anything in the save file) be removed if the mod is removed, I'd love some details. I just don't want to add an object to the game world that'd persist even if the mod is removed.

This has some drawbacks, namely, there aren't bathtubs everywhere. They're mainly in houses (like in Goodsprings and Nipton) or motel rooms (like in Novac). North Vegas seems to have no bathtubs, and the little shacks and such along the freeways lack bathtubs, so I need to come up with an additional/alternative condition to check for. I also should change the NPC check to ignore dead NPCs and to ignore companions. I really want some condition that'd flag Jean Sky Diving and the Nipton Highway Patrol building as checkpoints without me having to specifically denote them as such. I suppose now that I'm using a marker, chairs, couches, beds, etc. might be safe things to use, since I would be MoveTo'ing the marker, and not the furniture.

Queue
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Next

Return to Fallout: New Vegas

cron