Author Topic: Detecting Item Values in Script  (Read 3207 times)

Offline Bill Bisco

  • Planewalker
  • *****
  • Posts: 30
Detecting Item Values in Script
« on: August 22, 2015, 05:15:56 PM »
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

Offline Angel

  • Planewalker
  • *****
  • Posts: 138
Re: Detecting Item Values in Script
« Reply #1 on: September 03, 2015, 02:14:00 PM »
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.

« Last Edit: September 03, 2015, 02:18:57 PM by Angel »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: