Talk:SetName

Active discussions

Using on staticsEdit

I've tried using this command on statics from the console, however the changes don't seem to be permanent. For example changing the name of the door "Door to Ocheeva's Quarters" to "Door to Player's Quarters" in the DB sanctuary reverts back to the original if I leave the cell. I suspect this has to do with whether the target is a persistent ref or not but haven't tested it. Can anyone confirm?

First, a door is not a Static. Statics don't have names to begin with. That confused me at first.
Secondly, SetName(Ex) changes the Base Object, not the Reference. This means two things - first, every Reference to that same door will also have their name changed ("Door to Ocheeva's Quarters" is presumably unique, however). Secondly, the game generally does not expect changes to Base Objects, and therefore does not save them.
In order to get around both problems (both of which are common to all OBSE Base-Object-changing functions), you need to call CloneForm on the Base Object, to get your own unique Base Object. This firstly eliminates issues with affecting all over References to the object, and secondly causes the Base Object to be saved in the Save File. Normally when Oblivion loads, it looks for Base Objects in the corresponding .esp/.esm file, and loads them from there - which is why things revert to how they were before (by the same token, if you change a Base Object and reload your save back to before you changed it, but with that Base Object still in memory, Oblivion won't know to restore the Base Object back to its original condition). However, dynamically created forms (PlaceAtMe'd References and player-made Potions and Enchantments, in vanilla Oblivion, CloneForms with OBSE) don't have a .esp/.esm to load from - they're loaded from the Save File, which means your changes get saved appropriately.
However, I'm not sure you'll be able to successfully switch out a door with a Clone, since the Teleport Location data is stored per-Reference (i.e. won't be cloned), and I don't... think(?) OBSE has a function for getting or setting that information...
Dragoon Wraith TALK 19:19, 27 January 2009 (EST)
Oh, and please use ~~~~ to sign comments on Discussion pages. This code will insert your username and the time, so that we can see who said what when.
Thanks.
Dragoon Wraith TALK 19:20, 27 January 2009 (EST)
AFAIK, the name field of a Door is limited to the name of the type of the door, for instance, Door or Gate. The remaining part of the name points to the name of the linked cell. So if you change the name of a door in-game which is called "Door to Lucien's Quarters" to "Door to Player's Quarters", it should effectively change the name to "Door to Player's Quarters to Lucien's Quarters". To achieve the effect you are looking for, you should change the linked door reference or the linked cell's name. Do correct me if I'm wrong
shadeMe TALK 20:22, 27 January 2009 (EST)
The doors I used in my example are animated doors not load doors, so changing the name wouldn't have issues with teleport location and destination names. Also, as far as I can tell, CloneForm doesn't have any console support - selecting an object and typing CloneForm in the console does nothing (the clone may be created, but never added to the gameworld). And I'm aware of how to sign my posts, I just forgetĀ :) my bad. In my defense, Wikipedia has a signbot that catches it for me so it's easy to get into the bad habit.--Puf the majic dragon 00:05, 17 February 2009 (EST)
Return to "SetName" page.