[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

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

Post by Medevel » Thu, 1. Nov 12, 11:49

it seems wordpad has some problems reading the logfile, don't know why,
i suppose wordpad is expecting an different encoding, so everything copied
from the logfile with wordpad could be corrupted(especially the greek letters appear wrong).

Edit: when opening the logfile with notepad++ you will encounter many black [ESC] but dont worry these are the same as \033
which is the Escape code from X used for example for colors.
which means in the T-file
[ESC]G is the same as \033G which both mean Green

greetings

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Post by Mycu » Thu, 1. Nov 12, 14:53

A new version of RSwE.... GREAT!!!
I'll try the *TL option on my next gaming session (tommorow) :)

Thank you Medevel for your brilliant work.

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Thu, 1. Nov 12, 16:28

Ok, I tried the following:


1 - Renamed the log08860.txt file to 8860-L044.xml

2 - Opened the log08860.txt file with notepad++ and saved it as 8860-L044.xml


In both cases I have got these errors:


[ external image ] - [ external image ]




It might be something that I am doing wrong. Just a thought, I have installed the spk version, could that make a difference?


Anyway, although it would be nice to be able to edit the clipboard in windows, the fact that I cannot do it does not lessen the excellence of your script, I really like it.
I do not want you to lose any sleep over it, I will keep trying to get it right.

I will stick the relevant section from the log text file, this one containing all the names that I have created in game and are working flawlessly, unless I paste them in the xml file.

I thank you for the script and for your support too.

<t id="2401"> </t>
<t id="2402"> </t>
<t id="2403">*KC <||| - *KB *ON *KC - *TS</t>
<t id="2404"> </t>
<t id="2405">*KC < - *KB *ON *KC - *TS</t>
<t id="2406">*KY /*G03\ VI - *KB *ON *KY - *TN</t>
<t id="2407">*KY *G03\/*G03 VII - </t>
<t id="2408"> </t>
<t id="2409"> </t>
<t id="2410"> </t>
<t id="2411">*KY ( I I I ) - *KO *ON *KY - *TS</t>
<t id="2412">*KO C.A.G. *KW - *ON - *KO *TA</t>
<t id="2413">*KO E.S.T. *KW - *ON - *KO *TA</t>
<t id="2414"> </t>
<t id="2415">*KO (-I-I-( *KW - *ON - *KO *TN</t>
<t id="2416">*KY \|=+=|/ *KW- *ON - *KY *TN</t>
<t id="2417"> </t>
<t id="2418"> </t>
<t id="2419"> </t>
<t id="2420"> </t>
<t id="2421"> </t>
<t id="2422"> </t>
<t id="2423">*KC <||| - *WI *KC "W*NN" - *TN</t>

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

Post by Medevel » Thu, 1. Nov 12, 17:42

Brinnie wrote:<t id="2401"> </t>
<t id="2402"> </t>
<t id="2403">*KC <||| - *KB *ON *KC - *TS</t>
<t id="2404"> </t>
<t id="2405">*KC < - *KB *ON *KC - *TS</t>
<t id="2406">*KY /*G03\ VI - *KB *ON *KY - *TN</t>
<t id="2407">*KY *G03\/*G03 VII - </t>
<t id="2408"> </t>
<t id="2409"> </t>
<t id="2410"> </t>
<t id="2411">*KY ( I I I ) - *KO *ON *KY - *TS</t>
<t id="2412">*KO C.A.G. *KW - *ON - *KO *TA</t>
<t id="2413">*KO E.S.T. *KW - *ON - *KO *TA</t>
<t id="2414"> </t>
<t id="2415">*KO (-I-I-( *KW - *ON - *KO *TN</t>
<t id="2416">*KY \|=+=|/ *KW- *ON - *KY *TN</t>
<t id="2417"> </t>
<t id="2418"> </t>
<t id="2419"> </t>
<t id="2420"> </t>
<t id="2421"> </t>
<t id="2422"> </t>
<t id="2423">*KC <||| - *WI *KC "W*NN" - *TN</t>
as i thought there are Syntax errors inside but as you are probably no
programmer this is not common to you
lets go error by error

Code: Select all

 <t id="2403">*KC <||| - *KB *ON *KC - *TS</t>
< opens an xml-tag to be shown you need to transcribe them
< must become <
> must become >
and this is also the point which casuses the readerrors

Code: Select all

 <t id="2403">*KC <||| - *KB *ON *KC - *TS</t>
next

Code: Select all

 <t id="2406">*KY /*G03\ VI - *KB *ON *KY - *TN</t>
\ is the escape caracter which to be displayed needs to be escaped means \\

Code: Select all

 <t id="2406">*KY /*G03\\ VI - *KB *ON *KY - *TN</t>
BUT with an special case which you also provided :)

Code: Select all

 <t id="2407">*KY *G03\/*G03 VII - </t>
/ does not needs to be escaped but in this case you need to escape both
\ and / because \/ leads to / meaning \\/ will translate to \/ will translate
to / so the right way is \\\/ which translates to \/

Code: Select all

 <t id="2407">*KY *G03\\\/*G03 VII - </t>
next

Code: Select all

 <t id="2411">*KY ( I I I ) - *KO *ON *KY - *TS</t>
brackets nearly always contain some code thats why to be displayed they
also need to be escaped with \ means \( and \)
BUT with a special case for X square brackets [ and ] play some special
role in messages in X so if not filled with valid code they will always cause
problems even if escaped so just avoid them at all costs

Code: Select all

 <t id="2411">*KY \( I I I \) - *KO *ON *KY - *TS</t>
so your expample should look like this:

Code: Select all

 <t id="2401"> </t>
 <t id="2402"> </t>
 <t id="2403">*KC <||| - *KB *ON *KC - *TS</t>
 <t id="2404"> </t>
 <t id="2405">*KC < - *KB *ON *KC - *TS</t>
 <t id="2406">*KY /*G03\\ VI - *KB *ON *KY - *TN</t>
 <t id="2407">*KY *G03\\\/*G03 VII - </t>
 <t id="2408"> </t>
 <t id="2409"> </t>
 <t id="2410"> </t>
 <t id="2411">*KY \( I I I \) - *KO *ON *KY - *TS</t>
 <t id="2412">*KO C.A.G. *KW - *ON - *KO *TA</t>
 <t id="2413">*KO E.S.T. *KW - *ON - *KO *TA</t>
 <t id="2414"> </t>
 <t id="2415">*KO \(-I-I-\(  *KW - *ON - *KO *TN</t>
 <t id="2416">*KY \\|=+=|/  *KW- *ON - *KY *TN</t>
 <t id="2417"> </t>
 <t id="2418"> </t>
 <t id="2419"> </t>
 <t id="2420"> </t>
 <t id="2421"> </t>
 <t id="2422"> </t>
 <t id="2423">*KC <||| - *WI *KC "W*NN" - *TN</t>
i just needed a little longer cause i was confirming what i wrote
i think i need to escape all characters on export so that you won't need
to do that.

greetings

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Thu, 1. Nov 12, 19:06

Wow, that is a lot of info for me to digest but I appreciate you taking the time to educate me on it. I will persevere until I understand it all.
You are a patient man for putting up with my dumb questions :)

Your statement:
Medevel wrote:...as i thought there are Syntax errors inside but as you are probably no
programmer this is not common to you
is spot on.

All these symbols are to me like stencils to a child, I use them to make pictures. Over the time that I have used your script I had only figured out that using the "[ ]" symbols for my ships was not a good idea, not unless they needed to work in secrecy :)

I know it seems silly but I try to make icons to identify the ships classes more easily, either by reproducing the original icons or by making some that at the moment seem good to me.

for ex. M3-M4-M5 <||| - <|| - <|

Whenever I have used them ingame, I have never encountered any errors and I wrongly assumed that they could be used in presets too.
As you can see in the following screenshot there were no apparent ill effects ingame when I used the syntax symbols in my renaming, ignorance is bliss.



[ external image ]


Thanks for teaching me something new.



{Oversized image altered to linked thumbnail - Terre}

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

Post by Medevel » Sun, 4. Nov 12, 17:35

Hey Guys,
the last days i looked into the problems with the ReadText errors when
exporting the T-file and using it like that
first i found out that while reading the T-File in UTF-8 encoding, X
exports logfiles in ANSI(Windows-1252 on my machine), but since some of
the Characters RSwE exports are not common in ANSI, it exports it in
UTF-8 without BOM, which some programs(like wordpad) confuse it with UTF-8.
That results in eather ReadText error or wrong Characters.

So i updated RSwE according:

changes in v.3.1
  • Removed al.rswe.events.xml cause i merged it in al.rswe.main.xml
  • Fixed the export function
    added some escape characters to make the strings valid
    hopefully fixed the ANSI <-> UTF-8 conflicts
  • Added *GC01 - *GC02 for Capital Greek Letters
  • Changed AutoNaming to have its own AL-Plugin
    the AL-Plugin is by default off and is independent from the DN AL-Plugin
    the Default interval is 6 intervals for each 5 seconds means 30 seconds
    its new file name is al.rswe.auto.xml
    and improved Autonaming a bit :)
As always have fun and report any bugs you find :)

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Sun, 4. Nov 12, 19:41

Thanks.

I will install it before I bootup the game next time.

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Post by Mycu » Mon, 5. Nov 12, 11:41

Thanks for 3.1

I've tried it and it seems that id="2014" is missing in an original T-file.

Also exporting logfiles does not take into consideration language ID (it's always english: 44) and exports null in many cases, for example:

<t id="3">RSwE vpusty.pusty</t>
...
<t id="401">\033Ypusty\033X</t>
<t id="402">\033Rpusty\033X</t>
...
<t id="1244">*Ypusty</t>
<t id="1245">*Wpusty</t>

(pusty means null in Polish language).

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

Post by Medevel » Mon, 5. Nov 12, 17:18

Mycu wrote:I've tried it and it seems that id="2014" is missing in an original T-file.
hmm were did it go .. and yes its also missing in my source so it will be fixed.
Mycu wrote:Also exporting logfiles does not take into consideration language ID (it's always english: 44) and exports null in many cases
yes thats right RSwE is only localized in English.
I never invested any time to port it to other languages, cause it was enough,
even if it would be handy to have it in your favourite language, i don't know
if there is a script-command to determen the language used by X.
Also I am no big fan of localizations, you must know I am a german and
played games, watched movies, and so on, in the german language.
Then a few years back in an MMORPG, i played to the time, the big localization came,
it was announced with "Sothat our foreign player can enjoy the game
in there native language" and it was horrible.
Suddenly some new players asked you for a direction, and you had to
say "WTF, never heard of this location, wait a moment need to check my map".
Since that time i begann to enjoy the MMORPG in english and i was happy.
I even begann to watch movies in english, and today when ever i can
compare a game or movie in english and german, i mostly prefer the
english version cause mostly the german localization is horrible, compared
to the original.

Damn too much offtopic.
But in your particular case i just need to advance my
null-protection till now i thought "null" is a fixed statement and is not
localized into the various languages, but it seems to be(atleast polish).

btw the id 2014 should be

Code: Select all

<t id="2014">Bombers \(\033YM8\033X\)</t>
and it was missing in 3.0 too, strange :?

will be back with an update soon.
Edit:
Allright after some nice X sessions with languages i can not read, i am
ready to publish 3.2 (btw X in Chinese looks cool :) )
changelog for v.3.2
  • Fixed missing T-File id 2014
  • Added T-Files for every language avaible at Steam
  • Fixed the "null"-bug on non english clients
Greetings

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Post by Mycu » Tue, 6. Nov 12, 14:08

Medevel wrote:I never invested any time to port it to other languages, cause it was enough,
even if it would be handy to have it in your favourite language, i don't know
if there is a script-command to determen the language used by X.
Also I am no big fan of localizations, you must know I am a german and
played games, watched movies, and so on, in the german language.
Then a few years back in an MMORPG, i played to the time, the big localization came,
it was announced with "Sothat our foreign player can enjoy the game
in there native language" and it was horrible.
Suddenly some new players asked you for a direction, and you had to
say "WTF, never heard of this location, wait a moment need to check my map".
Since that time i begann to enjoy the MMORPG in english and i was happy.
I even begann to watch movies in english, and today when ever i can
compare a game or movie in english and german, i mostly prefer the
english version cause mostly the german localization is horrible, compared
to the original.
Yes, you are right that most of localizations are not accurate.
I don't have a problem to play English game versions - but I preffer my native language until the level of translation allows to play :)

Till today I've corrected a lot of Polish T-files because I had a feeling that translation was made by a dictionary, not someone using script....

I'll try new RSwE version tomorrow (my work allows me to play evry two days only ;)) but appreciate the fact that you still develop RSwE.

Thanks.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Thu, 8. Nov 12, 00:24

Nice update, Medeval.

One issue: It appears that the script automatically renames all ships with defaults on startup, which messes up the names that I have already assigned.

I preferred the old behavior which did nothing until I specifically selected a command from the RSwE menu.

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

Post by Medevel » Thu, 8. Nov 12, 14:32

This is strange,
Autonaming AL is by default OFF on initialization, i wrote it that way from
the very beginning, because what you experienced.
I have tested it on fresh game-starts which have no settings, and it is definitely off.
I am sorry but i think you accidentally activated the Autonaming AL,
cause i am 100% sure it don't turned it self on, and if not activated
the AL don't run.
This a game mechanic which i can not influence.
But i can give you a small advice and i hope it helps, on reloading the
save quickly enter the Options at the bottom of the sidebar, select
"Gameplay", select "Artificial Life Settings" and deactivated Autonaming.
If deactivated it should look like:
RSwE Automatic Renaming Disabled <<<No>>>
if it looks like this:
RSwE Automatic Renaming Enabled <<<Yes>>>
it is activated you can deactivate it by clicking or highlighting and ENTER

Greetings

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Thu, 8. Nov 12, 16:34

Yes, that is the cause. Both AL plugins are "On" by default.

I fixed my copy here, but you might want to change the defaults in a future release.

Thanks.

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

Post by Medevel » Thu, 8. Nov 12, 18:03

Alright let's call it "Strange Behavior",
I did some tests since on a fresh start with 3.2 DN is on AN is off.
so i installed 2.9 which has no AN at all, created a new game,saved(DN on)
and updated to 3.2, loaded Both on(your case i assume DrBullwinkle).
so i downgraded to 2.9 again, created a new game, save,(but this time DN off)
updated to 3.2, and loaded the save, both on.
now if this would be some script related problem my second test would turn
AN On DN off, but since both are on, although DN was deactivated before
updating, i can only assume i created some hickup in X.
Until that i suggest you(DrBullwinkle and everyone else with this problem)
stay with any pre 3.1 version of RSwE.
These are still available if you follow the "Folder" link on the OP and look inside the old files folder.

I am sorry but it seems i have to make the on/off switches more bulletproof
I am sorry for this,
Greetings

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Thu, 8. Nov 12, 18:08

In both al.rswe.main.xml and al.rswe.auto.xml, change line 14 from:

Code: Select all

$plugin.Vars[1] = [TRUE]


to:

Code: Select all

$plugin.Vars[1] = [FALSE]

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

Post by Medevel » Thu, 8. Nov 12, 19:14

DrBullWinkle
Thanks for the advice, but as my further tests showed DN was working
correct, it was just AN which was malfunction and DN was misslabled.
I corrected these two bugs in the new version:

HotFix v.3.2.1
  • Fixed falsely activated Autonaming AL-Plugin on updating
  • Fixed a lable mistake on Dynamic Naming AL-Plugin
Greetings

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Thu, 8. Nov 12, 19:24

Yes, that solved the problem.

Thank you.

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

Post by Medevel » Mon, 12. Nov 12, 14:04

Brinnie wrote:I know it seems silly but I try to make icons to identify the ships classes more easily, either by reproducing the original icons or by making some that at the moment seem good to me.

for ex. M3-M4-M5 <||| - <|| - <|
Well actually this gave me an idea what we could add to RSwE.
I already put up some ideas on iconic classes:
[ external image ]
so some feedback would be nice,
I am no ASCII-Artist, these are only examples of my first ideas.

Greetings

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Mon, 12. Nov 12, 14:39

It would be nice if I could contribute, even if in a small way, to your script. I personally like the idea of using symbols.

I was at first trying to copy the game's own icons but I then realized that it wouldn't work for all ships, particularly the bigger ones.
For the fighters I did what you have done in the image you've linked.

Some others I have more or less settled for:


TS

Code: Select all

(III)
TM

Code: Select all

()'()'()
TP

Code: Select all

<(|=(|=
As you can see I am no artist either.

The bigger ships I have not found anything that I am happy with yet, but I was looking to make bigger symbols so that their size is kind of proportional to the ship.
Also I wanted the bigger symbols for the capital ships so I could find them quicker. I got carried away and made some that were stupidly long :)

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

Post by Medevel » Mon, 12. Nov 12, 14:49

Brinnie wrote:The bigger ships I have not found anything that I am happy with yet, but I was looking to make bigger symbols so that their size is kind of proportional to the ship.
Also I wanted the bigger symbols for the capital ships so I could find them quicker. I got carried away and made some that were stupidly long :)
Yes its right that the iconic size should grow with the size of the ship,
but we also need to limit this size, otherwise X would not display all information,
and cut it like in the sector list.
RSwE offers more information's than ship class, so we should keep that in mind.
But still this project "iconic classes" is WiP(Work in Progress) i haven't done anything final yet.
I will wait for more feedback, and then we will see what we can use.
also as RSwE is running stable atm i am in no rush.
Greetings

Post Reply

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