Executing commands in script
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 1
- Joined: Tue, 8. Dec 15, 21:00
Executing commands in script
Hi everyone,
I have a (most likely trivial) question regarding scripting in X3. I would like to know how I can call the command 'Start commercial representation'([Comm.Agent]) on a ship from a script. I would assume that any menu command is linked to a script, but I have no idea how to find the linked script.
I have skimmed through the MCSI handbook but didn't manage to find what I am looking for.
Does anyone have any suggestions?
I have a (most likely trivial) question regarding scripting in X3. I would like to know how I can call the command 'Start commercial representation'([Comm.Agent]) on a ship from a script. I would assume that any menu command is linked to a script, but I have no idea how to find the linked script.
I have skimmed through the MCSI handbook but didn't manage to find what I am looking for.
Does anyone have any suggestions?
- X2-Illuminatus
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
Check the setup script for the Commercial agent script. The command will be registered there.
Apart from that, an explanation of the call script command can be found here.
Apart from that, an explanation of the call script command can be found here.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
- jack775544
- Posts: 1277
- Joined: Tue, 13. Dec 11, 08:27
Just to extend on the previous answer a little bit, any script that starts with the name 'setup.' will be run when the game is either created or loaded from a save file but after the universe has been generated. So these are the places where commands are usually initialised.
For CAG the script that you are looking for will be 'setup.plugin.com.agent' and the command that binds a menu action to a script will be
For CAG the script that you are looking for will be 'setup.plugin.com.agent' and the command that binds a menu action to a script will be
Code: Select all
set script command upgrade: command=<Object Command/Signal> upgrade=<Var/Ware>
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
... regarding the commercial agent command, i think that you cannot simply start / call it an then "forget", because it has a preload script
... that is every time you start the command the preload script executes, which in this case opens up a menu
... in this preload menu you must manually click on "start the command" button
to start the commsAgent on a ship that has previously run that command (and has all the necessary settings/pilot/software/etc), you have to look into the preload script and find out what script commands / lines are executed when you click on that "start commercial agent" button
... that is every time you start the command the preload script executes, which in this case opens up a menu
... in this preload menu you must manually click on "start the command" button
to start the commsAgent on a ship that has previously run that command (and has all the necessary settings/pilot/software/etc), you have to look into the preload script and find out what script commands / lines are executed when you click on that "start commercial agent" button
To err is human. To really foul things up you need a computer.
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.
Mission Director Beispiele
Irren ist menschlich. Aber wenn man richtig Fehler machen will, braucht man einen Computer.
Mission Director Beispiele
- ubuntufreakdragon
- Posts: 5198
- Joined: Thu, 23. Jun 11, 14:57
there isn't much more to do than checking for pilotes, I had already done this for Lucikes Scripts for this Script of mine: http://www.nexusmods.com/x3terranconflict/mods/4/?
My X3 Mods
XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist
XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist