GeneratorFiles

From Amulets & Armor Wiki
Revision as of 21:39, 2 December 2016 by PeeWeeRotA (Talk | contribs) (Example)

Jump to: navigation, search

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

[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 1002 114 255 40000 3 0 50 50 0 2
G 1002 106 6 24000 3 0 50 50 0 2
G 1002 -336 6 8000 3 0 50 50 0 2
G 1002 -326 265 56000 3 0 50 50 0 2
G 4080 1508 2586 40000 5 0 50 50 0 14