User Tools

Site Tools


modding:xml:spaceobject

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
modding:xml:spaceobject [2016/05/20 21:41] – [Criteria] rpcmodding:xml:spaceobject [2017/02/14 02:05] – Summary 0xabcdef
Line 1: Line 1:
 +=====Summary=====
 +  * <StationType> or <ShipClass>
 +    * <Events>
 +      * <CanDockAsPlayer>
 +        * gSource
 +        * aDockTarget
 +        * Return:
 +          * True
 +          * Nil
 +      * <CanInstallItem>
 +        * gSource
 +        * gItem
 +        * aArmorSeg
 +        * Return
 +          * True
 +          * Nil
 +      * <GetDockScreen>
 +        * gSource
 +        * Return
 +          * (list UNID Data Priority)
 +          * (list UNID Priority)
 +          * (list UNID)
 +      * <GetExplosionType>
 +        * gSource
 +        * Return
 +          * Nil
 +          * UNID
 +          * (UNID bonus cause)
 +      * <GetPlayerPriceAdj>
 +        * gSource
 +        * gItem
 +        * aObj
 +        * aService ((CTradingDesc.cpp, 43))
 +          * "(serviceNone)"
 +          * "priceOfferedToPlayer"
 +          * "priceForPlayerToBuy"
 +          * "valueOfDonation"
 +          * "priceToRefuel"
 +          * "priceToRepairArmor"
 +          * "priceToReplaceArmor"
 +          * "priceToInstallDevice"
 +          * "priceToRemoveDevice"
 +          * "priceToUpgradeDevice"
 +          * "priceToEnhanceItem"
 +          * "priceToRepairItem"
 +          * "customPrice"
 +          * "priceOfShipOffered"
 +          * "priceOfShipForSale"
 +          * "unknown"
 +        * aProviderObj
 +        * gData
 +        * Return
 +          * Nil
 +          * Integer
 +      * <OnAttacked>
 +        * gSource
 +        * aArmorSeg
 +        * aCause
 +        * aAttacker
 +        * aOrderGiver
 +        * aHitPos
 +        * aHitDir
 +        * aDamageHP
 +        * aDamageType
 +        * aWeaponType
 +      * <OnAttackedByPlayer>
 +        * gPlayerShip
 +      * <OnCreate>
 +        * gSource
 +        * gData
 +        * aBaseObj
 +        * aOwnerObj
 +        * aTargetobj
 +        * aOrbit
 +      * <OnCreateOrders>
 +        * gSource
 +        * aBaseObj
 +        * aTargetObj
 +      * <OnDamage>
 +        * gSource
 +        * aArmorSeg
 +        * aCause
 +        * aAttacker
 +        * aOrderGiver
 +        * aHitPos
 +        * aHitDir
 +        * aDamageHP
 +        * aDamageType
 +        * aWeaponType
 +        * Return
 +          * Integer: Amount of damage to take
 +      * <OnDataTransfer>
 +      * <OnDeselected>
 +        * gSource
 +        * aPlayer
 +      * <OnDestroy>
 +        * gSource
 +        * aDestroyer
 +        * aOrderGiver
 +        * aWreckObj
 +        * aDestroyReason
 +      * <OnDockObjAdj>
 +        * gSource
 +        * Return
 +          * Object
 +          * Nil
 +      * <OnEnteredGate>
 +        * gSource
 +        * aGateObj
 +        * aDestNodeID
 +        * aDestEntryPoint
 +      * <OnEnteredSystem>
 +        * gSource
 +        * aGateObj
 +      * <OnLoad>
 +        * gSource
 +        * aVersion
 +      * <OnMining>
 +        * gSource
 +        * aMiner
 +        * aMinePos
 +        * aMineDir
 +        * aMineProbability
 +        * aHP
 +        * aDamageType
 +        * aWeaponType
 +      * <OnObjBlacklistedPlayer>
 +        * gSource
 +        * aObj
 +      * vOnObjDestroyed>
 +        * gSource
 +        * aObjDestroyed
 +        * aDestroyer
 +        * aOrderGiver
 +        * aWreckObj
 +        * aDestroyReason
 +      * <OnObjDocked>
 +        * gSource
 +        * aObjDocked
 +        * aDockTarget
 +      * <OnObjEnteredGate>
 +        * gSource
 +        * aObj
 +        * aGateObj
 +        * aDestNodeID
 +        * aDestEntryPoint
 +      * <OnObjGate>
 +        * gSource
 +        * aObj
 +      * <OnObjJumped>
 +        * gSource
 +        * aObj
 +      * <OnObjJumpPosAdj>
 +        * gSource
 +        * aObj
 +        * aJumpPos
 +        * Return
 +          * Position Vector
 +          * Nil
 +      * <OnObjReconned>
 +        * gSource
 +        * aObj
 +      * <OnOrderChanged>
 +        * gSource
 +      * <OnOrdersCompleted>
 +        * gSource
 +      * <OnEventHandlerInit>
 +      * <OnMissionAccepted>
 +        * gSource
 +        * aMissionObj
 +      * <OnMissionCompleted>
 +        * gSource
 +        * aMissionObj
 +        * aReason
 +      * <OnPlayerBlacklisted>
 +        * gSource
 +      * <OnPlayerEnteredShip>
 +        * gSource
 +        * aOldShip
 +      * <OnPlayerEnteredSystem>
 +        * gSource
 +        * Return
 +          * "followPlayer"
 +          * "waitForPlayer"
 +          * Nil
 +      * <OnPlayerLeftShip>
 +        * gSource
 +        * aNewShip
 +      * <OnPlayerLeftSystem>
 +        * gSource
 +        * aGateObj
 +        * aDestNodeID
 +        * aDestEntryPoint
 +        * Return
 +          * "followPlayer"
 +          * "waitForPlayer"
 +          * Nil
 +      * <OnRandomEncounter>. Not defined. Inherited from [[DesignType]]
 +      * <OnSelected>
 +        * gSource
 +        * aPlayer
 +      * <OnSubordinateAttacked>
 +        * gSource
 +        * aObjAttacked
 +        * aArmorSeg
 +        * aCause
 +        * aAttacker
 +        * aOrderGiver
 +        * aHitPos
 +        * aHitDir
 +        * aDamageHP
 +        * aDamageType
 +        * aWeaponType
 +        * Return
 +          * True
 +          * Nil
 +      * <OnSystemExplosion>
 +        * gSource
 +        * aExplosionObj
 +        * aExplosionUNID
 +        * aExplosionPos
 +      * <OnSystemObjAttacked>
 +        * gSource
 +        * aObjAttacked
 +        * aArmorSeg
 +        * aCause
 +        * aAttacker
 +        * aOrderGiver
 +        * aHitPos
 +        * aHitDir
 +        * aDamageHP
 +        * aDamageType
 +        * aWeaponType
 +      * <OnSystemObjDestroyed>
 +        * gSource
 +        * aObjDestroyed
 +        * aDestroyer
 +        * aOrderGiver
 +        * aWreckObj
 +        * aDestroyReason
 +      * <OnSystemWeaponFire>
 +        * gSource
 +        * aFireRepeat
 +        * aShotObj
 +        * aWeaponObj
 +        * aWeaponUNID
 +        * aWeaponPos
 +        * aWeaponType
 +      * <OnTranslateMessage>
 +        * gSource
 +        * aMessage
 +        * Return
 +          * String
 +          * Nil
 +      * <OnUpdate>
 +        * gSource
 +
 +  * Note: A stargate with the attribute **"uncharted"** will cause **objGetNearestStargate** to ignore it.
 +//Inherits [[DesignType]] attributes and elements//
 +=====Fields=====
 +  * descID
 +  * canInstall
 +  * canRemove
 +  * objID
 +  * pos
 +  * price
 +  * status
 +  * upgradeInstallOnly
 +//Inherits [[DesignType]] fields//
 +=====Properties=====
 +  * ascended
 +  * category
 +    * "beam"
 +    * "effect"
 +    * "marker"
 +    * "missile"
 +    * "ship"
 +    * "station"
 +  * commsKey
 +  * currency
 +  * cyberDefenseLevel
 +  * damaged
 +  * dockingPorts
 +  * enabled
 +  * hasDockingPorts
 +  * hp
 +  * id
 +  * installArmorMaxLevel
 +  * installDeviceMaxLevel
 +  * installDevicePrice
 +  * installDeviceStatus
 +  * installItemStatus
 +  * known
 +  * level
 +  * mass
 +  * paintLayer
 +  * playerMissionsGiven
 +  * refuelMaxLevel
 +  * removeDevicePrice
 +  * removeDeviceMaxLevel
 +  * removeItemStatus
 +  * repairArmorMaxLevel
 +  * scale
 +    * "star"
 +    * "world"
 +    * "station"
 +    * "ship"
 +    * "flotsam"
 +  * underAttack
 +//Inherits [[DesignType]] properties
 +=====Overview=====
 +
 A SpaceObject is a meta-[[DesignType]]. You can't make something that is just a SpaceObject, but all [[ShipClass|ShipClasses]] and [[StationType|StationTypes]] are considered SpaceObjects for various funtions and other similarities. A SpaceObject is a meta-[[DesignType]]. You can't make something that is just a SpaceObject, but all [[ShipClass|ShipClasses]] and [[StationType|StationTypes]] are considered SpaceObjects for various funtions and other similarities.
  
Line 28: Line 340:
 J         only objects from a given sovereign J         only objects from a given sovereign
 K         only objects that cannot attack K         only objects that cannot attack
 +R         Return only the farthest object to the source
 R:nn;     Return only objects greater than nn light-seconds away R:nn;     Return only objects greater than nn light-seconds away
 V         Include Virtual objects V         Include Virtual objects
Line 38: Line 351:
 S:D       returns objects sorted by distance (in descending order) S:D       returns objects sorted by distance (in descending order)
 I:angle   returns only objects that intersect a line from the source at the given angle I:angle   returns only objects that intersect a line from the source at the given angle
-+xyz;     Include objects with the given attribute ++xyz;     Include objects with the attribute xyz 
--xyz;     Exclude objects with the given attribute +-xyz;     Exclude objects with the attribute xyz
-+unid:UNID                   Return ships of type UNID. +
 +isPlayerClass:true/false    Filter based on presence of PlayerSettings in object's type, ships only. +isPlayerClass:true/false    Filter based on presence of PlayerSettings in object's type, ships only.
-+data:attribute              Checks if (objGetData theObject 'attribute) is non-nil ++data:attribute              Return objects for which (objGetData theObject 'attribute) would return a non-Nil value 
--data:attribute              Checks if (objGetData theObject 'attribute) is nil+-data:attribute              Return objects for which (objGetData theObject 'attribute) would return a Nil 
 ++isPlanet:true               Return planets 
 +-isPlanet:true               Exclude planets 
 ++property:xyz                Return objects for which (objGetProperty theObject 'xyz) returns a non-Nil value 
 +-property:xyz                Return objects for which (objGetProperty theObject 'xyz) returns Nil 
 ++unid:UNID                   Return objects of type UNID.  
 +-unid:UNID                   Excludes objects of type UNID
 </code> </code>
 Note: Virtual stations are not searched by default through t; therefore you should use V as well if searching for a virtual station. Note: Virtual stations are not searched by default through t; therefore you should use V as well if searching for a virtual station.
modding/xml/spaceobject.txt · Last modified: 2017/03/08 04:10 by 0xabcdef