1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-18 02:58:32 +02:00
Rampant/libs/Constants.lua

329 lines
7.4 KiB
Lua
Raw Normal View History

local constants = {}
2016-08-24 17:05:20 -07:00
-- versions
constants.VERSION_5 = 5
constants.VERSION_9 = 9
2016-09-14 11:16:00 -07:00
constants.VERSION_10 = 10
2016-10-14 17:00:18 -07:00
constants.VERSION_11 = 11
2016-11-03 16:51:35 -07:00
constants.VERSION_12 = 12
2017-01-19 21:58:36 -08:00
constants.VERSION_13 = 13
2017-04-15 23:04:22 -07:00
constants.VERSION_14 = 14
constants.VERSION_15 = 15
2017-04-21 16:14:04 -07:00
constants.VERSION_16 = 16
2017-04-24 21:08:41 -07:00
constants.VERSION_17 = 17
2017-05-06 02:03:28 -07:00
constants.VERSION_18 = 18
2017-05-13 15:32:16 -07:00
constants.VERSION_19 = 19
constants.VERSION_20 = 20
2016-08-24 17:05:20 -07:00
-- misc
2016-08-21 14:48:55 -07:00
constants.MAGIC_MAXIMUM_NUMBER = 1e99 -- used in loops trying to find the lowest/highest score
2016-10-14 17:00:18 -07:00
constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL = 10000
2016-10-14 17:00:18 -07:00
constants.PROCESS_QUEUE_SIZE = 500
constants.SCAN_QUEUE_SIZE = 6
2016-10-30 20:24:14 -07:00
constants.PROCESS_PLAYER_BOUND = 4
2016-10-14 17:00:18 -07:00
constants.TICKS_A_SECOND = 60
constants.TICKS_A_MINUTE = constants.TICKS_A_SECOND * 60
2016-10-14 17:00:18 -07:00
constants.INTERVAL_PROCESS = 20
constants.INTERVAL_LOGIC = 40
2016-08-18 19:02:13 -07:00
-- ai
constants.AI_POINT_GENERATOR_AMOUNT = 6
2016-08-18 19:02:13 -07:00
constants.AI_SCOUT_COST = 45
2016-10-14 17:00:18 -07:00
constants.AI_SQUAD_COST = 175
2017-01-19 21:58:36 -08:00
constants.AI_VENGENCE_SQUAD_COST = 45
2016-08-18 19:02:13 -07:00
constants.AI_SETTLER_COST = 75
constants.AI_BASE_BUILDING_COST = 500
2016-08-20 12:04:04 -07:00
constants.AI_TUNNEL_COST = 100
2016-10-14 17:00:18 -07:00
constants.AI_MAX_POINTS = 10000
2016-08-18 19:02:13 -07:00
2017-05-06 02:03:28 -07:00
constants.AI_UNIT_REFUND = 3
2017-04-21 16:14:04 -07:00
2016-11-04 00:26:19 -07:00
constants.AI_MAX_SQUAD_COUNT = 40
2017-04-21 16:14:04 -07:00
constants.AI_MAX_BITER_GROUP_SIZE = 450
2016-08-18 19:02:13 -07:00
2016-10-14 17:00:18 -07:00
constants.AI_STATE_PEACEFUL = 1
constants.AI_STATE_AGGRESSIVE = 2
2017-05-13 15:32:16 -07:00
constants.AI_STATE_NOCTURNAL = 3
2016-10-14 17:00:18 -07:00
constants.AI_MIN_STATE_DURATION = 1
constants.AI_MAX_STATE_DURATION = 4
constants.AI_MIN_TEMPERAMENT_DURATION = 5
constants.AI_MAX_TEMPERAMENT_DURATION = 15
-- ai retreat
constants.NO_RETREAT_BASE_PERCENT = 0.10
constants.NO_RETREAT_EVOLUTION_BONUS_MAX = 0.25
constants.NO_RETREAT_SQUAD_SIZE_BONUS_MAX = 0.40
-- chunk properties
2016-08-06 20:38:47 -07:00
constants.CHUNK_SIZE = 32
2016-08-06 20:38:47 -07:00
constants.HALF_CHUNK_SIZE = constants.CHUNK_SIZE / 2
constants.QUARTER_CHUNK_SIZE = constants.HALF_CHUNK_SIZE / 2
constants.NORTH_SOUTH = 1
constants.EAST_WEST = 2
-- pheromone amounts
2016-08-18 19:02:13 -07:00
constants.MOVEMENT_PHEROMONE_GENERATOR_AMOUNT = 500
2016-11-03 16:51:35 -07:00
constants.ENEMY_BASE_PHEROMONE_GENERATOR_AMOUNT = 30
2017-04-21 16:14:04 -07:00
constants.DEATH_PHEROMONE_GENERATOR_AMOUNT = 500
constants.PLAYER_PHEROMONE_GENERATOR_AMOUNT = 150
2017-04-21 16:14:04 -07:00
constants.IMPASSABLE_TERRAIN_GENERATOR_AMOUNT = -30
2017-04-21 16:14:04 -07:00
-- pheromone diffusion amounts
2016-08-21 14:48:55 -07:00
2016-10-14 17:00:18 -07:00
constants.MOVEMENT_PHEROMONE_PERSISTANCE = 0.98
2017-04-21 16:14:04 -07:00
constants.BASE_PHEROMONE_PERSISTANCE = 0.99
constants.PLAYER_PHEROMONE_PERSISTANCE = 0.98
-- chunk attributes
2016-10-14 17:00:18 -07:00
constants.MOVEMENT_PHEROMONE = 1
constants.BASE_PHEROMONE = 2
constants.PLAYER_PHEROMONE = 3
2016-10-14 17:00:18 -07:00
constants.ENEMY_BASE_GENERATOR = 4
constants.PLAYER_BASE_GENERATOR = 5
constants.NORTH_SOUTH_PASSABLE = 6
constants.EAST_WEST_PASSABLE = 7
2016-10-14 17:00:18 -07:00
constants.CHUNK_TICK = 8
2017-04-21 16:14:04 -07:00
constants.RETREAT_TRIGGERED = 9
-- Squad status
constants.SQUAD_RETREATING = 1 -- used during squad retreat
constants.SQUAD_GUARDING = 2 -- used when squad is idle
2016-11-03 16:51:35 -07:00
constants.SQUAD_BURROWING = 3
constants.SQUAD_RAIDING = 4 -- used when player stuff is close
2017-01-19 21:58:36 -08:00
-- Squad Related
constants.RETREAT_GRAB_RADIUS = 24
constants.BASE_RALLY_CHANCE = 0.01
constants.BONUS_RALLY_CHANCE = 0.01
constants.MAX_RALLY_CRIES = 2
constants.RALLY_CRY_DISTANCE = 3
constants.GROUP_MERGE_DISTANCE = 28
2017-05-06 02:03:28 -07:00
-- player building pheromones
constants.BUILDING_PHEROMONES = {}
2017-04-21 16:14:04 -07:00
constants.BUILDING_PHEROMONES["generator"] = 8
constants.BUILDING_PHEROMONES["pump"] = 2
2017-05-06 02:03:28 -07:00
constants.BUILDING_PHEROMONES["reactor"] = 16
2017-04-21 16:14:04 -07:00
constants.BUILDING_PHEROMONES["offshore-pump"] = 2
constants.BUILDING_PHEROMONES["transport-belt"] = 1
constants.BUILDING_PHEROMONES["accumulator"] = 10
constants.BUILDING_PHEROMONES["solar-panel"] = 8
constants.BUILDING_PHEROMONES["boiler"] = 12
constants.BUILDING_PHEROMONES["assembling-machine"] = 10
constants.BUILDING_PHEROMONES["roboport"] = 10
constants.BUILDING_PHEROMONES["beacon"] = 10
constants.BUILDING_PHEROMONES["furnace"] = 12
2017-05-06 02:03:28 -07:00
constants.BUILDING_PHEROMONES["programmable-speaker"] = 8
2017-04-21 16:14:04 -07:00
constants.BUILDING_PHEROMONES["mining-drill"] = 15
2017-05-06 02:03:28 -07:00
constants.BUILDING_PHEROMONES["rocket-silo"] = 18
constants.BUILDING_PHEROMONES["lamp"] = 4
constants.BUILDING_PHEROMONES["radar"] = 10
-- player defense pheromones
2017-04-21 16:14:04 -07:00
constants.BUILDING_PHEROMONES["ammo-turret"] = 2.5
constants.BUILDING_PHEROMONES["wall"] = 0.25
2017-04-15 23:04:22 -07:00
constants.BUILDING_PHEROMONES["electric-turret"] = 7
constants.BUILDING_PHEROMONES["fluid-turret"] = 9
2017-04-21 16:14:04 -07:00
constants.BUILDING_PHEROMONES["turret"] = 2.5
constants.retreatFilter = {}
constants.retreatFilter[constants.SQUAD_RETREATING] = true
return constants
2017-05-06 02:03:28 -07:00
--[[
2016-10-30 20:24:14 -07:00
2017-05-06 02:03:28 -07:00
player
2016-10-30 20:24:14 -07:00
furnace
2017-05-06 02:03:28 -07:00
transport-belt
fish
boiler
container
electric-pole
generator
offshore-pump
inserter
pipe
radar
2016-10-30 20:24:14 -07:00
lamp
2017-05-06 02:03:28 -07:00
pipe-to-ground
assembling-machine
2016-10-30 20:24:14 -07:00
wall
2017-05-06 02:03:28 -07:00
mining-drill
projectile
2016-10-30 20:24:14 -07:00
resource
2017-05-06 02:03:28 -07:00
turret
ammo-turret
2016-10-30 20:24:14 -07:00
unit
2017-05-06 02:03:28 -07:00
unit-spawner
tree
2016-10-30 20:24:14 -07:00
smart-container
underground-belt
2017-05-06 02:03:28 -07:00
loader
2016-10-30 20:24:14 -07:00
splitter
2017-05-06 02:03:28 -07:00
car
solar-panel
locomotive
cargo-wagon
fluid-wagon
gate
player-port
2016-10-30 20:24:14 -07:00
straight-rail
2017-05-06 02:03:28 -07:00
curved-rail
land-mine
2016-10-30 20:24:14 -07:00
train-stop
rail-signal
rail-chain-signal
2017-05-06 02:03:28 -07:00
lab
logistic-robot
construction-robot
logistic-container
rocket-silo
roboport
storage-tank
pump
market
accumulator
beacon
combat-robot
arithmetic-combinator
decider-combinator
constant-combinator
power-switch
programmable-speaker
electric-energy-interface
reactor
heat-pipe
electric-turret
fluid-turret
night-vision-equipment
energy-shield-equipment
battery-equipment
solar-panel-equipment
generator-equipment
active-defense-equipment
movement-bonus-equipment
roboport-equipment
belt-immunity-equipment
tutorial
rocket-defense
item-with-entity-data
rail-planner
tool
blueprint
deconstruction-item
blueprint-book
selection-tool
item-with-tags
module
technology
custom-input
sprite
font
noise-layer
gui-style
utility-constants
utility-sounds
utility-sprites
ambient-sound
character-corpse
explosion
smoke
item-entity
arrow
flying-text
corpse
entity-ghost
tile-ghost
deconstructible-tile-proxy
item-request-proxy
particle
particle-source
leaf-particle
rail-remnants
simple-entity
decorative
ammo
armor
gun
item
capsule
repair-tool
mining-tool
item-group
item-subgroup
recipe
fluid
virtual-signal
autoplace-control
map-settings
map-gen-presets
tile
optimized-decorative
simple-entity-with-force
simple-entity-with-owner
beam
fire
stream
damage-type
ammo-category
rail-category
fuel-category
recipe-category
resource-category
module-category
equipment-grid
equipment-category
build-entity-achievement
research-achievement
finish-the-game-achievement
group-attack-achievement
construct-with-robots-achievement
deconstruct-with-robots-achievement
deliver-by-robots-achievement
train-path-achievement
player-damaged-achievement
produce-achievement
produce-per-hour-achievement
dont-use-entity-in-energy-production-achievement
kill-achievement
combat-robot-count
dont-craft-manually-achievement
dont-build-entity-achievement
achievement
rocket-silo-rocket
rocket-silo-rocket-shadow
smoke-with-trigger
sticker
--]]--