| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

command_create

Page history last edited by Ryan McMullan 3 years, 7 months ago Saved with comment

 

The create mission scripting command creates objects in the game.  There are two variants, one that creates named objects, and one that creates unnamed objects.  Note that other commands that reference an object by name, such as set_relative_position for example, cannot be called in the same event (or start block) as the create command that creates the object. Instead, the script must put them in a separate event that executes once that object exists (e.g., using the if_exists condition).  The valid attributes of the command depend what is being created.

 

For creating named objects:

 

Attribute  Valid Values  Optional? Description 
name text  Optional for all but station  The name given to the object, should be unique and will be used to address this object by other commands. A station with unspecified name will crash the game.  Once created, names are compared case-insensitively so names should be unique regardless of case.  To have two objects appear to have the same name, they can have a different number of trailing spaces.
type 
station, player, enemy, neutral, anomaly, blackHole, monster, genericMesh, whale
Mandatory  The type of object we are creating. Depending on the type, additional attributes may be required. (see below) Note that "whale" is deprecated, but still functions identically to creating a "monster" of monsterType=1.
use_gm_position anything, only presence of this attribute is checked for

Optional (use instead of x, y, z)

If attribute is present (any value will suffice), the x and z attributes are defined by GM console position.
x 0 to 100000 (float)

Mandatory 

x-coordinate where object will be created, in distance left of the right edge of the map. Invalid value will crash the game. Unspecified value will crash the game.
y -100000 to 100000 (float) Mandatory  y-coordinate where object will be created. Invalid value will crash the game. Unspecified value will crash the game.

0 to 100000 (float) Mandatory  z-coordinate where object will be created, in distance down from the top edge of the map. Invalid value will crash the game. Unspecified value will crash the game.
angle
0-360  Optional   Initial orientation, in degrees, of created object. 0 is facing upwards, value increases clockwise.  Works with objects of type player, enemy, monster, and neutral, but NOT anomaly, black hole, generic mesh, or station.  (For all types, one can still use set_object_property to set angle after creation, but keep in mind the value is calculated differently.)  There was previously a report that this was not functioning with enemy and neutral ships in v2.4 but in v2.7.5 those work as expected.
hullID 0-?    DEPRECATED - use raceKeys and hullKeys  Corresponds to the unique hullID in vesselData.xml.
fleetnumber -1 to 99 (integer) only used for enemy and neutral This number is used to group ships together, so that they may move and react together. If you use a fleet number that's illegal, crashes and wierd graphical glitches will occur. -1 means no fleet.
raceKeys  text only used for player, enemy, neutral, and station

Corresponds to hullRace name and keys in vesselData.xml.  See below for more info.

If neither hullID nor valid combination of race/hull keys is specified, game will crash.

hullKeys  text only used for player, enemy, neutral, and station

Corresponds to vessel className and broadType in vesselData.xml.  See below for more info.

If neither hullID nor valid combination of race/hull keys is specified, game will crash.

sideValue

0-31

0: no side

1 (default): enemy

2: friendly and players

Optional Neutral ships on side 2 start double-scanned.  Neutral ships on other sides start single-scanned.

 

Some named object types have additional attributes as noted in subsections below.

 

Example:

<create type="station" x="52000" y="0" z="5000" raceKeys="USFP friendly" hullKeys="base" name="DS1"/>

Creates a space station named DS1 at position (052000, 000000, 005000) (roughly in the middle top of the play area) that is friendly to the player.

 

RaceKeys and HullKeys

Creating ships and assigning hulls to them is now more flexible.  The old way was to use the hulltype attribute to specify the exact ID of the hull (from the vesselData.xml file), for example:

   <create type ="enemy" hulltype="4001" x="50000" y="0" z="40000" angle="45"/>

That way is still supported, but no longer recommended.  Instead, when you create a ship using the 'create' command, use the raceKeys and hullKeys to pick the best hull indirectly.  For instance (using vesselData.xml 1.60 as a reference), if you want to create an enemy that's a Torgoth Battleship, you can use

   <create type ="enemy" raceKeys="Torgoth" hullKeys="Battleship" x="50000" y="0" z="40000" angle="45"/>

This will make an enemy Torgoth Battleship.  However, what if your script is being played by someone who's modified the vesselData.xml, or a later version of the game has changed vesselData.xml, or the player is playing a modded game?  Your script might not find the Torgoth race or its Battleship hull.  So let's broaden the keys to allow for alternatives:

   <create type ="enemy" raceKeys="Torgoth enemy support" hullKeys="Battleship medium" x="50000" y="0" z="40000" angle="45" name="TB1"/>

Now if the Torgoth race isn't found, a race with the "enemy support" key will be.  If a Battleship isn't found, the "medium" broadtype will be.  Now your script stands a much better chance of working, no matter what changes have happened to the vesselData.xml file.   Keys are compared using a case-insensitive comparison.

 

Scanned Level of ships

Level 0 means no info is visible, level 1 means the ship type is visible, and level 2 means the shield frequencies, specials, and captain text is visible.  Unfortunately, there is currently no way to directly set a ship's scanned level. You can conditionally check a ship's scan level with the if_scan_level command (example: <if_scan_level name="Debris" side="2" comparator="GREATER_EQUAL" value="1" />).

 

A ship's initial scanned level is as follows:

  • all ships on the player's side always have scanned level 2
  • neutral ships on any other side start with scanned level 1 
  • enemy ships on any other side start with scanned level 0   

 

Using set_side_value to change a ship from the player's side to another side only changes the scanned level if done immediately upon creation.  Otherwise, it will stay at scanned level 2.

 

Additional attributes when the named object is of type “player”:

 

Attribute

Valid Values

Optional?

Description

player_slot

 

0-7 (corresponds to the 8 player ships allowed in the game)

Optional for first ship, Mandatory for others. (use this with or instead of a "name" attribute)

Player ships can be referenced by player_slot even if not created with this attribute.

accent_color

0-99 

Optional

Overrides the player selected accent color

warp

yes or no

Optional

Sets Warp Drive if "yes", or Jump Drive if "no".  This attribute is ignored if the jump attribute is also present.

jump

yes or no

Optional

Sets Jump Drive if "yes", or Warp Drive if "no".

 

Examples:

<create type="player" name="Artemis" x="50000" y="0" z="50000" angle="90 /> (prevents override of ship's name)

