User Tools

Site Tools


4rpl:commands:getunitsettings

This is an old revision of the document!


Index

:!: Available in version 1.3 and later.

GetUnitSettings

GetUnitSettings(<-unit) ->unitSettingsTable

Description

Returns a table containing the settings for the specified unit. For certain built-in units, like an emitter, the settings are described in the table below. For these units, the settings are case sensitive. For custom units, the values returned are all defined heap variables for all attached scripts. If there are multiple scripts, the heap variables are merged and duplicates will overwrite each other.

Built-in Unit Names and Settings

Emitter

  • “Start” (int): The start delay, in frames, for when the emitter begins emitting.
  • “Interval” (int): The emission interval, in frames.
  • “Payload” (int): How much to emit at each emission.

SporeLauncher

  • “Start” (int): The start delay, in frames.
  • “Interval” (int): The fire interval, in frames.
  • “Payload” (int): How much creeper is contained in each entity.
  • “Count” (int): How many entities to create.
  • “Target” (int): The target mode (0,1,2) for the created entities. 0 = Random, 1 = structures, 2 = location.
  • “TargetLocation” (V2): The target location for the entity. Only used when Target is set to 2.
  • “DisableMiniMapWarn”(bool): If the minimap should not be pinged prior to entity launch.
  • “EggStart” (int): The start delay, in frames, for emitting eggs.
  • “EggInterval” (int): The interval, in frames, for emitting eggs.
  • “EggCount” (int): The count of eggs to emit per interval.
  • “EggDefenseRatio” (float): The ratio of eggs that should be in defense mode.
  • “EggOnlyDuringCutoff” (bool): If eggs should only be emitted when the creeper is cutoff because of the map creeper limit.

BlobNest

  • “Start” (int): The start delay, in frames.
  • “Interval” (int): The fire interval, in frames.
  • “Payload” (int): How much creeper is contained in each entity.
  • “Count” (int): How many entities to create.
  • “Target” (int): The target mode (0,1,2) for the created entities. 0 = Random, 1 = structures, 2 = location.
  • “TargetLocation” (V2): The target location for the entity. Only used when Target is set to 2.
  • “LifeTime” (int): How long, in frames, the entity should live.
  • “DisableMiniMapWarn”(bool): If the minimap should not be pinged prior to entity launch.
  • “CarryEggProbability” (float): The probability (expressed as a float from 0 to 100) that the emitted blob will be able to carry eggs.

SkimmerFactory

  • “Start” (int): The start delay, in frames.
  • “Interval” (int): The fire interval, in frames.
  • “Payload” (int): How much creeper is contained in each entity.
  • “Count” (int): How many entities to create.
  • “Target” (int): The target mode (0,1,2) for the created entities. 0 = Random, 1 = structures, 2 = location.
  • “TargetLocation” (V2): The target location for the entity. Only used when Target is set to 2.
  • “LifeTime” (int): How long, in frames, the entity should live.
  • “DisableMiniMapWarn”(bool): If the minimap should not be pinged prior to entity launch.
  • “ForbStart” (int): The start delay, in frames, for emitting forbs.
  • “ForbInterval” (int): The interval, in frames, for emitting forbs.
  • “ForbPayload” (int): The amount of creeper each forb carries and puts in each orb that it throws.
  • “ForbCount” (int): The max active count of forbs for this skimmer factory.

AirSacCauldron

  • “Start” (int): The start delay, in frames.
  • “Interval” (int): The fire interval, in frames.
  • “Payload” (int): How much creeper is contained in each entity.
  • “Count” (int): How many entities to create.
  • “Target” (int): The target mode (0,1,2) for the created entities. 0 = Random, 1 = structures, 2 = location.
  • “TargetLocation” (V2): The target location for the entity. Only used when Target is set to 2.
  • “DisableMiniMapWarn”(bool): If the minimap should not be pinged prior to entity launch.

Spore

  • “Target” (int): The target mode (0,1,2) for the created entity. 0 = Random, 1 = structures, 2 = location. Note that for spores, this value only applies on unit creation.
  • “TargetLocation” (V2): The target location for the entity. Only used when Target is set to 2. Note that for spores, this value only applies on unit creation.
  • “Payload” (int): How much creeper is contained in this entity.

Blob

  • “Target” (int): The target mode (0,1,2) for the created entity. 0 = Random, 1 = structures, 2 = location.
  • “TargetLocation” (V2): The target location for the entity. Only used when Target is set to 2.
  • “Payload” (int): How much creeper is contained in this entity.
  • “LifeTime” (int): How long, in frames, the entity should live.
  • “CarryEgg” (bool): Whether this blob can carry eggs.

Skimmer

  • “Target” (int): The target mode (0,1,2) for the created entity. 0 = Random, 1 = structures, 2 = location.
  • “TargetLocation” (V2): The target location for the entity. Only used when Target is set to 2.
  • “Payload” (int): How much creeper is contained in this entity.
  • “LifeTime” (int): How long, in frames, the entity should live.

AirSac

  • “Target” (int): The target mode (0,1,2) for the created entity. 0 = Random, 1 = structures, 2 = location.
  • “TargetLocation” (V2): The target location for the entity. Only used when Target is set to 2.
  • “Payload” (int): How much creeper is contained in this entity.

DarkTower

  • “Width” (int): The width of the dark area.
  • “Depth” (int): The depth of the dark area.
  • “Square” (bool): If the dark area is a square, vs ellipse.

Stash

  • “Consume” (bool): If the stash should remove creeper from the map.
  • “Size” (float): The size (max creeper held) of the stash.
  • “CollectionRatio” (float): Multiplier to creeper consumed by the stash.
  • “OfflineTime” (int): How long, in frames, the stash is offline after emitting.
  • “UnsupportedTime” (int): How long, in frames, the stash will wait before releasing its content when it is not in creeper.

ResourceBlue

  • “Interval” (int):How long, in frames, between each resource production.

ResourceRed

  • “Interval” (int):How long, in frames, between each resource production.

GreenarMother

  • “Interval” (int):How long, in frames, between each resource production.

Pod

  • “Resource” (int):A number (0 - 6) that represents the contained resource. 0 = energy, 1 = AC, 2 = ARG, 3 = Liftic, 4 = Bluite, 5 = Redon, 6 = Greenar
  • “Size” (int): How much resource the Pod holds.
  • “CreeperDamages” (bool): Whether creeper damages this pod.
  • “Impervious” (bool): Whether blobs damage this pod.
  • “PlayerCanDestroy” (bool): Whether a player can destroy this pod.

InfoCache

  • “Message” (string): The ADA message to show.
  • “MessageType” (bool): If false, then show message in ADA Log. If True, then show as a game message.
  • “MessageButton0” (string): The string to show on message button 0.
  • “MessageButton1” (string): The string to show on message button 1.
  • “MessageChannel” (string): The channel name to send a message on when the message is closed (if type is GameMessage)
  • “Pause” (bool): Whether to pause the game when the infocache is collected.
  • “YPos” (float): Convenience settings that sets the Y position of the infocache.

Wall/Crazonium

:!: Available in version 1.4 and later.

  • “Strength” (int): The health of the wall/crazonium. Initial strength of a wall is 900000.

Examples

GetUnitSettings(self) ->unitSettings

Index

4rpl/commands/getunitsettings.1618009610.txt.gz · Last modified: 2021/04/09 19:06 by durikkan