We are currently updating the articles for 1.09.0. Translated articles will need to be updated by their respective authors.

Difference between revisions of "Item Spawning Setup"

From No More Room in Hell
Jump to: navigation, search
(Weapon Classnames (Grouped by Category))
m (Examples)
 
(One intermediate revision by the same user not shown)
Line 38: Line 38:
 
===Examples===
 
===Examples===
  
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):
+
[[File:Random_spawner_example_1.jpg|thumb|left|The following entity has a 25% chance to spawn ANYTHING, 30% chance to spawn a FIREARM, 15% chance to spawn a MELEE weapon, 5% chance to spawn AMMO, and 25% chance to spawn NOTHING]]
[img]http://i12.photobucket.com/albums/a225/ssba/nmrih/random_spawn_example_1.jpg[/img]
+
  
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:
+
[[File:Random_spawner_example_2.jpg|thumb|left|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]]{{clr}}
[img]http://i12.photobucket.com/albums/a225/ssba/nmrih/random_spawn_example_2.jpg[/img]
+
  
 
==Limiting Spawns==
 
==Limiting Spawns==

Latest revision as of 09:57, 1 April 2017


No More Room in Hell has a customized system of spawning items, weapons, and ammo.

There are two ways of spawning items: directly (via classname), and randomly.

NOTE: As usual, if you guys have any questions about this please let me know!

Setting up Item Spawning

To get item spawning working in your map

Directly 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. 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.


Randomly No More Room in Hell's random spawner may be familiar to those of you who have previously done mapping for ZP:S. 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.


  • 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.
    • If the total value goes over 100, the values will be normalized such that the total is 100.
    • If the total value is under 100, then there will be a chance for nothing to spawn.
  • 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.
  • In order to further customize the spawner, turn off Smart Edit mode.
    • When not in smart edit mode, you may add entries for individual items.
    • Add a new key whose name is the classname of the item you would like to spawn.
    • As before, the value is the chance for this item to spawn (in %).
    • Keywords are also accepted when not in smart edit.
  • 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).

A full list of item classnames and accepted keywords may be found here.

Examples

The following entity has a 25% chance to spawn ANYTHING, 30% chance to spawn a FIREARM, 15% chance to spawn a MELEE weapon, 5% chance to spawn AMMO, and 25% chance to spawn NOTHING
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

Limiting Spawns

In addition to this entity, there is also the ability to limit the total number of spawned items per round.

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.

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.

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.


How the Limiter Works

The limiter is quite simple in functionality.

  • 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.
  • 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.
  • Any random_spawner entity that requests a spawn after level load are immediately either spawned or rejected.

List of Items

Allowed Category Keywords

  • any
  • ammo
  • archery
  • explosive
  • firearm
  • handgun
  • item
  • machinegun
  • melee
  • military
  • rifle
  • shotgun

Weapon Classnames (Grouped by Category)

  • any
    • firearm
      • handgun
        • fa_1911
        • fa_glock17
        • fa_mkii
        • fa_sw686
        • fa_m92fs
      • rifle
        • fa_1022
        • fa_1022_25mag
        • fa_cz858
        • fa_sako85
        • fa_jae700
        • fa_sks
        • fa_fnfal
      • shotgun
        • fa_500a
        • fa_870
        • fa_superx3
        • fa_sv10
        • fa_winchester1892
      • machinegun
        • fa_mac10
      • military
        • fa_mp5a3
        • fa_m16a4
        • fa_m16a4_carryhandle
      • archery
        • bow_deerhunter
    • melee
      • me_axe_fire
      • me_bat_metal
      • me_chainsaw
      • me_abrasivesaw
      • me_crowbar
      • me_etool
      • me_fubar
      • me_hatchet
      • me_kitknife
      • me_machete
      • me_pipe_lead
      • me_shovel
      • me_sledge
      • me_wrench
    • explosive
      • exp_grenade
      • exp_molotov
      • exp_tnt
    • items
      • tool_barricade
      • tool_extinguisher
      • tool_welder
      • tool_flare_gun
      • item_bandages
      • item_first_aid
      • item_maglite
      • item_pills
      • item_gene_therapy
      • item_walkietalkie
    • ammo
      • ammobox_9mm
      • ammobox_45acp
      • ammobox_357
      • ammobox_12gauge
      • ammobox_22lr
      • ammobox_308
      • ammobox_556
      • ammobox_762mm
      • ammobox_arrow
      • ammobox_flare
      • ammobox_board
      • ammobox_fuel

Video Tutorial

Random Spawner - NMRiH Tutorial