Jump to content

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


sarbian

Recommended Posts

Hey, maybe this isn't the ideal place to ask this

(how many wonderful sentences start that way on this forum i wonder)

But could someone help at least point me in the right direction: I would like to add a module to a part, but only if it is in a certain state.

So for instance, if i use firespitter to swap the texture of a model, i want it to have a new module.

If its red, make it a thermometer, if its blue, make it a seismograph, something along those lines. Is this totally outside the realm of MM and more in another mod since it would be happening "real-time" in the editor? If so, what mod might be capable of this?

Link to comment
Share on other sites

MM only switches stuff in at load time; switching stuff on the fly is way outside it's remit. What you're asking for is something that rebuilds the part on the fly, which I presume is actually possible somehow ( given FSfuelswitch does it ) but I've no idea if anything does it in a generic fashion.

Link to comment
Share on other sites

Does this mod know the system date? The only reason I ask is that nyancat is appearing in my 32 bit loading screen.

Weird, I don't see him... and I've started and restarted KSP over a dozen times today.

Well, maybe next time.

EDIT:

Well well well...

https://github.com/sarbian/ModuleManager/blob/master/moduleManager.cs#L209-L239

So why don't I see the Nyan cat?? Maybe I haven't updated my MM version..... or maybe I wasn't paying attention.....

Edited by Starwaster
Link to comment
Share on other sites

Funny thing is, when I was thinking of ideas for my own April fool's mod alteration, I wondered if I'd be able to "turn on" Sarbian's Nyan cat via reflection. I dug a bit, but the way he was checking for it made it so it wouldn't be possible. This was probably less than 2 weeks ago and at the time the date check code wasn't there. Sadly I think too few people have updated to the latest module manager, as INSULINt's is the only post I've seen about this all day!

- - - Updated - - -

Honestly, I wish the Nyan cat was there all year round (maybe I should start using 64bit....).

Also, blizzy needs to bring back the beauty that was sh.png.

Link to comment
Share on other sites

Is there an operator which has the opposite meaning of "%"? So "%" creates a node or edit it if it exists. I'm searching for something what creates a node but does nothing, if it exists.

Edited by funk
Link to comment
Share on other sites

Is there an operator which has the opposite meaning of "%"? So "%" creates a node or edit it if it exists. I'm searching for something what creates a node but does nothing, if it exists.

Think you might try ~

EDIT-

Add a tech level to all PART who don't have any

Code:

@PART[*]:HAS[~TechRequired[]]:Final

{

TechRequired=advScienceTech

}

Link to comment
Share on other sites

Curious bug to report. Hopefully this is the right place.

I upgraded my realfuels this evening to find that ksp blows up on loading/applying the configs. Curious, I rolled back to the prior working version of realfuels to the same result.

Swapping the included modulemanager.2.5.12.dll for the old modulemanager.2.5.9.dll returns the system to good working order. I haven't tried the new realfuels with the old modulemanager yet.

Long story short, I have an install which works properly with 2.5.9, but explodes on 2.5.12. (And .13, tried him as well to the same result.)

I'll attach the last bit of the log before the ... stoppage. This is on OS X 10.10, 32 bit KSP. I think it's the correct log, but I may be mistaken. If so, please steer me towards the right one so I might include it here.

I've cut out the "(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/MacStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)" lines, as they rather spam up the log (unless they're critical, in which case, imagine them between every line.)

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/FuelTanks/tank3mCone2/SYtank3mCone2'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/FuelTanks/tank5m3mAdapter/SYtank5m3mAdapter'

Cannot find a PartModule of typename 'TweakScale'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/FuelTanks/tank5mCone2/SYtank5mCone2'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/FuelTanks/tank5mL0188/SYtank5mL01875'

Cannot find a PartModule of typename 'TweakScale'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/FuelTanks/tank5mL0375/SYtank5mL0375'

Cannot find a PartModule of typename 'TweakScale'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/FuelTanks/tank5mL0750/SYtank5mL0750'

Cannot find a PartModule of typename 'TweakScale'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/FuelTanks/tank5mL1125/SYtank5mL1125'

Cannot find a PartModule of typename 'TweakScale'

Cannot find a PartModule of typename 'TweakScale'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/LandingLegs/SYlandingLeg1/SYlandingLeg1'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/LandingLegs/SYlandingLeg2/SYlandingLeg2'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/LaunchClamps/SYclamp1/SYclamp1'

Added sound_decoupler_fire to FXGroup activate

Cannot find a PartModule of typename 'ModuleExternalIgnitor'

Cannot find a PartModule of typename 'TweakScale'

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/RCS-OMS/SYoms1/SYoms1'

Added sound_rocket_mini to FXGroup running

PartLoader Warning: Variable oldMaxTemp not found in Part

PartLoader Warning: Variable tempMult not found in Part

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/RCS-OMS/SYoms2/SYoms2'

Added sound_rocket_mini to FXGroup running

PartLoader Warning: Variable oldMaxTemp not found in Part

PartLoader Warning: Variable tempMult not found in Part

