[WIP] Surrogate Save System

Post » Wed Dec 07, 2011 12:02 pm

Ok, so here's what I've got working for the checkpoint system:
1) player changes cells
2) are we indoors? if outdoors, do nothing
3) are there any bathtubs in here? if not, is there any furniture? if not, do nothing
4) are there any NPCs in here? if so, if they're alive, enabled, and not a companion, do nothing
5) is this place already our hideout? if not, make this place our hideout (respawn point)
6) save
If it makes it to step 4 but there are NPCs, it keeps checking for NPCs in case we kill the inhabitants (or they walk out of the cell), in which case it becomes a valid checkpoint.

Ideally I'd like to also check if the dead NPCs can respawn and are hostile (having trouble with GetActorBaseFlagsLow), and add a check for doors that lead to other indoor cells (I think I'd want hideouts to be single room areas only). The bathtub/furniture check limits hideouts to (basically) non-animal-dens; generally stuff like shacks and houses count, or I guess a cave that has (or had) a human living in it.

Next up: finish the Item Save System and then spit out a beta for the universe to test.

Queue
User avatar
Sara Johanna Scenariste
 
Posts: 3381
Joined: Tue Mar 13, 2007 8:24 pm

Post » Wed Dec 07, 2011 4:12 pm

A slight setback due to a crash bug when ref walking doors (that I left a post about in the NVSE thread).

Aside from that, I added poison curing upon death to ''Dead Isn't Dead'' (dying to a dozen cazador stings left me with enough poison to die 5 or 6 more times after respawning because the poison ends up lasting so long, and that is no good), retooled the timed and checkpoint saving (so each is a single save with 3 backups) and changed outdoor timed saves from every 15 minutes to 5 minutes (by default). Oh, and fixed a bug with respawning where combat music would sometimes briefly start then end as you respawned.

Item saves are coming along; I think I'm going to have it prompt the player if they want to make a standard non-overwriting save, or an overwriting ''Item Save'' (that keeps 3 backups), or if they want to cancel using the save item. I'm not sure if I want to have an item save set a respawn checkpoint; it seems too easy to get caught in a death loop (which would be either frustrating or easily exploited), so I likely won't. I think I'll also have the item save menu offer quicksave as an option if quicksaves are disabled, and autosave as an option if all forms of autosave are disabled.

During development, the save item is currently a token (think poker chip), but I like the OP's suggestion of a holodisk, so I intend to change it over to that before release. Any suggestions on what to name the item? I'd prefer if it started with the letter S (like Save, but preferably a different word).

Queue
User avatar
benjamin corsini
 
Posts: 3411
Joined: Tue Jul 31, 2007 11:32 pm

Post » Wed Dec 07, 2011 5:44 am

Ok, so, turned the save item from a token into a holotape, or more specifically, I named them ''Synaptic Holotape'' (the S is actually a $ so it sorts to the top of the Aid section of your inventory, but with the default game font, it's hard to tell it's a $ and not an S). In the inventory, their ''EFFECTS'' is listed as ''Save Game'' and they can be used from within the Pip-boy, hotkey'd and used in real-time, dropped, stored in containers, etc. Currently, you're given 3 when the mod first loads / on a new game. They weigh 0 and are worth 0. I haven't added them to merchants yet, but when I do, they'll be dummy items that have value (I'm considering 1000 caps as their base price) that turn into the valueless version once you buy them. I'd like to make game-world holotape items, when picked up, also give you a Synaptic Holotape, like the OP suggested, but I haven't devised a cross-compatibility-friendly way to do this yet. The save item isn't consumed unless you actually choose to save (there's a ''Cancel'' option).

Once I at least get the holotapes into merchant inventories, things will be ready for a beta release. So, that should be pretty soon.

Queue
User avatar
Genocidal Cry
 
Posts: 3357
Joined: Fri Jun 22, 2007 10:02 pm

Post » Wed Dec 07, 2011 11:50 am

this sounds awesome

love these types of mods

can't wait to try it

thanks for your hard work on this
User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Wed Dec 07, 2011 11:48 am

I refined the Item Save System to improve its performance efficiency. I broke it up into 2 quests: one with a long update delay to handle giving the player the initial 3 save items and handle merchant stocking of the save items; and a second that is activated by the save item itself instead of the maintenance quest handling both duties (and therefore needing to run at a fast update delay). I'm working on the mechanism to stock merchants with the save items now.

The quest update delays wound up thusly:
Disable Save Load - 0.1 seconds
Dead Isn't Dead - 0.2 seconds
Checkpoint Save System - 1.0 second
Timed Save System - 10 seconds
Item Save System - 60 seconds

Disable Save Load, though running rapidly, only runs in MenuMode, and needs to be that fast to disable the Save and Load menus before the player can click them. It's lightweight enough code-wise that there's no performance hit regardless; I could run it every frame instead, but that's not necessary.

Dead Isn't Dead is built to be as efficient as I could, and part of that was making sure it wasn't necessary to fire every frame. Five times per second was a good balance between detecting changes in near real-time and performance. Honestly, some of its functions could be less accurate if it fired every frame.

Checkpoint Save System could probably be a little slower, but I wanted it to be responsive enough when you enter a checkpoint.

Timed Save System's update delay is fairly arbitrary; I had had it at 5 seconds originally, but timing accuracy just isn't that necessary when you're waiting ''roughly'' 5 minutes between activity. Thinking on it, I might change the update delay to be proportional to the number of minutes between saves, so a 5 minute timer between saves (the default) would mean a 5 second script update interval, 10 and 10, 15 and 15, etc. with a minimum of, let's say 1.

Item Save System's maintenance script really only performs an action once every game day, so a real-time minute between updates is fine.

Queue
User avatar
Sweets Sweets
 
Posts: 3339
Joined: Tue Jun 13, 2006 3:26 am

Post » Wed Dec 07, 2011 2:04 pm

After spending a good chunk of the evening figuring out which strategy to use to load items to the vendors, I finally found something I'm happy with, that's dirt simple, is mod-friendly, and other people could copy in the future. I've gotta wrap things up by making a vendor version of the save item that has a value and that gets converted to the valueless version once you buy it, but that can wait for tomorrow morning.

For such a simple step (putting an item onto vendors), I burned like two days working out how I was going to do it. Erg.

Queue
User avatar
Kitana Lucas
 
Posts: 3421
Joined: Sat Aug 12, 2006 1:24 pm

Post » Wed Dec 07, 2011 2:17 pm

Beta time.
http://www.gamesas.com/index.php?/topic/1249660-beta-surrogate-save-system/

Queue
User avatar
Nicholas C
 
Posts: 3489
Joined: Tue Aug 07, 2007 8:20 am

Previous

Return to Fallout: New Vegas