<create type="player" player_slot="1" x="58542" y="0" z="51042" angle="0"  /> (creates a second player ship in slot #2)

 

If only one player ship is created, ships in the other player slots will be spawned when the crew logs in to the running server with that ship. The crew will not be allowed to log in to the extra ship until the server is running. At least one player ship should be created in the start block.

 

If more than one player ship is created in the script, player_slot must be specified for all but the first, or the ship will be created, but the players will be unable to log into it.  

 

Additional attributes when the named object is of type “genericMesh”:

 

Attribute  Valid Values  Optional? Description 
meshFileName  text    Path to a dxs DeleD mesh file.
If it begins with dat\ this is a path relative to the game exe dir. If it only contains a file name it is relative to the mission directory.
So, game will look for "dat\1.dxs" in Artemis\dat folder and for "1.dxs" in Artemis\dat\Missions\MISS_XXX folder
textureFileName  text    Path to a png texture file. 
If it begins with dat\ this is a path relative to the game exe dir. If it only contains a file name it is relative to the mission directory.
So, game will look for "dat\1.png" in Artemis\dat folder and for "1.png" in Artemis\dat\Missions\MISS_XXX folder
hullRace  text     
hullType  text     
fakeShieldsFront  -1-1000   

The front shield strength read by sensors for the object.

Defaults to -1, which means no fake shields, if only the fakeShieldsFront is positive, the generic looks like a station.

fakeShieldsRear  -1-1000    

The rear shield strength read by sensors for the object.

Defaults to -1, which means no fake shields, if only the fakeShieldsFront is positive, the generic looks like a station. 

hasFakeShldFreq  0 or 1     
colorRed 0.0-1.0   These three values represent the color used on the LRS screen and Science console to display the mesh and its name.
Default value is 1.0, 0.0, 1.0 (pink).
You can use 0.0, 0.0, 0.0 to hide the object from the map (technically, it's still there, drawn in black, but its very hard to see).
  
colorGreen 0.0-1.0  
colorBlue 0.0-1.0  

 

Examples:

<create type="genericMesh" meshFileName="dat/asteroid.dxs" textureFileName="dat/electricNoise2.png" colorBlue="1" x="99400" y="0" z="59000" name="Unknown Tachyon Source 1"/>

<create type="genericMesh" x="8542" y="64" z="81042" name="F024" meshFilename="dat\artemis.dxs" textureFilename="dat\artemis_diffuse.png" colorRed="0.0" colorGreen="0.0" colorBlue="0.5" />

 

Additional attributes when the named object is of type “anomaly”:

 

Attribute

Valid Values

Optional?

Description

pickupType

0-7

   0 = HiDens Power Cell

   1 = Vigoranium Nodule

   2 = Cetrocite Crystal

   3 = Lateral Array

   4 = Tauron Focuser

   5 = Infusion P-Coil

   6 = Carapaction Coil

   7 = Secret Code Case

   8 = Bio Beacon (in v2.7.0, see below)

   9 = Space Junk (in v2.7.0, see below)

Optional, defaults to 0 (the original "energy" anomaly)

See Upgrades for details.

 

The Bio Beacon and Space Junk only appear rarely in non-scripted modes.

beaconMonsterType 0-8 (v2.7.0 and later)

   0 = TYPHON (classic space monster)

   1 = WHALE

   2 = SHARK

   3 = DRAGON

   4 = PIRA (Piranha)

   5 = CHARYBDIS

   6 = NSECT

   7 = JELLY (in v2.7.0) or WRECK (prior to v2.7.0)

   8 = WRECK (in v2.7.0)

only used for Bio Beacon  
beaconEffect

0-1 (v2.7.0 and later)

   0 = ATTRACT

   1 = REPEL

only used for Bio Beacon  

 

Examples:

<create type="anomaly" x="31042" y="97" z="70417" name="M054" pickupType="0" />

<create type="blackHole" x="10000" y="30" z="20000" name="blackhole1" />

Additional attributes when the named object is of type “monster”:

 

Attribute

Valid Values

Optional?

Description

age

  1 = Young

  2 = Mature

  3 = Ancient 

Optional Added in v2.7.1

monsterType

0-8

   0 = TYPHON (classic space monster)

   1 = WHALE

   2 = SHARK

   3 = DRAGON

   4 = PIRA (Piranha)

   5 = CHARYBDIS

   6 = NSECT

   7 = JELLY (in v2.7.0) or WRECK (prior to v2.7.0)

   8 = WRECK (in v2.7.0)

Optional, defaults to 0 (TYPHON)

 

podnumber

0-9

Only used for whales and piranhas

If you use a pod number that's illegal, crashes and weird graphical glitches will occur.

 

Examples:

<create type="monster" x="6667" y="27" z="49167" name="ZZ" monsterType="0" />

<create type="monster" x="25000" y="-62" z="81250" angle="267" monsterType="1" name="Xeno" podnumber="1" />

<create type="whale" x="25000" y="-62" z="81250" angle="267" name="Xeno" podnumber="1" />

(The last two commands will create the exact same Space Whale.)

 

For creating UN-named objects:

 

Attribute  Valid Values  Optional? Description 
type  nebulas, asteroids, mines    type of unnamed objects to be created 
nebType

 

1 = Purple

2 = Blue

3 = Yellow

Only used for nebulas

If present, sets the nebula type.  Different types display as different colors. (Added in v2.6.3)

count  0 to 500 (integer)   number of unnamed objects to be created. You can use values over 500 just fine, despite game manual specifying 500 as the max value
radius  0 100000    the distance around the startX, startY, startZ point in which these objects are created.
If this is equal to 0, objects are created in a line defined by start and end coordinates.
If this is greater than 0, objects are created in a circle defined by start coordinate and this radius
randomRange  0 to 100000    random spread range, defines how far will unnamed objects spread from the line or the circle.
use_gm_position anything   If attribute is present (any value will suffice), the startx and startz attributes are defined by GM console position.
startX  0 to 100000 (float)   Invalid values will not crash the game
startY  -100000 to 100000 (float)    
startZ  0 to 100000 (float)   Invalid values will not crash the game
endX  0 to 100000  (float)   Invalid values will not crash the game
endY  -100000 to 100000  (float)    
endZ  0 to 100000  (float)   Invalid values will not crash the game
randomSeed  0 to big number  (int)
  The number used to generate the random distribution of objects. 
startAngle  integer   Used to spawn objects in an arc instead of a full circle.
If both are not specified, objects are spawned in a circle or a line. If one is specified, and other isn't, unspecified value is considered to be 0. 
Arc will always go from the lowest of the two angles to the highest clockwise, so if you want to have, for example, an arc from 330 to 30, you have to specify -30 and 30, otherwise you'll get an arc from 30 to 330.
You can have an arc longer than 2*pi*radius (like, if you have angles -180 and 360, you'll have twice as many objects in the left half circle than the right, because the arc goes 540 degrees, overlapping.
endAngle  integer  

 

Examples:

<!-- Asteroids In a Circle -->

<create count="20" type="asteroids" startX="13750" startY="98" startZ="58958" radius="1000" randomRange="47" randomSeed="38117" />

 

<!-- Asteroids In a Line -->

<create count="71" type="asteroids" startX="8542" startY="-38" startZ="27917" endX="93542" endY="-161" endZ="25208" randomRange="6" randomSeed="76155" />

 

<!-- Asteroids In an Arc -->

<create count="14" type="asteroids" startAngle="45" endAngle="135" startX="86458" startY="-91" startZ="72292" radius="15000" randomRange="19" randomSeed="53370" />

 

<!-- Mines In a Circle -->

<create count="37" type="mines" startX="86250" startY="-175" startZ="33958" radius="1500" randomRange="18" randomSeed="37303" />

 

<!-- Mines In a Line -->

<create count="53" type="mines" startX="70417" startY="-64" startZ="40833" endX="91250" endY="24" endZ="40208" randomRange="0" randomSeed="13561" />

 

<!-- Mines In an Arc -->

<create count="9" type="mines" startAngle="45" endAngle="135" startX="47292" startY="-40" startZ="36667" radius="1500" randomRange="50" randomSeed="23225" />

 

<!-- Nebulas In a Circle -->

<create count="11" type="nebulas" startX="44792" startY="-13" startZ="58125" radius="10000" randomRange="39" randomSeed="84728" />

 

<!-- Nebulas In a Line -->

<create count="8" type="nebulas" startX="67292" startY="-189" startZ="72708" endX="88333" endY="148" endZ="59167" randomRange="17" randomSeed="64113" />

 

<!-- Nebulas In an Arc -->

<create count="3" type="nebulas" startAngle="45" endAngle="135" startX="69375" startY="131" startZ="60833" radius="10000" randomRange="22" randomSeed="9333" />

 


Extended examples (version 2.1.1):

<!-- Enemy: Arvonian Carrier -->

<create type="enemy" x="85000" y="1" z="5000" angle="277" name="R030" raceKeys="Arvonian enemy" hullKeys="Carrier carrier" sideValue="1" fleetnumber="2" />

 

<!-- Enemy: Arvonian Fighter -->

<create type="enemy" x="75000" y="55" z="5000" angle="272" name="Y068" raceKeys="Arvonian enemy" hullKeys="Fighter fighter" sideValue="1" fleetnumber="3" />

 

<!-- Enemy: Arvonian Light Carrier -->

<create type="enemy" x="80000" y="-101" z="5000" angle="278" name="N053" raceKeys="Arvonian enemy" hullKeys="Light Carrier carrier" sideValue="1" fleetnumber="4" />  

 

<!-- Enemy: Biomech Stage 1 -->

<create type="enemy" x="16042" y="30" z="20000" angle="306" name="G020" raceKeys="BioMech biomech" hullKeys="Stage 1 small asteroideater" sideValue="1" />

 

<!-- Enemy: Biomech Stage 2 -->

<create type="enemy" x="11667" y="132" z="16875" angle="201" name="N041" raceKeys="BioMech biomech" hullKeys="Stage 2 medium asteroideater" sideValue="1" />  

 

<!-- Enemy: Biomech Stage 3 -->

<create type="enemy" x="6875" y="-97" z="12917" angle="11" name="Q048" raceKeys="BioMech biomech" hullKeys="Stage 3 large asteroideater" sideValue="1" />

 

<!-- Enemy: Biomech Stage 4 -->

<create type="enemy" x="10000" y="146" z="6042" angle="78" name="Y077" raceKeys="BioMech biomech" hullKeys="Type 4 large sentient asteroideater" sideValue="1" />

 

<!-- Enemy: Kralien Battleship -->

<create type="enemy" x="55625" y="89" z="18750" angle="51" name="J033" raceKeys="Kralien enemy" hullKeys="Battleship medium" sideValue="1" fleetnumber="5" />

 

<!-- Enemy: Kralien Cruiser -->

<create type="enemy" x="57500" y="92" z="7500" angle="235" name="Q031" raceKeys="Kralien enemy" hullKeys="Cruiser small" sideValue="1" fleetnumber="6" />  

 

<!-- Enemy: Kralien Dreadnought -->

<create type="enemy" x="58125" y="-175" z="12292" angle="125" name="B022" raceKeys="Kralien enemy" hullKeys="Dreadnought large" sideValue="1" fleetnumber="7" />  

 

<!-- Enemy: Skaraan Defiler -->

<create type="enemy" x="32292" y="167" z="10833" angle="35" name="W057" raceKeys="Skaraan enemy" hullKeys="Defiler small" sideValue="1" fleetnumber="8" />  

 

<!-- Enemy: Skaraan Enforcer -->

<create type="enemy" x="31667" y="-125" z="17083" angle="317" name="J036" raceKeys="Skaraan enemy" hullKeys="Enforcer medium" sideValue="1" fleetnumber="9" />  

 

<!-- Enemy: Skaraan Executor -->

<create type="enemy" x="33333" y="16" z="5417" angle="334" name="F056" raceKeys="Skaraan enemy elite" hullKeys="Executor large" sideValue="1" fleetnumber="10" /> <set_object_property name="F056" property="eliteAbilityBits" value="9"/> <set_object_property name="F056" property="eliteAIType" value="0"/>

 

<!-- Enemy: Torgoth Behemoth -->

<create type="enemy" x="83125" y="-125" z="10000" angle="39" name="J044" raceKeys="Torgoth enemy" hullKeys="Behemoth large" sideValue="1" fleetnumber="11" />

 

<!-- Enemy: Torgoth Goliath -->

<create type="enemy" x="90000" y="157" z="5000" angle="325" name="R059" raceKeys="Torgoth enemy" hullKeys="Goliath small" sideValue="1" fleetnumber="12" />  

 

<!-- Enemy: Torgoth Leviathan -->

<create type="enemy" x="95417" y="-164" z="8542" angle="289" name="Y088" raceKeys="Torgoth enemy" hullKeys="Leviathan medium" sideValue="1" fleetnumber="13" />

 

<!-- Enemy Base: Arvonian -->

<create type="station" x="45417" y="123" z="50000" angle="184" name="R021" raceKeys="Arvonian enemy" hullKeys="Base base carrier" sideValue="1" />

 

<!-- Enemy Base: Kralien -->

<create type="station" x="61458" y="99" z="48958" angle="20" name="T032" raceKeys="Kralien enemy" hullKeys="Base base" sideValue="1" />

 

<!-- Enemy Base: Skaraan -->

<create type="station" x="74583" y="-78" z="49375" angle="52" name="C067" raceKeys="Skaraan enemy" hullKeys="Base base" sideValue="1" />

 

<!-- Enemy Base: Torgoth -->

<create type="station" x="90417" y="168" z="49792" angle="280" name="Q040" raceKeys="Torgoth enemy" hullKeys="Base base" sideValue="1" />

 

<!-- TSN Base: Civilian -->

<create type="station" x="59583" y="-102" z="87500" angle="105" name="N023" raceKeys="TSN friendly" hullKeys="Civilian Base base" sideValue="2" />

 

<!-- TSN Base: Command -->

<create type="station" x="18125" y="-56" z="89375" angle="161" name="R035" raceKeys="TSN friendly" hullKeys="Command Base base" sideValue="2" />

 

<!-- TSN Base: Deep Space -->

<create type="station" x="32292" y="166" z="86250" angle="114" name="R057" raceKeys="TSN friendly" hullKeys="Deep Space Base base" sideValue="2" />

 

<!-- TSN Base: Industrial -->

<create type="station" x="46250" y="-17" z="86875" angle="70" name="P053" raceKeys="TSN friendly" hullKeys="Industrial Base base" sideValue="2" />

 

<!-- TSN Base: Science -->

<create type="station" x="77500" y="-91" z="87500" angle="89" name="R060" raceKeys="TSN friendly" hullKeys="Science Base base" sideValue="2" />

 

<!-- TSN Ship: Bulk Cargo -->

<create type="neutral" x="31458" y="-27" z="93125" angle="322" name="T053" raceKeys="TSN friendly" hullKeys="Bulk Cargo cargo" sideValue="2" />  

 

<!-- TSN Ship: Destroyer -->

<create type="neutral" x="93125" y="81" z="88125" angle="71" name="Q037" raceKeys="TSN friendly" hullKeys="Destroyer medium warship" sideValue="2" />  

 

<!-- TSN Ship: Escort -->

<create type="neutral" x="43750" y="-182" z="92917" angle="335" name="R049" raceKeys="TSN friendly" hullKeys="Escort small warship" sideValue="2" />

 

<!-- TSN Ship: Luxury Liner -->

<create type="neutral" x="74375" y="-111" z="93333" angle="295" name="J031" raceKeys="TSN friendly" hullKeys="Luxury Liner luxury" sideValue="2" />

 

<!-- TSN Ship: Science Vessel -->

<create type="neutral" x="57292" y="85" z="93333" angle="201" name="G050" raceKeys="TSN friendly" hullKeys="Science Vessel science" sideValue="2" />

 

<!-- TSN Ship: Transport -->

<create type="neutral" x="93542" y="134" z="94167" angle="57" name="Q027" raceKeys="TSN friendly" hullKeys="Transport transport" sideValue="2" />   

Damcon teams rejuvenated

Comments (0)

You don't have permission to comment on this page.