Info

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.org for the guide on scripting.As well as check the already existing scenario and ship data files on how to get started.

Objects

Functions

BlackHole

A blackhole has a 5km radius where it pulls in all near objects. At the center of the black hole everything gets a lot of damage. Which will lead to the eventual destruction of said object.
Subclass of: SpaceObject

SpaceShip

Subclass of: ShipTemplateBasedObject
SpaceShip:isFriendOrFoeIdentified()
SpaceShip:isFullyScanned()
SpaceShip:isFriendOrFoeIdentifiedBy(P<SpaceObject> other)
SpaceShip:isFullyScannedBy(P<SpaceObject> other)
SpaceShip:isFriendOrFoeIdentifiedByFaction(int faction_id)
SpaceShip:isFullyScannedByFaction(int faction_id)
SpaceShip:isDocked(P<SpaceObject> target)
SpaceShip:getTarget()
SpaceShip:getWeaponStorage(EMissileWeapons weapon)
SpaceShip:getWeaponStorageMax(EMissileWeapons weapon)
SpaceShip:setWeaponStorage(EMissileWeapons weapon, int amount)
SpaceShip:setWeaponStorageMax(EMissileWeapons weapon, int amount)
SpaceShip:getShieldsFrequency(void)
SpaceShip:setShieldsFrequency(float freq)
SpaceShip:getMaxEnergy()
SpaceShip:setMaxEnergy(float amount)
SpaceShip:getEnergy()
SpaceShip:setEnergy(float amount)
SpaceShip:getSystemHealth(ESystem system)
SpaceShip:setSystemHealth(ESystem system, float health)
SpaceShip:getSystemHeat(ESystem system)
SpaceShip:setSystemHeat(ESystem system, float heat)
SpaceShip:getSystemPower(ESystem system)
SpaceShip:setSystemPower(ESystem system, float power)
SpaceShip:getSystemCoolant(ESystem system)
SpaceShip:setSystemCoolant(ESystem system, float coolant)
SpaceShip:getImpulseMaxSpeed()
SpaceShip:setImpulseMaxSpeed(float speed)
SpaceShip:getRotationMaxSpeed()
SpaceShip:setRotationMaxSpeed(float speed)
SpaceShip:setCombatManeuver(float boost, float strafe)
SpaceShip:hasJumpDrive()
SpaceShip:setJumpDrive(bool has_jump)
SpaceShip:setJumpDriveRange(float min, float max)
SpaceShip:hasWarpDrive()
SpaceShip:setWarpDrive(bool has_warp)
SpaceShip:getBeamWeaponArc(int index)
SpaceShip:getBeamWeaponDirection(int index)
SpaceShip:getBeamWeaponRange(int index)
SpaceShip:getBeamWeaponTurretArc(int index)
SpaceShip:getBeamWeaponTurretDirection(int index)
SpaceShip:getBeamWeaponCycleTime(int index)
SpaceShip:getBeamWeaponDamage(int index)
SpaceShip:getBeamWeaponEnergyPerFire(int index)
SpaceShip:getBeamWeaponHeatPerFire(int index)
SpaceShip:setBeamWeapon(int index, float arc, float direction, float range, float cycle_time, float damage)
SpaceShip:setBeamWeaponTurret(int index, float arc, float direction, float rotation_rate)
SpaceShip:setBeamWeaponTexture(int index, string texture)
SpaceShip:setBeamWeaponEnergyPerFire(int index, float energy)
SpaceShip:setBeamWeaponHeatPerFire(int index, float heat)
SpaceShip:setWeaponTubeCount(int amount)
SpaceShip:getWeaponTubeCount()
SpaceShip:getWeaponTubeLoadType(int index)
SpaceShip:weaponTubeAllowMissle(int index, EMissileWeapons type)
SpaceShip:weaponTubeDisallowMissle(int index, EMissileWeapons type)
SpaceShip:setWeaponTubeExclusiveFor(int index, EMissileWeapons type)
SpaceShip:setWeaponTubeDirection(int index, float direction)
SpaceShip:setRadarTrace(string trace)
Set the icon to be used for this ship on the radar. For example, ship:setRadarTrace("RadarBlip.png") will show a dot instead of an arrow for this ship. Note: Icon is only shown after scanning, before the ship is scanned it is always shown as an arrow.
SpaceShip:addBroadcast(int threshold, string message)

