The ERF file included in this package (Rowells_Chest.erf) contains
all the scripts and the Chest Placeable to allow anyone building a
Persistent World in NWN2 to place a chest into their module which
will allow each player to get random treasure from containers once
per day, per container.
These FairPlay chests guarantee that each player is given treasure
the first time they open a chest, so that there can be no unfairness
in treasure distribution.
The Chests can be Locked and/or Trapped. Rogues and those classes
with the Pick Lock and/or Disarm Traps skill will gain XP for
successfully using their skills.
Characters can also Bash (attack) the chest, to break the lock;
though this has the tendency to attract nearby creatures.
The Chest is scripted to use a Custom Treasure Set
(row_treasure_system and row_treasure_table). These files are
merely copies of the core NWN2 scripts used to generate treasure.
Feel free to modify these files to suit your Persistent World's needs.
If you want the Chest to give treasure for a certain level (for example,
if you want a chest to only give level 10 treasure), you can adjust the
"BaseLevel" Variable on the Chest Object.
You can also have a chest always give the same treasure to all players.
Simply add the items into the chest in the Toolset. Whenever a player
opens the chest, they will be given all the items that you originally
placed in the chest.
Added the missing Scripts.
Added functionality to pre-populate the Chest with Items so that every player will get the same items when they loot the chest.
I too found that the next person to check the chest found nothing.The locks and traps reset,but no treasure.any ideas? _________________________ Aw,what a cute little chest,what with all its teeth and all...look,it wants to play!
Posted by scepter2012 at 2007-06-03 06:35:26 Voted 9.50 on 06/03/07
I tried this out, and tested it with help from a few other players, and this would only allow the first toon who got at the chest to loot. The random fill worked fine, but the 2nd person there found an empty chest every time. Does this require a module restart to refill the chest? Is that what once per day means, once per server reset?
Posted by Lanessar at 2007-01-21 07:05:00 Voted 8.75 on 01/06/07
Nice. Thanks for that; I was not sure from the documents. _________________________ Lan's Placeable Groups v1.5
Actually, the variables isLocked and isTrapped just copy the original state of the object. So, if you place a chest into your module, set it to locked and put a trap on it, the script automatically handles setting the isLocked and isTrapped variables to TRUE. these are variables that the user really never has to play around with, and just lets the script reset the chest to its original state for the next group of players.
Posted by Lanessar at 2007-01-06 06:53:51 Voted 8.75 on 01/06/07
I see. Thanks for the response.
One thing, there are several variables which are described in the scripts which are not demonstrated in your sample chest and are not specifically described in the readme.
For a non-scripting person, they'd be lost trying to set the IsTrapped or IsLocked variable, since it's not described in the readme. Nor are the chest treasure levels per se, although this does affect the amount of gold spawned.
I can read (most) scripts and do a minor bit of coding, but if you want to have this voted on by more people, I suggest the following:
1. Describe each variable, and what setting it does.
2. I'd dig into the defaults and describe to the user how they work. Yes, I know it's OE default, but believe me, they did not comment it well. I personally cannot see how the chests affect treasure spawns at all the way they describe, although I believe I missed a function call for one of the events in there someplace.
Overall, though, the scripts put in essentially are well done, and solve a problem which has existed in NWN PWs for some time - ninjalooters. Thanks for that.
Sadly, due to the stability of the NW2Server program, making the chest use local instead of global has drawbacks, namely, it's not a one-shot-per-day event but more like once every two to three hours.
I would rate this as a "must have" save for the lack of documentation as noted. _________________________ Lan's Placeable Groups v1.5
I've updated the file to include the ability for you to pre-populate a chest with treasure. So, if you add a chest into your module and place a Copper Necklace into it; for each player that loots the chest, they will find a Copper Necklace.
row_treasure_system and row_treasure table are simply exact copies of the NWN2 treasure scripts. I made these duplicate files so you could make changes without affecting the core scripts. How they work...that's Obsidian's business. I simply make a call to the Random Treaure Generation function.
Happy Building!
Posted by Lanessar at 2007-01-03 16:30:18 Voted 8.75 on 01/06/07
The readme seems sort of unclear on a point:
row_treas_system seems to call from a chest placed in the area or in an inaccessed area of the mod.
row_treas_table seems to spawn stuff from a general treasure table.
How does one disable the random treasure table and stick only to the placed chest loot? _________________________ Lan's Placeable Groups v1.5
row_treasure_system and row_treasure_table
Arn't included in this erf. _________________________ I believe in science and that science can explain everything,
Because God has made it all work in such a beautiful way.
You must be Logged In to post comments in this section.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone