Jump to content

[1.5.0 <-> 1.8.1] Kerbalism v3.2


N70

Recommended Posts

Thanks a lot, @Sir Mortimer, for providing the branch for multiple star support. Unfortunately, I haven't been able to test it properly yet because of a couple of problems there.

All the problems I've encountered so far have the same cause: the root of the hierarchy of celestial objects (Sun in my case) doesn't have an orbit (it is null).

So, the first problem was with Storm.Storm_frequency(double dist) method. It produces a null reference exception because it gets the star (Sun) of the home body (Kerbin) and tries to retrieve its orbit, which is null. Log. It seems this method tries to calculat how much one AU is in game's distance units, and for that you need body's orbit, not it's parent star orbit. I fixed it like this:

Spoiler

		// return storm frequency factor by distance from sun
		static double Storm_frequency(double dist)
		{
			double AU = FlightGlobals.GetHomeBody().orbit.semiMajorAxis;
			return AU / dist;
		}

 

It will run into a problem, however, if some mod decides to use a moon as a home body.

The next problem is with Sim.Apoapsis(CelestialBody body). Again, for root object the orbit is null and there is a null reference exception. Log. I have fixed it like this:

Spoiler

		// return apoapsis of a body orbit
		public static double Apoapsis(CelestialBody body)
		{
			if (body != null && body.orbit != null)
			{
				return (1.0 + body.orbit.eccentricity) * body.orbit.semiMajorAxis;
			}
			return 0;
		}


		// return periapsis of a body orbit
		public static double Periapsis(CelestialBody body)
		{
			if (body != null && body.orbit != null)
			{
				return (1.0 - body.orbit.eccentricity) * body.orbit.semiMajorAxis;
			}
			return 0;
		}

 

I've got to the third problem, withe Sim.SolarLuminosity(CelestialBody sun), and it most likely lies with this line:

double A = Lib.PlanetarySystem(FlightGlobals.GetHomeBody()).orbit.semiMajorAxis;

Log. However, this will have to wait until morning.

Link to comment
Share on other sites

On 7/17/2019 at 3:10 PM, baldamundo said:

Would be really, really handy if Kerbalism could be made compatible with Science! [x] or if its planner could incorporate similar functionality

If you start the experiments in the VAB or launch pad they should turn on automatically. 

Link to comment
Share on other sites

39 minutes ago, Krymson Skorpyon said:

I've noticed a note on some of the nodes in the Tech tree: "LITE to Unmanned Experiments" (or SITE or MITE).  Based on my research I believe that that's a Kerbalism thing - where can I find documentation/instructions for that feature, please?

Not sure about docs, but you can configure them on any probe core.

Link to comment
Share on other sites

Hi  @Sir Mortimer ... think maybe you missed my question post....

Real quick again, 1. FASA, even a clean KErbalism + FASA install, when I try and fly a Mercury capsul,  EC drains down to zero by the time I'm on the launchpad, like it's taking HUGE bits of EC at a time.  Looks like its the antenna.  Is there some way to disable the internal antenna? It looks like its always deployed,

2. Trying to run EVA Report and it says No Electric Charge.  even if I KIS a battery into the inventory.  

3. Is zzzKerbalism still a thing? I don't have the folder, I see it all over configs, should I make the folder by hand?

 

Thanks!

Link to comment
Share on other sites

On 7/19/2019 at 2:05 AM, Shiolle said:

Thanks a lot, @Sir Mortimer, for providing the branch for multiple star support. Unfortunately, I haven't been able to test it properly yet because of a couple of problems there.

All the problems I've encountered so far have the same cause: the root of the hierarchy of celestial objects (Sun in my case) doesn't have an orbit (it is null).

So, the first problem was with Storm.Storm_frequency(double dist) method. It produces a null reference exception because it gets the star (Sun) of the home body (Kerbin) and tries to retrieve its orbit, which is null. Log. It seems this method tries to calculat how much one AU is in game's distance units, and for that you need body's orbit, not it's parent star orbit. I fixed it like this:

  Reveal hidden contents


		// return storm frequency factor by distance from sun
		static double Storm_frequency(double dist)
		{
			double AU = FlightGlobals.GetHomeBody().orbit.semiMajorAxis;
			return AU / dist;
		}

 

It will run into a problem, however, if some mod decides to use a moon as a home body.

