Jump to content

[1.1.2] B.R.O.K.E. - Beta 4 - 05/26/2016 - Now with gameplay!


magico13

Recommended Posts

I hope your honeymoon is going well @magico13! Congrats man :)

Quick question on a possible configuration. I'm planning on starting up a "career" stream (After a 6 month break) but with some very... unique settings... For simplicity, I'm going to call it "Careerbox". It's essentially going to be a sandbox game, but with science reports enabled and science points as a scoreboard and a monthly budgeted income as a means of preventing instant rocket building tied in with Kerbal Construction time to limit that as well. It would replace a vast portion of the grind with simple time-warping and be a very compelling form of career mode for other veteran players since it would start with all parts unlocked (or possibly locked until you take time to research them).

There's a couple of core pillars that this "gamemode" would be based around. The most complicated bit, Funds would be reworked to be based around a monthly income, and with each deposit you lose a bit of reputation. Contracts would still be a means of gaining reputation and funds, but not required to progress. Only there if you want them. Also, the higher your reputation the more money you receive with each deposit and the lower your reputation the less money you receive with each. This way if you do well you can progress quickly, but if you start dropping below the norm, it could take you years of extra time warping to gain enough funds for your next big projects. The last point is that all parts start unlocked. You would still gain science though through reports and other usual means, but you wouldn't spend it. . It would be a sort of "scoreboard" for your game.I'd probably include No More Science Grind or another mod to prevent having to revisit the same locations and reducing boredom.

The end goal for this setup is simply to collect all science.

- I'm curious if this kind of thing would be doable with B.R.O.K.E? I would definitely be playing it with a minimalist KCT install as well as another means of limiting how quickly you could build rockets. I sadly can't code and I've got no clue how I would attempt to add this type of thing to B.R.O.K.E. though.

Edited by Avera9eJoe
Link to comment
Share on other sites

Well, I just get a disappearing BROKE UI and a whole bunch of NRE's whenever I try "Warp to Next Morning" now. I know KAC and other mods that integrated with KSP's warping functions were borked by 1.1.3 and had to be updated, maybe it has something to do with that?

Link to comment
Share on other sites

20 hours ago, theonegalen said:

Well, I just get a disappearing BROKE UI and a whole bunch of NRE's whenever I try "Warp to Next Morning" now. I know KAC and other mods that integrated with KSP's warping functions were borked by 1.1.3 and had to be updated, maybe it has something to do with that?

I'm deliberately holding off upgrading to 1.1.3, so I wouldn't know. Judging from the vast number of mods that broke with the update I wouldn't be surprised if BROKE was affected as well. However, disappearing BROKE UI and exception spam when "Warp to Next Morning" were known (and 100% reproducible) behavior in BROKE Beta 5 under 1.1.2.

 

On 24.6.2016 at 6:28 PM, Avera9eJoe said:

I'm curious if this kind of thing would be doable with B.R.O.K.E? I would definitely be playing it with a minimalist KCT install as well as another means of limiting how quickly you could build rockets. I sadly can't code and I've got no clue how I would attempt to add this type of thing to B.R.O.K.E. though.

From what I've seen of the API, that would definitely be possible. However, you'd have to code the Funding Modifiers yourself (or bribe someone to do it for you...) BROKE is mainly a framework after all. Kindof like Kopernicus, it doesn't do much by itself other than the few barebones FMs it ships with.

Edited by MaxRebo
Link to comment
Share on other sites

5 hours ago, MaxRebo said:

From what I've seen from the API, that would definitely be possible. However, you'd have to code the Funding Modifiers yourself (or bribe someone to do it for you...) BROKE is mainly a framework after all. Kindof like Kopernicus, it doesn't do much by itself other than the few barebones FMs it ships with.

Hmm, I sadly can't myself code so I'd have to bribe someone to do it for me. - Any chance you're a fan of Cowboy Bebop or pizzaoverhead's soundtrack editor mod? I'm making a Cowboy Bebop OST playlist for it's next official release. Perhaps that's a bribe enough? :P I can always give shout outs on YouTube or Twitch too :)

Link to comment
Share on other sites

Just now, Avera9eJoe said:

Hmm, I sadly can't myself code so I'd have to bribe someone to do it for me. - Any chance you're a fan of Cowboy Bebop or pizzaoverhead's soundtrack editor mod? I'm making a Cowboy Bebop OST playlist for it's next official release. Perhaps that's a bribe enough? :P I can always give shout outs on YouTube or Twitch too :)

