Text Replacement does not update while in a menu

Post » Wed Dec 11, 2013 10:28 am

I'll try to explain this as best as I can.

I'm trying to create a mod which adds "tags" to user-made potions (Refined, Superior, etc).

To do this, I catch an OnItemAdded() event on a player's ReferenceAlias, and create an ObjectReference for the created potion (using the Drop() command followed by AddItem()).

I then created messages with text replacement in title. The game crashed when I triied to get the object's name though the Alias, so I had to create a temp. item using ObjectReference DummyPotion = PlayerRef.PlaceAtMe(akBaseItem).

Everything worked fine, except one thing: all created potions had the same name. I made further experiments and discovered that it only happened when I created multiple potions in one crafting session. If I create a potion, leave the crafting menu, then re-enter it and craft another potion, the mod works perfectly and flawlessly.

This means that the text replacements do not update while in the crafting menu, even if the crafting menu does not trigger the MenuMode (aka, it does not pause the game).

Any idea or workaround, maybe ?

User avatar
Robert Bindley
 
Posts: 3474
Joined: Fri Aug 03, 2007 5:31 pm

Return to V - Skyrim

cron