X2 - Script Befehlsliste - Stand: 1.4

Hier ist der ideale Ort um über Scripts und Mods für X²: Die Bedrohung zu diskutieren.

Moderators: Moderatoren für Deutsches X-Forum, Scripting / Modding Moderators

X2soUrcerer
Posts: 28
Joined: Mon, 16. Feb 04, 05:11
x2

X2 - Script Befehlsliste - Stand: 1.4

Post by X2soUrcerer » Thu, 26. Feb 04, 09:21


X2 - Script Befehlsliste (v1.4)


1 General Commands

1.001 <RetVar/IF><Expression>
1.002 inc <RetVar> =
1.003 dec <RetVar> =
1.004 @ <RetVar/IF> wait <Var/Number> ms
1.005 @ <RetVar/IF> wait randomly fo <Var/Number> to <Var/Number> ms
1.006 <Var> = random value from 0 to <Var/Number> -1
1.007 <Var> = random value from <Var/Number> to <Var/Number> -1
1.008 *<Comment>
1.009 <RetVar> = script engine version
1.010 <Var> = get script priority
1.011 set secript priority to <Var/Number>
1.012 <RetVar/IF> is script with prio <Var/Number> on stack
1.0121 <RefObj> interrupt with script <Script Name> and prio <Var/Number>: arg1=<Value> arg2=<Value> arg3=<Value> arg4=<Value>
1.013 <RetVar/IF> get task id
1.014 <RetVar/IF> get global task id
1.015 <RefObj> interrupt with script <Script Name> and prio <Var/Number>
1.016 <RefObj> connect ship command/signal <Object Command/Signal> to script <Script Name> with prio <Var/Number>
1.017 <RefObj> set ship command/signal <Object Command/Signal>
1.018 <RefObj> ignore ship command/signal <Object Command/Signal>
1.019 enable signal/interrupt handling: <Var/Number>
1.020 <RetVar/IF> is signal/interrupt handling on
1.021 global ship map: set: key=<Object Command/Signal>,class=<Var/Class>,race=<Var/Race>,script=<Script Name>,prio=<Var/Number>
1.022 global ship map: remove: key=<Object Command/Signal>,class=<Var/Class>,race=<Var/Race>
1.023 global ship map: ignore: key=<Object Command/Signal>,class=<Var/Class>,race=<Var/Race>
1.024 set ship command upgrade: command=<Object Command/Signal> upgrade=<Var/Ware>
1.025 <RetVar> = get ship command upgrade: command=<Object Command/Signal>
1.026 set script command: <Object Command/Signal>
1.027 <RetVar/IF> get script command
1.028 set script command target: <Value>
1.029 <RetVar/IF> get script command target
1.030 <RetVar> = datatyp[<Value>]
1.031 <RetVar/IF> is datatyp[<Value>] == <Var/Script Data Type>
1.032 <RetVar> = read text: page=<Var/Number> id=<Var/Number>
1.033 <RetVar> = sprintf: fmt=<Var/String>,<Value>,<Value>,<Value>,<Value>,<Value>
1.034 <RetVar> = sprintf: pageid=<Var/Number> textid=<Var/Number>,<Value>,<Value>,<Value>,<Value>,<Value>
1.035 load text: id=<Var/Number>
1.036 <RetVar> = state of news article: page=<Var/Number> id=<Var/Number>
1.037 set state of news article: page=<Var/Number> id=<Var/Number> to <Var/Number>
1.038 <RetVar/IF> system date is month=<Var/Number>,day=<Var/Number>
1.039 <RetVar> = playing time
1.040 infinite loop detection enabled=<Var/Number>
1.041 set ship command upgrade: command=<Object Command/Signal> upgrade=<Var/Ware> script=<Script Name>
1.042 <RefObj> set local variable: name=<Var/String> value=<Value>
1.043 <RetVar/IF> <RefObj> get local variable: name=<Var/String>
1.044 set global variable: name=<Var/String> value=<Value>
1.045 <RetVar/IF> get global variable: name=<Var/String>
1.046 al engine: register script = <script name>
1.047 al engine: unregister script <script name>
1.048 al engine: set plugin <value> description to <string>
1.049 al engine: set plugin <value> timer interval to <number> s
1.050 <RetVar/IF> = is plot <number> state flag <value>
1.051 <RetVar> = get script version
1.052 <RetVar> = get script name
1.053 <RefObj> -> interrupt task <number> with script <script name> and prio <number>: arg1=<value> arg2=<value> arg3=<value> arg4=<value>
1.054 <RefObj> -> start task <number> with script <script name> and prio <number>: arg1=<value> arg2=<value> arg3=<value> arg4=<value> arg5=<value>
1.055 <RetVar/IF> = <RefObj> -> get tradeable ware array from station
1.056 <RetVar/IF> = get Khaak aggression level
1.057 <RetVar/IF> = get random name: race=<race>
1.058 set Khaak aggression level to <number>
...description: switch level { case 0: Image break; case 100: Image; break;} default = 20;


1.1 General Commands->Flow Control

