view config/game.toml @ 37:a88effe4831e default tip

Added tag 1.0.0 for changeset a464bd43b76c
author ark
date 2026-10-21 22:36 +0200
parents a464bd43b76c
children
line wrap: on
line source

# game settings. tools/build.py checks this file and writes www/data/config.js.
#
# units: distances in map pixels (pixels of the map image as scanned), times
# in seconds, speeds in map pixels per second. doc/architecture.md lists
# the sections.


[scale]
map = 1.0
sprite = 0.25       # towers, monsters, projectiles
coin = 0.4
hp_bar = 0.25


# monsters: hp, coins dropped on death, speed. boss marks the boss of a
# map, b0 for map0 and so on.

[monster.m0]
hp = 5
coins = 1
speed = 35

[monster.m1]
hp = 10
coins = 1
speed = 40

[monster.m2]
hp = 15
coins = 2
speed = 55

[monster.m3]
hp = 20
coins = 2
speed = 40

[monster.m4]
hp = 30
coins = 3
speed = 45

[monster.b0]
hp = 150
coins = 10
speed = 25
boss = true

[monster.b1]
hp = 300
coins = 20
speed = 20
boss = true

[monster.b2]
hp = 350
coins = 30
speed = 30
boss = true

[monster.b3]
hp = 500
coins = 40
speed = 25
boss = true


[animation]
hop_time = 0.35
hop_height = 5
squash = 0.06       # on landing, wider and flatter
stretch = 0.04      # in the air
idle_bob = 0.02
hit_radius = 0.4    # share of the monster sprite's smaller side
death_puff = 0.4    # seconds the death puff shows
freeze_splash = 0.4 # seconds the t2 freeze splash shows


# variation between monsters, so they do not walk in single file
[movement]
speed_variation = 0.05  # each monster's speed differs by up to this share either way
offset = 0.45           # largest sideways offset from the centre line, share of the road half width
lean = 0.5              # fixed part of a monster's offset, share of the largest offset
wander_step = 40        # distance along the route between the wandering part's values
fade_in = 20            # distance from the route start over which the offset grows from 0


[route_preference]
reference_speed = 40
bias = 3
min_weight = 0.1


# towers have 5 levels. damage, range, slow and cost give the values at
# level 1 and level 5; the build fills in the levels between in equal steps,
# rounded to whole numbers when both ends are whole. cost is the price of
# building (level 1) or of upgrading to that level. attack_time is the time
# between attacks, the same at every level. projectile_speed 0
# means a melee tower: each attack damages every monster in range. damage
# may be left out for a tower that only slows.

# melee tower. low damage because it often hits multiple monsters.
[tower.t0]
damage = [2, 6]
cost = [5, 25]
range = [60, 70]
attack_time = 1.5
projectile = "p0"
projectile_speed = 0

# standard tower
[tower.t1]
damage = [3, 15]
cost = [10, 30]
range = [100, 116]
attack_time = 0.7
projectile = "p1"
projectile_speed = 300

# freeze tower, no damage. p2 bursts where it lands and slows every
# monster within splash_radius, about two monsters across.
[tower.t2]
cost = [20, 40]
range = [90, 106]
attack_time = 1.2
projectile = "p2"
projectile_speed = 220
slow = [0.60, 0.30]
slow_time = 2.0
splash_radius = 28

# sniper tower. slightly weaker, slower and more expensive than standard tower
# to balance much higher range
[tower.t3]
damage = [2, 13]
cost = [15, 35]
range = [220, 260]
attack_time = 0.9
projectile = "p3"
projectile_speed = 800

[tower_rules]
sell_refund = 0.5       # half of everything paid for the tower, rounded down


[placement]
footprint_radius = 16
max_gap = 14
min_tower_distance = 40
edge_distance = 16
snap_radius = 48
grid_cell = 4


[waves]
first_break = 40
break = 30
spawn_interval = 1.0


[hearts]
per_map = 10
monster = 1
boss = 10


[coins]
flight_time = 0.7
max_sprites = 8


[controls]
speeds = [1, 2, 4]


# sound events (doc/art.md, sound). the recordings come from art/sounds/, named
# after the event. per event: volume is a share of full volume. min_interval
# is the least time between two plays; plays in between are dropped. beep is
# the placeholder for an event without a recording, as notes of [frequency in
# Hz, seconds].
[sound]
enabled = true          # until the player switches sound on or off in the game
volume = 0.8            # base for all sounds
beep_wave = "square"
music_fade = 0.4        # seconds the splash screen music takes to fade out

