Lyaka's Shining Force III Randomizer v3.6 (all scenarios)

-----------------------------------------
	UPDATES IN VERSION 3.6
-----------------------------------------
- weapon experience in sc1 and scc2 are now adjusted based on join spot. This is a flat adjustment and does not take into account weapon preference (e.g. Fynndig favoring rapiers)
- randommizer now waits for a key press before exiting to accomodate those running by double-clicking the executable. running from the command line is still recommended.

-----------------------------------------
	UPDATES IN VERSION 3.5
-----------------------------------------
- Fixed a bug where Ratchet (sc1) and Robby (sc2) had the wrong level 1 special when coming depromoted and equipping shells
- Sc1: Hayward (battle 2) and Irene (battle 6) will no longer remain AI-controlled after being talked to by the player
- Sc1: Duplicate Julian character and sprite removed from battle 7
- Sc1: Fixed a bug where the wrong portrait would appear in battle 25 when Murasame joins the party
- Sc1: Fixed a bug where high-level weapon drops would occasionally be zeroed out (and sometimes cause the patcher to fail)
- Sc1: New depromoted sprites available!
- All scenarios: Fixed a bug where mid-battle joins were potentially being given the wrong sprites (promoted vs unpromoted)


-----------------------------------------
	UPDATES IN VERSION 3.4
-----------------------------------------
- Added custom art for broken weapons given as gold replacements
- Added a chest in scenario 3, battle 18 (Maya Village) to the randomizer list
- Fixed a bug where the first items in Saraband were not randomizing properly
- Hero's Test rewards are now random
	* In scenario 1, items found in pillars are random; the Tiamat Rod and subsequent Large Mithrils for clearing the lowest level are not
	* In scenario 2, the Earth Wand and subsequent Large Mithrils for clearing the lowest level are not randomized, and there are no other rewards
	* In scenario 3, the initial level-clearing rewards are random for all three parties EXCEPT for the lowest level; there you will still receive the ultimate sword/rapier/blade. Orichalcum rewards for clearing levels a second time have also not been randomized. 

-----------------------------------------
	UPDATES IN VERSION 3.3
-----------------------------------------
- Fixes for output filepaths in all-scenario randomization
- Fix for the Irene conversation in scenario 1 battle 6
- Fixed a bug that caused randomized weapon moments to revert to unrandomized before replacement selection
- Fixed a bug that set the flag incorrectly for a cabinet in Saraband (X1S_RM04.BIN)
- Fixed a bug that was causing an underflow in Murasame and Hagane's unpromoted magic tables, giving them insanely powerful spells
- ADDED new sprites for depromoted units in sc1! Thanks to Synvial for the AMAZING job!!

-----------------------------------------
	UPDATES IN VERSION 3.2
-----------------------------------------
- Added all-scenario randomization as an option in the config file - this will allow you to run the randomizer once, with a single seed, and generate all the files you need for a complete playthrough of Shining Force 3. Note that all-scenario randomization will disable randomizing of Julian and Donhort so that their stats, levels, and items flow through properly between scenarios.
- Added character names to the randomization readout instead of just IDs, along with other minor tweaks for a more user-friendly experience.
- Improved logging: logs will now be stored in a log folder instead of in the main folder, use the .log extension (they are still readable with plain text editors), are now one file per run of the randomizer, and are named with timestamps to make lookup easier.
- Items in the Republic Embassy in Saraband in scenario 1 are now randomized both before *and* after battles 1 and 2
- A few items from scenario 2 which had been missed are now included in the randomizer (h/t 好人 for finding these!)


-----------------------------------------
	UPDATES IN VERSION 3.1
-----------------------------------------
- Fixed an issue where a depromoted Hagane would use an Aspia Soldier's sprite in battle cutscenes (h/t Synvial for the fix)
- Fixed an issue where Ratchet, Frank, Hagane, and Murasame's depromoted classes were being called 'Reserve'; they now use Steam Soldier, Werewolf, and Ninja Tyro, respectively, in line with the usage in sc2
- Fixed an issue where cabinet finds weren't properly setting their flag, resulting in the ability to obtain items repeatedly
- NEW FEATURE: boss drops are now randomized! see below for details


