Jump to content

[1.10.X][v2.4] Project Manager, Group and Autonumber Launches [18/10/2019]


Beale

Recommended Posts

iVCB4Xr.png

You can now also add an "A" to the end of the project tag to use A, B, C...Z in place of 1, 2, 3...26

 

Description:

This is a remake / revamp of my previous mod, with some enhanced functionality.
It's a very lightweight mod which will pick up tags in your vessel names and autonumber your launch when rolling out the vessel.

Example One

[STS] Discovery
[STS] Atlantis
[STS] Endeavour


These crafts, when launched will be renamed to:

STS 1
STS 2
. . .
STS 999

 

 

Example Two

[Gemini]R Red Gemini
[Gemini]R Blue Gemini
[Gemini]R Green Gemini


These crafts, when launched will be renamed to:

Gemini I
Gemini II
. . .
Gemini CMXCIX

 

 

Example Three

[STS]A Discovery
[STS]A Atlantis
[STS]A Endeavour


These crafts, when launched will be renamed to:

STS A
STS B
. . .
STS Z
STS 27
STS 28
. . .

Improvements:

  • Added support for roman numerals.
  • Added support for ABC numbering.
  • Project records are now stored to persistance file.
  • Launch reverts will roll back the launch count.
  • Support for wider charset.

Download on GitHub

Goals:

The key aim of this mod is to be lightweight and unintrusive as possible - and more to that, it can be uninstalled and reinstalled without any issues.
Due to this, I probably won't look to extend this much further (A GUI interface for example), but ways to enhance it whilst still keeping things lightweight might be neat.

Licence:

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Edited by Beale
Link to comment
Share on other sites

*...Placeholding this spot, for CobaltWolf so he can be FIRST :cool:...*

Thanx for this, Beale... Being very disorganized, while having OCD at the same time, makes my KSP folder and games, quite consistently organized and disorganized, in at least semi-logical ways, all at the same time ... lol

This should help immensely, when I do actually get to play... ;)


 

Edited by Stone Blue
Link to comment
Share on other sites

Beale, I love this mod so very much. No more having to remember to add a number to successive flights!

Would you consider adding alphabetic enumeration as well, such as Kerbsat A, Kerbsat B, Kerbsat C, etc.?

Link to comment
Share on other sites

1 hour ago, LitaAlto said:

Beale, I love this mod so very much. No more having to remember to add a number to successive flights!

Would you consider adding alphabetic enumeration as well, such as Kerbsat A, Kerbsat B, Kerbsat C, etc.?

That's a nice suggestion, sure it should be easy enough. :)
My only wonder is what happens when going above the full alphabet (I suppose it can just revert to standard numbering after that).

 

 

Version 2.1

GitHub

  • Fixes to persistance saving.
  • Project names can now contain spaces.

Really sorry, this might reset numbering - I had to juggle around the saving code to fix some bugs reported:

  • Project codes are now all caps internally.
  • Project codes with spaces now replace the spaces with underscore _


If you want to manually fix this - it can fixed by changing the project definitions in the persistent.sfs file inside your KSP save directory:

Old Style:

SCENARIO
	{
		name = ProjectManager
		scene = 7
		PROJECTMANAGER
		{
			Kerpollo
			{
				LAUNCH_NUMBER = 7
			}
			Super Kosmos
			{
				LAUNCH_NUMBER = 12
			}
		}
	}

New Style:
Kerpollo -> KERPOLLO
Super Kosmos -> SUPER_KOSMOS

SCENARIO
	{
		name = ProjectManager
		scene = 7
		PROJECTMANAGER
		{
			KERPOLLO
			{
				LAUNCH_NUMBER = 7
			}
			SUPER_KOSMOS
			{
				LAUNCH_NUMBER = 12
			}
		}
	}

 

If you don't want to manually fix this - here's the canon, there was a fire in the records department at KSC. You are back to launch 1 :)

Edited by Beale
Link to comment
Share on other sites

1 hour ago, Beale said:

That's a nice suggestion, sure it should be easy enough. :)
My only wonder is what happens when going above the full alphabet (I suppose it can just revert to standard numbering after that).

