From e3a28c1d9bd15598ad20029db8298dcdf225055c Mon Sep 17 00:00:00 2001 From: Ajarmar Date: Sun, 28 Mar 2021 13:03:58 +0200 Subject: add setting for fixing static pokemon music (currently only implemented for platinum) --- src/com/dabomstew/pkrandom/newgui/Bundle.properties | 4 +++- .../dabomstew/pkrandom/newgui/NewRandomizerGUI.form | 19 +++++++++++++++---- .../dabomstew/pkrandom/newgui/NewRandomizerGUI.java | 13 ++++++++++++- 3 files changed, 30 insertions(+), 6 deletions(-) (limited to 'src/com/dabomstew/pkrandom/newgui') diff --git a/src/com/dabomstew/pkrandom/newgui/Bundle.properties b/src/com/dabomstew/pkrandom/newgui/Bundle.properties index aecdc8e..b14b554 100644 --- a/src/com/dabomstew/pkrandom/newgui/Bundle.properties +++ b/src/com/dabomstew/pkrandom/newgui/Bundle.properties @@ -579,4 +579,6 @@ GUI.pleaseUseTheLauncher=The randomizer was not started via the launcher. GUI.tmFollowEvolutionsCheckBox.text=Follow Evolutions GUI.tmFollowEvolutionsCheckBox.toolTipText=When this is selected and TM compatibility is randomized, evolutions of a Pokemon will inherit that Pokemon's TM compatibilities.
Additionally, when a Pokemon evolves, each TM will have:
Random (prefer same type): A 90% chance of becoming learnable if the Pokemon just gained its type through evolution, a 10% chance otherwise.
Random (completely): A 25% chance of becoming learnable regardless of type. GUI.mtFollowEvolutionsCheckBox.text=Follow Evolutions -GUI.mtFollowEvolutionsCheckBox.toolTipText=When this is selected and move tutor compatibility is randomized, evolutions of a Pokemon will inherit that Pokemon's move tutor compatibilities.
Additionally, when a Pokemon evolves, each move will have:
Random (prefer same type): A 90% chance of becoming learnable if the Pokemon just gained its type through evolution, a 10% chance otherwise.
Random (completely): A 25% chance of becoming learnable regardless of type. \ No newline at end of file +GUI.mtFollowEvolutionsCheckBox.toolTipText=When this is selected and move tutor compatibility is randomized, evolutions of a Pokemon will inherit that Pokemon's move tutor compatibilities.
Additionally, when a Pokemon evolves, each move will have:
Random (prefer same type): A 90% chance of becoming learnable if the Pokemon just gained its type through evolution, a 10% chance otherwise.
Random (completely): A 25% chance of becoming learnable regardless of type. +GUI.stpFixMusicAllCheckBox.text=Fix Music +GUI.stpFixMusicAllCheckBox.toolTipText=Fixes the music for all Static Pokemon encounters so that even when randomized, encounters that should have special music will play the correct song.
Note that in Gen 4/5, if special music is assigned to a Pokemon then it will always play when battling that Pokemon, even if you just find it normally in the wild. \ No newline at end of file diff --git a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form index d876033..3c0d0be 100644 --- a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form +++ b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form @@ -902,13 +902,13 @@ - + - + @@ -970,7 +970,7 @@ - + @@ -981,7 +981,7 @@ - + @@ -1029,6 +1029,17 @@ + + + + + + + + + + + diff --git a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java index d3505e4..70db6e3 100644 --- a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java +++ b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java @@ -44,7 +44,6 @@ import java.io.*; import java.net.HttpURLConnection; import java.net.URI; import java.net.URL; -import java.nio.ByteBuffer; import java.text.SimpleDateFormat; import java.util.*; import java.util.List; @@ -279,6 +278,7 @@ public class NewRandomizerGUI { private JCheckBox mtFollowEvolutionsCheckBox; private JCheckBox stpPercentageLevelModifierCheckBox; private JSlider stpPercentageLevelModifierSlider; + private JCheckBox stpFixMusicCheckBox; private static JFrame frame; @@ -1411,6 +1411,7 @@ public class NewRandomizerGUI { stpSwapMegaEvosCheckBox.setSelected(settings.isSwapStaticMegaEvos()); stpPercentageLevelModifierCheckBox.setSelected(settings.isStaticLevelModified()); stpPercentageLevelModifierSlider.setValue(settings.getStaticLevelModifier()); + stpFixMusicCheckBox.setSelected(settings.isCorrectStaticMusic()); thcRandomCompletelyRadioButton .setSelected(settings.getTmsHmsCompatibilityMod() == Settings.TMsHMsCompatibilityMod.COMPLETELY_RANDOM); @@ -1610,6 +1611,7 @@ public class NewRandomizerGUI { settings.setSwapStaticMegaEvos(stpSwapMegaEvosCheckBox.isSelected() && stpSwapMegaEvosCheckBox.isVisible()); settings.setStaticLevelModified(stpPercentageLevelModifierCheckBox.isSelected()); settings.setStaticLevelModifier(stpPercentageLevelModifierSlider.getValue()); + settings.setCorrectStaticMusic(stpFixMusicCheckBox.isSelected() && stpFixMusicCheckBox.isVisible()); settings.setTmsMod(tmUnchangedRadioButton.isSelected(), tmRandomRadioButton.isSelected()); @@ -1961,6 +1963,9 @@ public class NewRandomizerGUI { stpSwapMegaEvosCheckBox.setVisible(true); stpSwapMegaEvosCheckBox.setEnabled(false); stpSwapMegaEvosCheckBox.setSelected(false); + stpFixMusicCheckBox.setVisible(true); + stpFixMusicCheckBox.setEnabled(false); + stpFixMusicCheckBox.setSelected(false); igtUnchangedRadioButton.setVisible(true); igtUnchangedRadioButton.setEnabled(false); igtUnchangedRadioButton.setSelected(false); @@ -2499,6 +2504,8 @@ public class NewRandomizerGUI { stpPercentageLevelModifierCheckBox.setEnabled(pokemonGeneration >= 3); stpPercentageLevelModifierSlider.setVisible(pokemonGeneration >= 3); stpPercentageLevelModifierSlider.setEnabled(false); + stpFixMusicCheckBox.setVisible(pokemonGeneration >= 3 && pokemonGeneration <= 5); + stpFixMusicCheckBox.setEnabled(false); } else { stpSwapLegendariesSwapStandardsRadioButton.setVisible(false); stpRandomCompletelyRadioButton.setVisible(false); @@ -2507,6 +2514,7 @@ public class NewRandomizerGUI { stpLimitMainGameLegendariesCheckBox.setVisible(false); stpPercentageLevelModifierCheckBox.setVisible(false); stpPercentageLevelModifierSlider.setVisible(false); + stpFixMusicCheckBox.setVisible(false); } igtUnchangedRadioButton.setEnabled(true); @@ -2849,10 +2857,13 @@ public class NewRandomizerGUI { stpAllowAltFormesCheckBox.setSelected(false); stpSwapMegaEvosCheckBox.setEnabled(false); stpSwapMegaEvosCheckBox.setSelected(false); + stpFixMusicCheckBox.setEnabled(false); + stpFixMusicCheckBox.setSelected(false); } else { stpRandomize600BSTCheckBox.setEnabled(true); stpAllowAltFormesCheckBox.setEnabled(true); stpSwapMegaEvosCheckBox.setEnabled(true); + stpFixMusicCheckBox.setEnabled(true); } if (stpRandomSimilarStrengthRadioButton.isSelected()) { -- cgit v1.2.3