Maduin81 Posted May 9, 2016 Share Posted May 9, 2016 Hey folks, I'm trying to come up with an easy to manage way to dynamically build choices into a messagebox based on actor values of the calling actor. Is there any sort of way to perform text replacement on a messagebox? I can currently set up conditions to filter the options the way I need, however its based on an array ID that can easily change. Any input would be greatly appreciated! Link to comment Share on other sites More sharing options...
registrator2000 Posted May 9, 2016 Share Posted May 9, 2016 Hey! One issue - Text Replacement doesn't work for button labels on a MessageBox. You can type them, but they just won't show up and will replace anything within angle brackets with an empty string. This is something Fallout 4 inherited from Skyrim and it's really unfortunate that Beth didn't get around to fixing this issue. However, you can perform Text Replacement and number substitution on a MessageBox's content. If you have a look at FO4 Hotkeys, I used a combination of traditional text replacement (<Alias=Alias_Name>) and format specifiers (%.0f) (you can have a maximum of nine of these in a single MessageBox) to achieve a result of showing an unlimited number of paged slots that the user can navigate through. Source is available on the mod page. This is what the text content looks like: Hotkey Management Menu Showing hotkey slots %.0f-%.0f. [1]: Slot %.0f: <Alias=Slot1_Label> [2]: Slot %.0f: <Alias=Slot2_Label> [3]: Slot %.0f: <Alias=Slot3_Label> [4]: Slot %.0f: <Alias=Slot4_Label> [5]: Slot %.0f: <Alias=Slot5_Label> [6]: Slot %.0f: <Alias=Slot6_Label> [7]: Slot %.0f: <Alias=Slot7_Label> Result: You can further conditionalize your button labels to toggle whether they're being shown, but I'm not aware of a method to conditionalize MessageBox content at this time, other than duplicating multiple MessageBoxes and modifying their contents respectively, and deciding which one to show at runtime. Link to comment Share on other sites More sharing options...
Maduin81 Posted May 9, 2016 Author Share Posted May 9, 2016 (edited) Well that's disappointing for the button label thing.. But omg, thank you so much for the rest of the information, I'm definitely going to be reading through that source, I think it'll pretty much cover what I need exactly ^_^ Edit: Coincidentally, your hotkey source can potentially be extremely useful in another mod I'm developing. Do you mind if I incorporate some of your work into it if I go that route? Giving you full credit, of course. Edited May 9, 2016 by Maduin81 Link to comment Share on other sites More sharing options...
registrator2000 Posted May 10, 2016 Share Posted May 10, 2016 Sure thing, do go ahead! Link to comment Share on other sites More sharing options...
wellspokenman Posted November 7, 2016 Share Posted November 7, 2016 THANK YOU registrator! Your multi-page message box code was exactly what I was looking for. Had no idea Message boxes had parameters. You have been duly credited and I will comment and clean up my source code for sharing in the next release (right now I have an intense desire to not look at papyrus scripts). Link to comment Share on other sites More sharing options...
Recommended Posts