-----------------------------------------
	MAJOR CHANGES FOR VERSION 3.0
-----------------------------------------

- scenario 1 is now available for randomization!
- a bug that affected Penko's unpromoted growths table (and would have affected Penn's) has been patched
- prepromoted penguins (Penn, Penko) now start with the Silver Beak. The Golden Beak is available as ???


----------------------
 INSTRUCTIONS FOR USE
----------------------

Unpack the randomizer into its own folder. The randomizer will come with a file, 'config.txt', which has been loaded with default selections. Should you wish, you may update the configuration as follows:

scenario=				# accepts '1', '2', or '3' for single-scenario randomzation; 'all' or '123' for all-scenarios randomization
input-dir=				# contains files necessary for the rando to work. requires an absolute path, not relative. 
					# will fail if the path doesn't exist. DO NOT MESS WITH THIS unless you are absolutely certain. 
output-dir=				# the output directory. requires an absolute path, not relative. 
					# will fail if the path doesn't exist, but will create its own subfolders if needed
					# left blank, will create a folder called 'randomizer' in the same directory as the executable. 
randomize-Zero=				# randomizes Zero's join unless 'no' or '0' are set (sc2 only)
randomize-Donhort=			# randomizes Donhort's join unless 'no' or '0' are set (sc2 and sc3)
randomize-Julian=			# randomizes Julian's join unless 'no' or '0' are set (sc1 and sc2)
randomize-Gracia=			# randomizes Gracia's join unless 'no' or '0' are set (sc3 only)
cross-promotion-boundaries=		# randomizes characters across promotion boundaries, prepromoting or depromoting as necessary, unless 'no' or '0' are set 
					#	(does not apply to scenario 3)
enable-Bernard=				# enables the Bernard join regardless of whether you untied him in sc1/are importing an sc1 save file at all (sc2 only)
seed=					# supply a seed to guarantee a particular outcome. 
						# if left blank, the program will generate and publish one.
						# Record that seed and supply it in future runs to reproduce the same results
 
When all of these have been set to your satisfaction, save and close the config file and then run the rando.exe. A new folder, called "randomizer", will appear in the directory with the executable, unless you specified a different directory. 

Navigate to the Shining Force Translation Patch Folder (SF3PatchWizard). Navigate to the Custom Mods folder. Copy the entire "randomizer" folder that was generated to this location.

Re-run the SF3 Patch Wizard on your original Shining Force 3 CDs. Note that both debug and the randomizer patch will be enabled by default; you can toggle debug mode off by choosing to customize the patch in the wizard. The output bin/cue will contain the randomized values. NOTE: YOU MUST BE USING PATCH VERSION 25 OR LATER.

Play the resulting file as you would play any other patched copy of Shining Force 3.

Enjoy!

-----------------------------------------
 NOTES & CHANGES FROM VANILLA SCENARIO 1
-----------------------------------------

The Kahn control patch is packaged in with this randomizer; you will be able to control Kahn, or whomever joins in his place, in battle 11 (Quonos graveyard). Do not enable the Kahn control patch separately in the patcher; if you do, this will cause the patcher to fail. It is disabled by default in the patcher. 

The patch 'Hagane MP Curve Fix' is assumed; if you don't have it activated in the patcher, you will not succeed in patching, even if the randomizer ran successfully. It is enabled by default in the patcher. 

Some weapons that were previously debug-only have been added to the main game and to appropriate shops to smooth the weapons upgrade path for characters joining early or late relative to their weapons class. 

-----------------------------------------
 NOTES & CHANGES FROM VANILLA SCENARIO 2
-----------------------------------------

The Donhort control patch is packaged in with this randomizer; you will be able to control Donhort, or whomever joins in his place, in all battles in which he takes part. Do not enable the Donhort control patch separately in the patcher; if you do, this will cause the patcher to fail. It is disabled by default in the patcher. 

The patch 'Sc2 Syntesis with Saraband Key Fix' is assumed; if you don't have it activated in the patcher, you will not succeed in patching, even if the randomizer ran successfully. It is enabled by default in the patcher. 

