Draft:Monster generation

From Omega Wiki
Jump to navigation Jump to search
Omega 0.90.4

Monster generation determines which creatures appear, where they are placed and which possessions and abilities they begin with. Ordinary dungeon populations, countryside encounters, fixed scenes and summoning do not all use the same selection rules. A monster's listed level is a template value, not a guarantee of when it can appear or how dangerous it will be.[1]

Random selection

The ordinary difficulty-based selector draws from the beginning of the monster catalogue up to a difficulty-dependent boundary, retrying any template reserved for special construction. It includes lower-level creatures rather than choosing only creatures of the current difficulty.[2]

Difficulty Template level bands considered Eligible ordinary templates
0 0 8
1 0–1 30
2 0–2 44
3 0–3 58
4 0–4 76
5 0–5 90
6 0–6 103
7 0–7 117
8 0–8 129
9 or higher 0–9 at difficulty 9; all bands at 10 or higher, with no additional eligible templates 137

Within a permitted range the templates have approximately equal weight, not equal weight per level band. The counts above describe the ordinary pool, not every creature which can appear in that location. The random helper divides 10,000 buckets into the requested range, so fractions such as one third or one twelfth below are nominal weights with slight rounding differences.[3]

Difficulty by location

Let D be the current dungeon depth. Division in these formulas rounds down. Player level does not directly enter this difficulty calculation.[4]

Location Difficulty
Goblin Caves floor(D / 3) + 1
Sewers floor(D / 6) + 3
Archmage's Castle floor(D / 4) + 4
HellWell Volcano floor(D / 4) + 5
Astral Plane, Circle, Magic Isle, main temples 8
Countryside and outdoor tactical encounters; mansions 7
Rampart; hovels 3
Villages 1
Arena; ordinary houses 5
Dragon's Lair; Star Peak 9
Abyss 10

Other random paths

The countryside tables' wildcard is different: it directly chooses a template from bands 0–8 without the ordinary special-template rejection. It can therefore produce a Goblin King, Great Wyrm or historical officeholder. Terrain without a dedicated table instead uses the ordinary difficulty-based selector. Unrestricted hostile summoning draws from all 150 templates, including creatures beyond both of these pools.[5]

Fixed construction does not enforce a global one-living-copy limit on a named creature. A particular quest or map loader can still suppress its own placement after completion. Treat those location flags and the ordinary random-pool filter as separate rules.[6]

Dungeon populations

When a dungeon floor is generated, its ordinary population has 3 × (R(floor(difficulty / 3)) + 1) + 8 placements, where R(N) returns a value from 0 through N - 1 and R(0) is zero. Add ten in the Castle or Astral Plane and twenty in the Volcano. Fixed inhabitants are additional to this population.[7]

Placement searches for an unoccupied, nonsecret floor square. Water-only creatures have their starting square changed into water. The selector does not require a square outside the player's view, and its ordinary floor search has no check excluding the player's own coordinates.[8]

Goblin Caves

For each placement, the game tries the shaman roll first, then a separate chieftain roll, then the goblin roll. Define S = clamp(10D - 51, 0, 100) / 100 and C = clamp(10D - 1, 0, 100) / 100.[9]

Selection branch Weight
Goblin shaman S
Goblin chieftain (1 - S) × C
Goblin (1 - S) × (1 - C) × 49 / 100
Ordinary random pool (1 - S) × (1 - C) × 51 / 100

The random branch can itself select one of the goblin types if its difficulty permits it, so the table is not the final species probability. At depth 1 the direct branches are 0% shaman, 9% chieftain and 44.59% goblin; the remaining 46.41% uses the ordinary pool.

Sewers

One third of placements use the ordinary random pool immediately. Otherwise roll an index from 0 through D + 2 and consult this table; any index beyond 15 also uses the ordinary pool. Each available listed index therefore has nominal branch weight 2 / (3 × (D + 3)).[10]

Index Creature Index Creature
0 Sewer rat 8 Denebian slime devil
1 Aggravator fungus 9 Giant crocodile
2 Blipper 10 Tesla monster
3 Night gaunt 11 Shadow spirit
4 Transparent nasty 12 Bog thing
5 Murk fungus 13 Water elemental
6 Catoblepas 14 Triton
7 Acid cloud 15 Rodent of unusual size

