Jump to content

Displaying Text Replacement Data in a terminal


pra

Recommended Posts

So my "What's Your Name" mod renames settlers by putting them into a RefCollectionAlias which has a Message with the Title set to: "<Token.Name=PraActualName>"

Then on renaming, the script takes a Message containing an actual name, and calls settler.AddTextReplacementData('PraActualName', newName)

 

Now if you attempt to use such a settler in a terminal, or anywhere else, you will still get just "Settler". Is there a way to get the actual displayed name? Is there some way to "undo" AddTextReplacementData, meaning, to get the form used by the token name?

 

I assume F4SE's GetDisplayName could get me the name as string, but, how to put a string variable into a terminal? From what I've seen, you have to use global vars even to display simple numbers there. Does F4SE have some advanced terminal function by chance?

Link to comment
Share on other sites

@Pra,

you'll have to ask Shavkacagarikia and Steve40,

they're about the only folks, well, RedRocketTV and PoorlyAged,

though about the only folks I know who can stably rename that.

 

I don't know how to overwrite the raw hexadec string-number of an NPC instance

so that it'll only ever show it's "true name".

that's why I'm waiting for stable release of NPC Overhaul SPECIAL for All,

before learning more about that hehe.

 

good luck though Pra, I look forward to seeing how you can make renaming happen.

Link to comment
Share on other sites

Hey pra-


I don’t know if this will help with what you're looking to do, but I’ve been able to get the player’s name to appear in terminal text in places like the Welcome Text and Item Text. This is done by using a quest alias that points to the terminal with a Message using a variable designated to create the replacement text, in this case the player’s character name. I use this method to have the player’s name display as the Terminal object name as well (and also with anything I want to display the player's name and in notes). A side benefit for the terminal is that the name will appear in Terminal text as well where the variable is used. The variable I use is: <Alias=Player>


Full credit goes to Seddon4494’s video tutorial which introduced me to doing this. I don’t know if this is anything that will help with what you're looking to do, but maybe it will send you in the right direction.

Link to comment
Share on other sites

Hm yes, aliases work.

What exactly is the connection between "Alias" and "RefCollectionAlias"? I thought the latter would contain aliases, but no, seems to be just regular ObjectReferences.

Can you give a quest an array of aliases, or would I have to do something like AliasSettler01, AliasSettler02, etc?

Link to comment
Share on other sites

What exactly is the connection between "Alias" and "RefCollectionAlias"?

 

ReferenceAlias is for one form (NPC actor, Objects, Markers) which holds its in game ObjectReference persistent and manages the attachment of quest specific scripts, packages, inventory, factions and stuff. Say spawn one NPC boss with some dialogue.

 

ReferenceCollections are like arrays of ReferenceAliases. That is the same type of forms that will have the same attachments, say spawn a team of Raider NPC footsoldiers that all behave the same way so you don't have to create individual Reference Aliases for each of them.

 

I was doing this stuff the really hard way in custom script until I slowly understood how to properly exploit these quest resources for non quest related functions.

Link to comment
Share on other sites

Ya it's a nightmare system to say the least. Terminals are the most gimped, hopefully you aren't trying that off a pipboy holotape cos that's outright broken lol.

 

I gave up with it and instead using conditions to display different options in a messagebox menu and also to decide if to use custom messageboxes with custom text. Seems text replacement can't just use simple strings anywhere ffs.

 

Edit: I was just iterating over text replacement wiki again, I wonder, is it possible for you to use the method said at bottom of the page here:

https://www.creationkit.com/fallout4/index.php?title=AddTextReplacementData_-_ObjectReference

 

I was thinking if there is some problem with getting the name from the refaliascollection, you could setup a property that you would set when needed, and use that to pass your AddTextReplacementData function?

 

If it's not working for actors, possibly you could work around that by having a property of a different type (some objectreference perhaps) that you could rename with the string when needed, and then display that. Unless that's all the same and it only displays CK value for display name.

Link to comment
Share on other sites

Edit: I was just iterating over text replacement wiki again, I wonder, is it possible for you to use the method said at bottom of the page here:

https://www.creationkit.com/fallout4/index.php?title=AddTextReplacementData_-_ObjectReference

This does work quite well for global variables I haven't tried it on actors yet but it might work. I used it in my Commonwealth pizza mod. If you want an example have a look at the "LR_PizzaDeliveryScript.psc" in the optional downloads. In the esp it is attached to "LR_PizzaDeliveryQuest". I haven't tested if adding a string as the value works in game but the script compiles just fine if I do.

Just don't try doing this on the pipboy because that doesn't work.

Link to comment
Share on other sites

  • 1 month later...

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" :/

Link to comment
Share on other sites

Well I came up with a hack method, just to display strings via a debug messagebox if the user needed to be reminded who are what they were editing. Add a simple button that displays this information in said box when pressed. But I have scripts that get stored to variables when being worked, which have strings and debug info stored on them. So probably doesn't apply to you directly, but I'm bored and wanted to post that. Alias method might have been okay if holotape on pipboy could get a grip on itself...
Link to comment
Share on other sites

  • Recently Browsing   0 members

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