Thanks for considering it!
And you have a good point. Although I'm sure it's an edge case, it's probably one to keep in mind.
Another possible consideration is localization. I don't know if any Russian KSP players would want Cyrillic support but it might be a good idea to check the game's language setting and, where possible, account for that.

Edited by LitaAlto
Link to comment
Share on other sites

On 6/1/2019 at 6:21 PM, LitaAlto said:

Would you consider adding alphabetic enumeration as well, such as Kerbsat A, Kerbsat B, Kerbsat C, etc.?

Well now I have more than considered it :wink:

Version 2.2

GitHub

  • You can now add a tilde ~ to the end of the project tag for ABC naming.
Link to comment
Share on other sites

This looks sweet!

One question though: What happens to the "Lander", "Shuttle", "atlantis", "endeavour" bit of the name? If it's left out completely, is there any reason to supply it at all in the first place?

Edit: I already know how I'm going to call my first launcher: The [Splaturn]! :D

Edited by Jognt
Link to comment
Share on other sites

17 hours ago, Jognt said:

This looks sweet!

One question though: What happens to the "Lander", "Shuttle", "atlantis", "endeavour" bit of the name? If it's left out completely, is there any reason to supply it at all in the first place?

Edit: I already know how I'm going to call my first launcher: The [Splaturn]! :D

Those are left out completely yep :)

What they are for - well, you can use it to differentiate between different components of the same project:

[ISS] Zvezda
[ISS] Zarya
[ISS] Unity
etc...
 

Then you can tell them apart in the VAB, but are launched as ISS 1, 2, 3 etc.
If not needed, sure, you can have names of just the tag alone no problem.

Edited by Beale
Link to comment
Share on other sites

What a great idea!

what about providing custom indexing through module manager?

[basename]&# where # indicates a schema listed in an MM config file, so you specify “dutch=een,twee,drie” and “german=ein,zwei,drei” or whatever names one wants to choose.

That way, one could name [USS]&navy and get “USS Enterprise” “USS Constellation”, “USS Nimitz” etc.

Link to comment
Share on other sites

3 hours ago, Kerbart said:

What a great idea!

what about providing custom indexing through module manager?

[basename]&# where # indicates a schema listed in an MM config file, so you specify “dutch=een,twee,drie” and “german=ein,zwei,drei” or whatever names one wants to choose.

That way, one could name [USS]&navy and get “USS Enterprise” “USS Constellation”, “USS Nimitz” etc.

This might be a decent way to take care of a problem I mentioned earlier with non-Latin enumeration, say, for Cyrillic. I don't know how easy it would be to implement or if @Beale would be interested in adding it, though.

23 hours ago, Beale said:

Well now I have more than considered it :wink:

Version 2.2

GitHub

  • You can now add a tilde ~ to the end of the project tag for ABC naming.

YAY! I HAD AN I D E A!!!

Sincerely, though, thank you, I can't wait to try it out!

Link to comment
Share on other sites

3 hours ago, Kerbart said:

What a great idea!

what about providing custom indexing through module manager?

[basename]&# where # indicates a schema listed in an MM config file, so you specify “dutch=een,twee,drie” and “german=ein,zwei,drei” or whatever names one wants to choose.

That way, one could name [USS]&navy and get “USS Enterprise” “USS Constellation”, “USS Nimitz” etc.

I will take a look for sure, it might be difficult to make it that dynamic though.
On the other hand, to spin off naming into the language localisation files would be a handy little thing.

Link to comment
Share on other sites

@Beale Love the mod! Only issue I'm having (perhaps this is just me) is whenever a craft name has * in the title, KSP always asks if I want to overwrite when saving. Seems to be due to the fact that * is translated to _ in the save file name, so KSP tries to confirm because the two are different? Would it be possible to add an option (like "R" right after the ] instead of/in addition to "*")? I didn't try ~ yet, but I'd assume it's the same thing.

Thanks for updating and improving this mod to 1.7.1 :D

Link to comment
Share on other sites

I have a feature request.

