Jump to content

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


sarbian

Recommended Posts

6 hours ago, linuxgurugamer said:

My conclusions are this:

  1. Only one copy of MM is installed

I'm not talking only about one MM copy being installed, but about more than one instance being running. It looks nuts, but I have at least one situation in which multiple (at least two) copies of MM were running concurrently in memory and I only found one Module Manager DLL in the whole KSP.log.

I detected this problem due a screwed up patching on the Localization file (a node containing another copy of itself inside it), that I only detected by eye balling the ConfigCache file. I should had write a full report at that time, however, now I do not recall how the KSP.log was looking like, I don't recall if an occurrence I detected of a unique patch being applied twice to a part were logged twice on the KSP.log or not - thinking a bit more about the problem, it may be a problem inside MM that by some reason is firing up more than one MMPatchLoader threads.

Anyway, back to the problem at hands.

 

6 hours ago, linuxgurugamer said:
  1. Something else (KSP and/or Unity) is keeping the file open, even after reading it into memory

By the time Module Manager's MonoBehaviour is started, KSP had already loaded, resolved and linked every single Assembly from every single DLL in the GameData (as long it's not inside a PluginData directory). Loading KSP plugins is as simple as calling "AssemblyLoader.LoadPlugin" , so I'm betting this is the call KSP is using for loading the KSP Assemblies.

When I load Assemblies for inspection, I do something like this:

System.Reflection.Assembly.ReflectionOnlyLoad(System.IO.File.ReadAllBytes(filepath))

but someone else could use too:

using (System.IO.FileStream fileStream = new System.IO.FileStream(filepath, System.IO.FileMode.Open, System.IO.FileAccess.Read))
{
	byte[] rawbytes = new byte[fileStream.Length];
	int n = fileStream.Read(rawbytes, 0, rawbytes.Length);
 	// n should be equal to rawbytes.Lenght now, or something went South.
  
	System.Reflection.Assembly.ReflectionOnlyLoad(rawbytes)
}

In both situations, the file will be closed after the operation (you need to call Dispose on Streams, and using do it automatically for you).

So, we have now two possible situations in which the DLL files would be still opened by the time Module Manager calculates the SHA :

  1. An external program is, deterministically, keeping the damned files opened at that time - probably an anti-virus
  2. KSP is leaking file handlers in objects still to be collected by the Garbage Collector.

Given that you, by using a small delay, was able to open the file, I think it's reasonable to assume option 2 (as long we agree to rule out multiple MM threads running concurrently).

But in order to KSP be leaking file handlers, it should be loading DLLs more or less like this:

void loaddll(string filepath)
{
	System.IO.FileStream fileStream = new System.IO.FileStream(filepath, System.IO.FileMode.Open, System.IO.FileAccess.Read);
	byte[] rawbytes = new byte[fileStream.Length];
	int n = fileStream.Read(rawbytes, 0, rawbytes.Length);

	System.Reflection.Assembly.ReflectionOnlyLoad(rawbytes)
}

What's, frankly, a very, very, very stupid move. The filestream will be lingering in memory until being collected by the GC.

Now, and assuming this is the problem afflicting MM right now, you are experiencing the problem on the bigger rig not exactly because it's faster, but because it probably have way more memory and so there's less pressure over the Garbage Collector to collect memory, delaying the disposing of the filestreams that were leaked by the hypothetical shoddy code I posted above.

The way you used to cope with the situation (by opening the files in share mode with sharing write privileges), besides not addressing the root problem, is also:

  • being potentially flagged by antivirus as you is opening a DLL file with write permissions, what's a very suspicious move that antivirus look for, triggering some monitoring code that would not be triggered otherwise
  • you are using a slower call.
    • opening a file for sharing is always slower than just opening the thing.
    • reading from it, too.

what makes loading KSP slightly slower than otherwise - and I want to stress that KSP loading times are a common cause of complains.

So, before pushing into the upstream a solution that will make loading KSP slightly slower for everybody no matter they are being affected or not, I would try to pinpoint the root cause of the problem and try something that would tax only the affected rigs.

Being the reason I suggest so:

  • making all the DLLs inside GameData read/only to see if anything changes
    • r/o files are handled in a less strictly way by the O.S., as it knows that no one is going to be able to write on it.
    • (your O.S.'s mileage will vary, of course)
  • call GC.Collect() before starting the SHA computations.
    • If I'm right about the leaking file handlers, this may mitigate the problem.
  • On UNICES listing  the open files immediately before and after the SHA computation is relatively trivial, but I don't have the slightest idea about Windows.
    • if feasible, dumping the process's opened files before and after the SHA computation may help to correctly diagnose the problem
    • on a UNIX, I would have a second process waiting for a signal, and then dumping the open files from the KSP process, and then I would, so, send this signal from Module Manager before starting the SHA computations.

 

 

Edited by Lisias
Entertaining grammars made slightly less entertaining.
Link to comment
Share on other sites

4 hours ago, Lisias said:

Given that you, by using a small delay, was able to open the file, I think it's reasonable to assume option 2 (as long we agree to rule out multiple MM threads running concurrently).

No, the small delay did NOT let the file be opened

8 hours ago, linuxgurugamer said:

Add a sleep delay when trying to open the file, just in case it would be closed.

This did not work

Link to comment
Share on other sites

7 hours ago, linuxgurugamer said:

No, the small delay did NOT let the file be opened

So what leaded you to the conclusion that it would be KSP and/or Unity the problem and not some other process running on that specific rig?

Link to comment
Share on other sites

20 hours ago, Lisias said:

So what leaded you to the conclusion that it would be KSP and/or Unity the problem and not some other process running on that specific rig?

Because other than being a lot faster, the new system is running all the same software, OS, etc.  Nothing is really different. Same Antivirus, same filters on the browsers, etc.  Also, because I have seen the same messages on my old system, just not every time.

Link to comment
Share on other sites

TL;DR: KSP may be innocent, the problem may be on how Windows works internally.

But I am wrong too (and for sure), as by some reason using FileShare.Read is faster than not using it both on MacOS and Windows under C#'s runtime.

Go straight to the bottom of this post for the gory details.

6 hours ago, linuxgurugamer said:

Because other than being a lot faster, the new system is running all the same software, OS, etc.  Nothing is really different. Same Antivirus, same filters on the browsers, etc.  Also, because I have seen the same messages on my old system, just not every time.

The amount of memory between the systems are the same or the new rig has more memory? How faster are the disk access on the most powerful rig (m2 in the new, spinning disks on the old, perhaps)?

Now, I need to ask you to bear with me, as this is not a private message and there're lots of people reading us (and probably more in the future) that may not have all the needed knowledge to understand how deep is this rabbit role.

It also helps me to think. Rubber Ducking effect.

In order to the AntiVirus be a problem, it may be being incited somehow,  but since you had the problem before applying the stunt, at worst you exchanged a problem with a smaller one (after all, the stunt worked for you). So, on a second thought, it's probably not the antivirus the cause of the initial problem.

Assuming we have a problem inside KSP, the older rig being not too much prone for the problem may be related to memory or disk access more than processor speed (if at all). More memory available means less pressure on the GC, and bigger chances of a leaking file handler be around for more time (if we have a file handler leaking). Faster disk access means we have a race condition, in which the slower disk was delaying things enough to prevent it for the most part (and on this case, we may not have a file handler leaking).

As a race condition, I meaning the KSP's thread that was loading all the Assemblies starting the ModuleManager's thread before closing all its file handlers.

On a slow file system, the code that MM uses to search the GameData for DLLs would cause enough delay on a slow disk that it would let the caller's thread to finish closing the handlers.

On a pretty fast file system, the search for the DLLs may be so quick that there was not time for the caller's thread to close the handlers before the MM's thread try to open one of that files.

However, had you having a race condition situation, a delay before trying to open the file should had worked for you - but the ultimate test would be running KSP on a slow disk in the new rig, as a USB thumbdrive or USB to SATA adapter. You reproduce the problem consistently using this, and we rule out definitively the file system from the equation (and, so, a race condition derived from disk access).

So we are back to a file handling leakage problem - with me having to eat my words, as you may be right on thinking the problem is in KSP itself. And/or Unity, but KSP is the one borking, so it is, indeed, the prime suspect by now.

But to understand why this would be a problem, we need to understand how opening files works on a concurrent environment. And now we are getting technical.

When multiple actors try to open the same file for reading, a UNIX O.S. couldn't care less - the damned file are not going to change, everybody is going to read the same data, let them do it as they please. If by some reason you want to be the only one reading the file (as when using the file contents to synchronise multiple processes), you need to explicitly tell the O.S. about.

This is where sane O.S.s like UNIX differs from Windows: what happens if someone tries to delete the file when another process had opened it for reading? On Windows, you have a serious data integrity problem, but on UNIXs deleting a file is only removing a named pointer from a directory file - the file itself is located on the disk by a thingy called inode, and when you open a file, you fetch a pointer to that inode. Only when there's nothing else (as another directory entry or at least a file handler) pointing to a inode is that the file is "physically" erased from the disk. And, yes, you can have the same file "linked" in multiple and different directories on a UNIX file system (it's what we call a hard link).

And perhaps this is the reason we don't have such complains from Linux and MacOS users?

So, by default, on UNICES all files are opened in a way that multiple processes can open it for reading at the same time and you need to go an extra mile to tell the O.S. that the file should be opened by exclusive or controlled access.

On Windows, the default is exclusive access and you need to go that extra mile to tell it to allow multiple process reading it at the same time.

This difference is pretty important, because programmers used to the UNIX way have a mental posture about reading files completely different from Windows programmers. And this played a role on my initial approach to this case. And it's the reason I was subconsciously averse to the idea of using FileShare (being it Read or ReadOnly) on the solution without further considerations. Yep, my apologies.

Using, however, FileShare.ReadWrite is undesirable on an executable file. The ideal mitigation code IMHO should use FileShare.Read (as you already stated on a previous post). Denying write access while opening files may, at very least, get the AntiVirus out of our necks - if no one is going to be able to write the file, there's no need to monitor such a thing.

But now we have a serious problem on KSP itself: as it appears, we have a problem of leaking file handlers (or less likely a race condition, see above). KSP loading times is being consistently criticised, and we are only making things worse.

So, it's time for some benchmarking. I wrote this little program:

Spoiler
// Tests.exe
using System;

namespace Tests
{
	public static class MainClass
		private static TimeSpan OpenFile(string fn, int i)
		{
			System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
			stopWatch.Start();
			for (; i > 0 ; --i)
				using (System.IO.FileStream fileStream = new System.IO.FileStream(fn, System.IO.FileMode.Open))
					;
			stopWatch.Stop();
			return stopWatch.Elapsed;
		}

		private static TimeSpan OpenFileWithRead(string fn, int i)
		{
			System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
			stopWatch.Start();
			for (; i > 0 ; --i)
				using (System.IO.FileStream fileStream = new System.IO.FileStream(fn, System.IO.FileMode.Open, System.IO.FileAccess.Read))
					;
			stopWatch.Stop();
			return stopWatch.Elapsed;
		}

		public static void TestSession2()
		{
			const string fn = "./Tests.exe";
			const int iters = 100000;
			{
				TimeSpan ts = OpenFileWithRead(fn, iters);
				Console.WriteLine(string.Format("OpenFileWithRead {0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10));
			}
			{
				TimeSpan ts = OpenFile(fn, iters);
				Console.WriteLine(string.Format("OpenFile {0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10));
			}
		}

		public static void Main(string[] args)
		{
			Console.WriteLine("Hello World!");
			Console.WriteLine(Environment.GetCommandLineArgs()[0]);
			TestSession2();
		}
	}
}

And I ran it 3 times on my MacOS rig:

> /Library/Frameworks/Mono.framework/Commands/mono Tests.exe
Hello World!
/Users/lisias/Workspaces/KSP/GIT/net-lisias/ksp/KSPe/bin/Debug/Tests/Tests.exe
OpenFileWithRead 00:00:08.24
OpenFile 00:00:09.07
--
> /Library/Frameworks/Mono.framework/Commands/mono Tests.exe
Hello World!
/Users/lisias/Workspaces/KSP/GIT/net-lisias/ksp/KSPe/bin/Debug/Tests/Tests.exe
OpenFileWithRead 00:00:08.14
OpenFile 00:00:08.83
--
> /Library/Frameworks/Mono.framework/Commands/mono Tests.exe
Hello World!
/Users/lisias/Workspaces/KSP/GIT/net-lisias/ksp/KSPe/bin/Debug/Tests/Tests.exe
OpenFileWithRead 00:00:08.39
OpenFile 00:00:08.98

And… I gone down in flames! Using OpenFileWithRead is FASTER. This caught me with my pants down in a very precarious situation...

Since I'm here, I ran the same binary on my Windows 10 test bed:

C:\Users\lisias\Desktop\OpenRead>Tests.exe
Hello World!
Tests.exe
OpenFileWithRead 00:00:04.65

Exceção Não Tratada: System.IO.IOException: O processo não pode acessar o arquivo 'C:\Users\lisias\Desktop\OpenRead\Tests.exe' porque ele está sendo usado por outro processo.
   em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   em System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   em System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   em System.IO.FileStream..ctor(String path, FileMode mode)
   em Tests.MainClass.OpenFile(String fn, Int32 i)
   em Tests.MainClass.TestSession2()
   em Tests.MainClass.Main(String[] args)

C:\Users\lisias\Desktop\OpenRead>

My Windows is PT-BR. The message above is telling that the process could not access the file because it was in use by another process.

This caught my attention: the EXE file is kept open while running the program! So I copied Tests.exe to T.exe and ran T.exe instead (and, so, Tests.exe would not be opened at runtime):

C:\Users\lisias\Desktop\OpenRead>T.exe
Hello World!
T.exe
OpenFileWithRead 00:00:04.17
OpenFile 00:00:04.50
--
C:\Users\lisias\Desktop\OpenRead>T.exe
Hello World!
T.exe
OpenFileWithRead 00:00:04.07
OpenFile 00:00:04.47
--
C:\Users\lisias\Desktop\OpenRead>T.exe
Hello World!
T.exe
OpenFileWithRead 00:00:04.06
OpenFile 00:00:04.49

Oukey, the results are consistent. Once I avoided opening the file from the executable in use, I got similar results - with the exception that my MacOS is twice as slower than Windows. A real surprise, as my MacMini is using spinning platers and the Windows notebook a M2 - I was expecting better performance from a M2 (perhaps the one I have is crappy?). APFS appears to be less performatic than HPFS, by the way, but since I make heavy use of the CopyOnWrite thingy, I will just take the hit on this.

Anyway, since I'm here, I gave this a last shot and created a test case for FileShare.ReadWrite and got the following timings:

> /Library/Frameworks/Mono.framework/Commands/mono Tests.exe
Hello World!
/Users/lisias/Workspaces/KSP/GIT/net-lisias/ksp/KSPe/bin/Debug/Tests/Tests.exe
OpenFileWithReadWrite 00:00:08.20
OpenFileWithRead 00:00:08.17
OpenFile 00:00:08.76
--
> /Library/Frameworks/Mono.framework/Commands/mono Tests.exe
Hello World!
/Users/lisias/Workspaces/KSP/GIT/net-lisias/ksp/KSPe/bin/Debug/Tests/Tests.exe
OpenFileWithReadWrite 00:00:08.25
OpenFileWithRead 00:00:08.22
OpenFile 00:00:08.86
-- 
> /Library/Frameworks/Mono.framework/Commands/mono Tests.exe
Hello World!
/Users/lisias/Workspaces/KSP/GIT/net-lisias/ksp/KSPe/bin/Debug/Tests/Tests.exe
OpenFileWithReadWrite 00:00:08.34
OpenFileWithRead 00:00:08.82
OpenFile 00:00:09.12

Well, I'm not that wrong after all - opening with FileShare.ReadWrite is, indeed, slightly slower then FileShare.Read, but barely. And it's way faster than not using FileShare at all.

On Windows, I got:

C:\Users\lisias\Desktop\OpenRead>T.exe
Hello World!
T.exe
OpenFileWithReadWrite 00:00:04.06
OpenFileWithRead 00:00:04.03
OpenFile 00:00:04.48
--
C:\Users\lisias\Desktop\OpenRead>T.exe
Hello World!
T.exe
OpenFileWithReadWrite 00:00:04.04
OpenFileWithRead 00:00:04.04
OpenFile 00:00:04.48

The difference is way tighter than on MacOS, but it's still there. Perhaps due the M2?

Well, concluding: I'm still smelling something funny on the root problem, but I'm not convinced anymore it's something in KSP. It may be something on Windows, taking some time to wave the file handler of the opened DLL file (in a similar way Windows kept the EXE file opened while running it - I had completely forgot Windows does this stunt).

However, intentionally or not, LGG solution for the problem is not only a working mitigation for the problem at hands, it's also the near the best way to open a file on C# - second only to my counter-proposal, FileShare.Read (and by a very narrow margin, virtually negligible in Windows).

Given the results I got on these benchmarks, I recommend to everybody to always open files on C# using FileShare.Read when reading files.

Edited by Lisias
Link to comment
Share on other sites

4 hours ago, Lisias said:

The amount of memory between the systems are the same or the new rig has more memory? How faster are the disk access on the most powerful rig (m2 in the new, spinning disks on the old, perhaps)

Memory is the same (64 gig), both systems have nvme.  New system is a new cpu, i13900k, old system was i9900k.  Memory is faster, and probably the nvme is a bit faster as well.

Link to comment
Share on other sites

On 5/18/2023 at 9:29 AM, linuxgurugamer said:

Memory is the same (64 gig), both systems have nvme.  New system is a new cpu, i13900k, old system was i9900k.  Memory is faster, and probably the nvme is a bit faster as well.

With this information, and the benchmarks I did last post, I'm inclined into believing that the problem may be affecting only Windows users.

If this is a KSP problem, then we have a file handler leakage but I failed to understand why a faster processor would be making this more prone to happen unless...

hummm...

I checked the i13900k specs and realized it is an asymmetric CPU! 8 pretty fast cores and 16 slower ones.

It's more like a hunch than anything else, and the FileShare stunt ended up working around the problem anyway, but I think you will get better overall game performance if you set Windows to run KSP only in the performance 8 cores (assuming you didn't did it yet), I remember a setting calling Affinity in which you tell Windows to use only a subset of the threads for a process.

KSP(1) predates a lot of new things as asymmetric cores and unless something on Windows is able to tell an application from a game automatically, KSP is probably spanning itself indiscriminately over different cores. And Unity (ab)using busy waits is probably not helping the situation, as we would have events being consumed slower than others depending what core the thing is frying at that moment.

There is some multithreading on KSP, and if the MM thread is fired on a fast core while the Assembler Loading thread is running on a slower one, then we have a race condition aggravated by the difference on the speeds of the cores.

The MM mitigation allows the thing to keep going (and, again, my benchmarks above suggests it should stay), but the asymmetric problem may be screwing up others things too - Unity relies reavily on spinlocks and I bet no one ever considered that some locks would be spinning faster than others.

I would like to suggest trying the "unmitigated" MM on the new rig setting the affinity to use only similar cores (a run using only the fastest ones, and another using only the slowest) to see if anything changes - not due this problem (it's already mitigated), but to check the asymmetric hypothesis.

If we have confirmation about asymmetric cores screwing up something, suddenly a lot of absolutely weird concurrency problems I'm detecting on the field have now a feasible explanation!

Edited by Lisias
Tyop!
Link to comment
Share on other sites

Hello! I'm trying to get a thing to parse, but it won't because it has a space in it. How would I get KSP to parse the literal?

@MODULE[ModuleB9PartSwitch]:HAS[#SwitcherDescription[Engine Config]]{

this crashes at [Engine .

Edited by eagleswing12
Link to comment
Share on other sites

5 hours ago, eagleswing12 said:

Hello! I'm trying to get a thing to parse, but it won't because it has a space in it. How would I get KSP to parse the literal?

@MODULE[ModuleB9PartSwitch]:HAS[#SwitcherDescription[Engine Config]]{

this crashes at [Engine .

use a dot or a question mark (I don't remember which) to replace the space

Link to comment
Share on other sites

Hi, I'm trying to add Snacks Fresh Air support to some of the SSPX-R parts and could use a hand. Specifically I'm using the logic that if it has a soil recycler it should probably have an air scrubber, and to that end I more or less just copied the Snacks patch and modified variable names and numbers as made sense to me, as such:

Spoiler

@PART[sspx-greenhouse-*,sspx-inflatable-centrifuge-*,sspx-expandable-centrifuge-*,sspx-habitation-*,sspx-inflatable-hab-*,sspx-aquaculture-375-1,sspx-utility-125-1,sspx-dome-greenhouse-5-1,sspx-dome-habitation-5-1]:NEEDS[SnacksFreshAir]
{
    MODULE
    {
        name = AirScrubber
        ConverterName = Air Scrubber
        StartActionName = Start Air Scrubber
        StopActionName = Stop Air Scrubber
        AutoShutdown = false
        GeneratesHeat = false
        UseSpecialistBonus = false
        // default
        RecyclerCapacity = 1
        // use CrewCapacity for RecyclerCapacity
        @RecyclerCapacity *= #$../CrewCapacity$
     
        INPUT_RESOURCE
        {
            ResourceName = StaleAir
            Ratio = 0.000074
            FlowMode = ALL_VESSEL
          }
        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Ratio = 0.4
            FlowMode = STAGE_PRIORITY_FLOW
        }
        OUTPUT_RESOURCE
        {
            ResourceName = FreshAir
            Ratio = 0.0000296
            DumpExcess = false
            FlowMode = ALL_VESSEL
        }
    }

    // Note, Snacks Fresh Air adds Air capacity to crewed parts automatically.
    // Stale Air capacity is not automatic since only parts with recyclers
    // should have it.
    RESOURCE
    {
        name = StaleAir
        amount = 0
        maxAmount = 16
        @maxAmount *= #$../CrewCapacity$
    }
}
// fine tuning starts here:
// centrifuges
@PART[sspx-inflatable-centrifuge-*,sspx-expandable-centrifuge-*]:HAS[@MODULE[AirScrubber]]:NEEDS[SnacksFreshAir]
{
    @MODULE[AirScrubber]
    {
        // rebase to default
        @RecyclerCapacity = 1
        // since centrifuges don't have crew capacity we need to adapt
        @RecyclerCapacity *= #$../MODULE[ModuleDeployableCentrifuge]/DeployedCrewCapacity$
    }

    @RESOURCE[StaleAir]
    {
        // rebase to default
        @maxAmount = 16
        // since centrifuges don't have crew capacity we need to adapt
        @maxAmount *= #$../MODULE[ModuleDeployableCentrifuge]/DeployedCrewCapacity$
    }
}
// non-centrifuge inflatable habs
@PART[sspx-inflatable-hab-*]:HAS[@MODULE[AirScrubber]]:NEEDS[SnacksFreshAir]
{
    @MODULE[AirScrubber]
    {
        // rebase to default
        @RecyclerCapacity = 1
        // since inflatables don't have crew capacity we need to adapt
        @RecyclerCapacity *= #$../MODULE[ModuleDeployableHabitat]/DeployedCrewCapacity$
    }

    @RESOURCE[StaleAir]
    {
        // rebase to default
        @maxAmount = 16
        // since inflatables don't have crew capacity we need to adapt
        @maxAmount *= #$../MODULE[ModuleDeployableHabitat]/DeployedCrewCapacity$
    }
}

// Greenhouses
//     - 300% Boost to Stale Air Capacity
@PART[sspx-greenhouse-*,sspx-dome-greenhouse-5-1]:NEEDS[SnacksFreshAir]
{

    // Greenhouses hold extra Stale Air (compared to habs)
    @RESOURCE[StaleAir]
    {
        @maxAmount *= 4
    }
}
// sspx-greenhouse-375-1: 25% boost to EC cost and 100% boost to Fresh Air output
// for plant having reasons
@PART[sspx-greenhouse-375-1,sspx-dome-greenhouse-5-1]:NEEDS[SnacksFreshAir]
{
    @MODULE[AirScrubber]
    {
        @INPUT_RESOURCE:HAS[#ResourceName[ElectricCharge]]
        {
            @Ratio *= 1.25
        }
        @OUTPUT_RESOURCE:HAS[#ResourceName[FreshAir]]
        {
            @Ratio *= 1.5
        }
    }
    
}

When I run the game with this added to the SSPXRSnacks patch (between the normal snacks stuff but before the Snacks Stress section) it does apply the stale air capacity to parts so I know I'm doing at least part of this correctly, but it doesn't seem to actually add the air scrubbing modules like I thought I had. If anyone can point me to what I'm doing wrong, I'd appreciate it. I figure once I get this right I can also add them to a few more parts from other mods that I'm using, but if anyone's already done more extensive Fresh Air support for more than just the modifications to the three base parts supported by the base mod addon, I'd also love to be pointed at that work so I don't have to clumsily duplicate it.

 

Edited by Maeamian
added details
Link to comment
Share on other sites

25 minutes ago, Maeamian said:

Hi, I'm trying to add Snacks Fresh Air support to some of the SSPX-R parts and could use a hand. Specifically I'm using the logic that if it has a soil recycler it should probably have an air scrubber, and to that end I more or less just copied the Snacks patch and modified variable names and numbers as made sense to me, as such:

  Hide contents

@PART[sspx-greenhouse-*,sspx-inflatable-centrifuge-*,sspx-expandable-centrifuge-*,sspx-habitation-*,sspx-inflatable-hab-*,sspx-aquaculture-375-1,sspx-utility-125-1,sspx-dome-greenhouse-5-1,sspx-dome-habitation-5-1]:NEEDS[SnacksFreshAir]
{
    MODULE
    {
        name = AirScrubber
        ConverterName = Air Scrubber
        StartActionName = Start Air Scrubber
        StopActionName = Stop Air Scrubber
        AutoShutdown = false
        GeneratesHeat = false
        UseSpecialistBonus = false
        // default
        RecyclerCapacity = 1
        // use CrewCapacity for RecyclerCapacity
        @RecyclerCapacity *= #$../CrewCapacity$
     
        INPUT_RESOURCE
        {
            ResourceName = StaleAir
            Ratio = 0.000074
            FlowMode = ALL_VESSEL
          }
        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Ratio = 0.4
            FlowMode = STAGE_PRIORITY_FLOW
        }
        OUTPUT_RESOURCE
        {
            ResourceName = FreshAir
            Ratio = 0.0000296
            DumpExcess = false
            FlowMode = ALL_VESSEL
        }
    }

    // Note, Snacks Fresh Air adds Air capacity to crewed parts automatically.
    // Stale Air capacity is not automatic since only parts with recyclers
    // should have it.
    RESOURCE
    {
        name = StaleAir
        amount = 0
        maxAmount = 16
        @maxAmount *= #$../CrewCapacity$
    }
}
// fine tuning starts here:
// centrifuges
@PART[sspx-inflatable-centrifuge-*,sspx-expandable-centrifuge-*]:HAS[@MODULE[AirScrubber]]:NEEDS[SnacksFreshAir]
{
    @MODULE[AirScrubber]
    {
        // rebase to default
        @RecyclerCapacity = 1
        // since centrifuges don't have crew capacity we need to adapt
        @RecyclerCapacity *= #$../MODULE[ModuleDeployableCentrifuge]/DeployedCrewCapacity$
    }

    @RESOURCE[StaleAir]
    {
        // rebase to default
        @maxAmount = 16
        // since centrifuges don't have crew capacity we need to adapt
        @maxAmount *= #$../MODULE[ModuleDeployableCentrifuge]/DeployedCrewCapacity$
    }
}
// non-centrifuge inflatable habs
@PART[sspx-inflatable-hab-*]:HAS[@MODULE[AirScrubber]]:NEEDS[SnacksFreshAir]
{
    @MODULE[AirScrubber]
    {
        // rebase to default
        @RecyclerCapacity = 1
        // since inflatables don't have crew capacity we need to adapt
        @RecyclerCapacity *= #$../MODULE[ModuleDeployableHabitat]/DeployedCrewCapacity$
    }

    @RESOURCE[StaleAir]
    {
        // rebase to default
        @maxAmount = 16
        // since inflatables don't have crew capacity we need to adapt
        @maxAmount *= #$../MODULE[ModuleDeployableHabitat]/DeployedCrewCapacity$
    }
}

// Greenhouses
//     - 300% Boost to Stale Air Capacity
@PART[sspx-greenhouse-*,sspx-dome-greenhouse-5-1]:NEEDS[SnacksFreshAir]
{

    // Greenhouses hold extra Stale Air (compared to habs)
    @RESOURCE[StaleAir]
    {
        @maxAmount *= 4
    }
}
// sspx-greenhouse-375-1: 25% boost to EC cost and 100% boost to Fresh Air output
// for plant having reasons
@PART[sspx-greenhouse-375-1,sspx-dome-greenhouse-5-1]:NEEDS[SnacksFreshAir]
{
    @MODULE[AirScrubber]
    {
        @INPUT_RESOURCE:HAS[#ResourceName[ElectricCharge]]
        {
            @Ratio *= 1.25
        }
        @OUTPUT_RESOURCE:HAS[#ResourceName[FreshAir]]
        {
            @Ratio *= 1.5
        }
    }
    
}

When I run the game with this added to the SSPXRSnacks patch (between the normal snacks stuff but before the Snacks Stress section) it does apply the stale air capacity to parts so I know I'm doing at least part of this correctly, but it doesn't seem to actually add the air scrubbing modules like I thought I had. If anyone can point me to what I'm doing wrong, I'd appreciate it. I figure once I get this right I can also add them to a few more parts from other mods that I'm using, but if anyone's already done more extensive Fresh Air support for more than just the modifications to the three base parts supported by the base mod addon, I'd also love to be pointed at that work so I don't have to clumsily duplicate it.

 

Can you post your module manager cache file?

Link to comment
Share on other sites

14 minutes ago, Maeamian said:

I believe that I've got the right file (modulemanager.configcache from my game data folder) and it's at dropbox here

It appears to have applied from what I can tell..

This is: sspx-greenhouse-25-1
 

Quote

    

MODULE
        {
            name = AirScrubber
            ConverterName = Air Scrubber
            StartActionName = Start Air Scrubber
            StopActionName = Stop Air Scrubber
            AutoShutdown = false
            GeneratesHeat = false
            UseSpecialistBonus = false
            RecyclerCapacity = 2
            INPUT_RESOURCE
            {
                ResourceName = StaleAir
                Ratio = 0.000074
                FlowMode = ALL_VESSEL
            }
            INPUT_RESOURCE
            {
                ResourceName = ElectricCharge
                Ratio = 0.4
                FlowMode = STAGE_PRIORITY_FLOW
            }
            OUTPUT_RESOURCE
            {
                ResourceName = FreshAir
                Ratio = 0.0000296
                DumpExcess = false
                FlowMode = ALL_VESSEL
            }
        }

Just checked sspx-greenhouse-375-1. It is applied, though the output looks weird, but it does appear to have multiplied right.

Quote

        MODULE
        {
            name = AirScrubber
            ConverterName = Air Scrubber
            StartActionName = Start Air Scrubber
            StopActionName = Stop Air Scrubber
            AutoShutdown = false
            GeneratesHeat = false
            UseSpecialistBonus = false
            RecyclerCapacity = 3
            INPUT_RESOURCE
            {
                ResourceName = StaleAir
                Ratio = 0.000074
                FlowMode = ALL_VESSEL
            }
            INPUT_RESOURCE
            {
                ResourceName = ElectricCharge
                Ratio = 0.5
                FlowMode = STAGE_PRIORITY_FLOW
            }
            OUTPUT_RESOURCE
            {
                ResourceName = FreshAir
                Ratio = 4.44E-05
                DumpExcess = false
                FlowMode = ALL_VESSEL
            }
        }

 

Edited by Nori
Link to comment
Share on other sites

42 minutes ago, Nori said:

It appears to have applied from what I can tell..

This is: sspx-greenhouse-25-1
 

Just checked sspx-greenhouse-375-1. It is applied, though the output looks weird, but it does appear to have multiplied right.

 

Huh! You're right, I just double checked the same cache and it does seem to have applied the module exactly as you pointed out, however when I loaded up those parts in the VAB just now they don't seem to have the 'Start Air Scrubber' button available, nor when I launch a new vehicle with one attached (screenshot for reference) or load an old one that already had one, any insight as to why this might be? Either way, thanks for taking the time, I didn't realize the config cache was where I could check results so you've helped a lot already in terms of my ability to double check things

Edited by Maeamian
added screenshot
Link to comment
Share on other sites

13 minutes ago, Maeamian said:

Huh! You're right, I just double checked the same cache and it does seem to have applied the module exactly as you pointed out, however when I loaded up those parts in the VAB just now they don't seem to have the 'Start Air Scrubber' button available, nor when I launch a new vehicle with one attached (screenshot for reference) or load an old one that already had one, any insight as to why this might be? Either way, thanks for taking the time, I didn't realize the config cache was where I could check results so you've helped a lot already in terms of my ability to double check things

Yeah the cache file is super helpful in tweaking CFGs and figuring out what works (or doesn't). Does the mk1 crew cabin or mk2 crew cabin have the air scrubber?

 

Hmm, I think I found your issue, maybe... I believe the MODULE should be "name = SnacksConverter" you have it as  "name = AirScrubber"

Link to comment
Share on other sites

24 minutes ago, Nori said:

Yeah the cache file is super helpful in tweaking CFGs and figuring out what works (or doesn't). Does the mk1 crew cabin or mk2 crew cabin have the air scrubber?

 

Hmm, I think I found your issue, maybe... I believe the MODULE should be "name = SnacksConverter" you have it as  "name = AirScrubber"

That seems to have been it! Thanks for your help!

For my own edification, I figured (obviously wrongly) that as long as your name was internally consistant you were fine, why does that make a difference?

Link to comment
Share on other sites

12 minutes ago, Maeamian said:

That seems to have been it! Thanks for your help!

For my own edification, I figured (obviously wrongly) that as long as your name was internally consistant you were fine, why does that make a difference?

The name in this case is calling the actual MODULE being used by the mod. For instance, you could have a EngineFX Module and you are defining a engine. Were you getting errors on start about not finding a module called AirScrubber? I suspect you were.

Link to comment
Share on other sites

7 minutes ago, Nori said:

The name in this case is calling the actual MODULE being used by the mod. For instance, you could have a EngineFX Module and you are defining a engine. Were you getting errors on start about not finding a module called AirScrubber? I suspect you were.

Oh I see! Because I'm relying on the Snacks mod to do the processing that I'm asking it to do I need to make sure that the name of the module is what the mod is looking for, the "It's fine if it's internally consistent" part is just the converter name part of it. Thank you again for taking the time!

Link to comment
Share on other sites

26 minutes ago, Maeamian said:

Oh I see! Because I'm relying on the Snacks mod to do the processing that I'm asking it to do I need to make sure that the name of the module is what the mod is looking for, the "It's fine if it's internally consistent" part is just the converter name part of it. Thank you again for taking the time!

Yep, converter name, start/stop action name can be whatever you want and it'll still work.  :)

Link to comment
Share on other sites

I need a bit of help.

There is a file included with the Magpie mod called:

MagpieMods\TU_Cfgs\StockConfigBAF.cfg (included in hidden section right below this):

Spoiler
@REFLECTION_CONFIG[default]
{
	%enabled = true
}
KSP_MODEL_SHADER
{
	name = Stock_FullMetal
	
		model = Squad/Parts/Aero/basicFin/basicFin  
		model = Squad/Parts/Aero/fairings/AutoTruss 
		model = Squad/Parts/Aero/fairings/fairingSize1 
		model = Squad/Parts/Aero/fairings/fairingSize2 
		model = Squad/Parts/Aero/fairings/fairingSize3 
		model = Squad/Parts/Aero/fairings/fairingsCap
		model = Squad/Parts/Aero/HeatShield/HeatShield0 
		model = Squad/Parts/Aero/HeatShield/HeatShield1 
		model = Squad/Parts/Aero/HeatShield/HeatShield2 
		model = Squad/Parts/Aero/HeatShield/HeatShield3 
		model = Squad/Parts/Aero/InflatableHeatShield/HeatShield 
		model = Squad/Parts/Command/advancedSasModuleLarge/model 
		model = Squad/Parts/Command/externalCommandSeat/model 
		model = Squad/Parts/Command/inlineAdvancedStabilizer/model 
		model = Squad/Parts/Command/inlineReactionWheel/model 
		model = Squad/Parts/Command/Mk1-2Pod/model 
		model = Squad/Parts/Command/mk1LanderCan/model 
		model = Squad/Parts/Command/mk2LanderCan/model 
		model = Squad/Parts/Command/mk2LanderCan_v2/mk2LanderCan
		model = Squad/Parts/Command/MpoProbe/MpoProbe
		model = Squad/Parts/Command/MtmStage/MTM_Stage
		model = Squad/Parts/Command/probeCoreCube/probeCoreCube 
		model = Squad/Parts/Command/probeCoreHex/model
		model = Squad/Parts/Command/probeCoreHex_v2/model
		model = Squad/Parts/Command/probeCoreOcto/model 
		model = Squad/Parts/Command/probeCoreOcto_v2/probeCoreOcto_v2
		model = Squad/Parts/Command/probeCoreOcto2/model 
		model = Squad/Parts/Command/probeCoreOcto2_v2/probeCoreOcto2_v2
		model = Squad/Parts/Command/probeRoverBody/model 
		model = Squad/Parts/Command/probeRoverBody_v2/probeRoverBody_v2
		model = Squad/Parts/Command/probeStackLarge/model 
		model = Squad/Parts/Command/probeStackSmall/model 
		model = Squad/Parts/Command/probeStackSphere/model 
		model = Squad/Parts/Command/probeStackSphere_v2/probeStackSphere_v2
		model = Squad/Parts/CompoundParts/strutConnector/model 
		model = Squad/Parts/Coupling/Assets/Decoupler_0 
		model = Squad/Parts/Coupling/Assets/Decoupler_1 
		model = Squad/Parts/Coupling/Assets/Decoupler_1p5 
		model = Squad/Parts/Coupling/Assets/Decoupler_2 
		model = Squad/Parts/Coupling/Assets/Decoupler_3 
		model = Squad/Parts/Coupling/Assets/Decoupler_4 
		model = Squad/Parts/Coupling/Assets/Separator_0 
		model = Squad/Parts/Coupling/Assets/Separator_1 
		model = Squad/Parts/Coupling/Assets/Separator_1p5 
		model = Squad/Parts/Coupling/Assets/Separator_2 
		model = Squad/Parts/Coupling/Assets/Separator_3 
		model = Squad/Parts/Coupling/Assets/Separator_4  
		model = Squad/Parts/Electrical/gigantorXlSolarArray/model 
		model = Squad/Parts/Electrical/RTG/model 
		model = Squad/Parts/Electrical/3x2ShroudSolarPanels/model
		model = Squad/Parts/Electrical/1x6ShroudSolarPanels/model
		model = Squad/Parts/Electrical/3xSolarPanels/model
		model = Squad/Parts/Electrical/1x6ShroudSolarPanels/model
		model = Squad/Parts/Electrical/z-1kBattery/model 
		model = Squad/Parts/Electrical/z-200Battery/model 
		model = Squad/Parts/Electrical/z-400Battery/model 
		model = Squad/Parts/Electrical/z-4kBattery/model 
		model = Squad/Parts/Engine/ionEngine/model 
		model = Squad/Parts/Engine/jetEngines/turboRamJet 
		model = Squad/Parts/Engine/liquidEngine24-77/model 
		model = Squad/Parts/Engine/liquidEngine24-77_v2/Twitch_v2
		model = Squad/Parts/Engine/liquidEngine48-7S_v2/SparkV2
		model = Squad/Parts/Engine/liquidEngine48-7S/model 
		model = Squad/Parts/Engine/liquidEngineAerospike/AeroSpike 
		model = Squad/Parts/Engine/liquidEngineLV-1/model 
		model = Squad/Parts/Engine/liquidEngineLV-1_v2/Assets/Ant
		model = Squad/Parts/Engine/liquidEngineLV-1_v2/Assets/Spider
		model = Squad/Parts/Engine/liquidEngineLV-1R/model 
		model = Squad/Parts/Engine/liquidEngineLV-909/model 
		model = Squad/Parts/Engine/liquidEngineLV-909_v2/TerrierV2
		model = Squad/Parts/Engine/liquidEngineLV-N/model 
		model = Squad/Parts/Engine/liquidEngineLV-T30/model 
		model = Squad/Parts/Engine/liquidEngineLV-T45/model 
		model = Squad/Parts/Engine/liquidEngineMainsail_v2/liquidEngineMainsail_v2
		model = Squad/Parts/Engine/liquidEngineSkipper_v2/skipper_v2
		model = Squad/Parts/Engine/liquidEngineMainsail/model 
		model = Squad/Parts/Engine/liquidEngineMk55/Thud 
		model = Squad/Parts/Engine/liquidEnginePoodle/model 
		model = Squad/Parts/Engine/liquidEngineSkipper/model 
		model = Squad/Parts/Engine/liquidEngineSSME/SSME 
		model = Squad/Parts/Engine/liquidEnginePoodle_v2/LqdEnginePoodle_v2
		model = Squad/Parts/Engine/OMSEngine/Puff_v2 	
		model = Squad/Parts/Engine/Size3AdvancedEngine/Size3AdvancedEngine 
		model = Squad/Parts/Engine/Size2LFB/Size2LFB
		model = Squad/Parts/Engine/vernorEngine/NewModel 
		model = Squad/Parts/FuelTank/FoilTanks/RadialTank_Capsule 
		model = Squad/Parts/FuelTank/FoilTanks/RadialTank_Round 
		model = Squad/Parts/FuelTank/FoilTanks/ToroidTank 
		model = Squad/Parts/FuelTank/fuelTankOscarB/model  		
		model = Squad/Parts/FuelTank/xenonTankLarge/model 
		model = Squad/Parts/FuelTank/xenonTank/model
		model = Squad/Parts/FuelTank/xenonTankRadial/model 
		model = Squad/Parts/Misc/AsteroidDay/CamSat 
		model = Squad/Parts/Misc/AsteroidDay/HECS2 
		model = Squad/Parts/Misc/AsteroidDay/HighGainAntenna  
		model = Squad/Parts/Misc/PotatoRoid/Cube 
		model = Squad/Parts/Resources/FuelCell/FuelCell 
		model = Squad/Parts/Resources/FuelCell/FuelCellArray 
		model = Squad/Parts/Resources/ISRU/ISRU 
		model = Squad/Parts/Resources/LargeTank/LargeTank 
		model = Squad/Parts/Resources/MiniDrill/MiniDrill 
		model = Squad/Parts/Resources/MiniISRU/MiniISRU 
		model = Squad/Parts/Resources/OrbitalScanner/OrbitalScanner 
		model = Squad/Parts/Resources/RadialDrill/TriBitDrill 
		model = Squad/Parts/Resources/SmallTank/SmallTank 
		model = Squad/Parts/Resources/SurfaceScanner/SurfaceScanner 
		model = Squad/Parts/Resources/SurveyScanner/SurveyScanner 
		model = Squad/Parts/Science/AtmosphereSensor/model 
		model = Squad/Parts/Science/GooExperiment/GooExperiment 
		model = Squad/Parts/Science/MaterialBay/science_module_small
		model = Squad/Parts/Science/Magnetometer/Magnetometer
		model = Squad/Parts/Science/ScienceBox/ScienceBox 
		model = Squad/Parts/Science/sensorAccelerometer/model 
		model = Squad/Parts/Science/sensorBarometer/model 
		model = Squad/Parts/Science/sensorGravimeter/model 
		model = Squad/Parts/Science/sensorThermometer/model 
		model = Squad/Parts/Structural/adapterLargeSmallBi/model 
		model = Squad/Parts/Structural/adapterLargeSmallQuad/model 
		model = Squad/Parts/Structural/adapterLargeSmallTri/model 
		model = Squad/Parts/Structural/adapterSmallMiniShort/model 
		model = Squad/Parts/Structural/adapterSmallMiniTall/model 
		model = Squad/Parts/Structural/Size3Decoupler/size3Decoupler 
		model = Squad/Parts/Structural/FLAdapters/Assets/adapterSmallMiniShort_v2
		model = Squad/Parts/Structural/FLAdapters/Assets/adapterSmallMiniTall_v2
		model = Squad/Parts/Structural/stackAdapters/Assets/adapterLargeSmallBi
		model = Squad/Parts/Structural/stackAdapters/Assets/adapterLargeSmallQuad
		model = Squad/Parts/Structural/stackAdapters/Assets/adapterLargeSmallTri
		model = Squad/Parts/Structural/stationHub/model 
		model = Squad/Parts/Structural/structuralIBeam200/model 
		model = Squad/Parts/Structural/structuralIBeam200Pocket/model 
		model = Squad/Parts/Structural/structuralIBeam650/model 
		model = Squad/Parts/Structural/structuralMicronode/model 
		model = Squad/Parts/Structural/structuralPanel1x1/model 
		model = Squad/Parts/Structural/structuralPanel2x2/model 
		model = Squad/Parts/Structural/structuralPylons/PylonBig 
		model = Squad/Parts/Structural/structuralPylons/PylonSmall 
		model = Squad/Parts/Structural/strutCubicOcto/model 
		model = Squad/Parts/Structural/strutOcto/model 
		model = Squad/Parts/Structural/trussGirderAdapter/model 
		model = Squad/Parts/Structural/trussGirderL/model 
		model = Squad/Parts/Structural/trussGirderXL/model  
		model = Squad/Parts/Utility/commsDish16/model 
		model = Squad/Parts/Utility/decouplerRadialHDM/model 
		model = Squad/Parts/Utility/decouplerRadialTT-38K/model 
		model = Squad/Parts/Utility/decouplerRadialTT-70/model 
		model = Squad/Parts/Utility/decouplerSeparatorTR-18D/model 
		model = Squad/Parts/Utility/decouplerSeparatorTR-2C/model 
		model = Squad/Parts/Utility/decouplerSeparatorTR-XL/model 
		model = Squad/Parts/Utility/decouplerStack2m/model 
		model = Squad/Parts/Utility/decouplerStackTR-18A/model 
		model = Squad/Parts/Utility/decouplerStackTR-2V/model 
		model = Squad/Parts/Utility/DirectAntennas/HGAntenna 
		model = Squad/Parts/Utility/DirectAntennas/SurfAntenna 
		model = Squad/Parts/Utility/dockingPort/model 		
		model = Squad/Parts/Utility/dockingPortJr/model 		
		model = Squad/Parts/Utility/dockingPortSr/model  
		model = Squad/Parts/Utility/dockingPortInline/model
		model = Squad/Parts/Utility/linearVernorRCS/Assets/vernorEngine
		model = Squad/Parts/Utility/linearVernorRCS/Assets/linearRCS
		model = Squad/Parts/Utility/ladderRadial/model 
		model = Squad/Parts/Utility/ladderTelescopic/model 
		model = Squad/Parts/Utility/ladderTelescopicBay/model 
		model = Squad/Parts/Utility/landingLegLT-1/model 
		model = Squad/Parts/Utility/landingLegLT-2/model 
		model = Squad/Parts/Utility/landingLegLT-5/model 
		model = Squad/Parts/Utility/largeAdapter/model 
		model = Squad/Parts/Utility/largeAdapterShort/model  
		model = Squad/Parts/Utility/launchEscapeSystem/LaunchEscapeSystem 
		model = Squad/Parts/Utility/linearRCS/model 
		model = Squad/Parts/Utility/radialAttachmentPoint/model 
		model = Squad/Parts/Utility/rcsBlockRV-105/model 
		model = Squad/Parts/Utility/rcsBlockRV-105_v2/rcsBlock105
		model = Squad/Parts/Utility/RelayAntennas/HGAntenna 
		model = Squad/Parts/Utility/ServiceBay/ServiceBay_125 
		model = Squad/Parts/Utility/ServiceBay/ServiceBay_250 
		model = Squad/Parts/Utility/spotLightMk1/model 
		model = Squad/Parts/Utility/spotLightMk2/model 
		model = Squad/Parts/Utility/stackBiCoupler/model000
		model = Squad/Parts/Utility/stackCouplers/Assets/stackBiCoupler_v2
		model = Squad/Parts/Utility/stackCouplers/Assets/stackTriCoupler_v2
		model = Squad/Parts/Utility/stackCouplers/Assets/stackQuadCoupler
		model = Squad/Parts/Utility/stackTriCoupler/model000
		model = Squad/Spaces/GenericSpace1/model 
		model = Squad/Spaces/GenericSpace3/model 
		model = Squad/Spaces/Mk1-3/model   
		model = Squad/Spaces/Mk2CrewCabinInternal/MK2_CrewCab_Int 
		model = Squad/Spaces/Placeholder/PlaceholderIVA 
		model = Squad/Spaces/PodCockpit/model 
		model = SquadExpansion/MakingHistory/Parts/Coupling/Assets/EnginePlate 
		model = SquadExpansion/MakingHistory/Parts/Coupling/Assets/InflatableAirlock 
		model = SquadExpansion/MakingHistory/Parts/Coupling/Assets/Size1_5_Decoupler 
		model = SquadExpansion/MakingHistory/Parts/Engine/Assets/KE-1 
		model = SquadExpansion/MakingHistory/Parts/Engine/Assets/LV-T87 
		model = SquadExpansion/MakingHistory/Parts/Engine/Assets/LV-T91 
		model = SquadExpansion/MakingHistory/Parts/Engine/Assets/RE-I2 
		model = SquadExpansion/MakingHistory/Parts/Engine/Assets/RE-J10 
		model = SquadExpansion/MakingHistory/Parts/Engine/Assets/RK-7 
		model = SquadExpansion/MakingHistory/Parts/Engine/Assets/RV-1 
		model = SquadExpansion/MakingHistory/Parts/Engine/Assets/LV-T87
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/MiniMonoTank 
		model = SquadExpansion/MakingHistory/Parts/Payload/Assets/ServiceModule18 
		model = SquadExpansion/MakingHistory/Parts/Payload/Assets/ServiceModule25 
		model = SquadExpansion/MakingHistory/Parts/Payload/Assets/Size1to0ServiceModule 
		model = SquadExpansion/MakingHistory/Parts/Pods/Assets/Mk2Pod 
		model = SquadExpansion/MakingHistory/Parts/Pods/Assets/RoundPod 
		model = SquadExpansion/MakingHistory/Parts/Pods/Assets/Size1_5_Lander 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1p5x0 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1p5x1 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1p5x2 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1p5x3 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1p5x4 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1x0 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1x1 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1x2 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1x3 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud1x4 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud2x0 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud2x1 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud2x2 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud2x3 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud2x4 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud3x0 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud3x1 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud3x2 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud3x3 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud3x4 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud4x0 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud4x1 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud4x2 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud4x3 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/Shroud4x4 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/ShroudCollider0 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/ShroudCollider1 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/ShroudCollider1p5 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/ShroudCollider2 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/ShroudCollider3 
		model = SquadExpansion/MakingHistory/Parts/SharedAssets/ShroudCollider4 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/EquiTriangle0 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/EquiTriangle1 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/EquiTriangle1p5 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/EquiTriangle2 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/Panel0 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/Panel1 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/Panel1p5 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/Panel2 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/Triangle0 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/Triangle1 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/Triangle1p5 
		model = SquadExpansion/MakingHistory/Parts/Structural/Assets/Triangle2 
		model = SquadExpansion/MakingHistory/Spaces/KVPods/Airlock_IVA 
		model = SquadExpansion/MakingHistory/Spaces/KVPods/KV1_IVA 
		model = SquadExpansion/MakingHistory/Spaces/KVPods/KV2_IVA 
		model = SquadExpansion/MakingHistory/Spaces/KVPods/KV3_IVA 
		model = SquadExpansion/MakingHistory/Spaces/MEM/MEM_IVA 
		model = SquadExpansion/MakingHistory/Spaces/Mk2Pod/MK2POD_IVA 
		model = SquadExpansion/Serenity/Parts/Aero/Assets/FanShroud_01
		model = SquadExpansion/Serenity/Parts/Aero/Assets/FanShroud_02
		model = SquadExpansion/Serenity/Parts/Aero/Assets/FanShroud_03
		model = SquadExpansion/Serenity/Parts/Aero/Assets/noseconeTiny
		model = SquadExpansion/Serenity/Parts/Cargo/cargoContainer/cargoContainer
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/largeFanBlade
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/smallPropeller
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/smallHeliBlade
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/smallFanBlade
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/mediumPropeller
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/mediumHeliBlade
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/mediumFanBlade
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/largePropeller
		model = SquadExpansion/Serenity/Parts/Propellers/Assets/largeHeliBlade
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/hinge_01
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/hinge_01_s
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/hinge_03
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/hinge_03_s
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/hinge_04
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/rotor_01
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/rotor_01s
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/rotor_02
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/rotor_02s
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/rotor_03
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/rotor_03s
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/piston_01
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/piston_02
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/piston_03
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/piston_04
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/RotorEngine_02
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/RotorEngine_03
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/RotoServo_00
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/RotoServo_02
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/RotoServo_03
		model = SquadExpansion/Serenity/Parts/Robotics/Assets/RotoServo_04
		model = SquadExpansion/Serenity/Parts/Robotics/Controllers/controller1000
		model = SquadExpansion/Serenity/Parts/Science/RobotArmScanner/Assets/ROCArm_01
		model = SquadExpansion/Serenity/Parts/Science/RobotArmScanner/Assets/ROCArm_02
		model = SquadExpansion/Serenity/Parts/Science/RobotArmScanner/Assets/ROCArm_03
		model = SquadExpansion/Serenity/Parts/DeployedScience/Assets/CentralStation
		model = SquadExpansion/Serenity/Parts/DeployedScience/Assets/GoExOb
		model = SquadExpansion/Serenity/Parts/DeployedScience/Assets/IonExperiment
		model = SquadExpansion/Serenity/Parts/DeployedScience/Assets/RTGCask
		model = SquadExpansion/Serenity/Parts/DeployedScience/Assets/satDish
		model = SquadExpansion/Serenity/Parts/DeployedScience/Assets/seismicSensor
		model = SquadExpansion/Serenity/Parts/DeployedScience/Assets/solarPanel
		model = SquadExpansion/Serenity/Parts/DeployedScience/Assets/WeatherStation
		model = SquadExpansion/Serenity/Parts/Cargo/smallCargoContainer/smallCargoContainer
		model = Squad/Props/buttonsGeneric/circularButton
		model = Squad/Props/buttonsGeneric/clusterButtons
		model = Squad/Props/buttonsGeneric/clusterButtons2
		model = Squad/Props/buttonsGeneric/clusterKnob
		model = Squad/Props/buttonsGeneric/clusterKnob2
		model = Squad/Props/buttonsGeneric/clusterMixed
		model = Squad/Props/buttonsGeneric/clusterSwitches01
		model = Squad/Props/buttonsGeneric/clusterSwitches02
		model = Squad/Props/buttonsGeneric/clusterSwitches03
		model = Squad/Props/buttonsGeneric/clusterSwitches04
		model = Squad/Props/buttonsGeneric/clusterSwitches05
		model = Squad/Props/buttonsGeneric/clusterSwitches06
		model = Squad/Props/buttonsGeneric/clusterSwitches07
		model = Squad/Props/buttonsGeneric/directionalKnob
		model = Squad/Props/buttonsGeneric/directionalKnob2
		model = Squad/Props/buttonsGeneric/switch
		model = Squad/Props/buttonsGeneric/switchWithGuards
		model = Squad/Props/switchGuard/model
		model = Squad/Props/switchWithGuards/model
		model = Squad/Props/throttle/model
		model = Squad/Props/buttonsGeneric/pullSwitch
		model = Squad/Props/buttonsGeneric/squareButton
		model = Squad/Props/buttonsGeneric/standingSwitch
		model = Squad/Props/pullSwitch/model
		model = Squad/Props/switch/model
		model = Squad/Parts/Cargo/Cylinder/EVAcylinder
		model = Squad/Parts/Cargo/RepairKit/RepairKit
		model = Squad/Parts/Utility/Lights/Assets/light_02
		model = Squad/Parts/Utility/Lights/Assets/light_03
		model = Squad/Parts/Utility/Lights/Assets/light_04
		model = Squad/Parts/Utility/Lights/Assets/light_07
		model = Squad/Parts/Utility/Lights/Assets/light_08
		model = Squad/Parts/Utility/Lights/Assets/light_12
		model = Squad/Parts/Utility/rcsSmallLinear/Assets/RCSLinearSmall
		
	MATERIAL
	{
		shader = SSTU/PBR/Metallic
		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive

		excludeMesh = flagTransform
		excludeMesh = Flag
		excludeMesh = WindowFocusPoint02
		excludeMesh = WindowFocusPoint
		excludeMesh = WindowFocusPoint03
		excludeMesh = WindowFocusPoint04
		excludeMesh = WindowFocusPoint05
		excludeMesh = WindowFocusPoint06
		excludeMesh = WindowFocusPoint07
		excludeMesh = WindowFocusPoint08
		excludeMesh = SideWindow
		excludeMesh = FrontWindow 
		excludeMesh = LeftWindow
		excludeMesh = RightWindow
		excludeMesh = LeftSideWindow
		excludeMesh = RightSideWindow
		excludeMesh = EngineCore
		PROPERTY
		{
			name = _Color
			color = 1.6,1.6,1.6
		}
		PROPERTY
		{
			name = _Metal
			float = 0.85
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Detail
			float = 0.9
		}
	}
}
KSP_MODEL_SHADER
{
	name = Stock_LessMetal
	
		model = Squad/Parts/Utility/ServiceBay_v2/Assets/ServiceBay_125_v2
		model = Squad/Parts/Utility/ServiceBay_v2/Assets/ServiceBay_250_v2
		model = Squad/Parts/Utility/rockomaxAdapters/Assets/brandAdapter
		model = Squad/Parts/Utility/rockomaxAdapters/Assets/brandAdapter02
		model = Squad/Parts/Aero/protectiveRocketNoseMk7/model
		model = Squad/Parts/Aero/shuttleWings/ShuttleDeltaWing 
		model = Squad/Parts/Aero/shuttleWings/ShuttleElevonA 
		model = Squad/Parts/Aero/shuttleWings/ShuttleElevonB 
		model = Squad/Parts/Aero/shuttleWings/ShuttleRudder 
		model = Squad/Parts/Aero/shuttleWings/ShuttleStrake
		model = Squad/Parts/Aero/cones/Assets/TinyCone
		model = SquadExpansion/MakingHistory/Parts/Aero/protectiveRocketNoseMk5A/Size_1_5_Cone
		model = Squad/Parts/Aero/cones/Assets/AvioCone
		model = Squad/Parts/Aero/cones/Assets/ConeA
		model = Squad/Parts/Aero/cones/Assets/ConeB
		model = Squad/Parts/Aero/cones/Assets/NCS
		model = Squad/Parts/Aero/cones/Assets/orangeNoseCone
		model = Squad/Parts/Aero/cones/Assets/rocketNoseCone
		model = Squad/Parts/Aero/cones/Assets/rocketNoseCone_v2
		model = Squad/Parts/Aero/cones/Assets/TailA
		model = Squad/Parts/Aero/cones/Assets/TailB
		model = Squad/Parts/Aero/cones/Assets/TinyCone 
		model = SquadExpansion/Serenity/Parts/Aero/Assets/noseconeVS
		model = Squad/Parts/Structural/Size3To2Adapter/Size3Adapter 
		model = Squad/Parts/Structural/Size3To2Adapter_v2/Size2to3_v2
		model = Squad/Parts/FuelTank/fuelTankX200-16/model 
		model = Squad/Parts/FuelTank/fuelTankX200-32/model 
		model = Squad/Parts/FuelTank/fuelTankX200-8/model 
		model = Squad/Parts/Aero/aerodynamicNoseCone/model
		model = Squad/Parts/Aero/aerodynamicNoseCone/aerodynamicNoseCone
		model = Squad/Parts/Engine/jetEngines/turboJet 
		model = Squad/Parts/Engine/rapierEngine/rapier 	
		model = Squad/Parts/Engine/MassiveSRB/MassiveSRB  
		model = Squad/Parts/Engine/solidBoosterBACC/model 
		model = Squad/Parts/Engine/solidBoosterRT-10/model 
		model = Squad/Parts/Engine/solidBoosterRT-5/SRB_RT5 
		model = Squad/Parts/Engine/solidBoosterSep/model 
		model = Squad/Parts/Engine/solidBoosterS2-17/solidBoosterS2-17
		model = Squad/Parts/Engine/solidBoosterS2-33/solidBoosterS2-33
		model = Squad/Parts/Engine/solidBoosterSep/model
		model = Squad/Parts/Engine/Size1_SRBs/SRB5
		model = Squad/Parts/Engine/Size1_SRBs/SRB10
		model = Squad/Parts/Engine/SolidBoostersF/Assets/SolidBoosterFM1
		model = Squad/Parts/Engine/SolidBoostersF/Assets/SolidBoosterF3S0
		model = SquadExpansion/MakingHistory/Parts/Engine/solidBoosterTHK/solidBoosterTHK
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Size0_Adapter_01 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Size1_Adapter_01 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Size1_Adapter_02 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Size2_Adapter_01 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Tank_01 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Tank_02 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Tank_03 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Tank_04 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size1_5_Tank_05 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size_1p5_Monoprop 
		model = Squad/Parts/FuelTank/Size1_Tanks/Size1Tank_01
		model = Squad/Parts/FuelTank/Size1_Tanks/Size1Tank_02
		model = Squad/Parts/FuelTank/Size1_Tanks/Size1Tank_03
		model = Squad/Parts/FuelTank/Size1_Tanks/Size1Tank_04
		model = Squad/Parts/FuelTank/RCSFuelTankR1/RCSFuelTankR1_01 
		model = Squad/Parts/FuelTank/RCSFuelTankR10/model 
		model = Squad/Parts/FuelTank/RCSTankRadial/model
		model = Squad/Parts/FuelTank/RCSFuelTankR25/RCSFuelTankR25 
		model = Squad/Parts/FuelTank/RCStankRadialLong/model 
		model = Squad/Parts/FuelTank/RockomaxTanks/Assets/Rockomax8
		model = Squad/Parts/FuelTank/RockomaxTanks/Assets/Rockomax16
		model = Squad/Parts/FuelTank/RockomaxTanks/Assets/Rockomax32 
		model = Squad/Parts/FuelTank/RockomaxTanks/Assets/Rockomax64 
		model = Squad/Parts/FuelTank/RockomaxTanks/Assets/Rockomax64_O 
		model = Squad/Parts/FuelTank/fuelTankJumbo-64/model 
		model = Squad/Parts/FuelTank/fuelTankT100/model 
		model = Squad/Parts/FuelTank/fuelTankT200/model 
		model = Squad/Parts/FuelTank/fuelTankT400/model 
		model = Squad/Parts/FuelTank/fuelTankT800/model
		model = Squad/Parts/FuelTank/fuelTankJumbo-64/model 		
		model = Squad/Parts/Cargo/ScienceKit/ExperimentKit
		model = Squad/Parts/Cargo/StorageUnits/Assets/CargoStorageUnit
		model = Squad/Parts/Cargo/StorageUnits/Assets/ConformalStorageUnit
		model = Squad/Parts/Cargo/CargoContainers/cargoContainer
		model = Squad/Parts/Cargo/CargoContainers/smallCargoContainer
		model = Squad/Parts/Cargo/Jetpack/Jetpack
		model = Squad/Parts/Cargo/Parachute/Parachute
		model = Squad/Parts/Engine/Size3EngineCluster/Size3EngineCluster
		model = Squad/Parts/Aero/aerodynamicNoseCone/model
		model = Squad/Parts/Utility/mk2CargoBay/BayLarge 
		model = Squad/Parts/Utility/mk2CargoBay/BaySmall 
		model = Squad/Parts/Utility/mk2CrewCabin/model 		
		model = Squad/Parts/Utility/mk3CargoBay/long 
		model = Squad/Parts/Utility/mk3CargoBay/medium 
		model = Squad/Parts/Utility/mk3CargoBay/ramp 
		model = Squad/Parts/Utility/mk3CargoBay/short 
		model = Squad/Parts/FuelTank/miniFuselage/Fuselage 
		model = Squad/Parts/FuelTank/mk3Fuselage/CREW 
		model = Squad/Parts/FuelTank/mk3Fuselage/LFO_100 
		model = Squad/Parts/FuelTank/mk3Fuselage/LFO_25 
		model = Squad/Parts/FuelTank/mk3Fuselage/LFO_50 
		model = Squad/Parts/FuelTank/mk3Fuselage/LF_100 
		model = Squad/Parts/FuelTank/mk3Fuselage/LF_25 
		model = Squad/Parts/FuelTank/mk3Fuselage/LF_50 
		model = Squad/Parts/FuelTank/mk3Fuselage/MONO 		
		model = Squad/Parts/Command/cupola/model 	
		model = Squad/Parts/Command/mk1Cockpits/Cabin 
		model = Squad/Parts/Command/mk1Cockpits/CockpitInline 
		model = Squad/Parts/Command/mk1Cockpits/CockpitStandard 
		model = Squad/Parts/Command/mk2CockpitInline/model 
		model = Squad/Parts/Command/mk2CockpitStandard/model 
		model = Squad/Parts/Command/mk2DroneCore/model 
		model = Squad/Parts/Command/mk3CockpitShuttle/model 
		model = Squad/Parts/Command/mk1pod/model 
		model = Squad/Parts/Command/mk1pod_v2/Mk1Pod_v2
		model = Squad/Parts/FuelTank/adapterTanks/Mk3-Mk2 
		model = Squad/Parts/FuelTank/adapterTanks/Mk3-Size2 
		model = Squad/Parts/FuelTank/adapterTanks/Mk3-Size2Slant 
		model = Squad/Parts/FuelTank/adapterTanks/ShuttleAdapter
		model = Squad/Parts/FuelTank/drainTankFTE-1/fuelValve
		model = Squad/Parts/FuelTank/adapterTanks/Size2-Mk2 
		model = Squad/Parts/FuelTank/adapterTanks/Size2-Size1 
		model = Squad/Parts/FuelTank/adapterTanks/Size2-Size1Slant 
		model = Squad/Parts/FuelTank/adapterTanks/Size3-Mk3 	
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size3_Size4_Adapter_01 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size4_EngineAdapter_01 		
		model = Squad/Parts/Aero/intakeRadialLong/IntakeRadial 
		model = Squad/Parts/Aero/miniIntake/SmallIntake 
		model = Squad/Parts/Aero/cones/Assets/TinyCone
		model = Squad/Parts/Aero/airbrake/Airbrake 
		model = Squad/Parts/Aero/airIntakeRadialXM-G50/RadialIntake 
		model = Squad/Parts/Aero/airlinerWings/ControlSurface 
		model = Squad/Parts/Aero/airlinerWings/MainWing 
		model = Squad/Parts/Aero/airlinerWings/TailFin 
		model = Squad/Parts/Aero/airplaneFins/AdvCanard 
		model = Squad/Parts/Aero/airplaneFins/Canard 
		model = Squad/Parts/Aero/airplaneFins/Swept 
		model = Squad/Parts/Aero/airplaneFins/TailFin  
		model = Squad/Parts/Aero/ramAirIntake/RampIntake 		
		model = Squad/Parts/Utility/RelayAntennas/RA-100 
		model = Squad/Parts/Utility/RelayAntennas/RA-5 
		model = Squad/Parts/Utility/RelayAntennas/RA-50 		
		model = Squad/Parts/Command/hitchhikerStorageContainer/model 		
		model = Squad/Parts/Science/LargeCrewedLab/large_crewed_lab 	
		model = Squad/Parts/Engine/jetEngines/turbineInside 
		model = Squad/Parts/Engine/jetEngines/turboFanSize1 
		model = Squad/Parts/Engine/jetEngines/turboFanSize2 	
		model = Squad/Parts/Engine/miniJet/SmallJet		
		model = Squad/Parts/Structural/mk1Parts/Fuselage 
		model = Squad/Parts/Structural/mk1Parts/IntakeFuselage 
		model = Squad/Parts/Structural/mk1Parts/Nacelle1 
		model = Squad/Parts/Structural/mk1Parts/Nacelle2 
		model = Squad/Parts/Structural/mk1Parts/Structural 
		model = Squad/Parts/Structural/mk1Parts/StructuralHollow 	
		model = Squad/Parts/FuelTank/mk2FuselageLong/FuselageLongLiquid
		model = Squad/Parts/FuelTank/mk2Adapters/bicoupler 
		model = Squad/Parts/FuelTank/mk2Adapters/long 
		model = Squad/Parts/FuelTank/mk2Adapters/standard 
		model = Squad/Parts/FuelTank/mk2FuselageLong/FuselageLongLFO 
		model = Squad/Parts/FuelTank/mk2FuselageLong/FuselageLongLiquid 
		model = Squad/Parts/FuelTank/mk2FuselageShort/FuselageShortLFO 
		model = Squad/Parts/FuelTank/mk2FuselageShort/FuselageShortLiquid 
		model = Squad/Parts/FuelTank/mk2FuselageShort/FuselageShortMono 
		model = Squad/Parts/FuelTank/mk2FuselageLong/FuselageLongLFO
		model = Squad/Parts/FuelTank/mk2FuselageShort/FuselageShortLiquid
		model = Squad/Parts/FuelTank/mk2FuselageShort/FuselageShortLFO
		model = Squad/Parts/FuelTank/mk2FuselageShort/FuselageShortMono
		model = Squad/Parts/FuelTank/Size3Tanks/Size3LargeTank 
		model = Squad/Parts/FuelTank/Size3Tanks/Size3MediumTank 
		model = Squad/Parts/FuelTank/Size3Tanks/Size3SmallTank
		model = Squad/Parts/Aero/circularIntake/CircularIntake 
		model = Squad/Parts/Aero/circularIntake/ConeIntake 
		model = Squad/Parts/Aero/wingletAV-R8/model 
		model = Squad/Parts/Aero/wingletAV-T1/model 
		model = Squad/Parts/Aero/wingletDeltaDeluxe/model 
		model = Squad/Parts/Aero/wings/connector1 
		model = Squad/Parts/Aero/wings/connector2 
		model = Squad/Parts/Aero/wings/connector3 
		model = Squad/Parts/Aero/wings/connector4 
		model = Squad/Parts/Aero/wings/connector5 
		model = Squad/Parts/Aero/wings/delta 
		model = Squad/Parts/Aero/wings/delta_small 
		model = Squad/Parts/Aero/wings/elevon1 
		model = Squad/Parts/Aero/wings/elevon2 
		model = Squad/Parts/Aero/wings/elevon3 
		model = Squad/Parts/Aero/wings/elevon4 
		model = Squad/Parts/Aero/wings/elevon5 
		model = Squad/Parts/Aero/wings/strake 
		model = Squad/Parts/Aero/wings/structural1 
		model = Squad/Parts/Aero/wings/structural2 
		model = Squad/Parts/Aero/wings/structural3 
		model = Squad/Parts/Aero/wings/structural4 
		model = Squad/Parts/Aero/wings/swept1 
		model = Squad/Parts/Aero/wings/swept2 
		model = Squad/Parts/Utility/mk2DockingPort/model
		model = Squad/Parts/Aero/cones/Assets/TailA
		model = Squad/Parts/Aero/cones/Assets/TailB
		model = Squad/Parts/Command/Mk1-3Pod/Mk1-3 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size4_Tank_01 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size4_Tank_02 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size4_Tank_03 
		model = SquadExpansion/MakingHistory/Parts/FuelTank/Assets/Size4_Tank_04 
		model = Squad/Props/PropsGeneric/CargoBagA
		model = Squad/Props/PropsGeneric/CargoBagB
		model = Squad/Props/PropsGeneric/CargoBagC
		model = Squad/Props/PropsGeneric/Hatch_Plane
		model = Squad/Props/PropsGeneric/Hatch_Plane_Curve90
		model = Squad/Props/PropsGeneric/Hatch_Plane_Frame
		model = Squad/Props/PropsGeneric/Seat_Passenger
		model = Squad/Props/PropsGeneric/Seat_Pilot
		model = Squad/Props/PropsGeneric/Seat_Pilot_Helmet
		model = Squad/Props/PropsGeneric/SideStick

	MATERIAL
	{
		shader = SSTU/PBR/Metallic
		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive

		excludeMesh = flagTransform
		excludeMesh = Flag
		excludeMesh = WindowFocusPoint02
		excludeMesh = WindowFocusPoint
		excludeMesh = WindowFocusPoint03
		excludeMesh = WindowFocusPoint04
		excludeMesh = WindowFocusPoint05
		excludeMesh = WindowFocusPoint06
		excludeMesh = WindowFocusPoint07
		excludeMesh = WindowFocusPoint08
		excludeMesh = SideWindow
		excludeMesh = FrontWindow 
		excludeMesh = LeftWindow
		excludeMesh = RightWindow
		excludeMesh = LeftSideWindow
		excludeMesh = RightSideWindow
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
		PROPERTY
		{
			name = _Metal
			float = 0.25
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.70
		}
		PROPERTY
		{
			name = _Detail
			float = 0.75
		}
	}
}	


KSP_MODEL_SHADER
{
	name = Bronze
		
		//REOMMENDED
		//Delete from other sections and remove dashes to enable
		
		//model = Squad/Props/buttonsGeneric/circularButton
		//model = Squad/Props/buttonsGeneric/clusterButtons
		//model = Squad/Props/buttonsGeneric/clusterButtons2
		//model = Squad/Props/buttonsGeneric/clusterKnob
		//model = Squad/Props/buttonsGeneric/clusterKnob2
		//model = Squad/Props/buttonsGeneric/clusterMixed
		//model = Squad/Props/buttonsGeneric/clusterSwitches01
		//model = Squad/Props/buttonsGeneric/clusterSwitches02
		//model = Squad/Props/buttonsGeneric/clusterSwitches03
		//model = Squad/Props/buttonsGeneric/clusterSwitches04
		//model = Squad/Props/buttonsGeneric/clusterSwitches05
		//model = Squad/Props/buttonsGeneric/clusterSwitches06
		//model = Squad/Props/buttonsGeneric/clusterSwitches07
		//model = Squad/Props/buttonsGeneric/directionalKnob
		//model = Squad/Props/buttonsGeneric/directionalKnob2
		//model = Squad/Props/buttonsGeneric/switch
		//model = Squad/Props/buttonsGeneric/switchWithGuards
		//model = SquadExpansion/MakingHistory/Parts/Pods/Assets/RoundPod
		//model = Squad/Parts/Electrical/gigantorXlSolarArray/model 
		//model = Squad/Parts/Utility/decouplerRadialHDM/model 
		//model = Squad/Parts/Utility/decouplerRadialTT-38K/model 
		//model = Squad/Parts/Utility/decouplerRadialTT-70/model 
		//model = Squad/Parts/Utility/decouplerSeparatorTR-18D/model 
		//model = Squad/Parts/Utility/decouplerSeparatorTR-2C/model 
		//model = Squad/Parts/Utility/decouplerSeparatorTR-XL/model 
		//model = Squad/Parts/Utility/decouplerStack2m/model 
		//model = Squad/Parts/Utility/decouplerStackTR-18A/model 
		//model = Squad/Parts/Utility/decouplerStackTR-2V/model 

		
	MATERIAL
	{
		shader = SSTU/PBR/Metallic
		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = flagTransform
		excludeMesh = Flag
		excludeMesh = SideWindow
		excludeMesh = FrontWindow 
		excludeMesh = LeftWindow
		excludeMesh = RightWindow
		excludeMesh = LeftSideWindow
		excludeMesh = RightSideWindow

		PROPERTY
		{
			name = _Metal
			float = 0.85
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Detail
			float = 0.85
		}
		PROPERTY
		{
			name = _Shininess
			float = 0.85
		}
		PROPERTY
		{
		  name = _Color
		  color = 1.74, 1.58, 1.38, 1
		}
	}
}
//// Color Numbers = R, G, B, A

KSP_MODEL_SHADER
{
	name = Stock_FullMetal
	
		model = Squad/Props/AltimeterThreeHands/model
		model = Squad/Props/AtmosphereDepth/model
		model = Squad/Props/AxisIndicator/model
		model = Squad/Props/ButtonSquare/model
		model = Squad/Props/circularButton/model
		model = Squad/Props/Compass/model
		model = Squad/Props/directionalKnob/model
		model = Squad/Props/directionalKnob2/model
		model = Squad/Props/IndicatorPanel/model
		model = Squad/Props/ledPanelSpeed/model
		model = Squad/Props/Monitor/MonitorDockingMode
		model = Squad/Props/PropsGeneric/Button_DockingMode
		model = Squad/Props/radarAltitude/model
		model = Squad/Props/squareButton/model
		model = Squad/Props/standingSwitch/model
		model = Squad/Props/VSI/model
		model = Squad/Props/NavBall/model

	MATERIAL
	{
		shader = SSTU/PBR/Metallic
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = flagTransform
		excludeMesh = Flag
		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Detail
			float = 0.75
		}
		PROPERTY
		{
			name = _Shininess
			float = 0.85
		}
		PROPERTY
		{
			name = _BacklightClamp
			float = 0.45
		}
		PROPERTY
		{
			name = _Color
			color = 1.5,1.5,1.5
		}
	}
}
KSP_MODEL_SHADER
{
	name = Stock_Wheels
		model = Squad/Parts/Wheel/roverWheelS2/model  
		model = Squad/Parts/Wheel/roverWheelTR-2L/model
		model = Squad/Parts/Wheel/roverWheelXL3/model
		model = Squad/Parts/Wheel/roverWheelM1/model
		model = SquadExpansion/MakingHistory/Parts/Ground/Assets/RoverWheel 
		
	MATERIAL
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = wheel
		excludeMesh = obj_wheel
		excludeMesh = flagTransform
		excludeMesh = Flag
		excludeMesh = Tire
		mesh = MotorMesh
		mesh = obj_bracket
		mesh = obj_mount
		mesh = bracket
		mesh = susp1-1
		mesh = susp2-1
		mesh = clamp
		mesh = suspensionBase
		mesh = susp1-2
		mesh = susp2-2
		mesh = susp3-2
		mesh = susp2-1
		mesh = susp1-1
		mesh = susp3-1
		mesh = susp2
		mesh = vertical
		mesh = susp1
		mesh = bracket
		
		PROPERTY
		{
			name = _Metal
			float = 0.70
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.70
		}
		PROPERTY
		{
			name = _Detail
			float = 0.75
		}
		PROPERTY
		{
			name = _Shininess
			float = 0.85
		}
		PROPERTY
		{
			name = _Color
			color = 1.8,1.8,1.8
		}
	}
}
KSP_MODEL_SHADER
{
	name = Stock_LandingGear
		
		model = Squad/Parts/Wheel/LandingGear/GearExtraLarge
		model = Squad/Parts/Wheel/LandingGear/GearFixed
		model = Squad/Parts/Wheel/LandingGear/GearFree
		model = Squad/Parts/Wheel/LandingGear/GearLarge
		model = Squad/Parts/Wheel/LandingGear/GearMedium
		model = Squad/Parts/Wheel/LandingGear/GearSmall
		
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = wheels1
		excludeMesh = Flare
		excludeMesh = flare
		excludeMesh = Tire
		excludeMesh = Wheel
		excludeMesh = wheel
		excludemesh = wheel 7
		excludemesh = wheel 8
		excludemesh = w1
		excludemesh = w2
		excludemesh = w3
		excludemesh = w4
		excludemesh = w5
		excludemesh = w6
		mesh = WheelRetract
		mesh = Damper
		mesh = link
		mesh = PistonExtend
		mesh = Mesh
		mesh = rod
		mesh = prong
		mesh = WheelBogey
		mesh = Lamp
		mesh = BrakeIndicator
		
		PROPERTY
		{
			name = _Metal
			float = 0.65
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.70
		}
		PROPERTY
		{
			name = _Detail
			float = 0.75
		}
		PROPERTY
		{
			name = _Shininess
			float = 0.85
		}
		PROPERTY
		{
			name = _Color
			color = 1.5,1.5,1.5
		}
	}
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = wheels1
		excludeMesh = Flare
		excludeMesh = flare
		excludeMesh = Tire
		mesh = Base
		mesh = BayDoor1
		mesh = BayDoor2
		
		
		PROPERTY
		{
			name = _Metal
			float = 0.45
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Detail
			float = 0.75
		}
		PROPERTY
		{
			name = _Shininess
			float = 0.90
		}
		PROPERTY
		{
			name = _Color
			color = 1.5,1.5,1.5
		}
	}
}
KSP_MODEL_SHADER
{
	name = Stock_Partial
	model = Squad/Parts/Resources/RadialTank/RadialOreTank
	model = Squad/Parts/Electrical/z-100Battery/model
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		mesh = rung
		mesh = ksp_s_resourceContainer_fbx
		mesh = battery
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Detail
			float = 1
		}
	}
	
}

KSP_MODEL_SHADER
{
	name = Stock_SolarPanels
	model = Squad/Parts/Electrical/1x6SolarPanels/model
	model = Squad/Parts/Electrical/3x2SolarPanels/model
	model = Squad/Parts/Electrical/gigantorXlSolarArray/model
	model = Squad/Parts/Electrical/radialFlatSolarPanel/model
	model = Squad/Parts/Misc/AsteroidDay/LgRadialSolar
	MATERIAL
	{
		shader = SSTU/PBR/Metallic
		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive

		mesh = base
		mesh = mount
		mesh = panelbase
		mesh = panelcap
		mesh = clamp
		mesh = rotator
		mesh = panel_001
		mesh = panel_002

		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Detail
			float = 1
		}
		PROPERTY
		{
			name = _Color
			color = 1.8,1.8,1.8
		}
	}
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = mount
		excludeMesh = panelbase
		excludeMesh = panelcap
		excludeMesh = base
		excludeMesh = door
		excludeMesh = clamp
		excludeMesh = rotator
		excludeMesh = panel_001
		excludeMesh = panel_002
		PROPERTY
		{
			name = _Metal
			float = 0.24
		}
		PROPERTY
		{
			name = _Smoothness
			float = 1.0
		}
		PROPERTY
		{
			name = _Color
			color = 1.8,1.8,1.8
		}
	}
}
KSP_MODEL_SHADER
{
	name = Stock_SolarPanelsShrouded
	model = Squad/Parts/Electrical/1x6ShroudSolarPanels/model
	model = Squad/Parts/Electrical/3x2ShroudSolarPanels/model

	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		mesh = mount
		mesh = panelbase
		mesh = panelcap
		mesh = clamp
		mesh = rotator
		mesh = panel_001
		mesh = panel_002
		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.8,1.8,1.8
		}
	}

	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = mount
		excludeMesh = panelbase
		excludeMesh = panelcap
		excludeMesh = base
		excludeMesh = door
		excludeMesh = clamp
		excludeMesh = rotator
		excludeMesh = panel_001
		excludeMesh = panel_002
		PROPERTY
		{
			name = _Metal
			float = 0.0
		}
		PROPERTY
		{
			name = _Smoothness
			float = 1.0
		}
	}
}
KSP_MODEL_SHADER
{
	name = Stock_Comm
	model = Squad/Parts/Utility/commDish88-88/model
	model = Squad/Parts/Utility/commsAntennaDTS-M1/mediumDishAntenna
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive	
		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.8,1.8,1.8
		}
	}
}
KSP_MODEL_SHADER
{
	name = Stock_Radiators
	model = Squad/Parts/Thermal/RadiatorPanels/radPanelEdge
	model = Squad/Parts/Thermal/RadiatorPanels/radPanelSm
	model = Squad/Parts/Thermal/RadiatorPanels/radPanelLg
	model = Squad/Parts/Thermal/FoldingRadiators/foldingRadSmall
	model = Squad/Parts/Thermal/FoldingRadiators/foldingRadMed
	model = Squad/Parts/Thermal/FoldingRadiators/foldingRadLarge
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		PROPERTY
		{
			name = _Metal
			float = 0.85
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.6,1.6,1.6
		}
	}
}

