Jump to content

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


severedsolo

Recommended Posts

6 hours ago, Filigan said:

Edit: Setting one of the Satelites as depracted (change its type to scrap) the monthly cost drops to 14000, so monthly budgets calculates 10000 per active vessel, despite the fact that i changed this in the options to 1000

Whoops that was a silly mistake. Fixed now, sorry about that. Good excuse for a release though, as I've been messing with costs:

Monthly Budgets 2.2 Released!

  • Kerbal wages now increase with experience level.
  • Reduced default wages by 1/5 (recommend existing saves do the same)
  • Fixed player set vesselCost being ignored.

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Hello. I have been playing with your mod for a few days and have noticed something that I think is a bug. The Reputation Decay setting doesn't appear to always work as expected.

Sometimes it seems that the decay gets set to 0% and when getting the monthly budget, will destroy all my reputation. I took a look at the code and I think the problem is in OnGameStateLoad and OnGameSettingsApplied .

In both functions, I think you need to use a float 100.0f when converting from HighLogic.CurrentGame.Parameters.CustomParams<BudgetSettings>().RepDecay since that is an integer, otherwise it ends up a 1/100 as in integer which is 0. So something like:

RepDecay = HighLogic.CurrentGame.Parameters.CustomParams<BudgetSettings>().RepDecay / 100.0f;

Also, the code in OnGameStateLoad was not converting it to a percentage.

 

Btw, I am loving the mod. Thanks for making it.

Link to comment
Share on other sites

4 hours ago, SirBriguy said:

Sometimes it seems that the decay gets set to 0% and when getting the monthly budget, will destroy all my reputation. I took a look at the code and I think the problem is in OnGameStateLoad and OnGameSettingsApplied .

In both functions, I think you need to use a float 100.0f when converting from HighLogic.CurrentGame.Parameters.CustomParams<BudgetSettings>().RepDecay since that is an integer, otherwise it ends up a 1/100 as in integer which is 0. So something like:

RepDecay = HighLogic.CurrentGame.Parameters.CustomParams<BudgetSettings>().RepDecay / 100.0f;

Weird. It might be 0% I suppose, but I don't think that would remove all your rep (although I just realised I don't have a zero check in there, so it might be exceptioning and trying to remove 1000% of your reputation).

The fact it's not being converted in onGameStateLoad shouldn't matter, Budget(double timeSinceLastUpdate) has a check for that, and will do the conversion if it hasn't already been done. (Actually it shouldn't be doing it in OnGameSettingsApplied either)

First things first, are you able to reproduce it at will, if so can you please provide steps to reproduce. Can I also get a log from just after it happens? Your settings would be helpful too.

Edited by severedsolo
Link to comment
Share on other sites

I reproduced it by:

  1. Start a fresh career
    1. in the settings for the monthly budget, set the reputation decay on and set the reputation decay percentage to 1
  2. Used the cheat menu to add 500 reputation
  3. Time warped to the first budget period
  4. The reputation gets mostly removed

I uploaded a log file here: https://drive.google.com/open?id=0B6VIZ-8kBTMGWTNyTHNQX1BDZ00

Link to comment
Share on other sites

9 hours ago, SirBriguy said:

I reproduced it by:

  1. Start a fresh career
    1. in the settings for the monthly budget, set the reputation decay on and set the reputation decay percentage to 1

Oh yeah, that would do it. The conversion only happens if RepDecay is more than 1. I'm missing an = sign.

Monthly Budgets 2.2.1 Released!

  • Fixed bug where setting RepDecay to 1% would result in 100% of reputation being removed. (thanks @SirBriguy)
Link to comment
Share on other sites

  • 1 month later...

I'm using monthly budgets in a career save alongside multiple contract packs. I have to option to remove contract rewards active however the mod isn't applying this to all contract packs successfully and it basically makes the mod pointless (these contracts have big rewards and practically double my budget).

Does anyone know a fix / is anyone good with patches to make a general patch to remove reward funds?

Thanks.

Link to comment
Share on other sites

11 minutes ago, Qwarkk said:

I have to option to remove contract rewards active however the mod isn't applying this to all contract packs successfully and it basically makes the mod pointless (these contracts have big rewards and practically double my budget).

Which contract packs is it falling over on? I use CC myself (obviously) and don't have any major issues.

One thing to note: the mod will only override total contract rewards and advances. If a contract pays out on a parameter completion (Field Research is the only one I know of that does this) - then the mod will ignore it. The contract event doesn't give me a way to override parameter payouts directly, like I do for the main payouts. Instead I'd have to yank them away when the contract completes. I don't like doing this, because the game would tell you you got paid funds, but you would get paid rep instead, and this would be interpreted as buggy.

So assuming this is your problem you have two options:

1) Go through your contract packs and remove the lines that say "rewardFunds = xyz" under the PARAMETER nodes, and maybe add them to the main rewardFunds at contract level (but with Field Research that looks complicated, as it is based on the amount of subjects). Or you could write a MM patch for it.

2) I could add an option to yank parameter rewards away, and you accept the inherent bugginess that comes with it.

Link to comment
Share on other sites

4 hours ago, severedsolo said:

Which contract packs is it falling over on? I use CC myself (obviously) and don't have any major issues.

One thing to note: the mod will only override total contract rewards and advances. If a contract pays out on a parameter completion (Field Research is the only one I know of that does this) - then the mod will ignore it. The contract event doesn't give me a way to override parameter payouts directly, like I do for the main payouts. Instead I'd have to yank them away when the contract completes. I don't like doing this, because the game would tell you you got paid funds, but you would get paid rep instead, and this would be interpreted as buggy.

So assuming this is your problem you have two options:

1) Go through your contract packs and remove the lines that say "rewardFunds = xyz" under the PARAMETER nodes, and maybe add them to the main rewardFunds at contract level (but with Field Research that looks complicated, as it is based on the amount of subjects). Or you could write a MM patch for it.

2) I could add an option to yank parameter rewards away, and you accept the inherent bugginess that comes with it.

The mod is falling over with the Anomaly surveyor, Spacetux (rover missions & unmanned) and random contracts from the KerbinSpaceStation contract packs. These packs don't really use parameter payouts so no issues there.  I have tried to write an MM patch to remove rewardFunds from these packs but i have very limited experience with patching so it didn't work - never too late to learn though.

Link to comment
Share on other sites

@Qwarkk - well I know B&S shouldn't be falling over at least. I've not noticed this myself, but it occurs to me that I recompiled my own version against 1.2.2, but the release version never was. Maybe that's the problem. Try the new release. If not, I'll need to see a save and a log (from when some of the problem contracts generate) please.

Monthly Budgets 2.3 Released

  • Recompiled for 1.2.2
  • Improved Logging

 

Link to comment
Share on other sites

@severedsolo I'm loving the mod, and the way it changes my game play, I do have a question/possible request if its possible to put the option in, and I'm sorry if I do a poor job of explaining this.

I'd like to see an option to change/alter the payout conditions when the budget amount is less than your cap. specifically, say I have 1000 funds. the game is going to award me 500, but I'm only allowed to have 500 funds, as per my cap. but I have costs of 300 funds. as it stands right now, the game would give me nothing, but still take the 300 away, leaving me with 700 funds. I'd like to see an option where, it still wouldn't give me any money, but my costs would be covered by what I'd earned, if that makes sense? mod would check balance and costs, so it would be like, "well you've earned 500 funds, which covers your costs, but you don't get the extra because you've already got more than we authorized."

The way it runs now feels, to me, more like punishing you for doing better than you should be? "you've earned 500, but we're not going to give you any, and we're not even going to cover your expenses, even though you did earn money, because you're too successful."

I don't know if that'll make sense to you, and maybe it's just me?

Link to comment
Share on other sites

10 minutes ago, vardicd said:

The way it runs now feels, to me, more like punishing you for doing better than you should be? "you've earned 500, but we're not going to give you any, and we're not even going to cover your expenses, even though you did earn money, because you're too successful."

Hmm, are you saying you want to use the budget as a safety net? So if your funds are higher than your budget (and presumably your budget is also high enough) - get the Kerbal taxpayer to cover your costs, but you keep your funds?

Link to comment
Share on other sites

23 minutes ago, vardicd said:

I don't know if that'll make sense to you, and maybe it's just me?

If you didn't spend the budget you were authorized to spend, you obviously were budgeted too much.  We must now remove funding from you to correct the previous oversight.

 

 

Also known as "Why do we always get so many new office supplies in September?"

Link to comment
Share on other sites

44 minutes ago, severedsolo said:

Hmm, are you saying you want to use the budget as a safety net? So if your funds are higher than your budget (and presumably your budget is also high enough) - get the Kerbal taxpayer to cover your costs, but you keep your funds?

Yes, I think that's exactly what I'm suggesting. We don't lose any funds, but we don't gain any funds either, so the 'taxpayers' cover our operational costs for the pay period, and nothing more.

41 minutes ago, razark said:

If you didn't spend the budget you were authorized to spend, you obviously were budgeted too much.  We must now remove funding from you to correct the previous oversight.

 

 

Also known as "Why do we always get so many new office supplies in September?"

Yeah I understand the logic behind it, but at the same time, for a game, it feels like punishment? I guess I'd just like an option to change it for people like me, and everyone else has the option to leave it the way it is?

Edited by vardicd
Link to comment
Share on other sites

