Guff1118 Posted July 22, 2013 Share Posted July 22, 2013 (edited) Hey there! I won't make this take long. I've been working on a transmutation mod (it is already released) and while I was working on adding a new spell to the mod, I noticed something that might prevent me from making this the best it can be. The spell (like the existing chests) allows users to transmute items into gold based on their Speech level. However, I noticed that when I try to use the spell on an enhanced item (enhanced meaning enchanted and/or tempered via smithing) it only gives a modified version of the item's base value. By using the object reference to the item the user is attempting to transmute, I get the gold value using: int value = object.GetGoldValue() However, the problem with that is it only returns the item's base value, not the actual value. I am testing it using a Daedric Warhammer that is worth 16133 (both tempered and enchanted) and it is still only returning the hammer's base value of 4000. There has to be some way to get the real value of an item because vendors are able to do so. I searched through vendor scripts and I couldn't find anything of use.Is there any way to get the actual value of the item with (hopefully) very little effort? If not, is there a way to get all of the enchantments on the item and the tempered amount and add those up to "re-calculate" the real value of the item?I don't think it's necessary since it should not require it, but I will provide my script if absolutely necessary. Edited July 22, 2013 by Guff1118 Link to comment Share on other sites More sharing options...
steve40 Posted August 10, 2013 Share Posted August 10, 2013 Make sure that "object" points at the ObjectReference not the base form. Link to comment Share on other sites More sharing options...
Jun3d1 Posted April 9, 2015 Share Posted April 9, 2015 You have run into the issue I'm having as well. The game calculates the gold value of enhanced items based on varying different...... for lack of a better term, variables (speech, perks, enhancements, etc...) Unfortunately, there is no way to pull an enhanced items gold value directly. I have yet to find a formula that is useful in determining the enhanced items value as well but if you find that you should be able to make it work. Link to comment Share on other sites More sharing options...
Daedthr Posted April 9, 2015 Share Posted April 9, 2015 (edited) What Steve says, GetGoldValue returns the gold value of a form, but as objectrefence scripts extend form scripts, you should be able to use it for an object reference. In the case of modified items, make sure the property you're using to hold the item points to an object reference and not a form. Edited April 9, 2015 by Daedthr Link to comment Share on other sites More sharing options...
Recommended Posts