User Tools

Site Tools


modding:xml:api_version

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
modding:xml:api_version [2013/09/02 04:33] gpmmodding:xml:api_version [2017/01/16 19:42] (current) – Added APIs 29-34 xephyr
Line 16: Line 16:
  
 The following API versions are implemented: The following API versions are implemented:
 +
 +====API Version 34====
 +
 +Transcendence 1.7 Beta 5
 +
 +[[http://ministry.kronosaur.com/record.hexm?id=66822|Full API spec on Ministry]]
 +
 +====API Version 33====
 +
 +Transcendence 1.7 Beta 4
 +
 +[[http://ministry.kronosaur.com/record.hexm?id=62046|Full API spec on Ministry]]
 +
 +====API Version 32====
 +
 +Transcendence 1.7 Beta 3
 +
 +[[http://ministry.kronosaur.com/record.hexm?id=61158|Full API spec on Ministry]]
 +
 +====API Version 31====
 +
 +Transcendence 1.7 Beta 1
 +
 +[[http://ministry.kronosaur.com/record.hexm?id=57824|Full API spec on Ministry]]
 +
 +====API Version 30====
 +
 +Transcendence 1.7 Alpha 2
 +
 +[[http://ministry.kronosaur.com/record.hexm?id=54396|Full API spec on Ministry]]
 +
 +====API Version 29====
 +
 +Transcendence 1.7 stream
 +
 +[[http://ministry.kronosaur.com/record.hexm?id=8048|Full API spec on Ministry]]
 +
 +====API Version 27====
 +====API Version 26====
 +====API Version 25====
 +====API Version 24====
 +====API Version 23====
 +====API Version 22====
 +====API Version 22====
 +Transcendence 1.3 and above.
  
 ====API Version 14==== ====API Version 14====
-**[IN PROGRESS]** 
 Transcendence 1.2 Beta 1 and above. Transcendence 1.2 Beta 1 and above.
  
-=== Functions ===+=== Dynamic Effects === 
 +Dynamic effects are visual effects whose parameters are modified at runtime. A dynamic effect uses the <GetParameters> event on an <EventType> to dynamically set the effect parameters. For example: 
 + 
 +  <EffectType UNID="..." 
 +        instance="creator" 
 +        > 
 +     <Effect> 
 +        <Ray 
 +           style="..." 
 +           ... 
 +           > 
 +            
 +           <Events> 
 +              <GetParameters> 
 +                 (block Nil 
 +                    ... 
 +               
 +                    { 
 +                       length: ... 
 +                       width: ... 
 +                       intensity: ... 
 +                       } 
 +                    ) 
 +              </GetParameters> 
 +           </Events> 
 +        </Ray> 
 +     </Effect> 
 +  </EffectType> 
 + 
 +In the above example, the parameters for the <Ray> effect are being set by the <GetParameters> function, which returns a struct. Each field in the struct represents a parameter in the <Ray> element to be set. 
 + 
 +The **instance** parameter on <EffectType> defines when <GetParameters> is called to set the effect parameters. The valid instances are: 
 + 
 +  * creator: The effect parameters are defined each time the effect is created (e.g., when the weapon is fired). 
 +  * game: The effect parameters are defined once at the beginning of the game and shared. For example, if multiple weapons use the same effect, all will use the same parameters. 
 +  * owner: The effect parameters are defined once per effect owner. For example, if multiple weapons use the same effect, the effect will be defined separately for each weapon. 
 + 
 +NOTE: As of API version 14, only the <Ray> effect supports dynamic effects. 
 + 
 +=== Enhancement Devices === 
 +In previous APIs the <EnhancerDevice> element was used to define a device that could enhance other devices (weapons, shields, etc.) In API version 14 there is a new element, called <EnhancementAbilities> that may be added to any device class (e.g., a <Shields> device). 
 + 
 +The <EnhancementAbilities> element may contain zero or more <Enhance> sub-elements, each of which defines an enhancement conferred on other devices. The <Enhance> sub-element has the following parameters: 
 + 
 +  * type: This is a user-defined string representing the type of enhancement. Only a single enhancement of each type will be applied. 
 +  * criteria: This is an item criteria specifying the set of devices that will be enhanced by this device. 
 +  * enhancement: This defines the enhancement applied to the set of devices that match the criteria. This is expressed as an enhancement code (see shpEnhanceItem) or as one of the following special codes: 
 +    * "+hpBonus:{n};" where {n} is the percent bonus. 
 +    * "+shield:{n};" where {n} is a level. This is equivalent to the shield:{n} damage modifier. 
 +    * "+speed:{n};" where {n} is the percent value of the new weapon delay time relative to the current one. E.g., 75 = 75% of the original delay time. 
 + 
 +=== New Functions ===
  
 +  * (cnvDrawLine): Draws a line on a <Canvas> element.
   * (objGetArmorRepairPrice obj armorItem hpToRepair): Returns the price that a station (obj) will charge the player to repair the given number of hp on the given armor item. Returns Nil if the station cannot repair. This function uses the new <RepairArmor> sub-element in <Trade>. NOTE: This function includes price adjustments from called <GetGlobalPlayerPriceAdj>.   * (objGetArmorRepairPrice obj armorItem hpToRepair): Returns the price that a station (obj) will charge the player to repair the given number of hp on the given armor item. Returns Nil if the station cannot repair. This function uses the new <RepairArmor> sub-element in <Trade>. NOTE: This function includes price adjustments from called <GetGlobalPlayerPriceAdj>.
   * (objGetArmorReplacePrice obj armorItem): Returns the price to replace one of the player ship's armor segments with the given item. NOTE: This function calls <GetGlobalPlayerPriceAdj>.   * (objGetArmorReplacePrice obj armorItem): Returns the price to replace one of the player ship's armor segments with the given item. NOTE: This function calls <GetGlobalPlayerPriceAdj>.
   * (objGetPlayerPriceAdj obj [data]): Returns the player price adjustment (see <GetGlobalPlayerPriceAdj>).   * (objGetPlayerPriceAdj obj [data]): Returns the player price adjustment (see <GetGlobalPlayerPriceAdj>).
 +  * (scrGetListCursor) and (scrSetListCursor).
 +  * (sysMatches [nodeID] criteria): Returns True if the given nodeID matches the given criteria.
   * (typeof exp): Returns the type.   * (typeof exp): Returns the type.
 +  * (typMatches unid criteria): Returns True if the given design type matches the given criteria.
 +
 +=== Updated Functions ===
 +
 +  * plyGetKeyEventStat has two new stats: 'missionSuccess and 'missionFailure, which return the number of missions succeeding and failing respectively.
 +  * scrSetData: Data set now persists across nested screens. E.g., if screen A calls nested screen B then all the data set by screen A remains when screen B closes.
 +  * sysGetNodes: No longer returns the special EndGame node (only returns valid nodes that the player can enter).
 +  * unvFindObj: Now returns the object name (and name flags) also.
  
 === Global Events === === Global Events ===
Line 35: Line 141:
     * gItem: The item involved in the service (if any).     * gItem: The item involved in the service (if any).
     * gData: Any custom data passed in to (objGetPlayerPriceAdj).     * gData: Any custom data passed in to (objGetPlayerPriceAdj).
 +
 +=== Missions ===
 +
 +  * maxAppearing parameter on <MissionType> limits the number of times the mission is assigned.
 +
 +=== Object Ascension ===
 +Object ascension is used to move objects (stations and ship) across systems. At any time while in a system, you may call (sysAscendObject obj) on any object (except the player ship). The object will disappear from the current system and remain in the "ascended region". While an object is ascended, it cannot be manipulated (the previous object pointer becomes invalid).
 +
 +At any time in any other system, you may call (sysDescendObject objID pos) on a previously ascended object (you must use an object ID, returned by objGetID, instead of the object pointer). The ascended object will descend to the current system and continue operating as normal.
 +
 +There is a new AI setting parameter: ascendOnGate="true". If set to true, an object will automatically ascend when it gates out. You may set this on a <AISettings> element on a <ShipClass> or dynamically set it with (shpSetAISetting obj 'ascendOnGate True).
  
 === Object Events === === Object Events ===
Line 40: Line 157:
   * <OnPlayerBlacklisted>: Fires to a station when it blacklists the player. For example, if station A blacklists the player, it will get the <OnPlayerBlacklisted> event (gSource is the station).   * <OnPlayerBlacklisted>: Fires to a station when it blacklists the player. For example, if station A blacklists the player, it will get the <OnPlayerBlacklisted> event (gSource is the station).
   * <OnObjBlacklistedPlayer>: Fires when any registered object blacklists the player. You must call objRegisterForEvents to receive this event.   * <OnObjBlacklistedPlayer>: Fires when any registered object blacklists the player. You must call objRegisterForEvents to receive this event.
-  * +
 === Object Properties === === Object Properties ===
  
Line 47: Line 164:
   * 'underAttack property: Same as (objIsUnderAttack).   * 'underAttack property: Same as (objIsUnderAttack).
   * You may use the "property:" criteria to select objects that have a specific property. For example, (sysFindObject nil "T +property:immutable;") finds all immutable stations in the system (e.g., stargates). Any boolean property for objGetProperty is accepted.   * You may use the "property:" criteria to select objects that have a specific property. For example, (sysFindObject nil "T +property:immutable;") finds all immutable stations in the system (e.g., stargates). Any boolean property for objGetProperty is accepted.
 +
 +=== Ship Classes ===
 +
 +  * Added thrustRatio= parameter to <ShipClass>
 +  * <Armor> element in <ShipClass> can use armorID and count (instead of separate elements for each segment).
 +
 +=== Ship Interior ===
 +For capital ships and freighters you may use an <Interior> element to specify internal hit points and structure. Normally, a ship is destroyed whenever damage penetrates through any single armor segment. If a ship has interior structure, any damage that gets past the armor will be inflicted on the interior.
 +
 +The interior of a ship consists of one or more //compartments// (defined by a <Compartment> sub-element). Each compartment starts with a number of hit points (defined by the hitPoints= parameter). A compartment may optionally define a size and position (using posX, posY, sizeX, sizeY in the same coordinate system as ship thruster effects). If a compartment does not specify a size and position, it is assumed to encompass the whole ship.
 +
 +When damage penetrates the ship's armor, we check to see which compartment it hit (by position). That compartment takes the damage. If the compartment at that position already has 0 hit points, or if no compartment could be found at that position, damage passes to any compartment with a null position (any compartment that encompasses the whole ship).
 +
 +When all compartments reach 0 hit points, the ship is destroyed.
 +
 +A compartment may specify a type to define its purpose. Depending on the type, additional effects may occur when the compartment is damaged. The following types are implemented in API version 14:
 +
 +  * cargo: A cargo compartment holds the ship's cargo. When this compartment is hit, there is a chance that some items in the cargo hold will be damaged or destroyed. The chance increases as the compartment loses hit points.
 +  * general: If the type is "general" or if no type is specified, the compartment has hit points but otherwise has no effect when damaged.
 +  * mainDrive: This compartment holds the ship's engines. When this compartment is hit, there is a chance that the main engines will be damaged. If they are damaged, the engines will drop to half-speed. The engines will be repaired after some amount of time (1-2 minutes of real time).
 +
 +If a ship has interior structure, devices are automatically subject to damage. If a device is hit and if the armor in that position has been reduced to 0, there is a chance that the device will be damaged permanently.
  
 === Ship Orders === === Ship Orders ===
Line 53: Line 192:
   * (shpOrder shipObj 'sendMessage targetObj string): This order sends the given message to the given targetObj. For example, you may use this to send a message to the player from the ship.   * (shpOrder shipObj 'sendMessage targetObj string): This order sends the given message to the given targetObj. For example, you may use this to send a message to the player from the ship.
   * (shpOrder shipObj 'waitForUndock targetObj): This order keeps the ship waiting until the given targetObj undocks from its station.   * (shpOrder shipObj 'waitForUndock targetObj): This order keeps the ship waiting until the given targetObj undocks from its station.
 +
 +=== Miscellaneous ===
 +
 +  * <Globals> are now reloaded at new game and load game (based on enabled extensions).
 +  * linkedFire="always" now works for AI ships.
 +  * Removed "planet" attribute from planets. Use special attribute isPlanet:true instead. (This is because being a planet depends on more than just its size. An object around a star is a true planet, but the same object around a gas giant is a moon.)
 +  * <Siblings> element now accept multiple child directives (like <Orbitals>).
 +  * Stations are now affected by custom damage.
  
 ====API Version 13==== ====API Version 13====
modding/xml/api_version.1378096427.txt.gz · Last modified: 2014/12/27 04:40 (external edit)