2 minutes ago, vardicd said:

Yeah I understand the logic behind it, but at the same time, for a game, it feels like punishment? I guess I'd just like an option to change it for people like me, and everyone else has the option to leave it the way it is?

I'm not sure how I feel about it, honestly.  I like the idea of a monthly budget.  It feels like the right idea.

 

However...  I'm not sure the way it's implemented works for me.

I'm using Kerbal Construction Time.  I often find myself looking at the budget screen, thinking "I have X now, tomorrow I'll have X+Y.  If I spend X now, I'll still have X+Y tomorrow.  If I don't, that X  will be wasted."  Proceed to spam the order button for KCT, like office supplies in September.

I'm just not sure how one would run things differently with a budget system.

Link to comment
Share on other sites

1 hour ago, vardicd said:

Yes, I think that's exactly what I'm suggesting. We don't lose any funds, but we don't gain any funds either, so the 'taxpayers' cover our operational costs for the pay period, and nothing more.

Consider it done. I've added a new difficulty setting, "taxpayers always try to cover costs". When enabled, if your funds are higher than the awarded budget (after deducting costs), no deduction will be made. Instead, the funds will be deducted from the "budget pool" being held for you. If the budget can't cover the costs, it deducts from available funds (as per current behaviour).

So, assuming repDecay and HardMode are off, if your budget was $1000, and your costs were $200, next months budget would be reduced to $800.00, but no funds would be taken from your bank balance. If you only had $100 in the budget, then the costs would be taken from you instead. (Basically, no free rides)

Monthly Budgets 2.4 Released!

Added new difficulty setting "Taxpayers always try to cover costs". See release post here for more info

Link to comment
Share on other sites

The describet 'problem' gets very itneresting when you thinki about cost efficient designs , like make use of the Reusable stages mod, or spaceplanes. 

Cover the monthly cost with leftover credits first. apply the budget afterwards (pay nothing at all if the ramaing credits - montly cost >= budget) seems to be the best/most realistic approach in my oppinion, since it encourages to work cost efficient, without making it (to) exploidable.

Edited by Filigan
Link to comment
Share on other sites

28 minutes ago, severedsolo said:

Consider it done. I've added a new difficulty setting, "taxpayers always try to cover costs". When enabled, if your funds are higher than the awarded budget (after deducting costs), no deduction will be made. Instead, the funds will be deducted from the "budget pool" being held for you. If the budget can't cover the costs, it deducts from available funds (as per current behaviour).

So, assuming repDecay and HardMode are off, if your budget was $1000, and your costs were $200, next months budget would be reduced to $800.00, but no funds would be taken from your bank balance. If you only had $100 in the budget, then the costs would be taken from you instead. (Basically, no free rides)

Monthly Budgets 2.4 Released!

Added new difficulty setting "Taxpayers always try to cover costs". See release post here for more info

Thank you much!

Link to comment
Share on other sites

37 minutes ago, TheRagingIrishman said:

@severedsolo wanted to ask something. Does the amount of money you have at the end of a month (as long as it's under the budget for next month) affect how much money you start next month with?

Only if you have hard mode turned on. Otherwise it's just rep*multiplier

Link to comment
Share on other sites

Feature request, could you make it so that this mod brings you out of time warp at the end of each month right after you get your budget? It could integrate with kerbal alarm clock to do this I think.

Ping @severedsolo

Edited by Errol
Link to comment
Share on other sites

1 hour ago, Errol said:

Feature request, could you make it so that this mod brings you out of time warp at the end of each month right after you get your budget? It could integrate with kerbal alarm clock to do this I think.

Ping @severedsolo

I just made an alarm in KAC that repeats every 30 days on the right date. 

Link to comment
Share on other sites

9 hours ago, Errol said:

Feature request, could you make it so that this mod brings you out of time warp at the end of each month right after you get your budget? It could integrate with kerbal alarm clock to do this I think.

Ping @severedsolo

It's still a good feature request - and one that I've been meaning to do for a while.

MonthlyBudgets 2.5 Released

  • Added new setting "Stop timewarp on budget". If you have KAC installed, this will add a new alarm. Otherwise will stop timewarp when the budget is awarded. KAC Wrapper used under MIT License, and written by @TriggerAu
Link to comment
Share on other sites

As a note, I actually set my alarm for a few hours before budget is awarded, since I am playing hard mode. This gives me a chance to blow the rest of my budget on part research (also playing with part entry costs) before the end of the month if I want.

 

Edited by Errol
Link to comment
Share on other sites

12 hours ago, Errol said:

As a note, I actually set my alarm for a few hours before budget is awarded, since I am playing hard mode. This gives me a chance to blow the rest of my budget on part research (also playing with part entry costs) before the end of the month if I want.

 

 

same

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