Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Random Weapon Generator
Author  Merle
Submitted / Updated  05-03-2006 / 11-22-2006
Category  Inventory Item
Expansions  HOTU-1.67
View Code  

Select All Text | View Code in separate window
Format  Module and Code
Type  Type - Trade Skill and Item Creation
Description
Tired of the same old standard magical weapons? The Random Weapon Generator uses new scripting functions found in version 1.67 of Neverwinter Nights to create random magical items complete with random appearances and descriptive names, similar to games like Baldur's Gate: Dark Alliance or Champions of Norrath. There is almost half a million possible combinations, and that's not including weapon types or appearances!

If you have no scripting experience, three scripts are included that you can use as is. The first creates random weapons in placeables, and the second creates random weapons for an NPC to give to a PC. The third script can be placed on creatures so that they will drop a random magical weapon as loot when killed.

If you have a little more scripting experience, you can call the random weapon generator function itself, and limit weapon types, alignment restrictioms, level requirements, and more. You can even have the function use additional weapon appearances found in the CEP. Now updated to version 1.2. The creature drops should now work if the monster is killed by a henchmen, familiar, or other associate of the PC. Arrows, bolts, and bullets are now created. The largest change is that there are now two separate variables for level and feat restrictions, instead of just one.

Files

NameTypeSizeDownloads
mrl_random_weapon_gen12.zipmrl_random_weapon_gen12.zip
Submitted: 05-03-2006 / Last Updated: 05-10-2006
zip169.53Kb913
Includes HTML readme file, ERF, and sample module. (Version 1.2)
SCORE OUT OF 10
9.85
7 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS

A chest full of random magical weapons.


One of the many possible random magical weapons.


One magical weapon after another, each one different and unique.





You Must Be Logged In to Participate.
Comments (24):

Posted by Gonzo_og at 2010-01-07 20:52:37    
Cool!
_________________________
stuff

Posted by Inayity at 2008-09-29 15:55:07    Voted 10.00 on 09/29/08
I can't believe I didn't wind up voting on this when I'd downloaded it earlier. If you're working on a PW with item drops of this nature you could do far worse than really taking a good look at how this script is done and the thinking behind it. There are other Diablo-esque (for lack of a better term) human-readable loot droppers on the vault (and some with many more votes) but if you look at this one it reaches and attains something a little past the rest.

I would love to see any updates you have to this system and also the Armor generator. Simply fabulous, well-thought-out work. Thank you!

Posted by tagnus at 2008-06-29 15:04:26    Voted 10.00 on 06/29/08
Can't wait to see that armor generator!! Very slick Merle! Bu

Posted by Vampiric at 2008-04-12 05:44:56    Voted 10.00 on 04/12/08
awesomeness! This is just what I was looking for!! :D
_________________________
VämÞï®ìç

Posted by Merle at 2006-08-09 13:58:58    
I haven't had a lot of time to work with NWN in the last month or so, but I have gotten some questions about the armor generator. It's partially complete at this point (about 75% or so). I'm planning on cleaning it and releasing a sort of incomplete beta version to let everyone take a look at it until I get the time to seriously get back to work on it.
_________________________
Recent scripts I wrote for NWN:
Random Weapon Generator & Wordlock / Riddle Creator

Posted by RoadWyrm at 2006-07-23 13:14:13    Voted 8.75 on 07/23/06
If you consider useing a hak for the 2DA Id strongly suggest making a new download in the HAKs section.
Useing the base_2da thats already there seems to be the way to go, maybe no need for a hak to use it?
Great job...still waiting on armor and other items :D

Posted by Merle at 2006-05-19 10:51:22    
Anon, if that's the case, I will definitely be looking at 2das. Hopefully nobody will mind a small hakpak containing 2das for data management. (If anyone does think that will be a bad idea, then let me know.) I'll probably be saving that for the version after next. I'm still working on implementing random armor generation, which is the main focus of the next version.
_________________________
Recent scripts I wrote for NWN:
Random Weapon Generator & Wordlock / Riddle Creator

Posted by Anonymous ( 24.161.xxx.xxx ) at 2006-05-18 16:34:32    
Meryle, in new versions of NWN, the 2das's gets tored into memory the first time theya re acecssed. Hence it doesn't read them from the file each time but recalls the values from memory. Its similar to how variables are stored. Because of this, theres not a performance hit like there once was in the past.

Posted by Merle at 2006-05-18 09:28:37    
lylver, I've thought about using 2das. It would make some things a lot easier. A lot of lookup functions I use can be replaced by using Get2DAString. However, my understanding is that Get2DAString can be very slow, and that using it inside of a loop is a bad idea. There's a lot of looping when a random weapon is generated, unfortunately.
_________________________
Recent scripts I wrote for NWN:
Random Weapon Generator & Wordlock / Riddle Creator

Posted by lylver at 2006-05-18 08:02:59    
You can clarify your script by the use & preload (local var in memory) of a 2da file.
This will give more flexibility for future modifications.
Good job
_________________________
TN Bouchon 2 (PW-RP), un des "bouchons lyonnais"

Posted by Merle at 2006-05-16 05:52:25    
Fleshmelter, I'll change that in the next version. Make it so that there is a chance for items to drop, based on the creature's Challenge Rating. The higher the rating, the greater the chance of a randomly created weapon being dropped. I'll also let it check a variable on the creature if the designer wants to set the percentage chance of an item being dropped.
_________________________
Recent scripts I wrote for NWN:
Random Weapon Generator & Wordlock / Riddle Creator

Posted by Fleshmelter at 2006-05-14 20:50:37    Voted 9.50 on 05/04/06
hey Merle works kinda nice, but having a item drop everytime you kill a critter would make it monty haul-ish.

