Skip to content

A .NET class library to backup and restore collections in the game No Man's Sky.

License

Notifications You must be signed in to change notification settings

zencq/libNOM.collect

Repository files navigation

libNOM.collect

Maintained GitHub Actions Workflow Status Maintainability

.NET | Standard 2.0 - 2.1 | 6 - 8 C# 10 GitHub Release NuGet Version NuGet Downloads

Introduction

The libNOM label is a collection of .NET class libraries originally developed and used in NomNom, the most complete savegame editor for No Man's Sky.

libNOM.collect can be used to backup and restore all kinds of collections, like Starships and Companions, to bypass the in-game limits.

Getting Started

All commonly used formats are supported. This includes those used by goatfungus, NMS Companion, and the NMS Ship Editor/Colorizer/Customizer.

There is also a new version of the NMS Companion format that unifies the file content (including features such as marking as favorite) and adds missing entries like the customization.

Usage

Create a collection and add/remove items.

var path = "..."; // where the collection is stored
var companionCollection = new CompanionCollection(path);

// Adding a new item to the collection can be done via a JSON string or reading from a file.
var jsonString = "..."; // JSON string in one of the supported formats (depends on collection type)
companionCollection.AddOrUpdate(jsonString, libNOM.collect.Enums.FormatEnum.Kaii, out var stringCompanion);

var pathToFile = "...";
companionCollection.AddOrUpdate(pathToFile, out var fileCompanion); // format will be automatically detected

// Remove
companionCollection.Remove(fileCompanion);

Backup an item.

var json = container.GetJsonObject(); // JObject of the entire save
var format = libNOM.collect.Enums.FormatEnum.Kaii; // one of the supported formats (depends on collection type)
var path = "..."; // where the collection is stored

stringCompanion.Export(json, format, path);

License

This project is licensed under the GNU GPLv3 license - see the LICENSE file for details.

Authors

  • Christian Engelhardt (zencq) - GitHub

Credits

Thanks to the following people for their help in one way or another.

  • Dr. Kaii - Collaboration for the import/export format as well as providing some code

Dependencies