Jump to content

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


sarbian

Recommended Posts

3 hours ago, blowfish said:

Yes, that's a quite complex and there are dozens of higher priorities we haven't gotten to yet.

As a side note, the characters = { and } are not valid for anything MM does because KSP uses them to parse configs before MM is even involved.

I just did a brief scan of the request; it sounds a lot like kOS.

Link to comment
Share on other sites

10 hours ago, blowfish said:

Yes, that's a quite complex and there are dozens of higher priorities we haven't gotten to yet.

As a side note, the characters = { and } are not valid for anything MM does because KSP uses them to parse configs before MM is even involved.

This is why the new programming language has its own file format to distinguish it from regular patches.

6 hours ago, TranceaddicT said:

I just did a brief scan of the request; it sounds a lot like kOS.

It's not exactly same as kOS, because it is designed to run on startup (as opposed to kOS in flight) and it shares some syntax with existing patches.

Link to comment
Share on other sites

12 hours ago, blowfish said:

Yes, that's a quite complex and there are dozens of higher priorities we haven't gotten to yet.

As a side note, the characters = { and } are not valid for anything MM does because KSP uses them to parse configs before MM is even involved.

Changed curly brackets to |* ... *|

Link to comment
Share on other sites

3 hours ago, Monniasza said:

Changed curly brackets to |* ... *|

I'd suggest "<%" and "%>", since those are the digraphs in C and C++ for "{" and "}".  Better to be consistent with an existing standard for a language with similar syntax (even if it's an ugly and little-used part of that standard).  Plus, the angle brackets make it more clear which one belongs on which side.

However, as you said, there's no need to replace those characters anyway if it's a whole new language that doesn't go through KSP's config parser.

However, as others have said, building a whole new scripting language and interpreter is a lot of work.  It's a nice idea, but probably a pie in the sky.

A possible alternative that comes to mind: using Lua scripts instead.  There's already a Lua interpreter for .NET, so it'd just be matter of bringing that in and building an API to expose KSP's config database to Lua code.  Still a pie in the sky, but at least at a lower altitude.

Link to comment
Share on other sites

On 6/18/2020 at 2:09 AM, TranceaddicT said:

I'd suggest everyone drop the discussion here.

Open another thread and flesh it out there.  Then, go code it.

Creating new discussion at:

 

On 6/18/2020 at 2:09 AM, TranceaddicT said:

I'd suggest everyone drop the discussion here.

Open another thread and flesh it out there.  Then, go code it.

Continue here: 

 

Link to comment
Share on other sites

I'm trying to target all Parts with an engine of the type electric

I tried the following:

