Endocore's Miria Mod, upgraded by Lionel Debroux
May 2021
Download:
Source code: https://github.com/debrouxl/Fallout2_RPU_Better_Miria .
Alpha 3 release (now containing the high-level .ssl files as well): attached to a post below.
(this README is still basically an update from Endocore's)
Thanks for trying out this Miria mod, and I hope you'll enjoy the enhancements to her character. This mod combines all the functionality of traditional B-Team and later Miria mods, such as:
-- Miria can level up six times, gaining competence (mainly in Small Guns and Energy Weapons);
-- Miria can be asked to wait while the Chosen One pursues solo missions;
-- Miria's appearance changes based on the armor she's currently wearing;
as well as a number of further embellishments I wrote offering a modest marriage-relationship simulation. Talk to Miria frequently to explore this latter aspect of the mod, or ignore the whole thing at your discretion -- the only consequences are in the relationship of the Chosen One to Miria, so the larger game is unaffected.
This mod is compatible with Fallout 2 Restoration Project Update ("RPU", https://github.com/BGforgeNet/Fallout2_Restoration_Project ). If you'd like to make futher changes yourself to this mod, feel free to do so -- this material was originally drawn from a tutorial on making NPC followers Endocore wrote, available at http://falloutmods.wikia.com/wiki/Building_a_Better_Miria_Mod , and I converted the changes to high-level source code, integrating bugfixes in the process. If you come up with something interesting, please share your work with the community -- more mods means more Fo2 playtime means more fun for everyone.
Installation Instructions:
1) Find the directory where you have the Fallout 2 RPU 2.3.3u18 (at the time of this writing) installed on your computer.
2) Uncompress the files in this download to that directory.
3) Start a new game of Fallout 2, or at least, visit Modoc for the first time. Unlike Endocore's mod, for now, this version does not modify global variables (Endocore's documentation mentions this as a potential change, anyway). If you travel to Modoc and woo Miria (Charisma 8 or a good reputation in Modoc plus Charisma 7 is needed to win her over), your journey of married life will begin.
One rather annoying peculiarity of the mod is that due to the original game's lack of animations, if
1) Miria is not currently wearing any armor, and
2) One uses the team dialogue interface to force her to equip weapons for which her base female peasant model has no animations, then:
3) the game will crash.
If Miria is not wearing any armor at all, either let her choose her own weapons at combat time or give her some armor. After all she's your character's wife, so you should take good care of her by giving her some good armor.
Working around this is planned for later.
If Miria is not wearing any armor at all, either let her choose her own weapons at combat time or give her some armor. After all she's your character's wife, so you should take good care of her by giving her some good armor.
Credit is due to:
-- the many folks who have worked on various Miria mods over the years, of course particularly Endocore who made the work I converted, and Stone-D, from whose work Endocore's iteration of Miria drew much inspiration;
-- killap, the RP team and the RPU team, for providing the fine venue of the Restoration Project as well as a number of technical aspects of the present mod;
-- MIB88 and Lexx for suggestions, though I haven't implemented MIB88's one yet![Smile :) :)](/../../xencustomimages/smilies/icon_smile.gif)
Changelog beyond Endocore's version 2
-- Version 3 alpha 3
-- Fixed a bug (my fault) in Cassidy's dialog.
-- Changed the folder structure to match the one used by e.g. Fo1in2, suggested by Lexx.
-- Version 3 alpha 2
-- Converted ectrappr and vccasidy changes from scattered / decompiled low-level source code to a high-level RPU patch, indirectly integrating bugfixes in the process.
-- Version 3 alpha 1
-- Converted a subset of Endocore's work from binary with scattered / decompiled low-level source code to a high-level RPU patch, indirectly integrating bugfixes in the process.
-- At least for now, the mod uses further new local variables instead of new global variables.
Motivation:
I recently finished my first vanilla Fo2 playthrough using Per Jorner's Fo2 walkthrough extensively.
Before playing Fo2, I had noticed the availability of a Better Miria mod able to make her level up. However, at first, I wanted to deal with the challenge of keeping Miria alive throughout the whole game, just like I kept Tandi alive throughout Fo1 + Fixt (both bugfix-only and expanded modes, same ST 7 / PE 7 / EN 7 / CH 8 / IN 8 / AG 8 / LK 2 / Fast Shot + Gifted player character design). In fact, since Miria can be made to wear armor, she's probably easier to keep alive than Fo1 vanilla / bugfix-only Tandi is... only The Enclave Puzzle room is too dangerous for Miria.
Now that I'm done with vanilla Fo2... let's use expanded content![Smile :) :)](/../../xencustomimages/smilies/icon_smile.gif)
Examination:
https://falloutmods.fandom.com/wiki/Building_a_Better_Miria_Mod seems to be the newest version of a code-modifying Miria mod (I noticed the recent sibling topic which modifies the text), by Endocore, and it's based on RP, which is alright.
However, I couldn't find the source code in ready-made, maintainable (.ssl) form, and RP was superseded by RPU; comparing the bits of low-level Miria mod source code against partially macro-expanded higher-level RPU source code showed that there have been bugfixes on the RPU side in the meantime. Therefore, replacing the whole mcmiria script by a decompilation of mcmiria.int is unlikely to be a good idea...
Consequences:
* for the best playing experience, the Miria mod ought to be infused with RPU code somehow;
* in order to ease the job, and forward maintenance or creation of derivatives, the Miria mod needs to be converted to higher-level source code.
=> I set out to perform that, aiming at producing a conversion faithful to the original low-level code.
Initial conversion work progress summary:
* diffed the latest release http://www.mediafire.com/download/69kt6iw2zmdat72/Miria-RP233.7z from https://falloutmods.fandom.com/wiki/Building_a_Better_Miria_Mod against a clone of https://github.com/BGforgeNet/Fallout2_Restoration_Project .
* manually trimmed many hunks of the diff: many changes performed between RP 2.3.3 and RPU 2.3.3 (between release 18 and 19 at the time of this writing) need to be kept;
* applied the diff to the RPU clone;
* copied the new or modified binary files (.pro, mcmiria.int) to the RPU clone;
* decompiled mcmiria.int using the SFall script editor, yielding mcmiria_decompiled_orig.ssl . The binary represents the source of truth;
* manually reordered functions in the decompilation output to make it easier to spot changes in the diff against RPU mcmiria.ssl , yielding mcmiria_decompiled_reordered.ssl (also manually removed the seemingly useless procedure checkPartyMembersNearDoor);
* manually replaced the header of the file with that of RPU mcmiria.ssl , yielding mcmiria_decompiled_reordered_headerfixed.ssl ;
* incrementally cooked up a relatively low-tech conversion script, convert_mcmiria.sh , to perform a bunch of automatic substitutions, into mcmiria_work.ssl . I modified the RPU headers a bit to make my life easier.
* manually integrated bits for ectrappr.ssl (derived from Endocore's documentation) and vccasidy.ssl (decompiled from vccasidy.int).
* I periodically checked that the modifications round-trip properly by compiling and diffing the decompiled mcmiria.int against mcmiria_decompiled_reordered_headerfixed.ssl , fixing the conversion script and/or my modifications to the RPU headers when they changed the meaning of the code in significant ways.
A noteworthy change is that at least for this version, I switched from using new global variables to using new local variables. Endocore's documentation mentions it as a potential change, anyway. The change is trivially undone by commenting out several lines from the conversion and diffing scripts.
Remaining work (TODO):
* apply the insights given by MIB88 (thanks !) for a method preventing the crash occurring when armor-less Miria equips a weapon her character has no animation for;
* make sure that I didn't forget to apply some useful changes from Miria-RP233.7z ;
* when the result of the conversion is deemed alright, simplify those huge if / else towers in the new version of mcmiria.ssl . The fastest route will probably be the combination of a bit of automation and manual fixups (there's only so much the less powerful regexes can do fixing a non-context-free programming language);
* clean up the commit by removing some of the auxiliary .ssl files, possibly the conversion and diffing scripts (but somebody else aiming at doing the same kind of conversion might find some useful bits in there).
* maybe integrate the Davin counterpart to the Miria mod, but clearly, I'll need help for the text![Wink ;) ;)](/../../xencustomimages/smilies/icon_wink.gif)
Feel free to use that mod and give me some feedback, as well as feedback on the method. Thanks in advance![Smile :) :)](/../../xencustomimages/smilies/icon_smile.gif)
May 2021
Download:
Source code: https://github.com/debrouxl/Fallout2_RPU_Better_Miria .
Alpha 3 release (now containing the high-level .ssl files as well): attached to a post below.
(this README is still basically an update from Endocore's)
Thanks for trying out this Miria mod, and I hope you'll enjoy the enhancements to her character. This mod combines all the functionality of traditional B-Team and later Miria mods, such as:
-- Miria can level up six times, gaining competence (mainly in Small Guns and Energy Weapons);
-- Miria can be asked to wait while the Chosen One pursues solo missions;
-- Miria's appearance changes based on the armor she's currently wearing;
as well as a number of further embellishments I wrote offering a modest marriage-relationship simulation. Talk to Miria frequently to explore this latter aspect of the mod, or ignore the whole thing at your discretion -- the only consequences are in the relationship of the Chosen One to Miria, so the larger game is unaffected.
This mod is compatible with Fallout 2 Restoration Project Update ("RPU", https://github.com/BGforgeNet/Fallout2_Restoration_Project ). If you'd like to make futher changes yourself to this mod, feel free to do so -- this material was originally drawn from a tutorial on making NPC followers Endocore wrote, available at http://falloutmods.wikia.com/wiki/Building_a_Better_Miria_Mod , and I converted the changes to high-level source code, integrating bugfixes in the process. If you come up with something interesting, please share your work with the community -- more mods means more Fo2 playtime means more fun for everyone.
Installation Instructions:
1) Find the directory where you have the Fallout 2 RPU 2.3.3u18 (at the time of this writing) installed on your computer.
2) Uncompress the files in this download to that directory.
3) Start a new game of Fallout 2, or at least, visit Modoc for the first time. Unlike Endocore's mod, for now, this version does not modify global variables (Endocore's documentation mentions this as a potential change, anyway). If you travel to Modoc and woo Miria (Charisma 8 or a good reputation in Modoc plus Charisma 7 is needed to win her over), your journey of married life will begin.
One rather annoying peculiarity of the mod is that due to the original game's lack of animations, if
1) Miria is not currently wearing any armor, and
2) One uses the team dialogue interface to force her to equip weapons for which her base female peasant model has no animations, then:
3) the game will crash.
If Miria is not wearing any armor at all, either let her choose her own weapons at combat time or give her some armor. After all she's your character's wife, so you should take good care of her by giving her some good armor.
Working around this is planned for later.
If Miria is not wearing any armor at all, either let her choose her own weapons at combat time or give her some armor. After all she's your character's wife, so you should take good care of her by giving her some good armor.
Credit is due to:
-- the many folks who have worked on various Miria mods over the years, of course particularly Endocore who made the work I converted, and Stone-D, from whose work Endocore's iteration of Miria drew much inspiration;
-- killap, the RP team and the RPU team, for providing the fine venue of the Restoration Project as well as a number of technical aspects of the present mod;
-- MIB88 and Lexx for suggestions, though I haven't implemented MIB88's one yet
![Smile :) :)](/../../xencustomimages/smilies/icon_smile.gif)
Changelog beyond Endocore's version 2
-- Version 3 alpha 3
-- Fixed a bug (my fault) in Cassidy's dialog.
-- Changed the folder structure to match the one used by e.g. Fo1in2, suggested by Lexx.
-- Version 3 alpha 2
-- Converted ectrappr and vccasidy changes from scattered / decompiled low-level source code to a high-level RPU patch, indirectly integrating bugfixes in the process.
-- Version 3 alpha 1
-- Converted a subset of Endocore's work from binary with scattered / decompiled low-level source code to a high-level RPU patch, indirectly integrating bugfixes in the process.
-- At least for now, the mod uses further new local variables instead of new global variables.
Motivation:
I recently finished my first vanilla Fo2 playthrough using Per Jorner's Fo2 walkthrough extensively.
Before playing Fo2, I had noticed the availability of a Better Miria mod able to make her level up. However, at first, I wanted to deal with the challenge of keeping Miria alive throughout the whole game, just like I kept Tandi alive throughout Fo1 + Fixt (both bugfix-only and expanded modes, same ST 7 / PE 7 / EN 7 / CH 8 / IN 8 / AG 8 / LK 2 / Fast Shot + Gifted player character design). In fact, since Miria can be made to wear armor, she's probably easier to keep alive than Fo1 vanilla / bugfix-only Tandi is... only The Enclave Puzzle room is too dangerous for Miria.
Now that I'm done with vanilla Fo2... let's use expanded content
![Smile :) :)](/../../xencustomimages/smilies/icon_smile.gif)
Examination:
https://falloutmods.fandom.com/wiki/Building_a_Better_Miria_Mod seems to be the newest version of a code-modifying Miria mod (I noticed the recent sibling topic which modifies the text), by Endocore, and it's based on RP, which is alright.
However, I couldn't find the source code in ready-made, maintainable (.ssl) form, and RP was superseded by RPU; comparing the bits of low-level Miria mod source code against partially macro-expanded higher-level RPU source code showed that there have been bugfixes on the RPU side in the meantime. Therefore, replacing the whole mcmiria script by a decompilation of mcmiria.int is unlikely to be a good idea...
Consequences:
* for the best playing experience, the Miria mod ought to be infused with RPU code somehow;
* in order to ease the job, and forward maintenance or creation of derivatives, the Miria mod needs to be converted to higher-level source code.
=> I set out to perform that, aiming at producing a conversion faithful to the original low-level code.
Initial conversion work progress summary:
* diffed the latest release http://www.mediafire.com/download/69kt6iw2zmdat72/Miria-RP233.7z from https://falloutmods.fandom.com/wiki/Building_a_Better_Miria_Mod against a clone of https://github.com/BGforgeNet/Fallout2_Restoration_Project .
* manually trimmed many hunks of the diff: many changes performed between RP 2.3.3 and RPU 2.3.3 (between release 18 and 19 at the time of this writing) need to be kept;
* applied the diff to the RPU clone;
* copied the new or modified binary files (.pro, mcmiria.int) to the RPU clone;
* decompiled mcmiria.int using the SFall script editor, yielding mcmiria_decompiled_orig.ssl . The binary represents the source of truth;
* manually reordered functions in the decompilation output to make it easier to spot changes in the diff against RPU mcmiria.ssl , yielding mcmiria_decompiled_reordered.ssl (also manually removed the seemingly useless procedure checkPartyMembersNearDoor);
* manually replaced the header of the file with that of RPU mcmiria.ssl , yielding mcmiria_decompiled_reordered_headerfixed.ssl ;
* incrementally cooked up a relatively low-tech conversion script, convert_mcmiria.sh , to perform a bunch of automatic substitutions, into mcmiria_work.ssl . I modified the RPU headers a bit to make my life easier.
* manually integrated bits for ectrappr.ssl (derived from Endocore's documentation) and vccasidy.ssl (decompiled from vccasidy.int).
* I periodically checked that the modifications round-trip properly by compiling and diffing the decompiled mcmiria.int against mcmiria_decompiled_reordered_headerfixed.ssl , fixing the conversion script and/or my modifications to the RPU headers when they changed the meaning of the code in significant ways.
A noteworthy change is that at least for this version, I switched from using new global variables to using new local variables. Endocore's documentation mentions it as a potential change, anyway. The change is trivially undone by commenting out several lines from the conversion and diffing scripts.
Remaining work (TODO):
* apply the insights given by MIB88 (thanks !) for a method preventing the crash occurring when armor-less Miria equips a weapon her character has no animation for;
* make sure that I didn't forget to apply some useful changes from Miria-RP233.7z ;
* when the result of the conversion is deemed alright, simplify those huge if / else towers in the new version of mcmiria.ssl . The fastest route will probably be the combination of a bit of automation and manual fixups (there's only so much the less powerful regexes can do fixing a non-context-free programming language);
* clean up the commit by removing some of the auxiliary .ssl files, possibly the conversion and diffing scripts (but somebody else aiming at doing the same kind of conversion might find some useful bits in there).
* maybe integrate the Davin counterpart to the Miria mod, but clearly, I'll need help for the text
![Wink ;) ;)](/../../xencustomimages/smilies/icon_wink.gif)
Feel free to use that mod and give me some feedback, as well as feedback on the method. Thanks in advance
![Smile :) :)](/../../xencustomimages/smilies/icon_smile.gif)
Last edited: