David on 31/10/2004 at 10:15
Giving the player a default selection of weapons and items to start the map with is very easy.
#1 Open up the Level Properties, this is under the View menu, or you can press F6 to access it.
#2 Expand the Level Properties ladder until you get the bottom Properties rung. Right click this and select Add Property. A window will pop up with two columns, select <em>Default Inventory</em> in both of them and click Add Property.
#3 Click the <em>Add</em> button next to the expanded Default Inventory. Expand the item that appears. You will now see two more rungs named <em>ItemName</em> and <em>Num</em>. Item Name is obviously the name of the item you wish to add and Num is the number of them. The items you'll probably want to add reside in the Actor Class browser under <em>WorldObj</em> > <em>Inventory</em>. I imagine <em>GarrettBlackjack</em> and <em>BroadheadArrow</em> will ne quite popular! Enter the names as they appear in the Actor Class browser.
#4 When entering the number of each item you wish to add you must remember that this cannot exceed the Global Maximum for that item.
Repeat step #3 & 4 until you've added everything you would like the player to start with.
Note: I had tried to override the maximum stack count of an item by changing Inventory > MaxInventoryStack on the ExplosiveMine Archetype, but it didn't work. I wonder if it is hiding somewhere else, or is hard-coded?
Harwin on 1/11/2004 at 18:13
Quote Posted by David
Giving the player a default selection of weapons and items to start the map with is very easy.
#1 Open up the Level Properties, this is under the View menu, or you can press F6 to access it.
#2 Expand the Level Properties ladder until you get the bottom Properties rung. Right click this and select Add Property. A window will pop up with two columns, select <em>Default Inventory</em> in both of them and click Add Property.
#3 Click the <em>Add</em> button next to the expanded Default Inventory. Expand the item that appears. You will now see two more rungs named <em>ItemName</em> and <em>Num</em>. Item Name is obviously the name of the item you wish to add and Num is the number of them. The items you'll probably want to add reside in the Actor Class browser under <em>WorldObj</em> > <em>Inventory</em>. I imagine <em>GarrettBlackjack</em> and <em>BroadheadArrow</em> will ne quite popular! Enter the names as they appear in the Actor Class browser.
#4 When entering the number of each item you wish to add you must remember that this cannot exceed the Global Maximum for that item.
Repeat step #3 & 4 until you've added everything you would like the player to start with.
Note: I had tried to override the maximum stack count of an item by changing Inventory > MaxInventoryStack on the ExplosiveMine Archetype, but it didn't work. I wonder if it is hiding somewhere else, or is hard-coded?
I'm pretty sure MaxInventoryStack is the way to go... Are you sure it got saved out? That it was different in game?
--Alex
David on 1/11/2004 at 18:28
Yeah, I'm pretty sure, but I'll give it another go.
Vlad Midnight on 28/2/2005 at 06:26
Forget to bump this one David? Maybe you never figured everything out :confused:
Dark Arrow on 28/2/2005 at 17:19
Thank you. I was wondering where the tutorial for this was.
Waneman on 1/3/2005 at 19:42
Using some of the original maps (inn, castle1, etc.) in the maps directory, I changed the player inventory to have the gas arrow by using the technique outlined in the aforementioned tutorial.
When I playtest the map from the editor, the map loads and upon rolling through my inventory, the newly added weapon is present.
I select said weapon and proceed to shoot it. The arrow is drawn back but when it should release (shoot) the game crashes.
I tried it on several levels including the tutorial5 level. I also trued it using different weapon types.
Am I missing a crucial step here?
-Waneman
d'Spair on 1/3/2005 at 20:38
David, unfortunately, your method doesn't work if we launch a map via the actual game, with the "New Game" button...
Aha, I figured it out. We have to add inventory items not to LevelInfo, but to Properties > EnterMissionInfo > EnterMissionDefaultInventory of the EnterMissionInfo actor in the Entry map (see my thread in this forum for more details)
ascottk on 12/6/2005 at 23:17
Ran into the default inventory problem and d'Spair's solution worked. Could someone update the WIKI for this?
scumble on 13/6/2005 at 08:08
Do you have the excuse that you can't actually log in to it? ;)