Jump to content

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


sarbian

Recommended Posts

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]

 

Link to comment
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
}

 

Link to comment
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?

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
Link to comment
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 :) 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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 :).

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

Link to comment
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? 

Link to comment
Share on other sites

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
Link to comment
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)

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

Link to comment
Share on other sites

19 hours ago, Jesusthebird said:

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.

6 hours ago, Lisias said:

Follows a brute-force change log

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

The commit log isn't really meant to be human readable.  But I put together a list of the meaningful changes:

  • Logging:
    • Fix context not showing up for exceptions in logs
    • Remove datestamps from log messages (only put time), instead write date at top of logs
    • Have timestamps on logs reflect when the log message was created rather than when it was written to the log
  • Fix files with a space before the extension breaking the cache
  • Fix tabs and newlines (\t and \n) getting stripped out of values
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...