Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Question about rollout cost and PartVariables #160

Open
NathanKell opened this issue Jul 4, 2017 · 8 comments
Open

Question about rollout cost and PartVariables #160

NathanKell opened this issue Jul 4, 2017 · 8 comments

Comments

@NathanKell
Copy link
Contributor

NathanKell commented Jul 4, 2017

So, extreme apologies for asking for this stuff and then not taking advantage for like a year. RealLife4Lyfe etc.

So, it having been some time, I've forgotten exactly how these tie together. I did some digging but didn't come up with the answer, so...to the issues page!

As it stands, it looks like there's no way to set rollout costs independent of vessel cost (well, except by using mass). However, is the vessel cost that rollout cost uses based on the actual part costs, or is it the effective cost (taking PartVariables into account)?
I presume that rollout time does use effective cost, as does BPFormula (which says it does explicitly).

Now, ideally, I'd love to see PartVariables/Module variables have three multipliers: One for BPFormula, one for RolloutTime, and one for RolloutCost. But even if they only have one, as long as it's used in all three cases that should work for now.

Further, it'd be amazing if we could determine ahead of time if something was a crewed mission, but I get that we can't, because you only stick crew in during launch. So we'll just do it based off crew capacity.

@ppboyle
Copy link

ppboyle commented Jul 4, 2017

I'm in the conversation with NathanKell - what we're discussing doing is having a rollout cost that makes liquid fueled rocket engine more historic by applying the relatively high launch costs associated with them - but we don't want to make regular jet engines, SRBs, or tanks have nearly as high of a launch cost multiplier associated.

If a rollout cost does exist, do you display it anywhere? We're talking about having a rollout cost that is several times the actual build cost of the rocket, players should know how much they'd be paying.

@magico13
Copy link
Owner

magico13 commented Jul 8, 2017

The variables that are used in rollout cost are here: https://github.com/magico13/KCT/blob/development/Kerbal_Construction_Time/KCT_MathParsing.cs#L113

In short, the actual cost is what's used since it's a whole vessel calculation, not based on the individual parts. Effective "cost" shouldn't really be called cost, it's a holdover from when KCT was only cost based and not configurable. Rollout times also are a whole vessel calculation so they also don't account for any per-part things. I'll have to think about this some more, since what you're asking would require having those formulas know about individual parts. It's certainly possible, but I'll need to think of a good way of doing that. It might be another two-part formula like the BP calculation is, where there's one for an "Effective Value" and another that takes that effective value and does something with its sum.

As for showing rollout costs, I can definitely do that in the editor and will try to think of a good place for it to go before rollout. Either a popup that says it'll cost X funds with a confirmation, or just listing the cost next to the vessel name or on the rollout button are the two easiest things that come to mind.

@NathanKell
Copy link
Contributor Author

NathanKell commented Jul 8, 2017

On showing cost, that'd be great!

On the other--yeah, makes sense. If you scrap a vessel you need to know the non-effective (i.e. true) cost to refund the player with. Could you do something like record the BP value of the vessel on construction, and then have the BP as input to rollout? Or even more ideal, as I mentioned have multiple multipliers (one for build, one for rollout), and then on vessel build (when you still have access to all parts and are computing BP effective costs), store the effective cost based on the rollout multipliers in the vessel node as well, which rollout would then use as an input alongside true cost.

@NathanKell
Copy link
Contributor Author

Clarified above. I goofed. :D

@magico13
Copy link
Owner

magico13 commented Jul 8, 2017

BP is already an input for the rollout cost and the rollout formula under the aptly named "BP" variable. I could reuse the Effective Cost Formula and use new multipliers this time, but it's just as easy to make new formulas. Either way I can break the PartVariables and such into separate build/rollout/etc variables as well.

@NathanKell
Copy link
Contributor Author

Wait how did I miss BP. ARGH. Thanks :)

@NathanKell
Copy link
Contributor Author

Yep, staring me in the face in the wiki. Hidden betwixt VAB level and Pad level. :]

@ppboyle
Copy link

ppboyle commented Jul 9, 2017

Still listening in but don't have much to add -it seems having a per-part formula for rollout costs would be the most uniform way to handle it, as you say.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants