Jump to content

Question: Can I change the name of an item at runtime from a script?


Belleal

Recommended Posts

Yes, but it's ridiculously indirect.

 

1. Create a Message with the title set to the new name of the item, and the "Message Box" box UN-checked. You'll probably also want to look up "Text Replacement" in the wiki.

 

2. Create a Quest.

 

3. Add a ReferenceAlias to the quest. Set the alias' "Display Name" to the Message you just created, and you might want to enable "Clears Name When Removed" depending on whether the name change is supposed to be temporary or not.

 

4. Arrange for the quest to be started somehow. Either check "Start Game Enabled", call quest.SetStage() or quest.Start() from a script, or use a StoryEvent to tell the Radiant Story Manager to start the quest.

 

5. If using the Radiant Story Manager, you can use things like "Find Matching Reference" which is handy. However, then you'll need to add some things to the "SM Event Node" tree.

 

6. Arrange for the alias to be "filled" somehow, either from a script, or by the Radiant Story Manager.

 

7. I've probably left something out.

 

So, yeah, it would be kind of nice if they had an object.SetName() function.

Link to comment
Share on other sites

Make a duplicate of the object your trying to rename and just rename it like that. Not sure what your trying to do exactly. More details

 

Well, the whole problem starts with the almost impossible task of changing the UI even a little. I need to add new stat to some weapons and armors, but I also need it to show in the UI somehow. Since I cannot modify the small window appearing under each armor/weapons to include this, I though I might be able to attach it after the name of the items in question - like Leather Armor of Awesomeness (54) or something like this. I know it's far from optimal, but I don't really want to edit or recreate the UI flash for such a minor change.

 

Problem in the long run is, that this stat will probably change and not once or twice, so I need a simple way to display that change in the UI. So basically, that's what I need to do. If you guys have any ideas or maybe different approach for it, I'd be grateful.

Link to comment
Share on other sites

Hmm... I thought that all stat effects (basically magic effects) attached to the weapon get their descriptions concatenated in the item description? So if you set the description of you new stat effect to "Awesomeness (54)", it should get included with the rest of the effect descriptions (if any) below the item.
Link to comment
Share on other sites

Hmm... I thought that all stat effects (basically magic effects) attached to the weapon get their descriptions concatenated in the item description? So if you set the description of you new stat effect to "Awesomeness (54)", it should get included with the rest of the effect descriptions (if any) below the item.

 

Hmmm, never really though about that, mainly because I was planning to make this effect as a property + functions inside an item script attached to the object. But maybe I can do it that way... Something to try out I guess. :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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