KSP_MODEL_SHADER
{
	name = Stock_InflatableHeatShield
	model = Squad/Parts/Aero/InflatableHeatShield/HeatShield
	MATERIAL
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
	}
}



KSP_MODEL_SHADER
{
	name = Stock_FuelLine
	model = Squad/Parts/CompoundParts/fuelLine/model
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic
		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		mesh = anchor-Pivot
		mesh = obj_anchorCap_pivot
		mesh = obj_targetAnchor-Pivot
		mesh = obj_targetCap-Pivot
		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
	}
}

KSP_MODEL_SHADER
{
	name = Stock_ShieldedDockingPort
	model = Squad/Parts/Utility/dockingPortShielded/model

	MATERIAL // Metal
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		PROPERTY
		{
			name = _Metal
			float = 0.45
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
	}
}

KSP_MODEL_SHADER
{
	name = Stock_Mk1InlineDockingPort
	model = Squad/Parts/Utility/dockingPortInline/model
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = housing
		excludeMesh = door1
		excludeMesh = door2
		PROPERTY
		{
			name = _Metal
			float = 0.45
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
	}
	MATERIAL
	{
		shader = SSTU/PBR/Metallic	
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		mesh = housing
		mesh = door1
		mesh = door2
		PROPERTY
		{
			name = _Metal
			float = 0.35
		}
		PROPERTY
		{
			name = _Smoothness
			float = 1.0
		}
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
	}
}

