Jump to content

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


severedsolo

Recommended Posts

On 02/09/2017 at 3:19 AM, severedsolo said:

pump money into building rockets just before the budget, and then cancel them once the budget fires. You'll get your funds back, and this will take you over the cap

Do you work for the government? :o 

On 02/09/2017 at 3:19 AM, severedsolo said:

part of your budget to be "diverted" 

... confirmed. :D 

On 03/09/2017 at 5:40 AM, severedsolo said:

It doesn't look like it would be too difficult to create a new strategy, so assuming I can get that working - would you rather have a fixed percentage of your budget diverted to the "slush fund" every cycle, or only when a strategy is activated? (the idea would be that you would activate the strategy when you are considering a big project/building upgrade, and would require a little forward planning)

Kidding aside, I may have come in late, but I like the strategy solution.

Edited by monstah
Double post?
Link to comment
Share on other sites

1 hour ago, monstah said:

Kidding aside, I may have come in late, but I like the strategy solution.

I've compromised, it's all handled by the GUI, but when you withdraw the funds it automatically turns itself off, so you still need to plan in advance, it won't just passively build up if you don't tell it to.

Link to comment
Share on other sites

On 9/5/2017 at 2:01 PM, severedsolo said:

@klgraham1013@larkvi @Jade_Falcon @Rabada (sorry if I've forgetten anyone - and anyone else who is interested)

I've pushed a pre-release with the "big project funding" options in the GUI. - if you are interested you can get it here: https://github.com/severedsolo/MonthlyBudgets/releases/tag/3.0b1

I also re-wrote the saving mechanism completely, because when I first wrote it, I had no idea what I was doing and it had a dozen band-aids stuck all over it - so back up your saves, as something may break (at the very least I think it may trigger a budget straight away).

As I re-wrote a big chunk of the mod, I'm expecting something to not be working properly that I've missed, hence the pre-release.

Downloaded now.  I'll give it a go this weekend.  Thanks for all your work.

Link to comment
Share on other sites

13 hours ago, klgraham1013 said:

@severedsolo

So far so good.  I'll play more today with only Monthly Budgets and KER installed.  I'll throw some other career mods at it later and see how it goes. 

Awesome. If it was going to break I would have expected it to do so quite quickly. If nobody reports any problems I will do a full release when 1.3.1 hits

Link to comment
Share on other sites

  • 4 weeks later...

Monthly Budgets 3.0 Released

  • Recompiled against KSP 1.3.1
  • Added Big Project Funding options to GUI - when turned on this will divert a percentage of your budget to a separate pot. You can then withdraw the funds from the pot when needed (for building upgrades etc) - note that if you reach a budget cycle when you've withdrawn the funds, it still counts as cash in hand, so plan accordingly.
  • Rewrote saving mechanism

Note the major version number change. Saving mechanism has changed and may not be compatible with previous versions

Additional Info: KSP 1.3.1 changed the way the settings menu works. This means the version compiled against 1.3.1 will not work with 1.3.0 and vice versa. If you are still on 1.3.0 use the 3.0 pre-release - they are basically identical (except for a minor bug with rounding in the GUI)

Link to comment
Share on other sites

  • 2 months later...
9 hours ago, Starwaster said:

Are there any plans to move defaults to or otherwise allow the plugin to read from an external configuration file to override its defaults?

Wouldn't be terribly difficult to do if there is a need for it? I noticed on Github somebody forked it to make it more RO friendly and was planning to add those changes, don't know if anything happened to it. If you can give me a use case I'll be happy to do it.

Link to comment
Share on other sites

5 minutes ago, severedsolo said:

Wouldn't be terribly difficult to do if there is a need for it? I noticed on Github somebody forked it to make it more RO friendly and was planning to add those changes, don't know if anything happened to it. If you can give me a use case I'll be happy to do it.

Usage would be to allow players to change the defaults for new games instead of having to wait until after the new game was started before making changes when it's known that the same changes are going to be made to each new game. And if it's done as a set of configs then it could also be patched via MM.

Link to comment
Share on other sites

24 minutes ago, Starwaster said:

Usage would be to allow players to change the defaults for new games instead of having to wait until after the new game was started before making changes when it's known that the same changes are going to be made to each new game. And if it's done as a set of configs then it could also be patched via MM.

Makes sense, thinking about it I have no idea why I haven't already done this considering I get annoyed by having to change it for myself every time.

Tracking under #1

Link to comment
Share on other sites

@severedsolo

So, this isn't a big deal I guess, more of a minor inconvenience but budget time is rolling around and I'm trying to run my existing budget into the ground so I don't get penalized when I suddenly hit a milestone... a speed record. And I got a payout which I guess the contract interceptor can't do anything about since it's not technically a contract.

One way of dealing with it would be to hook into GameEvents.Modifiers.OnCurrencyModifierQuery and switch the funds for some rep. I've tested that and it works but the displayed message is constructed before the award actually is made so it still displays that funds were awarded.

Another way would be to change the BaseReward values in the FinePrint.ContractDefs. There's a few dozen of them but I think only Progression would matter since the others end up being contracts that get intercepted?

If you're interested, let me know and we can discuss it further. 

Link to comment
Share on other sites

  • 4 weeks later...
16 hours ago, firefighter4life said:

so while playing rss with this mod, it gives my budget every about 8 to 9 days, how do i fix this? thanks!

Go into settings (from Main Menu, not while having a game loaded up. Exit to Main Menu if needed) and  under Gameplay look for something that says Display Earth Time and click on the bubble next to that. It's under Gameplay  and is the third option down. You want it to be filled in green. (and then it won't say Earth Time anymore; it's potentially confusing because it changes the menu option to say Display Kerbin Time because that's what it will do if you uncheck it... toggle menu display text should NOT change when clicked and it's the only thing on the menu that does)

So in summary, when you go in the menu it looks like this

4oevNtU.png?1

Once you're done it should look like this:

37V0kVE.png?1

Once your saved game is loaded up, check the settings for Monthly Budget and make sure that it's set how you want.

Edit: It looks like it actually use double the interval that you set in the MB section; I had to set it to 15 days to get a 'monthly' budget. (maybe that's some quirk of using Earth time; not sure why it does that, but 15 days is what I had to go with)

Edited by Starwaster
Link to comment
Share on other sites

7 hours ago, Starwaster said:

Edit: It looks like it actually use double the interval that you set in the MB section; I had to set it to 15 days to get a 'monthly' budget. (maybe that's some quirk of using Earth time; not sure why it does that, but 15 days is what I had to go with)

That sounds like a bug. MB is supposed to read the day length of your homeworld and adjust itself to suit it. I'll take a look at it.

Edit: my bad. This is 1.2.2 - those changes weren't made until 1.3 came out.

Also @Starwaster - I've not ignored your feature requests, I just haven't got round to doing them yet.

Edited by severedsolo
Link to comment
Share on other sites

5 hours ago, firefighter4life said:

is there a way to change mb settings without starting a new save? 

go into the pause menu and click on the difficulty settings (at the top) - that should take you back to the initial settings screen. From there you can select MonthlyBudgets and change the settings.

Link to comment
Share on other sites

  • 2 weeks later...
On 14/01/2018 at 3:47 PM, Starwaster said:

So, this isn't a big deal I guess, more of a minor inconvenience but budget time is rolling around and I'm trying to run my existing budget into the ground so I don't get penalized when I suddenly hit a milestone... a speed record. And I got a payout which I guess the contract interceptor can't do anything about since it's not technically a contract.

Well, I've made some changes to get this working, but it's not pretty. I'm not 100% sure whether to release it to be honest.

Didn't want to use OnCurrencyModifierQuery  because I could imagine the support requests when the message that was delivered was incorrect, and overriding FinePrint.ContractDefs in code just didn't work (I suspect the contracts.cfg was overriding it - even when I put it in OnGameStatePostLoad)

So, what I've done is use a MM patch to turn off the BaseRewards to remove the milestone rewards completely, and then made a new class that will award appropriate amounts of rep when you hit a milestone (luckily, the game seems to award the same amount of currency on each milestone).

The problem with this is with delivering the messages to the messaging system. Sending messages is not a problem, and I can even append new lines to the existing message like stock does. However, if the player deletes the message that we are appending to, I was expecting it to throw an exception that I could catch and generate a new message, but that doesn't happen, so if you delete the message, you don't get any further notifcations.

The only solution I could come up with was to post a new message each time a milestone is hit, which is not ideal, the stock implementation is much more elegant. Unless you have any ideas?

Link to comment
Share on other sites

8 hours ago, severedsolo said:

Well, I've made some changes to get this working, but it's not pretty. I'm not 100% sure whether to release it to be honest.

Didn't want to use OnCurrencyModifierQuery  because I could imagine the support requests when the message that was delivered was incorrect, and overriding FinePrint.ContractDefs in code just didn't work (I suspect the contracts.cfg was overriding it - even when I put it in OnGameStatePostLoad)

So, what I've done is use a MM patch to turn off the BaseRewards to remove the milestone rewards completely, and then made a new class that will award appropriate amounts of rep when you hit a milestone (luckily, the game seems to award the same amount of currency on each milestone).

The problem with this is with delivering the messages to the messaging system. Sending messages is not a problem, and I can even append new lines to the existing message like stock does. However, if the player deletes the message that we are appending to, I was expecting it to throw an exception that I could catch and generate a new message, but that doesn't happen, so if you delete the message, you don't get any further notifcations.

The only solution I could come up with was to post a new message each time a milestone is hit, which is not ideal, the stock implementation is much more elegant. Unless you have any ideas?

I agree, that's probably not the ideal solution and I think I actually experimented with something like that since posting about it.

What I settled on locally was to patch the Progression node in the Contract.cfg, awarding an additioinal 16 rep in place of the 80,000 funds. There's also  contract portion but I'm pretty sure it gets intercepted so I didn't bother with it

(if you incorporate this then technically you don't need the NEEDS, but this went into my permanent repository of tweaks so I didn't want it applying in the event that I run without MB)

@Contracts:NEEDS[MonthlyBudgets]
{
	@Progression
	{
		@Funds
		{
			@BaseReward = 0
		}
		@Reputation
		{
			@BaseReward = 32
		}
	}
}

 

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