Showing which commands are running for a ship

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

stella
Posts: 1004
Joined: Tue, 17. Feb 04, 18:41
x2

Showing which commands are running for a ship

Post by stella »

On the "owned property" screen, if you have a ship running, say "buyware", It shows up for that ship as the currently running command.

How do I do this for a user script. It just says "none", although it's actually out there doing it.

Cheers.
User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 »

You need to give your command a name, using a text file and the 'load text: id=' command

then in the command script there's a line in the header section where you assign a command name. Select the correct command object from the list.

commands like 'set destination' and 'set wanted ware' will add the extra information you see in the properties list like "buyware... Meatsteaks"
stella
Posts: 1004
Joined: Tue, 17. Feb 04, 18:41
x2

Post by stella »

Right. Got it. I understand completely......
Well, I say "completely", I actually mean " bit".
Well, I say "a bit"..... Actually, I haven't got a clue.

The language file is there, and gets picked up ok. The command runs. There's text in the language file that names the command. There's text in the init file that names the command. I just don't know if it's the right bit or not.

In my init command, I have

Code: Select all

$command = COMMAND_TYPE_TRADE_26
005   
006   global ship map: set: key=$command, class=Ship, race=Player, script='jump.loop.sellwarebest', prio=0
007   set ship command upgrade: command=$command  upgrade=$upgrade
008   
is that the bit I need to alter?
User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 »

Ok that bit's right.

at the top of the script editing window you have options to set the version, description, command name, then the arguments before the main body of the script.

highlight command name and select <Command Object>, then select the correct command object from the list. COMMAND_TYPE_TRADE_26 in your case.
stella
Posts: 1004
Joined: Tue, 17. Feb 04, 18:41
x2

Post by stella »

AHA :idea:

The mystery is sol-ved.

"COMMAND_TYPE_26" Is a bit mundane.

What if I wanted to call it "Reg" instead?
User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 »

in the text file for that script you should already have entries for pages 2010 and 2011.

The COMMAND_TYPE_TRADE_26 is changed by adding an entry on page 2008

Code: Select all

<page id="2008" title="Script Object Commands" descr="0">
 <t id="426">YOUR_TRADE_COMMAND</t>
</page>

<page id="2010" title="Script Cmd Names" descr="Long version of commandos. These are the commandos assigned to ships using the commandconsole. Page 2010 and 2011 belong together and hold short and long versions of the same commands"> 
 <t id="426">Your Command</t>
</page> 

<page id="2011" title="Script Cmd Shorts" descr="Short version of commandos. These are the commandos assigned to ships using the commandconsole. Page 2010 and 2011 belong together and hold short and long versions of the same commands"> 
 <t id="426">Yr.Cmd</t>
</page> 
stella
Posts: 1004
Joined: Tue, 17. Feb 04, 18:41
x2

Post by stella »

Got it.

Many thanx.

:D

Return to “X²: The Threat - Scripts and Modding”