KSP_MODEL_SHADER
{
	name = Stock_Grappler
	model = Squad/Parts/Utility/GrapplingDevice/GrapplingArm
	model = Squad/Parts/Utility/smallClaw/smallClaw
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = flagTransform
		excludeMesh = OuterSleeve1
		excludeMesh = OuterSleeve2
		excludeMesh = OuterSleeve3
		excludeMesh = OuterSleeve4
		excludeMesh = FoldingCap1
		excludeMesh = FoldingCap2
		excludeMesh = FoldingCap3
		excludeMesh = FoldingCap4
		excludeMesh = FoldingCap5
		excludeMesh = FoldingCap6
		excludeMesh = FoldingCap7
		excludeMesh = FoldingCap8
		excludeMesh = FoldingCap9
		excludeMesh = FoldingCap10
		excludeMesh = FoldingCap11
		excludeMesh = FoldingCap12
		excludeMesh = FoldingCap13
		excludeMesh = FoldingCap14
		excludeMesh = FoldingCap15
		excludeMesh = FoldingCap16
		excludeMesh = FoldingCap17
		excludeMesh = FoldingCap18
		excludeMesh = FoldingCap19
		excludeMesh = FoldingCap20
		excludeMesh = Sleeve1
		excludeMesh = Sleeve2
		excludeMesh = Sleeve3
		excludeMesh = Sleeve4
		excludeMesh = BaseSleeve1
		
		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
	}
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		Mesh = flagTransform
		Mesh = OuterSleeve1
		Mesh = OuterSleeve2
		Mesh = OuterSleeve3
		Mesh = OuterSleeve4
		Mesh = FoldingCap1
		Mesh = FoldingCap2
		Mesh = FoldingCap3
		Mesh = FoldingCap4
		Mesh = FoldingCap5
		Mesh = FoldingCap6
		Mesh = FoldingCap7
		Mesh = FoldingCap8
		Mesh = FoldingCap9
		Mesh = FoldingCap10
		Mesh = FoldingCap11
		Mesh = FoldingCap12
		Mesh = FoldingCap13
		Mesh = FoldingCap14
		Mesh = FoldingCap15
		Mesh = FoldingCap16
		Mesh = FoldingCap17
		Mesh = FoldingCap18
		Mesh = FoldingCap19
		Mesh = FoldingCap20
		Mesh = Sleeve1
		Mesh = Sleeve2
		Mesh = Sleeve3
		Mesh = Sleeve4
		Mesh = BaseSleeve1
		
		PROPERTY
		{
			name = _Metal
			float = 0.45
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
	}
}