Perhaps a random chance to drop an item on creatures, and also maybe random spawn chance of more than one item being created for the overall system.

But as it stand it's still great.
_________________________
PW Action Server:
| Chaosgate |


Posted by Merle at 2006-05-10 09:53:38    
Version 1.2 is now here!

Fleshmelter, I believe I fixed the problem with the creature drops. I tested it with a familiar and a summoned creature, and it should work now. The items are now restricted to the creature's hit dice/level plus a small random number.

For other 1.2 changes, I separated the nUseCheck variable into two variables: nFeatCheck and nLevelCheck. There is also a new option for nLevelCheck that checks the range between the bottom and top levels as they are, without considering the PC's levels.

Finally, arrows, bolts, and bullets are now in.

I'm working on random magical armor now, and it looks like eventually this will become a random magical ITEM (not just weapon) generator at the rate I'm going.
_________________________
Recent scripts I wrote for NWN:
Random Weapon Generator & Wordlock / Riddle Creator

Posted by Fleshmelter at 2006-05-09 15:29:27    Voted 9.50 on 05/04/06
Well the skinny on Creature Drops:
Got a TMI error when my summoned dire wolf killed a kobold, which resulted in the 'dummy chest' not getting destroyed. Also no treasure generated when my summon killed a critter. You think maybe if the creatures generated the weapon onspawn as oppose to ondeath will help....of course this will probaly make your feats option useless for creature drops, but still can be used on placeable treasure.

Also i leveled up a character to level 15 and killed the kobolds, which is to be expected....but just i don't think kobolds should drop weapons on par with my level. Perhaps a CR table is needed to regulate the creature drops.


_________________________
PW Action Server:
| Chaosgate |


Posted by Merle at 2006-05-09 07:49:58    
Fleshmelter, if you find a bug, don't hesitate to let me know. I like getting feedback and comments. It helps me improve things. I should have another update later this week, and I'll see if I can't throw in some simple treasure like rings, boots, and the like.
_________________________
Recent scripts I wrote for NWN:
Random Weapon Generator & Wordlock / Riddle Creator

Posted by Fleshmelter at 2006-05-08 14:23:26    Voted 9.50 on 05/04/06
Awesome job, i meant to comment on the items being identified before, but hate abusing my posting rights. Actually if you get random armour done when ammo gets done, i'll more than likely change over from the other random items script i use. I really like that yours uses on-hit props for weapons, which i find that the one i use now does not.

Also if you hadn't thought of it...(lol i gots lots to say) Bracers,Boots,Belts,Amulets,Rings and all that jazz can probaly be added rather quickly "of course i say this, cuz i'm not the one scripting it."

All in all this seems to be shaping up into a great treasure system now.
_________________________
PW Action Server:
| Chaosgate |


Posted by Merle at 2006-05-08 06:05:01    
Ransom, that's an excellent idea!

I just uploaded version 1.1. I didn't get as much time to work on everything as I would have liked, so it's a fairly small update. It includes a script to place on the OnDeath of creatures & NPCs so that they will drop a random magical weapon (thanks for the idea, Fleshmelter). I also added Ransom's idea, so that by setting nUseCheck to 5, the random weapon generator will look at the levels for the PC, but not their feats. Finally, one small bug fix. The sample module automatically identifies the weapons... the scripts in the ERF will not anymore. I meant to take that out last time and forgot.
_________________________
Recent scripts I wrote for NWN:
Random Weapon Generator & Wordlock / Riddle Creator

Posted by Ransom at 2006-05-06 07:54:16    Voted 10.00 on 05/05/06
As I said in my vote, this is excellent.

After playing with it a little, it would be really nice to see an option that doesn't care if the PC can use the weapon, but DOES check the PC's level. For truly random, but level-appropriate treasure generation.

Posted by Ransom at 2006-05-05 11:07:52    Voted 10.00 on 05/05/06
This is quite excellent. I'm thinking of using this to add a random weapon merchant to my module in progress.

Please do add random ammo and armor!

Posted by Merle at 2006-05-05 05:26:51    
Rami, thanks for your comment, if you figure out how to use it in your PW let me know.

Fleshmelter, I hope to get random ammo in the script as well, and eventually have random armor as well. And I never even considered creature drops for some reason... it's easy enough to do, and so for the next version I'll make that available.
_________________________
Recent scripts I wrote for NWN:
Random Weapon Generator & Wordlock / Riddle Creator

Posted by Fleshmelter at 2006-05-04 15:03:28    Voted 9.50 on 05/04/06
The good: very slick NPC usage
The not so good: only weapons are randomized, and no creature drops. I'm sure both can be remedied.
_________________________
PW Action Server:
| Chaosgate |


Posted by Fleshmelter at 2006-05-04 14:49:33    Voted 9.50 on 05/04/06
Nice!
_________________________
PW Action Server:
| Chaosgate |


Posted by Rami_Ahmed at 2006-05-04 10:23:27    Voted 9.75 on 05/04/06
Wow this is really cool, although I cant use it in my own PW (or maybe I can, just cant figure it out right now, heh) this is certainly well done, I haven't looked at the code yet but it sounds very nice.
_________________________
NWN2 stuff:
- Persistent Player Owned Shop System

Some stuff made by me for NWN:
- Persistent Player Owned Shop v2.1
- Item Breakage System (Updated)

Posted by Rami_Ahmed at 2006-05-04 10:22:58    Voted 9.75 on 05/04/06
Wow this is really cool, although I cant use it in my own PW (or maybe I can, just cant figure it out right now, heh) this is certainly well done, I haven't looked at the code yet but it sounds very nice.
_________________________
NWN2 stuff:
- Persistent Player Owned Shop System

Some stuff made by me for NWN:
- Persistent Player Owned Shop v2.1
- Item Breakage System (Updated)

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Other


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters