Jump to content

[1.8.x] Monthly Budgets 5.0.1 (22/12/2019) - UP FOR ADOPTION


severedsolo

Recommended Posts

Monthly Budgets 4.4 Released

  • Added ability to block agents from the contract interceptor via Module Manager

Example usage (for Tourism Plus)

MB_DISABLED_AGENTS 
{
	Agent = Kerbal Space Tourism 
}

Incidentally, thank you to @Austinator48 for suggesting this, I've been a bit annoyed about the Interceptor picking up Kerbal Academy missions.

 

Edited by severedsolo
Link to comment
Share on other sites

Also, minor bug report.

KSP: 1.4.3 Windows 7 64-bit

Problem: Reputation decay option does not remain enabled after exiting game, then loading up your save again.

Mods installed:

Monthly Budgets 4.4

Reproduction steps:

Start new game, enable reputation decay, exit game, reload game.

(Also does not remain enabled even if decayEnabled = true in default .cfg file)

Log:

Output Log

Link to comment
Share on other sites

1 hour ago, Kwebib said:

(Also does not remain enabled even if decayEnabled = true in default .cfg file)

Thanks for the report, missing a couple of lines in the Scenario Module (fixed for next release).

 

1 hour ago, Kwebib said:

You just place that in a .cfg file anywhere in Gamedata, correct? I can't get it to work for Kerbal Academy.

Its working ok here. One thing to note it will only work on new contracts that get offered (also noticed yours has an extra space after AGENTS - not sure if MM is that picky. The below is copy/pasted from my working config.)

MB_DISABLED_AGENTS
{
	Agent = Kerbal Academy
}

 

Edited by severedsolo
Link to comment
Share on other sites

Sorry, looks like the issue was I was doing this:

MB_DISABLED_AGENTS
{
	Agent = Kerbal Space Tourism
	Agent = Kerbal Academy
}

I tried changing it to this, which halfway works:

MB_DISABLED_AGENTS
{
	Agent = Kerbal Academy & Kerbal Space Tourism
}

It offers me 100,000 funds for the first space tourist contract. However, if I click off of it and back onto it, it's back to reputation reward only. If I then decline the contract and let it regenerate, it offers the funds again.

Not sure if I'm using the correct MM syntax.

Edited by Kwebib
Link to comment
Share on other sites

Just now, Kwebib said:

I tried changing it to this, which halfway works:

Use separate nodes for each (my fault, I called it "agents" which is confusing)

MB_DISABLED_AGENTS
{
	Agent = Kerbal Academy
}

MB_DISABLED_AGENTS
{
	Agent = Kerbal Space Tourism
}
Link to comment
Share on other sites

On 5/16/2018 at 8:59 AM, severedsolo said:

Thanks for the report, missing a couple of lines in the Scenario Module (fixed for next release).

Looks like friendlyInterval is also not loading into a new save if you change the default .cfg.

Link to comment
Share on other sites

19 hours ago, Kwebib said:

Looks like friendlyInterval is also not loading into a new save if you change the default .cfg.

Yay another one (thank you - fixed).

Release may take a while. I made a thing but it's nowhere near ready yet:

949U7Qf.png

Link to comment
Share on other sites

There we go - much better.

jAPac9L.png

Back to sliders I'm afraid, Text Input boxes wouldn't render properly for me (I'm starting to remember why I prefer to use OnGUI). Now to do the settings (thats going to be fun).

Edited by severedsolo
Link to comment
Share on other sites

Spamming my own thread now XD - don't care.

Monthly Budgets 4.5 Released

  • Moved UI from legacy OnGUI system to PopUpDialog (some minor functional differences, see below for details)
  • Fixed decayEnabled not being loaded from the scenario module.
  • Fixed friendlyInterval not being loaded from defaults.cfg
  • Default vesselCost reduced to 5000

Changes to UI

I've tried to retain all existing functionality, it looks a bit different but it should basically work as it always did.

The two differences are:

1) Values are set by sliders rather than letting you input them directly. The new version of a text input box caused some serious visual issues, and frankly I've spent the best part of 8 hours straight getting this basically working, and didn't want to debug it any further. Obviously a slider is not as precise as a text box, but MB won't complain if you go into the persistence file and change the settings manually.

2) Settings are now split between two pages. Again, massive visual issues if this wasn't the case (because there are too many boxes to fit on the screen at once) - the bools (is this stuff enabled) is on the first page, click "Switch Page" and all the values (and sliders) will be in there.

On the plus side, I finally ditched OnGUI which means better performance, and less GC. Now to do the other 4 mods that are using it.

Edit: 4.5.1 is now available. This just fixes an issue where the toolbar button was destroying itself on a scene change.

Edited by severedsolo
Link to comment
Share on other sites

@severedsolo What do you think of doing something like this?

RTPQaza.png

I would reduce the Kerbonaut wages and the active vessel cost even further while using this. A 40000 fund cost at the beginning seems high, but really after you've orbited Kerbin, your reputation should be around 100, giving you over 200,000 funds in the next "month".

