iamchairs

[1.0.5] StateFunding 0.3.4

Recommended Posts

@wild_bill123 and @FatherLawrence

I'd love to fix these bugs. But I don't know how to do that without replicating it myself. Could you tell me which mods- if any- you are using. I could probably solve it very quickly if you guys would send me your save folder, or just the persistence and statefunding files.

@FatherLawrence

I have a save with 26 quarters and no problems. I have the attachment system and and kerbal engineer mods. I don't know how to replicate this bug.

Share this post


Link to post
Share on other sites

This looks amazing, great job in providing an alternative to the contract play style but supporting some sort of career mode. Subbed.

Share this post


Link to post
Share on other sites

I've figured out the event that's triggering the bug, at least for my game. It's renaming my vessel to a Base instead of a Ship.

I reloaded to an earlier save where SF worked to a point before I launched my first Munar Base mission. I launched it again, quicksaving and checking that the mod works frequently. I landed my vessel on the Mun and up to that point, everything was still working fine. But renaming my vessel a Base, not changing the name, broke SF and caused the empty tabs and NullReference Exceptions to start. The same happened if I edited a quicksave or the Persistence file to change its type to Base. I tried to reload the earliest quicksave with the vessel and rename it in the Pre-Launch state, but that broke it too.

Sometime in the next couple days, I'll try other renaming designations and see if any of those cause the same problem.

EDIT: No other type changes are causing this. Interestingly, changing to type to Station causes SF to recognize it as such, even though it's landed on the Mun and not orbiting.

With another vehicle that I've had active for half a year, landed on Kerbin, changing the type to Base doesn't cause the same problem. I'll try some tests to see if it's specific to just that vessel.

EDIT: Other vessels made before and after that one were capable of being renamed a Base in a variety of situations.

Eureka! I've been able to reproduce this in a completely stock+State Funding install. The Mark I Command Pod, the first Solar Panel, and the Communotron 16 antenna. Renaming that a Base breaks State Funding.

Edited by FatherLawrence

Share this post


Link to post
Share on other sites

Eureka! I've been able to reproduce this in a completely stock+State Funding install. The Mark I Command Pod, the first Solar Panel, and the Communotron 16 antenna. Renaming that a Base breaks State Funding.

State Funding broke for me too, after I renamed a ship like you did, so I uninstalled it, deleted the cfg file from my game save and reinstalled. However now the mod cannot create a cfg save file for some reason, so the mod acts as if I've just installed it each time the game loads, so this mod feels permanently broken for me. Real shame, as I think it's a terrific concept. Hopefully next update will work so I can run it again.

Share this post


Link to post
Share on other sites
State Funding broke for me too, after I renamed a ship like you did, so I uninstalled it, deleted the cfg file from my game save and reinstalled. However now the mod cannot create a cfg save file for some reason, so the mod acts as if I've just installed it each time the game loads

If you've got a save from before you renamed that ship, you can reload that and reinstall the mod and it should work, if you don't lose too much progress. After that, just abstain from renaming ships as bases and you should be fine. I've played significantly father after reloading a previous save and everything else in the mod works.

Share this post


Link to post
Share on other sites

How does state funding handle planet packs? I'm contemplating trying out New Horizons, but i want to keep using state funding.

Share this post


Link to post
Share on other sites
How does state funding handle planet packs? I'm contemplating trying out New Horizons, but i want to keep using state funding.

aside from the [general, non planet-pack-based] bugs above noted, it handled new horizons fine for me.

Share this post


Link to post
Share on other sites
I have nothing that attempts to replace contracts in the early game. I'm beginning to think against doing my own contracts because there are so many great contract mods out there. If anything I could tie into those.

That's a limitation of what I know about the KSP API. How can you tell if a flight gets reverted? I've been playing with no-reverts for so long I forgot you could.

Could you PM me your save or just the vessel from your persistence file?

The VesselHelper is a helper class for the mod.

https://github.com/iamchairs/StateFunding/blob/master/Helpers/VesselHelper.cs

An easy way to know and revert simulations and other save load related issues, would simply be to log the ksp time at which the event occurred. And on load (or on scene change if load isnt available), remove all events that are in the future.

Share this post


Link to post
Share on other sites

Great mod! I've been really enjoying this. Found just a few issues so far:

It looks like your Mac is putting _MACOSX folders into the zip file. One is in the ZIP, the next is in the GameData folder.

There are .DS_Store files in StateFunding, as well as the data folder and the GameData folder.

