Jump to content

Custom book is blank!


Recommended Posts

So I copied a vanilla note so I could have a courier deliver a custom letter. I changed the formid, name, and text and saved - no other settings were touched. The courier delivers it flawlessly, but when I open the letter in game it's completely blank! It's a short letter, but I've tried turning pages anyway, no success.

 

I've tried a couple of forum and web searches to no avail. If I don't get any news here I'll try recreating the letter from scratch and see where that gets me.

 

:edit:

I love playing during class! I tried creating a new note - same deal, I copied an existing vanilla note and edited the form id, name, and text, and same deal. It's blank when I open it in game.

 

:edit2:

Traced! My letter's text includes <alias=player> which alias isn't getting filled. Null alias and the game goes bonkers and gives me no text at all. So now to figure out why the alias isn't getting filled. I'm trying to track down where that alias gets filled in vanilla quests - ie wikill03 but so far I'm not having any luck. The "Player" alias is filled in the wiCourier quest and there is no "Player" alias in the wiKill03 quest. So I assume the alias gets filled when the note is added to the courier's container and becomes a part of that script. So perhaps I'm not adding my note correctly? More to follow as I trace down this path.

Edited by pufthemajicdragon
Link to comment
Share on other sites

Remember that the alias typically gets filled when a quest first runs. Are you modifying the vanilla courier quest or your own custom one?

 

I'm using the vanilla courier, which doesn't require modifying it, it's designed to be used dynamically by any quest. I've tried to mirror how other quests and scripts interact with it as best as I can but I must be missing something. In wiKill03 the letter is created as a reference alias by the wiKill03 quest, which doesn't have a player alias, so the letter's alias field must be filled by something else - presumably the courier quest since it has the player alias.

 

What gets me is the letter's reference is created in the world space before the quest or script ever interacts with wiCourier, and the only interaction with wiCourier is to call the addItemToContainer function with the letter's reference as a parameter. I can do that and the courier delivers the letter flawlessly (well he takes his time finding me, but that's his own fault).

 

Steps to use a courier:

Create the letter

I've created the letter manually in the worldspace using placeatme (as wiKill04 does) which works flawlessly and I've created the letter via a reference alias as wiKill03 does, which I'm still troubleshooting (the function gets called, the courier chases me down and does all the dialog but there's no letter :edit: figured it out, didn't have the properties filled out properly).

 

Add the letter to the courier's container

Ala wiCourier.addItemToContainer - I've tried a couple of different call methods, all of which work successfully. I've tried using addItemToContainer with the base form as the parameter, but that didn't work, creating the reference beforehand and adding it did work.

 

The rest is up to the courier:

The addItemToContainer function calls the internal function incrementItemCount and from there I get lost because some other magic is monitoring that global variable which activates the wiCourier quest to chase down the player. I would assume that is the point where the wiCourier quest fills in the aliases, including the player alias on the letter.

 

Perhaps all I need to do is add a player alias to my quest that generates the letter in the first place...

 

:edit:

Tried it, making a player alias in my quest; it didn't work.

 

Let me summarize what I'm doing. I made a custom crafting station for crafting soul gems (similar to other existing mods, but more suited to my tastes). I'm trying to arrange it as a quest reward. The idea is that when you finish the Winterhold College quests, the Psijic Order gifts you with a special crafting station in the arch-mage's quarters. The notification of this gift is delivered by courier and reading the letter initiates the spawning of the station in the arch-mage's quarters.

 

Technically, I have a quest that runs on game start and registers for updates every 5 minutes. Each update it tests the quest stage of MG08. When MG08 starts, the update on my quest changes to 30 seconds and when MG08 completes (stage 200) I create the letter, move it to the courier's container, stop my quest, and let the courier deliver the letter. A script on the letter using event OnRead uses PlaceAtMe to spawn the station in the quarters and place it in the correct location and orientation. All of this works wonderfully flawlessly, except the alias on the letter (apparently) never gets filled. It's such a minor detail but one that, to me, is so important!

 

As a side note, I looked for ways, such as SM eventNodes, to initiate this chain of events so I wouldn't have a quest running in the background, but I couldn't find anything that would work well without modifying vanilla content, which I try to avoid at pain of death for compatibility's sake.

 

My quest script:

Scriptname aaaSoulGemSpawnQuestScript extends Quest  

ObjectReference Property MG04AncanoGreetMarker  Auto  

Quest Property aaaSoulGemSpawnQuest  Auto  

;referencealias Property Alias_Letter Auto

Quest Property MG08  Auto  

Book Property aaaSoulGemPsijicNote  Auto  

Quest Property WICourier  Auto 

Event OnInit()
RegisterForUpdate(10) ;300 ;dropped to 10 for testing
EndEvent

Event OnUpdate()
If MG08.GetStage() >= 10 && MG08.GetStage() < 200
	RegisterForUpdate(10) ;30
ElseIf MG08.GetStage() > 50 ;if > 50 then we're at stage 200 and the quest is finished
	Quest __temp = self as Quest ; this code and the next few lines copied almost verbatim from wikill04
	aaaSoulGemSpawnQuestScript kmyQuest = __temp as aaaSoulGemSpawnQuestScript
	ObjectReference tempItem = MG04AncanoGreetMarker.PlaceAtMe(aaaSoulGemPsijicNote) ; create the letter reference and tempItem variable and point tempItem to the letter ref
	(kmyquest.WICourier as WICourierScript).addItemToContainer(tempItem)	;add the letter to the courier so he will deliver it
	aaaSoulGemSpawnQuest.Stop() ;stop this quest
EndIf
EndEvent

Edited by pufthemajicdragon
Link to comment
Share on other sites

Did you happen to create your own letter for your custom quest AFTER you'd already created part of your quest and had it running? If so, do a resetquest from your console or go back to an earlier save that DOESN'T have your quest already running.
Link to comment
Share on other sites

Did you happen to create your own letter for your custom quest AFTER you'd already created part of your quest and had it running? If so, do a resetquest from your console or go back to an earlier save that DOESN'T have your quest already running.

 

Each time I test I load a clean save from before I even started working on this mod. :edit: I also exit to desktop and restart the game fresh each time. :/edit:

 

When I test, I load the game and in the console I type "setstage MG08 200" which completes the college's quests. My quest hooks in as explained above.

 

I just tested from an even earlier save, still have the same issue.

Edited by pufthemajicdragon
Link to comment
Share on other sites

I don't know what to tell you. I don't use couriers, but I have all sorts of custom notes, books, etc., that include variable data and stored text working on one of my mods without any issues. The only time it messed up was when I had forgotten about an alias and added it in after the quest had already started, so I had to go back to an earlier test save (I had the underlying quest on runonce so I couldn't reset it).
Link to comment
Share on other sites

I don't know what to tell you. I don't use couriers, but I have all sorts of custom notes, books, etc., that include variable data and stored text working on one of my mods without any issues. The only time it messed up was when I had forgotten about an alias and added it in after the quest had already started, so I had to go back to an earlier test save (I had the underlying quest on runonce so I couldn't reset it).

 

Maybe the text in my book is somehow faulty? The text is:

 

<Alias=Player>,

Congratulations on your promotion. As our thanks for your assistance with the Eye of Magnus matter, we have delivered a gift to your new quarters at the College. Use it wisely.

 

Copied from the inheritance letter and edited.

Link to comment
Share on other sites

No, that looks fine to me. Here's an example of one of my notes:

 

<p align="center"><img src='img://textures/interface/books/CerwidenCompanion/ArrowsofChaos.png'><p align="left">
<font face='$HandwrittenFont'>
As instructed, you are to eliminate the priestess Cerwiden by order of Jagreen Lern,  High Theocrat. My spies have tracked her to Skyrim, where she is seeks assistance to prevent the return of the Chaos Lords to this realm.  She may be traveling with one or more companions, including Elric of Melnibone, Rackhir of Phum or <Alias=Player>; kill any you find with her.

Do not underestimate Cerwiden. She is resourceful and cunning, and has already dispatched several assassins from the so-called 'Dark Brotherhood' of Skyrim.

- Theleb K'aarna
</font>

Link to comment
Share on other sites

Perhaps it will help to try it out on some different machines, maybe it's just a bug in my setup.

Soul Gem Mod

 

You should be able to add it pretty quickly with NMM's add from file feature. To test just open the console and type "setstage mg08 200"

 

Thanks for all the help I've already received :)

 

:edit:

As an additional note, I can insert !-- and -- so I get <!--Alias=Player--> and the alias gets commented out, and suddenly the rest of the text in my book is visible! This tells me 2 things: the alias is exactly where my problem is, and the carets aren't any funny sort of alternate ascii caret that the game doesn't recognize (like sometimes happens with quotes).

Edited by pufthemajicdragon
Link to comment
Share on other sites

Ok, I got it working for you. It's as in my very first post about filling aliases. The problem you had was that you never created an alias for your letter and, as such, it was never getting filled. Give me a moment to repackage it and I'll put it in my public dropbox for you.

 

EDIT: Ok, repackaged for you, in my public dropbox. In the script I changed, I simply commented out your line and replaced it with mine so you can see the difference. If you have questions about what I did, let me know.

 

http://s19.postimage.org/zbuazl4mr/For_Puff.png

Edited by Mujuro
Link to comment
Share on other sites

  • Recently Browsing   0 members

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