Jump to content

Displaying Text Replacement Data in a terminal


pra

Recommended Posts

Came around to actually test this now. Looked at how the book return terminal works. Apparently you must put the terminal into a ReferenceAlias of a quest, and then you can use other aliases there as <Alias=SomeOtherAlias>.

That alias must have "Uses Stored Text" checked.

Then, the SomeOtherAlias must have "Stores Text" checked.

 

However, this doesn't work on settlers which you rename using a different quest's aliases. They still show up as "Settler" :/

 

I'm not 100% sure if this will work for across quest boundaries, but you can use the undocumented replacement token <Alias.CurrentName=MyQuestAlias> to replace with the instance's display name instead of the form name. As an aside, this is crucial because it allows you to use an alias set the display name of an instance from multiple inputs, and then remove the reference from the alias and use it as a further input. In other words, you can use a script do arbitrary combinations of form name strings (and numbers, if you use a message referencing a global) dynamically without requiring F4SE.

Link to comment
Share on other sites

Holy crap. If that works, this is exactly what I was looking for. I'll have to test this ASAP.

 

Edit: I can confirm that this works. Thank you very much, vaultsquirrel!

Edited by pra
Link to comment
Share on other sites

  • 11 months later...

Pra or vaultsquirrel, can you please elaborate on this a bit?

 

I don't understand that part at all, especially the "from multiple inputs" bit:

 

 


[...] use an alias set the display name of an instance from multiple inputs, and then remove the reference from the alias and use it as a further input.

 

Edited by niston
Link to comment
Share on other sites

I think he means that you can put something into an alias/refcollectionalias which renames it, but doesn't have that "clear name on removal" box checked. then you can remove it again, and the name will persist.

Link to comment
Share on other sites

Alright. And how does the "from multiple inputs" part play into this? Does it mean that the display name will be made up of everything that is in the refcollection? Because that sounds most intriguing!

Edited by niston
Link to comment
Share on other sites

TBH I have trouble following you. What are you even trying to do?

 

But, now, you can't have a refcollection use all the names. Only the first refcollection which applies the name will actually apply that name.

Link to comment
Share on other sites

Ah, I'm not trying to do anything with this in code so far. Just trying to understand what has been written here.

 

Vaultsquirrel wrote " it allows you to use an alias set the display name of an instance from multiple inputs".

 

And "you can use a script do arbitrary combinations of form name strings"

 

What "multiple inputs" are they referring to? And why "multiple" ???

 

It certainly reads to me as if this technique would allow us to make up a display name from a bunch of (multiple) form names (inputs). Especially cause they also mention "arbitrary combinations". They also seem to imply that the result (renamed form) can then be looped back to one of the (multiple) inputs of this -so far- mysterious process. Which makes total sense if those "multiple inputs" are indeed multiple forms (or rather, their names)....

 

I don't understand how this should work in practice. But if it does, I would indeed like to use this technique. So I try learning more...

Edited by niston
Link to comment
Share on other sites

  • 3 months later...

Meanwhile, I found this out: Transfer Settlements comes with an F4SE Plugin "Terminal+", and there's a script for it called "TerminalEx". It has some interesting functions:

 

 

 


Int GetVersion()
Bool HasTextReplacementData(ObjectReference akRef, string asTokenLabel)
RemoveAllTextReplacementData(ObjectReference akRef, string asTokenLabelPrefix)
ExitTerminal()
String GetTextReplacementValue(ObjectReference akRef, string asTokenLabel, string asValueType)
Form GetTextReplacementForm(ObjectReference akRef, string asTokenLabel)
RemoveTextReplacementData(ObjectReference akRef, string asTokenLabel)
AddTextReplacementString(ObjectReference akRef, string asTokenLabel, string asTokenValue)

 

I will try fiddling with them some time. Most are somewhat obvious, but I wonder what valid asValueType strings there are. Couldn't find the source code and looking at the dll for strings didn't turn up anything useful. They're probably defined in the game anyways. Could it possibly be datatype names like Int, String, Bool etc? Does CDante still read here?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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