Both Jade and Garosh are available in the join pool regardless of your choice in sc1 or whether you imported your save file. Your synchronicity choice from sc1 affects two different, randomly generated characters. You can inspect your seed readout when running the randomizer to see which two characters are being chosen between. Also, the boss in battle 223 will always be the Hill Giant, again regardless of choice in sc1 and whether Jade or Garosh (or both) are or aren't in your party.

Ruins Map #4 has been modified so it can be completed without the use of a flying character, as the randomizer does not guarantee that Zero will be in your party at that point in the game. 

Some weapons that were previously debug-only have been added to the main game and to appropriate shops to smooth the weapons upgrade path for characters joining early or late relative to their weapons class. 

To compensate for Pappets' primary mechanic of monster taming not being available until the final battles, he has been given the ability to use knives. 

-----------------------------------------
 NOTES & CHANGES FROM VANILLA SCENARIO 3
-----------------------------------------

Orichalcum (the material) may be recieved at any point in the game. This compensates for the fact that the relative deluge of fixed orichalcum drops in chapter 5 is no longer available.

Since orichalcum weapons cannot be forged until chapter 5, orichalcum weapons will not be dropped until Baersol at the absolute earliest. Some weapons, particularly the Reaper Knife, will be underpowered in terms of attack but have been delayed because of the orichalcum requirement.

Both Edmund and Produn are available in the join pool regardless of your choice in sc2 or whether you imported your save file. Your synchronicity choice from sc2 affects two different, randomly generated characters. You can inspect your seed readout when running the randomizer to see which two characters are being chosen between. 

--------------------------
 DETAILS ON RANDOMIZATION
--------------------------

THIS RELEASE RANDOMIZES

- All items found in chests and barrels in towns, including gold! (NOTE: The player will not receive gold directly, but will receive an item that will sell for an equivalent sum.)
- All items found by using the inspect command in battle, including thief chests.
- All barrels in the game (30% of barrels will contain a random item; 70% will be empty). Barrels containing items after randomization WILL NOT be the same as barrels containing items in the base game!
- Character joins ACROSS PROMOTION BOUNDARIES, prepromoting or depromoting as necessary (including swapping starting weapons and weapon xp so that characters start with equipment and skills appropriate to their new join order)
- Boss Drops, when the drop is not a consumable (e.g. a healing drop) or not part of a generic drop (e.g. Lizardman dropping Heat Axes)

* Note that if you import your save file from sc1 into sc2, any items taken from Saraband, Balsamo, or Storich will still be gone.

NOT YET RANDOMIZED

- The handful of items that are not found by searching in battle or in towns (e.g. the power wine if Hera dies)

NOT GOING TO BE RANDOMIZED

- The ruin maps. All ruins maps can be found in their original locations. 
- Key items (the prison key, the robby eye, the penn/penko eggs, etc).

OTHER KNOWN ISSUES

- Scenario 2: If Hera's replacement is Donhort, he will appear in his "rescue the villagers" starting position instead of Hera's usual starting position in battle #16.
- Scenario 3: Unoma's special battle music will not play; it caused too many crashes. He uses the regular battle music instead. 
- Scenario 3: If Leon joins your party before battle 307, and you enter battle 307 with an unconscious party member, Leon may be set to AI control and talking to Leon's replacement mid-battle will not work properly. Leon's replacement will still join at end of battle, but revive all party members before entering this battle to avoid this issue

If you run into issues, locate your log file and send it to me (Lyaka) on Discord!

---------
 CREDITS
---------
(c) Lyaka 2025. 

Grateful acknowledgements:

Rika, for teaching me how to find memory addresses, writing the relevant assembly code, and generally giving me a boost over the hard parts.
Synvial, for developing the X-file reader and editor that made this whole process so much easier, and for creating the CHR tools that let me add sprites in to match the randomization.
Bleu_CatDragon for thorough and fast beta testing.
Knight0fDragon and LegalizeFreedom!, for creating the SF3 Translation project in the first place, without which none of this would have been possible. 
All the folks on the SF3 Discord who helped with testing, kibitzing, and cheering this project on!
Thank you so much everyone!
