diff options
author | Ajarmar <axel.jarmar@gmail.com> | 2021-03-28 13:03:58 +0200 |
---|---|---|
committer | Ajarmar <axel.jarmar@gmail.com> | 2021-03-28 13:03:58 +0200 |
commit | e3a28c1d9bd15598ad20029db8298dcdf225055c (patch) | |
tree | b4ac7a072b5d52b5a7059ecf1864cb82936c19e0 /src/com/dabomstew/pkrandom/newgui | |
parent | c10e82df28afde94df3c679d2ece96f24487f016 (diff) |
add setting for fixing static pokemon music (currently only implemented for platinum)
Diffstat (limited to 'src/com/dabomstew/pkrandom/newgui')
-rw-r--r-- | src/com/dabomstew/pkrandom/newgui/Bundle.properties | 4 | ||||
-rw-r--r-- | src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form | 19 | ||||
-rw-r--r-- | src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java | 13 |
3 files changed, 30 insertions, 6 deletions
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=<html>The randomizer was not started via the launcher. GUI.tmFollowEvolutionsCheckBox.text=Follow Evolutions GUI.tmFollowEvolutionsCheckBox.toolTipText=<html>When this is selected and TM compatibility is randomized, evolutions of a Pokemon will inherit that Pokemon's TM compatibilities.<br />Additionally, when a Pokemon evolves, each TM will have:<br /><b>Random (prefer same type)</b>: A 90% chance of becoming learnable if the Pokemon just gained its type through evolution, a 10% chance otherwise.<br/><b>Random (completely)</b>: A 25% chance of becoming learnable regardless of type. GUI.mtFollowEvolutionsCheckBox.text=Follow Evolutions -GUI.mtFollowEvolutionsCheckBox.toolTipText=<html>When this is selected and move tutor compatibility is randomized, evolutions of a Pokemon will inherit that Pokemon's move tutor compatibilities.<br />Additionally, when a Pokemon evolves, each move will have:<br /><b>Random (prefer same type)</b>: A 90% chance of becoming learnable if the Pokemon just gained its type through evolution, a 10% chance otherwise.<br/><b>Random (completely)</b>: A 25% chance of becoming learnable regardless of type.
\ No newline at end of file +GUI.mtFollowEvolutionsCheckBox.toolTipText=<html>When this is selected and move tutor compatibility is randomized, evolutions of a Pokemon will inherit that Pokemon's move tutor compatibilities.<br />Additionally, when a Pokemon evolves, each move will have:<br /><b>Random (prefer same type)</b>: A 90% chance of becoming learnable if the Pokemon just gained its type through evolution, a 10% chance otherwise.<br/><b>Random (completely)</b>: A 25% chance of becoming learnable regardless of type. +GUI.stpFixMusicAllCheckBox.text=Fix Music +GUI.stpFixMusicAllCheckBox.toolTipText=<html>Fixes the music for all Static Pokemon encounters so that even when randomized, encounters that should have special music will play the correct song.<br />Note that in Gen 4/5, if special music is assigned to a Pokemon then it will <b>always</b> 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 @@ </component> <hspacer id="c4003"> <constraints> - <grid row="1" column="4" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> + <grid row="1" column="5" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <gridbag weightx="6.0" weighty="0.0"/> </constraints> </hspacer> <vspacer id="ec4fb"> <constraints> - <grid row="5" column="1" row-span="1" col-span="3" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/> + <grid row="5" column="1" row-span="1" col-span="4" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/> <gridbag weightx="0.0" weighty="0.0"/> </constraints> </vspacer> @@ -970,7 +970,7 @@ </component> <component id="84b86" class="javax.swing.JCheckBox" binding="stpPercentageLevelModifierCheckBox"> <constraints> - <grid row="1" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/> + <grid row="1" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <gridbag weightx="6.0" weighty="0.0"/> </constraints> <properties> @@ -981,7 +981,7 @@ </component> <component id="f3518" class="javax.swing.JSlider" binding="stpPercentageLevelModifierSlider"> <constraints> - <grid row="2" column="3" row-span="3" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/> + <grid row="2" column="4" row-span="3" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/> <gridbag weightx="0.0" weighty="0.0"/> </constraints> <properties> @@ -1029,6 +1029,17 @@ <toolTipText resource-bundle="com/dabomstew/pkrandom/newgui/Bundle" key="GUI.stpLimitMainGameLegendariesCheckBox.toolTipText"/> </properties> </component> + <component id="4f53f" class="javax.swing.JCheckBox" binding="stpFixMusicCheckBox"> + <constraints> + <grid row="1" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/> + <gridbag weightx="0.0" weighty="0.0"/> + </constraints> + <properties> + <enabled value="false"/> + <text resource-bundle="com/dabomstew/pkrandom/newgui/Bundle" key="GUI.stpFixMusicAllCheckBox.text"/> + <toolTipText resource-bundle="com/dabomstew/pkrandom/newgui/Bundle" key="GUI.stpFixMusicAllCheckBox.toolTipText"/> + </properties> + </component> </children> </grid> <grid id="f2cab" layout-manager="GridBagLayout"> 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()) { |