PartLoader: Compiling Part 'SpaceY-Lifters/Parts/SRBs/SYSRB_1875/SYSRB_1875L09/SYSRB_1875S'

PartLoader Warning: Variable oldMaxTemp not found in Part

PartLoader Warning: Variable tempMult not found in Part

FormatException: Invalid format.
at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0
at System.Single.Parse (System.String s) [0x00000] in <filename unknown>:0
at RealFuels.ModuleEngineConfigs.DoConfig (.ConfigNode cfg) [0x00000] in <filename unknown>:0
at RealFuels.ModuleEngineConfigs.SetConfiguration (System.String newConfiguration) [0x00000] in <filename unknown>:0
at RealFuels.ModuleEngineConfigs.OnLoad (.ConfigNode node) [0x00000] in <filename unknown>:0
at PartModule.Load (.ConfigNode node) [0x00000] in <filename unknown>:0
at Part.AddModule (.ConfigNode node) [0x00000] in <filename unknown>:0
at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0
at PartLoader.MoveNext () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

FormatException: Invalid format.
at System.Double.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0
at System.Single.Parse (System.String s) [0x00000] in <filename unknown>:0
at RealFuels.ModuleEngineConfigs.DoConfig (.ConfigNode cfg) [0x00000] in <filename unknown>:0
at RealFuels.ModuleEngineConfigs.SetConfiguration (System.String newConfiguration) [0x00000] in <filename unknown>:0
at RealFuels.ModuleEngineConfigs.OnStart (StartState state) [0x00000] in <filename unknown>:0
at Part.ModulesOnStart () [0x00000] in <filename unknown>:0
at Part+.MoveNext () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

Again, if it's the older 2.5.9, it passes through without complaint (beyond the usual hiccups, of course ><)

If I ought to be over at realfuels as well, let me know and I can post this bug there instead. Thanks all, and thanks for your hard work, I really enjoy all the KSP mods you make possible.

Link to comment
Share on other sites

If module manager manages to write it's cache before this happens (ModuleManage.ConfigCache next to the .dll) that would probably be of use, as would the full log.

You should probably take this to the RF thread anyway, since that there's no way to tell without some extra logging which value it failed to read correctly.

Link to comment
Share on other sites

Will this work?

@PART[*]:HAS[@MODULE[ModuleCommand],!MODULE[ModuleSAS]]:Final

{

%MODULE[ModuleSAS]

}

Technically yes. The % does nothing though since in HAS you already have said the part can't have a ModuleSAS. Better would be to spell it out fully with

MODULE
{
name = ModuleSAS
}

Link to comment
Share on other sites

Yes, post the cache somewhere. That's the best way to understand what is going on.

I've loaded the cache and full crash log to my dropbox. The https://www.dropbox.com/sh/1qdb3autttjq9py/AAAU7WTp76vxf_c3mROGXkWca?dl=0 link should be here. I'll ask over at realfuels as well, with a similar post to this one. Thanks much!

Link to comment
Share on other sites

I am trying to modify the CoherentContracts mod with some additional lines.

here is the example code. Please note that STORY_DEF does NOT have a name, and neither does the Facts node

STORY_DEF
{
Facts
{
}
}

Would this work:


@STORY_DEF
{
@Facts
{
IkeSrf = we can find out about the composition of Ike
IkeSrf = we can test theories about the composition of Ike
IkeSrf = Duna looks pretty in Ike’s sky
IkeSrf = Ike’s dark colour makes it warmer
IkeSrf = we like Ike
}
}

Thanks in advance

Edited by linuxgurugamer
Link to comment
Share on other sites

Yes, it should.

Ok. So how can I test this?

Also, it was suggested to me that I do this instead:


@STORY_DEF
[*]
{
@Facts
[*]
{
IkeSrf = we can find out about the composition of Ike
IkeSrf = we can test theories about the composition of Ike
IkeSrf = Duna looks pretty in Ike’s sky
IkeSrf = Ike’s dark colour makes it warmer
IkeSrf = we like Ike
}
}

If both work, which should I use?

I dumped the database using Alt-F11 to look at it, but can't find the facts listed in the original file (from CoherentContracts), so I don't know.

thanks

Link to comment
Share on other sites

Ok. So how can I test this?

Also, it was suggested to me that I do this instead:


@STORY_DEF
[*]
{
@Facts
[*]
{
IkeSrf = we can find out about the composition of Ike
IkeSrf = we can test theories about the composition of Ike
IkeSrf = Duna looks pretty in Ike’s sky
IkeSrf = Ike’s dark colour makes it warmer
IkeSrf = we like Ike
}
}

If both work, which should I use?

I dumped the database using Alt-F11 to look at it, but can't find the facts listed in the original file (from CoherentContracts), so I don't know.

thanks

If you're not seeing even the original in the dump then he might be loading the config outside of the game system. If the original is inside a Plugins folder then that is for sure. In that case you would be unable to modify it with MM.

Link to comment
Share on other sites

If you're not seeing even the original in the dump then he might be loading the config outside of the game system. If the original is inside a Plugins folder then that is for sure. In that case you would be unable to modify it with MM.

@Facepalm

It would help if it was actually installed :-)

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...