Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

Wow that's nuts, I have mine set so that average rockets take something in the order of a month or 2 to build, with rollouts of a few hours to a day. I've mangled the config file in certain ways, but I should be getting a boost when the VAB is upgraded. Also I added in 20%+ rollout costs, also reduced when VAB is upgraded, or slightly by having a bunch of engineers on staff.

Here's the config for anyone interested.

Spoiler

KCT_Preset
{
	name = Slower Career Mode
	shortName = Career
	description = For a slower KSP career proression
	author = MarcAFK
	allowDeletion = True
	career = True
	science = True
	sandbox = True
	KCT_Preset_General
	{
		Enabled = True
		BuildTimes = True
		ReconditioningTimes = True
		TechUnlockTimes = True
		KSCUpgradeTimes = True
		TechUpgrades = True
		SharedUpgradePool = False
		StartingPoints = 15
	}
	KCT_Preset_Time
	{
		OverallMultiplier = 5
		BuildEffect = 0.2
		InventoryEffect = 80
		ReconditioningEffect = 1728
		MaxReconditioning = 4320000
		RolloutReconSplit = 0.25
	}
	KCT_Preset_Formula
	{
		NodeFormula = 2 + [R] * ([N]*0.05)+0.1/86400 /2
		UpgradeFundsFormula = min(2^([N]+4) * 1000, 500000)
		UpgradeScienceFormula = min(2^([N]+1) * 1.0, 256)
		ResearchFormula = min(10,[TScK])*0.02 + ([N]*0.02+0.05)/86400
		EffectivePartFormula = min([c]/([I] + ([B]*([U]+1))), [c])*[MV]*[PV]
		ProceduralPartFormula = (([C]-[A]) + ([A]*10/max([I],1))) / max([B]*([U]+1),1)*[MV]*[PV]
		BPFormula = ([E]^(1/2))*5000*[O]
		KSCUpgradeFormula = ([C]^(1/2))*2000*[O]
		ReconditioningFormula = min([M]*[O]*[E], [X])*abs([RE]-[S]) / (3-[L])
		BuildRateFormula = (([I]+1)*0.0125*([L]+2)*[N] + max(0.1-[I], 0))*sign(2*[L]-[I]+1)
		UpgradeResetFormula = min(2*([N]+1),32)
		InventorySaleFormula = ([V]+[P] / 10000)^(0.5)
		RolloutCostFormula = ([C] / (5 + min(5,[EnL]) + ([L]*5)) + ([M] * 50 , + 50))
		NewLaunchPadCostFormula = 100000*([N]^3)
	}
	KCT_Preset_Part_Variables
	{
		Part_Variables
		{
		}
		Module_Variables
		{
		}
	}
}

 

Combined with a 5 times resize and 8 times rescale, community tech tree, and monthly budgets it's pretty challenging.

Link to comment
Share on other sites

3 hours ago, MarcAFK said:

Wow that's nuts, I have mine set so that average rockets take something in the order of a month or 2 to build, with rollouts of a few hours to a day. I've mangled the config file in certain ways, but I should be getting a boost when the VAB is upgraded. Also I added in 20%+ rollout costs, also reduced when VAB is upgraded, or slightly by having a bunch of engineers on staff.

Here's the config for anyone interested.

  Reveal hidden contents


KCT_Preset
{
	name = Slower Career Mode
	shortName = Career
	description = For a slower KSP career proression
	author = MarcAFK
	allowDeletion = True
	career = True
	science = True
	sandbox = True
	KCT_Preset_General
	{
		Enabled = True
		BuildTimes = True
		ReconditioningTimes = True
		TechUnlockTimes = True
		KSCUpgradeTimes = True
		TechUpgrades = True
		SharedUpgradePool = False
		StartingPoints = 15
	}
	KCT_Preset_Time
	{
		OverallMultiplier = 5
		BuildEffect = 0.2
		InventoryEffect = 80
		ReconditioningEffect = 1728
		MaxReconditioning = 4320000
		RolloutReconSplit = 0.25
	}
	KCT_Preset_Formula
	{
		NodeFormula = 2 + [R] * ([N]*0.05)+0.1/86400 /2
		UpgradeFundsFormula = min(2^([N]+4) * 1000, 500000)
		UpgradeScienceFormula = min(2^([N]+1) * 1.0, 256)
		ResearchFormula = min(10,[TScK])*0.02 + ([N]*0.02+0.05)/86400
		EffectivePartFormula = min([c]/([I] + ([B]*([U]+1))), [c])*[MV]*[PV]
		ProceduralPartFormula = (([C]-[A]) + ([A]*10/max([I],1))) / max([B]*([U]+1),1)*[MV]*[PV]
		BPFormula = ([E]^(1/2))*5000*[O]
		KSCUpgradeFormula = ([C]^(1/2))*2000*[O]
		ReconditioningFormula = min([M]*[O]*[E], [X])*abs([RE]-[S]) / (3-[L])
		BuildRateFormula = (([I]+1)*0.0125*([L]+2)*[N] + max(0.1-[I], 0))*sign(2*[L]-[I]+1)
		UpgradeResetFormula = min(2*([N]+1),32)
		InventorySaleFormula = ([V]+[P] / 10000)^(0.5)
		RolloutCostFormula = ([C] / (5 + min(5,[EnL]) + ([L]*5)) + ([M] * 50 , + 50))
		NewLaunchPadCostFormula = 100000*([N]^3)
	}
	KCT_Preset_Part_Variables
	{
		Part_Variables
		{
		}
		Module_Variables
		{
		}
	}
}

 

