Jump to content

[LE] Setting MessageBox Text Dynamically


caffiend86

Recommended Posts

Hello,

 

I am working on a mod that involves letting players learn vanilla Skyrim and Apocalypse spells via a series of Menu Boxes and paying with an alternate earned currency. To this l'm using UI Extensions' List menu to down a series of list options. The spell data is then pulled in via arrays storing the necessary info (Spell[], Stirings[], etc)

  • the spell school
  • Spell level (novice, apprentice, adept, expert and master with the required ritual quest completed of course)
  • List of spells themselves within that category set.

 

The limitation I'm running into here is a means to display the spell description. Closest possible solution I can find is utilizing the vanilla MessageBox.Show functionality to display the spells description and present them with option of whether they'd like to purchase it or not via a couple buttons at the bottom. However it doesn't appear to be a means of changing the Creation Kit Message Form "Message Box Text" via script, you can really only change pieces of it that are Floats/Integers that are preset.

 

Similarly you can easily present a custom string from a script via Debug.MessageBox but you can't do so while presenting a couple of other buttons to the player to choose from.

 

Does anyone know of another way to accomplish this? I'd rather not define 200+ individual message boxes with set text in the creation kit as that would be very excessive...

 

Thanks in advance...

Link to comment
Share on other sites

If you don't mind using SKSE, here's a method that worked for me:

- Create a new object. It can be any object (e.g. a container) just needs to have a display name.
- Create a new empty cell, and place an instance of the object in that cell.
- Create a new quest and a reference alias that is pointing to the object in the cell
- Create your message using the tag <Alias=AliasName> for Text Replacement. Make sure 'Owner quest' is set to your quest.
- In your script, change the name of your object's base form with the SetName function as needed.

- Display the message with MyMessage.Show() function.

 

I think that's it. It may look complicated at first, but it's pretty straightforward.

You can have multiple objects/aliases to make the message even more dynamic.

 

 

I forgot to mention that the 'stores text' option needs to be checked on the alias (also see first link)

Edited by Ghaunadaur
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...