Every function, in one list
Each function with its signature, what it returns and one call, then the constants. Nothing else: the why, the pitfalls and the cost in game requests are in the guide pages, which every heading links to. Your browser search finds any name here.
Output and storage
Writes a line. Arguments are joined with a space.
Print(...)
// returns: nothing
Print("target", coord, "loot", loot) // target [P:1:64:6] loot 75Printf
Writes a formatted line, the way fmt.Printf does.
Printf(format, ...)
// returns: nothing
Printf("%d planets, %d moons", np, nm)LogDebugf
The detail that interests you alone, on a debugging day.
LogDebugf(format, ...)
// level: InfoLogInfo
The normal run: "campaign started", "twelve targets kept".
LogInfo(...)
// level: Info
LogInfo(m.SenderName, "writes:", m.Text)LogInfof
The normal run: "campaign started", "twelve targets kept".
LogInfof(format, ...)
// level: Info
LogInfof("%d targets kept out of %d", kept, seen)LogWarn
What deserves a look without being serious: a lost target, an unreadable page.
LogWarn(...)
// level: Warn
LogWarn("attack from", a.AttackerName, "on", a.DestinationName)LogWarnf
What deserves a look without being serious: a lost target, an unreadable page.
LogWarnf(format, ...)
// level: WarnLogError
What failed.
LogError(...)
// level: Error
if err != nil { LogError("reading failed:", err) }Get
Reads it back. A missing key returns the empty string, without an error.
Get(key)
// returns: 2: the value and an error
sys, err = Get("last.system") // ← TWO targets, see pitfall no. 1Has
Says whether the key exists.
Has(key)
// returns: 1: a boolean
if Has("blacklist") {
blacklist, err = Get("blacklist")
}StorageKeys
Every key stored by this script.
StorageKeys()
// returns: 1: a list
for key in StorageKeys() {
Print(key)
}PutShared
Stores a value, readable by every bot.
PutShared(key, value)
// returns: 1: an error
PutShared("fs.target", "4:120:8")GetShared
Reads it back. A missing key returns the empty string, without an error.
GetShared(key)
// returns: 2: the value and an error
target, err = GetShared("fs.target") // ← TWO targets, like GetHasShared
Says whether the key exists.
HasShared(key)
// returns: 1: a boolean
if HasShared("fs.done") {
DeleteShared("fs.done")
}SharedKeys
Every shared key.
SharedKeys()
// returns: 1: a list
for key in SharedKeys() {
Print(key)
}SendDiscord
Posts to a Discord webhook.
SendDiscord(webhook, message)
// returns: 1: an error
err = SendDiscord("https://discord.com/api/webhooks/…", "debris at " + coord)SendDiscordFile
Posts a text file as an attachment.
SendDiscordFile(webhook, name, content)
// returns: 1: an error
err = SendDiscordFile(DISCORD_WEBHOOK, "inactives.csv", rows)SendTelegram
Writes into a Telegram conversation.
SendTelegram(chatID, message)
// returns: 1: an error
SendTelegram(0, "debris at " + coord) // 0: the conversation from settingsIsPaused
Says whether the player has paused the script.
IsPaused()
// returns: 1: a boolean
if IsPaused() { SleepSec(30); continue }Shuffle
Shuffles a list in place.
Shuffle(list)
// returns: nothing
Shuffle(targets) // the order changes, the list stays the sameBytes2Str
Converts bytes to text. Anko cannot write a []byte literal, hence this function.
Bytes2Str(bytes)
// returns: 1: a stringTime and waiting
Sleep
Sleep(n)
// unit: milliseconds
Sleep(500)SleepMs
SleepMs(n)
// unit: milliseconds
SleepMs(Random(500, 1000))SleepSec
SleepSec(n)
// unit: seconds
SleepSec(30)SleepMin
SleepMin(n)
// unit: minutes
SleepMin(5)SleepDur
SleepDur(d)
// unit: a duration
SleepDur(90 * time.Second)SleepRandMs
SleepRandMs(min, max)
// unit: milliseconds
SleepRandMs(200, 800) // ✓ you wait from 200 to 800 millisecondsSleepRandSec
SleepRandSec(min, max)
// unit: seconds
SleepRandSec(20, 40)SleepRandMin
SleepRandMin(min, max)
// unit: minutes
SleepRandMin(3, 8)SleepRandHour
SleepRandHour(min, max)
// unit: hours
SleepRandHour(1, 3)SleepUntil
SleepUntil(when)
// unit: until a given time
SleepUntil("03:30:00") // the next time it is 3:30Now
The present moment.
Now()
// returns: 1: a date
if end != nil && end.Sub(Now()).Minutes() < 10 {
LogInfo("the account sleeps soon, not starting the campaign")
return
}Clock
Clock()
// returns: 3: hour, minute, second
h, m, s = Clock() // three targets, not oneDate
Date()
// returns: 3: year, month, day
y, mo, d = Date()Weekday
The day of the week, Sunday being zero.
Weekday()
// returns: 1: an integer
if Weekday() == 0 { Print("Sunday") }NowInTimeRange
Tells you whether the current time is in the range.
NowInTimeRange(start, end)
// returns: 1: a boolean
if NowInTimeRange("23:00:00", "07:00:00") {
Print("it is night") // the range crosses midnight, that is intended
}DurationBetweenTimeStrings
The gap between two clock times.
DurationBetweenTimeStrings(a, b)
// returns: 1: a durationMillisecondsBetweenTimeStrings
The same, in milliseconds.
MillisecondsBetweenTimeStrings(a, b)
// returns: 1: an integerShortDur
Writes a duration readably, 2h15m.
ShortDur(d)
// returns: 1: a string
Print(target, ShortDur(secs), "deut", fuel)GetNextDatetimeAt
The next time it is that time of day.
GetNextDatetimeAt(h, m, s)
// returns: 2: the date and an error
when, err = GetNextDatetimeAt(3, 30, 0) // returns TWO valuesParseNextDatetimeAt
The same, from "03:30:00".
ParseNextDatetimeAt(s)
// returns: 2: the date and an errorScheduling
ExecIn
Calls f once, in ms milliseconds.
ExecIn(ms, f)
// returns: 1: a cancel function
cancel = ExecIn(60000, func() { Print("one minute later") })IntervalExec
Calls f every ms milliseconds, forever.
IntervalExec(ms, f)
// returns: 1: a cancel function
IntervalExec(600000, func() { Print("every ten minutes") })CronExec
Calls f on a schedule.
CronExec(schedule, f)
// returns: 2: a number and an error
id, err = CronExec("@03h30", f)RangeCronExec
Calls f once a day, at a time drawn at random inside the window.
RangeCronExec(start, end, label, f)
// returns: 2: a number and an error
id, err = RangeCronExec("03:00:00", "03:45:00", "night return", func() {
Print("the fleet comes home")
})RemoveCron
Removes a task placed by the two above.
RemoveCron(number)
// returns: 1: a boolean
if RemoveCron(id) {
Print("unhooked")
} else {
Print("that number no longer points at anything")
}ExecInCh
Like ExecIn, but the channel closes after f.
ExecInCh(ms, f)
// returns: 1: a channel
<-ExecInCh(60000, func() { Print("one minute later") })ExecAtCh
Like ExecAt, but the channel closes after f.
ExecAtCh(when, f)
// returns: 1: a channel
<-ExecAtCh(departure, func() {
LogInfo("time to leave")
})ExecInSync
Waits, then calls f, without handing back.
ExecInSync(ms, f)
// returns: 1: a cancel functionExecAtSync
Waits for the stated time, then calls f.
ExecAtSync(when, f)
// returns: nothing
ExecAtSync("03:17:00", func() { BringTheFleetHome() })WaitAttack
Waits for an attack. The boolean says whether one came.
WaitAttack(seconds)
// returns: 2: the attack and a boolean
a, seen = WaitAttack(0)WaitAttackGone
Waits for an attack to leave the game's list, recalled or arrived.
WaitAttackGone(seconds)
// returns: 2: the attack and a booleanWaitChatMessage
Waits for a player to write.
WaitChatMessage(seconds)
// returns: 2: the message and a boolean
m, seen = WaitChatMessage(0)WaitFleet
Waits for a worker to send a fleet.
WaitFleet(seconds)
// returns: 2: the fleet and a boolean
f, seen = WaitFleet(0)WaitHunterTargetActive
Waits for a target to come back to their screen.
WaitHunterTargetActive(seconds)
// returns: 2: the change and a boolean
e, seen = WaitHunterTargetActive(0)WaitHunterTargetIdle
Waits for a target to leave it.
WaitHunterTargetIdle(seconds)
// returns: 2: the change and a boolean
e, seen = WaitHunterTargetIdle(0)Celestials
GetUniverseName
The universe name.
GetUniverseName()
// returns: 1: a string
Printf("%s s%d-%s", GetUniverseName(), GetServerNumber(), GetLang())GetServerNumber
The server number: s152-en gives 152.
GetServerNumber()
// returns: 1: an integer
Printf("%s s%d-%s", GetUniverseName(), GetServerNumber(), GetLang())GetLang
The server language code, fr, en…
GetLang()
// returns: 1: a string
Printf("%s s%d-%s", GetUniverseName(), GetServerNumber(), GetLang())CharacterClass
The class: NO_CLASS, COLLECTOR, GENERAL or DISCOVERER.
CharacterClass()
// returns: 1: an integer
"Params": {"Plunder": report.PlunderRatio(CharacterClass()) * 100},IsCollector
Shortcut on the class.
IsCollector()
// returns: 1: a boolean
if IsCollector() {
Print("higher cargo capacity, faster transporters")
}HasAdmiral
The same.
HasAdmiral()
// returns: 1: a boolean
if !HasAdmiral() {
Print("fewer fleet slots than you think")
}IsVacationModeEnabled
Is the account in vacation mode.
IsVacationModeEnabled()
// returns: 1: a boolean
if IsVacationModeEnabled() {
LogWarn("vacation mode: nothing will leave, this is not a script failure")
return
}SetVacationMode
Freezes the account. Forty-eight hours minimum.
SetVacationMode()
// returns: 1: an error
err = SetVacationMode()GetPlanets
All your planets.
GetPlanets()
// returns: 1: a list
planets = GetPlanets() // ONE target: the listGetPlanet
One given planet.
GetPlanet(what)
// returns: 2: the planet and an error
p, err = GetPlanet("1:2:3") // TWO targets, the doc announces the errorGetCelestial
One given planet or moon, either one.
GetCelestial(what)
// returns: 2: the celestial and an errorGetCelestials
All your planets and moons together.
GetCelestials()
// returns: 2: the list and an error
c, err = GetCelestials() // ✓ c holds the list, err holds nilGetCachedCelestial
The celestial as the bot already knows it.
GetCachedCelestial(what)
// returns: 1: a celestial
c = GetCachedCelestial("1:2:3")GetCachedCelestials
All your planets and moons, as the bot already knows them.
GetCachedCelestials()
// returns: 1: a list
origin = GetCachedCelestials()[0]GetCachedPlanets
Your planets, taken from the same cache.
GetCachedPlanets()
// returns: 1: a list
c = GetCachedPlanets()[0]GetCachedMoons
Your moons, taken from the same cache.
GetCachedMoons()
// returns: 1: a list
origin = GetCachedMoons()[0]GetSortedCelestials
Your celestials, from nearest to farthest.
GetSortedCelestials(destination)
// returns: 1: a listGetSortedPlanets
Your planets alone.
GetSortedPlanets(destination)
// returns: 1: a list
base = GetSortedPlanets("4:212:9")[0] // the nearest to the targetGetResources
Metal, crystal, deuterium, energy, dark matter, population, food.
GetResources(celestial)
// returns: 2: the resources and an error
r, err = GetResources("1:2:3")GetResourcesDetails
The same, with storage capacity and production.
GetResourcesDetails(celestial)
// returns: 2: the detail and an error
d, err = GetResourcesDetails("1:2:3")GetAllResources
The resources of every celestial at once.
GetAllResources()
// returns: 2: a table and an error
all, err = GetAllResources()GetEmpire
Everything about one kind of celestial: resources, mines, facilities, defences, ships.
GetEmpire(type)
// returns: 2: a list and an error
empire, err = GetEmpire(PLANET_TYPE)GetResourcesBuildings
The nine: mines, solar plant, fusion reactor, satellites, storages.
GetResourcesBuildings(celestial)
// returns: 2: the levels and an error
bld, err = GetResourcesBuildings("1:2:3")GetFacilities
The eleven: factories, shipyard, lab, depot, silo, terraformer, dock, lunar base, phalanx, jump gate.
GetFacilities(celestial)
// returns: 2: the levels and an error
fac, err = GetFacilities(celestial)GetShips
What is parked there, not what is flying.
GetShips(celestial)
// returns: 2: the ships and an error
ships, err = GetShips(planet)GetTechs
The whole reading at once.
GetTechs(celestial)
// returns: 6: buildings, facilities, ships, defences, researches, an error
bld, fac, shp, def, rch, err = GetTechs("1:2:3")GetTechs2
The entire reading of a celestial.
GetTechs2(celestial)
// returns: 8: the six above, plus the lifeform buildings and researches
bld, fac, shp, def, rch, lfBld, lfRch, err = GetTechs2("1:2:3")GetResearch
They belong to the account, not to the celestial: no argument.
GetResearch()
// returns: 1: your researchesIsAvailable
Is this building, research, ship or defence available there, from its requirements? A calculation on the levels you pass, no request.
IsAvailable(id, celestial, buildings, lfBuildings, lfResearches, facilities, researches, energy)
// returns: 1: a booleanGetProduction
Ships and defences at the shipyard.
GetProduction(celestial)
// returns: 3: the queue, the seconds left, an error
queue, left, err = GetProduction("1:2:3")ConstructionsBeingBuilt
The building and the research under way.
ConstructionsBeingBuilt(celestial)
// returns: 4: building, seconds, research, seconds
bID, bSec, rID, rSec = ConstructionsBeingBuilt("1:2:3")GetResourceSettings
The seven output sliders.
GetResourceSettings(planet)
// returns: 2: the settings and an error
settings, err = GetResourceSettings("1:2:3")GetFields
GetFields(celestial)
// returns: 1: the fields, `Built` and `Total`
f = GetFields("1:2:3")GetDiameter
The diameter, in kilometres.
GetDiameter(celestial)
// returns: 1: an integer
Print("radius:", GetDiameter("1:2:3") / 2)Build
Building, technology, ship or defence.
Build(celestial, what, count)
// returns: 1: an error
err = Build(c.GetID(), LIGHTFIGHTER, 5)BuildBuilding
Refuses anything that is not a building.
BuildBuilding(celestial, building)
// returns: 1: an error
BuildBuilding(c.GetID(), METALMINE)BuildTechnology
Refuses anything that is not a technology.
BuildTechnology(celestial, technology)
// returns: 1: an error
BuildTechnology(c.GetID(), ENERGYTECHNOLOGY)TearDown
Tears one level down.
TearDown(celestial, building)
// returns: 1: an error
TearDown(c.GetID(), SOLARPLANT)CancelBuilding
Cancels the construction under way.
CancelBuilding(celestial)
// returns: 1: an error
CancelBuilding(c.GetID())CancelResearch
Cancels the research under way.
CancelResearch(celestial)
// returns: 1: an error
CancelResearch(c.GetID())GetLfBuildings
One request per call.
GetLfBuildings(celestial)
// returns: 2: the buildings and an error
b, err = GetLfBuildings(c.GetID())GetLfResearch
One request per call.
GetLfResearch(celestial)
// returns: 2: the researches and an error
res, err = GetLfResearch(c.GetID())GetLfBonuses
Reads the bonuses from the game.
GetLfBonuses()
// returns: 2: the bonuses and an error
fresh, err = GetLfBonuses()GetCachedLfBonuses
What the bot already knows. No request.
GetCachedLfBonuses()
// returns: 2: the bonuses and an error
bonus, err = GetCachedLfBonuses()GetPlanetLifeformType
One request. No error: see below.
GetPlanetLifeformType(planet)
// returns: 1: the lifeform
if GetPlanetLifeformType(p) != KAELESH {
return // this script only handles Kaelesh
}CancelLfBuilding
Cancels the lifeform building under way.
CancelLfBuilding(celestial)
// returns: 1: an errorGetLfResearchDetails
Costs, durations and what is unlocked.
GetLfResearchDetails(celestial)
// returns: 2: the details and an errorGetChapter
Its tasks, and the state of each.
GetChapter(chapter)
// returns: 2: the chapter and an errorChapterCollectReward
Collects the reward of one task.
ChapterCollectReward(task)
// returns: 1: an errorChapterClaimAll
Collects everything collectable.
ChapterClaimAll(chapter)
// returns: 1: an error
err = ChapterClaimAll(4006) // ← yours: the chapter idSelectLfResearchSelect
Accepts the research on offer.
SelectLfResearchSelect(planet, slot)
// returns: 1: an errorSelectLfResearchRandom
Draws another one at random.
SelectLfResearchRandom(planet, slot)
// returns: 1: an errorSelectLfResearchArtifacts
Trades artifacts for it.
SelectLfResearchArtifacts(planet, slot, tech)
// returns: 1: an errorFreeResetTree
Wipes a whole tier. Free, but limited in number.
FreeResetTree(planet, tier)
// returns: 1: an error
err = FreeResetTree(p, 1) // tier 1, blank againNewResourceSettings
Composes the seven sliders.
NewResourceSettings(metal, crystal, deuterium, solar, fusion, satellite, crawler)
// returns: 1: settings
after = NewResourceSettings(before.MetalMine, before.CrystalMine, 100,
before.SolarPlant, before.FusionReactor, before.SolarSatellite, before.Crawler)SetResourceSettings
Applies them.
SetResourceSettings(planet, settings)
// returns: 1: an error
err = SetResourceSettings(c.GetID(), after)TechnologyDetails
Price, duration and level, on that celestial.
TechnologyDetails(celestial, what)
// returns: 2: the details and an errorFleets
GetFleets
Your fleets in the air, not the ones aimed at you.
GetFleets()
// returns: 2: the flights and the slots
fleets, slots = GetFleets() // TWO targetsGetAttacks
The hostile fleets on their way to your account.
GetAttacks()
// returns: 1: a list
for a in GetAttacks() {
Print(a.AttackerName, "arriving at", a.DestinationName, "in", a.ArriveIn, "s")
if a.Ships == nil { Print(" composition unknown") }
}Distance
The distance in the game's unit. No request.
Distance(origin, target)
// returns: 1: an integer
Print(Distance(origin, "1:2:4")) // the celestial is enough, no need for .GetCoordinate()FlightTime
At most one request per route, see above.
FlightTime(origin, target, speed, fleet, mission, [holdingTime])
// returns: 2: the seconds and the deuterium
secs, fuel = FlightTime(origin, target, HUNDRED_PERCENT, fleet, TRANSPORT)FindDebrisFieldWithMinimumTravelTime
A debris field.
FindDebrisFieldWithMinimumTravelTime(origin, fleet, minimum)
// returns: 4
dest, secs, deut, err = FindDebrisFieldWithMinimumTravelTime(p.GetCoordinate(),
fleet, 7 * time.Hour)FindEmptyPlanetWithMinimumTravelTime
An empty slot.
FindEmptyPlanetWithMinimumTravelTime(origin, fleet, minimum)
// returns: 4
dest, secs, deut, err = FindEmptyPlanetWithMinimumTravelTime(c.GetCoordinate(),
fleet, HOURS * 3600)FindInactivePlanetWithMinimumTravelTime
An inactive player.
FindInactivePlanetWithMinimumTravelTime(origin, fleet, minimum, withMoon)
// returns: 4FindAbandonedPlanetWithMinimumTravelTime
An abandoned colony.
FindAbandonedPlanetWithMinimumTravelTime(origin, fleet, minimum, withMoon)
// returns: 4Speed
The speed of the slowest ship, the one that dictates the flight.
Speed(fleet)
// returns: 1: an integer
Print(Speed(f), Cargo(f))Cargo
The total cargo capacity, all resources together.
Cargo(fleet)
// returns: 1: an integer
Print(Speed(f), Cargo(f))ShipFuel
Its reference consumption, the one that enters the fuel calculation. Never less than 1.
ShipFuel(id)
// returns: 1: an integerShipCargo
Its hold.
ShipCargo(id)
// returns: 1: an integer
Print(ShipCargo(LARGECARGO)) // 25000 at base, more with hyperspaceCalcCargo
Two separate solutions, not the two halves of one fleet.
CalcCargo(total)
// returns: 2: large cargos, OR small ones
lc, sc = CalcCargo(res.Total())CalcFastCargo
The composition your ships allow.
CalcFastCargo(lcAvail, scAvail, total)
// returns: 3: large ones, small ones, and the cargo obtained
lc, sc, capacity = CalcFastCargo(10, 8, res.Total())AttackStrength
Firepower, plus 10% of the base value per weapons level.
AttackStrength(id, researches)
// returns: 1: an integer
Print(AttackStrength(LIGHTFIGHTER, nil)) // with your researchesShieldPower
Shield, plus 10% per shielding level.
ShieldPower(id, researches)
// returns: 1: an integerStructuralIntegrity
Structure, plus 10% per armour level.
StructuralIntegrity(id, researches)
// returns: 1: an integerSimulator
Plays the battle several times and returns the averages: win rate, losses, debris, loot, trip. No request.
Simulator(payload)
// returns: 2: the result and an error
res, err = Simulator(payload)GetPrice
n is a level for a building or a research, a number of units for a ship or a defence.
GetPrice(id, n)
// returns: 1: resources
p = GetPrice(METALMINE, 20)ConstructionTime
Construction time, from the facilities supplied.
ConstructionTime(id, n, facilities)
// returns: 1: a duration
Print(ShortDur(ConstructionTime(LARGECARGO, 20, fac)))TechnologyConstructionTime
Time for a research, with the lab level given plainly.
TechnologyConstructionTime(id, level, lab)
// returns: 1: a duration
Print(ShortDur(TechnologyConstructionTime(ESPIONAGETECHNOLOGY, 10, fac.ResearchLab)))SendSpy
The galaxy's "espionage" button: leaves at once.
SendSpy(origin, target, probes)
// returns: 2: the probes sent, an error
sent, err = SendSpy("M:2:21:7", moon, 20)Phalanx
Reads what flies around a position.
Phalanx(moon, target)
// returns: 2: the flights and an error
flights, err = Phalanx(moon.GetID(), "1:2:8")CancelFleet
Turns a flight in progress around.
CancelFleet(fleet)
// returns: 1: an error
err = CancelFleet(flight.ID)JumpGate
Jumps ships from one moon to another.
JumpGate(origin, destination, ships)
// returns: 1: an error
err = JumpGate(moon.GetID(), destinations[0], ships)JumpGateDestinations
What can be reached, and in how long.
JumpGateDestinations(origin)
// returns: 3: the moons, the recharge, an error
destinations, recharge, err = JumpGateDestinations(moon.GetID())JumpGate2
The same jump, with the delay as a number.
JumpGate2(origin, destination, ships)
// returns: 3: success, the recharge, an error
sent, recharge, err = JumpGate2(moon.GetID(), destinations[0], ships)SendDiscoveryFleet
One expedition to ONE position.
SendDiscoveryFleet(origin, destination)
// returns: 1: an error
err = SendDiscoveryFleet("1:64:8", "1:64:12")SendSystemDiscoveryFleet
The system's "Discovery" button, like the worker.
SendSystemDiscoveryFleet(origin, galaxy, system)
// returns: 2: the positions reached, an error
coords, err = SendSystemDiscoveryFleet(origin, 1, 64)GetDepartureTime
When to leave to arrive at the stated time.
GetDepartureTime(arrival, origin, destination, ships, speed, mission)
// returns: 1: a time
departure = GetDepartureTime("08:00:00", "1:64:8", "1:64:12", ships, TEN_PERCENT, TRANSPORT)LowestSpeed
The cheapest speed that can still leave.
LowestSpeed(arrival, origin, destination, ships)
// returns: 4: the speed, the fuel, the departure time, an error
speed, deut, departure, err = LowestSpeed("08:00:00", "1:64:8", "1:64:12", ships)StartPhalanxSession
Sets up the watch on a position and turns it on.
StartPhalanxSession(moon, target, interval)
// returns: 2: an id and an error
id, err = StartPhalanxSession(moon.GetID(), "1:2:8", 300) // every 5 minStopPhalanxSession
Turns it off.
StopPhalanxSession(id)
// returns: 1: an error
StopPhalanxSession(id)CalcPreferredCargo
Composes a transport serving the wanted type first.
CalcPreferredCargo(preferred, probes, pathfinders, large, small, total, roundUp)
// returns: 5: probes, pathfinders, large, small, the cargo
probes, pathfinders, lc, sc, cargo = CalcPreferredCargo(LARGECARGO, 0, 0, 50, 20, 5000000, true)CreateUnion
Opens a joint attack around a fleet.
CreateUnion(fleet, players)
// returns: 2: the union number and an errorWorkers
StartFarmingBot
Farming. StartFarmingBot() gives the farmer a session when it has none.
StartFarmingBot()
// returns: 1: an error
StartFarmingBot()StopFarmingBot
Farming. StartFarmingBot() gives the farmer a session when it has none.
StopFarmingBot()
// returns: 1: an error
err = StopFarmingBot()StartFarmSession
Starts one named session, like the ▶ on its row.
StartFarmSession(session)
// returns: 1: an error
StartFarmSession(session.ID)RunWorkerNow
Runs a pass of the worker without waiting for it to wake up: the Brain's « Check now », the defense's « Check for attacks », the scanner's « Scan the universe now ».
RunWorkerNow(name)
// returns: 1: an error
err = RunWorkerNow("brain")IsRunningBrainBot
True if Brain is running.
IsRunningBrainBot()
// returns: 1: a boolean
Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())IsRunningFarmingBot
True if farming is running.
IsRunningFarmingBot()
// returns: 1: a boolean
if IsRunningFarmingBot() {
Print("farming is running")
}IsRunningExpeditionsBot
IsRunningExpeditionsBot()
// returns: 1: a boolean
Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())IsRunningColonizerBot
IsRunningColonizerBot()
// returns: 1: a boolean
Print(IsRunningBrainBot(), IsRunningExpeditionsBot(), IsRunningColonizerBot())IsRunningDiscoveryBot
IsRunningDiscoveryBot()
// returns: 1: a boolean
Print(IsRunningDiscoveryBot(), IsRunningDefenderBot())IsRunningDefenderBot
IsRunningDefenderBot()
// returns: 1: a boolean
Print(IsRunningDiscoveryBot(), IsRunningDefenderBot())StartWorker
Switches the named worker on.
StartWorker(name)
// returns: 1: an error
err = StartWorker("timer")IsWorkerRunning
Says whether it is running right now. See above.
IsWorkerRunning(name)
// returns: 1: a boolean
Print(name, "running:", IsWorkerRunning(name), "on:", IsWorkerEnabled(name))IsWorkerEnabled
Says whether its switch is on.
IsWorkerEnabled(name)
// returns: 1: a boolean
before = IsWorkerEnabled("expeditions")ListWorkers
The names you can switch on here, in English.
ListWorkers()
// returns: 1: a list
for name in ListWorkers() {
Print(name, "running:", IsWorkerRunning(name), "on:", IsWorkerEnabled(name))
}NewFarmSession
To chain, then BuildFarmSession().
NewFarmSession()
// returns: 1: a builder
f = NewFarmSession()GetSpySettings
Every setting below, in one go.
GetSpySettings()
// returns: 1: the settings
Print(GetSpySettings().PlayerList)SetSpyTargets
"all", "planets" or "moons": the "Targets" menu.
SetSpyTargets(targets)
// returns: 1: an error
SetSpyTargets("planets")SetSpyPlayers
"all", "active", "inactive", "hunter" or "list": the "Players" menu.
SetSpyPlayers(players)
// returns: 1: an error
SetSpyPlayers("list")SetSpyPlayerList
The text box of the "List" choice: a list of player names, written as in the highscore.
SetSpyPlayerList(names)
// returns: 1: an error
err = SetSpyPlayerList(["Alpha", "Beta"])SetSpyRoute
"systems" or "players": the "Route" menu, system by system or player by player.
SetSpyRoute(route)
// returns: 1: an error
SetSpyRoute("players")SetSpyStrongPlayers
"Spy on stronger players too".
SetSpyStrongPlayers(yes)
// returns: 1: an error
SetSpyStrongPlayers(false)SetSpySkipHomeworlds
"Skip home planets"; their moon is still spied on.
SetSpySkipHomeworlds(yes)
// returns: 1: an error
SetSpySkipHomeworlds(true)SetSpyActivityStar
The "Active players only" box: the red star, under 16 min.
SetSpyActivityStar(yes)
// returns: 1: an error
SetSpyActivityStar(false)SetSpyActivityTimer
The "Timer players only" box: 16 to 59 min.
SetSpyActivityTimer(yes)
// returns: 1: an error
SetSpyActivityTimer(true)SetSpyActivityNone
The "Players with no activity" box: nothing shown, over an hour.
SetSpyActivityNone(yes)
// returns: 1: an error
err = SetSpyActivityNone(true)SetSpyProbeDelay
Delay between two probes, in milliseconds.
SetSpyProbeDelay(min, max)
// returns: 1: an error
SetSpyProbeDelay(300, 450)SetSpySystemDelay
Delay between two systems, in milliseconds.
SetSpySystemDelay(min, max)
// returns: 1: an error
SetSpySystemDelay(300, 500)SetSpyPlayerDelay
Delay between two players, when the campaign goes player by player, in milliseconds.
SetSpyPlayerDelay(min, max)
// returns: 1: an error
SetSpyPlayerDelay(2000, 5000)SetSpyMaxSlots
The Spyer's slot cap, from 0 (no cap) to 100.
SetSpyMaxSlots(n)
// returns: 1: an error
SetSpyMaxSlots(4)SetSpyCheckInterval
Wait between two passes of the worker, in seconds.
SetSpyCheckInterval(min, max)
// returns: 1: an error
err = SetSpyCheckInterval(900, 1800)NewSpySession
A new campaign, to chain and then BuildSpySession().
NewSpySession()
// returns: 1: a builder
s = NewSpySession()EditSpySession
The "Edit" button: the saved campaign, to rework.
EditSpySession(campaign)
// returns: 1: a builder
e = EditSpySession(campaign.ID)GetSpySessions
The table of campaigns.
GetSpySessions()
// returns: 1: a list
for c in GetSpySessions() {
if c.Paused {
ResumeSpySession()
}
}StartSpySession
"Start", or resuming the paused campaign.
StartSpySession(campaign)
// returns: 1: an error
err = StartSpySession(campaign.ID)PauseSpySession
"Pause": the progress is kept.
PauseSpySession()
// returns: 1: an error
PauseSpySession()ResumeSpySession
"Resume": the paused campaign carries on from the system it reached.
ResumeSpySession()
// returns: 1: an error
ResumeSpySession()StopSpySession
"Stop": the progress is thrown away.
StopSpySession()
// returns: 1: an error
StopSpySession()RemoveSpySession
"Delete"; the chosen campaign stops with it.
RemoveSpySession(campaign)
// returns: 1: an error
RemoveSpySession(campaign.ID)GetExpeditionsStrategy
"majority", "all" or "never".
GetExpeditionsStrategy()
// returns: 1: a string
if GetExpeditionsStrategy() != "all" {
err = SetExpeditionsStrategy("all")
if err != nil { LogError("strategy:", err) }
}SetExpeditionsStrategy
Changes it, setting saved.
SetExpeditionsStrategy(name)
// returns: 1: an error
err = SetExpeditionsStrategy("all")GetFleetSlotsReserved
How many slots are kept free.
GetFleetSlotsReserved()
// returns: 1: an integer
kept = GetFleetSlotsReserved()SetFleetSlotsReserved
Changes that number, setting saved.
SetFleetSlotsReserved(n)
// returns: 1: an errorIgnorePlayer
Spares a player. Name or id.
IgnorePlayer(player)
// returns: 1: an error
IgnorePlayer("Xylo") // by name, as on screenIgnorePlanet
Spares a position, moon included.
IgnorePlanet(coord)
// returns: 1: an error
IgnorePlanet("1:42:8") // the planet AND its moonIgnoreAlliance
Spares every known member of an alliance.
IgnoreAlliance(tag)
// returns: 1: an error
IgnoreAlliance("SLD") // every member the Scanner has seenUnignorePlanet
UnignorePlanet(coord)
// returns: 1: an errorUnignoreAlliance
UnignoreAlliance(tag)
// returns: 1: an errorIsPlayerIgnored
Whether it is on the list.
IsPlayerIgnored(player)
// returns: 1: a boolean
if IsPlayerIgnored("Xylo") {
Print("left alone")
}IsPlanetIgnored
IsPlanetIgnored(coord)
// returns: 1: a booleanIsAllianceIgnored
IsAllianceIgnored(tag)
// returns: 1: a booleanGetIgnored
The whole list, all three kinds together.
GetIgnored()
// returns: 2: the list and an error
list, err = GetIgnored()GetFarmBlacklist
The whole list, players and positions together.
GetFarmBlacklist()
// returns: 2: the list and an error
entries, err = GetFarmBlacklist()AddToFarmBlacklist
A player, by name or id, or a position.
AddToFarmBlacklist(target)
// returns: 1: an error
AddToFarmBlacklist("1:42:8") // by hand: the planet AND its moonRemoveFromFarmBlacklist
Removing what is not there is not an error; a name nothing knows is one.
RemoveFromFarmBlacklist(target)
// returns: 1: an error
RemoveFromFarmBlacklist(e.Key) // give back only the automatic entriesClearFarmBlacklist
Empties it, automatic entries included.
ClearFarmBlacklist()
// returns: 1: an error
ClearFarmBlacklist()GetHunterTargets
The players under watch.
GetHunterTargets()
// returns: 2: the list and an error
targets, err = GetHunterTargets()AddHunterTarget
Puts a player under watch.
AddHunterTarget(player)
// returns: 1: an error
AddHunterTarget("Xylo") // by name, as on screenPauseHunterTarget
Suspends them without losing their history.
PauseHunterTarget(player, paused)
// returns: 1: an errorGetHunterHistory
The player's activity readings, newest first.
GetHunterHistory(player, n)
// returns: 2: the series and an error
series, err = GetHunterHistory("Xylo", 200)IsScriptRunning
Is that one running.
IsScriptRunning(name)
// returns: 1: a boolean
if IsScriptRunning(WATCH) {
LogInfo("the watch is already running")
return
}IsPausedScript
Is that one paused.
IsPausedScript(name)
// returns: 1: a boolean
if IsPausedScript(WATCH) {
ResumeScript(WATCH)
}StartScript
Starts it and returns at once. The table of parameters is optional.
StartScript(name, [params])
// returns: 1: an error
StartScript("night-watch")ScriptParams
The parameters of the current run, empty when there are none.
ScriptParams()
// returns: 1: a table
p = ScriptParams()IsScriptRunAtStart
Is its "run at startup" box ticked.
IsScriptRunAtStart(name)
// returns: 1: a booleanSetScriptRunAtStart
Ticks it (true) or unticks it (false).
SetScriptRunAtStart(name, on)
// returns: 1: an errorIsScriptRemoteStart
Is its "remote start" box ticked.
IsScriptRemoteStart(name)
// returns: 1: a booleanIsRemoteStartEnabled
Is remote start switched on in My account.
IsRemoteStartEnabled()
// returns: 1: a booleanBotsCount
The number of bots in the installation, those beyond the licence included.
BotsCount()
// returns: 1: an integerOwnBots
All of them, the script's own included, in the order of the home page.
OwnBots()
// returns: 1: a list of botsAllBots
The same list: Kepler does not share bots between installations.
AllBots()
// returns: 1: a list of botsGetBotByID
The bot with that number, nil when there is none.
GetBotByID(number)
// returns: 1: a bot, or `nil`StartRemoteScript
Starts a script of that bot. The address and the key stay empty.
StartRemoteScript(address, number, key, script)
// returns: 1: an errorApplyAddonsToAllBots
"Apply this choice to all bots" of the browser add-ons: this bot's choice becomes everyone's.
ApplyAddonsToAllBots()
// returns: 1: an errorCopyNotificationsToAllBots
This bot's Notifications channels, webhooks and token included, set on all the others.
CopyNotificationsToAllBots()
// returns: 1: an errorSetFarmProbesEverywhere
The number of espionage probes of every farm campaign of every bot.
SetFarmProbesEverywhere(probes)
// returns: 1: an error
SetFarmProbesEverywhere(6)CopyHunterTargets
This bot's Hunter list, copied to the bot with that number.
CopyHunterTargets(number)
// returns: 1: an error
err = CopyHunterTargets(2)GetBotLanguage
The language of the interface and of the notifications, fr or en for instance. GetLang gives the game server's.
GetBotLanguage()
// returns: 1: a stringGetStartBotsOnLaunch
Does Kepler start the active bots when it opens.
GetStartBotsOnLaunch()
// returns: 1: a booleanSetStartBotsOnLaunch
Ticks or unticks it, without starting anything right away.
SetStartBotsOnLaunch(on)
// returns: 1: an errorGetSameEmailBotsDelay
The gap, in seconds, between the actions of two bots of the same e-mail address.
GetSameEmailBotsDelay()
// returns: 2: the low and the high
low, high = GetSameEmailBotsDelay() // TWO targetsSetSameEmailBotsDelay
From 0 to 30 seconds, the high never below the low.
SetSameEmailBotsDelay(low, high)
// returns: 1: an error
err = SetSameEmailBotsDelay(3, 8)GetManualModeTimeout
The minutes after which the bot takes the built-in browser back.
GetManualModeTimeout()
// returns: 1: an integerSetManualModeTimeout
From 1 to 120 minutes. A session in progress keeps the delay it started with.
SetManualModeTimeout(minutes)
// returns: 1: an errorIsFarmSessionOngoing
Is a campaign working right now.
IsFarmSessionOngoing()
// returns: 1: a boolean
if IsFarmSessionOngoing() {
PauseFarmingBot() // giving the slots back to the Defender
SleepMin(30)
ResumeFarmingBot() // and back to where we left off
}FarmingBotSessionsCount
How many campaigns are running.
FarmingBotSessionsCount()
// returns: 1: an integerGetFarmSessions
The saved campaigns, those from the screen included, with their state and settings.
GetFarmSessions()
// returns: 1: a list
for s in GetFarmSessions() {
if s.Name == "night" && s.State == "idle" {
StartFarmSession(s.ID)
}
}PauseFarmingBot
Suspends the running campaign.
PauseFarmingBot()
// returns: 1: an error
PauseFarmingBot() // giving the slots back to the DefenderResumeFarmingBot
Resumes it where it stopped.
ResumeFarmingBot()
// returns: 1: an error
ResumeFarmingBot() // and back to where we left offAbortAllFarmingSessions
Stops everything and removes every campaign, the running one and those from the Farmer tab included.
AbortAllFarmingSessions()
// returns: 1: an error
AbortAllFarmingSessions() // in the evening: nothing runs, nothing from yesterdayStopFarmSession
The ■: stops that campaign, "" for the running one; the next one in the queue takes over.
StopFarmSession(campaign)
// returns: 1: an error
err = StopFarmSession("") // the running one stops, "night" leavesQueueFarmSession
The +: puts it behind the ones waiting their turn.
QueueFarmSession(campaign)
// returns: 1: an error
err = QueueFarmSession(night.ID)EditFarmSession
The ✎: the saved campaign, to edit then BuildFarmSession().
EditFarmSession(campaign)
// returns: 1: a builder
e = EditFarmSession(s.ID)DeleteFarmSession
The ✕: removes it from the list.
DeleteFarmSession(campaign)
// returns: 1: an errorSetFarmMaxSlots
Changes it, from 0 (MAX, no cap) to 100.
SetFarmMaxSlots(n)
// returns: 1: an error
SetFarmMaxSlots(8)StopAllFarmSessions
The "⏹ Stop everything": stops every campaign and empties the queue; they stay in the list.
StopAllFarmSessions()
// returns: 1: an errorRepatriateNow
Runs a repatriation pass without waiting.
RepatriateNow()
// returns: 1: an error
RepatriateNow()RepatriateSetAllDestinations
That celestial receives, all the others feed it.
RepatriateSetAllDestinations(celestial)
// returns: 1: an error
RepatriateSetAllDestinations("1:64:8")ClearAllConstructionQueues
Empties the queue of every celestial in Queue mode.
ClearAllConstructionQueues()
// returns: 1: an error
ClearAllConstructionQueues()AddItemToQueue
Adds a line at the end of a celestial's queue.
AddItemToQueue(celestial, what, number)
// returns: 1: an error
err = AddItemToQueue(c.GetID(), METALMINE, 0)GetSupplyFinishDeliveries
Whether « Finish deliveries in flight before the Planning switches Brain off » is ticked.
GetSupplyFinishDeliveries()
// returns: 1: a boolean
if !GetSupplyFinishDeliveries() {
err = SetSupplyFinishDeliveries(true)
if err != nil {
LogWarn("supply box refused: " + err.Error())
}
}SetSupplyFinishDeliveries
Ticks or unticks it, like on the Brain page, Supply panel.
SetSupplyFinishDeliveries(on)
// returns: 1: an error
err = SetSupplyFinishDeliveries(true)GetNextSleepTime
The next time it goes to sleep.
GetNextSleepTime()
// returns: 1: a time, or `nil`
end = GetNextSleepTime()SetDefenderCheckInterval
The round's interval, in seconds.
SetDefenderCheckInterval(min, max)
// returns: 1: an errorSetDefenderCheckOrigin
Where the round looks from: 1 a random celestial, 2 the home planet, 3 the last celestial visited, 4 a random moon.
SetDefenderCheckOrigin(n)
// returns: 1: an errorTriggerFleetSave
Sends the fleet out now, using the sleep-mode settings.
TriggerFleetSave()
// returns: 1: an error
err = TriggerFleetSave()GetFleetSaveReturn
The night fleet save's return time: AtWake, WakeFrom, WakeTo, From, To, From2, To2.
GetFleetSaveReturn()
// returns: 1: a structure
r = GetFleetSaveReturn()SetFleetSaveReturnAtWake
Ticks or unticks « Return at wake-up » and sets its minutes after waking up.
SetFleetSaveReturnAtWake(on, from, to)
// returns: 1: an error
err = SetFleetSaveReturnAtWake(true, 2, 10)SetFleetSaveReturnWindow
The clock window of a sleep window, 1 or 2: "08:00", "08:30".
SetFleetSaveReturnWindow(window, from, to)
// returns: 1: an errorGetColonizerSettings
Every setting of the Colonizer page: Origin, OriginIsHome, Galaxy, SystemFrom, SystemTo, Positions, MinFieldsOn, MinFields, MinTempOn, MinTemp, MaxTempOn, MaxTemp, SystemDelayMin, SystemDelayMax, ArrivalGapMin, ArrivalGapMax, MaxSlots.
GetColonizerSettings()
// returns: 1: a structure
s = GetColonizerSettings()SetColonizerOrigin
The planet the colony ships leave from, or "home" to follow the home planet.
SetColonizerOrigin(celestial)
// returns: 1: an error
SetColonizerOrigin("home")SetColonizerRange
The galaxy and the range of systems to search.
SetColonizerRange(galaxy, from, to)
// returns: 1: an errorSetColonizerPositions
The positions to colonize in each system: [4, 5, 6].
SetColonizerPositions(positions)
// returns: 1: an error
SetColonizerPositions([4, 5, 6, 10, 11, 12])SetColonizerMinFields
The « Minimum fields » box and its number.
SetColonizerMinFields(on, fields)
// returns: 1: an errorSetColonizerMinTemperature
The « Minimum temperature » box and its value.
SetColonizerMinTemperature(on, t)
// returns: 1: an errorSetColonizerMaxTemperature
The « Maximum temperature » box and its value.
SetColonizerMaxTemperature(on, t)
// returns: 1: an errorSetColonizerSystemDelay
Delay between two systems, in milliseconds.
SetColonizerSystemDelay(min, max)
// returns: 1: an errorSetColonizerArrivalGap
Delay between two arrivals, in seconds.
SetColonizerArrivalGap(min, max)
// returns: 1: an error
err = SetColonizerArrivalGap(60, 90)SetColonizerMaxSlots
The Colonizer's slot cap, from 0 (no cap) to 100.
SetColonizerMaxSlots(n)
// returns: 1: an errorGetDefenderConfigs
The settings of the Defence page. With a celestial, its « Evacuation per planet » line.
GetDefenderConfigs(celestial)
// returns: 1: a tableSetDefenderConfigs
Sets the given fields. Without a celestial, those of the page: SetDefenderConfigs(table).
SetDefenderConfigs(celestial, table)
// returns: 1: an errorGetBrainConfigs
The general settings of the Brain page. With a celestial, its card: mode, queue, targets, boxes.
GetBrainConfigs(celestial)
// returns: 1: a table
for l in GetBrainConfigs(p).Queue {
Print(l.ID, l.Level, l.Mode, l.Done)
}SetBrainConfigs
Sets the given fields. Without a celestial, those at the top of the page: SetBrainConfigs(table).
SetBrainConfigs(celestial, table)
// returns: 1: an error
err = SetBrainConfigs(p, {"Mode": "queue", "Queue": [
{"ID": METALMINE, "Level": 20},
{"ID": ROCKETLAUNCHER, "Level": 200, "Mode": "reach"},
]})GetSupplyBanks
The Supply banks, like GetSupplyConfigs().Banks.
GetSupplyBanks()
// returns: 1: a listSetSupplyBanks
Replaces them, like SetSupplyConfigs({"Banks": celestials}).
SetSupplyBanks(celestials)
// returns: 1: an errorSetMilitaryDebrisConfigs
Sets the given fields.
SetMilitaryDebrisConfigs(table)
// returns: 1: an errorGetHunterConfigs
The Hunter settings: rate and « Espionage on demand ».
GetHunterConfigs()
// returns: 1: a table
cfg = GetHunterConfigs()SetHunterConfigs
Sets the given fields.
SetHunterConfigs(table)
// returns: 1: an error
err = SetHunterConfigs(cfg)GetFarmingBotConfigs
The "Farmer pace" panel of the Farmer tab, and its slot cap.
GetFarmingBotConfigs()
// returns: 1: a tableGetTimerTargets
The watched players, like GetTimerConfigs().Players.
GetTimerTargets()
// returns: 1: a listAddTimerTarget
Adds a player, by name or by id.
AddTimerTarget(player)
// returns: 1: an error
AddTimerTarget("Kcwin")GetRewardsMessages
The texts the bot draws at random for the Rewards mission « Send an in-game message ».
GetRewardsMessages()
// returns: 1: a list
Print(GetRewardsMessages())SetRewardsMessages
Replaces the list, one message per element: ["sry for event", "event"]. An empty list brings back the default one.
SetRewardsMessages(messages)
// returns: 1: an error
err = SetRewardsMessages(["sry for event", "event", "rewards"])Worker settings
GetExpeditionsConfigs
Every setting of the Expeditions page, sheets included (Sheets).
GetExpeditionsConfigs()
// returns: 1: a table
configs = GetExpeditionsConfigs()SetExpeditionsConfigs
Saves the fields given.
SetExpeditionsConfigs(cfg)
// returns: 1: an error
err = SetExpeditionsConfigs(configs)NewSheet
A new sheet, to add to Sheets: configs.Sheets += *sheet.
NewSheet()
// returns: 1: a table
sheet = NewSheet()SetActiveExpeditionsSheet
Picks the sheet in use, by name or UUID, and unticks the others. "" leaves none.
SetActiveExpeditionsSheet(name)
// returns: 1: an error
CronExec("0 23 * * *", func() { SetActiveExpeditionsSheet("Night") })GetSleepModeConfigs
The settings of the Sleep mode page: schedule, and what fleets do during sleep.
GetSleepModeConfigs()
// returns: 1: a tableSetSleepModeConfigs
Saves the fields given.
SetSleepModeConfigs(cfg)
// returns: 1: an error
err = SetSleepModeConfigs({"Mode": "auto", "SleepJitter": 15, "BeforeSleep": "returnwindow"})SetSleepSchedule
The two ranges of a day, like a line of the schedule table; from2 and to2 are optional.
SetSleepSchedule(day, from, to, from2, to2)
// returns: 1: an error
SetSleepSchedule("everyday", "23:30", "07:00")GetFleetSaveConfigs
The settings of the night fleet save and its table of celestials.
GetFleetSaveConfigs()
// returns: 1: a table
f = GetFleetSaveConfigs()SetFleetSaveConfigs
Saves the fields given.
SetFleetSaveConfigs(cfg)
// returns: 1: an error
err = SetFleetSaveConfigs(f)GetRepatriateConfigs
The settings of the Repatriation tab.
GetRepatriateConfigs()
// returns: 1: a tableSetRepatriateConfigs
Saves the fields given.
SetRepatriateConfigs(cfg)
// returns: 1: an error
err = SetRepatriateConfigs({"Mode": "moon", "KeepShipsPlanet": {LARGECARGO: 100}, "LeaveMoon": {"Deuterium": 2000000}})SetRepatriateDestinations
The banks, several at once, without touching the celestials to empty.
SetRepatriateDestinations(celestials)
// returns: 1: an error
SetRepatriateDestinations(["M:1:105:8", "M:4:220:9"])GetDistributionConfigs
The settings of the Distribution tab.
GetDistributionConfigs()
// returns: 1: a tableSetDistributionConfigs
Saves the fields given.
SetDistributionConfigs(cfg)
// returns: 1: an error
err = SetDistributionConfigs({"Deuterium": 20000000, "FillUp": true, "Auto": true, "BelowDeuterium": 5000000})GetRewardsConfigs
The settings of the Rewards and booster page, one table per tab.
GetRewardsConfigs()
// returns: 1: a tableSetRewardsConfigs
Saves the fields given.
SetRewardsConfigs(cfg)
// returns: 1: an error
err = SetRewardsConfigs({
"Booster": {"Active": true, "Stacks": {"slots:fleet": [2, 4]}, "AllPlanets": {"booster:metal": -1}},
"Auction": {"MaxBids": {"kraken:1d": 9000}},
})SetMaxSlotsFor
Caps the flights in the air of an initiator, a name the script chooses: from 0 (no cap of its own) to 100.
SetMaxSlotsFor(initiator, n)
// returns: 1: an error
SetMaxSlotsFor("raids", 3)GetSlot
Waits for a free fleet slot for the initiator, the account's reserve counted; the channel delivers a function to call with the fleet sent.
GetSlot(initiator)
// returns: 1: a channel
slot = <-GetSlot("raids")CreateFleet
Registers a fleet already sent under an initiator: it counts toward its cap until it returns.
CreateFleet(fleet, initiator)
// returns: 1: an errorOrion
StartOrion
The "Orion active" box, saved. StartWorker("orion") and StopWorker("orion") do the same. StartOrion returns an error on a universe without Orion, and saves nothing.
StartOrion()
// returns: 1: an errorStopOrion
The "Orion active" box, saved. StartWorker("orion") and StopWorker("orion") do the same. StartOrion returns an error on a universe without Orion, and saves nothing.
StopOrion()
// returns: 1: an errorGetOrion
The module's last report, with no request.
GetOrion()
// returns: 1: a structure
o = GetOrion()RefreshOrion
Reads the game right now, like the "Refresh" button: four requests, worker off included, no gesture. When the session has not seen Orion (scanner at zero), one more Facilities page, which reopens the gestures if the universe has it. When refused, it returns the previous report with the error. If a module pass is running, it reads nothing and says so in its error: the report returned then predates that pass.
RefreshOrion()
// returns: 2: the structure and an errorGetOrionSettings
All the settings as the module applies them: Enabled, IntervalMinutes, AutoClaim, Conversions (Planet, Resource, Load), Deliveries, ScanLevel, ScanRange, Transporter, MissionPlanet.
GetOrionSettings()
// returns: 1: a structureSetOrionInterval
The gap between two readings, from 10 to 180 minutes.
SetOrionInterval(minutes)
// returns: 1: an errorSetOrionAutoClaim
The "Claim the rewards of finished missions" box.
SetOrionAutoClaim(on)
// returns: 1: an errorSetOrionConversion
The conversion to hold on a planet. Resource: "metal", "crystal", "deuterium" or "food". Load: from 10 to 100, in steps of 10.
SetOrionConversion(planet, resource, load)
// returns: 1: an errorClearOrionConversion
"Leave it to the game": the module no longer holds this planet. Its running conversion carries on.
ClearOrionConversion(planet)
// returns: 1: an errorSetOrionScanLevel
The level of the module's scans, 1 or more. Beyond what the scanners allow, the module scans at the highest allowed.
SetOrionScanLevel(level)
// returns: 1: an errorSetOrionScanRange
The range of the module's scans: 10, 50 or 150 systems.
SetOrionScanRange(range)
// returns: 1: an errorSetOrionTransporter
The ships of the deliveries: "auto" (large first, small to complete), "small" or "large".
SetOrionTransporter(kind)
// returns: 1: an errorSetOrionMissionPlanet
The planet the module aims at: its report, its gestures and those of this page. 0 to let it take the one with the highest scanner, which it also does when this one has none.
SetOrionMissionPlanet(planet)
// returns: 1: an errorOrionScanCost
The cost of a scan: Cost, Lithium, LithiumPerHour, NextStopSeconds. Nothing is spent.
OrionScanCost(level, range)
// returns: 2: a structure and an errorOrionScan
Runs a scan and returns Cards, like the cards of the report. It spends lithium and replaces the cards of the previous scan. When refused for lack of room, FreeInRange says how many are left, and force at true accepts a scan reduced to those.
OrionScan(level, range, [force])
// returns: 2: a structure and an errorOrionInvestigate
Takes the mission of a card, or of its Mission. Returns MissionsWithoutFleet and Discoveries. Its clock starts at that moment, and sending a fleet there is up to you.
OrionInvestigate(card)
// returns: 2: a structure and an error
p, err = OrionInvestigate(c)OrionClaim
Claims the rewards of a finished mission, or of its Object, with the gestures of the "Claim" button: the cost and the stock read again from the game, then the report after the claim, about eight requests. Under the cost, on an unreadable cost, or on a mission that is Lost, already claimed or still running, it returns its refusal and nothing leaves. Never dark matter. If a module pass is running, it says so too: try again a moment later.
OrionClaim(mission)
// returns: 1: an errorOrionStartConversion
Starts or replaces the conversion of a planet, once. To have it held, use SetOrionConversion.
OrionStartConversion(planet, resource, load)
// returns: 1: an errorOrionStopConversion
Stops the conversion of a planet. If the module holds it, it restarts at its next pass: remove it first with ClearOrionConversion.
OrionStopConversion(planet)
// returns: 1: an errorGetOrionFleetSettings
The settings below: MaxSlots, CleanMessages, DeliveryCelestials. No request.
GetOrionFleetSettings()
// returns: 1: a structureSetOrionMaxSlots
The "Orion" line of Settings > Fleet slots: the number of anomaly flights, returns included, from 0 (no cap, the default) to 100. Outside these bounds, refused. The reserve and the slots kept for expeditions and the main fleet come first.
SetOrionMaxSlots(n)
// returns: 1: an errorSetOrionDeliveryCelestials
The celestials a delivery can leave from: ["[P:4:273:12]"]. An empty list: all of them, the default. The transporters of the next expeditions stay docked either way.
SetOrionDeliveryCelestials(list)
// returns: 1: an errorSetOrionCleanMessages
The "Delete Fleet Command messages of finished missions" box, unticked by default.
SetOrionCleanMessages(yes)
// returns: 1: an errorWaitOrionAlert
Waits for an alert of the module, zero to wait forever. The boolean says whether it came.
WaitOrionAlert(seconds)
// returns: 2: the alert and a boolean
a, seen = WaitOrionAlert(600)OrionControlCenter
Reads the Control Centre tab of a planet that has a scanner: one request, no token used.
OrionControlCenter(celestial)
// returns: 2: a list and an errorOrionSlotPrices
The price of the next slot of each kind, read from this planet's scanner tab: AnomalyDiscovery and ScanResult, each with Metal, Crystal, Deuterium, Maxed (the game sells no more) and Unreadable.
OrionSlotPrices(celestial)
// returns: 2: a structure and an errorOrionBuySlot
Buys a slot, paid by this planet: "anomalyDiscovery" (one more anomaly investigated at a time) or "scanResult" (one more result per scan).
OrionBuySlot(kind, celestial)
// returns: 1: an errorOrionProfitableScannerLevel
The highest scanner level whose credited lithium is worth more than converting the same price, on this universe: 16 at speed 8, 17 at speed 10. No request.
OrionProfitableScannerLevel()
// returns: 1: an integerOrionEqualizeScanners
Spreads a sum of levels across scanners at the lowest cost, lowest first: [5, 1, 3] towards a sum of 12 returns [5, 4, 3]. A calculation, no request, ignoring the planets' fields.
OrionEqualizeScanners(levels, sum)
// returns: 2: a list and an errorOrion: value
GetOrionValueSettings
All the settings below: MinValueOn, MinValue, CardOrder, MaxDurationMinutes, ScanAtMax, ReplaceCards, ProfitableClaim.
GetOrionValueSettings()
// returns: 1: a structureSetOrionMinValue
Only take cards worth threshold, from 0 to 1000, in metal equivalent per lithium of the claim: 3 metal = 2 crystal = 1 deuterium, ships not counted. Zero means 6, the suggested threshold. With no card above it, nothing is taken.
SetOrionMinValue(on, threshold)
// returns: 1: an error
SetOrionMinValue(true, 6)SetOrionCardOrder
The order in which cards are tried: "distance" (the nearest, the default), "value" (the most profitable per lithium), "hour" (the most profitable per hour of mission).
SetOrionCardOrder(order)
// returns: 1: an error
SetOrionCardOrder("value")SetOrionMaxDuration
Set aside a longer card, up to 10,080 minutes. Zero: no limit.
SetOrionMaxDuration(minutes)
// returns: 1: an errorSetOrionScanAtMax
Scan at the highest level the game allows, the sum of the scanners, instead of the level of SetOrionScanLevel. The level stays within reach of the cargo at the dock.
SetOrionScanAtMax(on)
// returns: 1: an error
SetOrionScanAtMax(true)SetOrionReplaceCards
A scan erases all earlier cards, and the module only erases its own: it stops scanning while others remain. true lets it replace them. It is the way out for cards scanned by hand, or before this memory: none of them expires.
SetOrionReplaceCards(on)
// returns: 1: an errorSetOrionAutoConversion
The line of this planet becomes "Automatic": surplus food first, then the resource whose stock exceeds six hours of income, at the load its income covers, never negative. If lithium is short for a claim, the stock is no longer kept.
SetOrionAutoConversion(planet)
// returns: 1: an error
SetOrionAutoConversion(planet)SetOrionStoppedConversion
The line of this planet becomes "Stop": the module keeps it stopped.
SetOrionStoppedConversion(planet)
// returns: 1: an errorSetOrionProfitableClaim
Leave in the game a reward worth less than the price of its lithium, 3 metal equivalents per lithium. What cannot be valued (ships, experience, artefacts, items) is always claimed.
SetOrionProfitableClaim(on)
// returns: 1: an errorOrion: combats
GetOrionCombatSettings
The applied settings, with no request: Enabled, MaxShare, Margin, MaxLevel, Celestials.
GetOrionCombatSettings()
// returns: 1: a structureSetOrionCombats
The "Run PvE combats" box, unticked by default.
SetOrionCombats(yes)
// returns: 1: an errorSetOrionCombatMaxShare
The share of each ship type of a celestial that combats can commit, anomaly flights already out included, from 1 to 100; 0 for the default, 25.
SetOrionCombatMaxShare(percent)
// returns: 1: an errorSetOrionCombatMargin
How many more ships each simulated wave counts on top of the worst case, from 1 to 300; 0 for the default, 20.
SetOrionCombatMargin(percent)
// returns: 1: an errorSetOrionCombatMaxLevel
The card level above which the module takes nothing; 0 for no limit.
SetOrionCombatMaxLevel(level)
// returns: 1: an errorSetOrionCombatCelestials
The celestials a combat can leave from, written "4:273:12" or "M:4:273:12"; an empty list for all.
SetOrionCombatCelestials(list)
// returns: 1: an errorGalaxy
GetCachedPlayer
PlayerID, PlayerName, Points, Rank, Total, HonourPoints.
GetCachedPlayer()
// returns: 1: your own record
me = GetCachedPlayer() // ONE target: this is a structGetSlots
InUse, Total, ExpInUse, ExpTotal.
GetSlots()
// returns: 1: your fleet slots
slots = GetSlots() // ONE target as wellServerURL
Your server's address, with no trailing slash. A Kepler addition.
ServerURL()
// returns: 2: an address and an error
addr, err = ServerURL() // TWO targetsRedeemCode
Redeems a code in the Gameforge lobby for the bot's account, a gift or a sitting code for instance: the « Redeem a Gameforge code » field of the Settings. A Kepler addition.
RedeemCode(code)
// returns: 1: an error
err = RedeemCode("XXXX-XXXX-XXXX")GetFingerprintNames
The entries of the fingerprint library that this bot's fingerprint setting describes. Empty when none matches.
GetFingerprintNames()
// returns: 1: a list of names
names = GetFingerprintNames()NewFingerprint
"+ New fingerprint" on the Fingerprints page: a machine drawn at random, then saved in the library.
NewFingerprint(name, system, region)
// returns: 2: the fingerprint and an error
f, err = NewFingerprint("Living room phone", "Android", "FR")GetFingerprint
The sheet of a library entry, to read or to edit.
GetFingerprint(name)
// returns: 1: the fingerprint, `nil` when there is none
f = GetFingerprint("Living room")SaveFingerprint
"Save" on the sheet of an entry you have edited.
SaveFingerprint(fingerprint)
// returns: 1: an error
err = SaveFingerprint(f)ApplyFingerprint
"Apply" in the Browser fingerprint panel: this bot will present that entry to the game.
ApplyFingerprint(name)
// returns: 1: an error
err = ApplyFingerprint(f.Name)DeleteFingerprint
✕ in the library: the entry of that name is removed from it, unless a bot carries it.
DeleteFingerprint(name)
// returns: 1: an error
err = DeleteFingerprint(name)GalaxyInfos
The fifteen positions of a system.
GalaxyInfos(galaxy, system)
// returns: 2: the reading and an error
sys, err = GalaxyInfos(1, 224) // TWO targetsGalaxyInfosUsing
The same, standing on a celestial.
GalaxyInfosUsing(galaxy, system, celestial)
// returns: 2: the reading and an error
sys, err = GalaxyInfosUsing(4, 116, c.GetID())GetPlanetInfo
A single position.
GetPlanetInfo(coordinate)
// returns: 2: the position and an error
p, err = GetPlanetInfo("4:116:6")GetPlanetInfoUsing
The same, standing on a celestial.
GetPlanetInfoUsing(coordinate, celestial)
// returns: 2: the position and an errorCoordinatesAvailableForDiscoveryFleet
The positions a lifeform expedition can be sent to, empty ones included. Empty list when there is none.
CoordinatesAvailableForDiscoveryFleet(origin, galaxy, system)
// returns: 2: the list and an error
coords, err = CoordinatesAvailableForDiscoveryFleet(origin, 1, 64)GetSystemsInRange
In order of number.
GetSystemsInRange(origin, radius)
// returns: 1: a list of systems
Print(GetSystemsInRange(3, 2)) // [1 2 3 4 5]GetSystemsInRangeAsc
Nearest to farthest.
GetSystemsInRangeAsc(origin, radius)
// returns: 1: a list of systems
Print(GetSystemsInRangeAsc(3, 2)) // [3 2 4 1 5]GetSystemsInRangeDesc
Farthest to nearest.
GetSystemsInRangeDesc(origin, radius)
// returns: 1: a list of systems
Print(GetSystemsInRangeDesc(3, 2)) // [5 1 4 2 3]PlayersData
Every player in the universe.
PlayersData()
// returns: 2: the list and an error
players, err = PlayersData() // TWO targetsPlayerDataByID
Clean error if the ID is unknown.
PlayerDataByID(id)
// returns: 2: a player and an error
p, err = PlayerDataByID(id)PlayerDataByName
Whole nickname, case is ignored.
PlayerDataByName(name)
// returns: 2: a player and an error
target, err = PlayerDataByName("Xylo")HighscoreData
Through the game's API. IDs, not names.
HighscoreData(category, typ)
// returns: 2: the whole highscore and an error
ranks, err = HighscoreData(1, 0) // players, general highscoreGetHighscore
The game's highscore page, a hundred players, with their home planet.
GetHighscore(category, typ, page)
// returns: 2: a page and an errorPageContent
A game page, through the account's session.
PageContent(query)
// returns: 2: the text and an error
html, err = PageContent("page=ingame&component=overview")FetchURL
Any address, through the same session.
FetchURL(url)
// returns: 2: the text and an error
body, err = FetchURL("https://example.net/api")HttpRequest
A full request, through the same session.
HttpRequest(method, url, headers, body)
// returns: 3: the text, the code and an error
body, code, err = HttpRequest("POST", "https://example.net/api", headers, payload)SendMessage
A private message, through the game's chat.
SendMessage(playerID, message)
// returns: 1: an error
err = SendMessage(target.ID, "Hello, I come in peace.")GetEspionageReportMessages
The summary of each report on the first page.
GetEspionageReportMessages()
// returns: 2: the list and an error
summaries, err = GetEspionageReportMessages()GetEspionageReportMessagesPages
The same, across several pages.
GetEspionageReportMessagesPages(pages)
// returns: 2: the list and an error
older, err = GetEspionageReportMessagesPages(3)GetEspionageReport
The detailed report of a message.
GetEspionageReport(msgID)
// returns: 2: the report and an error
detail, err = GetEspionageReport(summaries[0].ID)GetEspionageReportFor
The latest report on that position.
GetEspionageReportFor(coordinate)
// returns: 2: the report and an error
report, err = GetEspionageReportFor("1:2:3")GetCombatReportSummaryFor
The latest fight at that position.
GetCombatReportSummaryFor(coordinate)
// returns: 2: the summary and an error
fight, err = GetCombatReportSummaryFor("1:2:3")DeleteMessage
Deletes one message for good, trash included.
DeleteMessage(msgID)
// returns: 1: an error
DeleteMessage(summaries[0].ID)DeleteAllMessagesFromTab
Moves a whole tab to the trash.
DeleteAllMessagesFromTab(tab)
// returns: 1: an error
DeleteAllMessagesFromTab(20)CountColonies
What you have, what you may have.
CountColonies()
// returns: 2: the count and the maximum
count, possible = CountColonies()Toolbox
Min
The smaller of the two.
Min(x, y)
// returns: 1: a number
Printf("%d", Min(3, 5)) // ✓ 3: the result is an integerFloor
The integer below.
Floor(x)
// returns: 1: a number
Floor(o["planet_id"] / 2) == 16814034 // trueRandom
A random integer, bounds included.
Random(min, max)
// returns: 1: an integer
SleepMs(Random(500, 1000))Dotify
Formats a large number the way the game does: 1000000 gives 1.000.000.
Dotify(n)
// returns: 1: a stringBase64Decode
Decodes.
Base64Decode(text)
// returns: 2: the text and an error
plain, err = Base64Decode(code) // ← TWO targetsJsonDecode
Decodes JSON.
JsonDecode(data)
// returns: 2: the value and an error
o, err = JsonDecode(body) // ← TWO targets, againJsonEncode
Writes JSON.
JsonEncode(value)
// returns: 2: the text and an error
text, err = JsonEncode(payload) // ← TWO targetsJsonEncodeIndent
The same, laid out.
JsonEncodeIndent(value, indent)
// returns: 2: the text and an errorMapKeys
Sorted.
MapKeys(table)
// returns: 1: the list of keys
Print(MapKeys(cache)[i], MapValues(cache)[i])MapValues
In key order.
MapValues(table)
// returns: 1: the list of values
Print(MapKeys(cache)[i], MapValues(cache)[i])NewShipsInfos
To be filled with .Set(id, count), then passed to FlightTime, Speed or Cargo.
NewShipsInfos()
// returns: 1: an empty fleet
fleet = NewShipsInfos()NewResources
The three quantities in one go.
NewResources(metal, crystal, deut)
// returns: 1: resources
Print(DoAuction({c.GetID(): NewResources(auction.MinimumBid - auction.AlreadyBid, 0, 0)}))NewCoordinate
The type is PLANET_TYPE, MOON_TYPE or DEBRIS_TYPE.
NewCoordinate(galaxy, system, position, type)
// returns: 1: a coordinateParseCoord
Reads "1:2:3" or "M:1:2:3".
ParseCoord(string)
// returns: 2: the coordinate and an error
coord, err = ParseCoord("M:1:2:3") // TWO targetsID2Str
The readable name of a ship, a defence, a building or a technology.
ID2Str(id)
// returns: 1: a string
Print(ID2Str(204)) // LightFighterShortShipsInfos
Sums up a fleet: LightFighter: 120, SmallCargo: 40.
ShortShipsInfos(fleet)
// returns: 1: a string
LogInfof("%s : %s", planet.Coordinate, ShortShipsInfos(ships))VersionCompare
-1 if a is older, 0 if they are equal, 1 if a is newer.
VersionCompare(a, b)
// returns: 1: an integer
Print(VersionCompare("1.2", "1.2.0")) // 0: absent segments count as zeroGetItems
Every item on the celestial.
GetItems(celestial)
// returns: 2: the items and an error
items, err = GetItems(c.GetID())GetActiveItems
Only those currently in effect.
GetActiveItems(celestial)
// returns: 2: the items and an error
active, err = GetActiveItems(c.GetID())ActivateItem
Switches on an item from the inventory.
ActivateItem(reference, celestial)
// returns: 1: an error
err = ActivateItem(o.Ref, c.GetID())RecruitOfficer
Hires an officer. 2 commander, 3 admiral, 4 engineer, 5 geologist, 6 technocrat; 7 or 90 days.
RecruitOfficer(officer, days)
// returns: 1: an error
Print(RecruitOfficer(5, 7)) // a geologist for seven daysGetAuction
The auction under way.
GetAuction()
// returns: 2: the auction and an error
auction, err = GetAuction()DoAuction
Adds to your bid on the auction under way: { celestial: NewResources(metal, crystal, deuterium) }.
DoAuction(bid)
// returns: 1: an error
Print(DoAuction({c.GetID(): NewResources(auction.MinimumBid - auction.AlreadyBid, 0, 0)}))BuyOfferOfTheDay
Buys the merchant's offer.
BuyOfferOfTheDay()
// returns: 1: an error
Print(BuyOfferOfTheDay())GetDMCosts
What finishing the production under way costs in dark matter: building, research, shipyard. Spends nothing.
GetDMCosts(celestial)
// returns: 2: the costs and an errorUseDM
Presses "Reduce" or "Finish" on a production: "buildings", "research" or "shipyard". Spends dark matter.
UseDM(what, celestial)
// returns: 1: an errorSendIPM
Fires missiles.
SendIPM(planet, target, count, defence)
// returns: 2: the missiles sent and an error
sent, err = SendIPM(c.GetID(), "1:1:1", 10, 0)DestroyRockets
Destroys missiles in your silo.
DestroyRockets(planet, abm, ipm)
// returns: 1: an errorShipsAttackStrength
The firepower of a whole fleet.
ShipsAttackStrength(ships, researches)
// returns: 1: an integerShipsAttackStrengthUsingOwnResearches
The same, with your own researches.
ShipsAttackStrengthUsingOwnResearches(ships)
// returns: 1: an integer
Print("firepower:", ShipsAttackStrengthUsingOwnResearches(ships))NewTemperature
Both bounds, as the game shows them.
NewTemperature(min, max)
// returns: 1: a temperature
temp = NewTemperature(-12, 40)SolarSatelliteProduction
The energy satellites produce.
SolarSatelliteProduction(temperature, count)
// returns: 1: an integer
Print("energy:", SolarSatelliteProduction(temp, 123))GetRequirements
The direct requirements of a build.
GetRequirements(id)
// returns: 1: a map
Print(GetRequirements(LIGHTLASER)) // shipyard 2, laser technology 3ConvertIntoCoordinate
Normalises anything naming a position.
ConvertIntoCoordinate(what)
// returns: 2: the coordinate and an errorGetPlayerCoordinates
The scanned planets and moons of a player.
GetPlayerCoordinates(player)
// returns: 1: a list of coordinatesGetHomeWorld
The home planet: the one set, otherwise the game's.
GetHomeWorld()
// returns: 1: a celestialConstants and values
Reacting to an event
OnAttackCha channel of attacksOnAttackGoneCha channel of attacksOnAttackDoneCha channel of attacksOnAttackCancelledCha channel of attacksOnStateChangeCha channel of statesOnChatMessageReceivedCha channel of messagesOnFleetCha channel of fleetsOnGalaxyScanDonean empty channelOnHunterTargetActiveCha channel of changesOnHunterTargetIdleCha channel of changesOnCaptchaCha channel of challengesDriving the other bots of the installation
BotIDan integerThe Timer watch, player by player
OnTimerTargetIdleCha channel of changesThe alerts
OnOrionAlertCha channelThe id arrays
ShipsArr16 idsDefencesArr10 idsTechnologiesArr16 idsBuildingsArr23 idsPlanetBuildingsArr20 idsMoonBuildingsArr9 idsOrionBuildingsArr8 idsLfBuildingsHumansArr12 ids eachLfBuildingsRocktalArr12 ids eachLfBuildingsMechasArr12 ids eachLfBuildingsKaeleshArr12 ids eachLfTechnologiesHumansArr18 ids eachLfTechnologiesRocktalArr18 ids eachLfTechnologiesMechasArr18 ids eachLfTechnologiesKaeleshArr18 ids eachLfTechnologiesArr72 idsThe id names
SMALLCARGOLARGECARGOLIGHTFIGHTERHEAVYFIGHTERCRUISERBATTLESHIPCOLONYSHIPRECYCLERESPIONAGEPROBEBOMBERDESTROYERDEATHSTARBATTLECRUISERCRAWLERREAPERPATHFINDERROCKETLAUNCHERLIGHTLASERHEAVYLASERGAUSSCANNONIONCANNONPLASMATURRETSMALLSHIELDDOMELARGESHIELDDOMEANTIBALLISTICMISSILESINTERPLANETARYMISSILESESPIONAGETECHNOLOGYCOMPUTERTECHNOLOGYWEAPONSTECHNOLOGYSHIELDINGTECHNOLOGYARMOURTECHNOLOGYENERGYTECHNOLOGYHYPERSPACETECHNOLOGYCOMBUSTIONDRIVEIMPULSEDRIVEHYPERSPACEDRIVELASERTECHNOLOGYIONTECHNOLOGYPLASMATECHNOLOGYINTERGALACTICRESEARCHNETWORKASTROPHYSICSGRAVITONTECHNOLOGYMETALMINECRYSTALMINEDEUTERIUMSYNTHESIZERSOLARPLANTFUSIONREACTORSOLARSATELLITEMETALSTORAGECRYSTALSTORAGEDEUTERIUMTANKSHIELDEDMETALDENUNDERGROUNDCRYSTALDENSEABEDDEUTERIUMDENALLIANCEDEPOTROBOTICSFACTORYSHIPYARDRESEARCHLABMISSILESILONANITEFACTORYTERRAFORMERSPACEDOCKLUNARBASESENSORPHALANXJUMPGATEINTERSTELLARANOMALYSCANNERINTERGALACTICRECOVERYCENTRELITHIUMELECTROLYSISLABMETALRECYCLINGUNITCRYSTALFINISHINGSTATIONANOMALYANALYSISCENTREHIGHPRESSUREDEUTERIUMTANKSCATALYTICCONVERTORRESIDENTIALSECTORBIOSPHEREFARMRESEARCHCENTREACADEMYOFSCIENCESNEUROCALIBRATIONCENTREHIGHENERGYSMELTINGFOODSILOFUSIONPOWEREDPRODUCTIONSKYSCRAPERBIOTECHLABMETROPOLISPLANETARYSHIELDINTERGALACTICENVOYSHIGHPERFORMANCEEXTRACTORSFUSIONDRIVESSTEALTHFIELDGENERATORORBITALDENRESEARCHAIHIGHPERFORMANCETERRAFORMERENHANCEDPRODUCTIONTECHNOLOGIESLIGHTFIGHTERMKIICRUISERMKIIIMPROVEDLABTECHNOLOGYPLASMATERRAFORMERLOWTEMPERATUREDRIVESBOMBERMKIIDESTROYERMKIIBATTLECRUISERMKIIROBOTASSISTANTSSUPERCOMPUTERMEDITATIONENCLAVECRYSTALFARMRUNETECHNOLOGIUMRUNEFORGEORIKTORIUMMAGMAFORGEDISRUPTIONCHAMBERMEGALITHCRYSTALREFINERYDEUTERIUMSYNTHESISERMINERALRESEARCHCENTREADVANCEDRECYCLINGPLANTVOLCANICBATTERIESACOUSTICSCANNINGHIGHENERGYPUMPSYSTEMSCARGOHOLDEXPANSIONCIVILIANSHIPSMAGMAPOWEREDPRODUCTIONGEOTHERMALPOWERPLANTSDEPTHSOUNDINGIONCRYSTALENHANCEMENTHEAVYFIGHTERIMPROVEDSTELLARATORHARDENEDDIAMONDDRILLHEADSSEISMICMININGTECHNOLOGYMAGMAPOWEREDPUMPSYSTEMSIONCRYSTALMODULESOPTIMISEDSILOCONSTRUCTIONMETHODDIAMONDENERGYTRANSMITTEROBSIDIANSHIELDREINFORCEMENTRUNESHIELDSROCKTALCOLLECTORENHANCEMENTASSEMBLYLINEFUSIONCELLFACTORYROBOTICSRESEARCHCENTREUPDATENETWORKQUANTUMCOMPUTERCENTREAUTOMATISEDASSEMBLYCENTREHIGHPERFORMANCETRANSFORMERMICROCHIPASSEMBLYLINEPRODUCTIONASSEMBLYHALLHIGHPERFORMANCESYNTHESISERCHIPMASSPRODUCTIONNANOREPAIRBOTSCATALYSERTECHNOLOGYPLASMADRIVEEFFICIENCYMODULEDEPOTAIGENERALOVERHAULLIGHTFIGHTERAUTOMATEDTRANSPORTLINESIMPROVEDDRONEAIEXPERIMENTALRECYCLINGTECHNOLOGYGENERALOVERHAULCRUISERSLINGSHOTAUTOPILOTHIGHTEMPERATURESUPERCONDUCTORSGENERALOVERHAULBATTLESHIPARTIFICIALSWARMINTELLIGENCEGENERALOVERHAULBATTLECRUISERGENERALOVERHAULBOMBERGENERALOVERHAULDESTROYEREXPERIMENTALWEAPONSTECHNOLOGYMECHANGENERALENHANCEMENTSANCTUARYANTIMATTERCONDENSERVORTEXCHAMBERHALLSOFREALISATIONFORUMOFTRANSCENDENCEANTIMATTERCONVECTORCLONINGLABORATORYCHRYSALISACCELERATORBIOMODIFIERPSIONICMODULATORSHIPMANUFACTURINGHALLSUPRAREFRACTORHEATRECOVERYSULPHIDEPROCESSPSIONICNETWORKTELEKINETICTRACTORBEAMENHANCEDSENSORTECHNOLOGYNEUROMODALCOMPRESSORNEUROINTERFACEINTERPLANETARYANALYSISNETWORKOVERCLOCKINGHEAVYFIGHTERTELEKINETICDRIVESIXTHSENSEPSYCHOHARMONISEREFFICIENTSWARMINTELLIGENCEOVERCLOCKINGLARGECARGOGRAVITATIONSENSORSOVERCLOCKINGBATTLESHIPPSIONICSHIELDMATRIXKAELESHDISCOVERERENHANCEMENTMissions
ATTACK1GROUPEDATTACK2TRANSPORT3PARK4PARKINTHATALLY5SPY6COLONIZE7RECYCLEDEBRISFIELD8DESTROY9MISSILEATTACK10ANOMALYENCOUNTER14EXPEDITION15SEARCHFORLIFEFORMS18Speeds
TEN_PERCENTTWENTY_PERCENTTHIRTY_PERCENTFORTY_PERCENTFIFTY_PERCENTSIXTY_PERCENTSEVENTY_PERCENTEIGHTY_PERCENTNINETY_PERCENTHUNDRED_PERCENTFIVE_PERCENTFIFTEEN_PERCENTTWENTY_FIVE_PERCENTTHIRTY_FIVE_PERCENTFORTY_FIVE_PERCENTFIFTY_FIVE_PERCENTSIXTY_FIVE_PERCENTSEVENTY_FIVE_PERCENTEIGHTY_FIVE_PERCENTNINETY_FIVE_PERCENTCelestial types, lifeforms, classes
PLANET_TYPE1DEBRIS_TYPE2MOON_TYPE3ANOMALY_TYPE4NONE_LF_TYPE0 to 4HUMANS0 to 4ROCKTAL0 to 4MECHAS0 to 4KAELESH0 to 4NO_CLASS0 to 3COLLECTOR0 to 3GENERAL0 to 3DISCOVERER0 to 3NO_ALLIANCE_CLASS0 to 3WARRIOR0 to 3TRADER0 to 3RESEARCHER0 to 3The dimensions of the universe
GALAXIESan integerSYSTEMSan integerThe file, the server, the version
FILEa string__FILE__a stringOGAME_SERVERa recordVERSIONa string__VERSION__a stringWaiting for the stop: OnQuitCh
OnQuitCha channelThe offering and the licence
IS_CLOUDa boolean__IS_CLOUD__a booleanIS_SELF_HOSTa boolean__IS_SELF_HOST__a booleanLICENSE_BOTS_ALLOWEDan integer__LICENSE_BOTS_ALLOWED__an integerLICENSE_UUIDthe empty string__LICENSE_UUID__the empty stringLICENSE_USERNAMEthe empty string__LICENSE_USERNAME__the empty stringLICENSE_EMAILthe empty string__LICENSE_EMAIL__the empty stringCookieDomainthe empty stringDISCORD_WEBHOOKthe Discord webhook from the Notifications pageTELEGRAM_CHAT_IDthe Telegram chat from the Notifications page