The next problem is with Sim.Apoapsis(CelestialBody body). Again, for root object the orbit is null and there is a null reference exception. Log. I have fixed it like this:

  Reveal hidden contents


		// return apoapsis of a body orbit
		public static double Apoapsis(CelestialBody body)
		{
			if (body != null && body.orbit != null)
			{
				return (1.0 + body.orbit.eccentricity) * body.orbit.semiMajorAxis;
			}
			return 0;
		}


		// return periapsis of a body orbit
		public static double Periapsis(CelestialBody body)
		{
			if (body != null && body.orbit != null)
			{
				return (1.0 - body.orbit.eccentricity) * body.orbit.semiMajorAxis;
			}
			return 0;
		}

 

I've got to the third problem, withe Sim.SolarLuminosity(CelestialBody sun), and it most likely lies with this line:


double A = Lib.PlanetarySystem(FlightGlobals.GetHomeBody()).orbit.semiMajorAxis;

Log. However, this will have to wait until morning.

Thanks. I managed to put some time into Kopernicus support, and I think we now have something very viable. The Kopernicus branch was merged with the sstu-and-solar branch, so if you want to try it out please use the binaries from that. It seems to be working for me, even with a multi-star system.

On 7/19/2019 at 3:58 PM, dskzz said:

Hi  @Sir Mortimer ... think maybe you missed my question post....

Real quick again, 1. FASA, even a clean KErbalism + FASA install, when I try and fly a Mercury capsul,  EC drains down to zero by the time I'm on the launchpad, like it's taking HUGE bits of EC at a time.  Looks like its the antenna.  Is there some way to disable the internal antenna? It looks like its always deployed,

2. Trying to run EVA Report and it says No Electric Charge.  even if I KIS a battery into the inventory.  

3. Is zzzKerbalism still a thing? I don't have the folder, I see it all over configs, should I make the folder by hand?

 

Thanks!

zzzKebalims isn't a mod, it's a MM hook that tells ModuleManager to execute the patches for Kerbalism after all the other Kerbalism patches have been applied. You're not supposed to have that in your GameData. 

I'm afraid I can't help you with FASA and Mercury capsules and EC consumption. Smells like a configuration error, maybe head over to the Realism Overhaul discord server or forum thread.

Link to comment
Share on other sites

On 6/21/2019 at 7:33 PM, Cynthum said:

Wanted to give a heads up about Kerbalism's handle of science transmission conflicting with Strategia. (Unless I'm completely wrong about how Kerbalism works, sorry!) It looks like "To Boldy Go" strategy from the Strategia mod would see the act of transmitting bit by bit, as a reason to reward individually, as each transmission is also seen as part of a "new biome"? Ended up with millions in funds.

Not using the strategy is an obvious fix.

Great mod! Surprised by the new direction of science collection, storage, and transmission. Thanks for the many hours of fun and accidental deaths by radiation poisoning. :D

I'm not sure if this fell through the cracks or not, but I didn't see an issue posted on the Kerbalism Github.  @Sir Mortimer ?

Link to comment
Share on other sites

9 hours ago, infinite_monkey said:

Just sent my first probe to the Mun and wanted to do a magnetometer scan (from DMagic). It seems to never complete, as when batteries are low, it seems to delete the progress made so far and starts from the beginning. Is this normal?

It's just the UI indication that starts from 0%, the progress isn't deleted. Magnetometer scans take a while.

10 hours ago, TicTac said:

I'm not sure if this fell through the cracks or not, but I didn't see an issue posted on the Kerbalism Github.  @Sir Mortimer ?

There is a fix related to Strategia to stop it from spamming 0.0 science gained texts all the time. But I don't know if that fixes the to boldly go strategy.

Link to comment
Share on other sites

5 hours ago, Sir Mortimer said:

It's just the UI indication that starts from 0%, the progress isn't deleted. Magnetometer scans take a while.

Hm, I fast-forwarded the 15 days it said it would take, and still got 0%. Is there a way to check the real progress, maybe in the savefile? How would I find it?

Link to comment
Share on other sites

Just now, infinite_monkey said:

Hm, I fast-forwarded the 15 days it said it would take, and still got 0%. Is there a way to check the real progress, maybe in the savefile? How would I find it?

The R&D tab that shows experiments should tell you, I think. Experiments can often take longer than their normal time due to data transmission not keeping up, power loss, etc.

