nicked on 8/8/2019 at 08:26
I might be searching for the wrong things here, but I can't seem to find how to display a qvar within the text of a book string.
Only thing I can find is using a Qvar to point to a different book file.
I want to be able to display "My text, which is the same every time, except for <qvar value>".
Unna Oertdottir on 8/8/2019 at 10:14
Do you mean this?
Quote:
Legible
gen.osm 1/G/2
The base script for readable objects. You need to use one of the derived scripts to get it to do anything. First checks for the Book\Text property and aborts if it isn't found. If Book\Art is set, it enters book-mode with the text and art resources specified. Without Book\Art, it loads the string Page_0 from the text and displays it on-screen. In Thief 2, if Trap\Quest Var is set, it appends the value of the quest variable to the Book\Text. ("Book" will become "Book00", for example.)
Just the name of the quest variable is written in Trap\Quest Var. The syntax of QVarTrapTrigBase doesn't apply.
nicked on 8/8/2019 at 12:12
That's changing the filename the book text is looking for though. I want the same filename, but with a dynamic qvar value in it. Something like:
page_0: "The qvar is" {qvar value} "."
Yandros on 8/8/2019 at 14:27
If you are OK with onscreen text instead of book mode, then NVOnscreenText will work for you.
Quote:
NVOnscreenText (NVTrap)Loads a book string and displays both the text and the quest variable that it specifies onscreen.
This behaves slightly differently from a standard book; rather than simply displaying the value of the string "page_0", it displays first the contents string "page_0", then the value of the quest variable specified in the string "QVar", and finally the contents of "page_1".
So, for example (assuming that the quest variable TestQVar is 54), the string file:
Page_0: "At present, the qvar is "
QVar: "TestQVar"
Page_1: ". Thank you for asking."
would be displayed as "At present, the qvar is 54. Thank you for asking."
You can also use Design Note parameters instead of a string file. Use the parameters NVPage_0, NVQVar, and NVPage_1. You can also use NVText instead of NVPage_0 for simple onscreen texts.
nicked on 8/8/2019 at 16:11
Ah, thanks! That might work for what I need. Full book art would be best but I'll take what I can get.
I also found this cryptic reference from Gaylesaver: (
https://www.ttlg.com/forums/showthread.php?t=72096) https://www.ttlg.com/forums/showthread.php?t=72096 Not sure if that's actually something that made it into a generally released script. Can't seem to find a working link to publicscripts documentation either.
Nameless Voice on 8/8/2019 at 21:37
I remember back when I made The Haunting, I made 100 book files with different numbers, one for each potential day.
You can use a QVar to refer to different book files, but as far as I know you can't insert the qvar into the book text (unless that's some new feature that NewDark added?)
NewDark does support showing and hiding decals on a page based on a QVar, so you could have 10 deals, all in the same place, and show/hide them as appropriate to change the digit.
That would theoretically let you show any number up to 2999 (as you are limited to 32 decals per page.)
nicked on 9/8/2019 at 07:55
Good to know - I have gone with just a short on-screen note and Garrett saying "I should write that down!" and I think that works pretty well.
Basically I have a number code/odometer setup but the code is randomised at the start of the level. With 9999 different possible combinations, individual books wasn't going to be feasible (and yes I know I could have just had say, 10 varying codes and chosen one at random but I enjoyed the challenge :D)