Say you've got a rocket with a first stage, a second stage and some kind of payload, like a satellite. The payload has a control part on it, obviously, which can be named "[Blah Blah] Satellite" or whatever, and this mod will rename the vehicle to "Blah Blah 1" when you roll out to the launch pad.

But say your upper stage also has a probe core on it so you can de-orbit it or whatever. I'd like to be able to use the "Configure Vessel Naming" feature to set that part's name to "[Blah Blah] Upper Stage," and then the mod changes it to "Blah Blah 1 Upper Stage" on rollout. As it is right now, if I try to use the "Configure Vessel Naming" feature that way, my upper stage ends up named "[Blah Blah] Upper Stage" or whatever I typed, and this mod doesn't touch it.

Think that'd be possible? I've gotten so spoiled by this mod that manually renaming detached stages makes me feel like a peasant.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
On 6/9/2019 at 2:32 AM, leomike said:

@Beale Love the mod! Only issue I'm having (perhaps this is just me) is whenever a craft name has * in the title, KSP always asks if I want to overwrite when saving. Seems to be due to the fact that * is translated to _ in the save file name, so KSP tries to confirm because the two are different? Would it be possible to add an option (like "R" right after the ] instead of/in addition to "*")? I didn't try ~ yet, but I'd assume it's the same thing.

Thanks for updating and improving this mod to 1.7.1 :D

Oh damn, that is a little annoying.

Yeah perhaps letters would be cleaner.

On 6/13/2019 at 3:34 AM, jefferyharrell said:

I have a feature request.

Say you've got a rocket with a first stage, a second stage and some kind of payload, like a satellite. The payload has a control part on it, obviously, which can be named "[Blah Blah] Satellite" or whatever, and this mod will rename the vehicle to "Blah Blah 1" when you roll out to the launch pad.

But say your upper stage also has a probe core on it so you can de-orbit it or whatever. I'd like to be able to use the "Configure Vessel Naming" feature to set that part's name to "[Blah Blah] Upper Stage," and then the mod changes it to "Blah Blah 1 Upper Stage" on rollout. As it is right now, if I try to use the "Configure Vessel Naming" feature that way, my upper stage ends up named "[Blah Blah] Upper Stage" or whatever I typed, and this mod doesn't touch it.

Think that'd be possible? I've gotten so spoiled by this mod that manually renaming detached stages makes me feel like a peasant.

Interesting idea. I will look if there are any extra events I can hook into.

Link to comment
Share on other sites

13 hours ago, RealKerbal3x said:

@Beale

This looks awesome.

If I added this to my game, how would I get it to continue the numbering scheme of my craft, rather than starting from 1? I have several spacecraft numbering schemes already in progress.

Unfortunately you would have to edit the Persistent.sfs file manually. It shouldn't be super difficult though.

Link to comment
Share on other sites

  • 2 months later...

It's not a request because I think I will not use this mod, but if you want to improve it, there are few ideas.

  • I believe "ABC naming" really is A, B, C ... Z, AA, AB, ..., AZ, BA, ...
  • base-16: 1, 2, 3 ... 9, A, B, ... F, 10, 11, ... 19, 1A, ... , 1F, ...
  • Cyrillic, and it was used: АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ
    jgogkvf.png
  • Also you could make fun of https://en.wikipedia.org/wiki/Alphabetic_numeral_system 
    the most popular, and most likely supported by the font of KSP are:
    • https://en.wikipedia.org/wiki/Greek_numerals
      units α β γ δ ε ϛ ζ η θ
        1 2 3 4 5 6 7 8 9
      tens ι κ λ μ ν ξ ο π ϟ
        10 20 30 40 50 60 70 80 90
      hundreds ρ σ τ υ φ χ ψ ω ϡ
        100 200 300 400 500 600 700 800 900
    • https://en.wikipedia.org/wiki/Cyrillic_numerals
      Единицы а в г д є ѕ з и ѳ
      1 2 3 4 5 6 7 8 9
      Десятки і к л м н ѯ ѻ п ч
      10 20 30 40 50 60 70 80 90
      Сотни р с т у ф х ѱ ѿ ц
      100 200 300 400 500 600 700 800 900
    • https://en.wikipedia.org/wiki/Hebrew_numerals
      units א ב ג ד ה ו ז ח ט
        1 2 3 4 5 6 7 8 9
      tens י כ ל מ נ ס ע פ צ
        10 20 30 40 50 60 70 80 90
      hundreds ק ר ש ת          
        100 200 300 400

 

Edited by flart
Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...
On 7/23/2019 at 8:03 PM, Beale said:
On 6/9/2019 at 3:32 AM, leomike said:

@Beale Love the mod! Only issue I'm having (perhaps this is just me) is whenever a craft name has * in the title, KSP always asks if I want to overwrite when saving. Seems to be due to the fact that * is translated to _ in the save file name, so KSP tries to confirm because the two are different? Would it be possible to add an option (like "R" right after the ] instead of/in addition to "*")? I didn't try ~ yet, but I'd assume it's the same thing.

Thanks for updating and improving this mod to 1.7.1 :D

Oh damn, that is a little annoying.

Yeah perhaps letters would be cleaner.

Are you still active on this? I just found your Project Manager, and I have to agree, the asterisk convention causes a lot of issues. What leomike said, and also at least when using Katateochi's Craft Manager, the vessel preview thumbnails are not displayed correctly.

Since the asterisk is also used as a wildcard character in regular expressions and other search patterns across multiple operating systems, I don't even want to start thinking about other side effects... similar can be said for the tilde character, which at least on unix-ish systems (Linux, probably MacOS too) also has special significance.

 

It's not a simple problem to solve if one wants to avoid characters with special meanings, since almost everything other than letters and digits is used somewhere or other...

Maybe it would just be best to interpret the first single group of non-whitespace characters after the closing bracket as the type indicator, if it's a number, use numbers starting from zero or one respectively or simply begin counting up from there, if it is a Latin single uppercase letter, use alphabetic letters, and use Roman numerals with single Latin lowercase letters? That could even allow for recognizing words like "Alpha" or "Able", or other alphabets like Cyrillic or Arabic if you were to include such schemes one day.

Another consideration, in combination with above, would be to interpret the last character inside the tag as the type indicator, and fall back to regular numbering if it can't be interpreted as a valid indicator.

 

I'd already have to rename a lot of my craft files, but hey, would do so in a blink. Until then I'll just have to stick with conventional numbering, at least the roman numbers are currently unusable for me.

Link to comment
Share on other sites

1 minute ago, Corax said:

Are you still active on this? I just found your Project Manager, and I have to agree, the asterisk convention causes a lot of issues. What leomike said, and also at least when using Katateochi's Craft Manager, the vessel preview thumbnails are not displayed correctly.

Since the asterisk is also used as a wildcard character in regular expressions and other search patterns across multiple operating systems, I don't even want to start thinking about other side effects... similar can be said for the tilde character, which at least on unix-ish systems (Linux, probably MacOS too) also has special significance.

 

It's not a simple problem to solve if one wants to avoid characters with special meanings, since almost everything other than letters and digits is used somewhere or other...

Maybe it would just be best to interpret the first single group of non-whitespace characters after the closing bracket as the type indicator, if it's a number, use numbers starting from zero or one respectively or simply begin counting up from there, if it is a Latin single uppercase letter, use alphabetic letters, and use Roman numerals with single Latin lowercase letters? That could even allow for recognizing words like "Alpha" or "Able", or other alphabets like Cyrillic or Arabic if you were to include such schemes one day.

Another consideration, in combination with above, would be to interpret the last character inside the tag as the type indicator, and fall back to regular numbering if it can't be interpreted as a valid indicator.

 

I'd already have to rename a lot of my craft files, but hey, would do so in a blink. Until then I'll just have to stick with conventional numbering, at least the roman numbers are currently unusable for me.

Thanks for the feedback, yeah I need to do a general house-keeping recompile for 1.9, etc.

For a quick fix, we could change the special characters (e.g. something more mundane such as # or @) and maybe take a look at more sophisticated parsing in future?

Hope this helps.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...