Jump to content

[1.11.x] Earn Your Stripes 4.1 (01/03/2021) - Allowing Kerbals to earn an Orange Suit since 2017


severedsolo

Recommended Posts

Just now, severedsolo said:

If you have "strip existing honours" turned on, I would expect it to strip the veteranhood from them.

"Veteran" is just a boolean that's set in the ProtoCrewMember (which is the internal name for a Kerbal) - Earn Your Stripes won't care if it's from a mod, a ProtoCrewMember is a ProtoCrewMember.

Thank you. I want being a vet to be special because they are immune to crankiness from low supplies in Kolonization.

My goal was to strip the big 4 and make them earn it but also be able to get a lucky rescue to get a free Vet.

I set my Vet qualifications at 20 flights and 120 hours, seems to be the right amount of challenge to earn it.

Link to comment
Share on other sites

17 minutes ago, Smurfalot said:

My goal was to strip the big 4 and make them earn it but also be able to get a lucky rescue to get a free Vet.

This can be done with some save file editing.

Turn "Strip existing honours" off and go into your save, find the "Big 4" and change the Veteran flag to false.

Edit: I'll take your feature request though - it is possible to differentiate the Big 4 in the code, I can probably add that in. Raised #3

Edited by severedsolo
Link to comment
Share on other sites

On 5/28/2020 at 12:28 AM, severedsolo said:

This can be done with some save file editing.

Turn "Strip existing honours" off and go into your save, find the "Big 4" and change the Veteran flag to false.

Edit: I'll take your feature request though - it is possible to differentiate the Big 4 in the code, I can probably add that in. Raised #3

BTW, I have noticed that literally all of my kerbals have the orange EVA suit, none of them should be veterans and none are marked as such in the save file.  Is it perhaps because I used the Sci-fi suit in the Kerbonaut complex?

Link to comment
Share on other sites

4 hours ago, Smurfalot said:

BTW, I have noticed that literally all of my kerbals have the orange EVA suit, none of them should be veterans and none are marked as such in the save file.  Is it perhaps because I used the Sci-fi suit in the Kerbonaut complex?

That is the reason yes - there is no difference between the EVA suits for vets/regular kerbals, it's the IVA/Flight suits that get affected.

The SciFi suit happens to just be orange (which is why by default EYS uses it as a suit for vets)

Link to comment
Share on other sites

On 6/3/2020 at 12:09 AM, severedsolo said:

That is the reason yes - there is no difference between the EVA suits for vets/regular kerbals, it's the IVA/Flight suits that get affected.

The SciFi suit happens to just be orange (which is why by default EYS uses it as a suit for vets)

Thank you for clearing that up. I had them all set to Sci-fi so all of them appeared to be vets.

Once they get the required flights/time when does the status update to show vet status? Is it on game startup?

Link to comment
Share on other sites

Just now, Smurfalot said:

Thank you for clearing that up. I had them all set to Sci-fi so all of them appeared to be vets.

Once they get the required flights/time when does the status update to show vet status? Is it on game startup?

On recovery. The recovery dialog will show them in the white suits still (it's just a timing thing) - but if you go into the astronaut complex after dismissing the recovery dialog they will have the orange suits.

Link to comment
Share on other sites

2 minutes ago, severedsolo said:

On recovery. The recovery dialog will show them in the white suits still (it's just a timing thing) - but if you go into the astronaut complex after dismissing the recovery dialog they will have the orange suits.

The reason I asked is, Val just went over my 20 mission/ 120 hour threshold (by a lot) and the save file is not showing her flagged with vet status.

Link to comment
Share on other sites

2 minutes ago, Smurfalot said:

The reason I asked is, Val just went over my 20 mission/ 120 hour threshold (by a lot) and the save file is not showing her flagged with vet status.

Has she done a World First (or have you turned that off)? That's on by default. If you're sure she should be, send her on a flight, recover her and throw me a log (don't recover from the pad, FlightTracker ignores kerbals that do that).

Edited by severedsolo
Link to comment
Share on other sites

Just now, severedsolo said:

Has she done a World First (or have you turned that off)? That's on by default. If you're sure she should be, send her on a flight and throw me a log (don't recover from the pad, FlightTracker ignores kerbals that do that).

I have world firsts turned off, but she has like 8 of them regardless.  I will shoot her up shortly and see if that kicks it.

Which log do you need?

 

Link to comment
Share on other sites

Just now, Smurfalot said:

Which log do you need?

KSP.log or Player.log (I personally slightly prefer KSP.log and it's easier to get to as it's in the root game directory), but either will do)

Edited by severedsolo
Link to comment
Share on other sites

4 hours ago, severedsolo said:

KSP.log or Player.log (I personally slightly prefer KSP.log and it's easier to get to as it's in the root game directory), but either will do)

Sorry, it took me a minute. Here is the log.

 

Edit: I use an absolute cubic love-ton of mods, sorry about that too lol

According to Final Frontier she has had 19 missions, but according to the save file, she has had 23, it might be a matter of aborted launches. 

I made all of the kerbals be default suits, and set Stripes to be Sci-Fi, I am hoping that the next proper flight with Val will trigger it.

Edited by Smurfalot
Link to comment
Share on other sites

4 hours ago, severedsolo said:

Getting a 404 - can't see it.

Fixed it! Or more specifically it was not broken. It was just an issue of the number of flights Stripes was counting did not match up with the number of flights I thought she had based on the save file.

Edited by Smurfalot
Link to comment
Share on other sites

11 hours ago, Smurfalot said:

Fixed it! Or more specifically it was not broken. It was just an issue of the number of flights Stripes was counting did not match up with the number of flights I thought she had based on the save file.

Ah yes, it only starts counting when a Kerbal gets to orbit, and only if they actually leave the pad.

Link to comment
Share on other sites

2 hours ago, severedsolo said:

Ah yes, it only starts counting when a Kerbal gets to orbit, and only if they actually leave the pad.

Thank you for clearing that up, much appriecated.

So they have to actually launch, no sitting on the pad and recovering to up the flight numbers and time.

What about flight time in aircraft that leave the pad, but do not go into orbit?

Link to comment
Share on other sites

12 minutes ago, Smurfalot said:

What about flight time in aircraft that leave the pad, but do not go into orbit?

Sorry, ignore me. I'm remembering wrong. They have to leave the pad, atmospheric flights will give them credit.

What they don't get credit for is world firsts completed before they have been to orbit (otherwise you'd get like 12 for almost free at the beginning of the game)

Link to comment
Share on other sites

Just now, severedsolo said:

Sorry, ignore me. I'm remembering wrong. They have to leave the pad, atmospheric flights will give them credit.

What they don't get credit for is world firsts completed before they have been to orbit (otherwise you'd get like 12 for almost free at the beginning of the game)

I have the world firsts thing turned off, but it is relatively easy to get world firsts if you spread them around.

Link to comment
Share on other sites

1 minute ago, Smurfalot said:

I have the world firsts thing turned off, but it is relatively easy to get world firsts if you spread them around.

Just checked the code, the vessels met has to be above 0 to get credit. This usually happens when the vessel gets moving.

Link to comment
Share on other sites

  • 1 month later...

I took quite a pause from KSP. Last time I played it 16.11.2019 KSP 1.8.1. Now thought to update the game and continue from save, or well try to do that.

But it seems I am unable to load the save:
Error Accessing this save.
Input string was not in a correct format.

So dug into log and in log there is something like:
 

[EXC 06:57:22.671] FormatException: Input string was not in a correct format.
	System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	System.Int32.Parse (System.String s) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
	GameParameters+ParameterNode.Load (ConfigNode node) (at <c168e21ec56346b082f89043e76162e1>:0)
	GameParameters.LoadCustomNode (ConfigNode node) (at <c168e21ec56346b082f89043e76162e1>:0)
	GameParameters.Load (ConfigNode node) (at <c168e21ec56346b082f89043e76162e1>:0)
	GameParameters..ctor (ConfigNode node) (at <c168e21ec56346b082f89043e76162e1>:0)
	Game..ctor (ConfigNode root) (at <c168e21ec56346b082f89043e76162e1>:0)
	GamePersistence.LoadGameCfg (ConfigNode node, System.String saveName, System.Boolean nullIfIncompatible, System.Boolean suppressIncompatibleMessage) (at <c168e21ec56346b082f89043e76162e1>:0)
	MainMenu.OnLoadDialogPipelineFinished (ConfigNode node, System.String save) (at <c168e21ec56346b082f89043e76162e1>:0)
	MainMenu+<>c__DisplayClass83_0.<OnLoadDialogFinished>b__0 (ConfigNode n) (at <c168e21ec56346b082f89043e76162e1>:0)
	KSPUpgradePipeline.Process (ConfigNode n, System.String saveName, SaveUpgradePipeline.LoadContext loadContext, Callback`1[T] onSucceed, Callback`2[T,U] onFail) (at <c168e21ec56346b082f89043e76162e1>:0)
	MainMenu.OnLoadDialogFinished (System.String save) (at <c168e21ec56346b082f89043e76162e1>:0)
	LoadGameDialog.ConfirmLoadGame () (at <c168e21ec56346b082f89043e76162e1>:0)
	LoadGameDialog+<>c__DisplayClass40_0.<CreateLoadList>b__0 (System.Boolean isActive) (at <c168e21ec56346b082f89043e76162e1>:0)
	DialogGUIToggleButton.<Create>b__2_0 (System.Boolean b) (at <c168e21ec56346b082f89043e76162e1>:0)
	UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
	UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
	UnityEngine.UI.Toggle.Set (System.Boolean value, System.Boolean sendCallback) (at <71b90c0cb66049febf95ce5efefd552e>:0)
	UnityEngine.UI.Toggle.set_isOn (System.Boolean value) (at <71b90c0cb66049febf95ce5efefd552e>:0)
	UnityEngine.UI.Toggle.InternalToggle () (at <71b90c0cb66049febf95ce5efefd552e>:0)
	UnityEngine.UI.Toggle.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <71b90c0cb66049febf95ce5efefd552e>:0)
	UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <71b90c0cb66049febf95ce5efefd552e>:0)
	UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <71b90c0cb66049febf95ce5efefd552e>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.EventSystems.EventSystem:Update()

 

