The Contents of a Save: Difference between revisions

From Medieval Engineers Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 32: Line 32:
{{Expandable
{{Expandable
|title=Annotated player file
|title=Annotated player file
|content=<source lang="xml"><?xml version="1.0" encoding="utf-8"?> <!-- This file is XML: don't touch -->
|content=<source lang="xml"><?xml version="1.0" encoding="utf-8"?> <!-- This file is XML: don't touch this line -->
<MyObjectBuilder_PlayerStorage xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- This is the XML schema information: don't touch -->
<MyObjectBuilder_PlayerStorage xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- This is the container for the player's storage and it specifies the XML schema information: don't touch this line -->
   <PlayerId>00000000000000000</PlayerId> <!-- Steam Account ID number. Used to tie players to their characters. -->
   <PlayerId>00000000000000000</PlayerId> <!-- Steam Account ID number. Used to tie players to their characters. -->
   <IdentityId>144115188075855873</IdentityId> <!-- Character identity ID number. Used to tie players to their in-game identities. Identities are tied to actual in-game entities. This allows for things like  
   <IdentityId>144115188075855873</IdentityId> <!-- Character identity ID number. Used to tie players to their in-game identities. Identities are tied to actual in-game entities. This allows for things like  
Line 40: Line 40:
all of the components used by the character. For example, bots don't have controllers and first person camera, but they do have AI components -->
all of the components used by the character. For example, bots don't have controllers and first person camera, but they do have AI components -->
     <EntityId>102663082422568315</EntityId> <!-- Every entity in the world has a unique ID. The character entity ID is used to tie it to the player's identity. -->
     <EntityId>102663082422568315</EntityId> <!-- Every entity in the world has a unique ID. The character entity ID is used to tie it to the player's identity. -->
     <PersistentFlags>CastShadows InScene</PersistentFlags> <!-- A standard tag that provides flags for the game engine about the entity: don't touch unless you are modding -->
     <PersistentFlags>CastShadows InScene</PersistentFlags> <!-- A standard tag that provides flags for the game engine about the entity: don't touch this line unless you are modding -->
     <PositionAndOrientation> <!-- The character's position and orientation in the world -->
     <PositionAndOrientation> <!-- The character's position and orientation in the world -->
       <Position x="-1567.5491823382526" y="2926.590176047639" z="3948.1319302078973" /> <!-- 3D position coordinates -->
       <Position x="-1567.5491823382526" y="2926.590176047639" z="3948.1319302078973" /> <!-- 3D position coordinates -->
Line 66: Line 66:
       </Component>
       </Component>
       <Component xsi:type="MyObjectBuilder_FirstPersonCameraComponent" Subtype="DefaultFirstPerson"> <!-- Default settings used by the first person camera -->
       <Component xsi:type="MyObjectBuilder_FirstPersonCameraComponent" Subtype="DefaultFirstPerson"> <!-- Default settings used by the first person camera -->
         <Pitch>0.0441527255</Pitch> <!-- -->
         <Pitch>0.0441527255</Pitch> <!-- TO DO -->
       </Component>
       </Component>
       <Component xsi:type="MyObjectBuilder_AreaInventoryAggregate" Subtype="NearbyInventories"> <!-- Settings for area inventory -->
       <Component xsi:type="MyObjectBuilder_AreaInventoryAggregate" Subtype="NearbyInventories"> <!-- Settings for area inventory -->
         <Radius>12</Radius> <!-- radius of area to scan for inventories -->
         <Radius>12</Radius> <!-- radius of area to scan for inventories -->
       </Component>
       </Component>
       <Component xsi:type="MyObjectBuilder_EntityEquipmentComponent" /> <!-- -->
       <Component xsi:type="MyObjectBuilder_EntityEquipmentComponent" /> <!-- Settings for attached equipment. Moddable but not used by the base game -->
       <Component xsi:type="MyObjectBuilder_AreaInventory" Subtype="Ground" /> <!-- -->
       <Component xsi:type="MyObjectBuilder_AreaInventory" Subtype="Ground" /> <!-- An inventory for nearby loose items -->
       <Component xsi:type="MyObjectBuilder_CharacterStatComponent"> <!-- -->
       <Component xsi:type="MyObjectBuilder_CharacterStatComponent"> <!-- This records the characters statistics -->
         <Stats> <!--  -->
         <Stats>
           <MyObjectBuilder_EntityStat Subtype="Health"> <!-- -->
           <MyObjectBuilder_EntityStat Subtype="Health"> <!-- These values are for the health bar displayed on the HUD -->
             <Value>1</Value> <!-- -->
             <Value>1</Value> <!-- The current position of the bar between 0 and MaxValue -->
             <MaxValue>1</MaxValue> <!-- -->
             <MaxValue>1</MaxValue> <!-- The maximum value possible -->
             <StatRegenAmountMultiplier>1</StatRegenAmountMultiplier> <!-- -->
             <StatRegenAmountMultiplier>1</StatRegenAmountMultiplier> <!-- Used to calculate an increase in the statistic. Gets applied every 1000 ms (1 second) while StatRegenAmountMultiplierDuration counts down-->
             <StatRegenAmountMultiplierDuration>0</StatRegenAmountMultiplierDuration> <!-- -->
             <StatRegenAmountMultiplierDuration>0</StatRegenAmountMultiplierDuration> <!-- Used to calculate an increase in the statistic. Number of seconds to apply StatRegenAmountMultiplier -->
           </MyObjectBuilder_EntityStat>
           </MyObjectBuilder_EntityStat>
           <MyObjectBuilder_EntityStat Subtype="Stamina"> <!-- -->
           <MyObjectBuilder_EntityStat Subtype="Stamina"> <!-- These values are for the stamina bar displayed on the HUD -->
             <Value>1</Value>
             <Value>1</Value>
             <MaxValue>1</MaxValue>
             <MaxValue>1</MaxValue>
Line 87: Line 87:
             <StatRegenAmountMultiplierDuration>0</StatRegenAmountMultiplierDuration>
             <StatRegenAmountMultiplierDuration>0</StatRegenAmountMultiplierDuration>
           </MyObjectBuilder_EntityStat>
           </MyObjectBuilder_EntityStat>
           <MyObjectBuilder_EntityStat Subtype="Food"> <!-- -->
           <MyObjectBuilder_EntityStat Subtype="Food"> <!-- These values are for the food bar displayed on the HUD -->
             <Value>0.465</Value>
             <Value>0.465</Value>
             <MaxValue>1</MaxValue>
             <MaxValue>1</MaxValue>
Line 94: Line 94:
           </MyObjectBuilder_EntityStat>
           </MyObjectBuilder_EntityStat>
         </Stats>
         </Stats>
         <ScriptNames> <!-- -->
         <ScriptNames> <!-- Scripts that are run by the stat component -->
           <string>MedievalStatEffect</string> <!-- -->
           <string>MedievalStatEffect</string> <!-- This is the script that controls the character's stats. -->
         </ScriptNames>
         </ScriptNames>
         <ImmunityTicks>0</ImmunityTicks> <!-- -->
         <ImmunityTicks>0</ImmunityTicks> <!-- Amount of time, in script iterations (1000 ms affected by sim speed), that the character will be immune from damage. Used when respawning to prevent immediate death. -->
       </Component>
       </Component>
       <Component xsi:type="MyObjectBuilder_CraftingComponentQueued"> <!-- -->
       <Component xsi:type="MyObjectBuilder_CraftingComponentQueued"> <!-- Information about what the character is crafting (personal crafting) -->
         <CurrentProduction xsi:nil="true" /> <!-- -->
         <CurrentProduction xsi:nil="true" /> <!-- TO DO -->
         <CurrentCrafterId>-1</CurrentCrafterId> <!-- -->
         <CurrentCrafterId>-1</CurrentCrafterId> <!-- TO DO -->
         <CurrentProductionDuration>1000</CurrentProductionDuration> <!-- -->
         <CurrentProductionDuration>1000</CurrentProductionDuration> <!-- Total amount of time required to craft the current item(s) -->
         <CurrentProductionTimeRemaining>601966224</CurrentProductionTimeRemaining> <!-- -->
         <CurrentProductionTimeRemaining>601966224</CurrentProductionTimeRemaining> <!-- Remaining time required to craft the current item(s) (progress) -->
         <ProductionQueue /> <!-- -->
         <ProductionQueue /> <!-- Queue of items being crafted. -->
       </Component>
       </Component>
       <Component xsi:type="MyObjectBuilder_QuestEntityComponent"> <!-- -->
       <Component xsi:type="MyObjectBuilder_QuestEntityComponent"> <!-- Settings for quests and research -->
         <CompletedQuest QuestSubtypeId="EconomicSmelting" CompletionTimestamp="1511722408" /> <!-- -->
         <CompletedQuest QuestSubtypeId="EconomicSmelting" CompletionTimestamp="1511722408" /> <!-- A completed quest (unlocked) -->
         ...
         ...
         <ActiveQuest Subtype="HungryBellies"> <!-- This contains the current state of the active quest. -->
         <ActiveQuest Subtype="HungryBellies"> <!-- This contains the current state of the active quest. -->
Line 113: Line 113:
         ...
         ...
         </ActiveQuest>
         </ActiveQuest>
         <IsInitialQuestChecked>true</IsInitialQuestChecked> <!-- -->
         <IsInitialQuestChecked>true</IsInitialQuestChecked> <!-- This indicates if the tutorial has been activated for this world. The settings in Game Options and MedievalEngineers.cfg will affect if
it is actually shown. -->
       </Component>
       </Component>
       <Component xsi:type="MyObjectBuilder_InventorySpawnComponent" /> <!-- -->
       <Component xsi:type="MyObjectBuilder_InventorySpawnComponent" /> <!-- TO DO -->
       <Component xsi:type="MyObjectBuilder_CombatComponent" /> <!-- -->
       <Component xsi:type="MyObjectBuilder_CombatComponent" /> <!-- TO DO -->
       <Component xsi:type="MyObjectBuilder_Inventory" Subtype="Internal"> <!-- -->
       <Component xsi:type="MyObjectBuilder_Inventory" Subtype="Internal"> <!-- The character's inventory -->
         <Item xsi:type="MyObjectBuilder_HandItem" Subtype="PickaxeIron" ItemId="4" Quantity="1" Durability="1" /> <!-- -->
         <Item xsi:type="MyObjectBuilder_HandItem" Subtype="PickaxeIron" ItemId="4" Quantity="1" Durability="1" /> <!-- An iron pickaxe (HandItem) in the inventory. Quantity should always be 1 since Durability is
         <Item xsi:type="MyObjectBuilder_BlockItem" Subtype="TimberRound10" ItemId="204" Quantity="2">
applied by stack, not per item -->
           <ObjectBuilderType>MyObjectBuilder_CubeBlock</ObjectBuilderType> <!-- -->
         <Item xsi:type="MyObjectBuilder_BlockItem" Subtype="TimberRound10" ItemId="204" Quantity="2"> <!-- A Timber 10 (BlockItem) in the inventory. -->
           <ObjectBuilderType>MyObjectBuilder_CubeBlock</ObjectBuilderType> <!-- BlockItems are different from most inventory items. They are equippable InventoryItems that represent a CubeBlock. This ObjectBuilderType tag is
how the BlockItem is linked to the CubeBlock. When it is placed on the toolbar this Type information is used to select the correct CubeBlock rather than the BlockItem. -->
         </Item>
         </Item>
         <NextItemId>482</NextItemId> <!-- -->
         <NextItemId>482</NextItemId> <!-- Each entry* in the inventory must have a unique ID. This ID simply increases every time it is used. *Inventory entries are by occupied slot, not by individual item. It's
         <InventoryFlags /> <!-- -->
probably best not to touch this value. A duplicate ID will cause a crash. -->
         <InventoryFlags /> <!-- TO DO -->
       </Component>
       </Component>
       <Component xsi:type="MyObjectBuilder_FlightComponent"> <!-- -->
       <Component xsi:type="MyObjectBuilder_FlightComponent"> <!-- Settings for flying -->
         <Enabled>false</Enabled> <!-- -->
         <Enabled>false</Enabled> <!-- True if flying is enabled. False if flying is not enabled. -->
       </Component>
       </Component>
       <Component xsi:type="MyObjectBuilder_EntityStateComponent"> <!-- -->
       <Component xsi:type="MyObjectBuilder_EntityStateComponent"> <!-- Settings about the character's current state. -->
         <CurrentState>NormalMode</CurrentState> <!-- -->
         <CurrentState>NormalMode</CurrentState> <!-- NormalMode is the only state used in the game. This component was designed to allow tools, weapons, animations, and external features to have variable behavior. Implementation of new behaviors is not planned at this time. -->
       </Component>
       </Component>
     </ComponentContainer>
     </ComponentContainer>
   </Entity>
   </Entity>
   <Toolbar> <!-- -->
   <Toolbar> <!-- A record of the character's toolbar settings -->
     <ToolbarType>Character</ToolbarType> <!-- -->
     <ToolbarType>Character</ToolbarType> <!-- Other toolbar types are used in the game but the character toolbar is the only one that is saved/loaded. Don't touch this line. -->
     <SelectedSlot xsi:nil="true" /> <!-- -->
     <SelectedSlot xsi:nil="true" /> <!-- The currently selected toolbar slot (set to none) -->
     <Slots> <!-- -->
     <Slots> <!-- List of slot assignments -->
       <Slot Index="0"> <!-- -->
       <Slot Index="0"> <!-- The first slot on toolbar 1. Slots are numbered sequentially: toolbar 1 has slots 1-9, toolbar 2 has slots 10-18, etc. -->
         <Data xsi:type="MyObjectBuilder_ToolbarItemCubeBlock">
         <Data xsi:type="MyObjectBuilder_ToolbarItemCubeBlock"> <!-- A ToolbarItemCubeBlock! Toolbars contain items (much like inventory items but stored with a different format) -->
           <DefinitionId Type="MyObjectBuilder_CubeBlock" Subtype="Windmill" />
           <DefinitionId Type="MyObjectBuilder_CubeBlock" Subtype="Windmill" /> <!-- This is where the special BlockItem information from the inventory is used. The toolbar has already converted it to a standard DefinitionId
for a cubeblock. When this slot is selected, it equips the CubeBlock rather than the BlockItem. Actions triggered by selecting a toolbar slot are controlled by the DefinitionId Type. CubeBlocks activate the cube placer. -->
         </Data>
         </Data>
       </Slot>
       </Slot>
       ...
       ...
       <Slot Index="72">
       <Slot Index="72">
         <Data xsi:type="MyObjectBuilder_ToolbarHandItem">
         <Data xsi:type="MyObjectBuilder_ToolbarHandItem"> <!-- A ToolbarHandItem! This is an equppable tool/weapon type. -->
           <DefinitionId Type="MyObjectBuilder_HandItem" Subtype="HammerIron" />
           <DefinitionId Type="MyObjectBuilder_HandItem" Subtype="HammerIron" /> <!-- Actions triggered by selecting a toolbar slot are controlled by the DefinitionId Type. HandItems equip the item on the character.  -->
           <ItemId>195</ItemId>
           <ItemId>195</ItemId> <!-- Since HandItem is an inventory Type, the toolbar slot can be linked to the inventory slot. This is how durability is linked to a particular inventory item. -->
        </Data>
      </Slot>
      <Slot Index="78">
        <Data xsi:type="MyObjectBuilder_ToolbarItemInventoryItem">
          <DefinitionId Type="MyObjectBuilder_ConsumableItem" Subtype="SoupMushroom" /> <!-- Actions triggered by selecting a toolbar slot are controlled by the DefinitionId Type. ConsumableItems are reduced in quantity
by 1 and their stat effects are sent to the CharacterStatComponent. -->
          <ItemId>190</ItemId> <!-- Since ConsumableItem's are an inventory Type, the toolbar slot can be linked to the inventory slot. This is how the quantity information is changed. -->
         </Data>
         </Data>
       </Slot>
       </Slot>
     </Slots>
     </Slots>
   </Toolbar>
   </Toolbar>
</MyObjectBuilder_PlayerStorage></source> <!--  -->
</MyObjectBuilder_PlayerStorage></source>
}}
}}



Revision as of 12:04, 1 January 2018

The Contents of a Save
Pen.pngThis article is a draft. You can help Medieval Engineers Wiki by completing it. Click to edit this page


This guide is intended to give you some basic information about what is inside of your saves. This information can be useful for a lot of reasons: restoring backups, changing world settings, editing or deleting player information, or anything else you can think of. Some extreme examples include adding planets, adding or removing grids, and modifying grids and inventories. These extreme examples won't be covered here but the information provided should help with the more reasonable ones.

Version: 0.6

Location

Path to saves

All Medieval Engineers saved data can be found inside of the AppData folder. By default this path is C:\Users\{username}\AppData\Roaming\MedievalEngineers\. This path has a Windows shortcut of %appdata%\MedievalEngineers. This folder contains Blueprints, Maps, Mods, Saves, Screenshots, ShaderCache, Storage (used by mods), Workshop Worlds, Controls configuration (key bindings), Interface configuration (used by the general search screen for now), MedievalEngineers configuration, MedievalEngineers log, VRageRender-DirectX11 log. The Saves folder is of primary interest to this guide. Inside the Saves folder you will find numbered folders that correspond to each Steam account that has been used to play Medieval Engineers on your PC. Each sub-folder of these account folders is what we refer to as a save.

Folders and Files

Inside each save folder you will find the following:

Type Name Description
Folder Backup Contains backup saves. Each backup is a full copy of the save from an earlier state. These saves are identical in structure with the exception of not having their own backup folder.
Folder Players Contains .player files. These files have information that is specific to each player who has joined the world. They are named by Steam ID.
.vx2 File(s) Voxel Modifications This is generally one file, the planet, however the option exists to have multiple files if other bodies are added. vx2 files are compressed binary files that contain changes to the voxels. Planets are generated from maps in the game files specified by the scenario, modified by the scenario if needed, and then modified by the save.
.sbc File Configuration The configuration file contains all of the settings for the world such as those specified in world settings and advanced world settings. Also contained is version information, player identities (Steam ID to character ID mapping), and general session information.
.sbs Save Data This file contains all information about the save that is not in any of the other files. This contains all bot information, session components, Houses/ranks/deplomacy, banners, decay, fast travel cooldowns, farmables, access keys, areas, spawn information, and every entity (item, grid, character) in the world.
.jpg Thumbnail A screenshot that is generated when the world is saved. This is automatically scaled to reduce file size.

Players

Each of these files contains all information relevant to a single player in the world. Not all information generated by the player is saved in this file. What is included in the file is actually determined by the game architecture in that any entity component used by the character will serialize data to this file.

Backups

Thumbnail

Configuration

Save

Voxels