MacLuky 617 Posted May 10, 2020 Share Posted May 10, 2020 Strange, this works, editing the source file to this works, but if I want to change the name to Red, or Duna it flips back to Dark VARIANT { name = Silver displayName = #autoLOC_6005005 themeName = Silver primaryColor = #cecece TEXTURE { shader=KSP/Bumped Specular (Mapped) mainTextureURL = PATCH_LIB/duna_temple/red //mainTextureURL = SquadExpansion/MakingHistory/Parts/Structural/Assets/Panels_Silver_D //color = #ffffff color = #943828 _BumpMap=SquadExpansion/MakingHistory/Parts/Structural/Assets/Panels_Gold_NRM _SpecMap=SquadExpansion/MakingHistory/Parts/Structural/Assets/Panels_Silver_S // _Shininess= 0.35 // _Opacity= 1.0 // _RimFalloff= 2.0 // _AmbientMultiplier= 0.2 } } Quote Link to post Share on other sites
Electrocutor 650 Posted May 12, 2020 Author Share Posted May 12, 2020 (edited) On 5/10/2020 at 12:45 PM, MacLuky said: Okay, I got this far: @PART[Panel0|Panel1|Panel1p5|Panel2|Triangle0|Triangle1|Triangle1p5|Triangle2|EquiTriangle0|EquiTriangle1|EquiTriangle1p5|EquiTriangle2] { @MODULE[ModulePartVariants] { +VARIANT { name = Duna displayName = Duna themeName = Duna primaryColor = #cc0000 TEXTURE { shader=KSP/Bumped Specular (Mapped) mainTextureURL = PATCH_LIB/duna_temple/red color = #943828 _BumpMap=SquadExpansion/MakingHistory/Parts/Structural/Assets/Panels_Gold_NRM _SpecMap=SquadExpansion/MakingHistory/Parts/Structural/Assets/Panels_Gold_S } } } } The panels do show up in the VAB in red but the variant in the slider is still called Dark. As I launch the craft it reverts back to dark grey.... Not sure where I make a mistake. Anyone that can help? I checked the .craft file there it also lists the selectedVariant as Dark. So why isn't the name of the variant "Duna" @Electrocutor do you have an idea? +VARIANT is copy syntax for MM; you just want to use VARIANT if you want to add your own without copying an existing one. If you start with a copy, you'll need to use the @ syntax for editing an existing property instead (like @name = Duna). Edited May 12, 2020 by Electrocutor Quote Link to post Share on other sites
MacLuky 617 Posted May 12, 2020 Share Posted May 12, 2020 I am an idiot, thanks for pointing that out! Quote Link to post Share on other sites
hemeac 496 Posted November 30, 2020 Share Posted November 30, 2020 (edited) @Electrocutor, thanks for this guide! Panzer1b has released some textures, "Repaint" which provides a dark variant to some of the stock aero parts. I thought I would try making some variants for the Mk2/3 Expansion mods as they use the stock textures. The issue that I've come across is that each part uses a lot of different textures Spoiler MODEL { model = Mk2Expansion/Parts/Command/Raven/Model texture = Cockpit, Squad/Parts/Command/mk2CockpitStandard/Cockpit texture = Cockpit_inline_A, Squad/Parts/Command/mk2CockpitInline/Cockpit_inline_A texture = Cockpit_inline_Emissive, Squad/Parts/Command/mk2CockpitInline/Cockpit_inline_Emissive texture = mk2adapters1m, Squad/Parts/FuelTank/mk2Adapters/mk2adapters1m texture = Flag, Mk2Expansion/Parts/Command/Angler/Flag } and materials Spoiler [LOG 17:43:04.334] [DebugStuff] +M2X.RavenCockpit T:Untagged L:0 (Default) | Transform - M2X.RavenCockpit | - Position (0.0000, 15.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | Part - M2X.RavenCockpit | Highlighter - M2X.RavenCockpit | ModuleCommand - M2X.RavenCockpit | ModuleReactionWheel - M2X.RavenCockpit | ModuleLiftingSurface - M2X.RavenCockpit | ModuleScienceExperiment - M2X.RavenCockpit | ModuleScienceContainer - M2X.RavenCockpit | ModuleAnimateGeneric - M2X.RavenCockpit | ModuleDataTransmitter - M2X.RavenCockpit | FlagDecal - M2X.RavenCockpit | ModuleB9PartSwitch - M2X.RavenCockpit | ModuleB9PartSwitch - M2X.RavenCockpit | ModuleB9PartSwitch - M2X.RavenCockpit | ModuleB9PartInfo - M2X.RavenCockpit | ModuleTripLogger - M2X.RavenCockpit | AudioSource - M2X.RavenCockpit | Rigidbody - M2X.RavenCockpit | |--+model T:Untagged L:0 (Default) | | Transform - model | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | |--+Mk2Expansion/Parts/Command/Raven/Model(Clone) T:Untagged L:0 (Default) | | | Transform - Mk2Expansion/Parts/Command/Raven/Model(Clone) | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | | --+Blackbird_cockpitMkII T:Untagged L:0 (Default) | | | Transform - Blackbird_cockpitMkII | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | Animation - Blackbird_cockpitMkII | | | Playing Automatically: True - Wrap Mode: Default - Clip Count: 1 | | | Clips: 0 - WindowGlow | | | | | | --+Cockpit T:Untagged L:0 (Default) | | | Transform - Cockpit | | | - Position (0.0000, -0.4532, 0.0000) - Rotation: (270.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - Cockpit | | | MeshRenderer - Cockpit | | | | | |---CrewCompartment T:Untagged L:0 (Default) | | | Transform - CrewCompartment | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - CrewCompartment | | | MeshRenderer - CrewCompartment | | | | | |---FLAG T:Untagged L:0 (Default) | | | Transform - FLAG | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - FLAG | | | MeshRenderer - FLAG | | | | | |---Raven_005 T:Untagged L:0 (Default) | | | Transform - Raven_005 | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - Raven_005 | | | MeshRenderer - Raven_005 | | | | | |---Raven_COL T:Untagged L:0 (Default) | | | Transform - Raven_COL | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshCollider - Raven_COL | | | Convex: True | | | MeshFilter - Raven_COL | | | | | |--+Raven_COL T:Untagged L:0 (Default) | | | | Transform - Raven_COL | | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | MeshCollider - Raven_COL | | | | Convex: True | | | | MeshFilter - Raven_COL | | | | | | | |---Airlock T:Airlock L:21 (Part Triggers) | | | | Transform - Airlock | | | | - Position (0.0000, 1.1252, -0.2658) - Rotation: (80.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | CapsuleCollider - Airlock | | | | Center: (0.0, 0.0, 0.0) - Radius: 0.25 - Height: 1 - Direction: 1 | | | | | | | |---Airlock T:Airlock L:21 (Part Triggers) | | | | Transform - Airlock | | | | - Position (0.0000, 0.0651, -1.2568) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | CapsuleCollider - Airlock | | | | Center: (0.0, 0.0, 0.0) - Radius: 0.25 - Height: 1 - Direction: 1 | | | | | | | |---Ladder T:Ladder L:21 (Part Triggers) | | | | Transform - Ladder | | | | - Position (0.0000, 1.0850, -0.2313) - Rotation: (80.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | CapsuleCollider - Ladder | | | | Center: (0.0, 0.0, 0.0) - Radius: 0.18 - Height: 1 - Direction: 1 | | | | | | | ---Ladder T:Ladder L:21 (Part Triggers) | | | Transform - Ladder | | | - Position (0.0000, 0.0248, -1.2223) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | CapsuleCollider - Ladder | | | Center: (0.0, 0.0, 0.0) - Radius: 0.18 - Height: 1 - Direction: 1 | | | | | --+Windows T:Untagged L:0 (Default) | | | Transform - Windows | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - Windows | | | MeshRenderer - Windows | | | | | |---WindowLightR T:Untagged L:0 (Default) | | | Transform - WindowLightR | | | - Position (-0.3836, 0.8206, 0.5022) - Rotation: (90.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | Light - WindowLightR | | | Range: 0 - Spot Angle: 30 - CookieSize: 10 - CullingMask: -1 | | | ShadowNearPlane: 0.2 - ShadowNormalBias: 0.4 - ShadowCustomResolution: -1 - ShadowBias: 0.05 | | | Color: RGBA(1.000, 0.992, 0.728, 1.000) - ColorTemp: 6570 - Intensity: 1 - Type: Point | | | Shadows: None - ShadowStrength: 1 - ShadowResolution: FromQualitySettings - BounceIntensity: 1 | | | | | |---WindowLightL T:Untagged L:0 (Default) | | | Transform - WindowLightL | | | - Position (0.3836, 0.8206, 0.5022) - Rotation: (90.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | Light - WindowLightL | | | Range: 0 - Spot Angle: 30 - CookieSize: 10 - CullingMask: -1 | | | ShadowNearPlane: 0.2 - ShadowNormalBias: 0.4 - ShadowCustomResolution: -1 - ShadowBias: 0.05 | | | Color: RGBA(1.000, 0.992, 0.728, 1.000) - ColorTemp: 6570 - Intensity: 1 - Type: Point | | | Shadows: None - ShadowStrength: 1 - ShadowResolution: FromQualitySettings - BounceIntensity: 1 | | | | | ---WindowLightF T:Untagged L:0 (Default) | | Transform - WindowLightF | | - Position (0.0000, 0.9260, 1.2788) - Rotation: (90.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | Light - WindowLightF | | Range: 0 - Spot Angle: 30 - CookieSize: 10 - CullingMask: -1 | | ShadowNearPlane: 0.2 - ShadowNormalBias: 0.4 - ShadowCustomResolution: -1 - ShadowBias: 0.05 | | Color: RGBA(1.000, 0.992, 0.728, 1.000) - ColorTemp: 6570 - Intensity: 1 - Type: Point | | Shadows: None - ShadowStrength: 1 - ShadowResolution: FromQualitySettings - BounceIntensity: 1 | | | ---Surface Attach Collider T:Untagged L:0 (Default) | Transform - Surface Attach Collider | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | SphereCollider - Surface Attach Collider | Center: (0.0, 0.0, 0.0) - Radius: 0.05 | ---_default T:Untagged L:0 (Default) Transform - _default - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) I have been able to use your guide to create a variant, but it seems to be trial and error on what texture matches to which material. Do you have any suggestions on how to make a more educated guess? If not, think I will survive just making duplicate parts. Edit: I was able to get the import .mu files into Blender via the tool on the forum. That appeared to have helped to help show the link between materials and the texture files, but after testing could only get some of the textures to convert. I think I'll shelve this for now until I find easier examples as I have successfully made duplicate parts. Edited November 30, 2020 by hemeac Quote Link to post Share on other sites
Electrocutor 650 Posted 2 hours ago Author Share Posted 2 hours ago On 11/30/2020 at 1:27 AM, hemeac said: @Electrocutor, thanks for this guide! Panzer1b has released some textures, "Repaint" which provides a dark variant to some of the stock aero parts. I thought I would try making some variants for the Mk2/3 Expansion mods as they use the stock textures. The issue that I've come across is that each part uses a lot of different textures Reveal hidden contents MODEL { model = Mk2Expansion/Parts/Command/Raven/Model texture = Cockpit, Squad/Parts/Command/mk2CockpitStandard/Cockpit texture = Cockpit_inline_A, Squad/Parts/Command/mk2CockpitInline/Cockpit_inline_A texture = Cockpit_inline_Emissive, Squad/Parts/Command/mk2CockpitInline/Cockpit_inline_Emissive texture = mk2adapters1m, Squad/Parts/FuelTank/mk2Adapters/mk2adapters1m texture = Flag, Mk2Expansion/Parts/Command/Angler/Flag } and materials Reveal hidden contents [LOG 17:43:04.334] [DebugStuff] +M2X.RavenCockpit T:Untagged L:0 (Default) | Transform - M2X.RavenCockpit | - Position (0.0000, 15.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | Part - M2X.RavenCockpit | Highlighter - M2X.RavenCockpit | ModuleCommand - M2X.RavenCockpit | ModuleReactionWheel - M2X.RavenCockpit | ModuleLiftingSurface - M2X.RavenCockpit | ModuleScienceExperiment - M2X.RavenCockpit | ModuleScienceContainer - M2X.RavenCockpit | ModuleAnimateGeneric - M2X.RavenCockpit | ModuleDataTransmitter - M2X.RavenCockpit | FlagDecal - M2X.RavenCockpit | ModuleB9PartSwitch - M2X.RavenCockpit | ModuleB9PartSwitch - M2X.RavenCockpit | ModuleB9PartSwitch - M2X.RavenCockpit | ModuleB9PartInfo - M2X.RavenCockpit | ModuleTripLogger - M2X.RavenCockpit | AudioSource - M2X.RavenCockpit | Rigidbody - M2X.RavenCockpit | |--+model T:Untagged L:0 (Default) | | Transform - model | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | |--+Mk2Expansion/Parts/Command/Raven/Model(Clone) T:Untagged L:0 (Default) | | | Transform - Mk2Expansion/Parts/Command/Raven/Model(Clone) | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | | --+Blackbird_cockpitMkII T:Untagged L:0 (Default) | | | Transform - Blackbird_cockpitMkII | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | Animation - Blackbird_cockpitMkII | | | Playing Automatically: True - Wrap Mode: Default - Clip Count: 1 | | | Clips: 0 - WindowGlow | | | | | | --+Cockpit T:Untagged L:0 (Default) | | | Transform - Cockpit | | | - Position (0.0000, -0.4532, 0.0000) - Rotation: (270.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - Cockpit | | | MeshRenderer - Cockpit | | | | | |---CrewCompartment T:Untagged L:0 (Default) | | | Transform - CrewCompartment | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - CrewCompartment | | | MeshRenderer - CrewCompartment | | | | | |---FLAG T:Untagged L:0 (Default) | | | Transform - FLAG | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - FLAG | | | MeshRenderer - FLAG | | | | | |---Raven_005 T:Untagged L:0 (Default) | | | Transform - Raven_005 | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - Raven_005 | | | MeshRenderer - Raven_005 | | | | | |---Raven_COL T:Untagged L:0 (Default) | | | Transform - Raven_COL | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshCollider - Raven_COL | | | Convex: True | | | MeshFilter - Raven_COL | | | | | |--+Raven_COL T:Untagged L:0 (Default) | | | | Transform - Raven_COL | | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | MeshCollider - Raven_COL | | | | Convex: True | | | | MeshFilter - Raven_COL | | | | | | | |---Airlock T:Airlock L:21 (Part Triggers) | | | | Transform - Airlock | | | | - Position (0.0000, 1.1252, -0.2658) - Rotation: (80.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | CapsuleCollider - Airlock | | | | Center: (0.0, 0.0, 0.0) - Radius: 0.25 - Height: 1 - Direction: 1 | | | | | | | |---Airlock T:Airlock L:21 (Part Triggers) | | | | Transform - Airlock | | | | - Position (0.0000, 0.0651, -1.2568) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | CapsuleCollider - Airlock | | | | Center: (0.0, 0.0, 0.0) - Radius: 0.25 - Height: 1 - Direction: 1 | | | | | | | |---Ladder T:Ladder L:21 (Part Triggers) | | | | Transform - Ladder | | | | - Position (0.0000, 1.0850, -0.2313) - Rotation: (80.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | | CapsuleCollider - Ladder | | | | Center: (0.0, 0.0, 0.0) - Radius: 0.18 - Height: 1 - Direction: 1 | | | | | | | ---Ladder T:Ladder L:21 (Part Triggers) | | | Transform - Ladder | | | - Position (0.0000, 0.0248, -1.2223) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | CapsuleCollider - Ladder | | | Center: (0.0, 0.0, 0.0) - Radius: 0.18 - Height: 1 - Direction: 1 | | | | | --+Windows T:Untagged L:0 (Default) | | | Transform - Windows | | | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | MeshFilter - Windows | | | MeshRenderer - Windows | | | | | |---WindowLightR T:Untagged L:0 (Default) | | | Transform - WindowLightR | | | - Position (-0.3836, 0.8206, 0.5022) - Rotation: (90.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | Light - WindowLightR | | | Range: 0 - Spot Angle: 30 - CookieSize: 10 - CullingMask: -1 | | | ShadowNearPlane: 0.2 - ShadowNormalBias: 0.4 - ShadowCustomResolution: -1 - ShadowBias: 0.05 | | | Color: RGBA(1.000, 0.992, 0.728, 1.000) - ColorTemp: 6570 - Intensity: 1 - Type: Point | | | Shadows: None - ShadowStrength: 1 - ShadowResolution: FromQualitySettings - BounceIntensity: 1 | | | | | |---WindowLightL T:Untagged L:0 (Default) | | | Transform - WindowLightL | | | - Position (0.3836, 0.8206, 0.5022) - Rotation: (90.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | | Light - WindowLightL | | | Range: 0 - Spot Angle: 30 - CookieSize: 10 - CullingMask: -1 | | | ShadowNearPlane: 0.2 - ShadowNormalBias: 0.4 - ShadowCustomResolution: -1 - ShadowBias: 0.05 | | | Color: RGBA(1.000, 0.992, 0.728, 1.000) - ColorTemp: 6570 - Intensity: 1 - Type: Point | | | Shadows: None - ShadowStrength: 1 - ShadowResolution: FromQualitySettings - BounceIntensity: 1 | | | | | ---WindowLightF T:Untagged L:0 (Default) | | Transform - WindowLightF | | - Position (0.0000, 0.9260, 1.2788) - Rotation: (90.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | | Light - WindowLightF | | Range: 0 - Spot Angle: 30 - CookieSize: 10 - CullingMask: -1 | | ShadowNearPlane: 0.2 - ShadowNormalBias: 0.4 - ShadowCustomResolution: -1 - ShadowBias: 0.05 | | Color: RGBA(1.000, 0.992, 0.728, 1.000) - ColorTemp: 6570 - Intensity: 1 - Type: Point | | Shadows: None - ShadowStrength: 1 - ShadowResolution: FromQualitySettings - BounceIntensity: 1 | | | ---Surface Attach Collider T:Untagged L:0 (Default) | Transform - Surface Attach Collider | - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) | SphereCollider - Surface Attach Collider | Center: (0.0, 0.0, 0.0) - Radius: 0.05 | ---_default T:Untagged L:0 (Default) Transform - _default - Position (0.0000, 0.0000, 0.0000) - Rotation: (0.0, 0.0, 0.0) - Scale: (1.0, 1.0, 1.0) I have been able to use your guide to create a variant, but it seems to be trial and error on what texture matches to which material. Do you have any suggestions on how to make a more educated guess? If not, think I will survive just making duplicate parts. Edit: I was able to get the import .mu files into Blender via the tool on the forum. That appeared to have helped to help show the link between materials and the texture files, but after testing could only get some of the textures to convert. I think I'll shelve this for now until I find easier examples as I have successfully made duplicate parts. If you don't want to deal with blender, you can use DebugStuff mod. The MODEL{} section replaces original texture name with new texture name, whereas PartVariants actually need the material name, not to be confused with mesh name that other variant mods like B9PartSwitch and TexturesUnlimited use. Quote Link to post Share on other sites
Recommended Posts
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.