1.1.001 end conditional
1.1.002 else
1.1.003 continue
1.1.004 break
1.1.005 goto label <Label>
1.1.006 define label <Label>

1.2 General Commands->Script Calls

1.2.001 @ <RetVar/IF/START> <RefObj> call script <Script Name>:<Parameter>
1.2.002 return <Value>

1.3 General Commands->Arrays

1.3.001 <RetVar> = array alloc: size=<Var/Number>
1.3.002 <RetVar/IF> <Var/Array>[<Var/Number>]
1.3.003 <Var/Array>[<Var/Number>] = <Value>
1.3.004 <RetVar> = size of array <Var/Array>
1.3.005 <RetVar> = clone array <Var/Array>: index <Var/Number> ... <Var/Number>
1.3.006 copy array <Var/Array> index <Var/Number> ... <Var/Number> into array <Var/Array> at index <Var/Number>
1.3.007 insert <Value> into array <Var/Array> at index <Var/Number>
1.3.008 append <Value> to array <Var/Array>
1.3.009 remove element from array <Var/Array> at index <Var/Number>
1.3.010 resize array <Var/Array> to <Var/Number>


2 Audio Commands

2.001 play sample <Var/Number>
2.002 play sample: incoming transmission <Var/Number>, from object <Value>
2.003 <RefObj> send audio message <Var/Number> to player
2.004 send incoming message <Var/String> to player: display it=<Var/Number>
2.005 <RetVar/IF/START> -> speak text: page=<number> id=<number> priority=<number>


3 Logbook Commands

3.001 write to player logbook <Value>
3.002 write to player logbook: sprintf: fmt=<Var/String>,<Value>,<Value>,<Value>,<Value>,<Value>
3.003 write to player logbook: sprintf: pageid=<Var/Number> textid=<Var/Number>,<Value>,<Value>,<Value>,<Value>,<Value>
3.004 <RefObj> write to logbook <Value>
3.005 write to log file #<Var/Number> append=<Var/Number> value=<Value>
3.006 write to log file #<Var/Number> append=<Var/Number> printf: fmt=<Var/String>, <Value>, <Value>, <Value>, <Value>, <Value>
3.007 write to log file #<Var/Number> append=<Var/Number>[/color] printf: pageid=<Var/Number> textid=<Var/Number>, <Value>, <Value>, <Value>, <Value>, <Value>


4 Fly Commands

