1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-16 02:33:53 +02:00

see readme

This commit is contained in:
Aaron Veden 2017-06-24 11:41:57 -07:00
parent 337951c548
commit a246928452
6 changed files with 13 additions and 16 deletions

View File

@ -11,7 +11,8 @@ https://forums.factorio.com/viewtopic.php?f=94&t=31445
0.14.10 factorio version fixed more pathing issues 0.14.10 factorio version fixed more pathing issues
0.14.4 factorio version fixed some issues with unit groups commands 0.14.4 factorio version fixed some issues with unit groups commands
There will be a slight pause the first time this is started up due to indexing all the chunks that have been generated. There will be a pause the first time and on every upgrade that Rampant loads.
This is due to indexing all the chunks that have been generated.
MP should be working MP should be working
If experiencing desyncs, after an update, please do the following: If experiencing desyncs, after an update, please do the following:
@ -57,10 +58,13 @@ Configure Options not in game menu:
# Version History # Version History
0.15.16 - 0.15.16 -
- Tweak: Increased chunks processed at a time from 200 to 3000 - Tweak: Increased death pheromone weight for squad attack from 1 to 2
- Tweak: Increased failed unit behaviors from 6 to 10 - Tweak: Increased failed unit behaviors from 6 to 10
- Improvement: Added labs to list of targets
- Improvement: Removed chunks processed at a time limit
- Optimization: Moved chunk reindexing to mod load as opposed to ingame
- Optimization: Preallocated a position for use in squad movement - Optimization: Preallocated a position for use in squad movement
- Optimization: Greatly reduced reindexing time and chunk scoring - Optimization: Greatly reduced reindexing and chunk scoring time
- Framework: Split chunk scoring and custom ai chunk purging - Framework: Split chunk scoring and custom ai chunk purging
- Framework: Refactored code into more appropriate modules - Framework: Refactored code into more appropriate modules

View File

@ -125,6 +125,8 @@ local function rebuildRegionMap()
area = { left_top = { x = chunk.x * 32, area = { left_top = { x = chunk.x * 32,
y = chunk.y * 32 }}}) y = chunk.y * 32 }}})
end end
processPendingChunks(natives, regionMap, surface, pendingChunks, tick)
end end
local function onModSettingsChange(event) local function onModSettingsChange(event)

View File

@ -28,8 +28,6 @@ function chunkProcessor.processPendingChunks(natives, regionMap, surface, pendin
local query = {area=areaBoundingBox, local query = {area=areaBoundingBox,
force=false} force=false}
local count = 0
local vanillaAI = not natives.useCustomAI local vanillaAI = not natives.useCustomAI
local chunkTiles = regionMap.chunkTiles local chunkTiles = regionMap.chunkTiles
@ -37,7 +35,6 @@ function chunkProcessor.processPendingChunks(natives, regionMap, surface, pendin
local start = #pendingStack local start = #pendingStack
for i=start, 1, -1 do for i=start, 1, -1 do
local event = pendingStack[i] local event = pendingStack[i]
count = count + 1
pendingStack[i] = nil pendingStack[i] = nil
local x = event.area.left_top.x local x = event.area.left_top.x
@ -61,12 +58,6 @@ function chunkProcessor.processPendingChunks(natives, regionMap, surface, pendin
end end
scoreChunk(chunk, surface, natives, query) scoreChunk(chunk, surface, natives, query)
processQueue[#processQueue+1] = chunk processQueue[#processQueue+1] = chunk
if (count >= CHUNK_QUEUE_SIZE) then
break
end
end
if (count >= CHUNK_QUEUE_SIZE) and (start > 0) then
surface.print("Rampant - " .. (start - count) .. " Remaining chunks to process")
end end
end end

View File

@ -20,7 +20,6 @@ constants.MAGIC_MAXIMUM_NUMBER = 1e99 -- used in loops trying to find the lowest
constants.MAGIC_MAXIMUM_BASE_NUMBER = 100000000 constants.MAGIC_MAXIMUM_BASE_NUMBER = 100000000
constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL = 10000 constants.RETREAT_MOVEMENT_PHEROMONE_LEVEL = 10000
constants.CHUNK_QUEUE_SIZE = 3000
constants.PROCESS_QUEUE_SIZE = 450 constants.PROCESS_QUEUE_SIZE = 450
constants.SCAN_QUEUE_SIZE = 6 constants.SCAN_QUEUE_SIZE = 6
constants.BASE_QUEUE_SIZE = 1 constants.BASE_QUEUE_SIZE = 1
@ -172,6 +171,7 @@ constants.BUILDING_PHEROMONES["mining-drill"] = 35
constants.BUILDING_PHEROMONES["rocket-silo"] = 18 constants.BUILDING_PHEROMONES["rocket-silo"] = 18
constants.BUILDING_PHEROMONES["lamp"] = 4 constants.BUILDING_PHEROMONES["lamp"] = 4
constants.BUILDING_PHEROMONES["radar"] = 20 constants.BUILDING_PHEROMONES["radar"] = 20
constants.BUILDING_PHEROMONES["lab"] = 15
-- player defense pheromones -- player defense pheromones

View File

@ -52,7 +52,7 @@ local scoreNeighborsForAttack = neighborUtils.scoreNeighborsForAttack
-- module code -- module code
local function scoreAttackLocation(squad, neighborChunk) local function scoreAttackLocation(squad, neighborChunk)
local damage = neighborChunk[MOVEMENT_PHEROMONE] + neighborChunk[BASE_PHEROMONE] + (neighborChunk[PLAYER_PHEROMONE] * PLAYER_PHEROMONE_MULTIPLER) local damage = (2*neighborChunk[MOVEMENT_PHEROMONE]) + neighborChunk[BASE_PHEROMONE] + (neighborChunk[PLAYER_PHEROMONE] * PLAYER_PHEROMONE_MULTIPLER)
return damage - lookupMovementPenalty(squad, neighborChunk.cX, neighborChunk.cY) return damage - lookupMovementPenalty(squad, neighborChunk.cX, neighborChunk.cY)
end end

View File

@ -77,8 +77,8 @@
(copyDirectory "prototypes" modFolder))) (copyDirectory "prototypes" modFolder)))
(define (run) (define (run)
(copyFiles modFolder) ;; (copyFiles modFolder)
;; (copyFiles zipModFolder) ;; (copyFiles zipModFolder)
;;(makeZip modFolder) (makeZip modFolder)
) )
) )