Skip to content

Commit

Permalink
Update UI a bit to better reflect what options do. Add a small fix fo…
Browse files Browse the repository at this point in the history
…r vowel randomizer to prevent it from breaking all the custom tokens.
  • Loading branch information
Mgamerz committed Apr 6, 2021
1 parent 6cb1ce6 commit cc51851
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
1 change: 1 addition & 0 deletions MassEffectRandomizer/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public partial class App : Application
internal static string MainThemeColor = "Violet";
private static bool POST_STARTUP = false;
public const string DISCORD_INVITE_LINK = "https://discord.gg/s8HA6dc";
public const string ME2R_LINK = "https://www.nexusmods.com/masseffect2/mods/364";
[STAThread]
public static void Main()
{
Expand Down
10 changes: 8 additions & 2 deletions MassEffectRandomizer/Classes/Randomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ private void RandomizePlanetText(Bio2DA planets2DA, int tableRow, string dlcName
/// <param name="Tlks"></param>
private void MakeTextPossiblyScottish(List<TalkFile> Tlks, Random random, bool updateProgressbar)
{
Log.Information("Making text possibly scottish");
Log.Information("Randomizing vowels");
if (scottishVowelOrdering == null)
{
scottishVowelOrdering = new List<char>(new char[] { 'a', 'e', 'i', 'o', 'u' });
Expand All @@ -2728,7 +2728,7 @@ private void MakeTextPossiblyScottish(List<TalkFile> Tlks, Random random, bool u
int current = 0;
if (updateProgressbar)
{
mainWindow.CurrentOperationText = $"Applying Scottish accent [{currentTlkIndex}/{Tlks.Count()}]";
mainWindow.CurrentOperationText = $"Randomizing vowels [{currentTlkIndex}/{Tlks.Count()}]";
mainWindow.ProgressBar_Bottom_Max = tf.StringRefs.Length;
mainWindow.ProgressBarIndeterminate = false;
}
Expand Down Expand Up @@ -2759,6 +2759,12 @@ private void MakeTextPossiblyScottish(List<TalkFile> Tlks, Random random, bool u
continue; //Don't modify I, A
}

if (word.StartsWith("%") || word.StartsWith("<CUSTOM"))
{
Debug.WriteLine($"Skipping {word}");
continue; // Don't modify tokens
}

char[] newStringAsChars = word.ToArray();
for (int i = 0; i < word.Length; i++)
{
Expand Down
12 changes: 9 additions & 3 deletions MassEffectRandomizer/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
<Button Name="Discord_Button" Click="DiscordButton_Click" Margin="5,0,0,0" MinWidth="40" ToolTip="Join the ME3Tweaks Discord server">
<Image Source="/images/discord.png" Height="16" Width="16"/>
</Button>
<Button Name="ME2R_Button" Click="ME2R_Click" Margin="5,0,0,0" MinWidth="20" ToolTip="Randomizer for ME2">
<fonts:OutlinedTextBlock Text="ME2 Randomizer" Fill="#f3fbfe" Stroke="Black" FontFamily="{StaticResource AeroLight}" FontSize="12" StrokeThickness="2" />
</Button>
</StackPanel>
<Button DockPanel.Dock="Right" Click="RandomizeButton_Click" Padding="20,0,20,0">
<fonts:OutlinedTextBlock Text="Randomize" Fill="#f3fbfe" Stroke="Black" FontFamily="{StaticResource AeroLight}" FontSize="12" StrokeThickness="2" />
Expand All @@ -140,9 +143,12 @@
<StackPanel Orientation="Vertical" Grid.Column="0" Margin="0,0,0,5" IsEnabled="{Binding AllowOptionsChanging}">
<RadioButton Content="Select what to randomize" Margin="4" GroupName="ERandomizationMode_SelectAny" ToolTip="Pick and choose what you want to randomize" IsChecked="{Binding Path=SelectedRandomizeMode, Mode=TwoWay, Converter={StaticResource enumConverter}, ConverterParameter=ERandomizationMode_SelectAny}" />
<RadioButton Content="Randomize a common set of stuff" Margin="4" GroupName="ERandomizationMode_Common" ToolTip="Randomize the game in a mostly safe way" IsChecked="{Binding Path=SelectedRandomizeMode, Mode=TwoWay, Converter={StaticResource enumConverter}, ConverterParameter=ERandomizationMode_Common}" />
<RadioButton Content="Give me a screed. I want to experience hell." Margin="4" GroupName="ERAndomizationMode_Screed" ToolTip="You want to experience hell itself with full randomization" IsChecked="{Binding Path=SelectedRandomizeMode, Mode=TwoWay, Converter={StaticResource enumConverter}, ConverterParameter=ERAndomizationMode_Screed}" />
<RadioButton Content="Give me a screed. I want to experience hell" Margin="4" GroupName="ERAndomizationMode_Screed" ToolTip="You want to experience hell itself with full randomization" IsChecked="{Binding Path=SelectedRandomizeMode, Mode=TwoWay, Converter={StaticResource enumConverter}, ConverterParameter=ERAndomizationMode_Screed}" />
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Bottom" IsEnabled="{Binding AllowOptionsChanging}">
<TextBlock Text="Items in red may be potentially game breaking" Foreground="Red" Margin="0,0,0,5" VerticalAlignment="Center" HorizontalAlignment="Right"/>
<TextBlock Text="Restore game before re-randomizing or new selected items will stack" Margin="0,0,0,5" VerticalAlignment="Center" HorizontalAlignment="Right"/>

<StackPanel Orientation="Horizontal" Margin="0,0,0,5" HorizontalAlignment="Right">
<TextBlock Text="RNG Seed: " VerticalAlignment="Center"/>
<TextBox Name="SeedTextBox" MaxLength="11" Text="PLACEHOLDER" ToolTip="RNG seeds determine the output of the random number generator.&#xA;You can share seed values to produce the same results on another run of the program, assuming you chose the same options."/>
Expand Down Expand Up @@ -340,7 +346,7 @@
<StackPanel Margin="10,0,0,0">
<CheckBox Content="Randomly randomize pawn sizes in maps" Foreground="Red" ToolTip="Warning: This breaks many cutscenes, ragdoll physics, and may make enemies immune to gun damage (but not melee)&#xA;Slightly changes the X,Y,Z scalars for pawn sizes.&#xA;This setting will not apply to all pawns, it will be randomly applied" Margin="3" IsChecked="{Binding RANDSETTING_MISC_MAPPAWNSIZES}" />
<CheckBox Content="Randomly randomize movement interpolations" Foreground="Red" ToolTip="Warning: This breaks a lot of camera pans, possibly other things&#xA;Slightly changes the movement and rotations of interpolations of everything&#xA;This setting will not apply to all interpolations, it will be randomly applied" Margin="3" IsChecked="{Binding RANDSETTING_MISC_INTERPS}" />
<CheckBox Content="Randomize vowels" Foreground="Red" ToolTip="Translates game to some weird dialect of Scottish-Like English.&#10;If you are a streamer this could be fun if you like to read text out loud to your audience" Margin="3" IsChecked="{Binding RANDSETTING_WACK_SCOTTISH}" />
<CheckBox Content="Randomize vowels" ToolTip="Translates game to some weird dialect of Scottish-Like English.&#10;If you are a streamer this could be fun if you like to read text out loud to your audience" Margin="3" IsChecked="{Binding RANDSETTING_WACK_SCOTTISH}" />
<CheckBox Content="Randomize NPC Head Colors" ToolTip="Randomizes the colors used for NPC heads" Margin="3" IsChecked="{Binding RANDSETTING_PAWN_MATERIALCOLORS}" />
</StackPanel>
</StackPanel>
Expand Down Expand Up @@ -425,7 +431,7 @@
<Image HorizontalAlignment="Left" Height="32" VerticalAlignment="Top" Source="images/me3tweaks.png" Margin="8,0,0,0" Cursor="Hand" MouseDown="Image_ME3Tweaks_Click" ToolTip="Software developed with love by ME3Tweaks" />
</StackPanel>
<StackPanel HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,3,0,0">
<TextBlock Text="Copyright (C) 2019 ME3Tweaks&#xA;Enormous help from Hallashyn &lt;3&#xA;Huge thanks to all of the artists who let me use their images. You rock!&#xA;&#xA;This program is free software: you can redistribute it and/or modify it under the terms of the&#xA;GNU General Public License as published by the Free Software Foundation, either version 3 of the&#xA;License, or (at your option) any later version.&#xA;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without&#xA;even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&#xA;GNU General Public License for more details.&#xA;&#xA;Mass Effect is a registered trademark of EA INTERNATIONAL (STUDIO&#xA;AND PUBLISHING) LTD. This program has no affiliation with BioWare&#xA;or Electronic Arts.&#xA;&#xA;Images are copyright of their respective owners, see Credits tab." />
<TextBlock Text="Copyright (C) 2019 - 2021 ME3Tweaks&#xA;Enormous help from Hallashyn &lt;3&#xA;Huge thanks to all of the artists who let me use their images. You rock!&#xA;&#xA;This program is free software: you can redistribute it and/or modify it under the terms of the&#xA;GNU General Public License as published by the Free Software Foundation, either version 3 of the&#xA;License, or (at your option) any later version.&#xA;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without&#xA;even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&#xA;GNU General Public License for more details.&#xA;&#xA;Mass Effect is a registered trademark of EA INTERNATIONAL (STUDIO&#xA;AND PUBLISHING) LTD. This program has no affiliation with BioWare&#xA;or Electronic Arts.&#xA;&#xA;Images are copyright of their respective owners, see Credits tab." />
</StackPanel>
</Grid>
</StackPanel>
Expand Down
8 changes: 7 additions & 1 deletion MassEffectRandomizer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public MainWindow()
var preseed = random.Next();
RANDSETTING_MISC_MAPFACES_AMOUNT = .3;
RANDSETTING_CHARACTER_ICONICFACE_AMOUNT = .3;
RANDSETTING_WACK_FACEFX_AMOUNT = 2;
RANDSETTING_WACK_FACEFX_AMOUNT = 3;
ProgressBar_Bottom_Max = 100;
ProgressBar_Bottom_Min = 0;
ProgressPanelVisible = Visibility.Visible;
Expand Down Expand Up @@ -811,5 +811,11 @@ private void DiscordButton_Click(object sender, RoutedEventArgs e)
//ME3Tweaks Discord
Utilities.OpenWebPage(App.DISCORD_INVITE_LINK);
}

private void ME2R_Click(object sender, RoutedEventArgs e)
{
//ME3Tweaks Discord
Utilities.OpenWebPage(App.ME2R_LINK);
}
}
}
4 changes: 2 additions & 2 deletions MassEffectRandomizer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[assembly: AssemblyCulture("")]

// Version informationr(
[assembly: AssemblyVersion("1.0.1.1008")]
[assembly: AssemblyFileVersion("1.0.1.1008")]
[assembly: AssemblyVersion("1.0.3.1016")]
[assembly: AssemblyFileVersion("1.0.3.1016")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]

0 comments on commit cc51851

Please sign in to comment.