From it read out that the issue seems to be in Custom Game Parameter nodes in persistent.sfs, so I went ahead and removed all mod related ones, saved and was loadable in load screen already. Off I went with approximate binary search on the config elements and narrowed it down to such piece:

		StripeSettings
		{
			AutoPersistance = True
			NewGameOnly = False
			Debug = False
			NumberOfFlightsRequired = 5
			FlightHoursRequired = 12
			WorldFirsts = False
			GenerateCrew = True
			BasicSuit = True
			BgSuits = True
		}

Comparing to another save, where I have it as below I went ahead and sliced it more til I found the culprit.

		StripeSettings
		{
			autoPersistance = True
			newGameOnly = False
			numberOfFlightsRequired = 5
			flightHoursRequired = 12
			worldFirsts = False
		}

No luck there at first and then I noticed that in one config it had uppercase first letter, while other one lower case... 
Testing to change to lowercase seems to make the save loadable again. Probably there will be the issue that was mentioned about version 4.0.0 still coming but the unloadable save was not described anywhere. It might be that I skipped a KSP version or mod version or even many of them and the upgrade path was not followed.
Maybe it will help someone else having similar issues. I will see what will be next issues I will encounter as I haven't really gotten to load the game yet.

 

edit: this change kind of just invalidated all the existing options and recreated the config. 
It seems the expected datatype for WorldFirsts is supposed to be Integer, not Boolean. After loading game and it saving it became 1. BasicSuits and BgSuits seem to have changed into DefaultSuit and VeteranSuit with Integer as datatype as well. 

Edited by Mercor
Link to comment
Share on other sites

  • 4 weeks later...
14 hours ago, severedsolo said:

@Mercor 4.0 was a save breaking change. In general, if the major (first) number changes, I've made a serious change and the changelog should be read very carefully.

Well yea, I did see the change log in github and also the line: "POTENTIALLY SAVE BREAKING. NO UPGRADE PATH PROVIDED. SEE FORUM POST BEFORE LOADING YOUR SAVE

Came to forum and checked the main post and did not see any warnings. It is kind of difficult to just comb through posts and try to understand what kind of forum post was referenced if there is no link to it.

And I did even find that specific post:
 

Quote

A note on existing saves

This is a complete rewrite of the core mod, absolutely NO consideration has been given to existing saves. Frankly, there were alot of bad design choices in this (early days of modding, didn't really know what I was doing) - and keeping save compatibility would have meant keeping some of those choices. So I decided to  just throw it all out and start again.

Having said that, I think the worst thing that will happen, is you will need to reset your suits, and any kerbals who are vets will have to go on a mission to get their veteranhood back.

I'm not promising though. I haven't even tested this as an upgrade, and officially it's not supported. So if you do try it, back your save up first.

 

But well that did not help me at all. How was I supposed to "reset the suits" if for some reason I cannot even load the game? I did not care about losing Earn The Stripes progress, at least it could have had some instructions on how I can reset the suits. I had to find the hard way of how to reset suits by binary search on mod configs in save file. For me I got it fixed. Could have saved bunch of time by just instructing, that "you might have to remove the mod config area in your save file by manually editing in text editor to reset progress and make mod loadable again" and then point out what section to search for in the save file.

But you know could be useful to have some reference, like permalink to specific post in github or this disclaimer added on main post. Also some simple instructions where also the side-effect is described could have been useful. I guess other way to solve it would have been to just remove the mod, because it was giving errors. I do not think your goal is to get people to just abandon your mod. 

I do not think it is a bad thing to make correct choices and rewrite the core. If it means losing the progress of the mod, so be it. At least having working mod is better than mod that doesn't let you load the save.

Link to comment
Share on other sites

9 hours ago, Mercor said:

But you know could be useful to have some reference, like permalink to specific post in github or this disclaimer added on main post. Also some simple instructions where also the side-effect is described could have been useful. I guess other way to solve it would have been to just remove the mod, because it was giving errors. I do not think your goal is to get people to just abandon your mod. 

That's fair feedback. Honestly, like I said, I didn't test existing saves at all and that post was more "This is what I think I changed" (obviously I was wrong!)

I appreciate taking the time to figure it out though, I will add your instructions to the OP a little later for anyone else who comes across this issue.

Link to comment
Share on other sites

  • 4 weeks later...
8 hours ago, infinite_monkey said:

I accidentally started my new career with "Replace the original 4" activated. Is there a way to get them back, or at least have them available for recruitment?

Sorry, afraid not. You can add kerbals that have the same stats/name with the cheat menu, or you can just start a new game. Alternatively, you could try start a new game and copy their entries into your save from that one (remember to back your save up first)

I haven't played with 1.10 yet, but apparently there was something in there about vets no longer disappearing from the roster when they are fired, they may be in your applicants.

Edited by severedsolo
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...