sarbian

[1.8.x] Module Manager 4.1.3 (November 30th 2019) - Right To Ludicrous Speed

Recommended Posts

Another question: how do I make it so that this patch

@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[#type[ModuleRCS*]],!MODULE[ModuleRCS*]]:AFTER[RO-RCS]

is applied to all BUT parts named xxx and yyy (for instance)? 

Share this post


Link to post
Share on other sites
18 minutes ago, Tonas1997 said:

Another question: how do I make it so that this patch


@PART[*]:HAS[@MODULE[ModuleEngineConfigs]:HAS[#type[ModuleRCS*]],!MODULE[ModuleRCS*]]:AFTER[RO-RCS]

is applied to all BUT parts named xxx and yyy (for instance)? 

@PART:HAS[@MODULE[ModuleEngineConfigs]:HAS[#type[ModuleRCS*]],!MODULE[ModuleRCS*],~name[xxx],~name[yyy]]:AFTER[RO-RCS]

 

Share this post


Link to post
Share on other sites
4 hours ago, blowfish said:

@PART:HAS[@MODULE[ModuleEngineConfigs]:HAS[#type[ModuleRCS*]],!MODULE[ModuleRCS*],~name[xxx],~name[yyy]]:AFTER[RO-RCS]

 

Merci <3

Share this post


Link to post
Share on other sites

Is it possible to write a patch to make all parts have the rigid attachment tweakable enabled by default?

Share this post


Link to post
Share on other sites
12 minutes ago, Rocket Witch said:

Is it possible to write a patch to make all parts have the rigid attachment tweakable enabled by default?

@PART[*]
{
	%rigidAttachment = True
}

There's also an option to force the tweakable to be visible in flight mode as well.

@PHYSICSGLOBALS
{
	%showRigidJointTweakable = Always
}

 

Share this post


Link to post
Share on other sites

So, I want to add a script that allows an ISRU to be able to refine ore into XenonGas. How do I add a new MODULE to an already existing part?

Share this post


Link to post
Share on other sites
Posted (edited)
6 hours ago, MoonstreamInSpace said:

So, I want to add a script that allows an ISRU to be able to refine ore into XenonGas. How do I add a new MODULE to an already existing part?

Create a new empty file something.cfg and put it into your own folder in KSP\GAMEDATA\mystuff to keep everything neat and tidy.

Choose the part you want to change and copy the module that converts ore into fuel from the converter, make appropriate changes to let it turn ore into xenon.

Copy the small template below into the file, add the stuff you want to do and then see if it worked. ;)

(Cursive text is yours to change.)

Spoiler

@PART[partname]:
{
    MODULE[modulename]
    {

        stuff to make things happen goes here

    }
}

 

Edited by KerbMav

Share this post


Link to post
Share on other sites
6 hours ago, MoonstreamInSpace said:

So, I want to add a script that allows an ISRU to be able to refine ore into XenonGas. How do I add a new MODULE to an already existing part?

There’s a mod on CKAN called Xenon ISRU that does exactly that :) 

Share this post


Link to post
Share on other sites

why is module manager not compatible with ksp 1.7.3

Share this post


Link to post
Share on other sites
3 hours ago, kspnerd122 said:

why is module manager not compatible with ksp 1.7.3

It is. Works well.

Share this post


Link to post
Share on other sites
Posted (edited)

I've just noticed that I'm getting warnings like:

[LOG 12:43:31.423] PartLoader: Compiling Part 'AirplanePlus/Parts/Engine/Early/51/part/AJEE_NapierLion_Prop'
[WRN 12:43:31.428] PartLoader Warning: Variable base_diameter not found in Part
[WRN 12:43:31.428] PartLoader Warning: Variable AJEE_thrustTransformName not found in Part

Spammed for every part AJEE loads. This is strange because:
A) I know those variables are in the parts, I put them there ;)

Defined like this:

base_diameter = 1.25
AJEE_thrustTransformName = #$/MODULE[ModuleEngines*]/thrustVectorTransformName$

And used:

@rescaleFactor = #$@AJEE_TEMPLATES/AJEE_NAPIERLION/diameter$
@rescaleFactor /= #$@PART[AJEE_NapierLion_Prop]/base_diameter$
	
...

@MODULE[ModuleEnginesAJEPropeller]
{
	%thrustVectorTransformName = #$../AJEE_thrustTransformName$
}

B) The values those variables represent are being applied to the final part.

I'm not sure what those warnings are talking about, so I'm a little worried even though everything seems to be working as it should. Is this just part loader throwing spurious warnings because those are custom variables it doesn't understand but modulemanager deals with them as it should?

As I say, everything looks like it's working as it should. Just for my own peace of mind I want to know what those warnings are talking about.

Edited by Citizen247

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, Citizen247 said:

I've just noticed that I'm getting warnings like:


[LOG 12:43:31.423] PartLoader: Compiling Part 'AirplanePlus/Parts/Engine/Early/51/part/AJEE_NapierLion_Prop'
[WRN 12:43:31.428] PartLoader Warning: Variable base_diameter not found in Part
[WRN 12:43:31.428] PartLoader Warning: Variable AJEE_thrustTransformName not found in Part

Spammed for every part AJEE loads. This is strange because:
A) I know those variables are in the parts, I put them there ;)

Defined like this:


base_diameter = 1.25
AJEE_thrustTransformName = #$/MODULE[ModuleEngines*]/thrustVectorTransformName$

And used:


@rescaleFactor = #$@AJEE_TEMPLATES/AJEE_NAPIERLION/diameter$
@rescaleFactor /= #$@PART[AJEE_NapierLion_Prop]/base_diameter$
	
...

@MODULE[ModuleEnginesAJEPropeller]
{
	%thrustVectorTransformName = #$../AJEE_thrustTransformName$
}

B) The values those variables represent are being applied to the final part.

I'm not sure what those warnings are talking about, so I'm a little worried even though everything seems to be working as it should. Is this just part loader throwing spurious warnings because those are custom variables it doesn't understand but modulemanager deals with them as it should?

As I say, everything looks like it's working as it should. Just for my own peace of mind I want to know what those warnings are talking about.

Its saying it didn’t find those variables in the game’s module Part. 

Basically “hey I found this in the part CFG (small p) but I can’t find a reference for it in the Part module (large P)”. 

You can ignore those warnings as long as you’re using them for personal purposes and don’t expect the game to actually recognize them. 

Edit: here’s the API for the Part Class. It’s logical that it can’t find your variable there, because it’s yours :P

https://kerbalspaceprogram.com/api/class_part.html

Edited by Jognt

Share this post


Link to post
Share on other sites
8 minutes ago, Jognt said:

Its saying it didn’t find those variables in the game’s module Part. 

Basically “hey I found this in the part CFG (small p) but I can’t find a reference for it in the Part module (large P)”. 

You can ignore those warnings as long as you’re using them for personal purposes and don’t expect the game to actually recognize them. 

Edit: here’s the API for the Part Class. It’s logical that it can’t find your variable there, because it’s yours :P

https://kerbalspaceprogram.com/api/class_part.html

Thanks. That's what I thought, I just wanted to make sure :).

Share this post


Link to post
Share on other sites
11 hours ago, Citizen247 said:

I've just noticed that I'm getting warnings like:


[LOG 12:43:31.423] PartLoader: Compiling Part 'AirplanePlus/Parts/Engine/Early/51/part/AJEE_NapierLion_Prop'
[WRN 12:43:31.428] PartLoader Warning: Variable base_diameter not found in Part
[WRN 12:43:31.428] PartLoader Warning: Variable AJEE_thrustTransformName not found in Part

 

That's KSP, not ModuleManager.  It's saying that it doesn't know what those fields mean.  ModuleManager has already completed its part at this point, here KSP is parsing the configs and compiling parts from them.

Share this post


Link to post
Share on other sites
12 hours ago, blowfish said:

That's KSP, not ModuleManager.  It's saying that it doesn't know what those fields mean.  ModuleManager has already completed its part at this point, here KSP is parsing the configs and compiling parts from them.

Presumably it would be a good idea to delete those variables when they're no longer needed then? 

Share this post


Link to post
Share on other sites
13 hours ago, Citizen247 said:

Presumably it would be a good idea to delete those variables when they're no longer needed then? 

Yeah, that's frequently done in a patch that runs near the end.

Share this post


Link to post
Share on other sites
Posted (edited)

Am Back with another query:

found this patch (think it was from ( not Gordon Dry ) which is supposed to add the docking port type (size) to the part description - is this possible? suggestions solicited for fixing this patch.

Spoiler

// Add port type to description
@PART[*]:HAS[@MODULE[ModuleDockingNode]:HAS[#nodeType[*]]]:FINAL
{
	@description ^= :$: #$/MODULE[ModuleDockingNode]/nodeType$:
}

@PART[*]:HAS[@MODULE[ModuleDockingNode]:HAS[#nodeType[*]]]:FINAL
{
	dpinfo = #$/MODULE[ModuleDockingNode]/nodeType$
}

 

thank you in advance!

Edited by zer0Kerbal

Share this post


Link to post
Share on other sites

im prolly a bit early to the party.

4.0.3 change notes? Just noticed it in ckan, didnt see it mentioned in OP nor last few paged of thread.

 

thanks. sorry. :kiss:

Share this post


Link to post
Share on other sites

4.0.3 works fine for me, big thanks for making and maintaining MM :)

Share this post


Link to post
Share on other sites

Follows a brute-force change log

12 hours ago, Jesusthebird said:

4.0.3 change notes? Just noticed it in ckan, didnt see it mentioned in OP nor last few paged of thread.

This is what I got from the github (inverted order than jenkins).

3d85ddc v4.0.3
e2027f1 Merge pull request #148 from sarbian/FixNewlinesInCache
f2fba86 Ensure tabs and newlines don't break cache
96201a7 Fix ModifyNode handling of escaped characters
0feef88 Fix DeepCopy handling of escaped values
8e5c29a Clean up test a bit
3e4a9f9 Fix TestConfigNode's handling of escaped chars
ee5995f Remove redundant parent class
9311cfb Improve TestConfigNodeTest
9795e36 make StreamLoggerTest.TestLog work on \n platforms
eb3db60 unnecessary using
3d8594d Set FileType based on common types
a27cb3d Convert UrlBuilder cfg test to theory
e1bed94 improve file sha generator
69ab085 Alphabetize .csproj files
ae0d7a7 Put extension on cache URLs
5e5314e Use custom code to lookup file by url
28bd925 Another unnecessary using
5f7071d Mark disposables as sealed
3650d69 Use better assertion
5711994 Unnecessary using
1c93735 Merge pull request #146 from sarbian/RedoLogging
a8bcad2 ModLogger -> PrefixLogger
0a2c842 Initialize timestamp with log message
07afe29 Don't put date on every log message
fc74f1f Initialize LogMessage from old LogMessage
d4d0fb7 Redo logging interface
cfaac6a Fix StreamLogger ignoring messages
7271725 Add name value to applying patch messages
a0c1dfc add test for ProtoUrlConfig
6e6a465 use new KeyValueCache class as regex cache
918b0a2 add thread-safe KeyValueCache

 

4 hours ago, Gordon Dry said:

Other than release dates (and RO being yet in the 4.0.2 version), they appear to be identical:

https://ksp.sarbian.com/jenkins/job/ModuleManager-RO/changes

https://ksp.sarbian.com/jenkins/job/ModuleManager/changes (see the change #149)

Share this post


Link to post
Share on other sites
9 hours ago, Gordon Dry said:

btw what is the difference between

https://ksp.sarbian.com/jenkins/job/ModuleManager/
and
https://ksp.sarbian.com/jenkins/job/ModuleManager-RO/

?

I ask because I'm on RO and use the latest ModuleManager-RO 4.0.2 - and always wondered why. :sticktongue:

The RO thing was a backport to make it work with KSP 1.3.x.  I don't think it's necessary anymore.

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.