[SCRIPT] Rename ships with Expression 3.4.1 (RSwE) X3:TC/AP Compatible [11/01/2015]

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

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

t-master
Posts: 200
Joined: Fri, 21. Apr 06, 10:40
x3tc

Post by t-master »

Unfortunately *TH still doesn't work with MK3 Optimized
My primitive little debugging tricks tell me that autotrade.galaxy.version is still 24.20 even with that script installed ;)
My tipp would be to remove support for Mk3 Optimized pre 1.5 und just check whether plugin.autotrade.main is running (optimized) or not (normal)

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

Post by Medevel »

t-master wrote:Unfortunately *TH still doesn't work with MK3 Optimized
My primitive little debugging tricks tell me that autotrade.galaxy.version is still 24.20 even with that script installed ;)
My tipp would be to remove support for Mk3 Optimized pre 1.5 und just check whether plugin.autotrade.main is running (optimized) or not (normal)
Greetings
Tobi
yeah when i first read your post i though wtf i tested this, so i went down
and tested it again.
In my test save it worked, so i started a new game and it worked not.
The reason was that gnasirator changed the variable-name which contains
the version number when he rewrote his script, but assumed he wouldn't,
infact i didn't check, so shame on me :).
but in my test save the old variable was still there, cause it ran before with
the pre 1.5.0 version of the script, so it worked, but in the new start it
wasn't, so it didn't worked.
so here is the new version
changes in version v.2.9
  • changed *TH to add a leading zero for ST/LT/UT level below 10 for sorting
  • added *TM
    Trader Mission like *TH just without Level so ST LT UT
  • added *WI
    Adds the wing and colors the wing name
  • fixed *TH/*TM Mk3 Optimizer Reloaded support for version 1.5.0+
  • fixed a problem where the AL-Plugin for Dynamic naming
    was not loaded on new start
Greeting Medevel
Rikaelus
Posts: 233
Joined: Tue, 29. Nov 05, 04:03
x3

Post by Rikaelus »

Medevel wrote:
t-master wrote:Unfortunately *TH still doesn't work with MK3 Optimized
My primitive little debugging tricks tell me that autotrade.galaxy.version is still 24.20 even with that script installed ;)
My tipp would be to remove support for Mk3 Optimized pre 1.5 und just check whether plugin.autotrade.main is running (optimized) or not (normal)
Greetings
Tobi
yeah when i first read your post i though wtf i tested this, so i went down
and tested it again.
In my test save it worked, so i started a new game and it worked not.
The reason was that gnasirator changed the variable-name which contains
the version number when he rewrote his script, but assumed he wouldn't,
infact i didn't check, so shame on me :).
but in my test save the old variable was still there, cause it ran before with
the pre 1.5.0 version of the script, so it worked, but in the new start it
wasn't, so it didn't worked.
so here is the new version
changes in version v.2.9
  • changed *TH to add a leading zero for ST/LT/UT level below 10 for sorting
  • added *TM
    Trader Mission like *TH just without Level so ST LT UT
  • added *WI
    Adds the wing and colors the wing name
  • fixed *TH/*TM Mk3 Optimizer Reloaded support for version 1.5.0+
  • fixed a problem where the AL-Plugin for Dynamic naming
    was not loaded on new start
Greeting Medevel
Cool, going to try out *WI. I'm not sure I'll continue using this for my traders, but it's definitely still nice for bulk-naming huge wings of fighters.
eben
Posts: 23
Joined: Thu, 18. Dec 03, 00:59
x4

No AL plugin

Post by eben »

Hey there Medevel,

Great job with this addon here. I loved it in X3:R and I'm loving it with TC and AP, thanks to you.

Alas I have a problem!

Tle AL plugin option is not appearing in the AL settings menu.

I'm using the add on with X3:AP fully updated. And I used crycrows latest manager to install it.
Everythingelse is working I can use all the features but since there is no AL plugin I cannot utilize the Dynamic Naming which is killing me.

I'll be obliged if you can help out here.
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Re: No AL plugin

Post by Medevel »

eben wrote:Tle AL plugin option is not appearing in the AL settings menu.
I'm using the add on with X3:AP fully updated. And I used crycrows latest manager to install it.
Everythingelse is working I can use all the features but since there is no AL plugin I cannot utilize the Dynamic Naming which is killing me.
I'll be obliged if you can help out here.
Hmm seems strange i am running currently some tests but so far
no error, so lets make some Troubleshooting:
1. Do you have the Scripteditor activated in your gamesave?
(no the scripteditor is not necessary but usefull for troubleshooting)
2. this gamesave never run RSwE before, so either new start or cleansave?

so either way please activate the script editor

Code: Select all

enter the menu to change your pilot's name
type Thereshallbewings (note the capital T) and press enter
the menu will close, your player name will NOT have been changed, and a confirmation beep will sound on correct activation
you will now find the "Script Editor" menu item in the command console
then open it
and you should see a huge list of script looking like this

Code: Select all

<New Script>
al.gamedata.main                   V 3        Main AL Plugin for ......
in this list there should be 3 scripts at the top of the list
al.plugin.rswe
al.rswe.events
al.rswe.main
if one or more of these scripts are missing it seems your download
was corrupted and i advise to redownload and reinstall RSwE,
if this don't help, tell me and i will reupload the files in case
something went wrong while uploading.
if these 3 scripts are present in the list, try running al.plugin.rswe,
(hover over it with the mouse and press "R", and select your playership
in the next prompt), this should run the AL initializing script
and the RSwE AL-plugin should be active.

hope this will solve your problem if not please let me know
Greetings Medevel
eben
Posts: 23
Joined: Thu, 18. Dec 03, 00:59
x4

Post by eben »

Thanks for the tips.

I did not activate the Script editor but will do so and check the al scripts.

And to answer your other question, this was a clean Start not even a save. And I've also checked the AL scripts in your addon if they were present in the game folders and they exist and can be opened so no corruption is evident.

Will let you know after I checked with the in game script editor.
eben
Posts: 23
Joined: Thu, 18. Dec 03, 00:59
x4

Post by eben »

Hmmm activated the script editor and al.plugin.rswe is missing in the list, but what's strange is, it is present in the scripts folder. Stranger still I've checked with the X3Editor2 and the VS reads the script's name as al.rswe (plugin part missing). Looking into it now.
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

This looks like there was some, error while unpacking the spk file.
have you tried redownloading and reinstalling?
if you know how you could also try to repair the scriptfile but it can
produce more errors than it could solve :)
Medevel
eben
Posts: 23
Joined: Thu, 18. Dec 03, 00:59
x4

Post by eben »

Ok final report:

The script with the "plugin" part missing I metioned in the previous post was not the al.rswe.plugin but seems to be al.rswe.main.

I also had your script running in the TC version of the game so X3editor2 VFS was gathering the rest from TC folder. After I uninstalled it the editor now cannot find any of the al scripts at all except the missread al.rswe (which is actually al.rswe.main)

I also tried reinstalling your plugin with Crycrows manager. The scripts are where they should be (.../addon/scripts/) so is the t file but neither the game engine nor the X3editor2's VFS is seeing them. The files do not seem to be corrupted as they can be opened by any text editor and I use notepad++ which tells me the xml markup is intact as well.

So either the manager is screwing up the installation somehow or the plugin has a problem with X3AP in it's latest incarnation (v2.8)

Previous versions worked well so I suggest you check with your latest version and crycrow's latest manager lite (v1.41).
eben
Posts: 23
Joined: Thu, 18. Dec 03, 00:59
x4

Post by eben »

Medevel wrote:This looks like there was some, error while unpacking the spk file.
have you tried redownloading and reinstalling?
if you know how you could also try to repair the scriptfile but it can
produce more errors than it could solve :)
Medevel
Ah ok I redownloaded it. Looks like you've updated to v2.9 and it works fine now. I'm sorry to have raised false alarm. Looks like the problem was with v2.8.

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

Post by Medevel »

Ah puh...
its always stressful if one user complains about an error,
you simply can't reproduce or find, i already downloaded
my own file to step in your shoes and still nothing.
But since it solved when redownloading i can breath freely
again.
but this way i also find out that 4shared doesn't allow, non
registered to download my files. have to find an other mirror,
still mediafire works flawless.

Greetings Medevel
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

Hi Medevel why won't the following combination work:

*DN *TM *ZN - *TN *TH

I'm trying to get your scripts to dynamically rename my traders like:

UT 01 - Mistral UT 20 or similar.
Still life in the old dog yet...
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

Vayde wrote:Hi Medevel why won't the following combination work:
*DN *TM *ZN - *TN *TH
I'm trying to get your scripts to dynamically rename my traders like:
UT 01 - Mistral UT 20 or similar.
Hey Vayde,
I am not quite sure where the problem is so i start shooting into the blue.
first the Expression

Code: Select all

*DN*TM *ZN - *TN *TH
translated to

Code: Select all

UT 1 - Mistral UT 25
in my test, so your Epression you mentioned will provide the result
your aimed.
(you will notice that there is no zero before the 1, thats because it was
only tested on one ship, if the number of ships you renamed with that
expression exceeds 9, a zero will be added for number one to nine.)
Since you are writing in the forum means you had some problems,
first possibility:
you just remaned your Mistral with the ingame renaming method
ship -> advanced -> change name
this is currently not working, i am to find out a way to read out this,
while keeping it light on the recources.
so use the custom menu to rename the ship
ship -> commands -> custom -> Rename Ships ...
second possibility:
The Rename Ships... command is not listed in the costum menu
It seems either the install was not correctly or your save game does
not been flagged ***modified***,
There different methods to flag your save ***modified***,
the easiest way is to activate the Script Editor by renaming
your Pilot Name to "Thereshallbewings" without quotation marks

If i haven't mentioned your problem can you please, give me some
more details, like which game version you use and where exactly
the problem is.

Greetings Medevel
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

Hi again, using that sequence only gives me 1 - Mistral.

I have mk3 optimised 1.7.7 and my game is showing modified.

I'll have another attempt later as that first sequence I though of was not thought out, if you catch my drift.
Still life in the old dog yet...
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

i am using v1.7.0 of mk3 optimiser, and it was working for me.
hmm did gnasirator change his code again, man will test it tomorow.
btw before i brew over the code with a headache, does this trader still
work as UT, i had one time that someone complained it was not shown
correctly, but his trader was idle :)

Greetings Medevel
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

MK3 optimised is at version 1.7.7 at the moment and I'm running some stress tests on it to see if I can break it :)

I spent a fair bit of time getting to know your scripts last night and can see how the syntax works now. Although I can't get exactly what I want, I have produced a workaround that I'm pleased with.

Colour coding ST's, LT's and UT's makes them far easier to spot in the menu now :)

Thanks for a great set of scripts.
Still life in the old dog yet...
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

Hey vayde,
after some intense testing yesterday night, and some today morning,
I can say: there is nothing wrong with either RSwE or
Gnasirator's MK3 Optimizer.
BUT when i first updated from 1.7.0 to the most recent
1.7.7 of gnasirator's script, i had atfirst the same problem you had,
so i added some debug-code to check the variables, all were ok but the
name wasn't, so i got back to the trader and this Lazy SoB of a trader
was IDLE, so i send him again on trade-duty and
it all worked! Why it haven't worked before? No Idea!
So I reinstalled both scripts again, to be sure and it worked.
Then I did a clean reinstall(unistalling/deleting all RSwE and MK3Trader files)
and tested it again, and guess what it still worked.
So why it didn't worked right after updating is a little miracle for me,
so i suggest make a clean reinstall of both scripts and it should work.
If it doesn't work right on try stopping your traders and resend them
on trade-duty.
One last thing Gnasirator provides his code in .pck and in .xml files,
just make sure you have either .pck or .xml installed, i suspekt they
produce a conflict if both are installed. I have to ask gnasirator what
this hickup is about, but it should not be the source of this problem.
Edit:
Vayde wrote:MK3 optimised is at version 1.7.7 at the moment and I'm running some stress tests on it to see if I can break it :)
I spent a fair bit of time getting to know your scripts last night and can see how the syntax works now. Although I can't get exactly what I want, I have produced a workaround that I'm pleased with.
Colour coding ST's, LT's and UT's makes them far easier to spot in the menu now :)
Thanks for a great set of scripts.
if you tell me what exactly you want i can provide some help if it is possible :)
Greetings Medevel
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

My naming system for my freighters is as follows:

LT 01 R3 Empires Edge - Mercury SF (25)

This is broken down as:

LT - Ship Job

01 - Ship Number

R3 - Trade Range from start sector

Starting Sector

Ship Type

Trader Level

Using this method I can see at a glance, which areas of the universe I have covered and which I still need to do. Normally when my UT's reach 25 I put them on LT duty full time to minimise losses, however MK3 optimised has not lost a freighter yet to normal patrols. The occasional Q has downed 1 or 2 in the past though.

I have now switched to a new naming system using your scripts:

*DN*KB "Trader" *ZN *TN *TH for ST's
*DN*KC "Trader" *ZN *TN *TH for LT's
*DN*KM "Trader" *ZN *TN *TH for UT's

All's well in my world :)
Still life in the old dog yet...
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

Vayde wrote:My naming system for my freighters is as follows:
UT 01 R3 Empires Edge - Mercury SF (25)
This is broken down as:
UT - Ship Job
01 - Ship Number
R3 - Trade Range from start sector
Starting Sector
Ship Type
Trader Level
Using this method I can see at a glance, which areas of the universe I have covered and which I still need to do. Normally when my UT's reach 25 I put them on LT duty full time to minimise losses, however MK3 optimised has not lost a freighter yet to normal patrols. The occasional Q has downed 1 or 2 in the past though.
I have now switched to a new naming system using your scripts:
*DN*KB "Trader" *ZN *TN *TH for ST's
*DN*KC "Trader" *ZN *TN *TH for LT's
*DN*KM "Trader" *ZN *TN *TH for UT's
All's well in my world :)
The only things which is missing in RSwE, which prevents you from
using your initial naming sheme are "Starting Sector" and "Trader Level
without Trader Mission", after looking into gnasirator's code the "Starting
Sector" is save as HomeSector, but UT's they got no HomeSector.
And "Trader Level without Trader Mission" won't be a problem.

At the moment i am also thinking about a system for automatic coloring,
based on list for each color where you can add ships or classes or jobs.
Haven't giving it much thoughts :)

Greetings Medevel
Stormsorter
Posts: 3
Joined: Fri, 18. May 12, 20:31

Post by Stormsorter »

Loving it so far but one personal annoyance. So far all I have done is make one clipboard entry "*DN *KOCompany name" and ad it to the front of all defaults. I then used the rename all with defaults option. The first thing I noticed was whenever I got a new ship and used "rename selected ship/station with defaults" it would become number 1 instead of a new highest number for its class. Then when *DN updates the *ZN numbers for the class group they get mixed up. A simple example would be I have 5 TS's and get a new one, but instead of getting the #6 when DN updates it becomes #3 and the previous #3 becomes #6.

Would it be difficult to add a static number option that worked per class or even better per model or am I just overlooking one? Of course it would need a sister option to fill the lowest missing number with a new ship when one gets destroyed.

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