[MOD] Rename Fleet Ships

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

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

BaneSorka
Posts: 12
Joined: Sat, 1. Dec 18, 01:53
x4

[MOD] Rename Fleet Ships

Post by BaneSorka »

If you are like me, you have various load-outs for each ship, and want to keep up with what load-out each ship in your possession is using. Or you just want to have every trade ship you own use one name, or some other naming method. Now you can do that in mass.

Here is what you need to do:
  • Get the ships
  • Assign the ships to a commander
  • Rename the commander "[RFS]Trade ship load-out 2" With out the quotes of course
  • Wait up to 10 seconds
  • All ships under that commander are not named "Trade ship load-out 2" and, they will have an attached 000- how ever many you have.
I have also tested this with ships that have a commander that has a commander, for instance, I had a fighter squadron with one of the fighters as the commander, who was assigned to a Destroyer. I renamed the fighter commander, and each of the fighters were renamed, the destroyer was left as is. This script only goes one commander structure deep, so only the commander, and his direct subs will be renamed.

Download Page

Credit to jan12342203 who gave me permission to use some assets from his mod MultiRename.

Also, thanks to all the posters in this THREAD who gave me the right direction and support to find the code syntax I needed.
Last edited by BaneSorka on Thu, 7. Mar 19, 00:49, edited 3 times in total.
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Re: [MOD] Rename Fleet Ships

Post by StormMagi »

What happens if you have multiple destroyers with a commander and each destroyer has a wing of fighters with a commander then? Will renaming the dstroyer's commander rename just the destroyers or the destroyers and all their attached fighters as well?
MOD XR Show Skills

Flying spaceships since 1993.
BaneSorka
Posts: 12
Joined: Sat, 1. Dec 18, 01:53
x4

Re: [MOD] Rename Fleet Ships

Post by BaneSorka »

This will only go one fleet deep. So the commander and its direct subs will be renamed.

Commander (Rename this one)
->Sub -Commander(Renames this one)
-->Sub(Does not rename this one)
->Sub(Renames this One

Or

Commander
-Sub(Rename this one)
-->Sub(Renames this one)
-Sub(Does Not rename this one)

Does that help??
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Re: [MOD] Rename Fleet Ships

Post by StormMagi »

It does. Will snag this for use.
MOD XR Show Skills

Flying spaceships since 1993.
Baldamundo
Posts: 99
Joined: Sat, 21. Jun 08, 18:46
x4

Re: [MOD] Rename Fleet Ships

Post by Baldamundo »

Does this still work in 5.0? And if not, does anyone know any alternatives?
BaneSorka
Posts: 12
Joined: Sat, 1. Dec 18, 01:53
x4

Re: [MOD] Rename Fleet Ships

Post by BaneSorka »

As far as I know it still works. I used in just before Tides released. I just moved so I am setting back up and will be trying it out with Tides.

Return to “X4: Foundations - Scripts and Modding”