Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

reallukee/cfallsave

Repository files navigation

Logo 192x192

CFallSave

License Release Language

☢️ A C/C++ library to read and write Fallout save files


CFallSave NEXT HUGE version HERE!

Summary

Introduction

Using C

#include <cfallsave.h>

int main(int argc, const char* argv[])
{
    char* saveName = "fo4.fos";

    if (!isFO4Save(saveName))
    {
        return 1;
    }

    FO4SAVE* save = readFO4Save(saveName);

    if (!isFO4SaveOpen(save))
    {
        return 1;
    }

    printFO4Save(save);

    closeFO4Save(save);

    return 0;
}

Using C++

#include <cfallsave++.hpp>

using namespace cfallsavepp;

int main(int argc, const char* argv[])
{
    string saveName = "fo4.fos";

    if (!FO4Save::isSave(saveName))
    {
        return 1;
    }

    FO4Save* save = new FO4Save(saveName);

    if (!save->isOpen())
    {
        return 1;
    }

    save->print();

    delete save;

    return 0;
}

Output

*****************
* FO4SAVE PROPS *
*****************

Game Name          : Fallout 4
Save File Name     : fo4.fos

Save Signature     : FO4_SAVEGAME
Engine Version     : 15
Save Number        : 100
Player Name        : John Fallout
Player Level       : 150
Player Location    : Commonwealth
Player Playtime    : 7g.00h.00m.7 giorni.00 ore.00 minuti
Player Race        : HumanRace
Player Sex         : 0
Player Current Xp  : 7500.000000
Player Required Xp : 0.000000
Snapshot Width     : 640
Snapshot Height    : 384
Snapshot Length    : 983040

**************************
* FO4SAVE PROP ADDRESSES *
**************************

Game Name          : Fallout 4
Save File Name     : fo4.fos

Save Signature     : 0000000000000000 0000
Engine Version     : 0000000000000016 0010
Save Number        : 0000000000000020 0014
Player Name        : 0000000000000024 0018
Player Level       : 0000000000000038 0026
Player Location    : 0000000000000042 002A
Player Playtime    : 0000000000000056 0038
Player Race        : 0000000000000094 005E
Player Sex         : 0000000000000105 0069
Player Current Xp  : 0000000000000107 006B
Player Required Xp : 0000000000000111 006F
Snapshot Width     : 0000000000000123 007B
Snapshot Height    : 0000000000000127 007F

Organization

  • .github GitHub folder
    • workflows GitHub workflows
  • .vscode Visual Studio Code folder
  • assets Project assets
  • docs Documentation
  • examples Examples
  • macos macOS build files
    • test macOS test build files
  • make Make
  • playground Test files
  • scripts Scripts
  • src C sources
    • cplusplus C++ sources
  • test Test
    • src C test sources
      • cplusplus C++ test sources
  • windows Windows build files
    • test Windows test build files

Releases

Download

Starting

1. Requirements

Linux Requirements

  • git
  • gcc
    • gcc‑i686‑linux‑gnu (For i686 building)
    • gcc-x86-64-linux-gnu (For x86_64 building)
    • gcc‑aarch64‑linux‑gnu (For aarch64 building)
  • g++
    • g++‑i686‑linux‑gnu (For i686 building)
    • g++-x86-64-linux-gnu (For x86_64 building)
    • g++‑aarch64‑linux‑gnu (For aarch64 building)
  • make

Windows Requirements

macOS Requirements

  • git
  • clang
  • clang++
  • make

2. Sources

Using git

git clone https://github.com/reallukee/cfallsave.git

Using GitHub

Download from GitHub

3. Building

Linux building

  1. Enter repository

    cd cfallsave/
  2. Build using make

    # Use ARCH=<ARCH> to change the target ARCH.
    # You can choose between:
    # * i686    (x86)
    # * x86_64  (x64)
    # * aarch64 (arm64)
    # Otherwise, make will use the same ARCH of the guest.
    
    # CFallSave
    make -f cfallsave.makefile build
    
    # CFallSave++
    make -f cfallsave++.makefile build
  3. View output

    ls bin/

Windows building

  1. Setup environment

    REM Visual Studio 2026
    CALL "%ProgramFiles%\Microsoft Visual Studio\18\Community\Common7\Tools\vsdevcmd"
    
    REM Build Tools for Visual Studio 2026
    CALL "%ProgramFiles% (x86)\Microsoft Visual Studio\18\BuildTools\Common7\Tools\vsdevcmd"
  2. Enter repository

    CD cfallsave\windows
  3. Build using msbuild

    REM CFallSave x86
    msbuild cfallsave.sln /p:Configuration=Release /p:Platform=x86 /t:cfallsave
    REM CFallSave x64
    msbuild cfallsave.sln /p:Configuration=Release /p:Platform=x64 /t:cfallsave
    REM CFallSave arm64
    msbuild cfallsave.sln /p:Configuration=Release /p:Platform=arm64 /t:cfallsave
    
    REM CFallSave++ x86
    msbuild cfallsave.sln /p:Configuration=Release /p:Platform=x86 /t:cfallsave++
    REM CFallSave++ x64
    msbuild cfallsave.sln /p:Configuration=Release /p:Platform=x64 /t:cfallsave++
    REM CFallSave++ arm64
    msbuild cfallsave.sln /p:Configuration=Release /p:Platform=arm64 /t:cfallsave++
  4. View output

    DIR bin

macOS building

  1. Enter repository

    cd cfallsave/macos/
  2. Build using make

    # CFallSave
    make -f cfallsave.makefile build
    
    # CFallSave++
    make -f cfallsave++.makefile build
  3. View output

    ls bin/

Author

License

MIT License

About

☢️ A C/C++ library to read and write Fallout save files

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published