[script] Ship Commissioning Software

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

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

User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

[script] Ship Commissioning Software

Post by Sartorie »

Name: Ship Commissioning Software
Version: 1.31
Author: Sartorie
Updated: 03.04.08

Overview:
---------

This is a ship rename script for player owned ships. It adds a new command that allows you to put a ship into commission with your company. Ships can be put either into your companies naval/personal or trade fleet.
A naval fleet ship will be assigned a naval counting code (stays with the ship - dies with the ship) and the shipname will consist of status information and a unique name.
In the trade fleet the shipname will consist of status information, homebase and assigned job. If the feighter has currently no job assigned it will have a highlighted name.

This script aims for easy usage and works out of the box. Configuration options can be altered in the textfiles or the script itself. A new AL option is added that will stop auto naming on every ship.

The following screenshots were taken in a XTM game.
[ external image ][ external image ]
The left one shows the shipnames after commissioning, the right one before. If XTM is detected the extended shipclasses of XTM (e.g. M0, M8, MTS, T0) are used.

Usage:
------

To commission a naval fleet ship, make sure it has no homebase assigned - then run the [custom][commission ship] command on it. If you do not like the assigned random name overwrite it or run the command again to get another name.

To commission a trade fleet ship, make sure it has a homebase assigned - then run the [custom][commission ship] command on it. The ship will keep renaming itself if you change/rename it's homebase or assign it a new job. To stop the auto renaming run the [custom][commission ship] command on it again (make sure it has a homebase). The auto renaming feature does not work instantly - it takes seconds or even minutes to rename your freighter, be patient.

Configuration:
--------------

For this part you will need a normal text editor. Open the textfile 447927 and read the commend that describe each entry. The most common entries your should change are [0],[1],[2],[3] (you company / fleet names) and the delay for the auto naming [199]. If you want to use an empty string somewhere (that is not allowed by X3) use '\033X' (without the quotes) for it - this is the non-displayed color code for normal color.

Download:
---------

scs_1.31.spk / scs_1.31.zip

Install:
--------

Use Cycrows Plugin Manager to install. German, english and italien textfiles included.

Uninstall:
----------

Go to the AL menue and trigger the [SartCorp: stop SCS] option, it will revert to off automatically.
Now wait a few minutes to make sure every ship stopped its auto naming script. After that save you game and uninstall the script using the Plugin Manager.

Notes:
------

* Auto naming starts a script on the respective ship that will continue running until told to stop by either running the [custom][commission ship] command again or using the AL option (this will stop these script on every ship). The autonaming can recognize basic commands like [Buy for best price] and advanced commands like the MK3 Universe Trader.

* The [custom][commission ship] command will activate the autopilot of the ship and thereby reset its commands. After you have commissioned a ship you have to reorder your commands for it.

* After you have used the AL option [SartCorp: stop SCS] restarting auto naming will not work until you restart/reload (the setup script is triggered again).

* As the auto naming script is periodically run it could place some extra load on your game if you have it running on many, many freighter - to compensate for that you can adjust the delay for it in the textfile id 199. It's a numeric value in ms and determins how long the script will wait before running again.

Supported Commands:
-------------------

They following commands are recognized by the auto naming feature at the moment.

* [Buy for best price]
* [Sell for best price]
* Commodity and Logistics Software 1 and 2
* Commercial Agent
* MK3 Sector Trader
* MK3 Universe Trader

This list can be easily expanded. What I would need for that is the name (long name, short name and a link preferably) of the script AND the actual script the command runs on the target ship (with activated script editor take a look at the scripts that are running at the ship, at task 0 it should list the name of the script e.g. plugin.autotrade.galaxy)

Changes:
--------

v1.31
* set default auto delay to 300.000
* fixed a typo missnaming sell best price
* minor load balancing

v1.3
* added freighter autonaming feature

v1.2
* added more shipnames
* added vanilla compatibility
* added italian textfile

v1.1
* fixed typo in english textfiles

v1.0
* initial release

names currently included:

Code: Select all

fishnames.txt: 62 names
constellations.txt: 88 names
mystical creatures.txt: 205 names
shipnames.txt: 165 names
chemical elements.txt: 117 names
Iliad.txt: 55 names
Odyssey.txt: 32 names
artists.txt: 62 names
famous scientist.txt: 100 names
sf writers.txt: 743 names
fantasy writers.txt: 386 names
horror writers.txt: 213 names
currencies.txt: 52 names
melee weapons.txt: 69 names
celtic, female.txt: 62 names
celtic, male.txt: 84 names
chinese.txt: 468 names
finnish.txt: 41 names
greek+roman.txt: 59 names
norse.txt: 64 names
shinto.txt: 30 names
cthulu.txt: 92 names
egyptian.txt: 163 names
caribbean islands.txt: 23 names
large cities.txt: 37 names
total: 3472 names
Another script of mine makes for a great companion to this one, as it renames the capital race ships in a similiar way : Rename Raceships

Ideas and additions to the script(s) and/or nameslist are always welcome. :)
Last edited by Sartorie on Thu, 3. Apr 08, 10:55, edited 4 times in total.
Jaxom01
Posts: 122
Joined: Mon, 4. Sep 06, 19:27
x3tc

Post by Jaxom01 »

Hi there !!!


This really looks great - will be trying it out tonight ........
In Space No-One can hear you AAAAAAAAAAAAAAARRRRRRRRRRRRGGGGGGHHHHH!

Pentium D Dual Core 3.0Ghz
Corsair XMS 4GB kit (2x2048MB) Memory
BFG nVidia 8600 GTS 256MB Graphics card
2 x 250GB Maxstor Sata 2 Raid 0
Abit Fata1ty Mobo NVidia 650i chipset
SoundBlaster X-Fi sound-card
Vista x64 Ultimate
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

nice idea this Sartorie, already downloaded and installed
I was thinking of adding features for automated freighter naming based on their homebase / jobs etc. later.
this really appeals, as when i build a new factory or complex im a stickler about the way i name them. for example.

Silicon mine in Ore Belt
becomes

Silicon Mine 1

its ships however become

OB SM1 Energy Purchaser 1
OB SM1 Energy Purchaser 2

OB SM1 Silicon Sales

or OB SM1 CAG 1
and OB SM1 CAG 2

but i think you get the idea

which means if a ship is lost i know immediately on viewing my log what was lost from where and what i need to get to replace it and thereby get profit running as smoothly as possible. Unlike having 10 ships lost named Your Argon Mercury and then trying to figure out which factory and complexes have lost theyre ship(s).

So i think you will find a lot of support if you do go forward with icreasing the scope of this script.

Legionnaire
Jaxom01
Posts: 122
Joined: Mon, 4. Sep 06, 19:27
x3tc

Post by Jaxom01 »

My naming system ton date, was in fact very much like that of Legionaire....

I have tried the script and find it difficult to reconcile my ships names to their function/station.

It is far esier to manage 'UT1 SPP Herons N' and 'UT2 SPP Fam.Pride' than to distinguish 'Sir Isaac Newton' and 'Marie Curie' .

Though I must admit I do like the names and find it quite refreshing from my UT1.....UT2.... convention ... I guess a little more 'experience' and I should have no problems ......

Though it is quite a learning curve and not for the faint hearted

regards,
Martin aka Jaxom
In Space No-One can hear you AAAAAAAAAAAAAAARRRRRRRRRRRRGGGGGGHHHHH!

Pentium D Dual Core 3.0Ghz
Corsair XMS 4GB kit (2x2048MB) Memory
BFG nVidia 8600 GTS 256MB Graphics card
2 x 250GB Maxstor Sata 2 Raid 0
Abit Fata1ty Mobo NVidia 650i chipset
SoundBlaster X-Fi sound-card
Vista x64 Ultimate
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

@Jaxom

As far as i understand it the automated renaming of freighters to homebase hasnt been implemented yet, so currently im using this script to come up with names for my big ships only.

Legionnaire
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

I use a simliar naming scheme for my freighter so I can easily see where to replace one etc.

At the moment I´m still working on the freighter naming part of this script - the idea is if you run the command on a ship that has no homebase assigned it works like it does now but if the ship has a homebase assigned it switches to automatic mode.
Automatic mode means it will generate it´s name based on its homebase, the job it is running and some sort of counter. If it´s homebase or jobs changes so will it´s name and if it runs no command it will highlight it´s name.

