Coding ship names question

The place to discuss scripting and game modifications for X³: Reunion.

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

Post Reply
cloaker99
Posts: 4
Joined: Sat, 25. Jan 20, 14:22

Coding ship names question

Post by cloaker99 » Sat, 25. Jan 20, 14:58

Hello, I apologize in advance for the newb questions, this is day 5 of scripting X3!

I wrote a script that changes the playership name to something like "Transport 10000 FREE" which basically tells me what type of duty the ship is used for, the cargo size, and if its "FREE" or "WORK" or about 10 other status that I set.

The script works fine with the ship I am sitting in, but I want to rename ships that I am selecting from a list. I tried using "THIS" and selecting a ships control panel from a list of ships sitting at a station for example and it didn't work. If I use playership it just always renames the current ship I am sitting in.

I would eventually like to add it to the control dropdown menu for all ships so that I can just click it.

I do not want it to run all the time. I want to select the ships to rename because I have other naming conventions for ships that are very specialized and use 000 as the start of their name so they sort at the top of the ship list.

I am willing to have many scripts for different jobs like transport, trader, fighter, miner, supply, fueler etc but a dropdown might be a nice touch. maybe version 2? haha

Thanks, please let me know if I need to move this thread, I tried to search it up before posting and this seemed like the place!

David

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21900
Joined: Sun, 2. Apr 06, 16:38
x4

Re: Coding ship names question

Post by X2-Illuminatus » Sat, 1. Feb 20, 11:05

cloaker99 wrote:
Sat, 25. Jan 20, 14:58
I tried using "THIS" and selecting a ships control panel from a list of ships sitting at a station for example and it didn't work. If I use playership it just always renames the current ship I am sitting in.
THIS always refers to the object your script is running on. While PLAYERSHIP is the ship you're currently sitting in.

For a ship by ship selection mode, you could use a command slot.
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 and Nopileos as Kindle e-books! (NOW also available: X3: Yoshiko!)

Post Reply

Return to “X³: Reunion - Scripts and Modding”