PDA

View Full Version : Randomizing Item Price



Willot
November 12th, 2020, 19:19
Im curious how hard would it be to write an extension to do this?
41035
It would have to "proc" when the item either moved to the Parcel or Player's Inventory.

OnStateChanged? Somehow?

If Cost value not numeric (once the sp,gp,ep etc is striped out)? then call function with value of Cost ( the [1d4x25] or whatever it is)

The function returns the randomized value which is stored in the Cost Field of the item.

All off top of my head; I really have not looked at much of FG's code (if at ALL).

Aedus Amaterasu
November 12th, 2020, 19:49
I am not sure about the die roll for the price but if you use the "Fantasy Grounds Shops(Link (https://www.dmsguild.com/product/318934/Fantasy-Grounds-Shops))" extension by John Waite, and Rob Twohy, when you add a item to the shop if its price is a range, say, 100-500 gp it will randomly pick a price in that range. I don't know if you can use a die roll like what you have in your picture though I haven't tried.

mattekure
November 12th, 2020, 22:23
I am not sure about the die roll for the price but if you use the "Fantasy Grounds Shops(Link (https://www.dmsguild.com/product/318934/Fantasy-Grounds-Shops))" extension by John Waite, and Rob Twohy, when you add a item to the shop if its price is a range, say, 100-500 gp it will randomly pick a price in that range. I don't know if you can use a die roll like what you have in your picture though I haven't tried.

The shops extension will not handle a dice roll or string, it just looks for the price range and randomly generates a number within the range.