Skip to content

A library for reading and writing to Elden Ring save files.

Notifications You must be signed in to change notification settings

ClayAmore/ER-Save-Lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

ER-Save-Lib is a library for reading and writing Elden Ring save files, compatible with PC and Playstation Save Wizard exported saves. This library is currently in alpha and is being developed alongside the new release of ER-Save-Editor.

Usage

SaveApi

Example

use er_save_lib::SaveApi;

fn main() {
   // PC
   let save_api = SaveApi::from_path("./test/ER0000.sl2");

   match save_api {
      Ok(save_api) => {
         let character_index = 0;
         save_api.set_character_name(character_index, "New Name");
         save_api.write_to_path("new/path/file_name.sl2");
      },
      Err(err) => eprintln!("{err}"),
   }
   
   
   // Playstation
   let save = SaveApi::from_path("./test/ps_save.txt");
   
   match save_api {
      Ok(save_api) => {
         let character_name = save_api.character_name();
         println!("{}", character_name);
         let bytes = save.write_to_vec();
      },
         Err(err) => eprintln!("{err}"),
      }
   }

Save

Example

use er_save_lib::Save;

fn main() {
   // PC
   let save = Save::from_path("./test/ER0000.sl2");

    match save {
        Ok(save) => {
          save.write_to_path("new/path/file_name.sl2");
        },
        Err(err) => eprintln!("{err}"),
    }


   // Playstation
   let save = Save::from_path("./test/ps_save.txt");

    match save {
        Ok(save) => {
          let bytes = save.write_to_vec();
        },
        Err(err) => eprintln!("{err}"),
    }
}

Credits

About

A library for reading and writing to Elden Ring save files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages