Jump to content

[1.8.x-1.12.x] Module Manager 4.2.3 (July 03th 2023) - Fireworks season


sarbian

Recommended Posts

I'm trying to give the roverBody a command module and more electric charge. The Unmanned module shows up ingame but it has 25 electric charge.


@PART[roverBody]
{
MODULE
{
name = ModuleCommand
minimumCrew = 0
RESOURCE
{
name = ElectricCharge
rate = 0.02777778
}
@RESOURCE[ElectricalCharge]
{
@amount = 150
@maxAmount = 150
}
}

What am I doing wrong?

Edited by Codey737
Link to comment
Share on other sites

I'm trying to give the roverBody a command module and more electric charge. The Unmanned module shows up ingame but it has 25 electric charge.


@PART[roverBody]
{
MODULE
{
name = ModuleCommand
minimumCrew = 0
RESOURCE
{
name = ElectricCharge
rate = 0.02777778
}
@RESOURCE[ElectricalCharge]
{
@amount = 150
@maxAmount = 150
}
}

What am I doing wrong?

Mismatching pairs of braces. If you have 4 { you better have 4 }


@PART[roverBody]
{
MODULE
{
name = ModuleCommand
minimumCrew = 0
RESOURCE
{
name = ElectricCharge
rate = 0.02777778
}
}
@RESOURCE[ElectricalCharge]
{
@amount = 150
@maxAmount = 150
}
}

Edited by Starwaster
1...2...5 (3 sir!) 3!
Link to comment
Share on other sites

With spaceport in the condition it is in I would be amazed that there is a moderator policing it.

The mods nuke what we ask them to nuke. Spaceport is a mess but it does not mean no one has mode power.

Link to comment
Share on other sites

o_0 now 2.0.1 !? bit confused......

Yes indeedy:

AHEM.

AHEM AHEM.

ModuleManager 2.0.1

ModuleManager.cs

New features:

MATH!


@PART[*]:FOR[Realism] {
@mass *= 0.25
@maxTemp -= 500
}

PROPER INDEXING!


@PART[*]:HAS[MODULE[MultiModeEngine]]:FOR[Pony] {
@MODULE[ModuleEngineFX],1 {
@PROPELLANT[Oxidizer]
{
@name = LiquidOxygen
}
}
}

PER-MOD PARSE PASSES!


@PART[fuelTank]:BEFORE[RealFuels]
{
@RESOURCE[LiquidFuel] {
@amount *= 5
@maxAmount *= 5
}
}

@PART[fuelTank]:AFTER[RealFuels]

{

!RESOURCE[LiquidFuel] {}

!RESOURCE[Oxidizer] {}

}

DEPENDENCY CHECKING!


@PART[fuelTank]:AFTER[RealFuels]:NEEDS[RealSolarSystem, !RealKerbalSystem]
{
@scale *= 4;
}

Get it. Use it. Love it.

Link to comment
Share on other sites

Can I decide which version is the official one ? Install 2.0.1 if you want to TEST it. Otherwise keep the one you get with your mods (you can have more than one version).

Link to comment
Share on other sites

Can I decide which version is the official one ? Install 2.0.1 if you want to TEST it. Otherwise keep the one you get with your mods (you can have more than one version).

My mistake, sarbian. I wasn't aware that 2.0.1 was for testing, ialdabaoth's wording didn't indicate that clearly. FWIW, I haven't run into any problems with 2.0.1 yet.

Link to comment
Share on other sites

Mismatching pairs of braces. If you have 4 { you better have 4 }


@PART[roverBody]
{
MODULE
{
name = ModuleCommand
minimumCrew = 0
RESOURCE
{
name = ElectricCharge
rate = 0.02777778
}
}
@RESOURCE[ElectricalCharge]
{
@amount = 150
@maxAmount = 150
}
}

Nope,doesn't work. The Commandmodule shows up but it still shows 25 charge instead of 150.

Link to comment
Share on other sites

Looking for a little help here. I'm trying to use KESA in my newly updated install of 0.23.5 using 2.0.1. When I was still on 0.23 and running 1.5.7 (I only just found out that wasn't an official update), everything seemed to work just fine, but after the update, now the entire program hangs when trying to load WarpPlugin (the KSP Interstellar Mod which KESA affects) and the only way to get the game to load is to comment out the following code from KESA:


@PART[FNRefinery]:Final
{
@MODULE[FNModuleResourceExtraction[*]]:HAS[#resourceName[LqdWater]]
{
@resourceName = Water
}
@RESOURCE[LqdWater]
{
@name = Water
}
}

I've tried various permutations of this block, but no matter what I do, as long as the program tries to execute the code, the loading hangs on WarpPlugin. I'm really hoping someone here with a lot more experience working with Module Manager and KSP can chime in and explain where this is going wrong and if/how there is a way to fix it.

Thanks.

Bump for a little help since no one replied

Link to comment
Share on other sites

In 2.0.1, is it possible to have something like this [questioned text in bold italics]:

@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[ModuleFuelTanks]]
{
MODULE
{
name = ModuleFuelTanks
[I][B]volume = mass*20[/B][/I]
type = Pod
}
}

TANK_DEFINITION
{
name = Pod
basemass = 0.002 * volume
TANK
{
name = LiquidFuel
amount = 0
maxAmount = 0
}
TANK
{
name = Oxidizer
amount = 0
maxAmount = 0
}
TANK
{
name = MonoPropellant
mass = 0.000625
amount = 0
maxAmount = 0
}
TANK
{
name = ElectricCharge
mass = 0.002375
utilization = 2
amount = 0
maxAmount = 0
}
}

Link to comment
Share on other sites

Ok, I'm admitting defeat and asking for help.

I have a mod that is designed to work stand alone or with ECLSS.

ECLSS defines a resource, Oxygen, however I need to include that resource definition in my mod incase it's used stand alone. However if there are two sets of RESOURCE_DEFINITION for the same named resource then it doesn't work.

Can module manager be used to look for any modify a RESOURCE_DEFINITION if it's there and add it if it's not, without creating two copies or no copies?

Link to comment
Share on other sites

Using 2.0.1, is there a way to use the *= and -= with the isp keys (i.e. key = 0 245)? Specifically, how does that work, or not work, when there is what I assume is some kind of array?

Link to comment
Share on other sites

Ok, I'm admitting defeat and asking for help.

I have a mod that is designed to work stand alone or with ECLSS.

ECLSS defines a resource, Oxygen, however I need to include that resource definition in my mod incase it's used stand alone. However if there are two sets of RESOURCE_DEFINITION for the same named resource then it doesn't work.

Can module manager be used to look for any modify a RESOURCE_DEFINITION if it's there and add it if it's not, without creating two copies or no copies?

You could use the % operator as you would the @


%RESOURCE[Oxygen]
{
//your changes here
}

If a RESOURCE node named Oxygen exists then it will be edited with your changes.

If it does not exist it will be added.

I haven't actually used that so there is something I'm not clear on. Ordinarily, inside the braces I would be using @. But if RESOURCE[Oxygen] doesn't exist, how does that affect the use of @ inside the node? You might need to use % inside as well. For instance...


%RESOURCE[Oxygen]
{
%density = 0.0005
}

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