Link to comment
Share on other sites

2 hours ago, lordcirth said:

The R&D tab that shows experiments should tell you, I think. Experiments can often take longer than their normal time due to data transmission not keeping up, power loss, etc.

You're right, there IS some progress showing there, thanks. It is weird though that it's less than 10%, as I'm losing power only for like 10% of an orbit. Not sure if this is related, but my log has tons of this message:

[ScienceSubject] - Error in converting Situation System.ArgumentException: An empty string is not considered a valid value.
  at System.Enum.Parse (System.Type enumType, System.String value, Boolean ignoreCase) [0x00000] in <filename unknown>:0 
  at System.Enum.Parse (System.Type enumType, System.String value) [0x00000] in <filename unknown>:0 
  at ScienceUtil.GenerateLocalizedTitle (System.String id) [0x00000] in <filename unknown>:0 

EDIT: I think I need to rephrase my question. As the relative positions of my Orbit, the Mun, the Sun and Kerbin changed, I don't lose power anymore. Progress seems to be made, and the timer isn't reset anymore. So while I didn't lose the progress that has already be sent to Kerbin, is it possible that progress NOT SENT YET is lost, i.e. does a power outage clear data stored on the local hard drive? If that's not the case, there seems to be a bug in calculating the duration.

8 hours ago, Sir Mortimer said:

There is a fix related to Strategia to stop it from spamming 0.0 science gained texts all the time. But I don't know if that fixes the to boldly go strategy.

Is this fix released yet? I keep getting that message all the time...

Edited by infinite_monkey
Link to comment
Share on other sites

1 hour ago, infinite_monkey said:

EDIT: I think I need to rephrase my question. As the relative positions of my Orbit, the Mun, the Sun and Kerbin changed, I don't lose power anymore. Progress seems to be made, and the timer isn't reset anymore. So while I didn't lose the progress that has already be sent to Kerbin, is it possible that progress NOT SENT YET is lost, i.e. does a power outage clear data stored on the local hard drive? If that's not the case, there seems to be a bug in calculating the duration.

There's a bug in the duration calculation. It doesn't take into account the amount already transmitted for any given experiment.

1 hour ago, infinite_monkey said:

Is this fix released yet? I keep getting that message all the time...

Nope, sorry.

Link to comment
Share on other sites

Long time player came back to start a new career based on the new science model in Kerbalism.  I'm getting a few little glitches that have already been mentioned, but overall it's awesome -- congrats!

I have a bug that I haven't seen discussed (recently), as well as a "fix" I found that may help ID the problem.  The bug: the gravity ring part from Kerbalism and all the SSPXr inflatable centrifuges are unavailable in VAB, either in Sandbox or career.  No errors in KSP.log, MM.log, and the parts are listed in the database when I use the debug menu.  Since the thing these all have in common is the GravityRing module, I edited the SSPX.cfg patch to remove the following from each of the SSPX centrifuges:

 

	MODULE
	{
		name = GravityRing
		ec_rate = 2.5
		animBackwards = True
		deploy = Expand
		rotate = SpinCenter
		deployed = False
		rotateIsTransform = True
	}

	!MODULE[ModuleDeployableCentrifuge] {} // Functionality is replaced by ModuleHabitat

With that taken out of the patch, the SSPX centrifuges are in VAB and have all the life support, etc. from Kerbalism (but no gravity ring part).

I love the spin gravity as comfort feature -- hope this might help in squashing the bug.  If you want any logs, saves, etc. to help chase this down, I'm happy to provide them.

Thanks again for all your work on this epic mod!

Update:  I installed Filter Extensions and now Gravity Ring and all SSPX centrifuges are in VAB with unedited SSPX patcg, with all intended Kerbalism functions (comfort).   Some oddity with the stock part filter I guess...

Edited by DR_RDR
Update
Link to comment
Share on other sites

I've been trying to make Kerbalism work on RSS/RO via the configs created for those mods, and every single capsule seems to lack pressurization, as seen on the screenshot below:

BSpBVZn.png

Notice there's a running Pressure Control module, but the GUI pressurization tooltip only shows atmosphere leaks.

As a side note, are all capsules supposed to have a "no" on the stress tab's "pressurized" field? Or is it a case of bad configs? As for the rest, I'll be adding my own food/water/oxygen configs for parts that don't have those :).

Link to comment
Share on other sites

