sarbian

[1.4.0-1.7.x] Module Manager 4.0.3 (August 9th 2019) - Right To Ludicrous Speed

Recommended Posts

I have noticed an issue , not sure if it's with Module Manager or KSP source, when I add Life support module to any part without SAS Module , it bugs the VAB part icons for the part and they expand like crazy.

If I add the SAS module its all good.

Share this post


Link to post
Share on other sites
I have noticed an issue , not sure if it's with Module Manager or KSP source, when I add Life support module to any part without SAS Module , it bugs the VAB part icons for the part and they expand like crazy.

If I add the SAS module its all good.

That doesn't sound like ModuleManager. Sounds more like a problem with the aforementioned life support module. Which LS mod is it?

Also, show the code you're using to add it.

So this should work correctly, yes?


@PART[FNLiquidWaterTank]:Final
{
@RESOURCE[LqdWater]
{
@name = Water
@amount = 4065
@maxAmount = 4065
}
}

Ok, I believe I can figure out the other part changes based on this info.

Next, how do I make changes to Interstellar's general plugin configs? As in, non-part configs.

The same way as you would any other config node, which is all PART is. It's just a config node that refers to a part.

resources would be RESOURCE_DEFINITION, and you might want to consider changing THAT for LqdWater as well.... or otherwise make sure that Water is a valid resource.

I'm not familiar with Interstellar's configs so I can't really say anything specific about those./

Edited by Starwaster

Share this post


Link to post
Share on other sites
The same way as you would any other config node, which is all PART is. It's just a config node that refers to a part.

resources would be RESOURCE_DEFINITION, and you might want to consider changing THAT for LqdWater as well.... or otherwise make sure that Water is a valid resource.

I'm not familiar with Interstellar's configs so I can't really say anything specific about those./

If I understand you correctly, I can use MM's @NODE to change modules in general config files. Is that correct? I apologize for asking so many questions!

I am using the water resource defined by TAC Life Support. That way Interstellar and TACLS use the same resource and I don't have to manage Water and LqdWater, essentially the same resource. Doing this opens up some additional gameplay options. Interstellar's refinery can extract water from some places in the Kerbol system and with both Interstellar and TACLS, I can make water, breathable oxygen, LF, and oxidizer. One can set up a support depot at Vall and should reduce the mass of required fuel and life support needed for outer system missions.

Share this post


Link to post
Share on other sites

If I go like this in the stockpods.cfg in asmi's mod or add directly the module to the part.cfg I get weird VAB part icons for the specific part.

@PART[*]:HAS[#CrewCapacity[1]]:Final
{
MODULE
{
name = LifeSupportModule
}

RESOURCE
{
name = Oxygen
amount = 400
maxAmount = 400
}

RESOURCE
{
name = CO2
amount = 0
maxAmount = 400
}

RESOURCE
{
name = O2 Candle
amount = 1
maxAmount = 1
}
RESOURCE
{
name = MonoPropellant
amount = 10
maxAmount = 10
}
MODULE
{
name = TankPriorityModule
Priority = 10
}
}

Now if I add this code it all works good !

MODULE
{
name = ModuleSAS
}

MODULE
{
name = ModuleReactionWheel

PitchTorque = 5
YawTorque = 5
RollTorque = 5

RESOURCE
{
name = ElectricCharge
rate = 0.75
}
}

This goes for any single Pod/Station Hub or anything that has life support to it !

Share this post


Link to post
Share on other sites

Yeah I posted a code like the first one on that ECLSS mod. I am having those problems but couldn't figure out why. A similar code I did like that work fine for Ioncross.

Good find, I will try and add your extra code and give it a go.

If I go like this in the stockpods.cfg in asmi's mod or add directly the module to the part.cfg I get weird VAB part icons for the specific part.

@PART[*]:HAS[#CrewCapacity[1]]:Final
{
MODULE
{
name = LifeSupportModule
}

RESOURCE
{
name = Oxygen
amount = 400
maxAmount = 400
}

RESOURCE
{
name = CO2
amount = 0
maxAmount = 400
}

RESOURCE
{
name = O2 Candle
amount = 1
maxAmount = 1
}
RESOURCE
{
name = MonoPropellant
amount = 10
maxAmount = 10
}
MODULE
{
name = TankPriorityModule
Priority = 10
}
}

Now if I add this code it all works good !

MODULE
{
name = ModuleSAS
}

MODULE
{
name = ModuleReactionWheel

PitchTorque = 5
YawTorque = 5
RollTorque = 5

RESOURCE
{
name = ElectricCharge
rate = 0.75
}
}

This goes for any single Pod/Station Hub or anything that has life support to it !

Edited by therealcrow999

Share this post


Link to post
Share on other sites

If you add the SaS Module do it to the part.cfg and not to the StockPods.cfg. So you can edit each part individually and not end up with underpowered SAS for all pods. :)

Share this post


Link to post
Share on other sites

How did you figure to add SAS to code to make it work?

If you add the SaS Module do it to the part.cfg and not to the StockPods.cfg. So you can edit each part individually and not end up with underpowered SAS for all pods. :)

