EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[SCRIPT: Upd 09/02] Rename ships with Expression 1.7 (RSwE) New links
Post new topic Reply to topic Goto page 1, 2, 3, 4, 5, 6, 7  Next
View previous topic :: View next topic
Author Message
Loky77





Joined: 25 Jan 2009
Posts: 110 on topic

Thank you for registering your game
modified
PostPosted: Sun, 8. Feb 09, 21:56    Post subject: [SCRIPT: Upd 09/02] Rename ships with Expression 1.7 (RSwE) New links Reply with quote Print

Rename Ships with Expressions (RSwE)
Based on Klyith work for X3R


  • SPK

    This package use Cycrow plug-in manager for the installation or deinstallation.

  • Zip


    To Install using the Zip file, just unzip the archive in your X3 directory.
    To Uninstall the script, you have to:
    1. To deactivate the AL plug-in (Gameplay/AL menu)
    2. Save your game
    3. Remove the following files
      in T directory:
      • 7955-L044.xml

      in Script directory:
      • al.loky.rswe.events.xml
      • al.loky.rswe.main.xml
      • al.plugin.loky.rswe.xml
      • lib.loky.number.formation.xml
      • plugin.loky.rswe.defaults.xml
      • plugin.loky.rswe.formations.xml
      • plugin.loky.rswe.frontend.xml
      • plugin.loky.rswe.launcher.xml
      • plugin.loky.rswe.menu.xml
      • plugin.loky.rswe.tool.xml
      • setup.loky.rswe.xml



Concept

This script has been developed to allow quick and powerful renaming functions
to use with your ships and stations. The method of entry means that you can give
names unique to each ship in large batches. Whether you are renaming a small
group or all of your ships in the universe is up to you.

Central to the idea of RSwE are the Expressions. These are like "text short cuts"
which are interpreted by the script to produce context-defined results. When
combined with standard text this allows you to specify names that are both
unique to your ships and customized to your preference. Thus, if you have a group
of three Buster Raiders to rename, entering *CL-*TA Orion *NN will rename them
to M4-BR Orion 1, 2, and 3.


Menu commands
There are 7 RSwE commands available in Rename Ships menu:
  1. Rename current ship
    Rename ship from which the command was launch on
  2. Rename a ship (select from sector)
    Rename a single ship selected from the universe map. A docked ship cannot be
    renamed this way.
  3. Rename all ships in sector
    Rename all ship of a given class (or superclass) in a selected sector. You
    don't have to be in this sector. Docked ships cannot be renamed this way.
  4. Rename all ships in Universe
    Rename all ship of a given class (or superclass) in X3 universe. Docked ships
    WILL be renamed too.
  5. Rename docked ships
    Rename ships docked inside a carrier/station. The carrier/station is not renamed.
  6. Rename all ships with RSwE defaults
    Rename all ships in X3 universe with internal defaults values.
  7. Set clipboard
    Will set one of the clipboard (9 available). You will be able to use them later
    with *Yn expressions.
  8. Help
    Short help sent into your incoming messages.
    You have to close your command console to trigger the sending though.


One note is that while the universe option will rename regardless of state, the
sector option will not rename docked ships. This can be useful as a way to
exclude ships that you don't want to rename.


