Add option to don't split on reload during boss fights. Experimental.
(1.75 only. I don't have the addresses for older versions)
This commit is contained in:
parent
fc01b9cb29
commit
b1405598bb
@ -140,6 +140,7 @@ namespace rabi_splitter_WPF
|
|||||||
private bool _aliusI;
|
private bool _aliusI;
|
||||||
private bool _tm2;
|
private bool _tm2;
|
||||||
private bool _irisu1;
|
private bool _irisu1;
|
||||||
|
private bool _dontSplitOnReload;
|
||||||
private bool _debugArea;
|
private bool _debugArea;
|
||||||
private int _serverPort;
|
private int _serverPort;
|
||||||
private string _gameVer;
|
private string _gameVer;
|
||||||
@ -245,6 +246,17 @@ namespace rabi_splitter_WPF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool DontSplitOnReload
|
||||||
|
{
|
||||||
|
get { return _dontSplitOnReload; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == _dontSplitOnReload) return;
|
||||||
|
_dontSplitOnReload = value;
|
||||||
|
OnPropertyChanged(nameof(DontSplitOnReload));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool DebugArea
|
public bool DebugArea
|
||||||
{
|
{
|
||||||
get { return _debugArea; }
|
get { return _debugArea; }
|
||||||
@ -318,6 +330,7 @@ namespace rabi_splitter_WPF
|
|||||||
public int lastmoney;
|
public int lastmoney;
|
||||||
public int lastmapid;
|
public int lastmapid;
|
||||||
public int lastmusicid;
|
public int lastmusicid;
|
||||||
|
public int lastplaytime = 0;
|
||||||
public bool bossbattle;
|
public bool bossbattle;
|
||||||
public List<int> lastbosslist;
|
public List<int> lastbosslist;
|
||||||
public int lastnoah3hp;
|
public int lastnoah3hp;
|
||||||
@ -335,6 +348,7 @@ namespace rabi_splitter_WPF
|
|||||||
this.AliusI = true;
|
this.AliusI = true;
|
||||||
this.Tm2 = true;
|
this.Tm2 = true;
|
||||||
this.Irisu1 = true;
|
this.Irisu1 = true;
|
||||||
|
this.DontSplitOnReload = false;
|
||||||
this.DebugArea = false;
|
this.DebugArea = false;
|
||||||
this.ServerPort = 16834;
|
this.ServerPort = 16834;
|
||||||
this.Igt = true;
|
this.Igt = true;
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
<CheckBox Content="Ignore the "M.R." (Reload on Noah 1)" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding Noah1Reload, Mode=TwoWay}" IsEnabled="{Binding AutoReset, Converter={StaticResource InverseBooleanConverter},Mode=TwoWay}"/>
|
<CheckBox Content="Ignore the "M.R." (Reload on Noah 1)" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding Noah1Reload, Mode=TwoWay}" IsEnabled="{Binding AutoReset, Converter={StaticResource InverseBooleanConverter},Mode=TwoWay}"/>
|
||||||
<CheckBox Content="Split when Town Member +2 or Nixie despawns" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding Tm2, Mode=TwoWay}"/>
|
<CheckBox Content="Split when Town Member +2 or Nixie despawns" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding Tm2, Mode=TwoWay}"/>
|
||||||
<CheckBox Content="Ignore Irisu Phase 1" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding Irisu1, Mode=TwoWay}"/>
|
<CheckBox Content="Ignore Irisu Phase 1" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding Irisu1, Mode=TwoWay}"/>
|
||||||
|
<CheckBox Content="Don't split on reload during boss" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding DontSplitOnReload, Mode=TwoWay}"/>
|
||||||
<CheckBox Content="Track In-Game Time" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding Igt, Mode=TwoWay}"/>
|
<CheckBox Content="Track In-Game Time" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding Igt, Mode=TwoWay}"/>
|
||||||
<CheckBox Content="Reset timer when returning to title screen" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding AutoReset, Mode=TwoWay}"/>
|
<CheckBox Content="Reset timer when returning to title screen" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding AutoReset, Mode=TwoWay}"/>
|
||||||
<CheckBox Content="Show debug area" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding DebugArea, Mode=TwoWay}"/>
|
<CheckBox Content="Show debug area" HorizontalAlignment="Left" FontSize="15" Margin="0,0,0,4" IsChecked="{Binding DebugArea, Mode=TwoWay}"/>
|
||||||
|
@ -83,6 +83,18 @@ namespace rabi_splitter_WPF
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Detect Reload
|
||||||
|
|
||||||
|
bool reloaded = false;
|
||||||
|
{
|
||||||
|
int playtime = MemoryHelper.GetMemoryValue<int>(process, StaticData.PlaytimeAddr[mainContext.veridx]);
|
||||||
|
reloaded = playtime != 0 && playtime < mainContext.lastplaytime;
|
||||||
|
if (reloaded) DebugLog("Reload Game!");
|
||||||
|
mainContext.lastplaytime = playtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region CheckMoney
|
#region CheckMoney
|
||||||
|
|
||||||
if (mainContext.Computer)
|
if (mainContext.Computer)
|
||||||
@ -216,8 +228,8 @@ namespace rabi_splitter_WPF
|
|||||||
mainContext.bossbattle = false;
|
mainContext.bossbattle = false;
|
||||||
if (mainContext.MusicEnd)
|
if (mainContext.MusicEnd)
|
||||||
{
|
{
|
||||||
sendsplit();
|
if (!mainContext.DontSplitOnReload || !reloaded) sendsplit();
|
||||||
DebugLog("music end, split");
|
DebugLog(reloaded ? "music end, don't split (reload)" : "music end, split");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,5 +164,7 @@ namespace rabi_splitter_WPF
|
|||||||
|
|
||||||
public static int[] TownMemberAddr = {0xD38934, 0xD5C0F4, 0xD63BC4, 0xD65BC4 };
|
public static int[] TownMemberAddr = {0xD38934, 0xD5C0F4, 0xD63BC4, 0xD65BC4 };
|
||||||
public static int[] IGTAddr = { 0xD388E0, 0xD5C0A0, 0xD63B70, 0xD65B70 };
|
public static int[] IGTAddr = { 0xD388E0, 0xD5C0A0, 0xD63B70, 0xD65B70 };
|
||||||
|
|
||||||
|
public static int[] PlaytimeAddr = { 0, 0, 0, 0xD642D8 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user