Jump to content

[LE] I can't get SetDisplayName() to work with RefAlias


irswat

Recommended Posts

Just to be sure I have this clear:

 

 

1. You have a book, in a quest alias, that is tagged 'use stored text', and is set to use text replacer tags to display various item names.

2. You have an item, in a quest alias, that is set to 'stores text'.

3. When that item is picked up, you are trying to change the display name, so that it is reflected in the book. I understand that the book is not changing.

 

Does the item's display name change elsewhere? For example, in inventory? Do you have any papyrus errors in the log, like calling SetDisplayName() on a null object?

1.) the book is in a quest alias, is tagged optional, uses stored text, and stores text. the text is above and i am trying both methods of displaying names, alias name, and base object name.

2.) that's correct/

3.) when the book is picked up I am trying to change the base name of a dummy object. If I change the name of battleaxe of hatred to "[X] Battleaxe of hatred that would be silly.

 

The items base name changes elsewhere. In the messagebox that says "Checklist updated: [X]" <BaseItem> should work for replacement text but it is empty. papyrus yields no clues or errors related to this

Edited by irswat
Link to comment
Share on other sites

I have another idea. I could just make it a quest and when you get the item it checks off. That would work right? I could make each item a quest stage. Is it possible to make the stages insensitive to what order the items are picked up in?

Edited by irswat
Link to comment
Share on other sites

I tried my hand this using a simple script. The issue is the text in the book doesn't update to reflect the changes to the name, but like you, the display and/or base name do change as expected on the item itself. I haven't worked out how to get around that myself.

 

You idea sounds good, one thing that will change the text is an alias that has been removed. The text will show up as [...]. You can use that as a make shift check off.

 

There's another alternative: You know about the counting down thing in some vanilla quests right? like 4/5, etc. Why not use that instead?

Edited by TheDungeonDweller
Link to comment
Share on other sites

I've attached pictures of the three aliases. I think I am forcing to fill it using CK instead of papyrus. Can you confirm that?

http://i63.tinypic.com/2ns6df4.jpg

 

http://i63.tinypic.com/qx46ja.jpg

http://i66.tinypic.com/30v2djd.jpg

http://i67.tinypic.com/33mos2h.jpg

Link to comment
Share on other sites

I tried my hand this using a simple script. The issue is the text in the book doesn't update to reflect the changes to the name, but like you, the display and/or base name do change as expected on the item itself. I haven't worked out how to get around that myself.

 

You idea sounds good, one thing that will change the text is an alias that has been removed. The text will show up as [...]. You can use that as a make shift check off.

 

There's another alternative: You know about the counting down thing in some vanilla quests right? like 4/5, etc. Why not use that instead?

thanks. what do you mean an alias that has been removed? i wonder if removing the book from the player and adding it again will cause it to update.

Edited by irswat
Link to comment
Share on other sites

i tried this:

Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)   
    int i
	i=OblivionArtifactsItemsFormList.Find(akBaseItem)

	if i==0	;battleaxe of hatred
		debug.MessageBox("Battleaxe of Hatred Added to Inventory")
		OblivionDummyArt1.SetName("[X]")
		debug.MessageBox("checklist updated: " + OblivionDummyArt1.GetName())
		Game.GetPlayer().RemoveItem(OblivionArtifactsQuestBook.GetRef(), 1, true) ;refalias
		Game.GetPlayer().AddItem(OblivionArtifactsBook, 1, true) ;baseobject
		
	endif
endEvent  

moving the book and adding a new one did not seem to make a difference. When I checked create the item in player refalias it seems to make add the base object as well as a copy (the ref alias) to the player. The copy displays [...] which suggests the name did not parse correctly. the baseobject name is "[ ]". Howe

Edited by irswat
Link to comment
Share on other sites

  • Recently Browsing   0 members

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