If I had to guess, both of these are hidden files that you don't see on your end, I don't own a MAC though, so not sure. I deleted them on my install with no issue :)

The last few items I noticed were just typos and spelling issues (I'll highlight and follow with parentheses the errors)

In governments.settings, under the USK's "description =":

For the people, by the people. At least that's what they say. With the USK the peoples (people's) opinions have a greater impact on your funding. Their hearts pour out for Kerbals, not robots and machines. Because of this, the more Kerbals on missions the more interested the people of USK will be in funding the your (choose one! I'd go with 'the') space program. But there's an equal- well not really equal- reaction to every action. While having Kerbals on missions is crucial to funding, Kerbal death will be devastating in performance reviews. Every life is special and there isn't much room for failure (no punctuation ending this sentence. I'd add an exclamation!)

In governments.settings, under the USSK's "description =":

The needs of the many outweigh the needs of the few. The USSK are more interested in results and it's not as important how you get those results. While the citizens care greatly about their comrades in space, the governemnt (misspelled, should be 'government') isn't all too revealing about their operations and furthermore don't care too much about the peoples (people's) opinions anyway. Kerbal achievement and death will not reach the morning newspaper of many individuals in this country and as a result the impact of such achievements and failures will be muted. A greater reliance on unmaned (misspelled, should be unmanned) vehicles and surveilance (misspelled, should be 'surveillance') will be your best bet for continued funding.

The ability to customize governments is really cool btw, thank you for making this as mod-able as you did! Looking forward to continued support with this mod, keep up the great work :) :)

Share this post


Link to post
Share on other sites
An easy way to know and revert simulations and other save load related issues, would simply be to log the ksp time at which the event occurred. And on load (or on scene change if load isnt available), remove all events that are in the future.

The absolute easiest and most foolproof way is to keep everything inside the persistence file. Anything that might be affected by reverting the flight needs to be kept in the persistence and it's generally way more trouble than it's worth to try to roll your own external persistence sync, since it's really easy to save things in the persistence file (and it's actually rather hard to break the save).