4.001 @ <RetVar/IF> <RefObj> fly to home base
4.002 @ <RetVar/IF> <RefObj> fly to station <Var/Station>
4.003 @ <RetVar/IF> <RefObj> fly to sector <Var/Sector>
4.004 <RetVar/IF> <RefObj> find nearest enemy ship: max.dist=<Var/Number>
4.005 <RetVar/IF> <RefObj> find nearest enemy station: max.dist=<Var/Number>
4.006 <RetVar/IF> <RefObj> fire lasers on target <Value> using turret <Var/Number>
4.007 @ <RetVar/IF> <RefObj> turn turret <Var/Number> to target <Var/Ship/Station>: timeout=<Var/Number> ms
4.008 @ <RetVar/IF> <RefObj> attack run on target <Value>: timeout=<Var/Number> ms
4.009 @ <RetVar/IF> <RefObj> defensive move: type=<Var/Number>,intensity=<Var/Number>,timeout=<Var/Number> ms,avoid object=<Value>
4.010 @ <RetVar/IF> <RefObj> move to ware object <Value> for collecting: timeout=<Var/Number> ms
4.011 <RetVar/IF> <RefObj> catch ware object <Value>
4.012 @ <RetVar/IF> <RefObj> move around <Var/Number> ms
4.013 @ <RetVar/IF> <RefObj> escort ship <Var/Ship>
4.014 @ <RetVar/IF> <RefObj> escort ship <Var/Ship>: timeout=<Var/Number> ms
4.015 <RefObj> set formation <Var/Number>
4.016 <RefObj> add to formation with leader <Var/Ship>
4.017 <RefObj> remove from any formation
4.018 <RetVar/IF> <RefObj> get formation leader
4.019 <RetVar> = <RefObj> get formation follower ships
4.010 START <RefObj> command <Object Command>: arg1=<Value>,arg2=<Value>,arg3=<Value>,arg4=<Value>
4.021 <RefObj> send signal <Object Signal>: arg1=<Value>,arg2=<Value>,arg3=<Value>,arg4=<Value>
4.022 @ <RetVar/IF> <RefObj> follow object <Var/Ship> with precision <Var/Number> m
4.023 @ <RetVar/IF> <RefObj> follow <Var/Ship> with precision <Var/Number> m: timeout=<Var/Number> ms
4.024 <RefObj> set follow mode <Var/Number>
4.025 <RetVar/IF> <RefObj> get follow mode
4.026 <RefObj> set destination to <Value>
4.027 <RetVar/IF> <RefObj> get destination
4.028 <RefObj> set attack target to <Value>
4.029 <RetVar/IF> <RefObj> get attack target
4.030 @ <RetVar/IF> <RefObj> move to position x=<Var/Number> y=<Var/Number> z=<Var/Number> with precision <Var/Number> m
4.031 <RefObj> set command: <Object Command>
4.032 <RetVar/IF> <RefObj> get command
4.033 <RefObj> set command target: <Value>
4.034 <RetVar/IF> <RefObj> get command target
4.035 <RefObj> set command target2: <Value>
4.036 <RetVar/IF> <RefObj> get command target2
4.037 <RetVar> = <RefObj> select new formation leader by: ship class=<Var/Number> strength)<Var/Number> min.speed=<Var/Number>
4.038 <RetVar/IF> <RefObj> has formation ships
4.039 <RefObj> give formation leadership to <Var/Ship>
4.040 <RefObj> set tactical to <Var/Number>
4.041 <RetVar> = <RefObj> get tactical
4.042 <RetVar/IF> get player tracking aim
4.043 <RetVar/IF> <RefObj> is <Var/Ship/Station> in firing range of turret <Var/Number>
4.044 <RetVar> = <RefObj> find enemy in firing range of turret <Var/Number>
4.045 <RefObj> set command: <Object Command> target=<Value> target2=<Value> par1=<Value> par2=<Value>
4.046 <RetVar/IF> <RefObj> fire missile <Var/Ware> on <Value>
4.047 <RetVar/IF> <RefObj> get current missile
4.048 <RetVar/IF> <RefObj> find best missile for target <Value>
4.049 <RetVar> = best missile type for target <Value>
4.050 <RetVar/IF> <RefObj> launch <Var/Number> fight drones: protect me or attack target=<Value>
4.051 <RetVar/IF> <RefObj> is missile <Var/Ware> ready to fire
4.052 <RetVar/IF> <RefObj> should a missile be fired
4.053 <RetVar> = <RefObj> get fire missile probability
4.054 <RetVar> = <RefObj>get fire missile time difference in seconds
4.055 <RefObj> set fire missile probability to <Var/Number>
4.056 <RefObj> set fire missile time difference to <Var/Number> s
4.057 <RetVar/IF> <RefObj> fits laser <Var/Ware> into turret <Var/Number>
4.058 <RetVar> = <RefObj> get max. number of lasers in turret <Var/Number>
4.059 <RetVar> = <RefObj> get laser type in turret <Var/Number> at slot <Var/Number>
4.060 <RetVar> = <RefObj> get number of turrets
4.061 <RetVar> = get range of missile type <Var/Ware>
4.062 <RetVar> = <RefObj> find nearest missile aiming to me
4.063 <RetVar/IF> <RefObj> decouple ships
4.064 <RetVar/IF> <RefObj> is decoupled ships leader
4.065 <RetVar/IF> <RefObj> get current galaxy flight timestep in ms
4.066 <RetVar/IF> <RefObj> is landing
4.067 <RetVar/IF> <RefObj> is starting
4.068 <RetVar/IF> <RefObj> use jump drive: target=<Value>
4.069 <RetVar/IF> <RefObj> needed jump drive energy for jump to sector <Var/Sector>
4.070 <RetVar/IF> <RefObj> check, select and fire missile on <Value>
4.071 <RetVar/IF> = <RefObj> -> add big ship <dock>
4.072 <RetVar/IF> = <RefObj> -> has a free big ship dock slot
4.073 <RetVar/IF> = <RefObj> -> can be controlled by race logic
4.074 <RefObj> -> set race logic control enabled to <boolean>
...description: if (enabled == false).....{ NPC ship of normal 5 races will not start doing it's own thing}
4.075 <RetVar/IF> = <RefObj> -> can execute StartAction
4.076 <RefObj> -> set StartAction enabled to <boolean>
4.077 set as player wingman: <ship>
4.078 <RetVar/IF> = <RefObj> -> is player wingman
Last edited by X2soUrcerer on Sat, 28. Feb 04, 08:03, edited 2 times in total.

X2soUrcerer
Posts: 28
Joined: Mon, 16. Feb 04, 05:11
x2

Post by X2soUrcerer » Thu, 26. Feb 04, 09:26

5 Trade Commands

5.001 <RetVar/IF> get player money
5.002 add money to player: <Var/Number>
5.003 <RetVar/IF> <RefObj> add <Var/Number> units of <Var/Ware>
5.004 <RetVar/IF> <RefObj> install <Var/Number> units of <Var/Ware>
5.005 <RetVar> = get volume of ware <Var/Ware>
5.006 <RetVar> = get transport class of ware <Var/Ware>
5.007 <RetVar/IF> find station: product <Var/Ware> with best price: max.price=<Var/Number>,amount=<Var/Number>,max.jumps=<Var/Number>,startsector=<Var/Sector>,trader=<Var/Ship/Station>
5.008 <RetVar/IF> find station: product <Var/Ware> with min. jumps: max.price=<Var/Number>,amount=<Var/Number>,max.jumps=<Var/Number>,startsector=<Var/Sector>,trader=<Var/Ship/Station>
5.009 <RetVar/IF> find station: resource <Var/Ware> with best price: min.price=<Var/Number>,amount=<Var/Number>,max.jumps=<Var/Number>,startsector=<Var/Sector>,trader=<Var/Ship/Station>
5.010 <RetVar/IF> find station: resource <Var/Ware> with min. jumps: min.price=<Var/Number>,amount=<Var/Number>,max.jumps=<Var/Number>,startsector=<Var/Sector>,trader=<Var/Ship/Station>
5.011 <RetVar/IF> find station sells: resource <Var/Ware> with best price: max.price=<Var/Number>,amount=<Var/Number>,max.jumps=<Var/Number>,startsector=<Var/Sector>,trader=<Var/Ship/Station>
5.012 <RetVar/IF> find station sells: resource <Var/Ware> with min. jumps: max.price=<Var/Number>,amount=<Var/Number>,max.jumps=<Var/Number>,startsector=<Var/Sector>,trader=<Var/Ship/Station>
5.013 <RetVar> = get average price of ware <Var/Ware>
5.014 <RetVar> = get max price of ware <Var/Ware>
5.015 <RetVar> = get min price of ware <Var/Ware>
5.016 <RetVar> = get max price of ware <Var/Ware> as secondary resourcer
5.017 <RetVar> = get min price of ware <Var/Ware> as secondary resourcer
5.018 <RetVar/IF> is ware <Var/Ware> illegal in <Var/Race> sectors
5.019 <RetVar> = get maintype of ware <Var/Ware>
5.020 <RetVar> = get subtype of ware <Var/Ware>
5.021 <RetVar> = get ware from maintype <Var/Number> and subtype <Var/Number>
5.022 <RetVar> = get number of subtypes of maintype <Var/Number>
5.023 <RetVar> = <RefObj> get maintype
5.024 <RetVar> = <RefObj> get subtype
5.025 <RetVar/IF> = <RefObj> -> find station: product <ware> with best price: max.price=<number>, amount=<number>, max.jumps=<number>, startsector=<sector>, trader=<refobj>
5.026 <RetVar/IF> = <RefObj> -> find station: product <ware> with min. jumps: max.price=<number>, amount=<number>, max.jumps=<number>, startsector=<sector>, trader=<refobj>
5.027 <RetVar/IF> = <RefObj> -> find station: resource <ware> with best price: min.price=<number>, amount=<number>, max.jumps=<number>, startsector=<sector>, trader=<refobj>
5.028 <RetVar/IF> = <RefObj> -> find station: resource <ware> with min. jumps: min.price=<number>, amount=<number>, max.jumps=<number>, startsector=<sector>, trader=<refobj>
5.029 <RetVar/IF> = <RefObj> -> find station sells: resource <ware> with best price: max.price=<number>, amount=<number>, max.jumps=<number>, startsector=<sector>, trader=<refobj>
5.030 <RetVar/IF> = <RefObj> -> find station sells: resource <ware> with min. jumps: max.price=<number>, amount=<number>, max.jumps=<number>, startsector=<sector>, trader=<refobj>


5.1 Trade Commands->for Ships

5.1.001 <RetVar/IF> <RefObj> buy <Var/Number> units of <Var/Ware>
5.1.002 <RetVar/IF> <RefObj> buy <Var/Number> units of <Var/Ware> to a max. price of <Var/Number> Cr
5.1.003 <RetVar/IF> <RefObj> sell <Var/Number> units of <Var/Ware>
5.1.004 <RetVar/IF> <RefObj> load <Var/Number> units of <Var/Ware>
5.1.005 <RetVar/IF> <RefObj> unload <Var/Number> units of <Var/Ware>
5.1.006 <RetVar> = <RefObj> get max. ware transport class
5.1.007 <RetVar/IF> <RefObj> get cargo bay size
5.1.008 <RetVar/IF> <RefObj> get free volume of cargo bay
5.1.009 <RetVar/IF> <RefObj> get volume of ware <Var/Ware> in cargo bay
5.1.010 <RetVar/IF> <RefObj> get true volume of ware <Var/Ware> in cargo bay
5.1.011 <RetVar/IF> <RefObj> get free volume of ware <Var/Ware> in cargo bay
5.1.012 <RetVar/IF> <RefObj> get total volume in cargo bay
5.1.013 <RetVar/IF> <RefObj> can transport ware <Var/Ware>
5.1.014 <RefObj> add default items to ship
5.1.015 <RefObj> switch laser in slot <Var/Number> to <Var/Ware>
5.1.016 <RefObj> set wanted ware count to <Var/Number>
5.1.017 <RefObj> set wanted ware to <Var/Ware>
5.1.018 <RetVar> = <RefObj> get wanted ware count
5.1.019 <RetVar> = <RefObj> get wanted ware
5.1.020 <RetVar/IF> <RefObj> has illegal ware onboard: race=<Var/Race>

5.2 Trade Commands->for Stations

5.2.001 <RetVar/IF> <RefObj> get best store amount of ware <Var/Ware>
5.2.002 <RetVar/IF> <RefObj> get max. store amount of ware <Var/Ware>
5.2.003 <RetVar/IF> <RefObj> can buy ware <Var/Ware>
5.2.004 <RetVar/IF> <RefObj> can sell ware <Var/Ware>
5.2.005 <RetVar/IF> <RefObj> get price of ware <Var/Ware>
5.2.006 <RetVar/IF> <RefObj> get average price of ware <Var/Ware>
5.2.007 <RefObj> set price of ware <Var/Ware> to <Var/Number> Cr
5.2.008 <RetVar/IF> <RefObj> uses ware <Var/Ware> as primary resource
5.2.009 <RetVar/IF> <RefObj> uses ware <Var/Ware> as secondary resource
5.2.010 <RetVar/IF> <RefObj> trades with ware <Var/Ware>
5.2.011 <RetVar/IF> <RefObj> get product ware
5.2.012 <RetVar/IF> <RefObj> get number of resources
5.2.013 <RetVar/IF> <RefObj> get number of primary resources
5.2.014 <RetVar/IF> <RefObj> get number of secondary resources
5.2.015 <RetVar/IF> <RefObj> get max trade jumps
5.2.016 <RetVar/IF> <RefObj> only player own ships can trade with

5.3 Trade Commands->for Ships and Stations

5.3.001 <RetVar/IF> <RefObj> get money
5.3.002 <RefObj> add money: <Var/Number>
5.3.003 <RetVar/IF> <RefObj> get amount of <Var/Ware> in cargo bay
5.3.004 <RetVar/IF> <RefObj> get true amount of <Var/Ware> in cargo bay
5.3.005 <RetVar/IF> <RefObj> get free amount of <Var/Ware> in cargo bay
5.3.006 <RetVar/IF> <RefObj> get max amount of <Var/Ware> that can be stored in cargo bay


6 General Object Commands

6.001 <RetVar/IF> <RefObj> get object class
6.002 <RetVar/IF> <RefObj> get owner race
6.003 <RetVar/IF> <RefObj> get environment
6.004 <RetVar/IF> <RefObj> get sector
6.005 <RetVar/IF> <RefObj> get homebase
6.006 <RetVar/IF> <RefObj> is of class <Var/Class>
6.007 <RetVar/IF> <RefObj> exists
6.008 <RetVar/IF> <RefObj> get ware type code of object
6.009 <RetVar/IF> <RefObj> get serial name of station
6.010 <RetVar/IF> find station in galaxis: startsector= <Var/Sector> class or type=<Value> race=<Var/race> flags=<Var/Number> refobj=<Value> serial=<Var/String> max.jumps=<Var/Number>
6.011 <RetVar/IF> <RefObj> is of type <Var/Ship Type/Station Type>
6.012 <RetVar/IF> get jumps from sector <Var/Sector> to sector <Var/Sector>
6.013 <RetVar/IF> get next sector on route from sector <Var/Sector> to sector <Var/Sector>
6.014 <RefObj> set homebase to <Var/Ship/Station>
6.015 <RetVar/IF> <RefObj> get current shield strength
6.016 <RetVar/IF> <RefObj> get maximum shield strength
6.017 <RetVar/IF> <RefObj> get current laser strength
6.018 <RetVar/IF> <RefObj> get maximum laser strength
6.019 <RetVar/IF> <RefObj> get maximum laser strength in turret <Var/Number>
6.020 <RetVar/IF> <RefObj> get max. shield type that can be installed
6.021 <RetVar/IF> <RefObj> get number of shild bays
6.022 <RetVar/IF> <RefObj> get number of laser bays
6.023 <RetVar/IF> <RefObj> get max. missile type that can be installed
6.024 <RetVar/IF> <RefObj> get relation to object <Var/Ship/Station>
6.025 <RetVar/IF> <RefObj> get relation to race <Var/Race>
6.026 <RetVar/IF> <RefObj> get notoriery to race <Var/Race>
6.027 <RetVar/IF> get notoriery from race <Var/Race> to race <Var/Race>
6.028 <RetVar/IF> <RefObj> is <Var/Ship/Station> a enemy
6.029 <RetVar/IF> <RefObj> is <Var/Ship/Station> a friend
6.030 <RetVar/IF> <RefObj> is <Var/Ship/Station> neutral to me
6.031 <RetVar/IF> <RefObj> get shield type in bay <Var/Number>
6.032 <RetVar/IF> <RefObj> get laser type in bay <Var/Number>
6.033 <RetVar/IF> <RefObj> has same environment as <Var/Ship/Station>
6.034 <RetVar/IF> <RefObj> is in same sector as <Var/Ship/Station>
6.035 <RetVar/IF> <RefObj> is landed
6.036 <RetVar/IF> <RefObj> is docked
6.037 <RetVar/IF> <RefObj> is docking possible of <Value>
6.038 <RetVar/IF> <RefObj> is docking allowed at <Var/Ship/Station>
6.039 <RetVar/IF> <RefObj> is in sector
6.040 <RetVar/IF> <RefObj> get attacker
6.041 <RefObj> set attacker to <Var/Ship/Station>
6.042 <RetVar> = get distance between <Var/Ship/Station> and <Var/Ship/Station>
6.043 <RetVar> = <RefObj> get distance to: x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.044 <RetVar> = <RefObj> get distance to: position array=<Var/Array>
6.045 <RetVar> = get distance: position array1=<Var/Array> array2=<Var/Array>
6.046 <RetVar> = create ship: type=<Var/Ship Type> owner=<Var/Race> addto=<Value> x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.047 <RetVar> = <RefObj> get x position
6.048 <RetVar> = <RefObj> get y position
6.049 <RetVar> = <RefObj> get z position
6.050 <RetVar> = <RefObj> get position as array
6.051 <RetVar> = get player ship
6.052 <RefObj> set relation against <Var/Ship/Station> to <Relation>
6.053 <RetVar> = create station: type=<Var/Station Type> owner=<Var/Race> addto=<Var/Sector> x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.054 <RetVar> = create gate: type=<Var/Number> addto=<Var/Sector> gateid=<Var/Number> dstsecx=<Var/Number dstsecy=<Var/Number> dstgateid=<Var/Number> x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.055 <RetVar> = create asteroid: addto=<Var/Sector> resource=<Var/Number> yield=<Var/Number> x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.056 <RefObj> add product to factory or dock: <Var/Ware>
6.057 <RefObj> add primary resource to factory: <Var/Ware>
6.058 <RefObj> add secondary resource to factory: <Var/Ware>
6.059 <RefObj> remove product from factory or dock: <Var/Ware>
6.060 <RefObj> remove primary resource from factory: <Var/Ware>
6.061 <RefObj> remove secondary resource from factory: <Var/Ware>
6.062 <RetVar> = create nebular: type=<Var/Number> addto=<Var/Sector> x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.063 <RetVar> = create sun: subtype=<Var/Number> r=<Var/Number> g=<Var/Number> b=<Var/Number> addto=<Var/Sector> x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.064 <RetVar> = create planet: subtype=<Var/Number> addto=<Var/Sector> x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.065 <RetVar> = create special: type=<Var/Number> addto=<Var/Sector> x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.066 <RetVar/IF> find ship: sector=<Var/Sector> class or type=<Value> race=<Var/Race> flags=<Var/Number> refobj=<Value> maxdist=<Var/Number> maxnum=<Var/Number> refpos=<Var/Array>
6.067 <RetVar/IF> find asteroid: sector=<Var/Sector> resourcetype=<Var/Number> min.yield=<Var/Number> flags=<Var/Number> refobj=<Value> maxdist=<Var/Number> maxnum=<Var/Number> refpos=<Var/Array>
6.068 <RetVar/IF> find flying ware: sector=<Var/Sector> maintype=<Var/Number> subtype=<Var/Number> flags=<Var/Number> refobj=<Value> maxdist=<Var/Number> maxnum=<Var/Number> refpos=<Var/Array>
6.069 <RetVar/IF> find station: sector=<Var/Sector> class or type=<Value> race=<Var/Race> flags=<Var/Number> refobj=<Value> maxdist=<Var/Number> maxnum=<Var/Number> refpos=<Var/Array>
6.070 <RetVar/IF> <RefObj> is disabled
6.071 <RefObj> station trade and production tasks: on=<Var/Number>
6.072 <RetVar/IF> <RefObj> get SectorObjectID
6.073 <RetVar> = get ware type of SectorObject <Var/Number>
6.074 <RetVar/IF> exists SectorObject <Var/Number>
6.075 <RetVar/IF> get object from SectorObject <Var/Number>
6.076 <RefObj> destruct: show no explosion=<Var/Number>
6.077 <RefObj> set position: x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.078 <RefObj> set rotation: alpha=<Var/Number> beta=<Var/Number> gamma=<Var/Number>
6.079 set position of sector object <Var/Number>: x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.080 set safe positon of sector object <Var/Number>: x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.081 set rotation of sector object <Var/Number>: x=<Var/Number> y=<Var/Number> z=<Var/Number>
6.082 <RetVar> = create sector object: maintype=<Var/Number> subtype=<Var/Number>
6.083 free sector object <Var/Number>
6.084 kill sector object <Var/Number>: reason=<Var/Number>, killer sector object=<Var/Number>
6.085 start sector object <Var/Number> in space <Var/Number>
6.086 <RetVar> = create flying ware: maintype=<Var/Number> subtype=<Var/Number> count=<Var/Number> sector=<Var/Sector> x=<Var/Number> y=<Var/Number> z=<Var/Number> selfdestruct=<Var/Number>
6.087 <RetVar> = <RefObj> get rot alpha
6.088 <RetVar> = <RefObj> get rot beta
6.089 <RetVar> = <RefObj> get rot gamma
6.090 <RetVar> = <RefObj> get size of object
6.091 <RetVar/IF> <RefObj> get max upgrades for upgrade <Var/Ware>
6.092 <RetVar/IF> <RefObj> get max speed
6.093 <RetVar/IF> <RefObj> get max hull
6.094 <RetVar/IF> <RefObj> get hull
6.095 <RetVar/IF> <RefObj> get hull percent
6.096 <RetVar/IF> <RefObj> get shield percent
6.097 <RetVar/IF> <RefObj> get shield and hull percent
6.098 <RetVar/IF> <RefObj> get max upgraded speed
6.099 <RetVar/IF> <RefObj> get dock bay size
6.100 <RetVar/IF> <RefObj> get number of landed ships
6.101 player loses police licence for race <Var/Race>
6.102 <Var/Race> add notoriety: race=<Var/Race> value=<Var/Number>
6.103 <RefObj> set ship disabled to <Var/Number>
6.104 <RefObj> -> put into environment <sector/station/bigship>
6.105 <RefObj> -> station send defend squad against ship <ship>
6.106 <RetVar/IF> = <RefObj> -> get name
6.107 <RefObj> -> set name to <string>
6.108 <RefObj> -> set owner race to <race>
6.109 <RetVar/IF> = <RefObj> -> find ship: class or type=<class/type> race=<race> flags=<flags> refobj=<refobj> maxnum=<number> with homebase=<station>
...description: Environment = RefObj; find ship in Environment.... ;

6.110 <RetVar/IF> = find station in galaxy: startsector=<sector> class or type=<class/type> race=<race> flags=<flags> refobj=<refobj> serial=<id> max.jumps=<number> num=<number>
6.111 <RetVar/IF> = <RefObj> -> get ID code
6.112 <RetVar/IF> = <RefObj> -> get pilot name
6.113 <RefObj> -> set pilot name to <string>
6.114 <RefObj> -> set pilot speaker: voice=<number>, face=<number>, Pirate subrace=<number>, Argon female=<number>
6.115 <RefObj> -> set serial name of station to <Var/Station Serial>


7 Universe and Sector Commands

7.001 <RetVar/IF> get sector from universe index: x=<Var/Number>, y=<Var/Number>
7.002 <RetVar> = get max sectors in x direction
7.003 <RetVar> = get max sectors in y direction
7.004 <RetVar/IF> <RefObj> is sector known by the player
7.005 <RetVar> = <RefObj> get universe x index
7.006 <RetVar> = <RefObj> get universe y index
7.0061 <RetVar> = <RefObj> get warp gate: gate id=<Var/Number>
7.007 <RetVar> = <RefObj> get north warp gate
7.008 <RetVar> = <RefObj> get south warp gate
7.009 <RetVar> = <RefObj> get east warp gate
7.010 <RetVar> = <RefObj> get west warp gate
7.011 <RetVar> = find a random sector: startsector=<Var/Sector>, jumps=<Var/Number>, owner=<Var/Race>
7.012 <RetVar/IF> = <RefObj> -> get ship array from sector/ship/station
7.013 <RetVar/IF> = <RefObj> -> get station array from sector
7.014 <RetVar/IF> = <RefObj> -> get factory array from sector
7.015 <RetVar/IF> = <RefObj> -> get dock array from sector
7.016 <RetVar/IF> = <RefObj> -> get player owned ship array from sector
7.017 <RetVar/IF> = <RefObj> -> get player owned station array from sector
7.018 <RetVar/IF> = <RefObj> -> get asteroid array from sector



Legende:

Tags in dieser Farbe stellen den Rückgabewert einer Funktion dar

Tags in dieser Farbe stellen das Referenzobjekt dar, welches die Funtion ausführt

Tags in dieser Farbe stellen die Parameter der Funktionen dar

Ein @ vor einer Funktion bedeutet, dass sie abgebrochen werden kann
Last edited by X2soUrcerer on Sat, 28. Feb 04, 08:02, edited 3 times in total.

X2soUrcerer
Posts: 28
Joined: Mon, 16. Feb 04, 05:11
x2

Post by X2soUrcerer » Thu, 26. Feb 04, 09:29

hallo,

ich arbeite grad an einer docu für die scripterei hier, und da hab ich mal sämtliche funktionen erfasst und eine liste erstellt, die mir als grundlage zur recherche dienen soll.
jetzt hatte ich von anfang an im sinn, diese liste zu veröffentliche, damit ich mich (oder andere) bei nachfragen auf diese liste beziehen kann. dummerweise ist die liste sch****e gross geworden ... ufff. da muss der server kämpfen ... hoffentlich mäckern die mods nich

ausserdem hoffe ich, das der eine oder andere die liste nützlich findet man kann in ihr nämlich per browser textsuche nach keywörtern suchen...

ausserdem werde ich auch bald noch einen thread aufmachen, in dem jeder so das was er über funktionen rausgefunden hat kundtun kann. ich werde das dann sammeln und ne docu ins netz stellen. so richtig mit suchfunktion und allem pi pa po

achso, wegen der numerierung ... die wird wohl nur bis zum nächsten patch bestand haben ... mal sehn, wie ich das noch handhabe dann

nun gut erstmal, viel spass mit der liste.


grüsse

the soUrcerer

User avatar
X-Rays
Posts: 207
Joined: Wed, 6. Nov 02, 21:31
x4

Post by X-Rays » Thu, 26. Feb 04, 09:58

Geil - jetzt kann ich endlich auch mal anfangen zu üben *g*

Danke!!!!

:o *wahnsinnsarbeitdiesespost* :o

Ralle

User avatar
o1ofco2
Posts: 972
Joined: Mon, 2. Feb 04, 21:30
x3tc

Post by o1ofco2 » Thu, 26. Feb 04, 10:41

:o

yo Danke, Danke, Danke :mrgreen:

User avatar
GothicK
Posts: 247
Joined: Fri, 6. Feb 04, 15:47
x3tc

Post by GothicK » Thu, 26. Feb 04, 11:57

Image
Gans grosse Klasse. Respekt.
Image
Solong, GothicK

User avatar
odo_blaue
Posts: 56
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by odo_blaue » Thu, 26. Feb 04, 16:01

Hallo allerseits!

@X2soUrcerer
Super Leistung, finde ich toll, großes Lob für die Befehlsübersicht.
Auch sehr gut gegliedert!
Wünsche noch einen netten Tag!

Gruß odo

Efraim
Posts: 9
Joined: Tue, 3. Feb 04, 18:46
x3

Post by Efraim » Thu, 26. Feb 04, 19:06

Würd sagen der Thread verdient nen Sticky :)