[sound.event]
t0_attack = { volume = 0.6 }
t1_shot = { volume = 0.4 }
t2_shot = { volume = 0.4 }
t3_shot = { volume = 0.5 }
monster_enter = { volume = 0.4 }
monster_exit = { volume = 0.8 }
monster_die = { volume = 0.5 }
monster_hit = { volume = 0.2, min_interval = 0.05, beep = [[1200, 0.03]] }
boss_enter = { volume = 1.0 }
boss_exit = { volume = 1.0 }
boss_die = { volume = 1.0 }
coins_arrive = { volume = 0.25, min_interval = 0.08, beep = [[1568, 0.04], [2093, 0.06]] }
wave_start = { volume = 0.4, beep = [[440, 0.1], [660, 0.15]] }
early_bonus = { volume = 0.4, beep = [[880, 0.06], [1175, 0.06], [1760, 0.1]] }
tower_built = { volume = 0.4, beep = [[330, 0.05], [494, 0.08]] }
tower_upgraded = { volume = 0.4, beep = [[392, 0.05], [587, 0.05], [784, 0.08]] }
tower_sold = { volume = 0.4, beep = [[494, 0.05], [330, 0.08]] }
placement_refused = { volume = 0.4, beep = [[220, 0.12], [165, 0.18]] }
button_tap = { volume = 0.3, beep = [[1000, 0.02]] }
map_won = { volume = 1.0 }
map_lost = { volume = 1.0 }
intro = { volume = 1.0 }   # splash screen music, looped


# sprite drawing direction (doc/art.md): angle the drawing points to as
# drawn, 0 right, -90 up. sprites not listed do not turn. set by hand, the
# towers checked in temp/preview/towers.png.
[art.angle]
t1 = -2
t1_2 = -3
t1_3 = -6
t1_4 = 0
t1_5 = 0
t2 = -95
t2_2 = -90
t2_3 = -89
t2_4 = -90
t2_5 = -95
t3 = -43
t3_2 = -48
t3_3 = -15
t3_4 = -15
t3_5 = -88
p0 = -90
p1 = 0
p3 = -45

# rotation point as a share of the trimmed image's width and height, for
# sprites that do not turn around their centre (doc/art.md): the middle of
# the tower's body. set by hand, checked in temp/preview/towers.png.
[art.pivot]
t1 = [0.37, 0.5]
t1_2 = [0.30, 0.5]
t1_3 = [0.33, 0.48]
t1_4 = [0.35, 0.52]
t1_5 = [0.27, 0.5]
t2 = [0.49, 0.57]
t2_2 = [0.50, 0.61]
t2_3 = [0.50, 0.64]
t2_4 = [0.48, 0.71]
t2_5 = [0.50, 0.72]
t3 = [0.40, 0.62]
t3_2 = [0.41, 0.59]
t3_3 = [0.41, 0.43]
t3_4 = [0.45, 0.46]
t3_5 = [0.49, 0.54]

# where the button of each screen sits on the screen's drawing: the top left
# corner of the separate button image, in pixels of the trimmed drawing.
[art.screen]
splash = [479, 463]
map_won = [210, 225]
game_lost = [172, 230]
game_won = [373, 383]
# the logo and help buttons beside the play button on the splash screen:
# top left corner and height, in pixels of the trimmed splash drawing
splash_logo = [119, 463, 164]
splash_help = [896, 463, 164]
# the email address on the help popup, a tap on it writes a mail: top left
# corner, width and height, in pixels of the drawing, with a margin
help_email = [690, 1505, 665, 100]


# web page the logo on the splash screen opens in a new tab. empty: the
# logo does nothing. the address and subject of the mail written from the
# help popup. empty address: the email on the popup does nothing
[links]
logo_url = "https://www.wobblyhead.net/games/minor_monsters.html"
email = "info@wobblyhead.net"
email_subject = "Minor Monsters"


# debug switches, all off by default
[debug]
start_coins = -1        # coins at the start of a map, -1 uses the map's value
unlimited_coins = false
start_map = 0
start_wave = 1          # the first wave to play, from 1
no_heart_loss = false
show_routes = false
show_grid = false
show_ranges = false
show_hit_areas = false
show_stats = false      # frame time and entity counts
seed = 0                # random seed, 0 picks a new one each run


# maps. waves: number of each monster in the wave. the boss spawns first, the
# others follow one per spawn interval, in random order. the boss is in the
# last wave. monster_share, wave_size and first_wave are the numbers
# tools/balance.py --draft makes wave lists from; the game does not use them.

[map.0]
starting_coins = 10
early_bonus = 0.05
wave_count = 6
monster_share = [36, 25, 18, 12, 9]     # draft: % of regular monsters by count, m0-m4
wave_size = [4, 7]                      # draft: regular monsters in the first and the last wave
first_wave = [1, 2, 2, 4, 5]            # draft: wave in which each monster first appears, m0-m4
spawn_interval = 1.0                    # seconds between spawns
path_half_width = 19                    # centre line to road edge
spawn_distance = 50
exit_distance = 40

[map.1]
starting_coins = 20
early_bonus = 0.1
wave_count = 8
monster_share = [36, 25, 18, 12, 9]
wave_size = [6, 17]
first_wave = [1, 2, 3, 5, 6]
spawn_interval = 0.65
path_half_width = 17
spawn_distance = 50
exit_distance = 40

[map.2]
starting_coins = 30
early_bonus = 0.2
wave_count = 10
monster_share = [39, 26, 17, 11, 7]
wave_size = [10, 36]
first_wave = [1, 2, 4, 6, 8]
spawn_interval = 0.65
path_half_width = 16
spawn_distance = 50
exit_distance = 40

[map.3]
starting_coins = 40
early_bonus = 0.3
wave_count = 12
monster_share = [52, 26, 13, 6, 3]
wave_size = [5, 16]
first_wave = [1, 2, 4, 6, 9]
spawn_interval = 0.5
path_half_width = 22
spawn_distance = 50
exit_distance = 40

# map0 waves

[[map.0.wave]]   # wave 1
monsters = { m0 = 4 }

[[map.0.wave]]   # wave 2
monsters = { m0 = 2, m1 = 2, m2 = 1 }

[[map.0.wave]]   # wave 3
monsters = { m0 = 2, m1 = 2, m2 = 1 }

[[map.0.wave]]   # wave 4
monsters = { m0 = 2, m1 = 2, m2 = 1, m3 = 1 }

[[map.0.wave]]   # wave 5
monsters = { m0 = 1, m1 = 2, m2 = 1, m3 = 1, m4 = 1 }

[[map.0.wave]]   # wave 6
monsters = { m0 = 1, m1 = 1, m2 = 1, m3 = 2, m4 = 2, b0 = 1 }

# map1 waves

[[map.1.wave]]   # wave 1
monsters = { m0 = 6 }

[[map.1.wave]]   # wave 2
monsters = { m0 = 5, m1 = 3 }

[[map.1.wave]]   # wave 3
monsters = { m0 = 4, m1 = 3, m2 = 2 }

[[map.1.wave]]   # wave 4
monsters = { m0 = 4, m1 = 4, m2 = 3 }

[[map.1.wave]]   # wave 5
monsters = { m0 = 4, m1 = 3, m2 = 3, m3 = 2 }

[[map.1.wave]]   # wave 6
monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 3, m4 = 2 }

[[map.1.wave]]   # wave 7
monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 3, m4 = 3 }

[[map.1.wave]]   # wave 8
monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 4, m4 = 4, b1 = 1 }

# map2 waves

[[map.2.wave]]   # wave 1
monsters = { m0 = 10 }

[[map.2.wave]]   # wave 2
monsters = { m0 = 9, m1 = 4 }

[[map.2.wave]]   # wave 3
monsters = { m0 = 10, m1 = 6 }

[[map.2.wave]]   # wave 4
monsters = { m0 = 9, m1 = 7, m2 = 3 }

[[map.2.wave]]   # wave 5
monsters = { m0 = 10, m1 = 7, m2 = 5 }

[[map.2.wave]]   # wave 6
monsters = { m0 = 9, m1 = 7, m2 = 5, m3 = 3 }

[[map.2.wave]]   # wave 7
monsters = { m0 = 9, m1 = 7, m2 = 6, m3 = 5 }

[[map.2.wave]]   # wave 8
monsters = { m0 = 8, m1 = 7, m2 = 6, m3 = 6, m4 = 3 }

[[map.2.wave]]   # wave 9
monsters = { m0 = 8, m1 = 7, m2 = 7, m3 = 6, m4 = 5 }

[[map.2.wave]]   # wave 10
monsters = { m0 = 8, m1 = 7, m2 = 7, m3 = 7, m4 = 7, b2 = 1 }

# map3 waves

[[map.3.wave]]   # wave 1
monsters = { m0 = 5 }

[[map.3.wave]]   # wave 2
monsters = { m0 = 5, m1 = 1 }

[[map.3.wave]]   # wave 3
monsters = { m0 = 5, m1 = 2 }

[[map.3.wave]]   # wave 4
monsters = { m0 = 5, m1 = 2, m2 = 1 }

[[map.3.wave]]   # wave 5
monsters = { m0 = 5, m1 = 3, m2 = 1 }

[[map.3.wave]]   # wave 6
monsters = { m0 = 5, m1 = 3, m2 = 2 }

[[map.3.wave]]   # wave 7
monsters = { m0 = 5, m1 = 3, m2 = 2, m3 = 1 }

[[map.3.wave]]   # wave 8
monsters = { m0 = 6, m1 = 3, m2 = 2, m3 = 1 }

[[map.3.wave]]   # wave 9
monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 1 }

[[map.3.wave]]   # wave 10
monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 1, m4 = 1 }

[[map.3.wave]]   # wave 11
monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 2, m4 = 1 }

[[map.3.wave]]   # wave 12
monsters = { m0 = 6, m1 = 4, m2 = 3, m3 = 2, m4 = 1, b3 = 1 }