WarpJammer

Subclass of: SpaceObject
WarpJammer:setRange(float range)

Nebula

Subclass of: SpaceObject

FactionInfo

FactionInfo:setName(string name)
FactionInfo:setGMColor(int r, int g, int b)
FactionInfo:setDescription(string description)
FactionInfo:setEnemy(P<FactionInfo> other)
FactionInfo:setFriendly(P<FactionInfo> other)
FactionInfo:isValid()
Check if this is still looking at a valid object. Returns false when the objects that this variable references is destroyed.
FactionInfo:typeName()
Returns the class name of this object.
FactionInfo:destroy()
Removes this object from the game.

ModelData

ModelData:setName(string name)
ModelData:setMesh(string mesh_name)
ModelData:setTexture(string texture_name)
ModelData:setSpecular(string specular_texture_name)
ModelData:setIllumination(string illumination_texture_name)
ModelData:setRenderOffset(sf::Vector3f mesh_offset)
ModelData:setScale(float scale)
ModelData:setRadius(float radius)
ModelData:setCollisionBox(sf::Vector2f collision_box)
ModelData:addBeamPosition(sf::Vector3f position)
ModelData:addTubePosition(sf::Vector3f position)
ModelData:addEngineEmitor(sf::Vector3f position, sf::Vector3f color, float scale)
ModelData:addEngineEmitter(sf::Vector3f position, sf::Vector3f color, float scale)
ModelData:isValid()
Check if this is still looking at a valid object. Returns false when the objects that this variable references is destroyed.
ModelData:typeName()
Returns the class name of this object.
ModelData:destroy()
Removes this object from the game.

PlayerSpaceship

