Efour

[1.6.x] Training Kerbalnauts (Training Laboratory + Field Training Facility)

Recommended Posts

This mod provides Training system to your kerbalnauts.
(KPBS Supported)

 

If you want to train your kerbal immediately, you can use these mods.
(Dependency : Module Manager - http://forum.kerbalspaceprogram.com/index.php?/topic/50533-12-module-manager-271-october-8th-better-late-than-never/)

[1.6.x] Training Laboratory
http://spacedock.info/mod/971/Training Laboratory

VGwKrJn.png

This mod provides Training method with consuming Science points.
Paying 20 sci, your kerbal can get 1 exp. Since leveling up method is very limited, you have to pay science point once enough to advance level.

If your Training Lab is in orbit, Payment will be reduced to half.
If your Lab is on other planet, Payment will be reduced to 1/4.

You can tweak values with editing .cfg. If you want, you can add this module to other crewed part. It can support up to 8 kerbalnauts.

 

Leveling up 'Immediately' is not realistic? Do you think Training needs time consuming? This mod will be answer for you.

[1.6.x] Field Training Facility
http://spacedock.info/mod/978/Field Training Facility

IA449bT.png

This mod is similar with Training Laboratory, But one thing is different. It consumes Time and Electric Charge.

If you want level 5 kerbalnaut from level 0, You need to train your kerbal 1 year. Becoming level 1 will only need to wait 13 days, But as you know, high level needs more training.

But, If you place your facility into orbit, It will be 4 times faster.
If you place it on other planet, 6 times faster.

You can tweak params with .cfg. Not so complex.

It consumes 4 EC/sec per kerbal. If you train 2 kerbals, It will drain 8 EC/sec. You will need powerful energy sources.

 

Now then, someone like me will want to use both.
Then, just install both of them. Result is shown below.
FoeIXB6.png

Payment of science point(TL) will be reduced with training experiences(FTF).

For example - 
Just using TL, Level 4 -> Level 5 consumes 640p of Science point.
But Level 4(50% with FTF) -> Level 5 consumes just 320p of science point.
If 90% with FTF? Just pay 64p of science point or wait some more days. you can get level 5 kerbalnaut.

More training means less sci point needed, linearly.

These two mod can co-work, It's because I created this thread. If you want one thing, you can install just one mod. If you want co-work of them, you can install both.

Edited by Efour
Tested 1.6.1
  • Like 18

Share this post


Link to post
Share on other sites

Ah finally the two together, nice.

I have on suggestion:

Can you give bonuses depending on wich bodies orbit/surface the lab is? not just kerbin, orbit, other planet? So If i bring my kerbals for a fieldtrip to duna they level quicker?

Share this post


Link to post
Share on other sites
45 minutes ago, maculator said:

Ah finally the two together, nice.

I have on suggestion:

Can you give bonuses depending on wich bodies orbit/surface the lab is? not just kerbin, orbit, other planet? So If i bring my kerbals for a fieldtrip to duna they level quicker?

Actually, I can do and I thought It would be needed someday. But that function makes .cfg more complex and more complex usages. That is not good for me. And actually that code will not be short and I have little hours for making mod nowadays.

I will make that function(bonuses about celestial bodies) someday but I can't say when it rolls out. Even if I make it, I will set all to 1 at default cfg.  Anyone who wants set bonuses about planets can edit cfg, Someday in future.

  • Like 1

Share this post


Link to post
Share on other sites

@Efour okay.

I think the "stock" lab has that kind of function for transform multiplier, you could just make use of it.

Im no coder so I absolutly have no idea what I'm assuming here^^, but the stock lab scales the transformation bonus depending on the body it is orbiting I think.

Share this post


Link to post
Share on other sites

Do I understand the combination of both mods correctly, that:

- if I do nothing, they train normally like in the lab
- but If I don't want to wait, I can take a shortcut (by paying research points) to "skip" the remaining time?

Share this post


Link to post
Share on other sites
On 2016. 10. 20. at 7:08 AM, cy-one said:

Do I understand the combination of both mods correctly, that:

- if I do nothing, they train normally like in the lab
- but If I don't want to wait, I can take a shortcut (by paying research points) to "skip" the remaining time?

Sorry for late response.

I can't understand 'like in the lab' exactly, but if you mean my FTF mod's training feature(consuming EC and time), You are correct.

Or, We can think 'skipping fee' is reduced with time.

Share this post


Link to post
Share on other sites

Yes, with "like in the lab", i meant how your mod enables "training by time" in the lab... Which can be shortened or skipped by "training by money" if both mods are installed.

Share this post


Link to post
Share on other sites

how can i increse the time needed to train kerbals from 1 year to 3 years? is the number in the cfg represented in sec? should i user Real world seconds or Kerbal? thx awesome mods :)

Share this post


Link to post
Share on other sites
11 hours ago, dtoxic said:

how can i increse the time needed to train kerbals from 1 year to 3 years? is the number in the cfg represented in sec? should i user Real world seconds or Kerbal? thx awesome mods :)

Kerbal sec is same with real sec. And the number in the cfg is represented in sec, that number means 1 kerbal year. (9201600s = 60sec * 60min * 6hour * 426days)

So if you want to set 3 years to train 0-lvl kerbal to 5-lvl, just set 27604800. 

Share this post


Link to post
Share on other sites

Sorry to necro. I think this mod could do with a little limelight. :) It's fascinating. It'd be good for folks like me who can't be bothered to send kerbals out of SOI just to become able to hold a wrench. :D 

Edited by JadeOfMaar
  • Like 2

Share this post


Link to post
Share on other sites

Sorry for a partial necro..

It would be nice if this could get a pass and review for 1.3.  I certainly do like the idea of such a training operation.

Both of these cause 1.3 to crash.  I've had this happen in a very heavily modded install, and in a fresh install (Module Manager was the only addition).

Share this post


Link to post
Share on other sites

@TheRagingIrishman Thank you very much!!!!

Edited by Dux Aquila
text edition
  • Like 1

Share this post


Link to post
Share on other sites

Sorry for very late update.

I'm busy awhile, so I almost forgot these mods. I can maintain this mod with recompile, but I don't have enough time to improve this.

This mod uses MIT license. If you want, you can fix/update/modify/improve these mod. Sources are included in .zip file.

  • Like 3

Share this post


Link to post
Share on other sites

I suggest to add

:FOR[FieldTrainingFacility]

to the GameData\FieldTrainingFacility\FTFtoLabMM.cfg


and

:FOR[TrainingLab]

to the GameData\TrainingLab\TrainingLaborlatoryMM.cfg

This is to make it possible to add patches for other parts using :AFTER

 

Edit: btw I just see the typo in the filename
GameData\TrainingLab\TrainingLaborlatoryMM.cfg

Edited by Gordon Dry

Share this post


Link to post
Share on other sites

A patch to start with.

Fiddle as you want.

// add/edit the numbers below with FINAL
@PART[*]:HAS[@MODULE[FieldTrainingFacilityModule]]:NEEDS[FieldTrainingFacility,!TrainingLab]:FINAL
{
	@MODULE[FieldTrainingFacilityModule]:HAS[~TimeFactor[]]
	{
		// TimeFactor = time to level 0 kerbal becoming level 5 kerbal (sec) (default = 1 year)
		TimeFactor = 1 // Kerbal year
		@TimeFactor *= 426 // Kerbal days per Kerbal year
		@TimeFactor *= 6 // Hours per Kerbal day
		@TimeFactor *= 3600 // Seconds per Kerbal hour
	}
	@MODULE[FieldTrainingFacilityModule]:HAS[~ECFactor[]]
	{
		// ECFactor = Electric Charge consuming (per kerbal)
		ECFactor = 4
	}
	@MODULE[FieldTrainingFacilityModule]:HAS[~SpaceFactor[]]
	{
		// SpaceFactor = multiplyer of time efficiency at space
		SpaceFactor = 4
	}
	@MODULE[FieldTrainingFacilityModule]:HAS[~LandedFactor[]]
	{
		// LandedFactor = multiplyer of time efficiency at landed on other planet
		// ex : training on orbit, level 0 kerbal -> level 5 kerbal after 1/4 year.
		LandedFactor = 6
	}
}

@PART[*]:HAS[@MODULE[TrainingLabModule]]:NEEDS[TrainingLab,!FieldTrainingFacility]:FINAL
{
	@MODULE[TrainingLabModule]:HAS[~TimeFactor[]]
	{
		// Science Cost = TrainingFactor * exp needed * conditions(inSpace, Landed on other planet)
		// example : landed on minmus, level 4->5 : 20 * 32 * 0.25 = 160
		TimeFactor = 1 // Kerbal year
		@TimeFactor *= 426 // Kerbal days per Kerbal year
		@TimeFactor *= 6 // Hours per Kerbal day
		@TimeFactor *= 3600 // Seconds per Kerbal hour
	}
	@MODULE[TrainingLabModule]:HAS[~TrainFactor[]]
	{
		TrainFactor = 20
	}
	@MODULE[TrainingLabModule]:HAS[~inSpace[]]
	{
		inSpace = 0.5
	}
	@MODULE[TrainingLabModule]:HAS[~Landed[]]
	{
		Landed = 0.25
	}
}

// Tinker with stock part which is patched by default
@PART[Large_Crewed_Lab]:HAS[!MODULE[FieldTrainingFacilityModule]]:NEEDS[FieldTrainingFacility,!TrainingLab]:AFTER[FieldTrainingFacility]
{
	MODULE
	{
		name = FieldTrainingFacilityModule
		// TimeFactor = 9201600
		@ECFactor = 2 // max 2 crew
		// SpaceFactor = 4
		// LandedFactor = 6
	}
}

@PART[Large_Crewed_Lab]:HAS[!MODULE[TrainingLabModule]]:NEEDS[TrainingLab,!FieldTrainingFacility]:AFTER[TrainingLab]
{
	MODULE
	{
		name = TrainingLabModule
		// TimeFactor = 9201600
		// TrainFactor = 20
		// inSpace = 0.5
		// Landed = 0.25
	}
}


// Tinker with KKAOSS_Science_g of PlanetaryBaseInc which is patched by default
@PART[KKAOSS_Science_g]:HAS[!MODULE[FieldTrainingFacilityModule]]:NEEDS[PlanetaryBaseInc,FieldTrainingFacility,!TrainingLab]:AFTER[FieldTrainingFacility]
{
	MODULE
	{
		name = FieldTrainingFacilityModule
		// TimeFactor = 9201600
		@ECFactor = 2 // max 2 crew
		// SpaceFactor = 4
		// LandedFactor = 6
	}
}

@PART[KKAOSS_Science_g]:HAS[!MODULE[TrainingLabModule]]:NEEDS[PlanetaryBaseInc,TrainingLab,!FieldTrainingFacility]:AFTER[TrainingLab]
{
	MODULE
	{
		name = TrainingLabModule
		// TimeFactor = 9201600
		// TrainFactor = 20
		// inSpace = 0.5
		// Landed = 0.25
	}
}


// add parts' compatibility

// TokamakIndustries
@PART[centrifugeSmall]:HAS[!MODULE[FieldTrainingFacilityModule]]:NEEDS[TokamakIndustries,FieldTrainingFacility,!TrainingLab]:AFTER[FieldTrainingFacility]
{
	MODULE
	{
		name = FieldTrainingFacilityModule
		// TimeFactor = 9201600
		ECFactor = 1 // max 4 crew
		// SpaceFactor = 4
		// LandedFactor = 6
	}
}

@PART[centrifugeSmall]:HAS[!MODULE[TrainingLabModule]]:NEEDS[TokamakIndustries,TrainingLab,!FieldTrainingFacility]:AFTER[TrainingLab]
{
	MODULE
	{
		name = TrainingLabModule
		// TimeFactor = 9201600
		// TrainFactor = 20
		// inSpace = 0.5
		// Landed = 0.25
	}
}

// StationPartsExpansionRedux
@PART[sspx-expandable-centrifuge-375-2]:HAS[!MODULE[FieldTrainingFacilityModule]]:NEEDS[StationPartsExpansionRedux,FieldTrainingFacility,!TrainingLab]:AFTER[FieldTrainingFacility]
{
	MODULE
	{
		name = FieldTrainingFacilityModule
		// TimeFactor = 9201600
		ECFactor = 0.4 // max 10 crew
		// SpaceFactor = 4
		// LandedFactor = 6
	}
}

