[SCRIPT: Upd 09/02] Rename ships with Expression 1.7 (RSwE) New links

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

kissmejulie
Posts: 6
Joined: Wed, 6. Jan 10, 18:12

Post by kissmejulie » Thu, 14. Jan 10, 15:42

Is it possible to add wing color to the name scheme?

kraznyi_oktjabr
Posts: 2
Joined: Wed, 26. May 04, 09:58
x2

Post by kraznyi_oktjabr » Mon, 10. May 10, 22:39

Hi!

Is there version available for X3R? I tried from X3R - scripts and modding but unfortunately links were not functioning. They were for version 1.4 don't know if that is latest.

Thanks in advance!

Tim

bolgimo
Posts: 20
Joined: Thu, 3. Jun 10, 08:21

Post by bolgimo » Thu, 3. Jun 10, 08:31

this puts the full sector race owner and sector name in format Race.Sector, useful for automatically keeping satellites up to date with *DN*NV *SQ when using conflicts or other sector takeover mods

Code: Select all

   else if $part == '*SQ' 
      $sector = $currentship->get sector
      $sector.race = $sector->get owner race
      $addstring = sprintf: fmt='%s.%s', $sector.race, $sector, null, null, null
the automatic incrementing numbers *FN *NN *ZN aren't working as of X3TC v2.7. *NN sets all ships to "1" every time, *FN sets all to " 001", *ZN sets all to "null001". not sure why just yet. here's a quick hack to just get the last number off the ship's ID code instead:

Code: Select all

   else if $part == '*IS' 
      $temp = $currentship->get ID code
      $addvar = get substring of $temp offset=6 length=2
also I can confirm using expressions stored in clipboards isn't working as of X3TCv2.7. eg setting clipboard 1 as "*CL *TS *NN", then setting ship name to *Y1, has the effect of actually naming the ship with the string "*CL *TS *NN".

bolgimo
Posts: 20
Joined: Thu, 3. Jun 10, 08:21

Post by bolgimo » Thu, 3. Jun 10, 20:00

corbosman wrote:im having a bit of a problem with this plugin. It seems some ships are now stuck with their name. No matter what expression I use, it doesnt change. All I can do is change the name manually in game.

Last expression I used was:

*DN*TN - *CL (*SC)
from what i understand so far, dynamic names appears to work like this
1. if the script picks up *DN at the start, the name doesn't change immediately; instead the script saves the string and adds a property 'RSWe.DN' = 'string' to the ship object
2. every time the AL script fires it grabs all of your ships, sorts through the ones that have 'RSWe.DN' = something, and then sends them to the rename tool script to rename them

so if you set a dynamic name on a ship, you can't remove it, and it'll keep renaming the script no matter what you do unless you kill the AL plugin.

i made a quick fix for this by just adding some lines to recognise *RN instead of *DN at the start of the string, this nulls the ship 'RSWe.DN' property and appears to work.

added the below to plugin.loky.rswe.tool:36 as an elseif to the if $prefix == '*DN' condition

Code: Select all

  * delete dynamic values
else if $prefix == '*RN' 
  $currentship->set local variable: name='RSWe.DN' value=null
  $suffix.length = $length - 3 
  $namestring = get substring of $namestring offset=3 length=$suffix.length
use it the same way you would to make a name through rswe ie. *RN*CL *TS *NN, it'll remove the property from the ship and carry on with the rest of the script to name it

after this is done you can name it manually or with rswe again and the AL will leave it alone

nairax
Posts: 5
Joined: Fri, 23. Jul 10, 08:47

Post by nairax » Sat, 24. Jul 10, 02:29

Edit2: I'm just going to include some things that I would really like to see. I hope it's possible :)

1. *PN - Pilot Name
2. Name by specific class when doing universe/sector-wide rename (TS/TL/TP, etc) - I don't want my TSes named the same as my TPs
3. Issuing the 'rename' command does not interrupt the order of the ship giving the command
4. Some sort of menu that lets you set up saved name schemes, so I can just do *S1 for example and it will recall the saved scheme
5. Saved increments based on the number of ships with the same increment. Example: *N1 would count up all the ships with the *N1 parameter, add 1 to it, then assign it to my ship. Usage: If I get a new transport, I could just hit *N1 instead of having to rename all of them to use *NN. This would be really neat so I could have my TSes share numbers with my M6s, for example (separate numbering schemes if I wanted). You'd have to "unallocate" all ships currently applying this scheme first so that it wouldn't increment forever
6. Fix "unknown ship" announcements
7. Autonaming schemes - primarily for satellites

I really like the options that are already here, too.

Theutus
Posts: 15
Joined: Sat, 14. Mar 09, 22:27
x3tc

Post by Theutus » Tue, 19. Oct 10, 14:04

