https://wiki.nomoreroominhell.com/api.php?action=feedcontributions&user=Darkblitzfrenzy&feedformat=atom
No More Room in Hell - User contributions [en]
2024-03-28T10:51:17Z
User contributions
MediaWiki 1.26.3
https://wiki.nomoreroominhell.com/index.php?title=Item_Spawning_Setup&diff=1045
Item Spawning Setup
2014-03-09T03:45:34Z
<p>Darkblitzfrenzy: Added classnames for JAE700 and welder</p>
<hr />
<div>[[Category:EntitySetup]]<br />
<br />
No More Room in Hell has a customized system of spawning items, weapons, and ammo.<br />
<br />
There are two ways of spawning items: directly (via classname), and randomly.<br />
<br />
NOTE: As usual, if you guys have any questions about this please let me know!<br />
<br />
==Setting up Item Spawning==<br />
===To get item spawning working in your map===<br />
<br />
'''Directly'''<br />
Simply add one of the item entities to your map. The names of these entities correspond to the classname of the items. See below for a link to the full list of classnames.<br />
Directly spawned weapons do not have the option to spawn with a random amount of ammo. These weapons will always spawn with the maximum amount of ammo.<br />
<br />
<br />
'''Randomly'''<br />
No More Room in Hell's random spawner may be familiar to those of you who have previously done mapping for ZP:S.<br />
In order to use the random spawner, add the '''random_spawner''' entity at the places you would like to spawn items. Configuration of the random spawner is simple.<br />
<br />
<br />
* The values set for all options on the random spawner are in %. For example, a value of '25' means that item has a 25% chance to spawn.<br />
** If the total value goes over 100, the values will be normalized such that the total is 100.<br />
** If the total value is under 100, then there will be a chance for nothing to spawn.<br />
<br />
* When in Smart Edit mode, the spawner lists a number of keywords that it is able to spawn. For example ''any'' includes any available item, ''firearm'' includes all firearms, ''melee'' includes all melée weapons, etc.<br />
<br />
* In order to further customize the spawner, turn off Smart Edit mode.<br />
** When not in smart edit mode, you may add entries for individual items.<br />
** Add a new key whose name is the classname of the item you would like to spawn.<br />
** As before, the value is the chance for this item to spawn (in %).<br />
** Keywords are also accepted when not in smart edit.<br />
<br />
* Two additional options, '''Ammo Fill Min''' and '''Ammo Fill Max''' control how much ammo the selected weapon will spawn with. These are based on percentages of the maximum ammo count: 100 means 100% of maximum capacity, 0 means 0% of maximum capacity (i.e. empty).<br />
<br />
A full list of item classnames and accepted keywords may be found [[#List_of_Items|here]].<br />
<br />
===Examples===<br />
<br />
The following entity has a 25% chance to spawn ANYTHING, 30% chance to spawn a FIREARM, 15% chance to spawn a MELEE weapon, and 5% chance to spawn AMMO (leaving 25% chance to spawn NOTHING):<br />
[img]http://i12.photobucket.com/albums/a225/ssba/nmrih/random_spawn_example_1.jpg[/img]<br />
<br />
The following entity has a 35% chance to spawn M92FS, 45% chance to spawn SW686, 5% chance to spawn SV10, 15% chance to spawn BASEBALL BAT:<br />
[img]http://i12.photobucket.com/albums/a225/ssba/nmrih/random_spawn_example_2.jpg[/img]<br />
<br />
==Limiting Spawns==<br />
In addition to this entity, there is also the ability to limit the total number of spawned items per round.<br />
<br />
To do this, add a random_spawner_controller entity to your map. The configuration for this entity works exactly the same as the random_spawner, except the values are interpreted as the maximum count of each type instead of a percentage. The spawner accepts all keywords listed below as well as any direct item names.<br />
<br />
Spawn amounts are based on the most restrictive count. So, if you have 'any' set to 3 and 'firearm' set to 5, only 3 items will be allowed to spawn.<br />
<br />
Be sure to not include any items you don't want to restrict! If any property is set to 0, that means that none of that type will be allowed to spawn.<br />
<br />
<br />
===How the Limiter Works===<br />
<br />
The limiter is quite simple in functionality.<br />
<br />
* When all ''random_spawner'' entities are initially loaded, their spawn requests (i.e. what they would have spawned without a limiter) are sent to the limiter.<br />
* After level load, the limiter randomly picks from the list of requests to spawn until either the request list is empty or all limits have been reached.<br />
* Any ''random_spawner'' entity that requests a spawn after level load are immediately either spawned or rejected.<br />
<br />
==List of Items==<br />
===Allowed Category Keywords===<br />
* any<br />
* ammo<br />
* archery<br />
* explosive<br />
* firearm<br />
* handgun<br />
* item<br />
* machinegun<br />
* melee<br />
* military<br />
* rifle<br />
* shotgun<br />
<br />
===Weapon Classnames (Grouped by Category)===<br />
* any<br />
** firearm<br />
*** handgun<br />
**** fa_1911<br />
**** fa_glock17<br />
**** fa_mkii<br />
**** fa_sw686<br />
**** fa_m92fs<br />
*** rifle<br />
**** fa_1022<br />
**** fa_cz858<br />
**** fa_sako85<br />
**** fa_jae700<br />
**** fa_sks<br />
*** shotgun<br />
**** fa_500a<br />
**** fa_870<br />
**** fa_superx3<br />
**** fa_sv10<br />
**** fa_winchester1892<br />
*** machinegun<br />
**** fa_mac10<br />
*** military<br />
**** fa_mp5a3<br />
**** fa_m16a4<br />
*** archery<br />
**** bow_deerhunter<br />
** melee<br />
*** me_axe_fire<br />
*** me_bat_metal<br />
*** me_chainsaw<br />
*** me_crowbar<br />
*** me_etool<br />
*** me_fubar<br />
*** me_hatchet<br />
*** me_kitknife<br />
*** me_machete<br />
*** me_pipe_lead<br />
*** me_shovel<br />
*** me_sledge<br />
*** me_wrench<br />
** explosive<br />
*** exp_grenade<br />
*** exp_molotov<br />
*** exp_tnt<br />
** items<br />
*** tool_barricade<br />
*** tool_extinguisher<br />
*** tool_welder<br />
*** tool_flare_gun<br />
*** item_bandages<br />
*** item_first_aid<br />
*** item_maglite<br />
*** item_pills<br />
*** item_walkietalkie<br />
** ammo<br />
*** ammobox_9mm<br />
*** ammobox_45acp<br />
*** ammobox_357<br />
*** ammobox_12gauge<br />
*** ammobox_22lr<br />
*** ammobox_308<br />
*** ammobox_556<br />
*** ammobox_762mm<br />
*** ammobox_arrow<br />
*** ammobox_flare<br />
*** ammobox_board<br />
*** ammobox_fuel<br />
<br />
==Video Tutorial==<br />
<br />
[http://youtu.be/PFzhSnaGUBU Random Spawner - NMRiH Tutorial ]</div>
Darkblitzfrenzy