Difference between revisions of "GeneratorFiles"

From Amulets & Armor Wiki
Jump to: navigation, search
(Created page with "Every map must have a .GEN file, but most maps are empty. GEN files are only created when monsters need to be spawned in through scripting. Generators are almost always used f...")
 
(Example)
Line 34: Line 34:
  
 
<nowiki>
 
<nowiki>
 
+
; G=Generator ObjType X Y Angle EverySeconds PlusRandomSeconds
; G=Generator ObjType X Y Angle EverySeconds PlusRandomSeconds
+
; MaxObjects MaxLikeObjects Active MaxGenerate
; MaxObjects MaxLikeObjects Active MaxGenerate
+
G 1002 1008 1280 40000 3 0 50 50 0 2
G 1002 1008 1280 40000 3 0 50 50 0 2
+
G 1002 1296 968 24000 3 0 50 50 0 2
G 1002 1296 968 24000 3 0 50 50 0 2
+
 
+
 
</nowiki>
 
</nowiki>

Revision as of 21:35, 2 December 2016

Every map must have a .GEN file, but most maps are empty. GEN files are only created when monsters need to be spawned in through scripting. Generators are almost always used for multiple monster spawners, but are occasionally used to spawn single items. One example is Quest 2 Map 1 in "Knights of Andrew". The Key is generated.

Generator files contain indexed rows of Generator entries. They are referred to in script by their index.

Format

Generator lines follow the following format: [G] [ObjType] [X] [Y] [Angle] [EverySeconds] [PlusRandomSeconds] [MaxObjects] [MaxLikeObjects] [Active] [MaxGenerate]

Arguments

G - G is an identifier that this line is a Generator. Only lines starting with "G" are considered valid generator lines

ObjType - Object Type to spawn. Use list of Thing Numbers as a reference.

X - X position on level

Y - Y position on level

Angle - Angle of object. This is an in game angle system, angles seem to be fractions of 60000. Needs verified

EverySeconds - Time between spawns in Seconds

PlusRandomSeconds - Additional time between spawn

MaxObjects - Maximum number of objects of this type allowed in level. If more exist, generate attempt fails.

MaxLikeObjects - Maximum number of objects with the same Base type in level. If more exist, generate attempt fails.

Active - 0 to start off. 1 to start on

MaxGenerate - Total number of times the generator can successfully generate an object before permanently shutting off. Does not reset when deactivated and reactivated.

Example

; G=Generator ObjType X Y Angle EverySeconds PlusRandomSeconds ; MaxObjects MaxLikeObjects Active MaxGenerate G 1002 1008 1280 40000 3 0 50 50 0 2 G 1002 1296 968 24000 3 0 50 50 0 2