I love this! Please excuse my ignorance, but I only see the option to rename sector/ universe when I access my property commands... where do I type in the specific identifiers like *TN etc...? I see no clipboard option. Thanks again, sorry for my newbieness!

Theutus
Posts: 15
Joined: Sat, 14. Mar 09, 22:27
x3tc

Post by Theutus » Wed, 20. Oct 10, 14:49

bah, I'm an idiot! I had the old version.

tamtam77
Posts: 31
Joined: Fri, 17. Apr 09, 09:21

Post by tamtam77 » Sun, 28. Nov 10, 21:37

Hi. I don't know if it is a bug.

I put an entry into clipboard

*CL *TN

and trying to rename the ship with call *Y1 , getting *CL *TN in my ships name.

tamtam77
Posts: 31
Joined: Fri, 17. Apr 09, 09:21

Post by tamtam77 » Mon, 29. Nov 10, 17:54

Script is Dead i guess. (

Mochida204
Posts: 6
Joined: Thu, 18. Nov 10, 08:01

Post by Mochida204 » Thu, 16. Dec 10, 22:08

I kinda fix the undefined $Wing bug in a dumb way
cause it seems empty strings are not allowed in script editor

and I'm interested in fix some bugs in this script (but I'm lazy lol)
what should I do to update this script???

btw, I'm rather new to both X3 and scripts :lol:

Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel » Wed, 22. Dec 10, 11:14

Sorry Guys wasnt here for a long time.
Now I came back for X3TC 3.0 and still Loky didnt update his Scripts since ... well long ago :D.
So i looked into the Scripts and fixed some Bugs you can read them in the new Readme:

Readme: Link
Mirror: Link

With X3TC patch 3.1 the color bug was fixed so i recommend to upgrade to 3.1 from
http://www.egosoft.com/download/x3tc/patches_en.php
or your favourite site :D

BTW: Guys from Egosoft :thumb_up: BIG thanks :thumb_up:

--new version 1.7g 09/22/2011--

Folder : Link
Mirror : Link

if this link doesnt work here are the files extra

Spk: Link
Mirror: Link

7z: Link
Mirror: Link

and if you cant do anything with these files
Zip: Link
Mirror: Link

Have fun with renaming your fleet :D

Greetings Medevel
Last edited by Medevel on Thu, 22. Sep 11, 15:46, edited 10 times in total.

tamtam77
Posts: 31
Joined: Fri, 17. Apr 09, 09:21

Post by tamtam77 » Wed, 22. Dec 10, 12:40

Thank you soooo much!

Mochida204
Posts: 6
Joined: Thu, 18. Nov 10, 08:01

Post by Mochida204 » Sat, 25. Dec 10, 10:41

Great work!!! give another reason to be lazy XD

tamtam77
Posts: 31
Joined: Fri, 17. Apr 09, 09:21

Post by tamtam77 » Sat, 25. Dec 10, 11:13

Hi. Script became more buggy. I rename with exp: ( *CL ) - *TN - *NN (Sil to HUB) and == ( TS ) - Mistral Super - - 1 (Sil to HUB)1

Something like that. Last version without "a" was giving me an extra space before *NN.

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Sat, 25. Dec 10, 16:37

I've made a temporary fix for the blank messages bug.
Soon I'll have a better fix made into a library that converts the colors and sends colored messages/questions.

Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel » Sat, 25. Dec 10, 16:53

@tamtam77 Thanks for pointing me into this error i fixed it directly today
above you can DL the version 1.7b

@h2o.AvA Thanks for that info i will look it up when i am back from my cristmas holidays. I am looking forward that your fix can solve the blank message bug from the original scripts.

Have nice Cristmas and a happy new year See You 2011
Medevel

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Sat, 25. Dec 10, 18:33

Sadly it isn't a fix we can implement.
It must be placed in the script sending the message.

Topchris
Posts: 17
Joined: Fri, 13. Jan 06, 15:17

Post by Topchris » Sun, 27. Feb 11, 14:55

Soo... this script is dead?

Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel » Sun, 27. Feb 11, 15:28

I wont say its dead ,just unsupported and possible buggy :)
Yes it seems Loky isnt supporting the script atm, but that doesnt mean its dead.
The version i provided is working fine for me and since Egosoft fixed the color bug in patch X3TC 3.1, i experienced no bugs with colors anymore.
There is still some "null"-bugs but i am looking into it atm.

Like i said its working for me and i provided a download with my fixed version here or scroll some posts up 8).

Greetings Medevel

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Sun, 27. Feb 11, 16:41

Topchris wrote:Soo... this script is dead?
Not sure what you mean by "dead" it works just as intended for me. I cant tell you how happy it makes me to finally be able to color my ship/station names now that 3.1 fixes the coilor bug! And btw thanks Medevel for your "fixes"

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”