('Parent not found for: ', {ElectricExplosionEffect:setSize:setOnRadar})
('Parent not found for: ', {ExplosionEffect:setSize:setOnRadar})
('Parent not found for: ', {MissileWeapon:getOwner:getTarget:setTarget:getLifetime:setLifetime:getMissileSize:setMissileSize})
EmptyEpsilon - Scripting documentation
EmptyEpsilon Scripting Reference
This is the EmptyEpsilon script reference for this version of EmptyEpsilon.
By no means this is a guide to help you scripting, you should check EmptyEpsilon website for the guide on scripting. As well as check the already existing scenario and ship data files on how to get started.
Some of the types in the parameters:
Color: A string that can either be a hex color code (#rrggbb), three comma-separated rgb integers (rrr,ggg,bbb), or one of the following: "black", "white", "red", "green", "blue", "yellow", "magenta", "cyan". Invalid values default to white.
ScriptSimpleCallback / function: Note that the callback function must reference something global, otherwise you get an error like "??[convert<ScriptSimpleCallback>::param] Upvalue 1 of function is not a table...". Use e.g. `math.abs(0) -- Provides global context for SeriousProton` to do nothing.
Note that most SpaceObjects directly switch to fully scanned, only SpaceShips go through all the states.
The ScriptStorage persistently saves key/value pairs to a file. These key/value pairs are permanently stored and survive server restarts. Its default file path is $HOME/.emptyepsilon/scriptstorage.json. See getScriptStorage().
ScriptStorage:get [NOT FOUND; see SeriousProton]
Failed to find parameters for ScriptStorage:get
Returns the value for the given key from the persistent ScriptStorage as a JSON string. Returns nothing if the key is not found. Example: storage = getScriptStorage() storage:set('key', 'value') storage:get('key') -- returns "value"
ScriptStorage:set [NOT FOUND; see SeriousProton]
Failed to find parameters for ScriptStorage:set
Sets a key/value pair in the persistent ScriptStorage file. If the scriptstorage.json file doesn't exist, this function creates it. If the given key already exists, this function overwrites its value. Example: storage = getScriptStorage() storage:set('key', 'value') -- writes {"key":"value"} to scriptstorage.json
boolean ScriptStorage:isValid()
Returns whether this object is still valid. Returns false if this object was destroyed or doesn't exist.
Removes this object from the game. Returns the object it was called on.
ScriptStorage:typeName
Returns the class name of this object. This is not a function, but a direct member. Example: if object.typeName == "Mine" then print("MINE!") end
ElectricExplosionEffect
An ElectricExplosionEffect is a visual electrical explosion used by EMP missiles. This is a cosmetic effect and does not deal damage on its own. See also the ExplosionEffect class for conventional explosion effects. Example: elec_explosion = ElectricExplosionEffect():setPosition(500,5000):setSize(20):setOnRadar(true)
ElectricExplosionEffect:setSize [NOT FOUND; see SeriousProton]
Failed to find parameters for ElectricExplosionEffect:setSize
Sets the ElectricExplosionEffect's radius. Defaults to 1.0. Example: elec_explosion:setSize(1000) -- sets the explosion radius to 1U
ElectricExplosionEffect:setOnRadar [NOT FOUND; see SeriousProton]
Failed to find parameters for ElectricExplosionEffect:setOnRadar
Defines whether to draw the ElectricExplosionEffect on short-range radar. Defaults to false. Example: elec_explosion:setOnRadar(true)
ExplosionEffect
An ExplosionEffect is a visual explosion used by nukes, homing missiles, ship destruction, and other similar events. This is a cosmetic effect and does not deal damage on its own. See also the ElectricExplosionEffect class for EMP missile effects. Example: explosion = ExplosionEffect():setPosition(500,5000):setSize(20):setOnRadar(true)
ExplosionEffect:setSize [NOT FOUND; see SeriousProton]
Failed to find parameters for ExplosionEffect:setSize
Sets the ExplosionEffect's radius. Defaults to 1.0. Example: explosion:setSize(1000) -- sets the explosion radius to 1U
ExplosionEffect:setOnRadar [NOT FOUND; see SeriousProton]
Failed to find parameters for ExplosionEffect:setOnRadar
Defines whether to draw the ExplosionEffect on short-range radar. Defaults to false. Example: explosion:setOnRadar(true)
MissileWeapon
A MissileWeapon is a self-propelled weapon that can be fired from a WeaponTube at either a target SpaceObject or on a trajectory. MissileWeapons that can explode detonate with a blast radius at either the end of its lifetime or upon collision with another collisionable SpaceObject. MissileWeapon-class objects can't be created directly. Use these functions with subclasses derived from MissileWeapon, such as HomingMissile, HVLI, etc. (While also launchable from WeaponTubes, Mines are not MissileWeapons. See the Mine class.)
MissileWeapon:getOwner [NOT FOUND; see SeriousProton]
Failed to find parameters for MissileWeapon:getOwner
Returns this MissileWeapon owner's SpaceObject. Example: missile:getOwner()
MissileWeapon:getTarget [NOT FOUND; see SeriousProton]
Failed to find parameters for MissileWeapon:getTarget
Returns this MissileWeapon's target. Example: missile:getTarget()
MissileWeapon:setTarget [NOT FOUND; see SeriousProton]
Failed to find parameters for MissileWeapon:setTarget
Sets this MissileWeapon's target. The target must already exist. If it does not, this has no effect. MissileWeapon:setTarget() does NOT check whether the target can be targeted by a player. Example: missile:setTarget(enemy)
MissileWeapon:getLifetime [NOT FOUND; see SeriousProton]
Failed to find parameters for MissileWeapon:getLifetime
Returns this MissileWeapon's lifetime, in seconds. Example: missile:getLifetime()
MissileWeapon:setLifetime [NOT FOUND; see SeriousProton]
Failed to find parameters for MissileWeapon:setLifetime
Sets this MissileWeapon's lifetime, in seconds. A missile that can explode does so at the end of its lifetime if it don't hit another collisionable SpaceObject first. Example: missile:setLifetime(5.0)
MissileWeapon:getMissileSize [NOT FOUND; see SeriousProton]
Failed to find parameters for MissileWeapon:getMissileSize
Returns this MissileWeapon's size as an EMissileSizes string. Example: missile:getMissileSize()
MissileWeapon:setMissileSize [NOT FOUND; see SeriousProton]
Failed to find parameters for MissileWeapon:setMissileSize
Sets this MissileWeapon's size. Size modifies a missile's maneuverability, speed, blast radius, lifetime, and damage. Smaller missiles are weaker, faster, and more nimble. Larger missiles are more powerful, slower, and have a longer lifetime. Example: missile:setMissileSize("large") -- sets this missile to be large
EMPMissile
An EMPMissile is an electromagnetic pulse MissileWeapon that pursues a target and, upon explosion, deals a base of 30-160 EMP damage to shields within its 1U base blast radius. It inherits functions and behaviors from its parent MissileWeapon class. Missiles can be fired by SpaceShips or created by scripts, and their damage and blast radius can be modified by missile size. AI behaviors attempt to avoid EMPMissiles. Example: emp_missile = EMPMissile:setPosition(1000,1000):setTarget(enemy):setLifetime(40):setMissileSize("large")
An HVLI is a high-velocity lead impactor, a fancy name for an unguided bullet MissileWeapon that deals kinetic damage upon impact. Damage is reduced if the HVLI has been alive for less than 2 seconds. It inherits functions and behaviors from its parent MissileWeapon class. Missiles can be fired by SpaceShips or created by scripts, and their damage and blast radius can be modified by missile size. Example: hvli = HVLI:setPosition(1000,1000):setRotation(90):setLifetime(40):setMissileSize("large")
A HomingMissile is a nimble MissileWeapon that pursues a target and, upon explosion, deals a base of 35 kinetic damage to its target. It inherits functions and behaviors from its parent MissileWeapon class. Missiles can be fired by SpaceShips or created by scripts, and their damage and blast radius can be modified by missile size. Example: homing_missile = HomingMissile:setPosition(1000,1000):setTarget(enemy):setLifetime(40):setMissileSize("large")
A HomingMissile is a MissileWeapon that pursues a target and, upon explosion, deals a base of 30-160 kinetic damage to all SpaceObjects within its 1U base blast radius. It inherits functions and behaviors from its parent MissileWeapon class. Missiles can be fired by SpaceShips or created by scripts, and their damage and blast radius can be modified by missile size. AI behaviors attempt to avoid EMPMissiles. Example: nuke_missile = Nuke:setPosition(1000,1000):setTarget(enemy):setLifetime(40):setMissileSize("large")