Hi,
Does anyone know if there is an API reference for scripting X4?
There are numerous methods shown in the Schema, such as "add_blueprints", or "destroy_group". I don't know where to find a reference though for various parameters and usage for these methods. Do you all get usage information from other examples only, or is there a reference somewhere?
Thanks much.
Api Reference?
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 246
- Joined: Mon, 5. Nov 18, 23:12
Re: Api Reference?
I wouldn't know but the x4 discord might https://discord.gg/J8u6KdcHairless-Ape wrote: ↑Thu, 6. Jun 19, 19:28Hi,
Does anyone know if there is an API reference for scripting X4?
There are numerous methods shown in the Schema, such as "add_blueprints", or "destroy_group". I don't know where to find a reference though for various parameters and usage for these methods. Do you all get usage information from other examples only, or is there a reference somewhere?
Thanks much.
-
- Posts: 122
- Joined: Sun, 16. Dec 18, 13:16
Re: Api Reference?
Look in libraries\common.xsd and libraries\scriptproperties.xml, they contain many of the reference elements.
If I remember correctly they are in 06.cat/dat or 07.cat/dat.
For instance, add_blueprints is in common.xsd and looks like this :
If I remember correctly they are in 06.cat/dat or 07.cat/dat.
For instance, add_blueprints is in common.xsd and looks like this :
Code: Select all
<xs:element name="add_blueprints">
<xs:annotation>
<xs:documentation>
Add blueprints to player's blueprint library
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="wares" type="expression" use="optional">
<xs:annotation>
<xs:documentation>
Ware or list of wares for which to add blueprints (can be combined with macros and object in a single call)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="macros" type="expression" use="optional">
<xs:annotation>
<xs:documentation>
Macro or list of macros for which to add blueprints (can be combined with wares and object in a single call)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="object" type="expression" use="optional">
<xs:annotation>
<xs:documentation>
Object (station or ship) for which to add blueprints (can be combined with wares and macros in a single call)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="method" type="expression" use="optional">
<xs:annotation>
<xs:documentation>
Production method for blueprint(s) (will be the same for all added blueprints, uses default method if not supplied)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="cycle" type="expression" use="optional">
<xs:annotation>
<xs:documentation>
Cycle efficiency for blueprint(s) (will be the same for all added blueprints, uses 1.0 if not supplied)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="resource" type="expression" use="optional">
<xs:annotation>
<xs:documentation>
Resource efficiency for blueprint(s) (will be the same for all added blueprints, uses 1.0 if not supplied)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="product" type="expression" use="optional">
<xs:annotation>
<xs:documentation>
Product efficiency for blueprint(s) (will be the same for all added blueprints, uses 1.0 if not supplied)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="modules" type="booleanexpression" use="optional">
<xs:annotation>
<xs:documentation>
Include blueprints for modules (used only with object attribute, default is true)
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="flags" type="loadoutflagbitmask" use="optional">
<xs:annotation>
<xs:documentation>
Include blueprints for equipment in specific loadout elements (used only with object attribute, default is all loadout elements)
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
- Hairless-Ape
- Posts: 322
- Joined: Wed, 6. Nov 02, 20:31
Re: Api Reference?
Thank you, that helps a lot.