Talk:OnEquip

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Deleting String Values[edit source]

As per a suggestion from Haama on my talk page, I tested my own advice about deleting the String value of the sCantEquipGeneric constant. His suggestion was that this might blank out ALL messages. My experience is that the only message which will no longer display is "This item cannot be equipped." I have successfully loaded a plugin with the sCantEquipGeneric value completely removed (with the Backspace key, in case that matters), and other messages, such as "Your conjuration skill has improved." and custom messages I added myself still display correctly. Has there been a previous issue with this?

As far as I'm concerned, the sCantEquipGeneric message is not necessary anyway. If I click it and nothing happens, I can figure out that it can't be equipped on my own. Removing this message from the game opens up the ability to add script effects to ordinary clutter objects in the player's inventory, so to me, the tradeoff is well worth it. However, if it interferes with other aspects of gameplay, it should be noted as such in this article.
--RedFault 15:13, 14 January 2008 (EST)

The advice on this page should be perfectly safe. I have not tested that message in particular, but I have blanked out other Message GMSTs and only those messages were affected, in exactly the way you expect.
Dragoon Wraith TALK 15:46, 14 January 2008 (EST)
Actually, I was just running the same mod again, testing a few other elements. Now all of a sudden, no messages are showing. Not sure what the difference is between my first test and this one, but I'm going to remove my advice in this article until I can find an answer.
--RedFault 19:51, 14 January 2008 (EST)
Hmm... how about changing it to a space, then?
Dragoon Wraith TALK 20:11, 14 January 2008 (EST)
Ah, saves me the trouble of looking through my notes again. Ok - changing it to a space works and takes care of the constant-blank problem. However, it will still take the time to display the blank message. That is
player.EquipItem GenericItem
message "Hello"
will take 2-3 seconds to display "Hello" because the blank message is displayed first. Still, it's the best solution and is used in the Message Remover Pack.
If the circumstances that prevent other messages from being displayed can be narrowed down, it would be a good thing. Completely deleting the string won't have the delay and would be better.--Haama 21:57, 14 January 2008 (EST)

(Responding to above) I will continue to test this. My two separate tests were two separate savegames, and I don't know what the difference was. I think we'll find that the instructions to display a message when an item is "equipped" are hardcoded into the game, and the only control scripters have over it is changing the message displayed. In other words, probably hiding it with a space character is the best we can ever hope for. The first test I ran, when messages were still displayed, might not have registered the changed message because that character did not possess the item with the OnEquip script. Maybe if I had had him pick it up, messages would have been hidden for him as well. I don't know if something like that would affect it or not. Logic says no, the plugin was still loaded for both saves, but coding and programming have been known to have a few quirks.
--RedFault 09:49, 15 January 2008 (EST)