mirror of
https://github.com/veden/Rampant.git
synced 2026-06-19 22:15:20 +02:00
forgot to remove some debugging
This commit is contained in:
@@ -1,2 +1,11 @@
|
||||
# Rampant
|
||||
Factorio Mod - Basic AI Replacement
|
||||
Factorio Mod - Uses potential fields to improve the enemy AI
|
||||
|
||||
# Features
|
||||
|
||||
Tactical Retreats
|
||||
Unit Group Merging
|
||||
Unit Group Forming
|
||||
Probing Behaviour Against Defenses
|
||||
Player Hunting
|
||||
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ function onTick(event)
|
||||
if (event.tick % 20 == 0) then
|
||||
local surface = game.surfaces[1]
|
||||
|
||||
if (event.tick % 60 == 0) then
|
||||
if (event.tick % 40 == 0) then
|
||||
if not game.players[1].cheat_mode then
|
||||
game.players[1].cheat_mode = true
|
||||
end
|
||||
|
||||
@@ -20,6 +20,8 @@ local SQUAD_HUNTING = constants.SQUAD_HUNTING
|
||||
local SQUAD_GUARDING = constants.SQUAD_GUARDING
|
||||
local SQUAD_SUICIDE_HUNT = constants.SQUAD_SUICIDE_HUNT
|
||||
|
||||
local AI_TUNNEL_COST = constants.AI_TUNNEL_COST
|
||||
|
||||
local ENEMY_BASE_GENERATOR = constants.ENEMY_BASE_GENERATOR
|
||||
local MAGIC_MAXIMUM_NUMBER = constants.MAGIC_MAXIMUM_NUMBER
|
||||
|
||||
|
||||
@@ -85,6 +85,9 @@ function aiBuilding.scouting(regionMap, surface, natives)
|
||||
-- if ()
|
||||
end
|
||||
|
||||
function aiBuilding.digTunnel(regionMap, surface, natives)
|
||||
|
||||
end
|
||||
|
||||
function aiBuilding.formSquads(regionMap, surface, natives, chunk, neighbors, evolution_factor)
|
||||
if (natives.points > AI_SQUAD_COST) then
|
||||
|
||||
@@ -15,6 +15,7 @@ constants.AI_SCOUT_COST = 45
|
||||
constants.AI_SQUAD_COST = 150
|
||||
constants.AI_SETTLER_COST = 75
|
||||
constants.AI_BASE_BUILDING_COST = 500
|
||||
constants.AI_TUNNEL_COST = 100
|
||||
|
||||
constants.AI_MAX_SQUAD_SIZE = 120
|
||||
constants.AI_MAX_SQUAD_COUNT = 30
|
||||
|
||||
@@ -18,6 +18,10 @@ local processorsProbabilityHigh = {}
|
||||
|
||||
-- module code
|
||||
|
||||
-- processing is not consistant as it depends on the number of chunks that have been generated
|
||||
-- so 200 chunks is processed 3 times a second and 1200 chunks is processed once a second
|
||||
-- In theory, this might be fine as smaller bases have less surface to attack and need to have
|
||||
-- pheromone dissipate at a faster rate.
|
||||
function mapProcessor.processMap(regionMap, surface, natives, evolution_factor)
|
||||
local count = 0
|
||||
|
||||
|
||||
@@ -149,6 +149,7 @@ function unitGroupUtils.regroupSquads(natives)
|
||||
if (squad.status == SQUAD_RETREATING) and ((squad.cycles == 0) or (squad.group.state == GROUP_STATE_FINISHED)) then
|
||||
squad.status = SQUAD_GUARDING
|
||||
squad.cycles = 0
|
||||
-- print("reseting squad status")
|
||||
elseif (squad.cycles > 0) then
|
||||
squad.cycles = squad.cycles - 1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user