07-10-2003, 09:13 AM | #1 |
Xanathar Thieves Guild
Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
Posts: 4,537
|
I'm toolset stupid, how do i make a container get a char's class for treasure type to drop. I've seen it done, but can't figure out how, is there a script on the onopen, or ondeath that will give it, or do i need to write one? If so, can someone tell me how?
__________________
To those we have lost; May your spirits fly free. Good Music: Here. Interesting read, one of my blogs. |
07-10-2003, 10:28 AM | #2 | ||
Jack Burton
Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 39
Posts: 5,459
|
It's a bit of a long script, but I wanted to include all the options and have you be able to give each and every one of them a different item. Just insert it somewhere in both the OnOpen script and the OnDeath scrip where it deals with handing out items.
Quote:
You can add classes together by using the || or 'or' symbol, or create multiclass combinations using && or 'and'. For example, for a fighter/wizard and fighter/rogue only item you'd say Quote:
What the "(GetLevelByClass(CLASS_TYPE_WIZARD, GetLastOpenedBy()) > 0)" line actually says is "does the character who last opened whatever calls this script have more than 0 levels in the wizard class?". |
||
07-10-2003, 02:01 PM | #3 |
Xanathar Thieves Guild
Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
Posts: 4,537
|
Thanks Legolas, that is a long script, and no, I didn't know. I'm finally getting around to trying to make a serious mod, instead of just an item stocker mod. Hence the toolset stupid thing. I feel good about myself if the doors and transitions work! Thanks again.
__________________
To those we have lost; May your spirits fly free. Good Music: Here. Interesting read, one of my blogs. |
07-10-2003, 02:10 PM | #4 |
Jack Burton
Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 39
Posts: 5,459
|
Area transitions can be difficult to understand, you've every right to feel good if you figured that out by yourself [img]graemlins/thumbsup.gif[/img]
And you're welcome. If you need more help just post so [img]smile.gif[/img] |
07-11-2003, 08:40 AM | #5 |
Xanathar Thieves Guild
Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
Posts: 4,537
|
Ok, so will it award according to highest class, if a char is multi-class?
__________________
To those we have lost; May your spirits fly free. Good Music: Here. Interesting read, one of my blogs. |
07-11-2003, 10:09 AM | #6 |
Jack Burton
Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 39
Posts: 5,459
|
This script won't, it only checks for at least a single level. Looking at it again, I think it also stops as soon as it has found a matching class. For example, a 19/1 fighter/aberration would only get the abberation items.
It shouldn't be much trouble to rewrite the script to go with the highest class, but if there are two tied for highest a choice still has to be made; do you give the items of one class, the other class, one of the classes at random, both the classes, nothing or a standard classless item? I'm going to rewrite it to get the highest class level from the standard PC classes, and for now I'll make the item handed out in case of a tie one picked at random from between the two or three tied classes. |
07-11-2003, 03:06 PM | #7 |
Xanathar Thieves Guild
Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
Posts: 4,537
|
that would be a good idea, even if it just picked randomly between the two, so long as a monk's not getting druid items, etc. I've played a lot of cool stuff, and want to translate that over into this mod. Self closing doors, for example, and the reason behind this post. Just haven't gotten that good at it, yet...I've got a few areas drawn up, and a running story line, just got to work out the details.
__________________
To those we have lost; May your spirits fly free. Good Music: Here. Interesting read, one of my blogs. |
07-11-2003, 03:36 PM | #8 | ||
Jack Burton
Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 39
Posts: 5,459
|
Okay, it's not working yet because not not all control paths seem to return a value (in other words, the editor can think of values to enter which the script does not cover when it should) but I'm posting it anyway [img]smile.gif[/img]
This bit goes before the void main() section of a script and basically adds a new command to the set in the editor. It's a bit cluttered up by " else {return CLASS_TYPE_INVALID;}" lines because that was my first attempt at covering all the bases. They are not needed for the script itself to work, and the editor won't consider them to be covering everything. Quote:
Quote:
[ 07-11-2003, 03:39 PM: Message edited by: Legolas ] |
||
07-12-2003, 11:37 AM | #9 |
Jack Burton
Join Date: March 31, 2001
Location: The zephyr lands beneath the brine.
Age: 39
Posts: 5,459
|
Meh, okay. I know the problem lies either in comparing the levels (might be), or in resolving the random outcomes (quite likely), or both (probably). It works for single class characters, when I remove the random bit it also works for characters with two classes, but for a character with three classes that doesn't seem to be enough.
I'm sure the fix is as easy as it is logical, I just have to spot it first [img]tongue.gif[/img] |
07-12-2003, 11:43 AM | #10 |
Xanathar Thieves Guild
Join Date: March 17, 2001
Location: Wichita, KS USA
Age: 60
Posts: 4,537
|
thanks for all the hard work, really appreciate it, in the long run, it will be worth it. on the side, don't you have a module running, infinite realms, or something similar, if so, i've been a frequent visitor of late
__________________
To those we have lost; May your spirits fly free. Good Music: Here. Interesting read, one of my blogs. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scripting | Son of Osiris | Neverwinter Nights 1 & 2 Also SoU & HotU Forum | 1 | 04-05-2003 08:34 AM |
Q: there's a container outside the asylum... | PeeWee | Baldurs Gate II: Shadows of Amn & Throne of Bhaal | 10 | 02-28-2002 02:32 AM |
container for potions? (pos. spoiler - maybe?) | cheesus | Baldurs Gate II Archives | 3 | 11-21-2001 01:49 PM |
When I open a container... | Barloc | Baldurs Gate II Archives | 5 | 11-04-2001 08:03 PM |
Newbie container question | Hallas | Baldurs Gate II Archives | 4 | 02-25-2001 11:02 AM |