Jump to content

Set Gold Value of Object Reference via script


Grudge

Recommended Posts

I've yet to find a way to accomplish this other than creating multiple references of the same object for the different prices you might need and calling on that object when needed.

 

Any creative minds out there that can think of an alternative?

Link to comment
Share on other sites

I'm conceptionalizing right now so I don't really "have" anything. It's in my head though. I was hoping for a feature kind of like this

ObjectReference.GetGoldValue(Item)

but would do this

ObjectReference.SetGoldValue(Value)

So it could be used in this kind of statement

Int Wheat

Ingredient Property WheatObject Auto

Event OnInit()

Wheat = self.GetItemCount(wheat)

If Wheat > 10

WheatObject.SetGoldValue(1)

else

WheatObject.SetGoldValue(5)

Endif

EndEvent

 

What is the most effecient way to change the gold value of an item?

Link to comment
Share on other sites

So your checking the script itself for the amount of wheat it has. If the script has less than 10 wheats they are worth 5 gold if more they are worth 1 gold. Example: 9 wheat is worth 45 gold but 11 wheat is worth 11 gold. What are you trying to accomplish ingame
Link to comment
Share on other sites

SKSE will bring a SetValue() (or SetGoldValue()), and maybe SetGoldValue_T()

 

Papyrus only gives us a GetGoldValue() :/

 

Can think of 2 workarounds that might work.

Either,

as you suggest, creating several base objects, with various values and then juggling them via script.

Or,

create one base object with small value. Then have specialised traders that offer more for those goods.

(there's already a few in the game... eg. you can get a better price for tree-sap if you take it to trader X.)

The trader could then offer price according to season, supply and demand.

Link to comment
Share on other sites

The operative word there was will. It's still in development.

It shouldn't be long now and you can follow the progress on the SKSE thread on the Bethesda forum. Basically you'll just have lots more handy commands to use in your Papyrus scripts, and a lot that enable what is impossible using vanilla Papyrus alone.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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