[SCRIPT]ship Naming System V1.25 (Updated 04/07/07)

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

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

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

[SCRIPT]ship Naming System V1.25 (Updated 04/07/07)

Post by Osiris_sam » Thu, 14. Jun 07, 17:32

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Ship Naming System
Version: 1.25
Osirissamelite@googlemail.com
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

download:
[.rar][.spk]
--------------------------------------------------------------

Note: Any bugs, please report them to me by send either a PM or E-mail (see address above) in the subject, please include the word 'script'.

I have included SymTec ltd.'s lib.st.formatnames library. I have included it in the spk/rar for simplicity. Special thanks to him for allowing me to use this resource :P

--------------------------------------------------------------
Installation:
rar: Extract rar contents to *\EGOSOFT\X3 Reunion
SPK: Double click on file with Cycrows' script installer installed.
--------------------------------------------------------------

Usage:
This script is for the automatic renaming of ships.
This version includes:
>Capital ship Naming
>TS Naming
>Satalite Naming
>Fighter Naming
>TP Naming

Due to feedback from users of this script, I advise all users to keep station names short. station names with over 17 characters will cause TS names to over-run the shield/hull status bars. If your station name is over this length, there is nothing i can do about it.

The script has 3 Commands (details below) found in the Custom menu:

Shipname: Further Options - This will open the MSUI (message system user interface). On this first message, you will see a series of options:

>Capital Ship Naming System Options - Opens the Capital SNS module options
>TS Ship Naming System Options - Opens the TS SNS module options
>Satalite Ship Naming System Options - Opens the Sat. SNS module options
>Fighter Ship Naming System Options - Opens the Fighter SNS module options
>Ship and station report - Sends the player a message detailing number of each class of ship, including a total number. and a list of stations which have TS class ships set as homebase, which have been renamed. **warning** this message can take a long time to arrive. I suggest that you don't ask for one if you are about to dock. The message will be displayed.
>Reset All Ships - This resets ALL ships that have been renamed by the Ship Naming System.
>Cancel - Closes the MSUI

The different modules have similar options;
>start SNS - starts the ship naming system
>stop SNS - stops the ship naming system - will only effect the next renaming session.
>reset - Resets the ships renamed by this module (independantly of the other modules)
>information - sends player an instant message with info on the module
>return - Returns the to the main MSUI menu
>cancel - Closes the MSUI

Shipname: Protect ship/set prefix - This command has two functions; When run on a small ship, it promts the player to enter a prefix for all capital ships. It is suggested that this is 2,3 or 4 Characters long. When this command is run on a Capital ship, it will protect the ship from renaming. The ship will retain its original name until reset.

Setup Company Details - Found on a player owned station, this command prompts the user to enter a company name, initials (no more than 4 characters) and a home system. This command is also used by the station naming system.
--------------------------------------------------------------

Uninstallation:
For both: while in-game, Run the 'Shipname: Further Options' Command, then select 'Reset All Ships'. This will restore them to their original names.
rar: Remove the text file (448885.xml) from the \t folder. Remove the script files from the \scripts folder (contact me if a list of scripts is required)
spk: Use Cycrows' script installer to uninstall the script.
*note* uninstalling the script will not reset ship names to their original names (e.g.Your argon titan), unless the reset all ships command is activated.

--------------------------------------------------------------
Revision History:

v1.25 - Current version
-added Fighter Naming Module
-added Tp Naming Module
-added company details
-improved reporting
-added names to shipname list
-added colour per capital class
-fixed identification of CAgs
-added Company identification

