mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
see changelog
This commit is contained in:
parent
a9394d6854
commit
1c83cc4ee4
@ -1,3 +1,14 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.0.1
|
||||
Date: 19. 10. 2020
|
||||
Contributions:
|
||||
- Astorin added RU locale
|
||||
- oralordos updated Rampant to Factorio 1.1.0
|
||||
- oralordos added support for Krastorio2 creep
|
||||
Tweaks:
|
||||
- AI Temperament per logic cycle normalized to full contribution
|
||||
- Increased active raid nest contribution to 0.00675
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.0.0
|
||||
Date: 18. 10. 2020
|
||||
|
@ -5,6 +5,6 @@
|
||||
"title" : "Rampant",
|
||||
"author" : "Veden",
|
||||
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",
|
||||
"description" : "Improves the enemies tactics by using potential fields/pheromones allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, raids, rallying death cry, and player hunting. Uses blockable biter projectiles. Adds new Enemies (disabled by default). Difficulty setting in mod options menu.",
|
||||
"dependencies" : ["base >= 1.1.0", "? bobenemies", "? Natural_Evolution_Enemies >= 0.17.0", "? Clockwork", "? Orbital Ion Cannon", "? RampantArsenal", "? RampantResources", "? ArmouredBiters", "? Krastorio2"]
|
||||
"description" : "Improves the enemies tactics by using potential fields (pheromones) allowing probing of defenses, retreats, reinforcements, counterattacking, breaching, raids, rallying death cry, and player hunting. Uses blockable biter projectiles. Adds new Enemies (disabled by default). Difficulty setting in mod options menu.",
|
||||
"dependencies" : ["base >= 1.0.0", "? bobenemies", "? Natural_Evolution_Enemies >= 0.17.0", "? Clockwork", "? Orbital Ion Cannon", "? ArmouredBiters", "? Krastorio2"]
|
||||
}
|
||||
|
@ -270,34 +270,34 @@ function aiPlanning.temperamentPlanner(natives)
|
||||
local delta = 0
|
||||
|
||||
if activeNests > 0 then
|
||||
local val = (1.5 * activeNests)
|
||||
local val = (0.75 * activeNests)
|
||||
delta = delta + val
|
||||
|
||||
if destroyPlayerBuildings > 0 then
|
||||
delta = delta - (5 * destroyPlayerBuildings)
|
||||
delta = delta - (2.5 * destroyPlayerBuildings)
|
||||
end
|
||||
|
||||
else
|
||||
delta = delta - 1
|
||||
delta = delta - 0.5
|
||||
|
||||
if destroyPlayerBuildings > 0 then
|
||||
if (currentTemperament > 0) then
|
||||
delta = delta - (5 * destroyPlayerBuildings)
|
||||
delta = delta - (2.5 * destroyPlayerBuildings)
|
||||
else
|
||||
delta = delta + (5 * destroyPlayerBuildings)
|
||||
delta = delta + (2.5 * destroyPlayerBuildings)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if activeRaidNests > 0 then
|
||||
local val = (0.0075 * activeRaidNests)
|
||||
local val = (0.00675 * activeRaidNests)
|
||||
delta = delta - val
|
||||
else
|
||||
delta = delta - 0.5
|
||||
delta = delta - 0.25
|
||||
end
|
||||
|
||||
if lostEnemyUnits > 0 then
|
||||
local val = (0.001 * lostEnemyUnits)
|
||||
local val = (0.0005 * lostEnemyUnits)
|
||||
if (currentTemperament > 0) then
|
||||
delta = delta - val
|
||||
else
|
||||
@ -306,32 +306,32 @@ function aiPlanning.temperamentPlanner(natives)
|
||||
end
|
||||
|
||||
if lostEnemyBuilding > 0 then
|
||||
delta = delta + (5 * lostEnemyBuilding)
|
||||
delta = delta + (2.5 * lostEnemyBuilding)
|
||||
end
|
||||
|
||||
if (builtEnemyBuilding > 0) then
|
||||
local val = (50 * builtEnemyBuilding)
|
||||
local val = (25 * builtEnemyBuilding)
|
||||
if (currentTemperament > 0) then
|
||||
delta = delta - val
|
||||
else
|
||||
delta = delta + val
|
||||
end
|
||||
else
|
||||
delta = delta - 0.5
|
||||
delta = delta - 0.25
|
||||
end
|
||||
|
||||
if (rocketLaunched > 0) then
|
||||
local val = (100 * rocketLaunched)
|
||||
local val = (50 * rocketLaunched)
|
||||
delta = delta + val
|
||||
end
|
||||
|
||||
if (ionCannonBlasts > 0) then
|
||||
local val = (50 * ionCannonBlasts)
|
||||
local val = (25 * ionCannonBlasts)
|
||||
delta = delta + val
|
||||
end
|
||||
|
||||
if (artilleryBlasts > 0) then
|
||||
local val = (50 * artilleryBlasts)
|
||||
local val = (25 * artilleryBlasts)
|
||||
delta = delta + val
|
||||
end
|
||||
|
||||
@ -347,7 +347,7 @@ function aiPlanning.temperamentPlanner(natives)
|
||||
natives.ionCannonBlasts = 0
|
||||
natives.artilleryBlasts = 0
|
||||
|
||||
natives.temperamentScore = mMin(10000, mMax(-10000, currentTemperament + (mMin(natives.evolutionLevel, 0.1) * delta)))
|
||||
natives.temperamentScore = mMin(10000, mMax(-10000, currentTemperament + delta))
|
||||
natives.temperament = ((natives.temperamentScore + 10000) * 0.00005)
|
||||
-- print(natives.temperament, natives.temperamentScore)
|
||||
-- print("--")
|
||||
|
209
make.rkt
209
make.rkt
@ -1,115 +1,112 @@
|
||||
(module BuildScript racket
|
||||
(provide all-defined-out)
|
||||
(require file/zip)
|
||||
(require json)
|
||||
|
||||
(require file/zip)
|
||||
(require json)
|
||||
(define modFolder "/mnt/gallery/gameFiles/factorio/mods/")
|
||||
(define zipModFolder "/data/games/factorio2/mods/")
|
||||
(define configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
(define packageName (string-append (string-replace (hash-ref configuration 'name) " " "_")
|
||||
"_"
|
||||
(hash-ref configuration 'version)))
|
||||
|
||||
(define modFolder "/mnt/gallery/gameFiles/factorio/mods/")
|
||||
(define zipModFolder "/data/games/factorio2/mods/")
|
||||
(define configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
(define packageName (string-append (string-replace (hash-ref configuration 'name) " " "_")
|
||||
"_"
|
||||
(hash-ref configuration 'version)))
|
||||
(define (makeZip folder)
|
||||
(let ((packagePath (string->path (string-append folder
|
||||
packageName
|
||||
".zip"))))
|
||||
(when (file-exists? packagePath)
|
||||
(delete-file packagePath)))
|
||||
(zip (string-append folder
|
||||
packageName
|
||||
".zip")
|
||||
#:path-prefix packageName
|
||||
(string->path "info.json")
|
||||
(string->path "control.lua")
|
||||
(string->path "config.lua")
|
||||
(string->path "data.lua")
|
||||
(string->path "data-updates.lua")
|
||||
(string->path "data-final-fixes.lua")
|
||||
(string->path "LICENSE.md")
|
||||
(string->path "tests.lua")
|
||||
(string->path "changelog.txt")
|
||||
(string->path "Upgrade.lua")
|
||||
(string->path "settings.lua")
|
||||
(string->path "README.md")
|
||||
(string->path "thumbnail.png")
|
||||
(string->path "NOTICE")
|
||||
(string->path "libs")
|
||||
(string->path "sounds")
|
||||
(string->path "migrations")
|
||||
(string->path "locale")
|
||||
(string->path "graphics")
|
||||
(string->path "prototypes")))
|
||||
|
||||
(define (makeZip folder)
|
||||
(let ((packagePath (string->path (string-append folder
|
||||
packageName
|
||||
".zip"))))
|
||||
(when (file-exists? packagePath)
|
||||
(delete-file packagePath)))
|
||||
(zip (string-append folder
|
||||
packageName
|
||||
".zip")
|
||||
#:path-prefix packageName
|
||||
(string->path "info.json")
|
||||
(string->path "control.lua")
|
||||
(string->path "config.lua")
|
||||
(string->path "data.lua")
|
||||
(string->path "data-updates.lua")
|
||||
(string->path "data-final-fixes.lua")
|
||||
(string->path "LICENSE.md")
|
||||
(string->path "tests.lua")
|
||||
(string->path "changelog.txt")
|
||||
(string->path "Upgrade.lua")
|
||||
(string->path "settings.lua")
|
||||
(string->path "README.md")
|
||||
(string->path "thumbnail.png")
|
||||
(string->path "NOTICE")
|
||||
(string->path "libs")
|
||||
(string->path "sounds")
|
||||
(string->path "migrations")
|
||||
(string->path "locale")
|
||||
(string->path "graphics")
|
||||
(string->path "prototypes")))
|
||||
(define (copyFile fileName modFolder)
|
||||
(copy-file (string->path fileName)
|
||||
(string->path (string-append modFolder
|
||||
packageName
|
||||
"/"
|
||||
fileName))))
|
||||
|
||||
(define (copyFile fileName modFolder)
|
||||
(copy-file (string->path fileName)
|
||||
(string->path (string-append modFolder
|
||||
packageName
|
||||
"/"
|
||||
fileName))))
|
||||
(define (copyDirectory directoryName modFolder)
|
||||
(copy-directory/files (string->path directoryName)
|
||||
(string->path (string-append modFolder
|
||||
packageName
|
||||
"/"
|
||||
directoryName))))
|
||||
|
||||
(define (copyDirectory directoryName modFolder)
|
||||
(copy-directory/files (string->path directoryName)
|
||||
(string->path (string-append modFolder
|
||||
packageName
|
||||
"/"
|
||||
directoryName))))
|
||||
(define (copyFiles modFolder)
|
||||
(let ((packagePath (string->path (string-append modFolder
|
||||
packageName))))
|
||||
(when (directory-exists? packagePath)
|
||||
(delete-directory/files packagePath))
|
||||
(sleep 0.1)
|
||||
(make-directory packagePath)
|
||||
(copyFile "control.lua" modFolder)
|
||||
(copyFile "config.lua" modFolder)
|
||||
(copyFile "info.json" modFolder)
|
||||
(copyFile "data.lua" modFolder)
|
||||
(copyFile "data-updates.lua" modFolder)
|
||||
(copyFile "data-final-fixes.lua" modFolder)
|
||||
(copyFile "settings.lua" modFolder)
|
||||
(copyFile "changelog.txt" modFolder)
|
||||
(copyFile "Upgrade.lua" modFolder)
|
||||
(copyFile "tests.lua" modFolder)
|
||||
(copyFile "thumbnail.png" modFolder)
|
||||
(copyDirectory "libs" modFolder)
|
||||
(copyDirectory "locale" modFolder)
|
||||
(copyDirectory "migrations" modFolder)
|
||||
(copyDirectory "sounds" modFolder)
|
||||
(copyDirectory "graphics" modFolder)
|
||||
(copyDirectory "prototypes" modFolder)))
|
||||
|
||||
(define (copyFiles modFolder)
|
||||
(let ((packagePath (string->path (string-append modFolder
|
||||
packageName))))
|
||||
(when (directory-exists? packagePath)
|
||||
(delete-directory/files packagePath))
|
||||
(sleep 0.1)
|
||||
(make-directory packagePath)
|
||||
(copyFile "control.lua" modFolder)
|
||||
(copyFile "config.lua" modFolder)
|
||||
(copyFile "info.json" modFolder)
|
||||
(copyFile "data.lua" modFolder)
|
||||
(copyFile "data-updates.lua" modFolder)
|
||||
(copyFile "data-final-fixes.lua" modFolder)
|
||||
(copyFile "settings.lua" modFolder)
|
||||
(copyFile "changelog.txt" modFolder)
|
||||
(copyFile "Upgrade.lua" modFolder)
|
||||
(copyFile "tests.lua" modFolder)
|
||||
(copyFile "thumbnail.png" modFolder)
|
||||
(copyDirectory "libs" modFolder)
|
||||
(copyDirectory "locale" modFolder)
|
||||
(copyDirectory "migrations" modFolder)
|
||||
(copyDirectory "sounds" modFolder)
|
||||
(copyDirectory "graphics" modFolder)
|
||||
(copyDirectory "prototypes" modFolder)))
|
||||
(define (copy)
|
||||
(set! configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_")
|
||||
"_"
|
||||
(hash-ref configuration 'version)))
|
||||
|
||||
(define (copy)
|
||||
(set! configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_")
|
||||
"_"
|
||||
(hash-ref configuration 'version)))
|
||||
(print (string-append "copying " (hash-ref configuration 'name) (hash-ref configuration 'version)))
|
||||
(copyFiles modFolder))
|
||||
|
||||
(print (string-append "copying " (hash-ref configuration 'name) (hash-ref configuration 'version)))
|
||||
(copyFiles modFolder))
|
||||
(define (zipIt)
|
||||
(set! configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_")
|
||||
"_"
|
||||
(hash-ref configuration 'version)))
|
||||
(print (string-append "zipping " (hash-ref configuration 'name) (hash-ref configuration 'version)))
|
||||
(makeZip modFolder))
|
||||
|
||||
(define (zipIt)
|
||||
(set! configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_")
|
||||
"_"
|
||||
(hash-ref configuration 'version)))
|
||||
(print (string-append "zipping " (hash-ref configuration 'name) (hash-ref configuration 'version)))
|
||||
(makeZip modFolder))
|
||||
|
||||
(define (runStart)
|
||||
(set! configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_")
|
||||
"_"
|
||||
(hash-ref configuration 'version)))
|
||||
(copyFiles modFolder)
|
||||
(system*/exit-code "factorio")))
|
||||
(define (runStart)
|
||||
(set! configuration (call-with-input-file "info.json"
|
||||
(lambda (port)
|
||||
(string->jsexpr (port->string port)))))
|
||||
(set! packageName (string-append (string-replace (hash-ref configuration 'name) " " "_")
|
||||
"_"
|
||||
(hash-ref configuration 'version)))
|
||||
(copyFiles modFolder)
|
||||
(system*/exit-code "factorio"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user