[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

Larxyz
Posts: 262
Joined: Tue, 16. Nov 04, 08:46
x3tc

Post by Larxyz »

Thank you for adding another color!! :)
were running out of colors in different wings *grin*

love your mod! again thanks!
Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 »

I just name all universal traders *DN *Y02, which comes out to *DN, Color Blue, Trader level, Abbreviated Name, Number, Greek letter.

They're updated every minute on what trade level they are, they have a unique color so I know if a ship is an automated trader instantly and they have a number and symbol for easy memorization. I can then tell universal traders sharing the same sector apart very easily with this.

I've found it's the most I could fit without adding too much clutter for my preferences. I do all this renaming when I buy them. Buy 3 mistrals, tell them to head to Company Pride then use RSwE on all freighters in that sector. Easy :)
Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 »

I'm running XRM now and Rename all ships in Sector doesn't work right. Rather true to its name actually. It renames everything in the sector whether I select freighter or satellite or any option.
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

Probe1 wrote:I'm running XRM now and Rename all ships in Sector doesn't work right. Rather true to its name actually. It renames everything in the sector whether I select freighter or satellite or any option.
paulwheeler wrote:The X3 Rebalance Mod (XRM) is a total conversion mod of X3 Terran Conflict.
A total conversation means its totally messing with X3.
Never had complains about RSwE wasn't working correctly,
with such a mod so I never looked into these,
but i suspect XRM changes the Ship classes and so RSwE
can't recognize them, meaning renaming all.
Have to run some tests to adjust RSwE.

Edit: XRM is guiltless, this is a bug which i produced,
but it will be fixed in the next version

Greetings Medevel
Last edited by Medevel on Wed, 1. Feb 12, 17:06, edited 1 time in total.
Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 »

Issue- latest release
[ external image ]

This mistral universal trader is being written as a Local Trader. I have repeatedly tried to correct the behavior by deactivating the trader and renaming him using all methods (name all freighters in universe, in sector, name ship with command, et cetera). Still he persists on being labeled erroneously as a LT instead of a UT.

In relation to trading I have MK3 Optimization (TC/AP) by Gnasirator and black list manager installed. Still running XRM.

Gnasirators script does rename traders as Mk3 Trader when sector/universal trader is turned on however your script overwrites it. I've run both scripts concurrently since I first posted in this thread and only now this problem has occured.

I believe it's sorted itself out after uninstalling the script manually and installing the SPK version instead! :)
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

Well it should be obvious, that if you rename a ship with one script
and then with an other script, that the ship has the name of the later
script.
To handle that i enhanced *ON to make it read out the previous name,
so if it was changed in the meantime it will use that.
example.
random-renaming-script-other-than-RSwE renames the ship
Trader 7
and RSwE should add the freigth *CU so we use
*DN*ON *CU
that means RWsE when ON is in the name, RSwE checks if
the ships was renamed since last RSwE-rename process, so if
is the case, then it uses that name, in our example after some
time the ship should be called something like
Trader 7 300 EC

the LT problem i must look up this other script, but i suggest it uses
a different script for the UT-Trader and so it won't get recognized,
maybe i will play with the get-action command to make it a bit more
bullet-proof.
Edit: after looking into gnasirator's script i saw he is only
using 'plugin.autotrade.local' for all traders that means,
my trader detection is useless when his script is installed:

Code: Select all

      $temp = $currentship->is script 'plugin.autotrade.sector' on stack of task=0
      if $temp 
        $temp = $currentship->get local variable: name='experience'
        $addvar = 'ST ' + $temp 
      end
      $temp = $currentship->is script 'plugin.autotrade.local' on stack of task=0
      if $temp 
        $temp = $currentship->get local variable: name='experience'
        $addvar = 'LT ' + $temp 
      end
      $temp = $currentship->is script 'plugin.autotrade.galaxy' on stack of task=0
      if $temp 
        $temp = $currentship->get local variable: name='experience'
        $addvar = 'UT ' + $temp 
      end
since his traders are running on plugin.autotrade.local all traders,
are detected as Local Trader by RSwE.
i wrote a message to gnasirator about how to possible solve this
problem and now i am waiting for his answer.

Edit 2: RSwE renames all ships in sector instead
of just the class is a bug which i produced and has nothing to do
with XRM, and it will be fixed in the next version.

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

Post by Medevel »

Hey guys,
fixed some bugs lately, and added some stuff
changes in version 2.4
  • fixed *HB to execlude the Sector name
  • fixed Headquarter to be renamed to HQ instead of He
    and removed a restriction that Headquarters wasn't renamed
  • added a new option to the menu "Rename Target"
  • added a new Hotkey for the "Rename Target"
  • added file plugin.rswe.target.xml for the "Rename Target"-function
  • rewritten the menu a bit hope you like the changes
  • renamed the Hotkeys to unify them
    there can happen to occur an error, and so all RSwE Hotkeys gets deleted
    you will get an Salvage Insurance and a message to save and reload
    the new save, Just do so and everything should work fine again
    the error happens when X3 gives some of the hotkeys the same ID
    which results that one of the hotkey will overwrite with the
    other so the overwritten hotkey will be gone.
    i found no way to prevent this problem, and it happend only in 2
    out of 10 saves, so i deleted all RSwE hotkey, gave the player
    an salvage insurance, and send him the message to save and reload.
    on the reload X3 should set the hotkey which different id's
    and everything should be fine, sorry for that,
  • fixed a bug where everything in a sector was renamed
    regardless the class you choose with
    Rename ships in sector
  • added some level indicator to *TH
    *TH now supports the Sector/Universe Trader Levels
    Gnasirator's script MK3 Optimization Reloaded
  • added *TR
    which adds the trader range of the Local/Sector Trader
    (only works with MK3 Optimization Reloaded by gnasirator)
