Jump to content

[Min KSP: 1.12.2] Pathfinder - Space Camping & Geoscience


Angelo Kerman

Recommended Posts

8 minutes ago, pellinor said:

I had a look in the log and found kOS. You don't happen to have kOS functionality on those parts? This is known to cause this symptom when combined with other modules that use the new interface (the same thing happens with kOS & TweakScale).

https://github.com/KSP-KOS/KOS/issues/1643 (solved but not released yet)

The Ponderosa template has a kOS part module, but none of the others do. This is definitely a puzzling issue, are others seeing the same thing with the pre-release I just posted?

Link to comment
Share on other sites

2 hours ago, pellinor said:

I had a look in the log and found kOS. You don't happen to have kOS functionality on those parts? This is known to cause this symptom when combined with other modules that use the new interface (the same thing happens with kOS & TweakScale).

https://github.com/KSP-KOS/KOS/issues/1643 (solved but not released yet)

I have kOS installed, not sure if the parts involved have a kOS cpu added to them. But other command pods certainly have and they dont exhibit this infinite mass counting...  I'll try it without kOS installed tomorrow. Its 3am here now and starting to keel over. 

Edited by Denko666
Link to comment
Share on other sites

1 minute ago, Denko666 said:

I have kOS installed, not sure if the parts involved have a kOS cpu added to them. But other command pods certainly have and they dont exhibit this infinite mass counting...  

You need kOS plus another module which applies mass through the new interface. That totally explains why a simple pod +kOS does not show the issue. If you have patches active to add kOS to more parts this would also explain why you see the bug for more parts.

Link to comment
Share on other sites

13 hours ago, lakilakigant said:

Honestly, I think I'm gonna delete the base segments for now. Until the IVAs are ready. Still this shows so much promise. The buffalo's IVA, there's a masterpiece.o.png

Might be easier for you to just delete the mod altogether.

Edited by Angel-125
Link to comment
Share on other sites

@Angel-125 Just thought I'd mention it because well...Murphy's Law.  Since CKAN has recently been misbehaving so badly I've started to check back in with it whenever I have to update something to keep a track on what versions they are installing of all your mods.  As of tonight, it has reverted (yes, gone backwards) to installing Pathfinder 0.9.16, Buffalo 0.2.12 and WBT 1.2.0 - MOLE is still installing correctly with 0.6.0.  I know there's not much you can really do about it, but obviously this is bound to cause some people issues so I figured I'd make sure you were aware just in case.

Link to comment
Share on other sites

Please note that this is just to be certain we're on the same page. I do note that your code is implemented such that it ill not cause runaway mass.

10 hours ago, Angel-125 said:

public virtual float CalculatePartMass(float defaultMass, float currentPartMass)
        {
            if (partMass > 0.001f && isInflatable == false)
                return partMass;
            else if (partMass > 0.001f && isInflatable && isDeployed)
                return partMass;
            else
                return defaultMass;
        }

I'm not quite certain what the above is doing as I don't know the meaning of partMass and defaultMass, but GetModuleMass must return the mass delta (ie, how much mass the module adds to, or removes from, the part). This means that if you want the mass of the part to be as given in the cfg file (assuming no other mass modifying modules are on the part), GetModuleMass must return 0.

Link to comment
Share on other sites

10 hours ago, rasta013 said:

@Angel-125 Just thought I'd mention it because well...Murphy's Law.  Since CKAN has recently been misbehaving so badly I've started to check back in with it whenever I have to update something to keep a track on what versions they are installing of all your mods.  As of tonight, it has reverted (yes, gone backwards) to installing Pathfinder 0.9.16, Buffalo 0.2.12 and WBT 1.2.0 - MOLE is still installing correctly with 0.6.0.  I know there's not much you can really do about it, but obviously this is bound to cause some people issues so I figured I'd make sure you were aware just in case.

That's why I don't support CKAN anymore.

Link to comment
Share on other sites

5 hours ago, taniwha said:

Please note that this is just to be certain we're on the same page. I do note that your code is implemented such that it ill not cause runaway mass.

I'm not quite certain what the above is doing as I don't know the meaning of partMass and defaultMass, but GetModuleMass must return the mass delta (ie, how much mass the module adds to, or removes from, the part). This means that if you want the mass of the part to be as given in the cfg file (assuming no other mass modifying modules are on the part), GetModuleMass must return 0.

