Jump to content

ReferenceAlias for text replacement, what am I missing?


Struckur

Recommended Posts

Greetings,

 

I am trying to display the name of a MiscItem in a message box using ReferenceAlias and Text Replacements tags but am getting nothing but "[...]", can anyway tell me what I might be missing?

The tag I'm using is: <Alias=Slot1State>

The Message object has its quest owner set to: ClipboardQuest

ClipboardQuest has a Quest Alias Named: Slot1State

Slot1State has "Stores Text" checked

The script file for the quest has a property also named "Slot1State"

the script property is set to reference the Quest Alias

In the script files, before calling the message the property is being set using the line: Slot1State.ForceRefTo(filledStateLabelRef)

filledStateLabelRef points to an instance of a custom MiscItem with a name value of "Filled"

 

My understanding is that this should replace the tag in the message box with the text "Filled", what am I missing?

 

Thanks!

Edited by Struckur
Link to comment
Share on other sites

Try to restart your quest. it does not register the text replacement unless it existed when the quest got started.

From what you wrote it seems that you have set everything properly. I also check "uses stored text", not sure if it's necessary and what's the difference. Make sure that your alias is "optional" and is set for "specific ref" without selecting any real reference.

Edited by kitcat81
Link to comment
Share on other sites

  • 10 months later...

Hey

 

I'm trying basically the same thing, but I can't get it to work.

 

The property in the script file that corresponds to the quest alias, it's always none at runtime. And I'm pulling my hair, because it is NOT none in the CK; The quest alias is clearly assigned to the script property.

 

Yet, at runtime, TR_01.ForceRefTo(reference) fails, because the TR_01 property is none. Same for TR_01.Clear(). Game prints an error to the papyrus log about it as well:

 

 

    error: Cannot call ForceRefTo() on a None object, aborting function call
    error: Cannot call Delete() on a None object, aborting function call

 

 

Also tried stopping and starting the quest, but to no avail.

 

 

My script code is here: https://pastebin.com/GNUTbrWc Its obviously not complete, I want to get MSG_01/TR_01 working first.

 

 

And here's the code to use the above TextReplacer: https://pastebin.com/uYRGc4VA

 

 

 

Any advice ?

Edited by niston
Link to comment
Share on other sites

  • Recently Browsing   0 members

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