Ha, I'm indeed a fan of both (I own all 6 OST albums), although I didn't yet come up with a truly fitting playlist for the soundtrack editor, so I'm not really using it right now.

Unfortunately, I'm currently not really in a position to commit myself to a mod. With BROKE being in this not-quite-so-stable state right now it would probably also require continued support to make sure you can get through the series without issues. Sorry...

Link to comment
Share on other sites

5 hours ago, MaxRebo said:

Ha, I'm indeed a fan of both (I own all 6 OST albums), although I didn't yet come up with a truly fitting playlist for the soundtrack editor, so I'm not really using it right now.

Unfortunately, I'm currently not really in a position to commit myself to a mod. With BROKE being in this not-quite-so-stable state right now it would probably also require continued support to make sure you can get through the series without issues. Sorry...

I'm looking around and it sounds like I'll be able to simulate this gametype by combining a number of different mods like Tree Toppler and KSPCasher. I hope I can make a Cowboy Bebop playlist that give the series justice. I've got the entire OST too :)

Link to comment
Share on other sites

On 6/24/2016 at 0:28 PM, Avera9eJoe said:

 

The end goal for this setup is simply to collect all science.

- I'm curious if this kind of thing would be doable with B.R.O.K.E? I would definitely be playing it with a minimalist KCT install as well as another means of limiting how quickly you could build rockets. I sadly can't code and I've got no clue how I would attempt to add this type of thing to B.R.O.K.E. though.

Definitely doable with BROKE. There's already a (actually, two) FMs that give funds each quarter based on rep, but they don't have a rep penalty. I could add a configurable rep penalty really easily. TreeToppler would let you start with all the nodes unlocked, but turn off tech times in KCT before you use it.

When I get my desktop back to a properly functioning state I'll try to fix this up a bit more. I can't think of a reason why using alternate warp schemes is causing issues, but that's a top priority bug to be fixed. If you don't hear anything from me in a few days about this, feel free to bug me about it again.

Link to comment
Share on other sites

40 minutes ago, magico13 said:

Definitely doable with BROKE. There's already a (actually, two) FMs that give funds each quarter based on rep, but they don't have a rep penalty. I could add a configurable rep penalty really easily. TreeToppler would let you start with all the nodes unlocked, but turn off tech times in KCT before you use it.

Great information to know. It's been a pleasure chatting and bug fixing with you in the past and if you ever need someone to play-test any of your mods on stream I would be more than happy to :). I hope your computer fixes up nice - I'm actually in the middle up upgrading to a boot SSD and I'm planning on doing a clean windows install on my machine as well. For the last few days all I've been doing is sorting and deleting all of my stored up files. It's an oddly soothing thing to do :P

Edited by Avera9eJoe
Link to comment
Share on other sites

On 6/24/2016 at 0:28 PM, Avera9eJoe said:

The end goal for this setup is simply to collect all science.

- I'm curious if this kind of thing would be doable with B.R.O.K.E? I would definitely be playing it with a minimalist KCT install as well as another means of limiting how quickly you could build rockets. I sadly can't code and I've got no clue how I would attempt to add this type of thing to B.R.O.K.E. though.

I'm waiting to get my old hard drive with my copy of Visual Studio and I've started diving into the API and source of some mods to get some basics down so I can at least do a copy/paste job.  I want to work wonders myself with the BROKE framework but it may be a bit before I can put anything out useful.  I've been thinking of something similar myself where science is the goal (actually each planetary body has a max science to unlock before you can move on).  

Get into all this enough and it gives good motivation to learn C#.  Sucks too because I am busy learning C++ right now and I'm terrified I'm going to scramble my brain.

Link to comment
Share on other sites

  • 2 weeks later...

Okay, had a really bizarre issue. Am running way too many mods and on 1.1.3 so not expecting support, but posting the logs on the off-chance that it's still useful or if anyone else comes across the same issue.

Basically, starting a new year seemed to break BROKE (lol), and then pretty much everything else stopped working. When the new year started, I started getting logspam of

Spoiler


7/6/2016 10:42:29 AM,BROKE,DEBUG: New Day! Year 2, Day 20 - 5h, 19m, 30s
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

SpaceHotel: QTD = 0
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

NullReferenceException: Object reference not set to an instance of an object
  at BROKE.BROKE.<FixedUpdate>b__8 (BROKE.InvoiceItem item) [0x00000] in <filename unknown>:0

  at System.Collections.Generic.List`1[BROKE.InvoiceItem].ForEach (System.Action`1 action) [0x00000] in <filename unknown>:0

  at BROKE.BROKE.FixedUpdate () [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)

 

then shortly afterwards, all my employed kerbonauts seemed to get deleted, and then everything just stops working - e.g. KCT can't launch vessels, and once I go into another view (e.g. Astronaut Centre hiring screen) I can't even exit it or quit to the main menu, although strangely reloading an earlier save still works and everything goes back to normal.

I'd expected that the logspam was just something else breaking everything and thus confusing BROKE, but when I reloaded and disabled all my funding modifiers, the problem didn't come back and everything worked fine. Still got logspam of e.g. 7/6/2016 10:42:29 AM,BROKE,DEBUG: New Day! Year 2, Day 20 - 5h, 19m, 30s  though

I'm guessing this is probably some weird consequence of using the 1.1.2 version with 1.1.3 or something?

Link to comment
Share on other sites

  • 1 month later...
On 7/6/2016 at 6:55 AM, baldamundo said:

Okay, had a really bizarre issue. Am running way too many mods and on 1.1.3 so not expecting support, but posting the logs on the off-chance that it's still useful or if anyone else comes across the same issue.

Basically, starting a new year seemed to break BROKE (lol), and then pretty much everything else stopped working. When the new year started, I started getting logspam of

  Reveal hidden contents


7/6/2016 10:42:29 AM,BROKE,DEBUG: New Day! Year 2, Day 20 - 5h, 19m, 30s
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

SpaceHotel: QTD = 0
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

NullReferenceException: Object reference not set to an instance of an object
  at BROKE.BROKE.<FixedUpdate>b__8 (BROKE.InvoiceItem item) [0x00000] in <filename unknown>:0

  at System.Collections.Generic.List`1[BROKE.InvoiceItem].ForEach (System.Action`1 action) [0x00000] in <filename unknown>:0

  at BROKE.BROKE.FixedUpdate () [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)

 

then shortly afterwards, all my employed kerbonauts seemed to get deleted, and then everything just stops working - e.g. KCT can't launch vessels, and once I go into another view (e.g. Astronaut Centre hiring screen) I can't even exit it or quit to the main menu, although strangely reloading an earlier save still works and everything goes back to normal.

I'd expected that the logspam was just something else breaking everything and thus confusing BROKE, but when I reloaded and disabled all my funding modifiers, the problem didn't come back and everything worked fine. Still got logspam of e.g. 7/6/2016 10:42:29 AM,BROKE,DEBUG: New Day! Year 2, Day 20 - 5h, 19m, 30s  though

I'm guessing this is probably some weird consequence of using the 1.1.2 version with 1.1.3 or something?

Yeah BROKE needs a recompile.  It's having issues with the new time warp system.

Link to comment
Share on other sites

7 minutes ago, autumnalequinox said:

Yeah BROKE needs a recompile.  It's having issues with the new time warp system.

:/ Curious as I haven't actually coded before, what exactly is a "recompile"? Is it just running the old code through a converter for a new version of Unity? Is it manually going in and changing code by hand? Something else?

Link to comment
Share on other sites

8 hours ago, Avera9eJoe said:

:/ Curious as I haven't actually coded before, what exactly is a "recompile"? Is it just running the old code through a converter for a new version of Unity? Is it manually going in and changing code by hand? Something else?

I think a few changes need to be made as well.  That I'm in the dark about.  Something changed about the way KSP handles time warping from 1.1.2 to 1.1.3 that basically nuked any mods that call on it.  I know alot of mods were simply recompiled and worked.  I don't have Unity so I can't be sure.  (I haven't done serious coding in years and mostly I play with C++ so I'm probably the worst person to ask).

I think magico lost a mobo on his moddin' PC that's why BROKE has been in stasis for awhile.  Not sure how many follow this thread but if anyone could get it working again it would be sweeeeeeeet.. :D 

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

I'm currently having a go at this @magico13, and while it doesn't look like KSP 1.2 broke anything, I already found a few very fatal bugs. For one, the scenario's OnLoad event gets fired before a valid/current instance of the BROKE KSPAddon is available (that might be a 1.2 thing after all, but I simply don't know), and that breaks the whole framework pretty bad. There are a number of ways to address this, but since I don't intent to take over maintenance from you or anything I'd like some feedback as to what kind of fix you'd like to see implemented.

Personally I'd outsource the persistent state into its own, KSP API independent singleton. The scenario loads into this, and the KSPAddon reads from it whenever it's ready. I didn't yet try to check if the loading and KSPAddon instantiation are actually running concurrently (this is my first time coding anything for KSP, I know next to nothing about its inner workings), in that case some serializing synchronization primitive would be included.