X2soUrcerer
Posts: 28
Joined: Mon, 16. Feb 04, 05:11
x2

Post by X2soUrcerer » Thu, 26. Feb 04, 19:23

danke für die anerkennung,

freut mich, dass sie euch gefällt :)
(war auch ne menge arbeit)


grüsse

User avatar
o1ofco2
Posts: 972
Joined: Mon, 2. Feb 04, 21:30
x3tc

Post by o1ofco2 » Fri, 27. Feb 04, 10:31

@ Burnit

bitte pinnen :x2:

User avatar
GothicK
Posts: 247
Joined: Fri, 6. Feb 04, 15:47
x3tc

Post by GothicK » Fri, 27. Feb 04, 15:00

*schieb*

Lansam wirds Zeit für'n Pinn.
Solong, GothicK

patcher
Posts: 13
Joined: Thu, 12. Feb 04, 17:15

Post by patcher » Sat, 28. Feb 04, 11:01

SUPER-IDEE :!: :!: :!:
Und vielen Dank für die Arbeit. :) :) :)
Jetzt kann ich mich endlich auch mal ans Scripten wagen.
Ach ja...da fällt mir noch eine Frage ein...muss ich die Scripts mit dem in X2 integrierten Editor schreiben, oder geht da auch ein anderer Editor?