List of RSwE Expressions
  • *ON : Old name used before you asked for the renaming.
  • *ID : ID Code
  • *HB : Home Base
  • *SC : Current sector
  • *SA : Abbreviation of sector name, like HoL, PP, PR
  • *SR : Abbreviation with Race owner of sector, like A.HoL, P.PP, P.PR
  • *SN : Incrementing sector counter for numbering ship inside
  • *CL : Class Name - M1, M3, TS, etc
  • *TN : Type Name - Raptor, Nova Raider, Demeter Hauler, etc
  • *TS : Type Short - Ship main type + Abbreviation like Nova NR, Dolphin DSF
  • *TA : Type Abbreviation - Ra, NR, DH, etc
  • *TH : Trader Level
  • *PS : Pilot Fight Skill
  • *PM : Pilot Morale and Aggression level
  • *FR : Name of highest leader (in case of consecutive follows), or "Leader" if the
    current ship is the highest Leader
  • *FL : Name of direct Leader
  • *FP : Formation ID, like α1, β1... ,ωn, αn+1 . Also flag the highest leader.
  • *FO : Depth in formation lines (from alpha for all leaders to omega for followers)
  • *FN : Incrementing number with leader zero, plus prefix W if wingman, or L if leader
  • *FI : Ship ID number inside its formation
  • *NN : Incrementing unique number
  • *ZN : Incrementing number with leading zero
  • *NV : Short name for satellites
  • *TP : Product sold by your factory
  • *TC : Number of units of your factory
  • *DN : Store a naming scheme on ships. This scheme will be used by the AL plug-in
    to rename your ship regularly. It must be used at the beginning of the string, without spaces
    after the *DN (unless you wanted some, that's it Smile )
  • *Y1 - *Y9 : Your text clipboards (use a single space to empty clipboard in
    the Set clipboard menu)


Colors:
  • *KW White
  • *KR Red
  • *KY Yellow
  • *KG Green
  • *KB Blue
  • *KX Normal
  • *KC Cyan
  • *KM Magenta
  • *KK Random

Currently, due to some hard coded behavior in X3TC, colors are working
differently between incoming messages/log book, and the rest of X3TC UI. You can
still use the color tags provided, but messages will be empty.


Customizing the internal default values:

Default name values for ships:
Those values are set as t id in the text id file 7955, as follow:
1080: Freighters
1081: Carriers
1082: Destroyers
1083: Bombers
1084: Fregates
1085: Corvettes
1086: All fighters
1087: Satellites
1088: Factories
You can change those default settings as you wish, in order to have
a proper list of name, in case something went wrong during your tests.


Note on dynamic renaming:

The dynamic renaming can be activated and deactivated using the AL menu (in Gameplay
menu, last option). This function is provided to help you with some expressions that can
change during your play time, like sector names, skill levels...
Also note that dynamic names are preponderant on any name you can enter manually.
Dynamic names must be cleared if you want to enter another static name, using *DN as name.


Credits:

Klyith wrote the original script
Gazz converted it to X3TC and added some commands
A big thank to both of them.

RSwE :: V 1.7

Changelog:

1.7
  • Added an expression to number ships in each sector (*SN)
  • Added a command to rename docked ship



Note for moders

This script use the Text file/Page ID 7955.
It also uses COMMAND_TYPE_GENERAL_21




Last edited by Loky77 on Tue, 9. Jun 09, 22:46; edited 6 times in total
Back to top
View user's profile Send private message
mostlikely





Joined: 30 Nov 2003
Posts: 157 on topic

Thank you for registering your game
PostPosted: Sun, 8. Feb 09, 23:33    Post subject: Reply with quote Print

X Plugin Manager says: 'This script is for X2: The Treath and might not work, Would you like to Continue?'

Is this for X3TC and X2?


[Edit]
Your script refers to: READTEX 7951 for colors. ($addstring = read text: page=7951 id=1102)
What script is this from?

Back to top
View user's profile Send private message Send e-mail
Loky77





Joined: 25 Jan 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Sun, 8. Feb 09, 23:53    Post subject: Reply with quote Print

It is for X3TC, but I made a mistake in the plug-in packager... Sorry, my bad Embarassed .
I put a new version of the script online.

Updated both Zip and SPK due to Text file ID error...

Back to top
View user's profile Send private message
mostlikely





Joined: 30 Nov 2003
Posts: 157 on topic

Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 00:40    Post subject: Reply with quote Print

It works like a charm. =D
Thank you very much!.

Back to top
View user's profile Send private message Send e-mail
russbo





Joined: 12 Nov 2005
Posts: 847 on topic
Location: Las Vegas
Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 08:09    Post subject: Reply with quote Print

What are the "internal default values?" And any suggestions for renaming ships that are docked (fighters in an M1)? And I'm assuming that if you run this universe wide, it will interfere with Lucike's CAG / EST scripts and their name changes?


_________________
www.russbo.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Loky77





Joined: 25 Jan 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 13:55    Post subject: Reply with quote Print

mostlikely wrote:
It works like a charm. =D
Thank you very much!.


You're welcome Wink

russbo wrote:
What are the "internal default values?" And any suggestions for renaming ships that are docked (fighters in an M1)? And I'm assuming that if you run this universe wide, it will interfere with Lucike's CAG / EST scripts and their name changes?

The internal default values are the values I defined in the text file ID. They are not necessarily the best for everyone, that's why I choose to externalize those values in the file. If you want to customize your default M1 names, look for the line <t id="1081"> in the file 7955-044.xml , and enter your own value. The classes are described at the end of the 1st post.
The little trick is that All fighters includes M5, M4 and M3. They are not separate.

To rename docked ships I only see 2 ways at the moment:
- The universe wide renaming
- Launch the command on each ship, but this will interrupt the current command, and probably undock the ship as well.
I'm going to find a way to do this without so much drawbacks. It is probably safe to say I can launch a command on a Carrier/Station, to rename docked ships without breaking all the current code.
Thank you for the suggestion! Wink Idea

Concerning CAG/EST, I'm not using them, so I can't say how much it will interfere. They will be renamed when you launch the command, for sure. Now, to say if it will break something in Lucike's code... I have to spend some time to check CAG and EST code.

Back to top
View user's profile Send private message
fishman99





Joined: 25 Dec 2007
Posts: 13 on topic

Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 14:06    Post subject: Reply with quote Print

Wow, this kicks ass.

Quick request: Is it possible for there to be an option to number them just within their sector. I'm trying to rename all my satellites and instead of giving them all unique numbers, which doesn't help really, I'd much prefer something along the lines of "Satellite 1; Satellite 2...", and have some of those in each sector. Is that possible?

Back to top
View user's profile Send private message
Loky77





Joined: 25 Jan 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 15:29    Post subject: Reply with quote Print

I can try to put an option to do this. It may be a little tricky, but should be feasible.

Until then *NN and *ZN number from 1 all the ships/stations/satellites concerned by the command. So, if you do this sector by sector with those expressions, they will be always renamed from 1 to the number of satellites in the sector. If you have some of them in a lot of sectors, it will be fastidious though...

Back to top
View user's profile Send private message
fishman99





Joined: 25 Dec 2007
Posts: 13 on topic

Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 17:22    Post subject: Reply with quote Print

Unfortunatly doing that for every sector might be a bit too much effort: I've used this and it means I have them in EVERY sector in the game now. And it would be nice to have them all numbered if only so I don't have a million "Your Advanced Satellites" everywhere.

Anyway, thanks Loky and good luck with that Very Happy

Back to top
View user's profile Send private message
Loky77





Joined: 25 Jan 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 23:39    Post subject: Reply with quote Print

I just added the expression to rename ship inside sectors with a new counter for each sector, and the the option to rename docked ships.

Enjoy! Wink

Back to top
View user's profile Send private message
fishman99





Joined: 25 Dec 2007
Posts: 13 on topic

Thank you for registering your game
PostPosted: Wed, 11. Feb 09, 15:31    Post subject: Reply with quote Print

Thank you so much for that! You're my hero, Loky Mr. Green

Back to top
View user's profile Send private message
dcarver





Joined: 10 Jul 2005
Posts: 87 on topic
Location: Washington, USA
Thank you for registering your game
PostPosted: Mon, 16. Feb 09, 03:36    Post subject: Reply with quote Print

Thanks for doing this! Having the classes of ships color coded is soooo much better.

Couple requests...

1. Can you separate TS and TP?

2. Can I use the menus to select sector/ships and use the default scheme (the one in the 7955-L044.xml) instead of having to type it in? If it doesn't give it a unique number no biggie. Also, Maybe I did something wrong, if I use the clipboard to specify color/number then it just gets the actual text like: *KG*CL *TS...

Thanks again.

Back to top
View user's profile Send private message
Loky77





Joined: 25 Jan 2009
Posts: 110 on topic

Thank you for registering your game
PostPosted: Mon, 16. Feb 09, 10:20    Post subject: Reply with quote Print

@fishman99: I'm pleased this script meets your needs Smile

@dcarver: Yup, having the name with our own color is nice. It is a bit painful we can't have the message board working with them Sad. I seriously hope we will have some improvement on that issue soon. (<- please! pretty please all mighty developers!! With sugar on top! Mr. Green !)

To answer your questions:
1. I can add them, sure. I just regrouped them using the class "Freighters" because the "Pirate TS" are not considered when using "TS", which may confuse the user.

2. At the moment, the default renaming is just a way to rename all your ships. I can add another sub menu to select which class will be renamed. It is not a big deal, as the renaming part is done in a single script, the other being only a way to organize the renaming (finding the whole formation, retrieving some specific information...). I'll do something around this suggestion too Smile
Concerning the clipboard issue: I'm a bit confused here... If you edit a clipboard, you should see in the menu the naming scheme, with the coded expressions. Then, you will be able to use those clipboards when renaming the ships using the expression *Y1 to *Y9, and see the actual expanded expressions.
for instance:
1. Put *KG*FP *FI*KX in the clipboard 1
2. Put *KM*TS*KX in the clipboard 2
3. You should see *KG*FP *FN*KX on the clipboard 1 line and *KM*TS*KX on the clipboard 2 line
4. Rename a formation using *Y1 *Y2
5. The formation should be renamed with the type of ship in magenta, then its formation name + its position in this formation in green.

I will do further testing tonight to be sure it still works correctly.

Note that when the script find a * in the scheme, it uses the following 2 chars to search for existing expression. If a star is not part of an expression, another expression should not be used in the following 2 chars.
For instance:
*My *TN is a trader level * *TH* is valid and will give something like *My Vulture is a trader level * 12*.
*My *TN is a trader level **TH* will give something like *My Vulture is a trader level **TH*

Back to top
View user's profile Send private message
moggy2



MEDALMEDAL

Joined: 06 Nov 2002
Posts: 4588 on topic
Location: Montréal
Thank you for registering your game
PostPosted: Tue, 28. Apr 09, 21:05    Post subject: Reply with quote Print

this is pretty slick.

It'd be nice if you could target a single wing or formation for renaming. I know I can fudge it by having only that group in a sector, but it would be nicer if I could just select them.

Could also do with an expression for adding the wing name


_________________

RSS Feed : Submit News Article : Download Scripts : Image Galleries
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Belgarath



MEDAL

Joined: 06 Nov 2002
Posts: 293 on topic
Location: Playing something
Thank you for registering your game
PostPosted: Sun, 31. May 09, 07:31    Post subject: Reply with quote Print

I'm unable to download this file from filefront. I don't know why, but the link just takes me to the filefront homepage. Is it possibly hosted elsewhere? If not, would it be possible to email the file to me. I would appreciate it.

Bel

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3, 4, 5, 6, 7  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Fri, 20. Oct 17, 00:02

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.73965 seconds, sql queries = 29