Subclass of: SpaceShip
PlayerSpaceship:getWaypoint(int index)
PlayerSpaceship:getWaypointCount()
PlayerSpaceship:getAlertLevel()
PlayerSpaceship:setShieldsActive(bool active)
PlayerSpaceship:addToShipLog(string message, sf::Color color)
PlayerSpaceship:transferPlayersToShip(P<PlayerSpaceship> other_ship)
PlayerSpaceship:transferPlayersAtPositionToShip(ECrewPosition position, P<PlayerSpaceship> other_ship)
PlayerSpaceship:hasPlayerAtPosition(ECrewPosition position)
PlayerSpaceship:isCommsInactive()
PlayerSpaceship:isCommsOpening()
PlayerSpaceship:isCommsBeingHailed()
PlayerSpaceship:isCommsBeingHailedByGM()
PlayerSpaceship:isCommsFailed()
PlayerSpaceship:isCommsBroken()
PlayerSpaceship:isCommsClosed()
PlayerSpaceship:isCommsChatOpen()
PlayerSpaceship:isCommsChatOpenToGM()
PlayerSpaceship:isCommsChatOpenToPlayer()
PlayerSpaceship:isCommsScriptOpen()
PlayerSpaceship:setEnergyLevel(float amount)
PlayerSpaceship:setEnergyLevelMax(float amount)
PlayerSpaceship:getEnergyLevel()
PlayerSpaceship:getEnergyLevelMax()
PlayerSpaceship:setScanProbeCount(int amount)
PlayerSpaceship:getScanProbeCount()
PlayerSpaceship:setMaxScanProbeCount(int amount)
PlayerSpaceship:getMaxScanProbeCount()
PlayerSpaceship:addCustomButton(ECrewPosition position, string name, string caption, ScriptSimpleCallback callback)
PlayerSpaceship:addCustomInfo(ECrewPosition position, string name, string caption)
PlayerSpaceship:addCustomMessage(ECrewPosition position, string name, string caption)
PlayerSpaceship:addCustomMessageWithCallback(ECrewPosition position, string name, string caption, ScriptSimpleCallback callback)
PlayerSpaceship:removeCustom(string name)
PlayerSpaceship:commandTargetRotation(float target)
PlayerSpaceship:commandImpulse(float target)
PlayerSpaceship:commandWarp(int8_t target)
PlayerSpaceship:commandJump(float distance)
PlayerSpaceship:commandSetTarget(P<SpaceObject> target)
PlayerSpaceship:commandLoadTube(int8_t tubeNumber, EMissileWeapons missileType)
PlayerSpaceship:commandUnloadTube(int8_t tubeNumber)
PlayerSpaceship:commandFireTube(int8_t tubeNumber, float missile_target_angle)
PlayerSpaceship:commandSetShields(bool enabled)
PlayerSpaceship:commandMainScreenSetting(EMainScreenSetting mainScreen)
PlayerSpaceship:commandMainScreenOverlay(EMainScreenOverlay mainScreen)
PlayerSpaceship:commandScan(P<SpaceObject> object)
PlayerSpaceship:commandSetSystemPowerRequest(ESystem system, float power_level)
PlayerSpaceship:commandSetSystemCoolantRequest(ESystem system, float coolant_level)
PlayerSpaceship:commandDock(P<SpaceObject> station)
PlayerSpaceship:commandUndock()
PlayerSpaceship:commandAbortDock()
PlayerSpaceship:commandOpenTextComm(P<SpaceObject> obj)
PlayerSpaceship:commandCloseTextComm()
PlayerSpaceship:commandAnswerCommHail(bool awnser)
PlayerSpaceship:commandSendComm(uint8_t index)
PlayerSpaceship:commandSendCommPlayer(string message)
PlayerSpaceship:commandSetAutoRepair(bool enabled)
PlayerSpaceship:commandSetBeamFrequency(int32_t frequency)
PlayerSpaceship:commandSetBeamSystemTarget(ESystem system)
PlayerSpaceship:commandSetShieldFrequency(int32_t frequency)
PlayerSpaceship:commandAddWaypoint(sf::Vector2f position)
PlayerSpaceship:commandRemoveWaypoint(int32_t index)
PlayerSpaceship:commandMoveWaypoint(int32_t index, sf::Vector2f position)
PlayerSpaceship:commandActivateSelfDestruct()
PlayerSpaceship:commandCancelSelfDestruct()
PlayerSpaceship:commandConfirmDestructCode(int8_t index, uint32_t code)
PlayerSpaceship:commandCombatManeuverBoost(float amount)
PlayerSpaceship:commandSetScienceLink(int32_t id)
PlayerSpaceship:commandSetAlertLevel(EAlertLevel level)
PlayerSpaceship:getRepairCrewCount()
PlayerSpaceship:setRepairCrewCount(int amount)
PlayerSpaceship:setAutoCoolant(bool active)
PlayerSpaceship:setControlCode(string code)

Planet

A planet.
Subclass of: SpaceObject
Planet:setPlanetAtmosphereColor(float r, float g, float b)
Planet:setPlanetAtmosphereTexture(string texture_name)
Planet:setPlanetSurfaceTexture(string texture_name)
Planet:setPlanetCloudTexture(string texture_name)
Planet:setPlanetRadius(float size)
Planet:setPlanetCloudRadius(float size)
Planet:setDistanceFromMovementPlane(float distance_from_movement_plane)
Planet:setAxialRotationTime(float time)
Planet:setOrbit(P<SpaceObject> target, float orbit_time)

Mine

A mine object. Simple, effective, deadly.
Subclass of: SpaceObject

ShipTemplateBasedObject

