Excluding certain savegames after FillDirSaveGameList is called (Suggestion)

Started by Dualnames, Mon 09/03/2009 16:21:40

Previous topic - Next topic

Dualnames

I'm having types of save games handled by my game for certain occasions, that I don't want them to appear in the savegame list.

One of them is:
Name:
"System-RestartPoint"
Slot:
52

I use function FillSaveListDir, to fill a list with savegames. How to exclude for example System restart point from appearing? I'm using AGS 3.1.2. If I forgot something really important, I apologize.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

thezombiecow

I might be missing something in your original post here, but if your system restore is always guaranteed being saved to slot 52, can you call:

Code: ags
yourSaveList.RemoveItem(52);


... immediately after filling the list?

??

EDIT: as I understand it, RemoveItem() doesn't delete any files, it simply removes it from a list...

GarageGothic

"FillSaveListDir"? Do you mean FillSaveGameList? Anyway, what works for me is to simply use high numbers for those special savegame slots (I use 100+, but actually I thought anything above 50 should be safe which doesn't seem to be the case). These shouldn't show up when filling the list. I wouldn't recommend removing entries manually as I think this could mess up the SelectedIndex references.

Trent R

If he doesn't have SelectedIndex stored anywhere, he can set it to -1 after the RemoveItem call.


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Pumaman

Save game slot numbers above 100 will not be shown by FillSaveGameList, so use a slot number in the range 101-900 instead.

Dualnames

Quote from: GarageGothic on Mon 09/03/2009 17:53:30
"FillSaveListDir"? Do you mean FillSaveGameList? Anyway, what works for me is to simply use high numbers for those special savegame slots (I use 100+, but actually I thought anything above 50 should be safe which doesn't seem to be the case). These shouldn't show up when filling the list. I wouldn't recommend removing entries manually as I think this could mess up the SelectedIndex references.

It does cause a mess. I guess CJ gave the best answer...thanks a lot, once again.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

GarageGothic

Not sure CJ will check this thread again. But actually, what would be great would be  if you could supply FillSaveGameList with an optional range parameter. That way you could for instance use FillSaveGameList(40) for your save game menu but FillSaveGameList(50) for your restore game menu so it would also display special savegames like autosave and quicksave (correctly ordered by save time) without risking the player overwriting them.

Dualnames

Quote from: GarageGothic on Tue 10/03/2009 11:48:02
Not sure CJ will check this thread again. But actually, what would be great would be  if you could supply FillSaveGameList with an optional range parameter. That way you could for instance use FillSaveGameList(40) for your save game menu but FillSaveGameList(50) for your restore game menu so it would also display special savegames like autosave and quicksave (correctly ordered by save time) without risking the player overwriting them.

Nice one there, I was thinking of a function similar to that, but well, yours appears to be really easy to use as well.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk