Rogue Legacy Wiki
(Added linux path for saved games.)
Tags: Visual edit apiedit
Tags: Visual edit apiedit
Line 14: Line 14:
 
{
 
{
 
int32_t Gold;9000000
 
int32_t Gold;9000000
int32_t CurrentHealth;1000
+
int32_t CurrentHealth;15000
 
int32_t CurrentMana;1000
 
int32_t CurrentMana;1000
 
int8_t Age;30
 
int8_t Age;30

Revision as of 18:00, 20 March 2017

On windows systems save games are located in:

  • %UserProfile%\Documents\SavedGames\RogueLegacy\RogueLegacyStorageContainer\AllPlayers

On linux saves appear to be located in:

  • ~/.local/share/RogueLegacy/RogueLegacyStorageContainer/AllPlayers

The save game is split up into 5 different files:

  • RogueLegacyBP.rcdat - Player Upgrade data
  • RogueLegacyLineage.rcdat - Lineage data
  • RogueLegacyMap.rcdat - Contains minimap information (which rooms are fairy rooms, diary rooms, etc.)
  • RogueLegacyMapData.rcdat - Contains the objects/enemies/chests in each room of the castle
  • RogueLegacyPlayer.rcdat - Player information (traits, equipment, runes)

RogueLegacyPlayer.rcdat

 struct RogueLegacyPlayer
 {
 int32_t Gold;9000000
 int32_t CurrentHealth;15000
 int32_t CurrentMana;1000
 int8_t  Age;30
 int8_t  ChildAge;20
 int8_t  Spell;       // enum "SpellType"
 int8_t  Class;       // enum "ClassType"
 int8_t  SpecialItem; // enum "SpecialItem"
 int8_t  Trait[2];    // enum "Trait"
 int8_t  LengthName;
 char*   Name;
 int8_t  HeadPiece;
 int8_t  ShoulderPiece;
 int8_t  ChestPiece;
 int8_t  DiaryEntry;
 int32_t BonusHealth;
 int32_t BonusStrength;
 int32_t BonusMana;
 int32_t BonusDefense;
 int32_t BonusWeight;
 int32_t BonusMagic;
 int32_t LichHealth;
 int32_t LichMana;
 float   LichHealthMod;
 bool NewBossBeaten;
 bool    EyeballBossBeaten;
 bool    FairyBossBeaten;
 bool    FireballBossBeaten;
 bool    BlobBossBeaten;
 bool    LastbossBeaten;
 int32_t TimesCastleBeaten;
 int32_t NumEnemiesBeaten;
 bool    TutorialComplete;
 bool    CharacterFound;
 bool    LoadStartingRoom;
 bool    LockCastle;
 bool    SpokeToBlacksmith;
 bool    SpokeToEnchantress;
 bool    SpokeToArchitect;
 bool    SpokeToTollCollector;
 bool    IsDead;
 bool    FinalDoorOpened;
 bool    RerolledChildren;
 bool    IsFemale;
 int32_t TimesDead;
 bool    HasArchitectFree;
 bool    ReadLastDiary;
 bool    SpokenToLastBoss;
 bool    HardcoreMode;
 float   TotalHoursPlayed;
 int8_t  WizardSpellList[3];

 // 4 difficulties, 34 different kinds of mobs
 int8_t  EnemiesBeaten[4][34];
 int32_t NumTypesEnemiesKilled;

 // Key value pairs. Key = mobID killed, Value = count
 int32_t TypesEnemiesKilled[NumTypesEnemiesKilled][2];
};
enum SpecialItem
{
00=None
01=CharonObal
02=HedgehogCurse
03=HyperionRing
04=HermesBoots
05=HeliosBlessing
06=CalypsosCompass
08=NerdyGlasses
09=Khidr's Obol
0A=Alexander's Obol
0B=Ponce de Leon's Obol
0C=Herodotus's Obol
0D=Traitor's Obol
};

enum SpellType
{
00=None
01=Dagger
02=Axe
03=TimeBomb
04=TimeStop
05=Crow Storm
06=Translocator
07=Displacer (teleport)
08=Chakram
09=Scythe
0A=Blade Wall
0B=Flame Shield
0C=Conflux
0D=DragonFire
0E=Traitor Daggers
0F=Dragon fire (big, fast)

};

enum ClassType
{
00=Knight
01=Mage
02=Barbarian
03=Knave
04=Shinobi
05=Miner
06=Spellthief
07=Lich
08=Paladin
09=Archmage
0A=Barbarian King
0B=Assassin
0C=Hokage
0D=Spelunker
0E=SpellSword
0F=Lich King
10=Dragon
11=Traitor
};

enum Trait
{
00=None
01=ColorBlind
02=Gay
03=NearSighted
04=FarSighted
05=Dyslexia
06=Gigantism
07=Dwarfism
08=Baldness
09=Endomorph
0A=Ectomorph
0B=Alzheimers
0C=Dextrocardia
0D=Tourettes
0E=Hyperactive
0F=OCD
10=Hypergonadism
11=Hypogonadism
12=StereoBlind
13=IBS
14=Vertigo
15=TunnelVision
16=Ambilevous
17=PAD
18=Alektorophobia
19=Hypochondriac
1A=Dementia
1B=Hypermobility
1C=EideticMemory
1D=Nostalgic
1E=CIP
1F=Savant
20=The One
21=Clumsy
22=EHS
23=Glaucoma
Adopted = 100
};

RogueLegacyLineage.rcdat

struct RogueLegacyLineage
{
	int32_t NumCurrentBranch;
	PlayerLineageData Branch[NumCurrentBranch];
	int32_t NumLineage;
	FamilyTreeNode Lineage[NumLineage];
};

struct PlayerLineageData
{
	int8_t NameLength;
	char*  Name;
	int8_t Spell;
	int8_t Class;
	int8_t HeadPiece;
	int8_t ChestPiece;
	int8_t ShoulderPiece;
	int8_t Age;
	int8_t ChildAge;
	int8_t Trait[2];
	bool   IsFemale;
};

struct FamilyTreeNode
{
	int8_t  NameLength;
	char*   Name;
	int8_t  Age;
	int8_t  Class;
	int8_t  HeadPiece;
	int8_t  ChestPiece;
	int8_t  ShoulderPiece;
	int32_t NumEnemiesBeaten;
	bool    BeatenABoss;
	int8_t  Trait[2];
	bool    IsFemale;	
};

RogueLegacyBP

struct RogueLegacyBP
{
	// 5 categories - 15 items each category
	// See enum "EquipmentState"
	int8_t Blueprints[5][15];

	// 5 categories - 11 runes each category
	// See enum "EquipmentState"
	int8_t Runes[5][11];
	
	// Can't be more specific than this yet
	int8_t EquippedArray[5];
	int8_t EquippedRunes[5];

        // See enum "SkillType"
 	int32_t ManorSkillLevels[32];
};

enum EquipmentState
{
	NotFound,
	FoundButNotSeen,
	FoundAndSeen,
	Purchased
};

enum SkillType
{
	Health_Up,max
	Invuln_Time_Up,max
	Death_Dodge,max
	Attack_Up,max
	Down_Strike_Up,max
	Crit_Chance_Up,max
	Crit_Damage_Up,max
	Magic_Damage_Up,max
	Mana_Up,max
	Mana_Cost_Down,max
	Smithy,max
	Enchanter,max
	Architect,max
	Equip_Up,max
	Armor_Up,max
	Gold_Gain_Up,max
	Prices_Down,max
	Potion_Up,max
	Randomize_Children,max
	Lich_Unlock,max
	Banker_Unlock,max
	Spellsword_Unlock,max
	Ninja_Unlock,max
	Knight_Up,max
	Mage_Up,max
	Assassin_Up,max
	Banker_Up,max
	Barbarian_Up,max
	Lich_Up,max
	Ninja_Up,max
	SpellSword_Up,max
	SuperSecret
}