[Mod] Advanced Renaming (updated 2020-07-11)

The place to discuss scripting and game modifications for X4: Foundations.

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

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

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Brinnie » Fri, 5. May 23, 15:55

Thanks Forleyor.

Edit**

Hey, you have made the info centre mod.
Excellent mod, I look forward to more of your stuff.

Thank you.

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

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Brinnie » Fri, 5. May 23, 22:04

Sorry it's me again, I must be doing something stupidly wrong. Please endure my thickness, how do I do the following:



I would like call my nemesis (BOB) Nemesis V

(BOB) written in blue and Nemesis V in red

right clicking on Bob, selecting rename and typing /blu(BOB) /redNemesis V doesn't do that, it just renames to:



/blu(BOB) /redNemesis V


what am I doing wrong and how do I do it right?

Forleyor
Posts: 40
Joined: Thu, 11. Jun 15, 19:09
x4

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Forleyor » Sat, 6. May 23, 11:55

Brinnie wrote:
Fri, 5. May 23, 22:04
Sorry it's me again, I must be doing something stupidly wrong. Please endure my thickness, how do I do the following:



I would like call my nemesis (BOB) Nemesis V

(BOB) written in blue and Nemesis V in red

right clicking on Bob, selecting rename and typing /blu(BOB) /redNemesis V doesn't do that, it just renames to:



/blu(BOB) /redNemesis V


what am I doing wrong and how do I do it right?
It should work like your doing: https://i.imgur.com/FnXkYry.png

Can you confirm where you installed the mods?
Did you install into X4 Foundations\extensions\ ?
I ask because the game has 2 extension folders but Mod Support APIs and advanced renaming need to be in extensions folder in X4 Foundations\extensions\

Example on my setup (I have steam but that doesnt matter if your on GOG just need the mods are installed X4 Foundations\extensions\)
E:\Steam\steamapps\common\X4 Foundations\extensions\sn_mod_support_apis
E:\Steam\steamapps\common\X4 Foundations\extensions\ut_advanced_renaming

Once installed in there it should "just work". Note if you have any of the X4 DLCs you should also see the dlc folders thats a good way to confirm your deffo installing in the correct location :)

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

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Brinnie » Sat, 6. May 23, 13:23

It's sorted now.

I fell victim to the master suffix when I installed the updated version, I thought I paid attention to it but it somehow sneaked on me anyway.

Thank you for help

and say hello to Unitrader for me.

Forleyor
Posts: 40
Joined: Thu, 11. Jun 15, 19:09
x4

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Forleyor » Sat, 6. May 23, 21:43

No problem at all!

Glad its working :D

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Polofix » Mon, 8. May 23, 06:46

Forleyor wrote:
Fri, 5. May 23, 11:33
if you only got G_Work_Around for Advanced renaming and nothing else you can freely remove it

to get Advanced renaming from github you can click the green button "Code" then" Download zip" or click this direct link: https://github.com/UniTrader/ut_advance ... master.zip

extract the archive to X4 Foundations\extensions as usual, Note though that github adds -master to the end of the folder in the archive so rename ut_advanced_renaming-master to ut_advanced_renaming

Should look like X4 Foundations\extensions\ut_advanced_renaming
Hello,
I wanted to update the mod and used this link.

But this version does not work for me at all.
No matter what abbreviation I use. Even the simplest, such as /redShipname does not work. I get then '/redShipname'.
It doesn't really matter as my older version works fine for me. I am still using X4 5.1.

My old version is date="2016-09-01" version="030", according to content.xml
The new version shows the same though, so I assume it's just the content.xml that hasn't been updated.
But why the version does not work at all is a mystery to me.

And yes, it is of course in the correct folder and is also shown as activated in the extensions in the game.

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

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Brinnie » Mon, 8. May 23, 11:11

Polofix wrote:
Mon, 8. May 23, 06:46


And yes, it is of course in the correct folder and is also shown as activated in the extensions in the game.

Hi, don't hate me for suggesting it but check the name of the folder inside your extensions folder. I thought I was paying attention but when I updated the name changed, a suffix -master was added to it and that stopped it from working.

Forleyor
Posts: 40
Joined: Thu, 11. Jun 15, 19:09
x4

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Forleyor » Mon, 8. May 23, 18:09

Polofix wrote:
Mon, 8. May 23, 06:46
Hello,
I wanted to update the mod and used this link.

But this version does not work for me at all.
No matter what abbreviation I use. Even the simplest, such as /redShipname does not work. I get then '/redShipname'.
It doesn't really matter as my older version works fine for me. I am still using X4 5.1.

My old version is date="2016-09-01" version="030", according to content.xml
The new version shows the same though, so I assume it's just the content.xml that hasn't been updated.
But why the version does not work at all is a mystery to me.

And yes, it is of course in the correct folder and is also shown as activated in the extensions in the game.
Hey, can you confirm you checked what Brinnie said above me? I just tested the version from github with 5.10 and it works fine here, Im not aware of any reason the linked version should work on 6.00 but not 5.10, especially considering it works on both versions on my end.

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Polofix » Tue, 9. May 23, 07:39

Hey, yeah, that's exactly what it was. I also had to remove the '-master' in the folder name. I thought the name had no meaning, but it must match the one in Content.xml. I hadn't checked that. It's a bit confusing. Thanks.

One more tip, for all those who also use the user defined expressions (ut_advanced_renaming_user).
If you want to use a '(' or ')', it doesn't work. Everything after the special character is truncated.

You have to put a '\' in front of the parentheses.

e.g.:

This does not work:
<t id="4">/gas</t>
<t id="5">/mag/type0 (gas)/lbl/idcode /nor$cargo.used/$cargo.volume

This works:
<t id="4">/gas</t>
<t id="5">/mag/type0\(gas\)/lbl/idcode /nor$cargo.used/$cargo.volume

(gas) --> \(gas\)

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

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Brinnie » Tue, 9. May 23, 12:00

@Polofix

with regards to the brackets, this info provided by Medeval might be useful if it applies to this mod too.

viewtopic.php?p=3975029#p3975029

Edit ***

Also from Medeval, regarding "Rename Ships With Expressions":
There are some rules for editing the customizations:
1. you need an Editor which can understand "UTF-8" and "UTF-8 without BOM"
if you don't know if your favourite Editor can do that i can always recommend
Notepad++ (http://notepad-plus-plus.org/) which I also use
2. some charaters are forbidden
1. < opens an xml tag and is taboo use the xml-code: &lt; instead
2. > closes an xml tag and is taboo use the xml-code: &gt; instead
3. & X can't read it like that use the xml-code: &amp; instead
4 [ ] square brackets are a big taboo in X they are used by X's messagesystem
and if you use them in a name it will result in blank messages
3. some characters needs to be escaped sothat X can display them some examples
1. ( ) round brackets normal contain code so if you use them escape them: \( \)
2. \ backslash is the escape character so it needs also be escaped: \\
3. / slash can be escaped with \/ so for ASCII art \/ you need to escape both characters \\\/
if you keep this in mind you can avoid TextRead errors
Again I don't know if the above applies to "Advanced Renaming".

---

One question about "ut_advanced_renaming_user",

I unzip it, edit it and where does it go?

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Polofix » Wed, 10. May 23, 13:21

Thanks for the listing. Since I know a bit about reggex, the escaping was not new to me. However, this is unfortunately not mentioned in the description and is worth a hint.

'<>' do not work in X4. After trying it out, the mod didn't work at all.
'[ ]' I have not tested in X4 yet.
' { }' work without additions.
'( )' only with prefixed escape character '\'.
Brinnie wrote:
Tue, 9. May 23, 12:00
@Polofix

One question about "ut_advanced_renaming_user",

I unzip it, edit it and where does it go?
The folder must also be in the extension folder.

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

Re: [Mod] Advanced Renaming (updated 2020-07-11)

Post by Brinnie » Wed, 10. May 23, 14:57

Polofix wrote:
Wed, 10. May 23, 13:21

The folder must also be in the extension folder.
Ok, like a mod on its own.

Thank you.

Return to “X4: Foundations - Scripts and Modding”