Subclass of: SpaceObject
ShipTemplateBasedObject:setTemplate(string template_name)
Set the ship template to be used for this station. Stations use ship-templates to define hull/shields/looks
ShipTemplateBasedObject:setShipTemplate(string template_name)
[Depricated]
ShipTemplateBasedObject:setTypeName(string type_name)
Set the class name of this object. Normally the class name is copied from the template name (Ex "Cruiser") but you can override it with this function.
ShipTemplateBasedObject:getTypeName()
ShipTemplateBasedObject:getHull()
Get the current amount of hull
ShipTemplateBasedObject:getHullMax()
Get the maximum hull value
ShipTemplateBasedObject:setHull(float amount)
Set the current hull value, note that setting this to 0 does not destroy the station.
ShipTemplateBasedObject:setHullMax(float amount)
Set the maximum amount of hull for this station. Stations never repair hull damage, so this only effects the percentage displays
ShipTemplateBasedObject:setCanBeDestroyed(bool enabled)
Set if the object can be destroyed or not. true or false
ShipTemplateBasedObject:getCanBeDestroyed()
Get if the object can be destroyed or not. true or false
ShipTemplateBasedObject:getShieldLevel(int index)
Get the current shield level, stations only have a single shield, unlike ships that have a front&back shield
ShipTemplateBasedObject:getShieldCount()
Get the amount of shields fit on this object.
ShipTemplateBasedObject:getShieldMax(int index)
Get the maxium shield level.
ShipTemplateBasedObject:setShields(std::vector<float> amounts)
Set the current amount of shields.
ShipTemplateBasedObject:setShieldsMax(std::vector<float> amounts)
Set the maximum shield level. Note that this does low the current shield level when the max becomes lower, but it does not increase the shield level. A seperate call to setShield is needed for that.
ShipTemplateBasedObject:setRadarTrace(string trace)
Set the icon to be used for this station on the radar. For example, station:setRadarTrace("RadarArrow.png") will show an arrow instead of a dot for this station.
ShipTemplateBasedObject:getShieldsActive()
Are the shields online or not. Currently always returns true except for player ships, as only players can turn off shields.
ShipTemplateBasedObject:getSharesEnergyWithDocked()
ShipTemplateBasedObject:setSharesEnergyWithDocked(bool enabled)
ShipTemplateBasedObject:getRepairDocked()
ShipTemplateBasedObject:setRepairDocked(bool enabled)
ShipTemplateBasedObject:getFrontShield()
[Depricated]
ShipTemplateBasedObject:getFrontShieldMax()
[Depricated]
ShipTemplateBasedObject:setFrontShield(float amount)
[Depricated]
ShipTemplateBasedObject:setFrontShieldMax(float amount)
[Depricated]
ShipTemplateBasedObject:getRearShield()
[Depricated]
ShipTemplateBasedObject:getRearShieldMax()
[Depricated]
ShipTemplateBasedObject:setRearShield(float amount)
[Depricated]
ShipTemplateBasedObject:setRearShieldMax(float amount)
[Depricated]

SpaceStation

Subclass of: ShipTemplateBasedObject

Script

Object which can be used to create and run another script. Other scripts have their own lifetime, update and init functions. Scripts can destroy themselves, or be destroyed by the main script.
Script:run(string filename)
Run a script with a certain filename
Script:setVariable(string variable_name, string value)
Set a global variable in this script instance, this variable can be accessed in the main script.
Script:isValid()
Check if this is still looking at a valid object. Returns false when the objects that this variable references is destroyed.
Script:typeName()
Returns the class name of this object.
Script:destroy()
Removes this object from the game.

Artifact

An artifact. Can be used for mission scripting.
Subclass of: SpaceObject
Artifact:setModel(string name)
Set the 3D model used for this artifact. Example: setModel("artifact6"), setModel("shield_generator"), setModel("ammo_box"). Check model_data.lua for all possible options.
Artifact:explode()
Have this object explode with a visual explosion. The Artifact is destroyed by this action.
Artifact:allowPickup(bool allow)
Set if this artifact can be picked up or not. When it is picked up, this artifact will be destroyed.

WormHole

Subclass of: SpaceObject
WormHole:setTargetPosition(sf::Vector2f v)
Set the target of this wormhole

ScanProbe

Subclass of: SpaceObject

CpuShip

