Hey all. I am trying to add the Silvered item material from Ravenloft. The description is as follows:
I can modify the gCost field of the item, but it doesn't increase the cost of the item when you are purchasing it. The field gSizeCost appears to be the original cost of the item, and is set at Pre-levels/5000. gCost is the actual cost of the item, after material changes and other factors. Since I have to provide a cost of material based on the original cost, I have to run the script after gSizeCost is set. Running it before or after gCost is set doesn't seem to alter the cost of purchase, though. So, while the field does change, the cost doesn't. Just to be clear on what I am talking about, I've included a screenshot.
I've tried a few different things. The current script (for reference) is:
Pre-Levels/7500
I've also tried "field[eMatCost].value = cost" at the bottom. Neither work. I think it's a timing issue, but I can't run it any earlier as far as I can tell.
Anyone know a way to do this? None of the other materials work this way.
Any metal weapon can be silvered for five times its listed cost. Apply this modifier before adding masterwork costs, if applicable.
I can modify the gCost field of the item, but it doesn't increase the cost of the item when you are purchasing it. The field gSizeCost appears to be the original cost of the item, and is set at Pre-levels/5000. gCost is the actual cost of the item, after material changes and other factors. Since I have to provide a cost of material based on the original cost, I have to run the script after gSizeCost is set. Running it before or after gCost is set doesn't seem to alter the cost of purchase, though. So, while the field does change, the cost doesn't. Just to be clear on what I am talking about, I've included a screenshot.
I've tried a few different things. The current script (for reference) is:
Pre-Levels/7500
Code:
var cost as number
cost = container.parent.field[gSizeCost].value*5
container.parent.field[gCost].value += cost
I've also tried "field[eMatCost].value = cost" at the bottom. Neither work. I think it's a timing issue, but I can't run it any earlier as far as I can tell.
Anyone know a way to do this? None of the other materials work this way.
Attachments
Last edited: