• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Module to retrieve Saved Games directory on Windows

grant

Member
CX Code Contributor
3rd Party Module Dev
3rd Party Tool Dev
Joined
Nov 19, 2019
Messages
80
This module has a function called getSavedGamesPath() that returns the "Saved Games" folder that is typically located inside the users home directory on Windows. The Saved Games folder was added in Windows Vista and is supposed to be where game save files are placed. The user can move the directory and it my be named different in different languages. My Windows XP computer recently broke, and I haven't fixed it yet, so I haven't done anything to make sure it doesn't crash on Windows XP and older. I haven't even tested Cerberus X on Windows XP either. I love old computers, so I'll probably try to fix it again. Edit: I tried running some Cerberus-X projects in an XP virtual machine, and it says they are "not a valid Win32 application". I was able to get Mojo1 and miniB3d working on a Vista virtual machine.

The function will return Null if the directory isn't found.

Demo: The included demo.cxs demonstrates the function and saves a file inside the directory.

Install: extract the zip file inside the modules_ext folder inside your Cerberus X installation folder.

License: zlib/libpng (see included license.txt)
 

Attachments

  • SavedGamesDir-module-V1.0-for-Cerberus-X-for-Windows.zip
    2.1 KB · Views: 82
Last edited:
You can just do
Code:
GetEnv("USERPROFILE") + "\Saved Games\"
and it will work.

The "Saved Games" part works as an alias. Try on Windows Explorer and type on the URL %USERPROFILE%\Saved Games\ and you'll see ;)
(Here it shows c:\users\SLotman\Saved Games which is immediately converted to c:\usuarios\SLotman\Jogos Salvos <--- pt-br)

PS: I don't think that is actually used by any game. My folder is completely empty :p

What I see being used is %USERPROFILE%\AppData\LocalLow\COMPANY_NAME\GAME_NAME or
%USERPROFILE%\Documents\COMPANY_NAME\GAME_NAME

But that will work only for current user. If you want to have a highscore table for all users in the same machine, then you have to use another folder:

%ALLUSERSPROFILE%\COMPANY_NAME\GAME_NAME
(This one is what I used on Mahjong Max, that was distributed by several publishers... and it STILL works)
 
Last edited:
Back
Top Bottom