v1.20 -
-Script now distinguishes between TS' running Station Manager, Commercial agent and Commodity Logistics software (recent Bonus pack)
-Script now ignores ships which are part of a group (i.e. Using Group management system (also from bonus pack)
-Fixed several bugs in the reseting of ships
-Sector traders and universe traders (mk3) now named differently, and coloured differently for easy recognition.
-Improved MSUI, Menus no longer close when a command is selected in one of the module options (main MSUI window will close when one of those options is selected)
-Some mistypes in the text file have been corrected
-Scripts will now terminate when the 'stop' command is run
-System status now reported in the Fleet report (see commands)
-Naming scripts will now wait for reset scripts to complete before renaming ships (to prevent complications due to this)

v1.15 -
-Added TS naming module
-Added Satalite Naming module
-Further enhanced the MSUI (message system user interface)
-fixed timing scripts - timing now controlled by a single AL-Plugin.
-Added Ship and Station report, including information on number of ships, and stations which have renamed TS ships assigned.
-Rename timing is now based on the number of ships the player owns. The minimum interval is 250s (5 mins), 1 second is added for every 5 ships.

V1.10 - Xtended Compatibility
-Refined delayed starting
-Changed commands to comply with XTM 0.7a
-Changed script interface, Most commands now entered through the message system.
-fixed script reseting the 'original' name of a ship when running the 'protect ship' command, if the system had not been run.
-Some of the first addon files have been added :TS naming systems.

V1.01 - initial release
-fixed problems with starting the script
-added delayed starting, so the script does not activate upon startup.
-added original name resetting when using reset command

V1.00B1- Beta release
--------------------------------------------------------------

Text files used:
448885.xml

text pages used:
8885
8886

Commands used:
755 - COMMAND_TYPE_CUSTOM_55 - Shipname: Further Options
756 - COMMAND_TYPE_CUSTOM_56 - Shipname: Protect ship/set Prefix
1116 - COMMAND_TYPE_STATION_16 - Setup Company Details

--------------------------------------------------------------

Credits:
Endremion - ship names
raleksandr - ship names
ScorpiusX - ship names and his vast quantity of feedback :)
The Cuban Nightmare - ship names
Tenlar Scarflame - ship names
Yellowman - ship names
Blueman - ship names (although not used in version)
bkcommander - ship names
xfir01 - ship names
Modeler - ship names

Big thanks to:
Stevio - Help with the core scripting
Cycrow - LOTS of help with my various questions whilst writing this script
Symtec ltd. - Use of his library for formatting arrays. and help with timing etc.
sphr - Use of his libraries...

--------------------------------------------------------------
To-do list:
-add names to shipname list
-add ship type suffix (thanks ScorpiusX for your input on this :D )

Any queries please contact me either by email (see top of page) or by PM on the egosoft forum. EDIT: Please include "script" in your topic to maximize the chance of it being read
See post 2 for details on how to add shipnames and posting ideas.
Last edited by Osiris_sam on Wed, 4. Jul 07, 23:02, edited 13 times in total.

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Fri, 15. Jun 07, 20:28

Naming Schemes:
Capital:

Code: Select all

*prefix* *name*
if no prefix is set the name will appear on its own
TS:
station traders (running vanilla commands)

Code: Select all

TS - *Station* -nn
station traders running CLS (commodity logistics software)

Code: Select all

CLS - *Station* -nn
station traders running StMr (Station Manager)

Code: Select all

StMr - *Station* -nn
station traders running CAg (Commercial Agent)

Code: Select all

CAg - *Station* -nn
Mk3 Trader (sector)

Code: Select all

TS - Sector -nn
Mk3 Trader (Universe)

Code: Select all

TS - Universe -nn
Satalites:
Advanced sat

Code: Select all

AS - *sector*
navigation sat

Code: Select all

NS - *sector*
(note: Satalites named Trade beacon will be ignored)


Fighter Naming:

Code: Select all

<Ship short name><homebase> - <number> {<company initials>}
or

Code: Select all

<Ship short name> Patrol - <number> {<company initials>}
Numbers for homebase ships and patrol ships are different. Patrol ships are globally numbered (like ST/UT).

TPs:

Code: Select all

<company initials> - <Type>
where type can be:
Executive transport
VIP transport
Personnel transport or
slave transport

How to add ship names to the script:
Please add ships in the following format

Code: Select all

<t id="340">**NAME**</t>
so the next name would be

Code: Select all

<t id="341">**NAME**</t>
and so on...

How to submit ideas for improving the script:
post any ideas for impoving the script in this thread, and i will take them into consideration


This may be subject to change before final release
Known bug list:
->Readtext error when naming undefined TP class ships \\fixed
->Numbering of fighters not working
->Issues with TS naming
->issues with prefix doubleing \\fixed
Last edited by Osiris_sam on Tue, 24. Jul 07, 14:43, edited 14 times in total.

xTemon
Posts: 996
Joined: Tue, 9. Jan 07, 20:01
x3tc

Post by xTemon » Fri, 15. Jun 07, 20:43

I like NSC myself-got me what it means though :roll:

Edit:

Excellent job by the way :D :thumb_up:

Dragonteen
Posts: 153
Joined: Sun, 19. Dec 04, 19:02
x3tc

Post by Dragonteen » Fri, 15. Jun 07, 21:54

d/ling now...this will make naming a lot easier. are TLs included in this version or will they join with TS/TPs?
"Violence is the last refuge of the incompetent"-Savor Hardin

...

unless its against the Kha'ak or Xenon

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Fri, 15. Jun 07, 23:01

TLs are included as capital ships. i will be releasing a new version, to make the script XTM .7a compatible (for people who use that mod) however, this version will work just fine.