@PART[*]:HAS[@MODULE[ModuleEnginesRF]:HAS[#EngineType[Electric]]]:AFTER[RealismOverhaul]
{
	// do something
}

but it has no effect. Any ideas?

Edited by FreeThinker
Link to comment
Share on other sites

2 hours ago, FreeThinker said:

I'm trying to target all Parts with an engine of the type electric

I tried the following:

but it has no effect. Any ideas?

Syntax looks correct to me.  Verify that all the capitalization is correct, whether there are any log messages about the patch, etc.  And make sure you check the result in the ConfigCache rather than in-game - that can help narrow down a lot of issues.

Link to comment
Share on other sites

40 minutes ago, blowfish said:

Syntax looks correct to me.  Verify that all the capitalization is correct, whether there are any log messages about the patch, etc.  And make sure you check the result in the ConfigCache rather than in-game - that can help narrow down a lot of issues.

I fixed it by replacing

:AFTER[RealismOverhaul]

by

:FINAL
Link to comment
Share on other sites

2 hours ago, FreeThinker said:

I fixed it by replacing


:AFTER[RealismOverhaul]

by


:FINAL

:AFTER[RealismOverhaul] would only run if RealismOverhaul is present.

Please don't ship :FINAL patches with any actual mod.  They should be reserved for one-off fixes in your local install.

Link to comment
Share on other sites

25 minutes ago, blowfish said:

:AFTER[RealismOverhaul] would only run if RealismOverhaul is present.

Please don't ship :FINAL patches with any actual mod.  They should be reserved for one-off fixes in your local install.

I rather not use :FINAL but :AFTER[RealismOverhaul]  didn't work despite beeing installed. I can't figure out what else I could use

Link to comment
Share on other sites

7 minutes ago, FreeThinker said:

I rather not use :FINAL but :AFTER[RealismOverhaul]  didn't work despite beeing installed. I can't figure out what else I could use

I see only two places in RO where this is used

one uses the FOR[RealismOverhaul] pass, so that should be fine

the other uses FOR[RealismOverhaulEngines] so it makes sense why it wouldn't have run yet

Link to comment
Share on other sites

How do you represent negative numbers in MM?

I'm trying to multiply a number by a negative value (-0.2807) but I can't get it to go negative; even when II start with:

NegativeA = 1
NegativeA -= 0.2807 //we have to do this repurposed bovine waste to get a negative number

NegativeA = 1
NegativeA -= 0.2807

 

Link to comment
Share on other sites

I have a config that is not working in 1.10 that did work in 1.8. I never tried it in 1.9 as I never played in 1.9.

@EXPERIMENT_DEFINITION[*]:HAS[#id[crewReport]]:FINAL
{
	@baseValue = 8
	@scienceCap = 8
	@biomeMask = 23
}

@EXPERIMENT_DEFINITION[*]:HAS[#id[evaReport]]:FINAL
{
	@baseValue = 5
	@scienceCap = 5
	@biomeMask = 7
}

When I load this in a 1.8 game on ModuleManager 4.1.3 and run a crew report in an alt-f12 cheated orbit I get a crew report that is over a biome. When I run an EVA report it is "in space." This is the desired result of this mod.

When I load this in a 1.10 game on ModuleManager 4.1.3 and run a crew report in an alt-f12 cheated orbit I get the normal, "in space" crew report. EVA reports are biome specific. This is Stock behavior and what I'm trying to change.

Here is my KSP log and Player.log from the 1.10 game. Please let me know if you need anything else.

[defunct site links removed by moderator]

Entire contents of Gamedata (except Squad directory which is stock):

Spoiler
D:\ksp_actualstock\GameData>dir
 Volume in drive D is DATA
 Volume Serial Number is 04DA-B013

 Directory of D:\ksp_actualstock\GameData

07/02/2020  10:41 PM    <DIR>          .
07/02/2020  10:41 PM    <DIR>          ..
07/02/2020  10:41 PM    <DIR>          00_Mine
07/02/2020  10:07 PM           141,824 ModuleManager.4.1.3.dll
07/02/2020  10:58 PM         2,274,839 ModuleManager.ConfigCache
07/02/2020  10:58 PM            82,175 ModuleManager.ConfigSHA
07/02/2020  10:58 PM             9,043 ModuleManager.Physics
07/02/2020  10:58 PM            28,994 ModuleManager.TechTree
07/01/2020  09:26 PM    <DIR>          Squad
               5 File(s)      2,536,875 bytes
               4 Dir(s)  404,748,718,080 bytes free

D:\ksp_actualstock\GameData>dir 00_Mine
 Volume in drive D is DATA
 Volume Serial Number is 04DA-B013

 Directory of D:\ksp_actualstock\GameData\00_Mine

07/02/2020  10:41 PM    <DIR>          .
07/02/2020  10:41 PM    <DIR>          ..
06/15/2019  06:39 AM               212 crew_eva_swap.cfg
               1 File(s)            212 bytes
               2 Dir(s)  404,748,718,080 bytes free

 

 

Link to comment
Share on other sites

On 7/2/2020 at 8:07 PM, Superfluous J said:

I have a config that is not working in 1.10 that did work in 1.8. I never tried it in 1.9 as I never played in 1.9.

Can you check in ModuleManager.ConfigCache to see whether it looks correct?  This will show you the final state of all the configs after MM has patched them but before KSP interprets them.  It's a much faster way of debugging patches than trying to look for the effects in-game.  It'll also tell us where to go next with the debugging.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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