Astral Plane

Half of placements choose from the first list below. A further quarter chooses the current plane's elemental on depths 1–4, or a creature from the deep-Astral list on depth 5. The remaining quarter uses the ordinary difficulty-8 pool. Each member of a twelve-entry list has nominal branch weight 1/24 or 1/48 respectively, before any additional chance through the ordinary pool.[11]

Selection Candidates
All planes: twelve-entry list Thought-form, astral fuzzy, ban sidhe, etheric grue, shadow spirit, astral vampire, manaburst, rakshasa, illusory fiend, mirror master, elder etheric grue, shadow slayer
Depths 1, 2, 3, 4 Earth, air, water, fire elemental, respectively
Depth 5: twelve-entry list Night gaunt, servant of law, servant of chaos, frost demon, outer circle demon, demon serpent, angel, inner circle demon, frost demon lord, high angel, demon prince, archangel

Volcano and Castle

In the Volcano, half of placements choose an ordinary template from bands 4–9, irrespective of the current ordinary difficulty ceiling. Otherwise choose an index from 0 through floor(D / 2) + 1. The following are the reachable indexed entries within the twenty-level dungeon; each available index has nominal branch weight 1 / (2 × (floor(D / 2) + 2)).[12]

Index Creature Index Creature
0 Haunt 6 Fire elemental
1 Incubus or succubus 7 Lich
2 Dragonette 8 Rakshasa
3 Frost demon 9 Demon serpent
4 Spectre 10 Nazgul
5 Lava worm 11 Flame devil

The source has further indexed cases starting at 12, but the normal depth limit never selects them. This does not exclude those species from the Volcano: eligible ordinary templates can still arrive through its first, level-4–9 branch or later wandering checks.

In the Castle, one quarter of placements chooses an enchanter at difficulty below 5, a necromancer at difficulty 5, a fire elemental at difficulty 6–7, or a high thaumaturgist at difficulty 8 or higher. The other three quarters use the ordinary pool.[13]

Later arrivals

Ten-minute checks, including the hourly check which replaces every sixth one, try to add a wandering creature when the current environment is the current dungeon. The test is R(maximum dungeon levels) < difficulty, giving nominal chance difficulty / maximum levels, capped at certainty. This uses the ordinary difficulty pool, not the initial themed table. Waiting on a cleared dungeon floor can therefore bring new occupants.[14]

Countryside encounters

An outdoor tactical population makes (R(5) + 1) × (R(3) + 1) placements. This is a product, not a uniform choice from 1 through 15. Each placement independently chooses one of ten slots from the applicable terrain table. Repeated entries below are shown as weights out of ten; wildcard has the less restricted meaning explained above.[15]

Terrain Ten selection slots
Plains Rabbit ×2; hornet, quail, hawk, deer, wolf, lion, brigand, wildcard ×1 each
Forest Deer ×2; rabbit, quail, hawk, badger, wolf, bear, brigand, wildcard ×1 each
Jungle Giant soldier ant ×2, hyena ×2; anteater, parrot, mamba, elephant, lion, wildcard ×1 each
River Trout ×2, striped bass ×2, giant crocodile ×2; quail, man o' war, brigand, wildcard ×1 each
Swamp Striped bass ×2, giant crocodile ×2, giant soldier ant ×2, wildcard ×3; bog thing ×1
Desert Hawk, camel, hyena, lion, wildcard ×2 each
Tundra Wolf ×2, bear ×2, deer ×2, wildcard ×4
Mountains, passes, volcano terrain Hawk ×3, wolf ×2, wildcard ×3; rabbit and sheep ×1 each

These weights describe one placement inside an encounter, not the chance that travelling on a terrain square triggers a fight. All resulting creatures receive awareness equal to the map width. Coordinates are chosen without the dungeon's empty-floor search, so placements can collide; the number requested is not a promise of that many distinct visible occupied squares. Water-only creatures receive water at their starting position.[16]

Construction and variants