Share this post


Link to post
Share on other sites

I got weird zoom out with the Hitch Hiker part, but I also got it with another mod. Biomass icon zoom exploded when I hovered mouse over those two Dome parts.

Share this post


Link to post
Share on other sites
How did you figure to add SAS to code to make it work?

You can use different modules as a fix too depending on the part, but for the LS seems like the SAS module works the best. I think it has to do with the 0.23 update because i saw some other mod parts behaving similarly without LS module(FuturePropulsion mod before the update).

Share this post


Link to post
Share on other sites
Alrighty, I think I've figured this out. I would appreciate it if someone could check my syntax to make sure I've grasped how to use MM.

http://pastebin.com/2wPDwrCA

Thank you for the help!

Looks ok except for whether or not there's an actual resource named Water. If that's getting defined somewhere else then you should be ok. Also, as I said, I'm not familiar with Interstellar since I don't use it so I'll assume the node names are correct

Also, the thing with LSS causing VAB icon problems is definitely not a ModuleManager issue. I'd take it up with asmi in the LSS thread.

Share this post


Link to post
Share on other sites
Looks ok except for whether or not there's an actual resource named Water. If that's getting defined somewhere else then you should be ok. Also, as I said, I'm not familiar with Interstellar since I don't use it so I'll assume the node names are correct

The water resource is being independently defined by the TAC Life Support mod. I'm basically cutting out Interstellar's water resource and grafting in TACLS's water resource. Thank you for looking over my config!

Share this post


Link to post
Share on other sites

How would I search a node for two categories?

This is the example from the OP.

@PART[*]:HAS[#category[Utility]]
{
...(stuff)
}

Would it be this?

@PART[*]:HAS[#category[Utility]], [#category[Utility2]]
{
...(stuff)
}

I need to change the LqdWater in this bit to Water:

PLANETARY_RESOURCE_DEFINITION
{
name = Water
celestialBodyName = Duna
resourceName = LqdWater
mapUrl = WarpPlugin/PlanetResourceData/duna_water
resourceScale = LINEAR_SCALE
scaleMultiplier = 1
displayTexture = WarpPlugin/water_resource_point
displayThreshold = 1
}

I thought that this code would work, but looking through the KSP.log file, it appears that maybe my code is changing ALL the resource names for Duna to water, not just the water one.

@PLANETARY_RESOURCE_DEFINITION[*]:HAS[#celestialBodyName[Duna]]:Final
{
@resourceName = Water
}

All the planetary resource definitions for water are named water in the node, so I can't search for water. I what I want to do change the planetary resource definition for water on Duna and Vall and change them over to TACLS's water. I realize now that I need to define that I want to change the Duna water definition, not just the Duna definition, which I think is what my original change does.

Would this syntax be correct?

@PLANETARY_RESOURCE_DEFINITION[*]:HAS[#celestialBodyName[Duna]], [#resourceName[LqdWater]]:Final
{
@resourceName = Water
}

EDIT:

I was thinking, would this code grab both Duna and Vall's water changes with one piece of code?

@PLANETARY_RESOURCE_DEFINITION[*]:HAS[#resourceName[LqdWater]]:Final
{
@resourceName = Water
}

Edited by Eadrom

Share this post


Link to post
Share on other sites
Yes it does. I'll do a an other official release "soon" but it's not .23 related.

I have a bug report for you! It seems that something related to loading MODEL entries is brocken in the new version.

All parts with models, redacted in Module Manager, for example like this:

@PART[liquidEngine3]{
MODEL
{
model = Squad/Parts/Engine/liquidEngine3/model
rotation = 0, -45, 0
scale = 0.8, 0.8, 0.8
}
}

don't show properly in the hangar, although they do in game. Also engines with the entry are supposedly merged with their fairing, at least it always shows up and don't detach in any circumstances. The strange thing is that the same MODEL entry right inside the part.cfg works properly, so it is definitely related with the plugin.

K2Y6aKb.jpg

Edited by Absolute Human

Share this post


Link to post
Share on other sites

Eadrom : do not use a space in search line. KSP will truncate the line and MM can't parse it right.

So it's


@PLANETARY_RESOURCE_DEFINITION[*]:HAS[#celestialBodyName[Duna]],[#resourceName[LqdWater]]:Final
{
@resourceName = Water
}

Your last one should works too.

Absolute Human : You may have hit a limit of MM.

Right now MM execute itself while the game load it's model/texture/... There are not other way to do it (that I found as today). So the part may get compiled by KSP before MM patch it.

Not sure it's the case here, but the fact that it works in game and not in the editor makes it likely

Share this post


Link to post
Share on other sites

It worked just fine in 0.22 and previos versions.

Something must have been changed in the new version, that is why I'm asking.

Actually, something is really wrong, for example, I have:

@PART[probeCoreSphere]
{
node_stack_top = 0.0, 0.6, 0.0, 0.0, 1.0, 0.0, 0
}

in one file and

@PART[probeCoreSphere]
{
//node_stack_top = 0.0, 0.6, 0.0, 0.0, 1.0, 0.0, 0
//node_stack_bottom = 0.0, -0.3383468, 0.0, 0.0, 1.0, 0.0, 0
//@node_stack_top = 0.0, 0.4, 0.0, 0.0, 1.0, 0.0, 0
//@node_stack_bottom = 0.0, -0.502, 0.0, 0.0, 1.0, 0.0, 0
@node_stack_bottom = 0.0, -0.302, 0.0, 0.0, 1.0, 0.0, 0
// MODEL
{
model = Squad/Parts/Command/probeCoreSphere/model
position = 0, -0.2, 0
}
}

in another (commented the MODEL entry for now)

And what I get in game is:

xewEda7.jpg

and

GwgXpAD.jpg

Edited by Absolute Human

Share this post


Link to post
Share on other sites

Did you see problem that was quick fixed with KW Rocketry?

http://forum.kerbalspaceprogram.com/threads/51037-0-22-KW-Rocketry-v2-5-5-Avaliable-New-Sounds-New-Parts-11-11-2013?p=861408#post861408

And here was a fix with MM 1.5.5, this one would cover every mod:

http://forum.kerbalspaceprogram.com/threads/18230-0-23-Kerbal-Engineer-Redux-v0-6-2-1?p=861260#post861260

If I go like this in the stockpods.cfg in asmi's mod or add directly the module to the part.cfg I get weird VAB part icons for the specific part.

@PART[*]:HAS[#CrewCapacity[1]]:Final
{
MODULE
{
name = LifeSupportModule
}

RESOURCE
{
name = Oxygen
amount = 400
maxAmount = 400
}

RESOURCE
{
name = CO2
amount = 0
maxAmount = 400
}

RESOURCE
{
name = O2 Candle
amount = 1
maxAmount = 1
}
RESOURCE
{
name = MonoPropellant
amount = 10
maxAmount = 10
}
MODULE
{
name = TankPriorityModule
Priority = 10
}
}

Now if I add this code it all works good !

MODULE
{
name = ModuleSAS
}

MODULE
{
name = ModuleReactionWheel

PitchTorque = 5
YawTorque = 5
RollTorque = 5

RESOURCE
{
name = ElectricCharge
rate = 0.75
}
}

This goes for any single Pod/Station Hub or anything that has life support to it !

Edited by therealcrow999

Share this post


Link to post
Share on other sites
Look two posts above your post. At least read the last page before asking something like that.

Oh, yeah, right... Sorry about that :-D

The reason I asked is because when I try to use it in 0.23, the VAB/SPH doesn't show me any parts at all, in career and sandbox.

Share this post


Link to post
Share on other sites

I uploaded 1.5.6 : http://www.sarbian.com/sarbian/ModuleManager_1_5_6.dll

It's compiled for .23. Did I miss a reported bug ? I'll push this one as the official tomorrow if I don't get bugs report.

ialdabaoth is right and this need a partial rewrite. I look into it in january. A 1.6 may come later today to test a new way of applying patch that I found, and maybe the $ for parts.

List of fix :

1) node without name


@WARP_PLUGIN_SETTINGS
{
@MethaneResourceName = totot
}
[§code]


2) % for node

You can now do that to edit all gimbal or add one when there is none
[code]
@PART[*]:HAS[@MODULE[ModuleEngines]]
{
%MODULE[ModuleGimbal]
{
%gimbalTransformName = thrustTransform
%gimbalRange = 0.5
}
}

Share this post


Link to post
Share on other sites

...And finally I understood what was going on!

I nad 4 copies of the plugin in different folders in gamedata and every copy was adding its own model and attachment node entry!

Yep, removing all of them and placing just one straight into gamedata seems to solve most of these problems, but I'm not sure that all...

So, yes, now it seems to work!

Strange, I though having a plugin in every directory that uses it was a new requirement.

Guess now is not.

*Notes to self:

commenting just the line "MODEL" is not a good idea.

loading in minimized mode- neither.

Edited by Absolute Human

Share this post


Link to post
Share on other sites

Can someone help me create a module file that will add the entire lazer system, mechjeb, and scansat to the command pods? I so it would be much appreciated.

Share this post


Link to post
Share on other sites

Can't do Lazor since Romfarer did not move his code to PartModule


@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[MechJebCore]]
{
MODULE
{
name = MechJebCore
}
}

@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[SCANsat]]:Final
{
MODULE
{
name = SCANsat
sensorType = 0
fov = 0
min_alt = 0
max_alt = 0
best_alt = 0
power = 0
isAlwaysActive = true
}
}

Share this post


Link to post
Share on other sites
Can't do Lazor since Romfarer did not move his code to PartModule


@PART
[*]:HAS[@MODULE[ModuleCommand],!MODULE[MechJebCore]]
{
MODULE
{
name = MechJebCore
}
}

@PART
[*]:HAS[@MODULE[ModuleCommand],!MODULE[SCANsat]]:Final
{
MODULE
{
name = SCANsat
sensorType = 0
fov = 0
min_alt = 0
max_alt = 0
best_alt = 0
power = 0
isAlwaysActive = true
}
}

oh wow thanks, been trying to lower my part count and this is going to help a lot.

Share this post


Link to post
Share on other sites

Just to be clear, the scansat I added is just the part to open the maps. If you want to scan you need to change the sensorType to 16 I think.

Share this post


Link to post
Share on other sites
Just to be clear, the scansat I added is just the part to open the maps. If you want to scan you need to change the sensorType to 16 I think.

noted. thank you

Share this post


Link to post
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.