Text Replacement in a Note or Book

Post » Thu Jun 27, 2013 3:19 am

I have searched the wiki, and believe the answer to be no, but i thought i would enquire here.

Is there a way for a book or note to display a global variable in the same way a message box can?

Currently i have a book which when read and the user exits the menu, the global variable is displayed via a message box, however if it is possible, i would prefer this variable to be displayed as part of the text within the book.

User avatar
CArla HOlbert
 
Posts: 3342
Joined: Wed Feb 21, 2007 11:35 pm

Post » Wed Jun 26, 2013 4:39 pm

Yea you can. You just have to make the book an alias in a quest, and add your global to the global text replacement list in the Quest Data tab.
User avatar
Yvonne
 
Posts: 3577
Joined: Sat Sep 23, 2006 3:05 am

Post » Thu Jun 27, 2013 12:18 am

Yes, this is possible. The book must be in an Alias within a Quest. You can then use http://www.creationkit.com/Text_Replacement.

User avatar
~Amy~
 
Posts: 3478
Joined: Sat Aug 12, 2006 5:38 am

Post » Thu Jun 27, 2013 4:00 am

And if the global will change you need to use the UpdateCurrentInstanceGlobal() function. This can only be called in a script that extends quest, attached to your quest.
User avatar
Kara Payne
 
Posts: 3415
Joined: Thu Oct 26, 2006 12:47 am

Post » Thu Jun 27, 2013 6:50 am

Thankyou for your replies.

I am having a little trouble getting the global variable to display tho.

I have set up a quest (Start Game enabled)

The player is an alias

The book is an alias created in the player.

My global variable (GLOB_CookingSkill_NECMAS) has been added to the box Text Display Globals on the quest Data Tab.

The text i have in the book is this

Your current cooking skill is .

The quest starts (clean save used), the book is placed in the players inventory, yet the book only displays

Your current cooking skill is

nothing after that is displayed. Not even the following 2 pages of text.

I have also tried just using CookingSkill as the global in case the underscore were causing an issue.

On a slightly different topic and i maybe being a bit dumb on this, but how do you go about making the book an alias when the player purchases the book from a vendor. Ideally, the quest should only start when the book is added to the player. I can start the quest with the Story Manager, thats not an issue.

User avatar
Jonathan Montero
 
Posts: 3487
Joined: Tue Aug 14, 2007 3:22 am


Return to V - Skyrim