('Parent not found for: ', {BeamEffect:setSource:setTarget:setTexture:setBeamFireSound:setBeamFireSoundPower:setDuration:setRing}) ('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:

Note that most SpaceObjects directly switch to fully scanned, only SpaceShips go through all the states.

Objects

Functions

ScriptStorage

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.
ScriptStorage ScriptStorage:destroy()
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

BeamEffect

A BeamEffect is a beam weapon firing audio/visual effect that fades after its duration expires.
This is a cosmetic effect and does not deal damage on its own.
Example: beamfx = BeamEffect():setSource(player,0,0,0):setTarget(enemy,0,0,0)
BeamEffect:setSource [NOT FOUND; see SeriousProton]
Failed to find parameters for BeamEffect:setSource
Sets the BeamEffect's origin SpaceObject.
Requires a 3D x/y/z vector positional offset relative to the object's origin point.
Example: beamfx:setSource(0,0,0)
BeamEffect:setTarget [NOT FOUND; see SeriousProton]
Failed to find parameters for BeamEffect:setTarget
Sets the BeamEffect's target SpaceObject.
Requires a 3D x/y/z vector positional offset relative to the object's origin point.
Example: beamfx:setTarget(target,0,0,0)
BeamEffect:setTexture [NOT FOUND; see SeriousProton]
Failed to find parameters for BeamEffect:setTexture
Sets the BeamEffect's texture.
Valid values are filenames of PNG files relative to the resources/ directory.
Defaults to "texture/beam_orange.png".
Example: beamfx:setTexture("beam_blue.png")
BeamEffect:setBeamFireSound [NOT FOUND; see SeriousProton]
Failed to find parameters for BeamEffect:setBeamFireSound
Sets the BeamEffect's sound effect.
Valid values are filenames of WAV files relative to the resources/ directory.
Defaults to "sfx/laser_fire.wav".
Example: beamfx:setBeamFireSound("sfx/hvli_fire.wav")
BeamEffect:setBeamFireSoundPower [NOT FOUND; see SeriousProton]
Failed to find parameters for BeamEffect:setBeamFireSoundPower
Sets the magnitude of the BeamEffect's sound effect.
Defaults to 1.0.
Larger values are louder and can be heard from larger distances.
This value also affects the sound effect's pitch.
Example: beamfx:setBeamFireSoundPower(0.5)
BeamEffect:setDuration [NOT FOUND; see SeriousProton]
Failed to find parameters for BeamEffect:setDuration
Sets the BeamEffect's duration, in seconds.
Defaults to 1.0.
Example: beamfx:setDuration(1.5)
BeamEffect:setRing [NOT FOUND; see SeriousProton]
Failed to find parameters for BeamEffect:setRing
Defines whether the BeamEffect generates an impact ring on the target end.
Defaults to true.
Example: beamfx:setRing(false)

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")
Subclass of: MissileWeapon

HVLI

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")
Subclass of: MissileWeapon

HomingMissile

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")
Subclass of: MissileWeapon

Nuke

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")
Subclass of: MissileWeapon