Ordinary construction copies the species, applies identity-specific changes, and may set it awake. With no pre-existing awake flag, a sleep rating S is beaten when a random 0–99 roll is strictly greater than S: a rating of zero is initially awake on 99% of constructions, while 100 never passes this roll. Wakeup on approach is a later behavior check.[17]

A fixed starting item is copied from its current base definition when its uniqueness state permits it. Additional random possessions number from zero through treasure allowance minus one, with zero allowance giving none. Those additional objects must be ordinary items; a reserved unique object is rejected and another is tried. Fixed equipment and extra random loot are thus different sources. Possessions also do not replace the creature's innate attack ratings.[18]

Historical adventurers and officeholders use their own constructors. Were-humans can later change form while retaining some earlier values. The arena instead copies a selected template directly, skipping ordinary starting loot, adds its exit opener, makes the opponent awake and named, adds ten HP per monster level, doubles hit, and adds half the original damage rating rounded down. Its late random matches exclude dynamic human templates and zero-damage templates; its fixed sequence and champion use separate rules.[19]

Strategy

Use the location's actual population rules when judging risk. The early Volcano can select high-level ordinary creatures through its dedicated broad range, while an ordinary summoning spell in Rampart uses difficulty 3. A countryside wildcard can bypass exclusions that would protect the ordinary dungeon pool.

Do not assume a cleared floor remains clear indefinitely, or that seeing a familiar glyph guarantees an ordinary specimen. Arena and historical forms can have different stats and loot. Consult the creature directory for the actual species and Monster remains for death rewards; killing a creature and retrieving a quest trophy are separate stages.

References

  1. lev.c in Omega 0.90.4, lines 11–239; lev.c in Omega 0.90.4, lines 262–399; effect3.c in Omega 0.90.4, lines 7–43.
  2. lev.c in Omega 0.90.4, lines 280–311; defs.h in Omega 0.90.4, lines 1071–1094; minit.h in Omega 0.90.4, lines 5–306.
  3. util.c in Omega 0.90.4, lines 26–31; lev.c in Omega 0.90.4, lines 280–311.
  4. lev.c in Omega 0.90.4, lines 465–497.
  5. lev.c in Omega 0.90.4, lines 47–66; lev.c in Omega 0.90.4, lines 316–394; effect3.c in Omega 0.90.4, lines 7–43.
  6. lev.c in Omega 0.90.4, lines 262–277; lev.c in Omega 0.90.4, lines 316–394; gen1.c in Omega 0.90.4, lines 394–431; gen2.c in Omega 0.90.4, lines 412–433.
  7. gen1.c in Omega 0.90.4, lines 87–125; lev.c in Omega 0.90.4, lines 78–239.
  8. util.c in Omega 0.90.4, lines 578–639; lev.c in Omega 0.90.4, lines 89–92; lev.c in Omega 0.90.4, lines 214–229.
  9. lev.c in Omega 0.90.4, lines 94–103.
  10. lev.c in Omega 0.90.4, lines 104–126.
  11. lev.c in Omega 0.90.4, lines 127–165.
  12. lev.c in Omega 0.90.4, lines 166–196; defs.h in Omega 0.90.4, line 156; aux2.c in Omega 0.90.4, line 1078.
  13. lev.c in Omega 0.90.4, lines 197–210.
  14. aux3.c in Omega 0.90.4, lines 11–47; lev.c in Omega 0.90.4, lines 246–257.
  15. lev.c in Omega 0.90.4, lines 11–70.
  16. lev.c in Omega 0.90.4, lines 35–70; aux2.c in Omega 0.90.4, lines 1160–1186.
  17. lev.c in Omega 0.90.4, lines 316–394; mon.c in Omega 0.90.4, lines 12–30.
  18. lev.c in Omega 0.90.4, lines 373–394; mmelee.c in Omega 0.90.4, lines 8–51.
  19. lev.c in Omega 0.90.4, lines 341–394; mon.c in Omega 0.90.4, lines 529–750; mspec.c in Omega 0.90.4, lines 407–440; guild1.c in Omega 0.90.4, lines 349–450; env.c in Omega 0.90.4, lines 63–76.