Combined with a 5 times resize and 8 times rescale, community tech tree, and monthly budgets it's pretty challenging.

Thanks for sharing, that looks interesting.

Does anyone know if custom KCT presets are required to like in the KCT Presets folder or can they live anywhere in Game Data?

I am concerned about accidentally deleting the preset when updating the mod.

Link to comment
Share on other sites

3 hours ago, Nightside said:

Thanks for sharing, that looks interesting.

Does anyone know if custom KCT presets are required to like in the KCT Presets folder or can they live anywhere in Game Data?

I am concerned about accidentally deleting the preset when updating the mod.

They can be in any folder as long as they follow this structure: "GameData/*/KCT_Presets/*.cfg", where the "*" can be anything. So you should be able to create a new folder in GameData, put a KCT_Presets folder in it, and then fill that with whatever Presets you want. Their short names must be unique, otherwise only the last one found is loaded. They're fairly safe inside the normal KCT_Presets folder as long as you don't delete it between updates, but you can merge+overwrite just fine since I only ever ship out the defaults in there.

For instance, you could create "GameData/KCT_Configs/KCT_Presets/MyPreset.cfg" and it should load it just fine. You could probably call the upper folder KCT_Presets too if you really wanted, it just looks inside the first level of folders for a folder called KCT_Presets so the upper folder name doesn't matter.

Link to comment
Share on other sites

1 minute ago, magico13 said:

They can be in any folder as long as they follow this structure: "GameData/*/KCT_Presets/*.cfg", where the "*" can be anything. So you should be able to create a new folder in GameData, put a KCT_Presets folder in it, and then fill that with whatever Presets you want. Their short names must be unique, otherwise only the last one found is loaded. They're fairly safe inside the normal KCT_Presets folder as long as you don't delete it between updates, but you can merge+overwrite just fine since I only ever ship out the defaults in there.

For instance, you could create "GameData/KCT_Configs/KCT_Presets/MyPreset.cfg" and it should load it just fine. You could probably call the upper folder KCT_Presets too if you really wanted, it just looks inside the first level of folders for a folder called KCT_Presets so the upper folder name doesn't matter.

Thanks Magico, that's great. At some point I got in the habit of always deleting the old version before putting in the new one.

I keep a folder of all my "House Rules" for MM tweaks and such so that's the perfect place for this to live.

Link to comment
Share on other sites

3 hours ago, cnhorn said:

Is it just me, or is KCT not going to be able to run on 1.3 or am I just doing this wrong haha?  If so, will a version be released on CKAN?

It's just you. :wink: If you wanted to use it now you can get off CKAN and install yourself, then give feedback to make it better.  It's only a couple of clicks with the links on the first post.

Link to comment
Share on other sites

3 hours ago, cnhorn said:

Is it just me, or is KCT not going to be able to run on 1.3 or am I just doing this wrong haha?  If so, will a version be released on CKAN?

It'll be on CKAN after a full official release. While still in the dev version you have to grab it from the build server. Build 27 and later are compiled against KSP 1.3, but I haven't actually loaded them up to test them.

Link to comment
Share on other sites

Hi, I'm runnign 1.3.9.2 on KSP 1.2.2 but running into a strange issue. KCT appears to be getting stuck in some king of loop spamming lots of lines into log and grinding game to a halt.

 

[KCT] ScL:0
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

[KCT] TPiK:2
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

[KCT] TPiL:0
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

[KCT] TEnK:1
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

[KCT] TEnL:0

 

Have you seen this issue or know what it is?

 

logs here:

https://www.dropbox.com/s/457x51h04elc1on/output_log.zip?dl=0

 

EDIT:

This seems to be when upgrading facilities. At the end of the upgrade period, the issue goes away but the facility also doesn't upgrade, also money is lost. Upgrading the facility a second time just works as intended...

