[physfs] How to check if some files got overriden?

Sik the hedgehog sik.the.hedgehog at gmail.com
Fri Jan 2 02:44:06 EST 2015


2015-01-02 3:39 GMT-03:00, Indy Sams <indy at driftsolutions.com>:
> You can try PHYSFS_getRealDir, but a better way may be to store a hash
> of the relevant files or a unique string defined by the mod in your save
> files  so  people  can still save even with mods and it will only load
> games that match the current mod.

If you specify a new save filename in your own system/tweaks.ini then
the game will use that instead. The check is for mods that can
potentially corrupt the savegame but don't provide their own filename
(i.e. it's a safety check).

I thought about the hash thing, although that'd work mostly for
system/scenes and system/tweaks.ini (i.e. the two files), I'd still
need to see what's the deal with levels/*.sol (since it can be either
overwriting the current levels *or* adding new ones). But um, I guess
that adding new levels won't help if system/scenes isn't overwritten
as well (that file contains the level list), so I could just look at
the current scene list and see if those levels got overwritten.


More information about the physfs mailing list