Miscellany, Inc. > Infinity Engine Modding Q&A
Detecting Item Values in Script
(1/1)
Bill Bisco:
Dear all,
I couldn't find anything at: http://gemrb.org/iesdp/scripting/triggers/bg2triggers.htm
I'd like to detect if the party has items worth up to a certain amount of gold. And then give the party the option of losing those items (instead of losing gold). Any script or other function that could do that? Or is this a pure engine limitation?
Thanks,
Bill
Angel:
There's no built-in function that can do this. Theoretically you could probably have WeiDU loop over all available items in the game, look up their value and construct the dialog options on the fly from those, but the number of possible combinations would be astronomically high, so I doubt it would be very practical.
Your best bet is probably to make a selection of a few viable items that the party is likely to have, and give the player a choice of giving up a certain item if they have it. Or just simply have an option for the player to say they don't have that much gold at the moment and have the character direct them to the nearest store. Or you could create a special shop that only buys things and doesn't sell any, like Officer Vai in BG1, and let the character open that through dialog.
Navigation
[0] Message Index
Go to full version