Skip to content

Instantly share code, notes, and snippets.

@Geneticus
Geneticus / World.cs
Last active October 6, 2025 12:45
C# class for reading Stationeers Save Game data
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@Geneticus
Geneticus / Form1.cs
Last active October 8, 2025 21:23
Open file dialogs with click event to start deserialize, transform file, and write new file.
using StationeersSpawnXML;
using StationeersStructureXMLConverter;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
@Geneticus
Geneticus / world.xsd
Created October 6, 2025 12:44
XSD for savedata generated from game dlls.
<?xml version="1.0" encoding="utf-8"?><xs:schema xmlns:tns="http://stationeers.com/world" elementFormDefault="qualified" targetNamespace="http://stationeers.com/world" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="WorldData" nillable="true" type="tns:WorldData" /><xs:complexType name="WorldData"><xs:sequence><xs:element minOccurs="0" maxOccurs="1" name="Game" type="xs:string" /><xs:element minOccurs="0" maxOccurs="1" name="GameVersion" type="xs:string" /><xs:element minOccurs="1" maxOccurs="1" name="DateTime" type="xs:long" /><xs:element minOccurs="1" maxOccurs="1" name="DaysPast" type="xs:unsignedInt" /><xs:element minOccurs="0" maxOccurs="1" name="WorldSetting" type="tns:SerializedId" /><xs:element minOccurs="0" maxOccurs="1" name="WorldName" type="xs:string" /><xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" /><xs:element minOccurs="0" maxOccurs="1" name="DifficultySetting" type="tns:SerializedId" /><xs:element minOccurs="0" maxOccurs="1" name="StartCondition" type="tns:
@Geneticus
Geneticus / WorldSettings.cs
Created October 6, 2025 18:50
Classes for Spawn Data in the WorldSettings.xml file.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@Geneticus
Geneticus / Tutorial2.xml
Created October 6, 2025 19:32
Game tutorial file
<?xml version="1.0" encoding="utf-8"?>
<GameData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<WorldSettings>
<World Hidden="false" Id="Tutorial2">
<IsTutorial Value="true"/>
<DisplayBadge xsi:nil="true" />
<IsDepreciated>false</IsDepreciated>
<Name Key="Tutorial2Title" />
<Rating Value="Tutorial" Color="Green" />
<SummaryText Key="Tutorial2Summary" />
@Geneticus
Geneticus / SourceExtraction.cs
Last active October 9, 2025 01:50
Methods for reading in Save Data.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IdentityModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@Geneticus
Geneticus / DestinationExport.cs
Last active October 8, 2025 22:49
Methods for transforming Save XML to Spawn group.
using System;
using System.Collections.Generic;
using System.Windows.Forms; // For TextBox
using System.Xml.Linq; // For XElement
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
@Geneticus
Geneticus / WorldSettings.xsd
Created October 8, 2025 01:32
Schema file for worldsettings.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://stationeers.com/data" elementFormDefault="qualified" targetNamespace="http://stationeers.com/data" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="WorldSettingData" nillable="true" type="tns:WorldSettingData"/>
<xs:complexType name="WorldSettingData">
<xs:complexContent mixed="false">
<xs:extension base="tns:DataCollection">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="IsTutorial" type="tns:BoolReference"/>
<xs:element minOccurs="1" maxOccurs="1" name="DisplayBadge" nillable="true" type="xs:boolean"/>
<xs:element minOccurs="0" maxOccurs="1" name="Description" type="tns:LocalizedStringReference"/>
@Geneticus
Geneticus / Main Form.cs
Last active October 8, 2025 22:48
New Form for Application Start.
using StationeersSpawnXML;
using StationeersStructureXMLConverter;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Linq;