Used Armor Cost

Post » Sun Feb 28, 2010 9:56 am

I'm working on a armor/clothing mod right now and I was going to have the store sell new & used. I figured it would work like in Morrowind if the health was low so was the price. I set a piece of armor's health way down then went to the game and found out that in Oblivion it doesn't matter. If the item sells for 1,000 then no matter the health that is how much you have to pay (not to be confused with the price when the player want to sell). So then I thought of a script, but I'm not any good at scripting, unless it's real simple. Any ideas for how to approach this and get the results I'm looking for. I'm kinda stumped on this.
Thanks
Elora Q
User avatar
Nick Swan
 
Posts: 3511
Joined: Sat Dec 01, 2007 1:34 pm

Post » Sun Feb 28, 2010 7:13 am

This shouldn't be too hard. You'd want to use the following functions:
http://cs.elderscrolls.com/constwiki/index.php/SetGoldValue
http://cs.elderscrolls.com/constwiki/index.php/GetObjectHealth (OBSE only)

You'd do it by getting the health of the object, using that as a multiplier, and make it so that you set the value of the item proportionate to the health of it.
If you need any more help, just ask. :)
User avatar
David John Hunter
 
Posts: 3376
Joined: Sun May 13, 2007 8:24 am

Post » Sun Feb 28, 2010 4:04 pm

I'm working on a armor/clothing mod right now and I was going to have the store sell new & used. I figured it would work like in Morrowind if the health was low so was the price. I set a piece of armor's health way down then went to the game and found out that in Oblivion it doesn't matter. If the item sells for 1,000 then no matter the health that is how much you have to pay (not to be confused with the price when the player want to sell). So then I thought of a script, but I'm not any good at scripting, unless it's real simple. Any ideas for how to approach this and get the results I'm looking for. I'm kinda stumped on this.
This is quite difficult, if not right out impossible. All prices are set for the base object, so if you try to change the value of a low-health armor, you will automatically change the price for any full-health armor of the same type. The only way I can think of to get around it, would be to create duplicate base objects for the broken armor and set it to a lower value, either in script or in the CS.
User avatar
Flutterby
 
Posts: 3379
Joined: Mon Sep 25, 2006 11:28 am

Post » Sun Feb 28, 2010 1:01 pm

Thanks for the come back on this. Sorry it took so long. This looks kinda out of my league so guess I will ponder some more. Thanks everyone.
Elora Q
User avatar
J.P loves
 
Posts: 3487
Joined: Thu Jun 21, 2007 9:03 am


Return to IV - Oblivion