Jump to content

[Modding] Adding object names to messages


Recommended Posts

Posted

Heyho,

 

I've recently stumbled upon the Message objects in the Creation Kit and they seem to get used for various notifications.

As it seems to me, that those can be localized easier than a compiled script file, I think about using them in the future.

 

My problem: the normal call Message.Show() only allows float numbers as arguments, I need to pass a string.

 

Example of my code snippet:

Armor[] akUsedDevice = MainTrigger.TriggerMimic(mlibs.libs.PlayerRef, none, mcm.fRandomBaseChance)

If (akUsedDevice[0])
	If (mcm.bUseMsgBox)
		Debug.Messagebox("Out of nowhere you feel some strange movement crawling over your body.\nBefore you could react, the " + akUsedDevice[1].GetName() + " shifted its form and you're locked into a " + akUsedDevice[0].GetName() +"!")
	Else
		Debug.Notification("The " + akUsedDevice[1].GetName() + " you've worn revealed as mimic!")
	EndIf
EndIf

 

This I want to change so I use Message Objects instead of Debug messages. How can I pass the info of the armor names into a Message Object, as it never fills an alias I could use for normal text replacement?

Posted

Through text replacement. Make a Quest and create a Quest Alias, tick the "Stores Text" checkbox and fill the Alias with your Object

Then in your message to be owned by that same Quest, add a text replacement Key (see Text Replacement - Creation Kit) where you want your Name to be

 

Its fairly annoying and tedious depending on what you want to do but the only way to use variable names in messages as far as Im aware. Imo, not really worth it unless you store the Object already in a Quest

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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