[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

argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: [Mod] Advanced Renaming (updated 2019-07-13)

Post by argon_emperor » Mon, 23. Sep 19, 14:46

Been playing for a bit with the updated version, just wanted to let you know I haven't had a null show up again now, so looks like your changes worked as you intended. Cheers :)
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone

User avatar
TSM
Not a Moderator
Posts: 2947
Joined: Thu, 1. Jul 04, 12:31
x4

Re: [Mod] Advanced Renaming (updated 2019-07-13)

Post by TSM » Wed, 24. Jun 20, 14:18

Not sure what i am doing wrong here

This mod and G_Work_Around are installed

But if for example i rename /yel blahship

Code: Select all

/yel blahship
gets displayed with no colour change

##EDIT##

Fixed after UT updated it :D
Last edited by TSM on Fri, 3. Jul 20, 23:27, edited 1 time in total.
FAQ's Egosoft Interactive FAQ
Egosoft Wiki

Baldamundo
Posts: 99
Joined: Sat, 21. Jun 08, 18:46
x4

Re: [Mod] Advanced Renaming (updated 2019-07-13)

Post by Baldamundo » Fri, 3. Jul 20, 22:12

Is this compatible with the latest versions?

User avatar
TSM
Not a Moderator
Posts: 2947
Joined: Thu, 1. Jul 04, 12:31
x4

Re: [Mod] Advanced Renaming (updated 2019-07-13)

Post by TSM » Fri, 3. Jul 20, 23:26

Baldamundo wrote:
Fri, 3. Jul 20, 22:12
Is this compatible with the latest versions?
Yes works in 3.20 and Beta 3.30 B2 :)

Unitrader recently updated the version on his github
FAQ's Egosoft Interactive FAQ
Egosoft Wiki

Baldamundo
Posts: 99
Joined: Sat, 21. Jun 08, 18:46
x4

Re: [Mod] Advanced Renaming (updated 2019-07-13)

Post by Baldamundo » Tue, 7. Jul 20, 21:14

TSM wrote:
Wed, 24. Jun 20, 14:18
Not sure what i am doing wrong here

This mod and G_Work_Around are installed

But if for example i rename /yel blahship

Code: Select all

/yel blahship
gets displayed with no colour change

##EDIT##

Fixed after UT updated it :D
I've downloaded the version from Github and the version of G_Work_Around from the linked thread, but I'm still getting this problem. Any idea what I'm doing wrong?

EDIT: Tried it with the more recent version of G_Work_Around from Nexus and it's still not working.

EDIT2: Huh. Seem to have accidentally fixed it somehow :?

EDIT3: Ahhh, seems to only work from the ship information menu, not from the right-click menu. Now if I can just get /seqclass to display something other than "null" and also work out how to use the post-dynamic expressions. Am I right in understanding that post-dynamic ones should correlate to something I've put in the regular user defined names to change it after that's been implemented? I.e. if I have "/purpose" in the UD replacement, then put "Mine" in the post-dynamic expression it should rename my Miners to what I've defined in the post-dynamic replacement?
Last edited by Baldamundo on Tue, 7. Jul 20, 23:26, edited 3 times in total.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: [Mod] Advanced Renaming (updated 2019-07-13)

Post by UniTrader » Tue, 7. Jul 20, 22:19

Just a quick heads up:
=> Mod folder Name is important. you have to remove the suffix -master which github attaches to it (otherwise the game wont find the required lua file)
=> while the old _G workaround should still work (i didnt remove the calls for it) i have migrated to SirNukes' Lua Loader as primary lua loading extension
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: [Mod] Advanced Renaming (updated 2019-07-13)

Post by UniTrader » Sat, 11. Jul 20, 14:18

Just updated the Version linked in the first Post.
Changes i remember sine the last update (sorry, its been a while):
=> Fully Compatible with latest non-beta Game Version* (slightly reduced functionality in Beta or any unknown game Version)
=> Now Uses SirNukes' Lua Loader if present (old _G Workaround can still work, but is not used if the loader is present)
=> Name Edit Line modified so you edit the Name with the Expressions rather than the coloured resulting name (NOT present untested Game Versions)
=> Also some cleanup was done
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

user1679
Posts: 763
Joined: Fri, 20. Jul 18, 23:20

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

Post by user1679 » Sun, 12. Jul 20, 20:58

Is it possible to add functionality to rename NPCs you've hired?

I started a discussion about how directly editing the save file doesn't work. Currently in game there's no option to rename a hired NPC when you right-click them. I would like to rename some of my crew to mimic popular sci-fi heroes.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

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

Post by UniTrader » Mon, 13. Jul 20, 17:53

Not really in the Scope of this Project. Also would require more hacking in the UI than i want.
Only compromise i can see is to make an expression to rename the Pilot or Manager of a Ship, but thats it. not any NPC present, which is obviously what you want.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

user1679
Posts: 763
Joined: Fri, 20. Jul 18, 23:20

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

Post by user1679 » Tue, 14. Jul 20, 06:34

UniTrader wrote:
Mon, 13. Jul 20, 17:53
Not really in the Scope of this Project. Also would require more hacking in the UI than i want.
Only compromise i can see is to make an expression to rename the Pilot or Manager of a Ship, but thats it. not any NPC present, which is obviously what you want.
Thanks for the reply. I was afraid of that.

I find it interesting that Ego decided to save the pilot with a name and unique id but not the crew.

argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

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

Post by argon_emperor » Tue, 1. Sep 20, 07:22

So it's gone back to giving "null" on the sequence numbers. Was working at the start of this save game, and after only 2 and a half hours it's doing it.

The error it gives in the debug log is this:

Code: Select all

[General] 8973.31 ======================================
[=ERROR=] 8973.31 Error in MD cue md.UT_CAC_Object_Name_Managment.NameUpdate_FromLua<inst:18f5e4b>: Property lookup failed: player.entity.$current_id
* player.entity == component.{0x4e91eL} (name='Jobi Kashuken', class=player)
* Expression: player.entity.$current_id
* Action: <set_value>, line 590
[General] 8973.31 ======================================
[General] 8973.31 ======================================
[=ERROR=] 8973.31 Error in MD cue md.UT_CAC_Object_Name_Managment.NameUpdate_FromLua<inst:18f5e4b>: Failed to set null.{component.{0x361cfL}} to value 1
* Expression: player.entity.$current_id.{$object}
* Action: <set_value>, line 590
[General] 8973.31 ======================================
[General] 8973.31 ======================================
[=ERROR=] 8973.31 Error in MD cue md.UT_CAC_Object_Name_Managment.NameUpdate_FromLua<inst:18f5e4b>: Property lookup failed: player.entity.$current_id
* player.entity == component.{0x4e91eL} (name='Jobi Kashuken', class=player)
* Expression: player.entity.$current_id.{$object}
* Action: <substitute_text>, line 630
[General] 8973.31 ======================================
At first thought maybe it was related to the player name (had changed it after the first time I used the renaming), so tried changing it back, still would give the same error. Then I made a ship bail and tested the rename on it both when I claimed it myself and sat in it, compared to when I sent a marine to claim it and waited for them to be in the seat, still gave the error.

The expression I'm renaming with is: DCSF /type+ /seqtype
/type+ works fine, but any /seq gives null. And it happens on ships I already had, and any that I get new. Have tried using /seqdel and /seqresetall, still gives a null. Just wish I knew why it broke from the start of the save :(
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone

Baldamundo
Posts: 99
Joined: Sat, 21. Jun 08, 18:46
x4

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

Post by Baldamundo » Mon, 5. Apr 21, 22:54

Really fantastic mod, and really impressive that it's been working fine without updates over multiple game versions.

One issue I've noticed: building ships at your own shipyard, they seem to get named by default with the 'Name Template for XS Ships' rather than the appropriate one for their ship-class (I'm guessing they start off as like an XS generic ship-in-construction template before getting their appropriate attributes??). And additional to that, if your Name Template for XS Ships uses the /freightclass or /class fields, they get filled in with "%CLASS:object" (I'm assuming it tries to assign them when the ship's first added to the construction queue, but before the ship actually gets assigned its final hull & cargo attributes)

If you ever plan to update the mod, it would be great if it could be made to work on fleet names as well as just ship names.

User avatar
JFJohnny5
Posts: 198
Joined: Mon, 12. Dec 05, 17:38
x4

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

Post by JFJohnny5 » Sat, 2. Oct 21, 14:58

Mod shows as version 0.30 with a date of 2016-09-01 in the Extensions menu. Just checking if the link on page 1 is for the current version. Thinking maybe an update to the XML just got missed?

Baldamundo
Posts: 99
Joined: Sat, 21. Jun 08, 18:46
x4

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

Post by Baldamundo » Sat, 26. Mar 22, 02:33

Anyone know if this still works in 5.0?

Eagle_Four
Posts: 231
Joined: Wed, 6. Nov 02, 20:31
x3

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

Post by Eagle_Four » Tue, 19. Jul 22, 15:39

Hi, does anyone know if %sub.total and/or %sub.id still works and if so how?

I always liked to use these functions for subordinates in XRebirth, e.g. Buzzard (1/10)

But in X4 I can't get any extensions with % to run. These extensions are still in the t/0001.xml.

And what does /seqall return ?

I have a squadron with 4 ships -> squadron leader -> fleet commander
/seqall then returns 2
I do not understand ?

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

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

Post by Brinnie » Thu, 4. May 23, 11:17

Excuse me could somebody show me a couple of practical examples on how to use it.

Am I suppose to use the expressions in the name by using the standard rename?

if I type "/whi Nemesis V" in the rename box the ship is renamed to /whi Nemesis V

it doesn't actually change the colour of the text.

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

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

Post by Forleyor » Thu, 4. May 23, 20:07

Brinnie wrote:
Thu, 4. May 23, 11:17
Excuse me could somebody show me a couple of practical examples on how to use it.

Am I suppose to use the expressions in the name by using the standard rename?

if I type "/whi Nemesis V" in the rename box the ship is renamed to /whi Nemesis V

it doesn't actually change the colour of the text.
The info in this thread is quite outdated now.

if you want to try the mod the best thing to do is get the latest files from UniTraders github: https://github.com/UniTrader/ut_advanced_renaming

Also _G Work Around is no longer needed, the github version I linked above requires the newer Sir Nukes Mod Support APIs's downloadable from either of these links:
Nexus Mods: https://www.nexusmods.com/x4foundations ... ?tab=files
or if you dont like or use nexus
Github: https://github.com/bvbohnen/x4-projects/releases (only sn_mod_support_apis_v1.88.zip is needed)

Once you have those 2 installed, it should be as simple as example: "/whi shipName" like you did before.

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, 02:17

Thank you.

I'll get it tomorrow

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, 09:54

Hi Forleyor, I followed the above link to UTs github but I can't see a way to download, I am sure it's there I just can't see it :oops:

I have already got Sir Nukes stuff installed, I also have G work around installed. Do I need to remove it?

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

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

Post by Forleyor » 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

Post Reply

Return to “X4: Foundations - Scripts and Modding”