It sounds like I have a misunderstanding about how IPartMassModifier works. I was under the assumption that defautMass, which comes from public float GetModuleMass(float defaultMass, ModifierStagingSituation sit), is the mass of the part. So my code worked on that assumption. For Pathfinder, partMass was a value I read from the various templates. So for instance the geology lab template is 1.5 tons, while the doc science lab is 3 tons. so this code:

            if (partMass > 0.001f && isInflatable == false)
                return partMass;
            else if (partMass > 0.001f && isInflatable && isDeployed)
                return partMass;
            else
                return defaultMass;


basically says that if I read a partMass from a template, and the part isn't inflatable, then return the partMass. Otherwise, if I have partMass and the mod is inflatable and it has been inflated, then return the partMass. Otherwise, return what KSP provided me, which is the defaultMass.

If I'm supposed to return the delta, that definitely changes things. I'd have to know the part's mass as reported by Part.mass, and then I guess add to it the mass of the stuff needed to outfit a part in a particular configuration?

Link to comment
Share on other sites

defaultMass is the mass from the part's prefab. Sorry, was't paying enough attention to that bit earlier.

Anyway, the idea is that the part mass update code runs through all part modules that implement IPartMassModifier collecting their mass deltas, and sums them up to add to the part's prefab mass. part.mass then gets set to the total (ie, mass = prefab + sum(module deltas)). So while you won't be able to affect the masses added by other modules (unless you get really nefarious and sneaky, which I don't recommend), if you assume your module is the only one that modifies mass and you want to set the part's mass to a specific mass, you would return desiredMass - defaultMass.

BTW, same thing for IPartCostModifier (may be useful to you if you want to implement wear and tear reducing recovery funds).

I hope that helps.

Link to comment
Share on other sites

3 minutes ago, taniwha said:

(unless you get really nefarious and sneaky, which I don't recommend)

*evil laugh* Bwahahahaha! :wink:

3 minutes ago, taniwha said:

defaultMass is the mass from the part's prefab. Sorry, was't paying enough attention to that bit earlier.

Anyway, the idea is that the part mass update code runs through all part modules that implement IPartMassModifier collecting their mass deltas, and sums them up to add to the part's prefab mass. part.mass then gets set to the total (ie, mass = prefab + sum(module deltas)). So while you won't be able to affect the masses added by other modules (unless you get really nefarious and sneaky, which I don't recommend), if you assume your module is the only one that modifies mass and you want to set the part's mass to a specific mass, you would return desiredMass - defaultMass.

BTW, same thing for IPartCostModifier (may be useful to you if you want to implement wear and tear reducing recovery funds).

I hope that helps.

It does, thanks! :) When I get home I'll do some more tweaking to WBT. Fortunately all I really need to know is the mass added by specific templates, which I get from partMass. So it sounds like my logic should be:

If I have a partMass and the module isn't inflatable, return partMass. If I have partMass and the part is inflatable, and it is inflated, then return partMass. Otherwise, return 0 (where before I would return defaultMass that was passed in by the game).

Link to comment
Share on other sites

Yeah, though I do have to ask (as a user scratching his head): why does inflating increase the mass? Gas used for inflation would be stored in the part, wouldn't it? (thus, if anything, mass loss on inflation (due to losses).

Oh, and while I like your response to my recommendation, I made it because being nefarious and sneaky that way might give you more trouble than it's worth.

Link to comment
Share on other sites

15 minutes ago, taniwha said:

Yeah, though I do have to ask (as a user scratching his head): why does inflating increase the mass? Gas used for inflation would be stored in the part, wouldn't it? (thus, if anything, mass loss on inflation (due to losses).

Oh, and while I like your response to my recommendation, I made it because being nefarious and sneaky that way might give you more trouble than it's worth.

Great question. :) The mass increase goes hand in hand with the requirement to have sufficient Equipment resources on hand to inflate the module. The gas needed would be there, sure, but not the tables, chairs, game boxes, and other furnishings. Think of the inflatable part as a shell that must be outfitted with, well, equipment to be useful and fully functioning. That equipment takes up mass, and that is (or rather, will be) reflected in the IPartMassModifier implementation. :)

Of course, you can always turn off the need for Equipment to inflate or reconfigure the module. I often do that during testing.

Link to comment
Share on other sites

18 hours ago, pellinor said:

I had a look in the log and found kOS. You don't happen to have kOS functionality on those parts? This is known to cause this symptom when combined with other modules that use the new interface (the same thing happens with kOS & TweakScale).