This takes a bit of time atm. as I have to include a way (al plugin probably) to stop automatic mode on all ships prior to uninstalling the script. And I have to figure out ways to detect if the freighter runs an advanced command like UT etc..
Jaxom01
Posts: 122
Joined: Mon, 4. Sep 06, 19:27
x3tc

Post by Jaxom01 »

Just goes to show - I should read the OP more carefully ;) lol

Far naming suggestions I thought Poets might be good - Lord Byron, Keats, Jaxom - oops - well I am a published poet too ..... :D
In Space No-One can hear you AAAAAAAAAAAAAAARRRRRRRRRRRRGGGGGGHHHHH!

Pentium D Dual Core 3.0Ghz
Corsair XMS 4GB kit (2x2048MB) Memory
BFG nVidia 8600 GTS 256MB Graphics card
2 x 250GB Maxstor Sata 2 Raid 0
Abit Fata1ty Mobo NVidia 650i chipset
SoundBlaster X-Fi sound-card
Vista x64 Ultimate
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

New version, now with automated freighter naming :)
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

is that autonaming as in linked to factories/homebases?

i suspect it might be :lol: D/Ling

Will load an old save and try it, as my current save i dont have much just now - Khaak invader start :twisted:


Legionnaire
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

I love that start ^^

Yes the freighters keep naming themselves with some status information, their homebase and the job they are running. And yes, I'm lazy ;)
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

havent been able to test this yetall old saves are corrupted, so i guess its another plot start soon lol this time without RRF as that hijacked my Argon one, ah well whats the 50th odd time ive started a plot game more or less :P

and everyone still hates me in my current game, but i dont like playing mltiple games at once lol, and i have another fun scrpt that needs another restart to check as well, oh well looks like another plot game is about to be played lol

thanks for this Sartorie

Legionnaire
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

ok first of i love the way you got the freighters naming themselves in colours and with regards to their jobs, nice work, i actually used another script to be able to build a small booze complex even though im still hated :D this one from here
http://forum.egosoft.com/viewtopic.php? ... d837adf318

and then i started having a performance hit. I originally thought it might be a conflict between the two scripts, because i used Ares to build 3 stations for me power plant, wheat farm and spacefuel all size M.

They were built no problem, and i attached a total of 3 ships to them

set scs off on the three ships they were renamed and off they went, then i started getting pauses i originally thought it was having the sector map open in Seta causing it. as thats wher i first noticed it, my ships with scs installed and run on it were stopping moving, and they didnt start again until i closed the sector map and dropped out of seta. not a huge problem i thought maybe its an IS issue, so i left system and checked again still happening while i was watching the ships, ok dont watch them i thought, things always perform better if not being watched :) at this time a paranid ship appeared and i kicked in Auto Pilot and seta to get me close to it. part way there speed dropped to 0 and i watch the paranid ship get further away. again i didnt start moving until i had diabled seta and stopped and restarted auto pilot. at this point i was still unsure what was causing this, so i thought best to check each of the two new scripts i had installed and i disabled scs in the AL menu and now the freezes and lag have stopped everything is running as it should be. i'm wondering therefore if its triggered by the script checking to see if jobs have changed on the ships, and i was wondering if there was anyway of setting it so that when its run on a ship the ship keeps that name and job description until the script is run again?

Still loving this script, think its my pc showing signs of its age more than anything lol but thought you should know about this

Legionnaire

*edit*

just noticed that in the script installer theres both 1.2 and 1.3 showing. doing and uninstall/removal of both then re-installing 1.3 will see what happens after that

Legionnaire
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

Thats my fault actually ^^, I included a very low standard delay for the auto naming so it can be easily tested ... open the texfile 447927.xml e.g. and look for the entry with the id 199 ... change it from 1000 (1 second) to 300000 (5 minutes) or even higher - the next time a game is loaded / started the script will read the new delay and use it.
With a high enough delay there should be no problems in performance ... else I would need to map it to a new command that does not activate the autopilot (and thereby resets any commands running).
But I actually like the automated idea ^^ will test its performance on a larger fleet but have to set it up first.