I didn't include the launch pad and runway in the building costs since they're not actually buildings that employees work in. The launch costs would simulate their maintenance.

Link to comment
Share on other sites

39 minutes ago, Kwebib said:

What do you think of doing something like this? 

I look forward to receving your Pull Request :P /jk
 

Short version is it's a coding nightmare, so no thank you (don't feel like I'm shooting you down, in an ideal world that all looks awesome, but muggins here is the one who would have to code it.) - happy to take any suggested amendments to the existing figures though.

Longer more technical explanation in the spoiler if your interested.

Spoiler

So, in all seriousness, I appreciate that the building costs are probably not very well balanced (it's set up in such a way that the total costs are around 10k at Lv3.

It scales with level already, but most importantly it's contained in 9 lines of code (including whitespace). What you are talking about would involve switch statements, endless if statements, and a multitude of scenarios where it just won't work properly.

Case in point: CustomBarnKit allows you to add more than 3 levels. It already doesn't really work very well with that scenario, but it can handle it. I'd have to code costs for each level. Even if I make it doable by MM, I've still got to account for every building individually, and that's assuming that mods don't add buildings. So as a minimum I'm going from a nice compact 9 lines of code, to 35 lines that still won't account for half the edge cases.

Most importantly (for me) is the fact that it won't work on my mod setup. I've mentioned this before, but I'm a very selfish modder. If I don't want it in my game, or it won't work for me, it's probably not going in (unless it's easy for me to code and won't affect me one way or the other. Which is why most stuff can be turned on/off).

Also , the launchpad and runway already don't count towards the costs, but the extra launch sites in MH do

Edited by severedsolo
Link to comment
Share on other sites

Yeah I knew it would be more complicated to code, just wasn't sure how much more complicated. I just barely understand what's going on when I look at the C# on github. Heck, using that table I made, it's not hard to do the math and manually change the building cost to give a KSC cost that you would have if my suggestion was actually coded in.

Speaking of balance, what settings do you use for reputation/funds? I think I remember you saying you reduce the reputation rewards.

Edited by Kwebib
Link to comment
Share on other sites

54 minutes ago, Kwebib said:

Speaking of balance, what settings do you use for reputation/funds? I think I remember you saying you reduce the reputation rewards.

Well, my setup is a little... specialised.

Firstly I have a house rule where I only allow myself to take new contracts if either a) I complete an exploration contract (I use Exploration Plus, so I don't have to deal with the endless "rendezvouz/dock around x body before you can progress") or b) I've completed all the contracts in my list.

Using that, I leave my MB settings at default except I turn Hard Mode on,  give myself 2k funds to start, and turn rep returns down to 40%, leaving funds on 100% (Using MB World Firsts pay rep directly, Contracts get converted to rep from the funds, so this means I get paid mostly for doing contracts, instead of hitting milestones).

That 2k gives me just enough Funds to launch a sounding rocket that can reach the upper atmosphere. The 40% world first from that gives me enough to go suborbital the next month, along with one Field Research KSC contract using a basic rover (using SETI and SXT).

Next month I go orbital (if the contract calls for unmanned) or I keep doing Kerbin science until I unlock pods if it calls for manned. At that point I usually then have to do a month of flying planes (surveys) to get enough to upgrade the VAB.

Once I reach the Mun era, my budget is skyrocketing and I'm picking up building upgrades pretty quickly. By the time I have landed on Mun and Minmus I'm pushing 1.2-1.3 million, so I use the BPF to get the last of the building upgrades.

By that point I've usually missed the first Duna Window so have a year and a half to wait before the next one. I start timewarping to the window (remember I can't accept any contracts until I've done that exploration contract) - and Hard Mode eventually decays the budget to 0 so I'm paying costs out of the million or so I've got in hand from the "Apollo" age. The money usually runs out just before I get to Duna, so when I hit that milestone and complete the contract, that boosts my budget back up again, and pays for the next wave of exploration (albeit at more like 150-200k a month rather than the million or so I had before).

It's quite funny really, it almost replicates the actual Nasa funding situation. Trying to land on Mun you have more money than you know what to do with, but when it comes to the more "advanced" missions you are dealing with a massively reduced budget.

Link to comment
Share on other sites

Very cool. Thanks for the detailed response. I'm using a couple of older contract packs on 1.4.3. Does Exploration Plus require any tweaking to work? I'm almost to the point where I'm not using any stock contracts haha.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Going to start a new career save with monthly bugets mod and kct.  For any players that have done that are there any suggestions for game settings/ kct settings?  Is it pretty well balanced with the kct default settings?

 

Thx for the input...

Link to comment
Share on other sites

  • 2 weeks later...
On 6/20/2018 at 8:15 PM, mr. engino said:

I have a question. I've been considering using strategies in my current career save, and I was wondering: how does this mod affect strategies like outsourced r&d? Do I gain science when the budget 'updates'?

It doesn't. Although I should probably change it to. At the moment it uses TransactionReasons.None - which essentially ignores all strategies.

On 7/1/2018 at 6:33 PM, gunt3rgam3r said:

For any players that have done that are there any suggestions for game settings/ kct settings?  Is it pretty well balanced with the kct default settings? 

It's pretty well balanced, but personally I recommend turning rep rewards down to 40% (just my personal preference)

Link to comment
Share on other sites

  • 1 month later...
On 5/20/2018 at 3:55 PM, Kwebib said:

What do you think of doing something like this?

I had one of my trademark changes of heart :D

So, breaking it down by level like that is a pain in the posterior, because KSP does not actually return the level of the facility in a sane format, you have to work it out. The math used to do that only really works for three levels.

So, what I've done is broken it down by building. Buildings will have a base cost, and it will scale with level (with the weirdness that happens if you have more than three levels, but that was happening anyway).

Incidentally, your costs for Lv1 buildings were spot on. At default settings you get around 12-13k left over from the next budget after the first "flying flea" launch.

Without further ado:

Monthly Budgets 4.6 Released

  • Facility Costs are now broken down by building. Facilities added by mods are treated as "other facilities"
  • Reduced vessel maintenance costs to $1000

NOTE
Make sure that you replace the "MonthlyBudgetsDefaults" file. I've added some new variables and removed one. Failure to do this will result in Building Costs defaulting to 0.

Due to the above, the first time you load 4.6, ALL SETTINGS WILL BE RESET TO DEFAULT and you will be presented with the settings dialog (like it does the first time you install it) - I did this because otherwise existing saves would have their building costs set to 0. If you don't want the hassle of changing the sliders yourself, you can set your previous values in MonthlyBudgetsDefaults.cfg before you start KSP for the first time after upgrading and they will be loaded when the reset happens.

 

Edited by severedsolo
Link to comment
Share on other sites

  • 4 weeks later...
On 8/22/2018 at 2:40 AM, severedsolo said:

I had one of my trademark changes of heart :D

So, breaking it down by level like that is a pain in the posterior, because KSP does not actually return the level of the facility in a sane format, you have to work it out. The math used to do that only really works for three levels.

So, what I've done is broken it down by building. Buildings will have a base cost, and it will scale with level (with the weirdness that happens if you have more than three levels, but that was happening anyway).

Incidentally, your costs for Lv1 buildings were spot on. At default settings you get around 12-13k left over from the next budget after the first "flying flea" launch.

Without further ado:

Monthly Budgets 4.6 Released

  • Facility Costs are now broken down by building. Facilities added by mods are treated as "other facilities"
  • Reduced vessel maintenance costs to $1000

NOTE
Make sure that you replace the "MonthlyBudgetsDefaults" file. I've added some new variables and removed one. Failure to do this will result in Building Costs defaulting to 0.

Due to the above, the first time you load 4.6, ALL SETTINGS WILL BE RESET TO DEFAULT and you will be presented with the settings dialog (like it does the first time you install it) - I did this because otherwise existing saves would have their building costs set to 0. If you don't want the hassle of changing the sliders yourself, you can set your previous values in MonthlyBudgetsDefaults.cfg before you start KSP for the first time after upgrading and they will be loaded when the reset happens.

 

How did I miss this update?

TY for the new tweaks!

I'm on a KSP hiatus at the moment due to 1.4.5 stalling things, and getting busy with some end-of-summer chaos, but looking forward to rebuilding my monthly budgets/scrapyard/KCT-based career. :)

Link to comment
Share on other sites

@severedsolo

On New Career Difficulty setting Hard and MB Setting Default.                                                                                                                                                                                                                                                                                                                                              If I Click on "Allow Other Launch Sites" in Game Settings Current Cost in MB goes from $42000 to $122000.                                                                                                                                                                                                                                                    Game Difficulty sliders and MB "Base Cost For Other Facilities (non Stock)" Slider will not change Current Cost.                                                                                                                                                                                                                                                        I also changed MB cfg. and cost remained at $122000. Only after clicking off "Allow Other Launch Sites" does it revert back to $42000

Is this intentional or bug, Thanks for awesome mod

Edited by Rocket88
Link to comment
Share on other sites

11 minutes ago, Rocket88 said:

@severedsolo

On New Career Difficulty setting Hard and MB Setting Default.                                                                                                                                                                                                                                                                                                                                              If I Click on "Allow Other Launch Sites" in Game Settings Current Cost in MB goes from $42000 to $122000.                                                                                                                                                                                                                                                    Game Difficulty sliders and MB "Base Cost For Other Facilities (non Stock)" Slider will not change Current Cost.                                                                                                                                                                                                                                                        I also changed MB cfg. and cost remained at $122000. Only after clicking off "Allow Other Launch Sites" does it revert back to $42000

Is this intentional or bug, Thanks for awesome mod

It's intentional that your costs are higher when you have other launchsites enabled if that's what you are asking - you are also paying for the other sites.

"Other Facilities" in this case refers to Facilities added by mods.

If you want to change the costs for the other sites, adjust your facility costs (VAB, SPH etc), they are all tied together.

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