Und noch eine Bitte an den Autor der Liste:
1)Schreib bei deiner Doku auch dazu, was welcher Befehl bewirkt, da nicht jeder des Englischen mächtig ist
2)Poste hier rein, wenn deine Doku fertig ist, und wo man sie kriegen kann

Ciau, und nochmal vielen vielen Dank, patcher

X2soUrcerer
Posts: 28
Joined: Mon, 16. Feb 04, 05:11
x2

Post by X2soUrcerer » Sat, 28. Feb 04, 19:53

hi,

zum editor:
also, so weit ich weiss gibt es nur den ingame editor. den find ich persönlich zimlich unständlich und ich hab auch schon dran gedacht einen eigenen zu schreiben. Dafür is mir die script engine aber zu unfähig. Wenn ich son prog schreibe kostet mich das mind. eine Woche arbeit und die will ich für diese engine nicht opfern (schade, was ?).

zur docu:
die liegt grad auf eis ... ich will noch den patch abwarten und vielleicht gibts ja dann auch die offizielle docu ... also immer langsam mit die jungen pferde :)

aber für beide diskussionen ist dieser thread ungeeignet.

ich mach zwecks editor und docu noch extra threads auf.
Und noch eine Bitte an den Autor der Liste:
1)Schreib bei deiner Doku auch dazu, was welcher Befehl bewirkt, da nicht jeder des Englischen mächtig ist
2)Poste hier rein, wenn deine Doku fertig ist, und wo man sie kriegen kann
zu 1) ... das ist im allgemeinen der sinn einer docu :)
zu 2) das passt hier nicht rein, dafür gibts nen eigenen thread

grüsse

The_Rock
Posts: 2549
Joined: Wed, 6. Nov 02, 21:31
x2

Post by The_Rock » Tue, 2. Mar 04, 13:51

Danke! :)
"How very touching his meaningless death was. But this fight was never for mortals".

User avatar
MrMilti
Posts: 151
Joined: Wed, 6. Nov 02, 21:31
x2

Ist ja ganz nett

Post by MrMilti » Wed, 3. Mar 04, 21:12

Tja die Liste ist ja ganz nett, aber ich hätte gern eine kurze Info zu den komplexeren Befehlen.

Was zum Beispiel sind MainTypes und Subtypes im Trade-Menü???
Das macht mich wahnsinnig, dass das nirgends erklärt wird. :?
Image

Post Reply

Return to “X²: Die Bedrohung - Scripts und Modding”