Jump to content

[1.5 - 1.10] Kerbalism 3.11


Sir Mortimer

Recommended Posts

On 8/25/2020 at 6:21 PM, JadeOfMaar said:

You have to edit the profile config directly to add options like that.

I think that's only true for the "Profile" node because Kerbalism reads that before MM can patch it. Part modules can be modified with MM if the patch order is right.

On 8/25/2020 at 1:46 PM, baldamundo said:

How would I write a patch to add hydrogen fuel cells as an option in the Kerbalism life support pod configuration options?

I succeeded by adding ":AFTER[KerbalismDefault]" to my patch (not exactly the same thing but similar - add electrolysis to the US II fuel cells)

Spoiler

@PART[USFuelCell*]:NEEDS[UniversalStorage2,ProfileDefault]:AFTER[KerbalismDefault]
{
        MODULE
        {
                name = ProcessController
                resource = _WaterElectrolysis
                title = #KERBALISM_WaterElectrolysis_title//Water electrolysis
                capacity = 2
        }

        @MODULE[Configure]:HAS[#title[Fuel?Cell]]
        {
                SETUP
                {
                        name = Water Electrolysis
                        desc = #KERBALISM_WaterElectrolysis_desc//Split <b>Water</b> into its <b>Hydrogen</b> and <b>Oxygen</b> components.

                        MODULE
                        {
                                type = ProcessController
                                id_field = resource
                                id_value = _WaterElectrolysis
                        }
                }
        }
}

@PART[USFuelCellMedium]:NEEDS[UniversalStorage2,ProfileDefault]
{
        @MODULE[ProcessController]:HAS[#resource[_WaterElectrolysis]]
        {
                @capacity *= 3
        }
}

 

 

Edited by HansAcker
Link to comment
Share on other sites

On 8/31/2020 at 8:33 PM, JadeOfMaar said:

But have you confirmed this works with a converter module that you created/ that is not already provided by Kerbalism itself?

This patch would only work with processes already defined in the Profile node - as that's not patchable with MM because it needs to be parsed before MM runs, so the loader can set the feature flags seen by later patches. At least that's how I interpret the loader source. I'm not sure how that maps to converter modules and if custom converters can be supported.

 

But, if you only want to add (not change) processes, couldn't that be done with a .cfg file just containing the new process in a Profile node and Unity would merge it even before Kerbalism runs?

Edit: I did give it a try later, it won't work (yet). Kerbalism loads the first Profile with the name it's looking for. Additional nodes won't be merged and if the patch is loaded first, NullRefs ensue because all the rest is missing. I guess the profile loader could be changed to merge all config nodes with the same name. That would make extending Kerbalism much easier.

Edit again: I didn't know that Kerbalism already includes some mechanism for that, the "KerbalismSupport" profile. At least it allows adding content to the profile, not changing it (duplicates ignored).

Third edit's the charm: a resource definition for the _ProcessName pseudo-resource was missing. So that's a way to add custom converter recipes without editing the profile cfg.

Spoiler

Profile
{
    name = KerbalismSupport

    modname = test
    moddir = .

    Process
    {
        name = test
        title = Nitronon
        modifier = _TestProcess

        input = [email protected]
        input = [email protected]
        input = [email protected]
        output = [email protected]
        dump_valve = MonoPropellant
    }
}

RESOURCE_DEFINITION
{
    name = _TestProcess
    density = 0.0
    isVisible = false
}

@PART[ISRU]:AFTER[KerbalismDefault]
{
    MODULE
    {
        name = ProcessController
        resource = _TestProcess
        title = Nitronon Test
        capacity = 1
    }

    @MODULE[Configure]:HAS[#title[Chemical?Plant]]
    {
        SETUP
        {
            name = Nitronon Test
            desc = converts stuff

            MODULE
            {
                type = ProcessController
                id_field = resource
                id_value = _TestProcess
            }
        }
    }
}

G2tGGse.jpg

 

Edited by HansAcker
Link to comment
Share on other sites

@Sir Mortimer, I am having an issue with Kerbalism 3.11. The frequency of solar storms is insane. They are happening one after another. I mean, literally hours apart. I can't even get a flight from Kerbin to Minmus - even with full shielding, the radiation kills my kerbonauts. I am using default profile, solar storm probability is set to 60% in game settings (I didn't touch it, it's the default value). Is this the intended behavior?

Link to comment
Share on other sites

@Sir Mortimer Using (I think) Kerbalism 3.11 in KSP 1.9.1, I had an alarming incident where I accepted a rescue contract, but the stranded Kerbal’s pod was totally empty of any supplies- I had to edit the save file so they didn’t suffocate in seconds. In previous versions of Kerbalism those rescue pods have had many days worth of supplies and those supplies have only started being used once a rescue craft got close- or they seemed to be filled up at that point at least, judging by the messages saying everything was empty and then full again whenever I got close to one.

I also had two separate solar flares around Kerbin on the same (IRL) day, a few game days apart, and while I’ve set them to be fairly short after nearly losing a whole crew around Minmus, it was still a nuisance to have two of them so close together. There hasn’t been another in the ~30 or so game days since so it’s not like it’s happening all the time, but I’ve only had two before that day in nearly 2 game years since starting the save.

Link to comment
Share on other sites

On 8/6/2020 at 10:11 PM, Scribblette said:

 Per recent discussion in the kerbal interstellar extended mood mod, there might be some conflict between these mods at the moment in current KSP resulting in a freeze with mod manager when it reaches kspicommandcenterdome. I'm the second person I've seen to experience this and removing either kspi or kerbalism fixed the freeze.

Are there any suggested steps I could take to find and eliminate the bug, or is it just that I'm stupid for trying it with the current version of KSP? 

Apologies if I'm doing an obvious stupid. 

Excited to try KSPIE, however I can't get it to fully run. Having the same issue as mentioned two pages back. Also using Kerbalism (v3.11) +KSPIE (v1.25.23), and not able to launch the game (v1.10.1.2939)

Edit: Just realised I posted it in the wrong thread. Here in Kerbalism, not KSPIE.. Will link to this post in KSPIE thread.

The relevant(?) part of the log

[LOG 09:12:24.061] DragCubeSystem: Creating drag cubes for part 'KspiCentrifuge'
[LOG 09:12:24.190] PartLoader: Compiling Part 'WarpPlugin/Parts/Command/CommandCenterDome/part/KspiCommandCenterDome'
[LOG 09:12:24.199] [OKS] Could not find secondary animation - Rotate
[LOG 09:12:24.199] ERROR IN USIAnimationOnLoad - Object reference not set to an instance of an object
[LOG 09:12:24.327] [ModuleRealAntenna]  OnLoad from MODULE: [+RA] KspiCommandCenterDome [1.5 dBi L 30 dBm [TL:0] BPSK 31.5 Kbps] 
[LOG 09:12:24.343] PartLoader: Part 'WarpPlugin/Parts/Command/CommandCenterDome/part/KspiCommandCenterDome' has no database record. Creating.
[LOG 09:12:24.343] [DragCubeSystem]: Drag cubes not found or cannot be read for part Part. Generating New drag cubes.
[LOG 09:12:24.355] DragCubeSystem: Creating drag cubes for part 'KspiCommandCenterDome'
[EXC 09:12:24.440] IndexOutOfRangeException: Index was outside the bounds of the array.
	FNPlugin.FNHabitat.AssumeDragCubePosition (System.String name) (at <f1d7585dabaa4eeba51e757112346ca8>:0)
	DragCubeSystem+<RenderDragCubes>d__34.MoveNext () (at <c1858a3f77504bd1aaa946fdccf84670>:0)
	UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

I dug around the sourcecode and the config files but I have no exact clue why it is not working. If I remove the FNHabitat module from the part.cfg (KspiCommandCenterDome) it seems to load. The weird thing is that the IXS_Command module, which is also non-inflatable, spawns the same error/exception, yet the game seems to recover from that and continues loading.

My wild guess is:

In FnHabitat.cs, the very first line of AssumeDragCubePosition tries to access an empty array. If the part is not deployable, there should not be any animation, right? However, I am still confused as to why the IXS_Command module seems to work (well, causes an error here, yet does not fail completely..). That would indicate that the error happens further down the line. I guess for now I will just disable this module inside the part. I am probably not far enough in the TechTree anyway

public void AssumeDragCubePosition(string name)
{
	var anim = part.FindModelAnimators(deployAnimationName)[0];
  
  ...
  ...

Maybe a quick check like ..

var anim_array = part.FindModelAnimators(deployAnimationName)
if (anim_array == null || anim_array.Length == 0)
{
	enabled = false;
	return;
}

.. at the beginning of the function might help?

 

Cheers

Edited by Grtschnk
Link to comment
Share on other sites

Hello Everyone, 

                          I'm playing with Kerbalism (stock configs) in RSS (no RO)... I really love the mod, however I have a question: is it possible to modify kerbalism's planetary radiation configs? I'm asking this becuase I have a station in LEO ~310 km, and it occasionally warns that the station is entering Earth's radiation belt even though according to Wikipedia, the inner Van Allen belt starts at around 1000 km above the Earth's surface. On kerbalism's wiki it states that kerbalim is compatible with RSS, then why this discrepancy. Perhaps @Sir Mortimer  can answer my query. Thanks

Link to comment
Share on other sites

Hey, I'm trying again to marry Kerbalism and Kerbal Health, this time via C# API, but I have a problem. The examples in your technical guide don't seem to work for me. More specifically, this line returns 'null' even though Kerbalism is installed and found:

Type apiType = Type.GetType("KERBALISM.API");

Any ideas?

Link to comment
Share on other sites

Ok, I think I got this one. The Type.GetType didn't work, because it only loads types from the executing assembly. To access a type from another assembly, you need to use Assembly.GetType. This is how I did it:

kerbalismAssembly = AssemblyLoader.loadedAssemblies.FirstOrDefault(la => la.name == "Kerbalism18").assembly;
Type apiType = kerbalismAssembly.GetType("KERBALISM.API");

One problem here is that I have to specify the assembly name. So when Kerbalism is updated, this code will need to be changed as well.

Link to comment
Share on other sites

Anyone got a way to decouple rotating crew modules’ rotation from inflation/extension? Both the Kerbalism supplied centrifuge module and those in SSPXr will only inflate/extend and rotate at the same time, but I want to be able to have the modules deployed but not spinning to provide extra internal space without burning a noticeable quantity of power when there’s nobody inside them (most commonly due to a total lack of radiation shielding). This is possible using SSPXr without Kerbalism as the centrifuge modules there can be deployed without spinning them up so it’s something in Kerbalism that makes the two things happen at once.

Link to comment
Share on other sites

I gave a try to this mod and *wow* the gameplay is totally different! (career game)

Yet, I noticed a strange behavior but I need to double check it on a seperate install as I have other mods installed : when activating the Advanced Tweakables, the autostrut option never show up. I only have the RigidPart tweakable visible.

Do you have the same behavior on your side?

Edited by OnlyLightMatters
Link to comment
Share on other sites

20 minutes ago, OnlyLightMatters said:

when activating the Advanced Tweakables, the autostrut option never show up

Did you unlock the "General Construction" tech node? In career, you need to have the EAS-4 Strut Connector available in order to use autostruts.

Link to comment
Share on other sites

How do I adjust the values for HDD capacity? I installed Interstellar and for some reason this lowered all the storage values for all my pods/probes. The ones that are already in flight are still at their initial values though.

 

Edit: Figured it out/I'm a big dummy. Interstellar just pushed the HDD upgrades one extra tech spot, so you have to go into the modulemanager config file and reenter where HDD-Upgrade2-4 become unlocked.

Edited by MassoudGL
Fixed
Link to comment
Share on other sites

15 hours ago, HansAcker said:

Did you unlock the "General Construction" tech node? In career, you need to have the EAS-4 Strut Connector available in order to use autostruts.

Nope. Is it mandatory to restore the stock behavior? 

13 hours ago, aluc24 said:

How can I make the vessel auto-send the data that is generated in the Lab by analysing samples? Every time there is connection loss, the data fills up, the lab stops, and I have to manually resume everything.

By building a reliable telecom network :D ?

Link to comment
Share on other sites

4 hours ago, OnlyLightMatters said:
19 hours ago, HansAcker said:

Did you unlock the "General Construction" tech node? In career, you need to have the EAS-4 Strut Connector available in order to use autostruts.

Nope. Is it mandatory to restore the stock behavior? 

It is stock behaviour that autostruts require unlocking the struts tech node in a career game.

Link to comment
Share on other sites

Hello,

I am trying to use Kerbalism with the New Horizons planet pack mod and the amount of electric charge generated by solar panels is very very low, like 0.02/hr in orbit of Kerbin. The panel output is still very low, less than 0.1/s even in very low orbits of the sun. Without Kerbalism installed the electric charge generated by the solar panels is around normal.

I have the following mods installed:

CommunityResourcePack

Kerbalism

KerbalismConfig

Kopernicus

KopernicusExpansion

ModularFlightIntegrator

New_Horizons

 

I did try modifying some of the New Horizons configs to increase the power of the sun but it didn't seem to have any effect (I don't really know how that works).

I don't know much about how all these mods work but given the very small power outputs maybe Kerbalism is taking the semi-major axis of Kerbin's orbit around gas-giant Sonnah as 1 "AU" for the purpose of solar panel calculations?

Anyways any help is appreciated. 

Link to comment
Share on other sites

5 hours ago, SlashTen said:

Hello,

I am trying to use Kerbalism with the New Horizons planet pack mod and the amount of electric charge generated by solar panels is very very low, like 0.02/hr in orbit of Kerbin. The panel output is still very low, less than 0.1/s even in very low orbits of the sun. Without Kerbalism installed the electric charge generated by the solar panels is around normal.

I have found that if I change the semi-major axis in the New Horizons Kerbin config to 13.6e+9 (still in orbit around Sonnah, the gas giant of which Kerbin is a moon in New Horizons), then solar panels will behave like stock. That is, a vessel orbiting the sun at around the altitude of stock Kerbin will have solar panels outputting the correct amount of electric charge.

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