@Sir Mortimer Thank you very much. The new branch is working great.

I've also experimented with the reference body, and this setting is working as long as there is only one planet mod installed. The worlds beyond is itself modular, however that is not the problem since planets are loaded after stars and they should not affect the index. However other mods may affect it, depending on the order in which bodies are loaded.

However, with these new changes, reference body is very easy to assign automatically. I created a pull request for this in sstu-and-solar branch.

Thank you

Edited by Shiolle
Link to comment
Share on other sites

How can I figure out how long my Kerbals can survive without a scrubber or humidity controller? I can see in the planner in the VAB there is a scrubbing and humidity field but they are either "none" or "good".

Link to comment
Share on other sites

On 7/21/2019 at 7:45 PM, DR_RDR said:

Update:  I installed Filter Extensions and now Gravity Ring and all SSPX centrifuges are in VAB with unedited SSPX patcg, with all intended Kerbalism functions (comfort).   Some oddity with the stock part filter I guess...

Thank you for sharing this! I have been waiting for over a month for a fix on this. 

Link to comment
Share on other sites

idk if this has been addressed but is there a setting of Kerbalism for science. I love almost everything about Kerbalism except for the science gathering. Its not a critique at all of the mod and its immersion into realism. Im just looking for all the realism of Kerbalism without the realism of the science gathering. I prefer the stock version of science gathering. 

Link to comment
Share on other sites

13 hours ago, sp1989 said:

idk if this has been addressed but is there a setting of Kerbalism for science. I love almost everything about Kerbalism except for the science gathering. Its not a critique at all of the mod and its immersion into realism. Im just looking for all the realism of Kerbalism without the realism of the science gathering. I prefer the stock version of science gathering. 

Yes look in settings.cfg in kerbalism mod folder. Change science to false.

On 7/25/2019 at 11:03 AM, rrowland said:

Is the extremely slow progression of science in inactive vessels a known issue? The progression seems to be at about 10% of expected; if I timewarp 10 days about a day is knocked off the science.

Make sure your craft batteries never dip to 0 when running real time. It seriously slows down your progression when in high timewarp.

Link to comment
Share on other sites

On 7/10/2019 at 4:18 PM, Sir Mortimer said:

Kerbalism science already has these support configs. The files are in GameData/KerbalismConfig/System/ScienceRework/ModSupport.

CommunityTechTre, ProbesBeforeCrew, SSPX, SoundingRockets, UniversalStorage2, DMagicOrbitalScience, NearFutureTech, RestockPlus, SampleReturnCapsule, StationScience

If you would like to integrate another mod into kerbalism, I suggest you copy StationScience to a new file and start working on that. Please try to follow the configuration principle outlined in those files.

Near the top of the file, define the desired behaviour of the individual experiments like this:


@KERBALISM_EXPERIMENT_VALUES:NEEDS[YourMod,FeatureScience]
{
        YourMod
        {
                yourExperiment
                {
                        ECCost = 3 // ec per second
                        size = 0.5 // size in Mb
                        value = 40 // science value
                        duration = 3888000 // duration in seconds, this is 180 days
                        requirements = Body:Kerbin,Microgravity // additional requirements, see docs
                }
                yourReturnSample
                {
                        ECCost = 3 // ec per second
                        size = 0.5 // size in slots
                        value = 40 // science value
                        duration = 3888000 // duration in seconds, this is 180 days
                        requirements = Body:Kerbin,Microgravity // additional requirements, see docs
                        SampleMass = 4 // mass in Kg
                }
        }
}

The KERBALISM_EXPERIMENT_VALUES is only there to do exactly this: hold values that define science value, ec costs etc. for the individual experiments. They are not used by the Kerbalism mod at runtime, it's just helping with configuration to keep everything nicely in one place. If you don't do this you'll end up pulling your hair because it gets too confusing. Been there, done that. Also, this makes it very easy to tweak any number (science points, duration, EC usage etc.) at a later time without having to look through the entire file.


