Add a bunch of presets and more variables to play with
This commit is contained in:
parent
a830aae9ae
commit
6b424c89af
@ -90,6 +90,10 @@ namespace rabi_splitter_WPF
|
|||||||
public readonly int ribbonXp;
|
public readonly int ribbonXp;
|
||||||
public readonly float itemPercent;
|
public readonly float itemPercent;
|
||||||
|
|
||||||
|
public readonly Tuple<int, string, string> nextHammer;
|
||||||
|
public readonly Tuple<int, string, string> nextRibbon;
|
||||||
|
public readonly Tuple<int, string, string> nextCarrot;
|
||||||
|
|
||||||
public readonly int nAttackUps;
|
public readonly int nAttackUps;
|
||||||
public readonly int nHpUps;
|
public readonly int nHpUps;
|
||||||
public readonly int nManaUps;
|
public readonly int nManaUps;
|
||||||
@ -112,6 +116,9 @@ namespace rabi_splitter_WPF
|
|||||||
hammerXp = memoryHelper.GetMemoryValue<int>(0xD654B4);
|
hammerXp = memoryHelper.GetMemoryValue<int>(0xD654B4);
|
||||||
ribbonXp = memoryHelper.GetMemoryValue<int>(0xD654B8);
|
ribbonXp = memoryHelper.GetMemoryValue<int>(0xD654B8);
|
||||||
itemPercent = memoryHelper.GetMemoryValue<float>(0xA730E8);
|
itemPercent = memoryHelper.GetMemoryValue<float>(0xA730E8);
|
||||||
|
nextHammer = StaticData.GetNextHammerLevel(hammerXp);
|
||||||
|
nextRibbon = StaticData.GetNextRibbonLevel(ribbonXp);
|
||||||
|
nextCarrot = StaticData.GetNextCarrotLevel(carrotXp);
|
||||||
|
|
||||||
minimapPosition = memoryHelper.GetMemoryValue<int>(0xA72E08);
|
minimapPosition = memoryHelper.GetMemoryValue<int>(0xA72E08);
|
||||||
|
|
||||||
|
@ -10,100 +10,212 @@ namespace rabi_splitter_WPF
|
|||||||
void ConfigureVariableExports()
|
void ConfigureVariableExports()
|
||||||
{
|
{
|
||||||
variableExportContext.DefineVariableExports(new ExportableVariable[] {
|
variableExportContext.DefineVariableExports(new ExportableVariable[] {
|
||||||
ExportVariable<int> (
|
|
||||||
handle: "playtime",
|
|
||||||
displayName: "Playtime",
|
|
||||||
tracker: () => snapshot.playtime
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<int> (
|
|
||||||
handle: "blackness",
|
|
||||||
displayName: "Blackness",
|
|
||||||
tracker: () => snapshot.blackness
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<int> (
|
|
||||||
handle: "mapid",
|
|
||||||
displayName: "Map Id",
|
|
||||||
tracker: () => snapshot.mapid
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<string> (
|
|
||||||
handle: "map",
|
|
||||||
displayName: "Map",
|
|
||||||
tracker: () => StaticData.GetMapName(snapshot.mapid)
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<int> (
|
|
||||||
handle: "musicid",
|
|
||||||
displayName: "Music Id",
|
|
||||||
tracker: () => snapshot.musicid
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<string> (
|
|
||||||
handle: "music",
|
|
||||||
displayName: "Music",
|
|
||||||
tracker: () => StaticData.GetMusicName(snapshot.musicid)
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<int> (
|
|
||||||
handle: "hp",
|
|
||||||
displayName: "HP",
|
|
||||||
tracker: () => snapshot.hp
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<float> (
|
|
||||||
handle: "amulet",
|
|
||||||
displayName: "Amulet",
|
|
||||||
tracker: () => snapshot.amulet
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<int> (
|
|
||||||
handle: "boost",
|
|
||||||
displayName: "Boost",
|
|
||||||
tracker: () => snapshot.boost
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<float> (
|
|
||||||
handle: "mana",
|
|
||||||
displayName: "MP",
|
|
||||||
tracker: () => snapshot.mana
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<int> (
|
|
||||||
handle: "stamina",
|
|
||||||
displayName: "SP",
|
|
||||||
tracker: () => snapshot.stamina
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<float> (
|
|
||||||
handle: "x",
|
|
||||||
displayName: "x",
|
|
||||||
tracker: () => snapshot.px
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<float> (
|
|
||||||
handle: "y",
|
|
||||||
displayName: "y",
|
|
||||||
tracker: () => snapshot.py
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<MapTileCoordinate> (
|
|
||||||
handle: "mapTile",
|
|
||||||
displayName: "Map Tile",
|
|
||||||
tracker: () => snapshot.mapTile
|
|
||||||
),
|
|
||||||
|
|
||||||
ExportVariable<int> (
|
ExportVariable<int> (
|
||||||
handle: "deaths",
|
handle: "deaths",
|
||||||
displayName: "Deaths",
|
displayName: "Deaths",
|
||||||
tracker: () => inGameState.nDeaths
|
tracker: () => inGameState == null ? 0 : inGameState.nDeaths
|
||||||
),
|
),
|
||||||
|
|
||||||
ExportVariable<int> (
|
ExportVariable<int> (
|
||||||
handle: "restarts",
|
handle: "restarts",
|
||||||
displayName: "Restarts",
|
displayName: "Restarts",
|
||||||
tracker: () => inGameState.nRestarts
|
tracker: () => inGameState == null ? 0 : inGameState.nRestarts
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "currentBoss",
|
||||||
|
displayName: "Current Boss Fight",
|
||||||
|
tracker: () => (inGameState == null || !inGameState.CurrentActivityIs(InGameActivity.BOSS_BATTLE)) ?
|
||||||
|
"None" :
|
||||||
|
inGameState.currentBossFight.displayName
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<TimeSpan> (
|
||||||
|
handle: "currentBossTime",
|
||||||
|
displayName: "Current Boss Time",
|
||||||
|
tracker: () => (inGameState == null || !inGameState.CurrentActivityIs(InGameActivity.BOSS_BATTLE)) ?
|
||||||
|
TimeSpan.Zero :
|
||||||
|
(DateTime.Now - inGameState.currentBossStartTime)
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "lastBoss",
|
||||||
|
displayName: "Last Boss Fight",
|
||||||
|
tracker: () => inGameState?.lastBossFight == null ? "None" : inGameState.lastBossFight.displayName
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<TimeSpan> (
|
||||||
|
handle: "lastBossTime",
|
||||||
|
displayName: "Last Boss Time",
|
||||||
|
tracker: () => inGameState?.lastBossFight == null ? TimeSpan.Zero : inGameState.lastBossFightDuration
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "musicid",
|
||||||
|
displayName: "Music Id",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.musicid
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "music",
|
||||||
|
displayName: "Music",
|
||||||
|
tracker: () => snapshot == null ? "" : StaticData.GetMusicName(snapshot.musicid)
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "mapid",
|
||||||
|
displayName: "Map Id",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.mapid
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "map",
|
||||||
|
displayName: "Map",
|
||||||
|
tracker: () => snapshot == null ? "" : StaticData.GetMapName(snapshot.mapid)
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "mapTile",
|
||||||
|
displayName: "Map Tile",
|
||||||
|
tracker: () => snapshot == null ? "" : snapshot.mapTile.ToString()
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "hp",
|
||||||
|
displayName: "HP",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.hp
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "maxhp",
|
||||||
|
displayName: "Max HP",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.maxhp
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<float> (
|
||||||
|
handle: "itempercent",
|
||||||
|
displayName: "Item %",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.itemPercent
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "hammerXp",
|
||||||
|
displayName: "Hammer Exp",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.hammerXp
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "nextHammerExp",
|
||||||
|
displayName: "Next Hammer Level Exp",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.nextHammer.Item1
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "nextHammerName",
|
||||||
|
displayName: "Next Hammer Level Name (Short)",
|
||||||
|
tracker: () => snapshot == null ? "" : snapshot.nextHammer.Item2
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "nextHammerNameLong",
|
||||||
|
displayName: "Next Hammer Level Name (Long)",
|
||||||
|
tracker: () => snapshot == null ? "" : snapshot.nextHammer.Item3
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "ribbonXp",
|
||||||
|
displayName: "Ribbon Exp",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.ribbonXp
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "nextRibbonExp",
|
||||||
|
displayName: "Next Ribbon Level Exp",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.nextRibbon.Item1
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "nextRibbonName",
|
||||||
|
displayName: "Next Ribbon Level Name (Short)",
|
||||||
|
tracker: () => snapshot == null ? "" : snapshot.nextRibbon.Item2
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "nextRibbonNameLong",
|
||||||
|
displayName: "Next Ribbon Level Name (Long)",
|
||||||
|
tracker: () => snapshot == null ? "" : snapshot.nextRibbon.Item3
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "carrotXp",
|
||||||
|
displayName: "Carrot Exp",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.carrotXp
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "nextCarrotExp",
|
||||||
|
displayName: "Next Carrot Level Exp",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.nextCarrot.Item1
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "nextCarrotName",
|
||||||
|
displayName: "Next Carrot Level Name (Short)",
|
||||||
|
tracker: () => snapshot == null ? "" : snapshot.nextCarrot.Item2
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<string> (
|
||||||
|
handle: "nextCarrotNameLong",
|
||||||
|
displayName: "Next Carrot Level Name (Long)",
|
||||||
|
tracker: () => snapshot == null ? "" : snapshot.nextCarrot.Item3
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<float> (
|
||||||
|
handle: "amulet",
|
||||||
|
displayName: "Amulet",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.amulet
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "boost",
|
||||||
|
displayName: "Boost",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.boost
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<float> (
|
||||||
|
handle: "mana",
|
||||||
|
displayName: "MP",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.mana
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "stamina",
|
||||||
|
displayName: "SP",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.stamina
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<float> (
|
||||||
|
handle: "x",
|
||||||
|
displayName: "x",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.px
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<float> (
|
||||||
|
handle: "y",
|
||||||
|
displayName: "y",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.py
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "playtime",
|
||||||
|
displayName: "Playtime",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.playtime
|
||||||
|
),
|
||||||
|
|
||||||
|
ExportVariable<int> (
|
||||||
|
handle: "blackness",
|
||||||
|
displayName: "Blackness",
|
||||||
|
tracker: () => snapshot == null ? 0 : snapshot.blackness
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,50 @@ namespace rabi_splitter_WPF
|
|||||||
|
|
||||||
public VariableExportContext()
|
public VariableExportContext()
|
||||||
{
|
{
|
||||||
_variableExportSettings = new List<VariableExportSetting>();
|
_variableExportSettings = DefaultVariableExportSettings();
|
||||||
_variables = new List<ExportableVariable>();
|
_variables = new List<ExportableVariable>();
|
||||||
variableValues = new Dictionary<string, object>();
|
variableValues = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<VariableExportSetting> DefaultVariableExportSettings()
|
||||||
|
{
|
||||||
|
return new List<VariableExportSetting>
|
||||||
|
{
|
||||||
|
new VariableExportSetting() {
|
||||||
|
OutputFileName = "deaths_restarts.txt",
|
||||||
|
OutputFormat = "Deaths: {deaths}\nRestarts: {restarts}"
|
||||||
|
},
|
||||||
|
new VariableExportSetting() {
|
||||||
|
OutputFileName = "map.txt",
|
||||||
|
OutputFormat = "Map: {map}\nTile: {mapTile}"
|
||||||
|
},
|
||||||
|
new VariableExportSetting() {
|
||||||
|
OutputFileName = "music.txt",
|
||||||
|
OutputFormat = "Music: {music}"
|
||||||
|
},
|
||||||
|
new VariableExportSetting() {
|
||||||
|
OutputFileName = "currentboss.txt",
|
||||||
|
OutputFormat = "Current Boss: {currentBoss}\nTime: {currentBossTime:mm\\:ss\\.ff}"
|
||||||
|
},
|
||||||
|
new VariableExportSetting() {
|
||||||
|
OutputFileName = "lastboss.txt",
|
||||||
|
OutputFormat = "Last Boss: {lastBoss}\nTime: {lastBossTime:mm\\:ss\\.ff}"
|
||||||
|
},
|
||||||
|
new VariableExportSetting() {
|
||||||
|
OutputFileName = "hammer.txt",
|
||||||
|
OutputFormat = "Hammer: {hammerXp}/{nextHammerExp}\nNext: {nextHammerNameLong}"
|
||||||
|
},
|
||||||
|
new VariableExportSetting() {
|
||||||
|
OutputFileName = "ribbon.txt",
|
||||||
|
OutputFormat = "Hammer: {ribbonXp}/{nextRibbonExp}\nNext: {nextRibbonNameLong}"
|
||||||
|
},
|
||||||
|
new VariableExportSetting() {
|
||||||
|
OutputFileName = "carrot.txt",
|
||||||
|
OutputFormat = "Hammer: {carrotXp}/{nextCarrotExp}\nNext: {nextCarrotNameLong}"
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
#region Update Logic
|
#region Update Logic
|
||||||
|
|
||||||
public void UpdateVariables(bool updateFile)
|
public void UpdateVariables(bool updateFile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user