Hope you like it and as always let me know if you encounter any Bugs,error or problems
Greetings Medevel
Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 »

It sounds fantastic. After uninstall/reinstalling the script I renamed all freighters and.. initially 2 out of 6 level 25 UTs were named LT. BUT after repeating the process (*DN to blank them, *DN *Y02; all set) they were listed accurately and now all 6 of my current level 25 UTs are correctly displayed.

So it looks fantastic too :)

I'll post again in 24 hours to let you know if it's still buttery
(edit- btw thank you for all your hard work :) )
wga
Posts: 34
Joined: Thu, 19. Feb 09, 15:04

Post by wga »

Trying v.2.4 ...

Some ploblem
1. With no homebase, *HB will display as 'Unknown Object', how about just ""
2. It seems that 'Rename all ships with RSwE defaults' working with previous defaults. Try to edit dafaults, but only get previous edited working.

And...

*DN is much powerful than I think, as the example with *ON, and the new "Rename Target", it really cool to do rename task. I still trying to get more familiar with RWsE.

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

Post by Medevel »

wga wrote:1. With no homebase, *HB will display as 'Unknown Object', how about just ""
2. It seems that 'Rename all ships with RSwE defaults' working with previous defaults. Try to edit dafaults, but only get previous edited working.
thanks for reply,
the first error is something i produced i just checked on the ship that have a
homebase but didnt checkt the one without, as i read this lines, i directly
saw the problem so will be fixed fast :)
to the second problem i must look into these, where the problem is,
so this might take some longer,

Greetings Medevel
Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 »

Nope, my UT 25s are still being renamed LT 25. It's a bummer but since I used Gnasirator's script MK3 Optimization Reloaded and your script together in vanilla without issue I think it may be XRM (which shouldn't be your problem).

I'll just adjust. It's not as neat and orderly but after all, I know those LTs are in fact UTs :D
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

Probe1 wrote:Nope, my UT 25s are still being renamed LT 25. It's a bummer but since I used Gnasirator's script MK3 Optimization Reloaded and your script together in vanilla without issue I think it may be XRM (which shouldn't be your problem).
hmm guess i have to look into XRM again thought it wouldn't be the problem
but seems it still produce some problems.
BUT nevertheless i made some big mistake in v2.4, which results that,
some renaming function did not work at all so everyone please update to
2.5 if you downloaded 2.4.
changes in v.2.5
  • fixed *HB "Unknown Object"-bug
  • fixed a bug where some rename options won't be processed
Greetings Medevel
Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 »

I dunno, XRM doesn't mess with Mk3 software traders so I think there's just something peculiar about my game. I think you should only look into it if you have a lot of free time I think this is going to be one of those meh who knows instances
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

Hmm must be something with your save game, maybe a bit corrupt or some
other mod/script is messing with the MK3 traders, i installed XRM and MK3
optimization, created 30 TS, 10 ST, 10 LT, 10UT, and everything worked fine.
So i exclude XRM from possible suspects, again :)

Greetings Medevel
wga
Posts: 34
Joined: Thu, 19. Feb 09, 15:04

Post by wga »

Trying 2.5 ...

*TH now will not show the level for CAG, CLS .... huh, I don't install XRM, MK3 Optimization.
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

wga wrote:Trying 2.5 ...
*TH now will not show the level for CAG, CLS .... huh, I don't install XRM, MK3 Optimization.
Sorry about that i just looked at the code and it seems i deleted the
level-readout line, will be fixed as soon i got time to upload it.
Edit: 2.6 is up, it adds only a fix for that bug!

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

RSwE Beta

Post by Medevel »

Hey Guys
Edit:
this was the beta version post but since 2.7 the beta is outdated,
and so i removed it :)
Greetings Medevel
Last edited by Medevel on Wed, 14. Mar 12, 10:05, edited 2 times in total.
Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 »

Downloading now. You should really try Mediafire. Free uploading and none of the ads and wait for download business. (example- http://www.mediafire.com/?n32xv6nq1rf252n boom spk one click done instant gratification headshot ;) )
Medevel
Posts: 106
Joined: Thu, 17. Jun 04, 14:40
x3tc

Post by Medevel »

Probe1 wrote:Downloading now. You should really try Mediafire. Free uploading and none of the ads and wait for download business. (example- http://www.mediafire.com/?n32xv6nq1rf252n boom spk one click done instant gratification headshot ;) )
yes mediafire is quite nice, and free, but it is too simple, i can't edit
a descriptions, and the folder view is quite plain.
On the other hand i never said, you should download from 4shared,
thats why i am offering both sites, while 4shared offers me some
more customizations and a professional look'n'feel, mediafire offers
direct and simple up/download. nice would be a site that offers both but
i lack to find one :)
BTW Probe1 did your LU/UT problem solve? if not have you downloaded
the newest version of the MK3 Optimization? v.1.2.2 of gnasirators
script just adds the compatibility to RSwE with updating the
global version number, sothat RSwE can detect his script.

Greetings Medevel
Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 »

Yes, it worked itself out when I removed the number, greek notation from my renaming command. As long as they're plain old *DN *TH then they work accurately.

God knows why. :)

My initial thoughts are the colored menus are fine and you should reverse the order on renaming

>Insert Text
>Insert Expression
>Move Carrat
> Delete

It's only my initial thoughts; I'll check back in later to let you know.

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