User avatar
Stevio
Posts: 2271
Joined: Sat, 4. Jun 05, 10:36
x3tc

Post by Stevio » Fri, 15. Jun 07, 23:20

script: plugin.osiris.name.check

Code: Select all

010    if $val == null
011 @   $shipname = $ship -> call script 'plugin.osiris.rename' : 
012     $ship -> set name to $shipname
013     $sector = $ship -> get sector
014     $ship -> set local variable: name='osiris.rename.value' value=[TRUE]
015    else if $val == [FALSE]
016 @   $shipname = $ship -> call script 'plugin.osiris.rename' : 
017     $ship -> set name to $shipname
018     $ship -> set local variable: name='osiris.rename.value' value=[TRUE]
these to statements could be merged into one i.e

Code: Select all

010    if $val == null OR $val == [TRUE]
011 @   $shipname = $ship -> call script 'plugin.osiris.rename' : 
012     $ship -> set name to $shipname
013     $sector = $ship -> get sector
014     $ship -> set local variable: name='osiris.rename.value' value=[TRUE]
;)

User avatar
Malakie
Posts: 1061
Joined: Tue, 13. Apr 04, 23:08
x4

Nice.. suggestion also!

Post by Malakie » Fri, 15. Jun 07, 23:23

Hi,

Been looking for something like this! Thanks.. Another script I would like to see along this line is one that allows you to easily name fighters assigned to whatever they are assigned to.

For example, let's say I have 20 fighters assigned to a ship named USS Enterprise or 50 fighters assigned to Complex Ore Belt One Alpha etc..I want the name of the fighters to reflect that so I know who is who and who belongs to what.

Something like:

Nova Fighter Alpha One - USS Enterprise
Nova Fighter Alpha Two - USS Enterprise

Falcon Fighter Alpha One - Complex Ore Belt Alpha One
Falcon Fighter Alpha Two - Complex Ore Belt Alpha One

Falcon Fighter Beta One - Complex Ore Belt Beta One
Falcon Fighter Beta Two - Complex Ore Belt Beta Two

and so on..

It is a pain in the ass doing this manually so I know who is assigned where...

Malakie

Unserene
Posts: 572
Joined: Sat, 9. Oct 04, 17:31
x4

Re: Nice.. suggestion also!

Post by Unserene » Fri, 15. Jun 07, 23:36

Malakie wrote:Hi,

Been looking for something like this! Thanks.. Another script I would like to see along this line is one that allows you to easily name fighters assigned to whatever they are assigned to.

For example, let's say I have 20 fighters assigned to a ship named USS Enterprise or 50 fighters assigned to Complex Ore Belt One Alpha etc..I want the name of the fighters to reflect that so I know who is who and who belongs to what.

Something like:

Nova Fighter Alpha One - USS Enterprise
Nova Fighter Alpha Two - USS Enterprise

Falcon Fighter Alpha One - Complex Ore Belt Alpha One
Falcon Fighter Alpha Two - Complex Ore Belt Alpha One

Falcon Fighter Beta One - Complex Ore Belt Beta One
Falcon Fighter Beta Two - Complex Ore Belt Beta Two

and so on..

It is a pain in the ass doing this manually so I know who is assigned where...

Malakie
Try ACC
It's a TURRET, not a "turrent". Learn to spell.

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Fri, 15. Jun 07, 23:39

im currently writing an addon to the capital ship naming scripts for naming of TS class ships, which will name TS (with a home base set) to TS *homebase* nn (where nn is a number), i may in the future write a similar script for fighters.

@stevio thanks for the tip :) ill change that right away

User avatar
Malakie
Posts: 1061
Joined: Tue, 13. Apr 04, 23:08
x4

ACC in

Post by Malakie » Fri, 15. Jun 07, 23:46

Acc does not work the way I want nor is it straight forward simple. I just want something that gives you a command or AL Plugin that says ' Name ships to assigned homebase' or something, and it does. And with the naming template of this script by Osiris_Sam, where you can give it prefixes, I think it would fit right in and simplify things.

Malakie

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Sat, 16. Jun 07, 01:33

@malakie - ill look into it, its certainly something i wouldnt mind having, but it could be a while
im currently in developement of a XTM .7a compatible naming system, and a addon for naming TS class ships
ill keep you updated

creardon
Posts: 8
Joined: Sun, 28. Nov 04, 12:22
x3

Post by creardon » Sat, 16. Jun 07, 13:44

Hi,

First up, thanks for the script! It has made life just that little bit more interesting with all the new names.

I have noticed though, that when I open the piracy menu on the Cap ships I am confronted with three options labelled ReadText2010-631, 632 and 633 respectively. The command still works fine as your notes in the post oulined what choices are where. I just thought I'd let you know. I'm running v2 with a number of scripts installed. Would this be a conflict with one of my existing scripts?

Keep up the great work!

xfir01
Posts: 433
Joined: Sun, 13. May 07, 17:28
x3tc

Post by xfir01 » Sat, 16. Jun 07, 14:01

creardon wrote:Would this be a conflict with one of my existing scripts?
No, that's caused by missing entries in the text file....which is also where the ship names are stored. you say it still works?


edit: Got it.

There's a bug in the spk version's t file. It looks like Osiris_sam changed the command slots but didn't get the new file in when repacking it.

just download the rar file and overwrite the 448885.xml in your t directory.

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Sat, 16. Jun 07, 14:53

Creardon - this error is due to the change of command slots, i originally used piracy 56,57,58, but on discovering these were already used, i updated to 31,32,33. however i updated the .rar files, but .spk files were not changed for some reason...

Version 1.1 has arrived. This version does not have the prefix feature, however, it is compatible with XTM 0.7a.

the command slots have changed to the custom menu, and there is only two... see the original post for details

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Sun, 17. Jun 07, 18:26

TS/TP Naming schemes:
im writing the first addon for the script: TS/TP naming; ive written the TS naming script. It remanes ts class following

Code: Select all

TS - <station> - nn
the station is the name of the homebase of the station, and nn is the number of the station.
if the ship doesnt have a homebase, and the pilot isnt the player it will rename it:

Code: Select all

TS - MK3 Trader - nn
where nn is the number of the ts.
if the ts hasnt got a homebase, and the pilot IS the player,
it will call it:

Code: Select all

TS - Unknown Function
however, ive hit a brick wall wen it comes to naming TP. since theres only a few scripts that bring TPs into the game as such, im not sure how to name them.
i thought of:

Code: Select all

TP - <company prefix><type> - nn
where the type can be any of the following:
>executive transport
>company shuttle
>tour transporter
>taxi service
>company managers personal shuttle (possibly only if the player is in the tp at time of naming)

what do you think?

User avatar
X2-Eliah
Posts: 4369
Joined: Thu, 12. Oct 06, 16:30
x4

Post by X2-Eliah » Sun, 17. Jun 07, 18:46

Well, since TP isn''t actually used much, I'd suggest let it get the first code of TS, and if that does not have a homebase, leave it as such..
Or better-- TS Unknown Function nn, they need numbers too, aswell as the TS code need them.

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Sun, 17. Jun 07, 19:03

the ships that are named

Code: Select all

TS - Unknown function
are renamed once a homebase is set (or the pilot is changed).
i can add numbers if needed, but i though that would add over complication.
im currently refining the system interface that controls the naming system for both capital ships and ts/tp.
since theres a taxi script, i may see if i cud use that to influence the naming of ships...(only if players have that script installed mind).

ScorpiusX
Posts: 263
Joined: Wed, 16. Aug 06, 22:44
x4

Post by ScorpiusX » Mon, 18. Jun 07, 13:25

Hi Osiris_Sam I've downloaded this script and can't wait to get my grubby little paws on a capital ship in my new game to try it out. In my other game all my Capital ships had the ship names from trafalgar I gave you but this just seems like its going to be a lot less hassle. Thx.

ScorpiusX
ScorpiusX Corp company motto:

"We don't want to rule the Galaxy"
"We just want to own it!"

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Official list of features for v1.15

Post by Osiris_sam » Wed, 20. Jun 07, 23:36

here is the preliminary list of features for the 1.15 release (next release)

Main 'Modules' of the system
>Capital ship Naming System module
>TS Ship Naming system module
>Sat. Naming System (see below)


Other/Misc features
>Improved MSUI (message system user interface), handeling most aspects of the system.
>Feature for finding stations that have TS vessels assigned that have been renamed. this is included in the fleet report utility
>Fleet Report Utility -> this will message the player with details on classes of ships, stations, and other details relevant to the system.


Bug Fixes
>Handling of timing for renaming now handled by AL plugin. (it will work now for sure)



Sats will be named by the following scheme:

Code: Select all

*type* - *sector*
Type is either:
NS - Navigation sat. (basic)
AS - Advanced sat. (advanced)
sector is the sector the sat is present in

Please note that the timing for the script is based on the number of ships the player owns. Do not be alarmed if ship naming takes a long time if you own a lot of ships.

Osiris_sam
Posts: 422
Joined: Thu, 24. Aug 06, 13:45
x4

Post by Osiris_sam » Sat, 23. Jun 07, 21:47

Ship Naming System v1.15 has been released

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