Jump to content

[1.8.x+] Strategia [v1.8.0] [2019-10-22]


nightingale

Recommended Posts

Just now, regex said:

Yeah, I'm basically going to be starting from scratch, I think, but that's not your fault or anything.  Gotta take a look at what you have for ideas, maybe check out what Test Flight is doing, write a few effects as needed, etc...  It's going to be a process but I'll likely start (pretty soon, still excited about/testing the pre-release :)) with a few easy programs I can get help with, like CORONA or Gemini or something.

Yup, definitely agree you'll be better for it, although definitely more work. Given you're going that route, some other points:

  1. Strategies are annoying because each strategy needs to have a class associated with it.  I get around that in Strategia through various fun hacks and dummy classes.
  2. There's various stuff that's semi-related to strategies that got sort of thrown in for completeness, but is not necessarily extensible/configurable.  The two I'm thinking of are:
    1. Currency Popups - Logic to put pretty popups when currency is spent (like on building upgrades).  Makes it so I can actually show the player what their strategies are doing.  It's not automatic though, and there were lots of hoops I had to jump through in some places... so this could give you minor trouble
    2. Admin Resize - Got annoyed with the small-width Admin building UI, so I resize it to 6 departments wide (if Screen width available).  If you end up with a different number of departments than 6, this will be non-ideal.
  3. I do away with strategy sliders completely, mostly because I hate them.  Replaced by having 3 distinct strategy levels.  I have two completely different approaches to handling this in the config files (variant A, variant B), mostly do to a change I made in direction mid-development.  Variant B is the cleaner one in code, so if I ever go in to do a refactor or clean up, I may remove support for variant A completely.  So try to avoid using that if you're writing your own effects.
Link to comment
Share on other sites

@nightingale I've taken a bit of a closer look. I'm not really sure what to screenshot:

Just loaded the install, canceled 2 contracts. Then I went to spaceport view. Got the notifications for cancelled contracts, lost money. Shortly after I suddenly got lotsa money coming in, millions again (money counter can't even keep up). I don't think I could convey more with a screen.

Interestingly, I found my debug window is an endless stream of nullreferenceexceptions, which looks a bit dire. Anyway, here is the output log:

https://www.dropbox.com/s/k5f6pgpx7bxwmwt/output_log.txt?dl=0

EDIT: Nullrefs seem to come from Kerbal Konstructs. Gotta remove that.

 

Mods are:
USI Life Support, BetterBurnTime, Contract Configurator, Strategia, SVE, Scatterer, Kerbal Engineer, Kerbal Constructs, KWRocketry + Community fixes, MechJeb, Planetshine, Realplume Stock, SpaceY, and recently Ven Stock Revamp.


As you see, it's heavily modded. Might well be a conflict between mods, and KSP is prerelease, that's why I didnt want to bug you too much about this. If you need anything else or I can test something , please tell!

On 8.4.2016 at 4:40 AM, regex said:

Cool, I've appointed myself to look into integrating this into RP-0 (unless someone steps in earlier or later) so I'll probably be asking questions.  I appreciate the pointers to the right code.

Take my First Born. :o

Edited by Temeter
Link to comment
Share on other sites

12 minutes ago, Temeter said:

@nightingale I've taken a bit of a closer look. I'm not really sure what to screenshot:

Just loaded the install, canceled 2 contracts. Then I went to spaceport view. Got the notifications for cancelled contracts, lost money. Shortly after I suddenly got lotsa money coming in, millions again (money counter can't even keep up). I don't think I could convey more with a screen.

Interestingly, I found my debug window is an endless stream of nullreferenceexceptions, which looks a bit dire. Anyway, here is the output log:

https://www.dropbox.com/s/k5f6pgpx7bxwmwt/output_log.txt?dl=0

Kerbal Konstructs is the tree you'll need to bark up:

NullReferenceException: Object reference not set to an instance of an object
  at KerbalKonstructs.KerbalKonstructs.OnProcessRecovery (.ProtoVessel vessel, KSP.UI.Screens.MissionRecoveryDialog dialog, Single fFloat) [0x00000] in <filename unknown>:0 
  at EventData`3[ProtoVessel,KSP.UI.Screens.MissionRecoveryDialog,System.Single].Fire (.ProtoVessel data0, KSP.UI.Screens.MissionRecoveryDialog data1, Single data2) [0x00000] in <filename unknown>:0 
  at VesselRecovery.OnVesselRecovered (.ProtoVessel pv, Boolean quick) [0x00000] in <filename unknown>:0 
  at EventData`2[ProtoVessel,System.Boolean].Fire (.ProtoVessel data0, Boolean data1) [0x00000] in <filename unknown>:0 
  at ProtoVessel.Clean (System.String reason) [0x00000] in <filename unknown>:0 
  at Vessel.Clean (System.String reason) [0x00000] in <filename unknown>:0 
  at Vessel.Update () [0x00000] in <filename unknown>:0 

And yup, if it's on vessel recovery I could definitely see the infinite funds thing.  It'll award funds, then throw the exception and next frame it'll try to do the whole thing over again.

Pinging @AlphaAsh

Link to comment
Share on other sites

Just now, AlphaAsh said:

Yup, that's an old KK bug. I'm guessing you're using the one out of the last release of KerbinSide. That version of KK gets out-of-date quickly. Update it. That bug's fixed.

Thanks a lot! I can't even find the thread where I originally downloaded it. Thought it was some long list with a 'complete' version download at the top. Maybe I downloaded an old version in the first place?

Anyway thanks for clearing it up. Also thanks for the mod, btw! :D

Link to comment
Share on other sites

You're welcome. Kerbal Konstructs gets updated far more regularly independently of Kerbin-Side and since it's a dependency, it's worth keeping an eye on updates for it, since I won't update Kerbin-Side everytime I update KK.

Link to comment
Share on other sites

I see. Used to that stuff, as a fan of the realism mods. ~

Ah, now I also see the donwload sturcture. All fine. There is even a warning to update KK in case of issues.

Edited by Temeter
Link to comment
Share on other sites

Hi I seem to be having an issue with your Strategia mod not co-operating with your tourism plus mod and it also not recognizing my Admin building as fully leveled up. The first problem is although I am running Pilot 3 in the admin building it is not rewarding me the bonus funds listed in the mission. The second is that my admin building is fully upgraded it says i only have 3/4 strategies active, but will no allow me to activate another one. Ive attached screenshots for further description. I am running 1.1.0.1196 prerelease.

EDIT: Larger pics

2zfn282.png

2cd98hc.png

ip5mom.png

Edited by DeathProphet
Link to comment
Share on other sites

2 hours ago, DeathProphet said:

@nightingale Have you had a chance to read my post, just wondering, love the mod, just curious if I did something wrong in the install?

Sorry, dealing with sick family, so haven't been very responsive the last many days.

Short answers - the limit is intended and the label is wrong (can't fix - stock limitations).  The pilot thing looks like maybe a bug?  I assume that you're basing it on the funds counter not going up by the right amount and not the log message alone (the additional funds may not have a log message that goes with them).  I will investigate further when I'm able.

Link to comment
Share on other sites

8 hours ago, nightingale said:

Sorry, dealing with sick family, so haven't been very responsive the last many days.

Short answers - the limit is intended and the label is wrong (can't fix - stock limitations).  The pilot thing looks like maybe a bug?  I assume that you're basing it on the funds counter not going up by the right amount and not the log message alone (the additional funds may not have a log message that goes with them).  I will investigate further when I'm able.

Thanks for checking it, sorry to hear about your family, okay so I get the limit on three strategies that does make sense. But yes the log is accurate, the funds went up by exactly the amount on the counter as in the log, these are screens from my second test to confirm my suspicions. Anyway I know its pre release so I am by no means in any rush for a fix, just wanted to bring to your attention, and thanks again for your work on great mods. Hope all are well soon for your family.

Link to comment
Share on other sites

23 hours ago, DeathProphet said:

Thanks for checking it, sorry to hear about your family, okay so I get the limit on three strategies that does make sense. But yes the log is accurate, the funds went up by exactly the amount on the counter as in the log, these are screens from my second test to confirm my suspicions. Anyway I know its pre release so I am by no means in any rush for a fix, just wanted to bring to your attention, and thanks again for your work on great mods. Hope all are well soon for your family.

Not sure if this one was just something that didn't get fully tested originally or a change in 1.1, but I finally got this one all figured out.  It's fixed for the next release.

Link to comment
Share on other sites

Hmm..

Am I supposed to be able to scroll down? I feel like I could before (to get to Scientific Focus etc). 1.1 1209 (probably yet another UI breakage in the pre-release)

xuFEUaQ.png

Edit: Also,this (also affect Werhner)

VQDeqm9.png

Edited by severedsolo
Link to comment
Share on other sites

2 hours ago, severedsolo said:

Am I supposed to be able to scroll down? I feel like I could before (to get to Scientific Focus etc). 1.1 1209 (probably yet another UI breakage in the pre-release)

This is a bug in the pre-release.  It's on the tracker (somewhere).

2 hours ago, severedsolo said:

VQDeqm9.png

I noticed this a while back and was wondering how long it would take for someone to raise it. :P  Have a cookie (or a booster, perhaps?).  I'll fix this for the next release.

Link to comment
Share on other sites

Another suggestion: Contracts requiring a particular type of vessel (eg. 'probe') should be set to any vessel type. It is trivial to change the vessel type using the rename feature; you can change from a lander to a probe and back that way to satisfy requirements. If you're looking for "probe" type only or "lander" type only, it would be better to check for crew = 0 or crew > 0.

 

 

Also: I finished Eve Probes, and Eve Probes is available... yet again! You'd think that once you complete a particular probe/program it would become unavailable. 

3rd comment: It seems 'Program' recognizes OPM planets and adds programs for them, but Probes doesn't? I've got Sarnus V program, Urlum III program... but none of the OPM planets have 'Probe' strategies.

 

Link to comment
Share on other sites

14 hours ago, ibanix said:

Another suggestion: Contracts requiring a particular type of vessel (eg. 'probe') should be set to any vessel type. It is trivial to change the vessel type using the rename feature; you can change from a lander to a probe and back that way to satisfy requirements. If you're looking for "probe" type only or "lander" type only, it would be better to check for crew = 0 or crew > 0.

Heh, looks like I didn't remember to put any kind of checks on those, raised #37.  That being said, the crew count check is just as easy to fudge (just EVA).  I'll put a better check on there.

14 hours ago, ibanix said:

Also: I finished Eve Probes, and Eve Probes is available... yet again! You'd think that once you complete a particular probe/program it would become unavailable. 

Fixed for next release.

14 hours ago, ibanix said:

3rd comment: It seems 'Program' recognizes OPM planets and adds programs for them, but Probes doesn't? I've got Sarnus V program, Urlum III program... but none of the OPM planets have 'Probe' strategies.

None of the gas giants have programs for landing probes on them (for obvious reasons).  That does leave a gap for not having specific programs for the moons of those planets though.  Raised #38 to address that (eventually).

Link to comment
Share on other sites

1 hour ago, nightingale said:

Heh, looks like I didn't remember to put any kind of checks on those, raised #37.  That being said, the crew count check is just as easy to fudge (just EVA).  I'll put a better check on there.

To be honest, it's more annoying when I change something to a lander (because I intend to land it), and then realize I needed 'probe' to complete the contract >_< 

Link to comment
Share on other sites

@nightingale

I'm not sure if this is a bug in Strategia or what.  I was investigating a bug report in KRASH, and saw the following in the log (note that NO strategies were selected, just the mod was installed).  The apparant issue was that the game had about 32,400 funds, yet when the KRASH sim  started, all of a sudden (after the log entries below) there were 0 funds and the sim terminated due to a lack of funds.  Uninstalling Strategia solved the problem.  For now I'm going to tell the user to uninstall Strategia, at least until he needs it.

I'm using the value:  Funding.Instance.Funds, it seems to go to 0 any time a flight is started (I tried it without using KRASH).

 

[HighLogic]: =========================== Scene Change : From EDITOR to FLIGHT (Async) =====================
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Unloading 4 Unused Serialized files (Serialized files now loaded: 3)
Added -463.7395 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added -323.7719 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added -169.0803 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added -69.67807 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
Added 0.1293579 (-500) reputation: 'Strategies'

 

Edited by linuxgurugamer
Link to comment
Share on other sites

7 hours ago, linuxgurugamer said:

@nightingale

I'm not sure if this is a bug in Strategia or what.  I was investigating a bug report in KRASH, and saw the following in the log (note that NO strategies were selected, just the mod was installed).  The apparant issue was that the game had about 32,400 funds, yet when the KRASH sim  started, all of a sudden (after the log entries below) there were 0 funds and the sim terminated due to a lack of funds.  Uninstalling Strategia solved the problem.  For now I'm going to tell the user to uninstall Strategia, at least until he needs it.

I'm using the value:  Funding.Instance.Funds, it seems to go to 0 any time a flight is started (I tried it without using KRASH).

Confirmed it's a Strategia bug.  I'll get a fix out soon.

Link to comment
Share on other sites

A good ol' bug fix release, download here!

Strategia 1.2.1

  • Fixed Pilot/Engineer/Scientist Focus strategies not actually giving the stated contract bonuses (thanks @DeathProphet).
  • Fixed compatibility with Sigma Binary (thanks @sentania).
  • Fixed hint text for crewed/uncrewed missions (thanks @severedsolo).
  • Fixed planetary probe strategies so they can't be re-done (thanks @ibanix).
  • Fixed reputation/funds being lost on scene change - normally after the quicksave but breaks KRASH (thanks @garwel and @linuxgurugamer).
Link to comment
Share on other sites

In an old science mode (where Strategia shouldn't even be active) save that I transferred to 1.1, I'm getting a spam of this error when I research a tech:

NullReferenceException: Object reference not set to an instance of an object
  at Strategia.CurrencyPopup.OnGUI () [0x00000] in <filename unknown>:0

It does stop, it just produces a lot of them for each instance. I haven't tested it out in a new save though, and I'm using CTT.

Link to comment
Share on other sites

4 hours ago, smjjames said:

In an old science mode (where Strategia shouldn't even be active) save that I transferred to 1.1, I'm getting a spam of this error when I research a tech:

NullReferenceException: Object reference not set to an instance of an object
  at Strategia.CurrencyPopup.OnGUI () [0x00000] in <filename unknown>:0

It does stop, it just produces a lot of them for each instance. I haven't tested it out in a new save though, and I'm using CTT.

Looks like this happens in career too - I suspect it's something that didn't get converted over correctly to KSP 1.1.  Will investigate.

Link to comment
Share on other sites

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