Thoughts?

Link to comment
Share on other sites

48 minutes ago, MaxRebo said:

I'm currently having a go at this @magico13, and while it doesn't look like KSP 1.2 broke anything, I already found a few very fatal bugs. For one, the scenario's OnLoad event gets fired before a valid/current instance of the BROKE KSPAddon is available (that might be a 1.2 thing after all, but I simply don't know), and that breaks the whole framework pretty bad. There are a number of ways to address this, but since I don't intent to take over maintenance from you or anything I'd like some feedback as to what kind of fix you'd like to see implemented.

Personally I'd outsource the persistent state into its own, KSP API independent singleton. The scenario loads into this, and the KSPAddon reads from it whenever it's ready. I didn't yet try to check if the loading and KSPAddon instantiation are actually running concurrently (this is my first time coding anything for KSP, I know next to nothing about its inner workings), in that case some serializing synchronization primitive would be included.

Thoughts?

Honestly, I wasn't planning on working on this any more. There have been quite a few new entries into this space that are pretty good and I've already been bad enough at maintaining my fully functional mods. However, if you (or someone else) wanted to cover maintenance I maybe could swing it. I need to unbreak KCT before I even consider looking at this though, which means getting an actual release AND a new inventory system.

The fact that OnLoad runs so much earlier than before also broke KCT (I think it now runs before Start). I managed to work around it there (off the top of my head I don't remember what I did. It was either moving into Awake or doing better instantiating of things so they don't break, or moving some of the OnLoad code into Start. I don't remember.) I also had to redo how I create the scenario, but that might not be an issue with BROKE depending on how we did it. I vaguely remember doing it the "correct" way for BROKE using attributes instead of manually inserting the Scenario like KCT did.

Your solution might work and sounds like the "better instantiation" fix by just moving the actual entities out of Start/OnLoad and updating their state at the appropriate time. OnLoad will run before Start, but I think the first FixedUpdate runs afterward. Though FixedUpdate should check for a valid state before doing anything anyway. It shouldn't be too hard to basically lazy load everything and just not act on anything until a valid state is reached, if that's how you were proposing doing things.

 

For some similar alternative mods, see: (Monthly budgets covers a lot of what I wanted to do by default, but isn't as "core frameworky" as this)

 

Link to comment
Share on other sites

53 minutes ago, magico13 said:

For some similar alternative mods, see

Whoa, I actually didn't know of those... well since I'm not in a position to actually become a maintainer, I'm pretty much with you on phasing this out in favor of similar mods that fit the same bill.

I'm still determined to get this working in 1.2 though, if just for the educational experience. The scenario is indeed created using KSPScenario, so that mainly leaves the instantiation business to take care of. I'll go with the "better instantiation" approach then, and maybe you'll accept one last PR for BROKE when I'm done?

Link to comment
Share on other sites

18 minutes ago, MaxRebo said:

Whoa, I actually didn't know of those... well since I'm not in a position to actually become a maintainer, I'm pretty much with you on phasing this out in favor of similar mods that fit the same bill.

I'm still determined to get this working in 1.2 though, if just for the educational experience. The scenario is indeed created using KSPScenario, so that mainly leaves the instantiation business to take care of. I'll go with the "better instantiation" approach then, and maybe you'll accept one last PR for BROKE when I'm done?

If magico doesn't want to accept the PR, I will. I'm the other maintainer for BROKE but I've been crazy busy with school and other projects for KSP work. It'd be great if we could get it working in 1.2!

Link to comment
Share on other sites

Alright, I think I managed to get it working fine.

The only other thing that I found is a rather fatal bug in the invoice collection logic that I just cannot imagine wouldn't have manifested in earlier versions: handling empty items / item lists was rather broken. The Payroll FM's ProcessYearly just returned null instead of an empty list, a recipe for relentless log spam if ever there was one... and while simple (non-multi) funding modifiers have no other reasonable choice but to return null if they have no invoice to declare, BROKE didn't take that into account and just added said null value to the list, resulting in any actual payment operation later on failing.

Pull requests are out :wink:

Link to comment
Share on other sites

  • 2 weeks later...

@magico13 Just out of curiosity, was there something wrong with my pull request for the payroll FM? I personally thought this to be the more appropriate place to address the NREs, although the null checks in BROKE are certainly a good idea anyway. Just curious if returning an empty list instead of null violated some kind of interface/design contract...

Edited by MaxRebo
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...