Jump to content

Kerbal Construction Time/StageRecovery Dev Thread


magico13

Recommended Posts

Rollout seems better now :) Recovery of a full ship has the same old items, pointing straight up on the runway if not edited. Also realchutes aren't reset.

Realchutes aren't supposed to be reset. Partly because I haven't added that module in, and partly because they have a strict limit on the number of spare chutes. Although I guess it would make sense that they'd get replaced. Feel free to add it into the ModuleTemplates.cfg file and post back what ends up working ;) You don't really have to if you don't want to, but it's not too hard to add any module you want reset to that file. Just open up a craft file in a text editor that has the "pristine" state and copy the parts that need reset (for the stock parachute you just have to change DEPLOYED to STOWED, for instance). I'm not sure if that's too much to ask for a normal user to do, but it's actually pretty straightforward, so let me know if you do it and if you have any trouble with it. I'll probably write up a guide (with examples) before release.

I don't know if I can fix the issue with ships being oriented wrong. The instant you pick them up they correct themselves, but they must be edited to do so, but that makes me think they're actually oriented correctly but the coordinate system needs updated. I might be able to apply a 90 degree rotation to ships going to the SPH, but then if you pick up the ship during editing it will rotate incorrectly I think (and then will point downward). It's a minor enough annoyance that I might release with it like that. The VAB orientation works properly, btw.

I didn't get a chance to add the build rate formulas to the config last night (a bit too much work at the time, I made some breaking changes to the math parser that took priority) so I'll probably get that done tonight. I did get StageRecovery and FMRS to play nicely together though, so the dev builds of that have FMRS support and it's awesome :D

Link to comment
Share on other sites

Let's see if I can come up with it without testing first, based on a saved ship of mine:


MODULE
{
name = RealChuteModule
armed = False
staged = False
launched = False
}

That's just a guess. Might need a few more things. Might also need to add the ProceduralChute module, but that should be a good starting point.

Link to comment
Share on other sites

I was thinking it might also need

oneWasDeployed = False

i got the feeling RC was using that for if it had been deployed. RC has always made things... interesting ;)

Maybe. It probably doesn't hurt to add it. I'm working on adding those other changes in now. I've got a button in the editor to reset fuel tanks to their full state, but I haven't gotten around to testing it yet. I'll push a new build once I get that tested.

Edit:

I think I have the first draft of the "simple" config now. There are absolutely no upgrade points in use, ever. All the rates are determined by stock building upgrade mechanics. Tech nodes take between 2 Kerbin days for the cheapest node, to 80 Kerbin days for the most expensive ones (but upgrading the R&D center early is a good idea). BP values are kept the same, but build rates progress with editor upgrades and R&D center upgrades (editor upgrades unlock more build rates, R&D center upgrades unlock faster rates). Here's the breakdown for that: 1 rate per editor level (so level 0 is 1 rate, max level is 3 rates). R&D lvl 0 possible rates are (1,0,0), lvl 1: (1.5, 0.5, 0), and lvl 2: (2, 1, 0.5). You also gain science for ship building as you level the R&D center.

I haven't tested any of this yet, so it likely has some issues, but I got the actual code side working properly now :)


KCT_FormulaSettings
{
NodeFormula = 9 * (1+[R]) / 86400
UpgradeFundsFormula = -1
UpgradeScienceFormula = -1
ResearchFormula = [R]^2/86400
EffectivePartFormula = min([C]/([I] + ([B]*([U]+1))), [C])
ProceduralPartFormula = (([C]-[A]) + ([A]*10/max([I],1))) / max([B]*([U]+1),1)
BPFormula = ([E]^(1/2))*2000*[O]
KSCUpgradeFormula = ([C]^(1/2))*2000*[O]
ReconditioningFormula = min([M]*[O]*[E], [X])
BuildRateFormula = max(0.5*([R]-[I]+1), 0)*sign([L]-[I])
}

Edit 2: I added RealChute to the default module templates. As expected, it was more difficult than other things ;) I had to add the ability to reset ConfigNodes within the MODULE node (in this case PARACHUTE). You can either delete your template file and have the latest build regenerate it, or you can add the following to your file.