And I found a typo in the script too - so buy and sell get the same prefix atm. Gotta write an update script to exchange the running auto naming scripts now ...
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

ok looks like im gonna have to try *gulp* ..editing... a file, here goes hopefully it doesnt die :shock:

being serious though, i removed both version 1.2 and version 1.3 and then saved reloaded and then saved and reinstalled 1.3 again and again got slow down and random autopillock stopping, so hopefully editing what you suggested will help, gonna try it just now :)

Legionnaire

*edit*

now im really confused ive re-installed the software, made th change you recommended saved the file and restarted X3 the commands are there but commision ship no longer seems to rename ships...

going to try reinstalling software again

well have made the change, reinstalled the software, and still have these freezes and autopilot dropping down to 0 and sitting there for anything up to about 30 seconds then maybe speeding back up and continuing on the planned route.

*scratches head*

will have an experiment and try a few other things and get back to here to let you know whats happening

Legionnaire
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

sorry its been a while since i posted a response , yup that sorted it, but for various reasos in the last couple of days ive had to uninstall and re-install several times, and each time ive had to hunt down this page again to find out what i need to change :oops:

have you uploaded a fresh version where this change that of id 199 from 1000 to 300000 has been done and is included in the spk? because as soon as i make that change everything works smoothely again

Legionnaire
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

Okay heres a small update that just fixes the default delay and some minor stuff. Enjoy :)
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

Thanks a lot :D

D/led and installed :)

Legionnaire
Osiris75
Posts: 40
Joined: Thu, 11. Dec 03, 17:10
x3

My naming scheme

Post by Osiris75 »

Here is my naming convention...what would be really cool is if you could easily plug in some txt files with names in them as the source of the Unique names portion in this script. It'd make it alot easier for us noobies.
For example, I name ships as follows:

Fighter class ships (M5-M3): Medieval weaponry (ya, im an rpg nerd)

M5- small weapons (dagger, stiletto, dart, etc..)
M4- medium weapons (Scimitar, Longsword, etc...)
M3- large weapons (Claymore, Halberd, etc...)

Trade Ships:
TP- Zodiac Constellations (Aquarius, Gemini, Capricorn..etc) though I may use these for M0/M1 ships when I actually get some.

Satellites:
Sector Initials+Sat Type (ex: for Argon Prime Navsat.. AP-NAVSAT)

Another name source I'm thinking of using are star names as opposed to constellations, since I imagine you could eventually run out of constellations...but their are tons of nice sounding star names lol.

So it would be really cool if this script made it easy to plug in lists of names that you'd want it to use.
Osiris75
Posts: 40
Joined: Thu, 11. Dec 03, 17:10
x3

My naming scheme

Post by Osiris75 »

Here is my naming convention...what would be really cool is if you could easily plug in some txt files with names in them as the source of the Unique names portion in this script. It'd make it alot easier for us noobies.
For example, I name ships as follows:

Fighter class ships (M5-M3): Medieval weaponry (ya, im an rpg nerd)

M5- small weapons (dagger, stiletto, dart, etc..)
M4- medium weapons (Scimitar, Longsword, etc...)
M3- large weapons (Claymore, Halberd, etc...)

Trade Ships:
Zodiac Constellations (Aquarius, Gemini, Capricorn..etc) though I may use these for M0/M1 ships when I actually get some.

Satellites:
Sector Initials+Sat Type (ex: for Argon Prime Navsat.. AP-NAVSAT)

Another name source I'm thinking of using are star names as opposed to constellations, since I imagine you could eventually run out of constellations...but their are tons of nice sounding star names lol.

So it would be really cool if this script made it easy to plug in lists of names that you'd want it to use.
User avatar
Sartorie
Posts: 389
Joined: Sat, 10. Apr 04, 13:05
x3tc

Post by Sartorie »

I keep the names in simple .txt files and run them trough a Python script to get the xml file. Somewhere on the bottom of my list is turning this in a little utility with a gui to allow users to configure all those names e.g. add files, remove files and so on.

The idea linking ship classes and special names actually is somewhere on that list too - goes well together with that little utility. ATM though I have a bit of a workload so that may take some time to come around to actually do this.

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