https://github.com/KSP-KOS/KOS/issues/1643 (solved but not released yet)

The last update of kOS seems to have fixed it. At least in the editor the parts now behave as they should. 

So you were more then probably right Pellinor, good eye and memory!

 

Link to comment
Share on other sites

4 hours ago, Angel-125 said:

Great question. :) The mass increase goes hand in hand with the requirement to have sufficient Equipment resources on hand to inflate the module. The gas needed would be there, sure, but not the tables, chairs, game boxes, and other furnishings. Think of the inflatable part as a shell that must be outfitted with, well, equipment to be useful and fully functioning. That equipment takes up mass, and that is (or rather, will be) reflected in the IPartMassModifier implementation. :)

I had, actually, thought of that, but got a little confused because...

4 hours ago, Angel-125 said:

Of course, you can always turn off the need for Equipment to inflate or reconfigure the module. I often do that during testing.

Obviously, I must have done this.

Now to figure out Equipment and *Kit production.

Link to comment
Share on other sites

4 hours ago, Tristan925 said:

For some reason I can't get any of parts to this mod to show up. I see that it loads at the bottom of the load screen when the game launches but no parts can some please help me. Thanks.

Try downloading the latest from GitHub, and then unzip the Pathfinder.zip file so that you see Extras and GameData folder. Copy everything from the zip's GameData folder into your KSP's GameData folder. The directory structure should look like:

<KSP install>/GameData/CommunityResourcePack
<KSP install>/GameData/ WildBlueIndustries
<KSP install>/GameData/ModuleManager.dll

Link to comment
Share on other sites

3 hours ago, Tristan925 said:

Ha it works!! Thank you. So is there a reason it won't work if the files on still in the "gamedata" folder from the zip

Yup, Pathfinder, like nearly all mods, need to be installed in specific folders to work. If you follow the directions in the readme provided by those mods, you'll have a working installation. :)

Link to comment
Share on other sites

5 hours ago, Tristan925 said:

Ha it works!! Thank you. So is there a reason it won't work if the files on still in the "gamedata" folder from the zip

To be a bit more precise:  Certain files in mods will make calls to other files, and require specific location indexing. 

As an example, if a file says: "I need X to function.  You can find X in ROOT >> FOLDER A >> SUBFOLDER 1."  That's where the program looks.  If you end up taking everything  and dumping it in FOLDER A as a loose glob, then the program goes.  "Okay, I'm looking in ROOT >> FOLDER A >> SUBFOLDER 1, and I can't find anything."  There's nobody around to mention the stuff is in FOLDER A.

 

There are programs where the devs set it up so you can just box mods up in a ZIP or RAR file, and have it work just by dumping the zip into the mod directory, but then you have to deal with either the limitations of being unable to write to those zips, or complex code to invoke modification to zips.  And one thing many KSP mods have are config files that self generate on the first run, or other small writable documents that hold information outside the persistent save files of KSP.  Right now, KSP is not set up to make use of packed up mods. 

Link to comment
Share on other sites

@taniwha: Have you seen log entries like this before?

[WRN 19:15:56.296] Updating
[WRN 19:15:56.319] Updating
[WRN 19:15:56.335] Updating

I'm trying to track down what, if anything in my mods, could be creating that. Thanks for your help :)

Oh, and for making Equipment, here's the Wiki entry about the Hacienda's Ironworks Foundry. Hope that helps. :)

Link to comment
Share on other sites

thought i would try latest update but still getting this error every time I place path finder parts etc

 

1 place buffolo cab

2 buffolo chassis

[Error]: Input is null
   at System.Environment.get_StackTrace()
   at ConfigNode.CleanupInput(System.String value)
   at ConfigNode.AddValue(System.String name, System.String value)
   at BaseFieldList.Save(.ConfigNode node)
   at PartModule.Save(.ConfigNode node)
   at ShipConstruct.SaveShip()
   at ShipConstruction.CreateBackup(.ShipConstruct ship)
   at EditorLogic.SetBackup()
   at EditorLogic.<SetupFSM>m__101()
   at KerbalFSM.RunEvent(.KFSMEvent evt)
   at KerbalFSM.updateFSM(KFSMUpdateMode mode)
   at KerbalFSM.UpdateFSM()
   at EditorLogic.Update()

 

itvkUZH.jpg

 

thanks in advance

 

 

 

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