MODULE
{
name = RealChuteModule
armed = False
staged = False
launched = False
oneWasDeployed = False
PARACHUTE
{
capOff = False
time = 0
depState = STOWED
}
}

Edited by magico13
Link to comment
Share on other sites

Hi

i'm learning to play with the formula.

With an EffectivePartFormula = [C], i have strange results.

The build point (on a new save with #97) is more like 5000*2^(log4(x/6.25))

(5000*2^(log10((x/6.25)^(1.6666))))

ie: cost 25 => 10k bp, cost 100 => 20kbp, cost 400 => 40kbp

As the git is the source repo for the release only, i can't debug/learn by myself ><

I need to put [C]*[C] to have a linear function between cost and bp? There are some hidden function behind some formula? I have a bug?

for the build rate formula, i guess the 'I' is the number of the assembly line, the 'N' is the number of point inside this assembly line, but what is 'L'?

[edit]: ok, i'm having trouble yesterday but i found the solution by reading carefully your wiki.

Can we have an other entry for the XPartFormula? With cost and mass, it's not easy to separate fund and time, in a gamedesign. Something like initialcost or KCT_complexity.


double complexity = 0;
if(p.hasValue("KCT_complexity")){
string strVal = p.getValue("KCT_complexity");
if(!Double.tryParse(strVal, out complexity)){
complexity = 0;
}
}

[edit] Found a workaround: i'm adding a stub resource with a high price => reduce BP. I will try with negative price.

Edited by Merill
Link to comment
Share on other sites

Did you figure out what was wrong? I HIGHLY suggest reading through the writeup I did on how the KCT_Formulas.cfg work (https://github.com/magico13/KCT/wiki/KCT_Formula.cfg-and-Math-Parser-Documentation). You're definitely trying to use functions that don't exist and are expecting it to follow order of operations rather than (how it actually works) left to right.

To view the latest source you have to switch to the 025_update branch on github. The master branch is always (usually) synced with the latest official release. You also can view it by going to the "workspace" on the Jenkins page.

It may also be nice to know that you don't have to totally restart KSP between changes. You can edit the file while KSP is running, but I might suggest exiting to the main menu, just to be safe.

Also, BP is given by two formula, the "effective cost formula" modifies things on a per part basis, which is summed and fed into the BP formula. So you might set the effective one to [C] and the total BP one to [E]. Definitely read the writeup.

Edited by magico13
Link to comment
Share on other sites

Is there anyway to turn off or tone down logging? I feel it unnecessaraly bloats logs.

With dev versions, no. They're forced on because it's a development version and bugs are expected and I need to see that output when debugging issues. In the release version 99% of the debug messages are turned off unless you manually turn them on in the settings. I could add some filtering options (the output from the math parser really isn't needed 90% of the time, but was VERY needed in these past few debug cycles), but seeing as I'm thinking of releasing the current code as being official I don't really want to add anything else.

Has anyone actually had any issues lately? I haven't had the time to sit down and test everything myself 100%, but if nobody's had any issues lately I might just release as-is. A few bugs in release is ok, since we might not catch them even if we test for weeks. I just need to spend some time to update the changelog and prep everything, maybe update the Getting Started Guide, then push to master (which will build and package everything on Jenkins) and take that zip and upload it to 3 different locations. It annoyingly takes a few hours, depending on how thoroughly I update all the documentation.

Link to comment
Share on other sites

Has anyone actually had any issues lately?

i'm not seing the KCT icon with the last build. I haven't try yet to see why.

[edit]: you're right, it's in the op ><

Edited by Merill
Link to comment
Share on other sites

i'm not seing the KCT icon with the last build. I haven't try yet to see why.

You probably didn't rename the icons folder when you put in the new build. From the OP: The name of the icons folder has changed. Make sure to change "icons" to "Icons" (capital I) in the files from the stable release. Otherwise the buttons will have messed up textures.

Link to comment
Share on other sites

Well having 1 issue I tried as suggested to launch from a kerbal konstructs base from the VAB/SPH, but I still end up at KSC. I am going to try setting the base then going back to the KSC seen to launch Ill edit with results.


Strangly it doesnt work quite right. It is llike it doesnt kick in until a scence change after selcting a new luanch site. Is anyone else having issues with KK becuase maybe it is some other mod I have installed or something. Ill update if I get more conclusive results.

Edited by Svm420
Link to comment
Share on other sites

Welp, I went ahead and released. I think most issues were sorted out, and I didn't want to keep it here in Limbo forever. There were fixes that have been complete for up to 3 months that still hadn't been released to the public. So, hopefully I didn't introduce any crazy bugs that no one caught. Even if I did, we'll just get reports in the release forum, I can fix them, and release a bug fix version ASAP, rather than making people wait 3 months for fixes :P

Thank you for all of your help everybody! I'm sure I'll have new builds for you pretty soon ;) Hopefully they're Kerbal Konstruct related and not bug fixes.

Link to comment
Share on other sites

Congratulation for the release!

[Edit 11_04_2015]

Thinking about the "cheat menu":

Actually, you have two type of settings:

- global settings

- savegame settings with global defaults.

It may be a good thing (to me, at least) to move all settings to savegame (with defaults).

Having a game with "easy" settings and "hard" settings is actually not possible (overall multiplier, inventory effect are global settings, as all formulae) in the same installation of ksp.

ps: there is a way to deactivate the cheat menu? A variable in the savegame?

Edited by Merill
Link to comment
Share on other sites

  • 1 month later...
Now that 1.0 is out expecting to be doing more testing than playing for a while. Separate install ready to go. :)

Same! I'll be lucky if I get to play at all this week (and finals start next week...) I'm gonna be doing StageRecovery first (hopefully after I get home from work in ~5 hours), then switching over to KCT. Both will have discussion hosted in this thread, and the builds will be available on the build server as usual. I'll let you know when I've got the first build up, but until then you may as well play 1.0, since I'm not going to get to ;)

Edit: Updated some of the text in the first post to include info for SR as well as KCT. But, like I said, it'll be a while before I can do any actual builds.

Edited by magico13
Link to comment
Share on other sites

I sure feel that, finals for me also. 2 to go, one this Wednesday and the last May 8.

I've been wondering how StageRecovery might need to be changed with the way parts are prolonged more for possible recovery.

Then of course, there is....RealChutes! :confused:;)

Link to comment
Share on other sites

I've been wondering how StageRecovery might need to be changed with the way parts are prolonged more for possible recovery.

I'm planning on trying to get the parachutes on unfocused craft to autodeploy at the correct altitude, since the bubble is 10 times larger now. That way you don't have to deploy them on decouple. But that will probably have to wait since I want to get the update out ASAP. There are some other changes I've made in the dev version already that are going to be pushed into the release.

As for RealChutes, I really hope they don't break things again :P

And unfortunately, due to the complexity of the new aero, the estimates for terminal velocity are going to be totally wrong in SR. Hopefully they're close enough for it to not matter that much. Also, with stock reentry heating I'll have to include the DR heating code in stock as well and try to link it to the stock settings.

I don't even want to imagine what KCT will look like... :confused:

Link to comment
Share on other sites

Maybe Squad should make it easy on everyone by hiring you to make this stock ;)

I don't think they're gonna go my way for StageRecovery or time based mechanics ;)

FIRST STAGERECOVERY BETA

Just a quick recompile with minimal changes (one line needed changed). No idea if it works at all. Go nuts! It's build number 11.

Link to comment
Share on other sites

I don't think they're gonna go my way for StageRecovery or time based mechanics ;)

FIRST STAGERECOVERY BETA

Just a quick recompile with minimal changes (one line needed changed). No idea if it works at all. Go nuts! It's build number 11.

What i dont get is why are contract deadlines sooooo long then. I mean the travel to eeloo takes longer to do then build 100 rockets. WUT!?

Cant wait play till KCT is updated.

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