CpuShips are AI controlled ships. They can get different orders. Example: CpuShip():setTemplate("Fighter"):setPosition(random(-10000, 10000), random(0, 3000)):setFaction("Human Navy"):orderRoaming():setScanned(true)
Subclass of: SpaceShip
CpuShip:setAI(string new_ai)
Switch the AI to a different type. AI can be set per ship, or left per default which will be taken from the shipTemplate then.
CpuShip:orderIdle()
Order this ship to stand still and do nothing.
CpuShip:orderRoaming()
Order this ship to roam around the world and attack targets
CpuShip:orderStandGround()
Order this ship to stand still, but still target and try to hit nearby enemies
CpuShip:orderDefendLocation(sf::Vector2f position)
Order this ship to defend a specific location. It will attack enemies near this target.
CpuShip:orderDefendTarget(P<SpaceObject> object)
Order this ship to defend a specific object. It will attack enemies near this object.
CpuShip:orderFlyFormation(P<SpaceObject> object, sf::Vector2f offset)
Order this ship to fly in formation with another ship. It will attack nearby enemies.
CpuShip:orderFlyTowards(sf::Vector2f target)
Order this ship to fly to a location, attacking everything alogn the way.
CpuShip:orderFlyTowardsBlind(sf::Vector2f target)
Order this ship to fly to a location, without attacking anything
CpuShip:orderAttack(P<SpaceObject> object)
Order this ship to attack a specific target. If the target is destroyed it will fall back to roaming orders.
CpuShip:orderDock(P<SpaceObject> object)
Order this ship to dock at a specific object (station or otherwise)

Asteroid

An asteroid in space. Which you can fly into and hit. Will do damage.
Subclass of: SpaceObject
Asteroid:setSize(float size)
Set the size of this asteroid, per default asteroids have a size of 120

VisualAsteroid

An asteroid in space. Outside of hit range, just for visuals.
Subclass of: SpaceObject
VisualAsteroid:setSize(float size)
Set the size of this asteroid, per default asteroids have a size of 120

ScienceDatabase

ScienceDatabase:setName(string name)
ScienceDatabase:addEntry(string name)
ScienceDatabase:addKeyValue(string key, string value)
ScienceDatabase:setLongDescription(string text)
ScienceDatabase:isValid()
Check if this is still looking at a valid object. Returns false when the objects that this variable references is destroyed.
ScienceDatabase:typeName()
Returns the class name of this object.
ScienceDatabase:destroy()
Removes this object from the game.

SpaceObject

The SpaceObject is the base for every object which can be seen in space. General properties can read and set for each object. Each object has a position, rotation and collision shape.
SpaceObject:setPosition(sf::Vector2f v)
Set the position of this object in 2D space, in meters
SpaceObject:setRotation(float angle)
Sets the absolute rotation of this object. In degrees.
SpaceObject:getPosition()
Gets the position of this object, returns x, y Example: local x, y = obj:getPosition()
SpaceObject:getRotation()
Gets the rotation of this object. In degrees. 0 degrees is pointing to the right of the world. So this does not match the heading of a ship. The value returned here can also go below 0 degrees or higher then 360 degrees, there is no limiting on the rotation.
SpaceObject:getHeading()
Get the heading of this object, in the range of 0 to 360. The heading is 90 degrees off from the rotation.
SpaceObject:setHeading(float heading)
SpaceObject:getVelocity()
Gets the velocity of the object, in 2D space, in meters/second
SpaceObject:getAngularVelocity()
Gets the rotational velocity of the object, in degree/second
SpaceObject:setFaction(string faction_name)
Sets the faction to which this object belongs. Requires a string as input.
SpaceObject:getFaction()
Gets the faction name to which this object belongs.
SpaceObject:setFactionId(unsigned int faction_id)
Sets the faction to which this object belongs. Requires a index in the faction list.
SpaceObject:getFactionId()
Gets the index in the faction list from this object. Can be used in combination with setFactionId to make sure two objects have the same faction. Example: other:setFactionId(obj:getFactionId())
SpaceObject:setCommsScript(string script_name)
SpaceObject:setCommsFunction(ScriptSimpleCallback callback)
SpaceObject:isEnemy(P<SpaceObject> obj)
SpaceObject:isFriendly(P<SpaceObject> obj)
SpaceObject:setCallSign(string new_callsign)
Set a custom callsign for this object. Objects get assigned random callsigns at creation, but you can overrule this from scenario scripts.
SpaceObject:getCallSign()
SpaceObject:areEnemiesInRange(float range)
SpaceObject:getObjectsInRange(float range)
SpaceObject:setReputationPoints(float amount)
Sets the reputation to a value.
SpaceObject:getReputationPoints()
Return the current amount of reputation points.
SpaceObject:takeReputationPoints(float amount)
Take a certain amount of reputation points, returns true when there are enough points to take. Returns false when there are not enough points and does not lower the points.
SpaceObject:addReputationPoints(float amount)
Add a certain amount of reputation points.
SpaceObject:getSectorName()
Get the name of the sector this object is in (A4 for example)
SpaceObject:openCommsTo(P<PlayerSpaceship> target)
Hail a player ship from this object. The ship will get a notification and can accept or deny the hail. Warning/ToFix: If the player refuses the hail, no feedback is given to the script in any way. Return true when the hail is enabled with succes. Returns false when the target player cannot be hailed right now (because it's already communicating with something else)
SpaceObject:sendCommsMessage(P<PlayerSpaceship> target, string message)
Hail a player ship from this object. The ship will get a notification and can accept or deny the hail. Warning/ToFix: If the player refuses the hail, no feedback is given to the script in any way. Return true when the hail is enabled with succes. Returns false when the target player cannot be hailed right now (because it's already communicating with something else) This function will display the message given as parameter when the hail is answered.
SpaceObject:takeDamage(float damage_amount, DamageInfo info)
Let this object take damage, the DamageInfo parameter can be empty, or a string which indicates if it's energy, kinetic or emp damage.
SpaceObject:setDescription(string description)
Set the description of this object. The description is visible on the Science station.
SpaceObject:setDescriptionForScanState(EScannedState state, string description)
SpaceObject:getDescription(getScannedStateFor(obj)
SpaceObject:setDescriptions(string unscanned_description, string scanned_description)
Sets the description of this object in scanned and unscanned states. First parameter is the description in unscanned state, while the 2nd parameter is in scanned state.
SpaceObject:setRadarSignatureInfo(float grav, float elec, float bio)
Set the radar signature of this object. Objects' signatures create noise on the Science station's raw radar signal ring.
SpaceObject:getRadarSignatureGravity()
SpaceObject:getRadarSignatureElectrical()
SpaceObject:getRadarSignatureBiological()
SpaceObject:scanningComplexity(P<SpaceObject> target)
Get the scanning complexity of this object (amount of bars in the minigame)
SpaceObject:scanningChannelDepth(P<SpaceObject> target)
Get the scanning depth of this object (number of minigames to complete)
SpaceObject:setScanningParameters(int complexity, int depth)
Set the scanning complexity and depth for this object.
SpaceObject:isScanned()
[DEPRICATED] Check if this object is scanned already.
SpaceObject:isScannedBy(P<SpaceObject> obj)
Check if this object is scanned by the faction of another object
SpaceObject:isScannedByFaction(string faction)
Check if this object is scanned by another faction
SpaceObject:setScanned(bool scanned)
Set if this object is scanned or not by every faction.
SpaceObject:setScannedByFaction(string faction_name, bool scanned)
Set if this object is scanned or not by a particular faction.
SpaceObject:isValid()
Check if this is still looking at a valid object. Returns false when the objects that this variable references is destroyed.
SpaceObject:typeName()
Returns the class name of this object.
SpaceObject:destroy()
Removes this object from the game.

TutorialGame

The TutorialGame object is normally never created. And it only used to setup the special tutorial level. It contains functions to assist in explaining the game, but do not work outside of the tutorial.
TutorialGame:setPlayerShip(P<PlayerSpaceship> ship)
TutorialGame:switchViewToMainScreen()
TutorialGame:switchViewToTactical()
TutorialGame:switchViewToLongRange()
TutorialGame:switchViewToScreen(int n)
TutorialGame:showMessage(string message, bool show_next)
TutorialGame:setMessageToTopPosition()
TutorialGame:setMessageToBottomPosition()
TutorialGame:onNext(ScriptSimpleCallback callback)
TutorialGame:finish()
TutorialGame:isValid()
Check if this is still looking at a valid object. Returns false when the objects that this variable references is destroyed.
TutorialGame:typeName()
Returns the class name of this object.
TutorialGame:destroy()
Removes this object from the game.

ShipTemplate

ShipTemplates are created when EmptyEpsilon is started. And used to fill the ship starting statistics, and other information.
ShipTemplate:setName(string name)
ShipTemplate:setClass(string class_name, string sub_class_name)
Set the class name, and subclass name for the ship. Used to divide ships into different classes.
ShipTemplate:setDescription(string description)
Set the description shown for this ship in the science database.
ShipTemplate:setType(TemplateType type)
Sets the type of template. Defaults to normal ships, so then it does not need to be set. Example: template:setType("ship"), template:setType("playership"), template:setType("station")
ShipTemplate:setDefaultAI(string default_ai_name)
Set the default AI behaviour. EE has 3 types of AI coded into the game right now: "default", "fighter", "missilevolley"
ShipTemplate:setModel(string model_name)
Set the 3D model to be used for this template. The model referers to data set in the model_data.lua file.
ShipTemplate:setDockClasses(std::vector<string> classes)
Supply a list of ship classes that can be docked to this ship. setDockClasses("Starfighter") will allow all small starfighter type ships to dock with this ship.
ShipTemplate:setEnergyStorage(float energy_amount)
Set the amount of energy available for this ship. Note that only player ships use energy. So setting this for anything else is useless.
ShipTemplate:setRepairCrewCount(int amount)
ShipTemplate:setBeam(int index, float arc, float direction, float range, float cycle_time, float damage)
Setup a beam weapon.
ShipTemplate:setBeamWeapon(int index, float arc, float direction, float range, float cycle_time, float damage)
Setup a beam weapon.
ShipTemplate:setBeamWeaponTurret(int index, float arc, float direction, float rotation_rate)
Setup a beam's turret.
ShipTemplate:setBeamTexture(int index, string texture)
Setup a beam weapon texture
ShipTemplate:setBeamWeaponEnergyPerFire(int index, float energy)
ShipTemplate:setBeamWeaponHeatPerFire(int index, float heat)
ShipTemplate:setTubes(int amount, float load_time)
Set the amount of missile tubes, limited to a maximum of 16.
ShipTemplate:setTubeLoadTime(int index, float load_time)
ShipTemplate:weaponTubeAllowMissle(int index, EMissileWeapons type)
ShipTemplate:weaponTubeDisallowMissle(int index, EMissileWeapons type)
ShipTemplate:setWeaponTubeExclusiveFor(int index, EMissileWeapons type)
ShipTemplate:setTubeDirection(int index, float direction)
ShipTemplate:setHull(float amount)
Set the amount of starting hull
ShipTemplate:setShields(std::vector<float> values)
Set the shield levels, amount of parameters defines the amount of shields. (Up to a maximum of 8 shields) Example: setShieldData(400) setShieldData(100, 80) setShieldData(100, 50, 50)
ShipTemplate:setSpeed(float impulse, float turn, float acceleration)
Set the impulse speed, rotation speed and impulse acceleration for this ship.
ShipTemplate:setCombatManeuver(float boost, float strafe)
Sets the combat maneuver power of this ship.
ShipTemplate:setWarpSpeed(float warp)
Set the warp speed for warp level 1 for this ship. Setting this will indicate that this ship has a warpdrive. (normal value is 1000)
ShipTemplate:setSharesEnergyWithDocked(bool enabled)
Set if this ship shares energy with docked ships. Example: template:setSharesEnergyWithDocked(false)
ShipTemplate:setJumpDrive(bool enabled)
Set if this ship has a jump drive. Example: template:setJumpDrive(true)
ShipTemplate:setJumpDriveRange(float min, float max)
ShipTemplate:setCloaking(bool enabled)
ShipTemplate:setWeaponStorage(EMissileWeapons weapon, int amount)
ShipTemplate:addRoom(sf::Vector2i position, sf::Vector2i size)
ShipTemplate:addRoomSystem(sf::Vector2i position, sf::Vector2i size, ESystem system)
ShipTemplate:addDoor(sf::Vector2i position, bool horizontal)
ShipTemplate:setRadarTrace(string trace)
ShipTemplate:copy(string new_name)
Return a new template with the given name, which is an exact copy of this template. Used to make easy variations of templates.
ShipTemplate:isValid()
Check if this is still looking at a valid object. Returns false when the objects that this variable references is destroyed.
ShipTemplate:typeName()
Returns the class name of this object.
ShipTemplate:destroy()
Removes this object from the game.

SupplyDrop

Subclass of: SpaceObject
SupplyDrop:setEnergy(float amount)
SupplyDrop:setWeaponStorage(EMissileWeapons weapon, int amount)