Edited by Marstiphal
Link to comment
Share on other sites

7 hours ago, Marstiphal said:

KCT appears to be getting stuck in some king of loop spamming lots of lines into log and grinding game to a halt.

That log info is just the contents of the variables dictionary when a formula is being parsed. It's harmless other than causing a slowdown due to it spamming so much. I'll look into the other stuff and get back to you.

Link to comment
Share on other sites

On 01/06/2017 at 3:14 AM, magico13 said:

That log info is just the contents of the variables dictionary when a formula is being parsed. It's harmless other than causing a slowdown due to it spamming so much. I'll look into the other stuff and get back to you.

Thanks. This is by far my favorite mod so slipped you a few quid to help with its continued development.

 

Also on a separate issue, having the KCT window open on the VAB tab with a vehicle ready for launch causes large frame rate drop. Switching to another tab, launching the vehicle or closing the KCT window and the frame rate goes back to normal. Let me know if I can help further, you need more information or fresh logs.

Link to comment
Share on other sites

@Marstiphal  It's because the rollout is being calculated for every vessel on every frame, so you're getting the same log spam. If you're on 1.3 I've already removed that logging which should reduce that a bunch, but I need to change how that works so it gets cached and only calculated once instead of once a frame.

Link to comment
Share on other sites

6 hours ago, magico13 said:

@Marstiphal  It's because the rollout is being calculated for every vessel on every frame, so you're getting the same log spam. If you're on 1.3 I've already removed that logging which should reduce that a bunch, but I need to change how that works so it gets cached and only calculated once instead of once a frame.

Ah OK, seems like I'm going to have to make that painful swap over to 1.3 with all my mods.....

 

Many thanks

 

Link to comment
Share on other sites

I'm having a problem with builds 26 and 25 of KCT. (the most advanced 1.2.2 builds)

I'm in charge of setting up mods for a game that is going to be streamed including several people, and in order to use all the planned mods it has to be on 1.2.2.

KCT appears to be working fine, however whenever I am in the VAB or SPH and attempt to build a craft it does nothing. No freeze, no crash, no error, nothing. However, when I open the KCT window it always says it will take "0 weeks, 0 hours, 0 minutes" ect. to build, no matter the craft.

Output log: https://drive.google.com/file/d/0B42gzqQCWVSGcVBEZTJMdDBCTUE/view?usp=sharing

It's in 64 bit on Win7, if it makes any difference.

I am going to test and see if it has the problem in an otherwise stock install, but for now here is the modlist: https://docs.google.com/spreadsheets/d/1C1JbOOpgD4JiVqVZUcTTKWFV0CV4jMbxburi1zac72Q/edit?usp=sharing

(I'm not using every mod on there, but most of them)

Edited by minepagan
clarification
Link to comment
Share on other sites

23 minutes ago, minepagan said:

I'm having a problem with builds 26 and 25 of KCT. (the most advanced 1.2.2 builds)

@Kardea had the same problem you're having but I don't know why. Can you download the latest version of MagiCore (works on 1.2 and 1.3) and then send me a new log? It's a combo failure of KCT calling something in ScrapYard, calling something in MagiCore, where the failure happens in MagiCore and climbs back up the chain.

Link to comment
Share on other sites

On 6/5/2017 at 2:28 PM, magico13 said:

@Kardea had the same problem you're having but I don't know why. Can you download the latest version of MagiCore (works on 1.2 and 1.3) and then send me a new log? It's a combo failure of KCT calling something in ScrapYard, calling something in MagiCore, where the failure happens in MagiCore and climbs back up the chain.

Well, I can certainly give you the log, as I was indeed able to fix the issue.
...Before 1.3. Now I literally can't even figure out why my game doesn't load. It CTDs during the initial loading screen. So feel free to take a look and you'll hopefully be able to see whatever I did to fix KCT (which did indeed involve switching out Magicore releases). While you're at it, feel free to let me know if you see why I'm CTDing... Log link is here: https://drive.google.com/open?id=0B49Vka7x_xExNUNCNGF6Y2FGVGc

Link to comment
Share on other sites

On 5/27/2017 at 11:31 AM, magico13 said:

Yeah, I'm not decided on whether I want to move forward with development solely on 1.3, or if I want to also work on 1.2.2 and just port the changes over. There was only really one thing I had to change (but in a bunch of spots) for it to build for 1.3 so it probably wouldn't be too hard. And with RP-0 now releasing for 1.2.2 that adds some additional pressure to keep working on the 1.2.2 version.

If I start adding support for localization in anything that could potentially make it harder to maintain, but I could probably come up with a way to make that work.

Let me be a voice for 1.2.2 , please

Link to comment
Share on other sites

I agree about 1.2.2 KSP. Also might be good to have some notation about 1.2.2 and 1.3 for the build as I can see easy confusion since most are not backward compatible. This causes a presumption a 1.3 mod will not work on 1.2.2.

Link to comment
Share on other sites

58 minutes ago, JeffreyCor said:

I agree about 1.2.2 KSP. Also might be good to have some notation about 1.2.2 and 1.3 for the build as I can see easy confusion since most are not backward compatible. This causes a presumption a 1.3 mod will not work on 1.2.2.

I'm not sure if Jenkins has a plugin to add additional labels to builds. It probably does. With how easy the transition from 1.2 to 1.3 is for mods (who aren't doing localization) I'm hesitant to add extra work to support 1.2.2 separately.

 

If my mods work in both I'm going to make sure to mention that explicitly. Some of the modlets, StageRecovery, and MagiCore work in both.

Edited by magico13
Link to comment
Share on other sites

Hey there. Thought I'd report this. Didn't find anything about it searching this thread that I could tell anyway, but I'd almost guarantee it's been reported before.

If you take a parts testing contract, and then start researching the node that the part comes from, the part is no longer available to test with. This is using build #29 and KSP 1.3, with only KCT installed. I looked for the debug logging option in the settings, but could only find an option for verbose logging, so I hope that's it.

Pretty easy to reproduce, though a bit of luck is involved. Just complete the first two contracts and gain some science. Then accept a parts testing contract for a part that lives in a node you don't have, but can research. Doesn't matter if you can complete the contract, just so long as accepting it makes the part available. If you go into the VAB now, it will appear with a blue/green background. Now go to the R&D building and research that node. If you now go back to the VAB, the part will be unavailable for testing. It won't be available again until the research of that node is completed.

Anyway, hope the logs are of some use to someone.

output_log.txt

KSP_log.txt

Link to comment
Share on other sites

1 hour ago, strudo76 said:

If you take a parts testing contract, and then start researching the node that the part comes from, the part is no longer available to test with. This is using build #29 and KSP 1.3, with only KCT installed. I looked for the debug logging option in the settings, but could only find an option for verbose logging, so I hope that's it.

It's an issue I have tried to fix before without much luck. There's a workaround, which is to make sure to put the part on a build before you unlock the node, since KCT will let you launch with parts you don't have unlocked. The "debug logging" that I generally recommend is a setting in the KCT settings, but if you're using the dev builds it's already forced on and can't be turned off (it's a compile-time constant in debug builds).

Thanks for the report anyway, it's only been mentioned a small handful of times (if it's actually been reported or just something I found in my own testing) so I'm not too surprised you couldn't find any discussion on it. Here's the github issue for it, #18. I really need to go through that list and close things that shouldn't be open anymore.

Edited by magico13
Link to comment
Share on other sites

If it helps, I.usually play with the option where payment is needed to unlock parts. As soon as the node is queued, all the parts in that node change then owned, and that seems to be where access to the part is blocked.

I actually had an idea for a stand alone mod, but it might be something that could be used to solve this issue. I thought that instead of the parts contracts giving a funds reward, it could provide free permanent access to the part?

Another option I thought for this mod would be instead of taking time to unlock the node, the parts could take time to unlock instead. That way unlocking to node won't have any effect on the test parts.

Just some thoughts anyway.

Link to comment
Share on other sites

1 hour ago, strudo76 said:

I actually had an idea for a stand alone mod, but it might be something that could be used to solve this issue. I thought that instead of the parts contracts giving a funds reward, it could provide free permanent access to the part?

Another option I thought for this mod would be instead of taking time to unlock the node, the parts could take time to unlock instead. That way unlocking to node won't have any effect on the test parts.

ScrapYard may actually result in an interesting situation where if you use the test part and then recover it, you can then use those parts again even if they're locked. You could abuse that by building a vessel that's just a bunch of the test parts, but once you complete the contract (or in this case you start researching the node) you'll have access to a finite supply of those parts. Though KCT right now would let you have an infinite number of new parts. A solution might be to give you 5 or so test parts into your inventory and you can only use test parts as long as you're using one of those inventory parts. If you try to use more than you have, you can't build the vessel at all, and if you accidentally destroy them all then you have to wait until you fully unlock the node before you can do the contract.

Unlocking the parts within a node is definitely possible, but I don't think that setting is used all that often so I'm not sure if it'd be worth the effort. I know I only used it when I was playing with Tree Toppler and was unlocking the tech tree entire chunks at a time as I upgraded buildings. Essentially I was playing without science at all and just playing with funds+rep.

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...