User Tools

Site Tools


4rpl:commands:getunitsettings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:getunitsettings [2021/06/20 21:57] – [Built-in Unit Names and Settings] Never mind about the forbs, it was a fluke. Argonwolf4rpl:commands:getunitsettings [2024/01/27 10:59] (current) – Added link to Unit Types Karsten75
Line 12: Line 12:
  
 ===== Description ===== ===== 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.+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 variables for all attached scripts. If there are multiple scripts, the variables are merged and duplicates will overwrite each other
 + 
 +:!: Calling GetUnitSettings (Or SetUnitSettings) on a custom unit that does not have a script attached throws an exception and causes the script to terminate at that line. If the unit has a script, it works normally, even if it's completely blank. As such, it would be a safe practice to attach a null script to every decorative unit on a map
  
 =====Built-in Unit Names and Settings===== =====Built-in Unit Names and Settings=====
 +:!: Unit names are case sensitive. The full list of unit names are in [[Unit Types]]
 <tabbox Emitter> <tabbox Emitter>
  
-  * **"Start"** (int): The start delay, in frames, for when the emitter begins emitting. \\ +  ? <color orange> Start (int) </color>  
-  * **"Interval"** (int): The emission interval, in frames. \\ +  : The start delay, in frames, for when the emitter begins emitting. \\ 
-  * **"Payload"** (int): How much to emit at each emission. \\+  ? <color orange> Interval (int) </color>  
 +  : The emission interval, in frames.   
 +  ? <color orange> Payload (float</color>  
 +  : How much to emit at each emission.  
 <tabbox SporeLauncher> <tabbox SporeLauncher>
    
   * **"Start"** (int): The start delay, in frames. \\   * **"Start"** (int): The start delay, in frames. \\
   * **"Interval"** (int): The fire interval, in frames. \\   * **"Interval"** (int): The fire interval, in frames. \\
-  * **"Payload"** (int): How much creeper is contained in each entity. \\+  * **"Payload"** (float): How much creeper is contained in each entity. \\
   * **"Count"** (int): How many entities to create. \\   * **"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. \\   * **"Target"** (int): The target mode (0,1,2) for the created entities. 0 = Random, 1 = structures, 2 = location. \\
Line 32: Line 38:
   * **"EggInterval"** (int): The interval, in frames, for emitting eggs. \\   * **"EggInterval"** (int): The interval, in frames, for emitting eggs. \\
   * **"EggCount"** (int): The count of eggs to emit per interval. \\   * **"EggCount"** (int): The count of eggs to emit per interval. \\
-  * **"EggDefenseRatio"** (float): The ratio of eggs that should be in defense mode. \\+  * **"EggDefenseRatio"** (float): The ratio of eggs that will be sent to other Creeper controlled structures. \\
   * **"EggOnlyDuringCutoff"** (bool): If eggs should only be emitted when the creeper is cutoff because of the map creeper limit.   * **"EggOnlyDuringCutoff"** (bool): If eggs should only be emitted when the creeper is cutoff because of the map creeper limit.
-  *  
 <tabbox BlobNest> <tabbox BlobNest>
    
   * **"Start"** (int): The start delay, in frames. \\   * **"Start"** (int): The start delay, in frames. \\
   * **"Interval"** (int): The fire interval, in frames. \\   * **"Interval"** (int): The fire interval, in frames. \\
-  * **"Payload"** (int): How much creeper is contained in each entity. \\+  * **"Payload"** (float): How much creeper is contained in each entity. \\
   * **"Count"** (int): How many entities to create. \\   * **"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. \\   * **"Target"** (int): The target mode (0,1,2) for the created entities. 0 = Random, 1 = structures, 2 = location. \\
Line 51: Line 56:
   * **"Start"** (int): The start delay, in frames. \\   * **"Start"** (int): The start delay, in frames. \\
   * **"Interval"** (int): The fire interval, in frames. \\   * **"Interval"** (int): The fire interval, in frames. \\
-  * **"Payload"** (int): How much creeper is contained in each entity. \\+  * **"Payload"** (float): How much creeper is contained in each entity. \\
   * **"Count"** (int): How many entities to create. \\   * **"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. \\   * **"Target"** (int): The target mode (0,1,2) for the created entities. 0 = Random, 1 = structures, 2 = location. \\
Line 59: Line 64:
   * **"ForbStart"** (int): The start delay, in frames, for emitting forbs. \\   * **"ForbStart"** (int): The start delay, in frames, for emitting forbs. \\
   * **"ForbInterval"** (int): The interval, 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. \\+  * **"ForbPayload"** (float): 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. \\   * **"ForbCount"** (int): The max active count of forbs for this skimmer factory. \\
  
Line 67: Line 72:
   * **"Start"** (int): The start delay, in frames. \\   * **"Start"** (int): The start delay, in frames. \\
   * **"Interval"** (int): The fire interval, in frames. \\   * **"Interval"** (int): The fire interval, in frames. \\
-  * **"Payload"** (int): How much creeper is contained in each entity. \\+  * **"Payload"** (float): How much creeper is contained in each entity. \\
   * **"Count"** (int): How many entities to create. \\   * **"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. \\   * **"Target"** (int): The target mode (0,1,2) for the created entities. 0 = Random, 1 = structures, 2 = location. \\
Line 77: Line 82:
   * **"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. \\   * **"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. \\   * **"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. \\+  * **"Payload"** (float): How much creeper is contained in this entity. \\
  
 <tabbox Blob> <tabbox Blob>
Line 83: Line 88:
   * **"Target"** (int): The target mode (0,1,2) for the created entity. 0 = Random, 1 = structures, 2 = location. \\   * **"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. \\   * **"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. \\+  * **"Payload"** (float): How much creeper is contained in this entity. \\
   * **"LifeTime"** (int): How long, in frames, the entity should live. \\   * **"LifeTime"** (int): How long, in frames, the entity should live. \\
   * **"CarryEgg"** (bool): Whether this blob can carry eggs. \\   * **"CarryEgg"** (bool): Whether this blob can carry eggs. \\
Line 91: Line 96:
   * **"Target"** (int): The target mode (0,1,2) for the created entity. 0 = Random, 1 = structures, 2 = location. \\   * **"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. \\   * **"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. \\+  * **"Payload"** (float): How much creeper is contained in this entity. \\
   * **"LifeTime"** (int): How long, in frames, the entity should live. \\   * **"LifeTime"** (int): How long, in frames, the entity should live. \\
  
Line 98: Line 103:
   * **"Target"** (int): The target mode (0,1,2) for the created entity. 0 = Random, 1 = structures, 2 = location. \\   * **"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. \\   * **"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. \\+  * **"Payload"** (float): How much creeper is contained in this entity. \\
  
 <tabbox DarkTower> <tabbox DarkTower>
Line 149: Line 154:
 :!: Available in version 1.4 and later. :!: Available in version 1.4 and later.
   * **"Strength"** (int): The health of the wall/crazonium. Initial strength of a wall is 900000.   * **"Strength"** (int): The health of the wall/crazonium. Initial strength of a wall is 900000.
 +
 +<tabbox Totem>
 +  * **"WareType"** (int): A number (0 - 3) that represents the contained resource. 0 = energy, 1 = AC, 2 = ARG, 3 = Liftic
 +  * **"WareNum"** (int): The number of resources required to activate the totem.
 +
 </tabbox> </tabbox>
  
4rpl/commands/getunitsettings.1624240675.txt.gz · Last modified: 2021/06/20 21:57 by Argonwolf