Best way is to add a new Scenario (there is actually a much easier way to do it than how I do. Just ask in the plugin development forum). An alternative way is to add hooks onto the GameEvents.OnPersistenceLoad and GameEvents.OnPersistenceSave (Note: I don't recall off hand the exact names of those events, but that should get you close), and then manually adding a new ConfigNode with your settings saved in it on Save and manually getting that ConfigNode (node.GetNode("MyNode")) and then getting the settings out of it on Load. Super easy and now you never need to worry about anything ever being out of sync.

If you have questions, I'm absolutely always available for discussion through PMs or in any of my mod threads. KCT is supposed to be used with other mods, so I try my best to support as many as I can, when asked.

(Most of this was aimed toward iamchairs, I was just piggybacking off of your comment Jey123456)

Share this post


Link to post
Share on other sites

I noticed there's a "government contracts completed" field in the status screen of this - are those implemented yet? I've not gotten any - if they are implemented, it's probably because of the contract mods I'm running. Is there a simple way of manually adding another mods contracts to qualify as 'government contracts'?

Share this post


Link to post
Share on other sites

This is totally added to my mod list. Very neat mod from what I've seen so far.

Suggestions for the future:

For reputation, how about flags? Either per-biome, or per-object? I've only done one or two satellite contracts and don't have the infrastructure for a Kerblab I yet, but I've landed on the Mun and Minmus multiple times with flags. Seems that'd be a huge public opinion boost there.

For minor early-game public opinion, how about safe spacecraft returns, possibly modified by how close you land to KSC?

I'm not sure what could be done for infrastructure. Perhaps (optional) integration with ScanSAT instead of (or inaddition to) coverage? Everything else seems pretty solid.

Share this post


Link to post
Share on other sites

This mod is great! Even though your space program depends on public opinion, your a whole lot freer to do what ever you want. Great job. :D

Share this post


Link to post
Share on other sites

So I wanted to try this mod and in my first quarter I got 100% satellite coverage on Kerbin, Mun and Minmus with the USSK and I just got 12300 funds for that.

This is ridiculously low. Is it normal ? Right now it doesn't allow me to play the game without those stupid contracts that I don't want to do.

Edited by columini

Share this post


Link to post
Share on other sites
On 12/22/2015 at 7:43 AM, columini said:

So I wanted to try this mod and in my first quarter I got 100% satellite coverage on Kerbin, Mun and Minmus with the USSK and I just got 12300 funds for that.

This is ridiculously low. Is it normal ? Right now it doesn't allow me to play the game without those stupid contracts that I don't want to do.

I have the same satellite coverage you do, but I also have a couple (very small) space stations in orbit and a teeny mining rig on Minmus, and I'm raking in 118,000 funds a quarter for that. I'm also using StageRecovery to recoup some launch costs and ScienceFunding to earn a bit more cash, which both complement this mod very well, but if you really want to get off contracts completely, I recommend doing things like creating stations and attaching lots of fuel tanks or docking ports or whatever parameters you can fill to boost Government Confidence. Satellite networks alone doesn't cut it. And if you think about it, a couple dozen half-ton satellites doesn't seem as impressive as even one moderately large space station that puts your civilians into the vast reaches of space. 

Share this post


Link to post
Share on other sites

I'm afraid I too have this problem with bases. The only mods I'm using are MechJeb and ScienceAlert. As soon as I sent my first base to Minimus StateFunding broke. Is there any way to "unbreak" this without reloading the old save (which I haven't got)? It really is a very good mod giving some purpose to the game and enhancing the experience. I wish I had seen this before.

Share this post


Link to post
Share on other sites
3 minutes ago, gietek said:

I'm afraid I too have this problem with bases. The only mods I'm using are MechJeb and ScienceAlert. As soon as I sent my first base to Minimus StateFunding broke. Is there any way to "unbreak" this without reloading the old save (which I haven't got)? It really is a very good mod giving some purpose to the game and enhancing the experience. I wish I had seen this before.

Me too.  As soon as I call something a base, State Funding just gives up.  It still works, but the status window is blank.  If I go into the Tracking Station and make the "base" into anything else, State Funding starts behaving again.

 

I've also noticed that it's a little unforgiving of reverts... if you screw the pooch and have to revert to launch and try again, it counts the kernels killed and ships as destroyed anyway.  I've had to edit the state funding conf file a few times now to undo things that "never happened".  It also sometimes counts dropped stages as destroyed ships, not sure why.

Share this post


Link to post
Share on other sites
Just now, gietek said:

I'm afraid I too have this problem with bases. The only mods I'm using are MechJeb and ScienceAlert. As soon as I sent my first base to Minimus StateFunding broke. Is there any way to "unbreak" this without reloading the old save (which I haven't got)? It really is a very good mod giving some purpose to the game and enhancing the experience. I wish I had seen this before.

From my testing (multiple reinstalls and persistence file edits back when I made my earlier posts), I couldn't fix a save where StateFunding broke and had to use a previous save. The only way I've found to deal with it is to not rename vessels as bases. Although I do have one vessel that was automatically named a base because of some mod parts it had (not sure, possibly PlanetaryBaseSystems) and that didn't cause problems, so it seems the act of renaming a vessel a base when it was something else is the problem.

Just now, JJE64 said:

I've also noticed that it's a little unforgiving of reverts... if you screw the pooch and have to revert to launch and try again, it counts the kernels killed and ships as destroyed anyway.  I've had to edit the state funding conf file a few times now to undo things that "never happened".  It also sometimes counts dropped stages as destroyed ships, not sure why.

Same thing with using 'simulations' in KerbalConstructionTime; vessel destruction or death still counts against you even though it didn't really happen. I justify it in my head by saying that if it was published that all of NASA's simulations ended in astronaut deaths, the public would still lose confidence in the program even though no one actually died.

Share this post


Link to post
Share on other sites

I was able to "repair" State Funding by renaming the vessel to Lander (or anything else). I tried landing only a capsule with a small tank, engine and landing gear on Kerbin, and as soon as I renamed it to Base, it broke the mod again. I renamed it back to Lander and everything was back to "normal". What's so special about Bases? I really hope the author still follows this thread and will respond some time soon.

Share this post


Link to post
Share on other sites
1 hour ago, loki130 said:

Will anything terrible happen if I add this to an existing save?

Should be fine. If you have any concerns backup your save file.

Share this post


Link to post
Share on other sites

I don't know if this has been mentioned before, but the mod seems to be penalizing me for kerbal 'accidents' after reverting from a failed launch. It has done this across multiple installs. Is anyone else having this issue?

Share this post


Link to post
Share on other sites

@iamchairs: Help! I don't have anywhere to download this new version because Kerbalstuff went down. D:

 

(also, looking forward to playing with this again ^_^)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.