By Jered Date Created: 5/23/2002
All weapons, ammo, and items are stored in inventory. You as the player can pick up items in the game and use them. NPCs however aren’t that smart. Their inventory is predefined, and must be set through ExEd. To set a NPCs inventory, double click it to bring up its properties. Expand the tree labeled ‘Inventory’. Then expand the tree ‘InitialInventory’. Then Finally expand the tree labeled ‘[0]’. There are 3 things here:
The label thing at the top
Count
Inventory
The label thing at the top is unchangeable directly. We use it later to see if what we entered was valid. ‘Count’ is how many of the items the NPC has in their inventory. Only set this above one if the item is stackable, or is able to have multiple items carried in a single slot. If its not stackable and you set it to two or more the game will crash. The final thing is ‘inventory’. This is where you specify the actual item. This MUST be an exact name. If you just say ‘Pistol’ nothing will happen. It must be ‘WeaponPistol’. There is a full list of all possible inventory items at the end of this document.
First, lets set the ‘Count’ to ‘1’. Then set the ‘Inventory to ‘WeaponPistol’. This will give the NPC a pistol. Now that he has a gun we need to give him ammo. expand ‘[1]’ and set the Count to ‘1’ and the ‘Inventory’ to ‘ammo10mm’. This will give him two boxes of 10mm Ammo. Now for fun lets give him a 40 and some credits. Expand ‘[2]’ and set the ‘Count’ to ‘1’ and the ‘Inventory’ to ‘Liqour40oz’. Now expand ‘[3]’ and set the count to ‘1’ and the ‘Inventory’ to ‘credits’. This will give the NPC a forty and 100 credits. As far as I know, credits can only be given to an NPC initially in increments of 100. (100 = 1 credit chip). Now to actually test this you need to put a weapon in your level . I used the pistol (Inventory -> Weapon -> DeusExWeapon -> WeaponPistol) Now jump into your level and kill the NPC. Now search him. Stuff! Yay! For added fun put another guy in the level with some cigarettes, a pistol, some ammo, and 2 zyme vials on him.
"Give us the Tools, and we will build worlds" ~ Jered
|