KSP_MODEL_SHADER
{
	name = Stock_Engine_J90
	model = Squad/Parts/Engine/jetEngines/turboFanSize2
	MATERIAL
	{
		shader = SSTU/PBR/Metallic
		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive

		mesh = FanCone
		mesh = FanBlades

		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
	}
}

KSP_MODEL_SHADER
{
	name = Stock_Engine_VectorClusters
	model = Squad/Parts/Engine/Size2LFB/Size2LFB
	model = Squad/Parts/Engine/Size3EngineCluster/Size3EngineCluster
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		mesh = Nozzle1
		mesh = Nozzle2
		mesh = Nozzle3
		mesh = Nozzle4
		PROPERTY
		{
			name = _Metal
			float = 0.75
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
	}
}
KSP_MODEL_SHADER
{
	name = Stock_Parchutes
	
		model = Squad/Parts/Utility/parachuteMk1/model
		model = Squad/Parts/Utility/parachuteMk12-R/model
		model = Squad/Parts/Utility/parachuteMk16-XL/model
		model = Squad/Parts/Utility/parachuteMk2-R/model
		model = Squad/Parts/Utility/parachuteMk25/model
	MATERIAL 
	{
		shader = SSTU/PBR/Metallic		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		mesh = cap
		mesh = base
		mesh = Shroud
		excludeMesh = canopy

		PROPERTY
		{
			name = _Metal
			float = 0.25
		}
		PROPERTY
		{
			name = _Smoothness
			float = 0.75
		}
		PROPERTY
		{
			name = _Color
			color = 1.2,1.2,1.2
		}
	}
}

KSP_MODEL_SHADER
{
	name = Stock_NoMetal
	MATERIAL 
	{
		shader = SSTU/PBR/StockMetallicBumped		
		inheritTexture = _MainTex
		inheritTexture = _BumpMap
		inheritTexture = _Emissive
		excludeMesh = flagTransform
		excludeMesh = FLAG
		PROPERTY
		{
			name = _Metal
			float = 0.0
		}
	}
}

 

 

I need to be able to change a single line change line 587 from this:          

model = Squad/Parts/Utility/mk2DockingPort/model

        to this:            

model = Squad/Parts/Utility/mk2DockingPort/mk2Dockingport

Can anyone help me with this?

Thanks in advance

LGG

Link to comment
Share on other sites

@linuxgurugamer This will work. Target the instance number of the key for the edit:

@KSP_MODEL_SHADER[Stock_LessMetal]
{
	@model,189 = Squad/Parts/Utility/mk2DockingPort/mk2Dockingport
}

You may need to count for yourself and make absolutely sure.

Spoiler

(For those not in the know, select from the first line that has this model key, down to the line of the key you want to edit, see in the text editor the number of lines selected, then subtract 1 because you're counting from 0, not 1. Can't do this in MS Notepad :P )

 

Link to comment
Share on other sites

1 hour ago, JadeOfMaar said:

@linuxgurugamer This will work. Target the instance number of the key for the edit:

@KSP_MODEL_SHADER[Stock_LessMetal]
{
	@model,189 = Squad/Parts/Utility/mk2DockingPort/mk2Dockingport
}

You may need to count for yourself and make absolutely sure.

  Hide contents

(For those not in the know, select from the first line that has this model key, down to the line of the key you want to edit, see in the text editor the number of lines selected, then subtract 1 because you're counting from 0, not 1. Can't do this in MS Notepad :P )

 

Thanks.  

Is there any way to replace a specific value?  I'm just a bit concerned that the file may change (ie:  more lines added/removed/etc)

Edit:  The mod in question (Magpie Mods), probably won't, so my question is for any other mods

Edited by linuxgurugamer
Link to comment
Share on other sites

On 5/18/2023 at 8:29 AM, Lisias said:

I remember a setting calling Affinity in which you tell Windows to use only a subset of the threads for a process.

Intel's Thread Director tech and the windows scheduler should do that automatically.  If he's using Linux, it's more iffy, not sure how support for that chip is there.

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