Commche's Random Loot Generation System v1.1 (final)
(corpse system built in)
(socketed item system built in)
Corpse System (Blackfield's)
- Corpses generate a pool of blood
- Corpses clean themselves up after a set amount of time
- After looting or if a corpse expires, bones are left (looks pretty cool to return to the battlefield and see all the bones)
- Raisable corpses
- The system doesn�t touch default nw scripts. All you need is one command in the ondeath script (LeaveCorpse())
Loot Generator
- All loot types are generated: weapons, armor, jewellery, potions, scrolls, rods/staves, misc wearables (boots, cloaks etc)
- Loot is color coded and named based on the quality of the item
- The quality of the loot is determined by the level of the creature using a quality range system
- Wearable loot is generated with a variety of different names
- Chance for socketed, worn and broken items
- Chance for extra powerful item (1 in 5000 is default)
Socketed Item System (Scarface's)
- This is built into the loot system
- Socketed items will drop with a randomly chosen number of sockets (up to a max of 6)
- Socketable gems will be generated under the item quality system conditions
- Number of sockets left (next to the item name) is updated after using gems
- Socket and gem variables are reassigned to exported chars with such items on them or in their inventory (when they reenter)
Magic Level: See the screenies for typical drops. These were the first thing that spawned in the chest after changing the quality rating.
At the moment it's configured for my upcomming hack n slash mod. It's kind of low magic to begin with but gains momentum as you level.
You would only need a little scripting knowledge to tweak it to suit your tastes.
The system is quite random. For example, you could get an enchanted drop at lvl 30 or if you are lucky, a powerful one at lvl 7. There is always the chance of a broken item too. Worn and broken items won't drop from the chests in the demo. Only from the creatures.
Note* While module ready, this is a FRAMEWORK only. You can configure it as you like. Please email me at [email protected] if you need my help. I would be more than happy to expand, customise, tweak and help you get it to do exactly what you want it to.
the download is a .zip file, so mac users can also enjoy this system!
* Now included *
Item Sets
=========
- Class specific
- Incremental Set Bonuses
- Set Completion Bonus
- Dynamic No Of Set Items Possessed (displayed on each set-item that you possess)
- Set Bonus Effects
- Set Completion Effects
- Multiple Set Wearing
eg #1: You could possess 3 of the 6 mage set pieces and next to each of that set item's name would be "(3/6)". At the same time you could also have 2 of the 4 warrior set pieces which would be displayed as "(2/4)" in the name on EVERY set piece from that set in your possession.
*This is dynamically updated each time you acquire or drop a set-piece
eg #2: You could be wearing 4 of the mage's set for +INT and concealment whilst st the same time wearing 2 of the fighter's set for the +STR bonus
(not that you'd really want to - just an example)
Version History
===============
1.1 Changes:
- added 5 more monk glove appearances
- added 12 more monk glove names
- Fixed bug where broken or worn items come up as "Broken Armor" rather than using the name of the item
- added an excel doc with all of the generation data to help with the design phase of customisation.
1.2 changes
- fixed a bug where monk items dropped based on GetFirstPC() rather than GetLastKiller()
- fixed the animation bug where player stands up before finisging looting
- fixed a randomizing bug in the misc item dropping system
- added framework for ItemSet system (its all greyed out so it won't affect anything)
2.0 changes
- fixed item property duping which caused incorrect quality ratings
- revamped the quality naming convention
- fixed ranged & ammo property generation system
- increased ranged weapon drops for balancing
- implemented class item sets
- updated socketed items system
- load optimization for PWs
Glad you're enjoying it Fleshmelter2. This system was written for people like you who can take the framework I put into place and take it to the next level as you seem to be doing. Thanks for being active on this thread too. Sadly, Im out of touch with NWN. Good to know that someone is enjoying playing with this system. I believe that perhaps you can comprehend how exciting and enjoyable it was to conceive this loot system from scratch. That in itself, for me, makes it more worthwhile than you could know. Thanks again :) _________________________ Modules: Shadows of Darkmoon The Arena of Champions Dragon's Bane
Scripts: Random Loot Generation System v1.0 Supernatural Subrace System PW Monk-speed balancer
You need to create the monk gloves, sdmonk whathaveya..etc...it'll work fine afterwards.
In order to have bullets drop you will need to alter, the ammo section as well.
In all, it's not too difficult to update in mine I even added a 6th rank tier (pretty much copy/paste, add few more enhancements) system is crazy flexible and enjoyable to work with. _________________________ Visit Chaosgate!
Just thought i'd share a little addition I put with you're wonderful lootsystem, basically I use it to pump up the ammo drops....however I guess it could be used for Melee Weapons as well.
void AmmoOnhit(object oItem, int iRange)
{
itemproperty ipAdd;
int iType, iType2, iType3;
int iRoll = d10();
switch (iRoll)
{
case 1: iType = IP_CONST_ONHIT_BLINDNESS; break;
case 2: iType = IP_CONST_ONHIT_DAZE; break;
case 3: iType = IP_CONST_ONHIT_HOLD; break;
case 4: iType = IP_CONST_ONHIT_FEAR; break;
case 5: iType = IP_CONST_ONHIT_KNOCK; break;
case 6: iType = IP_CONST_ONHIT_SLOW; break;
case 7: iType = IP_CONST_ONHIT_STUN; break;
case 8: iType = IP_CONST_ONHIT_WOUNDING; break;
case 9: iType = IP_CONST_ONHIT_DOOM; break;
case 10:
switch(d3(1))
{
case 1: iType = IP_CONST_ONHIT_LEVELDRAIN; break;
case 2: iType = IP_CONST_ONHIT_MORDSDISJUNCTION; break;
case 3: iType = IP_CONST_ONHIT_VORPAL; break;
}break;
}
switch(iRange)
{
case 1: iType2 = IP_CONST_ONHIT_SAVEDC_14; break;
case 2: iType2 = IP_CONST_ONHIT_SAVEDC_16; break;
case 3: iType2 = IP_CONST_ONHIT_SAVEDC_18; break;
case 4: iType2 = IP_CONST_ONHIT_SAVEDC_20; break;
case 5: iType2 = IP_CONST_ONHIT_SAVEDC_22; break;
case 6: iType2 = IP_CONST_ONHIT_SAVEDC_24; break;
}
switch(d4(1))
{
case 1: iType3 = IP_CONST_ONHIT_DURATION_75_PERCENT_1_ROUND; break;
case 2: iType3 = IP_CONST_ONHIT_DURATION_50_PERCENT_2_ROUNDS; break;
case 3: iType3 = IP_CONST_ONHIT_DURATION_25_PERCENT_3_ROUNDS; break;
case 4: iType3 = IP_CONST_ONHIT_DURATION_10_PERCENT_4_ROUNDS; break;
}
ipAdd = ItemPropertyOnHitProps(iType,iType2,iType3);
IPSafeAddItemProperty(oItem, ipAdd);
}
This goes into the sd_lootsys_tools, then add AmmoOnHit to the ranges within Enhance Ammo section in the sd_lootsystem file.
I only have the DC controlled by iRange, however overall it makes for some very interesting, and fun ammo drops. _________________________ Visit Chaosgate!
Posted by Tyndrel at 2012-05-03 15:15:26 Voted 10.00 on 05/03/12
Thank you kindly sir, I shall prod it with some pointy implements and see what happens :) _________________________ All the thanks the designer gets is your vote, please use it.
Of Time and Death's Feast Link ~ Leybury Link ~ Shadow Mountain PW Link ~ CEP Skybox Reference Link ~ 1.69 Texture Reference Link
Tyndrel. Thrilled that youre using this system. Regarding set item creation / editing. Its not that difficult. Look for
void CreateSetItem( da da da
in the sd_lootsys_tools script. You should be able to figure out what's going on regarding how the set is dropped based on class. In the second part of that section, it simply creates the set item (pre made - not randomly generated) on the corpse. You can see the referenced resref for each piece. Just find that in the objects library in the toolset (i.e. custom armor etc) and you can edit that piece.
Thanks Tyndrel!
I'm still lurking around searching for more Commche goodies lol!
Chaosgate has resurrected! Added some goodies, made some changes, and still all fun! _________________________ Visit Chaosgate!
Posted by Tyndrel at 2012-04-27 02:45:56 Voted 10.00 on 05/03/12
I've just installed this in my new project having been very impressed with it on Fleshmelter's wonderful "Chaosgate" server.
I found that I had to export the 3 nw_c2_* scripts from the demo mod in order to get it working (they don't appear to be in the .erf).
Are there any instructions on editing the "Item Sets" or creating new ones? I'm only a scripter on my granny's side!
Thanks so much for this.
Tyndrel.
_________________________ All the thanks the designer gets is your vote, please use it.
Of Time and Death's Feast Link ~ Leybury Link ~ Shadow Mountain PW Link ~ CEP Skybox Reference Link ~ 1.69 Texture Reference Link
Its possible, but would require quite a bit of reworking. The module that it was written for actually applies random effects on the default weapons of monsters directly and buffs or debuffs them. Onspawn loot generation and equip scripting is a bit inefficient in terms of optimization, so considering that this system was designed to cater for persistent realms, I opted for a more optimal loot generation system. Definitely doable, but a tad cpu intensive given that the engine itself wasn't designed around the processing power that we enjoy today. _________________________ Modules: Shadows of Darkmoon The Arena of Champions Dragon's Bane
Scripts: Random Loot Generation System v1.0 Supernatural Subrace System PW Monk-speed balancer
Anyone know how to set this up so it generates loot onspawn instead of when dying? So the mob can use the items generated? _________________________ Dream Well, Faith, Loyalty, Truth, Honor, Friendship always.....
Daijin Dreamweaver, Leader of the Dream Warriors for 32 years, going strong.
Posted by ThatRandomGuy00 at 2011-09-01 21:30:27 Voted 8.75 on 09/01/11
A well done script, albeit with a few errors in the sd_lootsystem script that's in the .erf,
A glaring one considering it's what controls the item quality's coloring and naming; and by default it'll make everything in a particular level range correspond with the quality of that type, ala:
Basically meaning if you kill something in say, the iRange 4 level range, the item dropped will ALWAYS be a Master's item, [4 enhancements] as opposed to what it actually is [It may actually have 6 enhancements on it.] And the same applies to every range with the corresponding item quality the same number represents.
To fix this, open up sd_lootsystem and search for the line:
SetQuality(oItem, sIName, iRange);
You'll see it a couple of times in the script, and it's pretty obvious where, but.. To simply fix the problem, replace the "iRange" in every instance that comes up in sd_lootsystem with iQual, so that they all look like
SetQuality(oItem, sIName, iQual);
And voilà, properly named and colored items that correspond to the amount of enhancements they actually have, not the level range they were found in.
Posted by Fleshmelter at 2011-08-29 23:19:32 Voted 10.00
Heh, been using your script for ages on my PW. Currently undergoing some heavy overhaul, but should be up and running by mid week. _________________________ PW Action Server:
| Chaosgate |
Posted by borojb at 2011-07-11 15:23:00 Voted 9.25 on 07/11/11
Great tool to use straight out of the box, very flexible, easy to modify (if needed). I've used this, or a modified version(s) for years.
Thanks alot for a great resource, and sorry I'm only voting now.
commche would you be email to send me a copy of this with only the loot generation feature? I don't really want or need any of the other features? My email is [email protected]
Posted by QSW at 2010-03-20 17:09:08 Voted 10.00 on 03/20/10
As a module creator the one thing I've always noticed about you Commche, is your imagination when it comes to creating or adapting systems to be something more than anything else out there. I can see this system working beautifully in a H&S module, and equally so for other genres of module with a few changes to what can be dropped.
I hope you keep creating for us, both scripts for other modders, and modules. You are certainly an asset, and put the 'fun' back in fun! ;)
Posted by issacjr at 2010-02-21 09:28:57 Voted 9.50 on 02/21/10
the html points you in the wrong direction a few times and there is no script to include on cl enter but the system works, works well and it rocks, highly customizable with few quirks.
Posted by Ron Fred at 2009-08-03 20:50:11 Voted 10.00 on 08/03/09
a must have for any mod. Thank you for your work.
Posted by azak30 at 2009-07-11 19:04:43 Voted 10.00 on 06/07/09
and if you need help contact commche. he helped me fix what i need done. thanks again man.
Posted by azak30 at 2009-06-07 09:53:41 Voted 10.00 on 06/07/09
A very well written system, easy to install and use. Very versatile and makes the loot completely random.