@PART[sspx-expandable-centrifuge-375-2]:HAS[!MODULE[TrainingLabModule]]:NEEDS[StationPartsExpansionRedux,TrainingLab,!FieldTrainingFacility]:AFTER[TrainingLab]
{
	MODULE
	{
		name = TrainingLabModule
		// TimeFactor = 9201600
		// TrainFactor = 20
		// inSpace = 0.5
		// Landed = 0.25
	}
}

// Kerbalism
@PART[kerbalism-gravityring]:HAS[!MODULE[FieldTrainingFacilityModule]]:NEEDS[Kerbalism,ProfileDefault,FieldTrainingFacility,!TrainingLab]:AFTER[FieldTrainingFacility]
{
	MODULE
	{
		name = FieldTrainingFacilityModule
		// TimeFactor = 9201600
		ECFactor = 0.66666667 // max 6 crew
		// SpaceFactor = 4
		// LandedFactor = 6
	}
}

@PART[kerbalism-gravityring]:HAS[!MODULE[TrainingLabModule]]:NEEDS[Kerbalism,ProfileDefault,TrainingLab,!FieldTrainingFacility]:AFTER[TrainingLab]
{
	MODULE
	{
		name = TrainingLabModule
		// TimeFactor = 9201600
		// TrainFactor = 20
		// inSpace = 0.5
		// Landed = 0.25
	}
}

// Bluedog DB MOL Orbital Habitation Segment 
@PART[bluedog_MOL_Hab]:HAS[!MODULE[FieldTrainingFacilityModule]]:NEEDS[Bluedog_DB,FieldTrainingFacility,!TrainingLab]:AFTER[FieldTrainingFacility]
{
	MODULE
	{
		name = FieldTrainingFacilityModule
		// TimeFactor = 9201600
		ECFactor = 1.33333333 // max 3 crew
		// SpaceFactor = 4
		// LandedFactor = 6
	}
}

@PART[bluedog_MOL_Hab]:HAS[!MODULE[TrainingLabModule]]:NEEDS[Bluedog_DB,TrainingLab,!FieldTrainingFacility]:AFTER[TrainingLab]
{
	MODULE
	{
		name = TrainingLabModule
		// TimeFactor = 9201600
		// TrainFactor = 20
		// inSpace = 0.5
		// Landed = 0.25
	}
}

// Bluedog DB Skylab
@PART[bluedog_Skylab_OWS]:HAS[!MODULE[FieldTrainingFacilityModule]]:NEEDS[Bluedog_DB,FieldTrainingFacility,!TrainingLab]:AFTER[FieldTrainingFacility]
{
	MODULE
	{
		name = FieldTrainingFacilityModule
		// TimeFactor = 9201600
		ECFactor = 0.66666667 // max 6 crew
		// SpaceFactor = 4
		// LandedFactor = 6
	}
}

@PART[bluedog_Skylab_OWS]:HAS[!MODULE[TrainingLabModule]]:NEEDS[Bluedog_DB,TrainingLab,!FieldTrainingFacility]:AFTER[TrainingLab]
{
	MODULE
	{
		name = TrainingLabModule
		// TimeFactor = 9201600
		// TrainFactor = 20
		// inSpace = 0.5
		// Landed = 0.25
	}
}

 

Share this post


Link to post
Share on other sites
15 hours ago, Gordon Dry said:

I would like to see the source code.

btw perhaps™ this mod creates issues with Kerbalism:
https://github.com/steamp0rt/Kerbalism/issues/271

 

On 10/30/2018 at 10:08 AM, Efour said:

Sorry for very late update.

I'm busy awhile, so I almost forgot these mods. I can maintain this mod with recompile, but I don't have enough time to improve this.

This mod uses MIT license. If you want, you can fix/update/modify/improve these mod. Sources are included in .zip file.

 

Share this post


Link to post
Share on other sites

I like this idea. Similar to Kerbal RnD or KCT, it gives you a reason to keep collecting science and forces you to choose between unlocking the next node, and doing something else (leveling up Kerbals in this case) which helps your space program in a different way.

Share this post


Link to post
Share on other sites

This is a fascinating mod.  I like it a lot. I would consider adopting it, but feel I could not do it justice. I would however be willing to curate it as a community supported release if people were intrested

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now