Jump to content

Text replacement on terminals


iqoniq

Recommended Posts

I've got a holotape that needs to display some dynamic variables.  I can get this to work on a terminal that has an alias in the quest.  What I'm curious about is whether there is a way when the holotape is inserted to grab the reference of the terminal and force it into an alias.  I've done this with NPCs and other objects using a quest to move them about and things, but I'm not sure whether it's possible to do with terminals.

When I've done it before the quest was explicitly pointing at what/who it needed to fill the alias with, so it already knew what it was working with.  I'm not sure how to get the reference of the random terminal if it's possible, and if it is how to go about putting it into the holotape.  I know Pipboys are pretty much dead in the water in regards to text replacement due to the Pipboy not having a reference (IIRC), but objects in the wild should have a reference and unless I'm misunderstanding things it should at least theoretically be possible.  Would doing a radius check from the player for the closest terminal (I'm guessing that would be the one in use) and filling the alias that way be possible?

So is it possible to grab the reference of the terminal at the start of the holotape running? 

Link to comment
Share on other sites

You can get the Terminal reference with OnMenuItemRun and replace text with AddTextReplacementData. This page contains even more detailed info on text replacements.

As for the Pip-Boy, you can change any Terminal entry text (Response Text, Display Text, Header Text, etc.) with Garden of Eden Papyrus Script Extender. See for example:

Bool Function CreateTerminalMenuItem(Terminal akTerminal, int aiMenuItemID, int aiMenuItemType, int aiMenuItemIndex = 0, String asItemText = "", String asResponseText = "",  String asDisplayText = "", Terminal akSubmenu = None) native global

String Function GetNthMenuItemResponseText(Terminal akTerminal, int aiMenuItemID) native global
Bool Function SetNthMenuItemResponseText(Terminal akTerminal, int aiMenuItemID, String asText) native global

 

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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