In the next step, those values need to be applied in two different places, with two slightly different semantics (which is what can make this so confusing): first, it needs to be applied to the EXPERIMENT_DEFINITION (that's what defines the experiment itself to KSP), and it needs to be applied to the parts the experiments run on. Kerbalism replaces the stock ModuleScienceExperiment part modules with its own.


// ============================================================================
// Replace existing experiments with our own
// ============================================================================
@PART[*]:HAS[@MODULE:HAS[#experimentID[yourExperimentID]]]:NEEDS[YourMod,FeatureScience]
{
        !MODULE:HAS[#experimentID[yourExperimentID]]  {}
        MODULE
        {
                name = Experiment
                experiment_id = yourExperimentID
                ec_rate = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourExperiment/ECCost$
                requires = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourExperiment/requirements$
                data_rate = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourExperiment/size$
                @data_rate /= #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourExperiment/duration$
        }
}

@PART[*]:HAS[@MODULE:HAS[#experimentID[yourReturnSampleID]]]:NEEDS[YourMod,FeatureScience]
{
        !MODULE:HAS[#experimentID[yourReturnSampleID]]  {}
        MODULE
        {
                name = Experiment
                experiment_id = yourReturnSampleID
                ec_rate = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourReturnSample/ECCost$
                requires = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourReturnSample/requirements$
                data_rate = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourReturnSample/size$
                @data_rate /= #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourReturnSample/duration$
                sample_mass = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourReturnSample/SampleMass$
                sample_reservoir = #$sample_mass$
        }
}

@EXPERIMENT_DEFINITION:HAS[#id[yourExperimentID]]:NEEDS[YourMod,FeatureScience]
{
        @baseValue = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourExperiment/value$
        @dataScale = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourExperiment/size$
        @dataScale /= #$baseValue$
}

@EXPERIMENT_DEFINITION:HAS[#id[yourReturnSample]]:NEEDS[YourMod,FeatureScience]
{
        @baseValue = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourExperiment/value$
        @dataScale = #$@KERBALISM_EXPERIMENT_VALUES/yourMod/yourExperiment/size$
        @dataScale /= #$baseValue$
}

That should get you going real soon.

Once you're done with the mod, please open a pull request on Kerbalisms GitHub page

 

Thanks, that works. At least for the most parts. I have some parts from Coatl Aerospace ProbesPlus who don`t work. They have still the old Experiments. Example: there are some Magnetometers in this pack. They use an own Experiment (ExperiemntID: ca_mag). But if I make a config with this ExperimentID the Magnetometers have no new Experiment with duration etc. There is still the old experiment-description.

Link to comment
Share on other sites

I've encountered a game breaking bug I'm pretty sure is related to science transmission in Kerbalism, and I wanted to see if anyone has a suggestion about how to squash it. 

Normally, I'm getting that Strategia blue "+0.0 Science..." on screen message constantly.  It's annoying, but it let's me know the background transmission of science is working.  The bug shows up returning to KSC, when those message stop.  My log spams the following message:

ArgumentException: An element with the same key already exists in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.UInt32,KERBALISM.Drive].Add (UInt32 key, KERBALISM.Drive value) [0x00000] in <filename unknown>:0
  at KERBALISM.Drive.GetDriveParts (.Vessel vessel) [0x00000] in <filename unknown>:0
  at KERBALISM.Drive.GetDrives (.Vessel vessel, Boolean include_private) [0x00000] in <filename unknown>:0
  at KERBALISM.Science.Transmitting (.Vessel v, Boolean linked) [0x00000] in <filename unknown>:0
  at KERBALISM.ConnectionInfo.GetAntennaInfo (.Vessel v, Boolean powered, Boolean storm) [0x00000] in <filename unknown>:0
  at KERBALISM.ConnectionInfo..ctor (.Vessel v, Boolean powered, Boolean storm) [0x00000] in <filename unknown>:0
  at KERBALISM.ConnectionInfo.Update (.Vessel v, Boolean powered, Boolean storm) [0x00000] in <filename unknown>:0
  at KERBALISM.Vessel_info..ctor (.Vessel v, Guid vessel_id, UInt64 inc) [0x00000] in <filename unknown>:0
  at KERBALISM.Cache.VesselInfo (.Vessel v) [0x00000] in <filename unknown>:0
  at KERBALISM.Kerbalism.FixedUpdate () [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)

No more science transmits after that.  Switching to an active vessel will generate science for that vessel, but the background science collection doesn't work after that.

I'd appreciate any guidance on interpreting that error.  Sounds to me like Kerbalism is expecting to collect science from a vessel that isn't there anymore?  Or 2 vessels with the same unique ID?  Duplicate HDDs?

Thanks for any insight you can offer based on what I've provided.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...