OnlyLightMatters Posted June 10, 2021 Share Posted June 10, 2021 (edited) New pre release. https://github.com/OnlyLightMatters/TURD-MH-BG/releases/tag/prealpha003 In a few words: MH is supported for recolouration, except flags (as for TURD). BG has it's all shiny support except the deployable science instruments. Edited June 10, 2021 by OnlyLightMatters Quote Link to comment Share on other sites More sharing options...
OnlyLightMatters Posted June 12, 2021 Share Posted June 12, 2021 (edited) @Manwith Noname I have question regarding how to handle a situation. The standard way to define a Switching behaviour looks like the following. @PART[controller1000]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited] { MODULE { name = KSPTextureSwitch sectionName = Appearance currentTextureSet = Stock_Default_KAL-1000 textureSet = Stock_Default_KAL-1000 } } +KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited] { @name = Stock_Default_KAL-1000 @MATERIAL { mesh = controller mesh = indicator texture = _MainTex,SquadExpansion/Serenity/Parts/Robotics/Controllers/roboController_diffuse texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump texture = _Emissive,SquadExpansion/Serenity/Parts/Robotics/Controllers/roboController_emissive } } But with BG deployable science instruments I have multiple associations of meshes/textures. I've tried some workarounds including this one +KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited] { @name = Stock_Default_KAL-1000 @MATERIAL { // BLOCK1 } @MATERIAL { // BLOCK2 } @MATERIAL { // BLOCK3 } } But it does not work, all meshes and textures are mixed up and the wrong textures are assigned to meshes. Multiplying textureSet = statements is not the solution as it is the way to handle variants with this switching capability. MODULE { name = KSPTextureSwitch sectionName = Appearance currentTextureSet = Stock_Default_FLAdapters_W textureSet = Stock_Default_FLAdapters_W // White variant textureSet = Stock_Default_FLAdapters_O // Orange variant } Is there a way to have multiple Stock_Default_* texture sets without multiplying KSPTextureSwitch entries in the UI ? Edited June 12, 2021 by OnlyLightMatters Quote Link to comment Share on other sites More sharing options...
Manwith Noname Posted June 13, 2021 Author Share Posted June 13, 2021 @OnlyLightMatters I'm not entirely sure I follow but something that stands out to me... 14 hours ago, OnlyLightMatters said: I've tried some workarounds including this one +KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited] { @name = Stock_Default_KAL-1000 @MATERIAL { // BLOCK1 } @MATERIAL { // BLOCK2 } @MATERIAL { // BLOCK3 } } ...you probably want to drop the @ on the second and third MATERIAL blocks. This is module manager syntax related. + is copy, @ is edit. So, what's going on here is you copy the Stock_Default KSP_TEXTURE_SET which only has one MATERIAL defined. Then, you're editing that material block, then again, then again. If you want to add further MATERIAL definitions for specific meshes, as previously mentioned, just drop the @ symbol on block 2 and 3, so it looks like this... +KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited] { @name = Stock_Default_KAL-1000 @MATERIAL { // BLOCK1 } MATERIAL { // BLOCK2 } MATERIAL { // BLOCK3 } } This will create new MATERIAL nodes within that new KSP_TEXTURE_SET. Further to this, when it comes to editing multiple previously defined MATERIAL blocks, module manager will accept indexes from 0. So, to edit previously defined MATERIAL blocks later you'll want something like... @MATERIAL, 0 { Edit stuff in MATERIAL block "1" } @MATERIAL, 1 { Edit stuff in MATERIAL block "2" } @MATERIAL, 2 { Edit stuff in MATERIAL block "3" } If this doesn't answer the question, let me know. Quote Link to comment Share on other sites More sharing options...
OnlyLightMatters Posted June 13, 2021 Share Posted June 13, 2021 I had already tried the MATERIAL blocks with no @ starting from block 2 with no result. I've tried the way your propose and I have the same behaviour, it seems the last textures applied in the last block override everything defined previously for a +KSP_TEXTURE_SET statement. Quote Link to comment Share on other sites More sharing options...
Manwith Noname Posted June 13, 2021 Author Share Posted June 13, 2021 @OnlyLightMatters Assuming you haven't published this problem config on GitHub, can you post the complete code for a part you are trying as you imagine it should work. If it is on GitHub, some direction to find it in amongst everything else would be good. Quote Link to comment Share on other sites More sharing options...
OnlyLightMatters Posted June 13, 2021 Share Posted June 13, 2021 @Manwith Noname I've pushed the code & materials in an experimental branch on Github. https://github.com/OnlyLightMatters/TURD-MH-BG/tree/experimental_BGDeployableInstruments The code of the 1110 Switching file for DeployedSatDish // Communotron Ground HG-48. I replaced the squad texture with a allred.dds texture. // Communotron Ground HG-48 @PART[DeployedSatDish]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited] { MODULE { name = KSPTextureSwitch sectionName = Appearance currentTextureSet = Stock_Default_DeployedSatDish textureSet = Stock_Default_DeployedSatDish } } +KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited] { @name = Stock_Default_DeployedSatDish @MATERIAL,0 { shader = KSP/Specular mesh = Base mesh = MountBase mesh = PanelMount mesh = DishCore mesh = Antenna mesh = LeafBot mesh = LeafLeft mesh = LeafRight mesh = LeafTop texture = _MainTex,SquadExpansion/Serenity/Parts/DeployedScience/Assets/satDish_diffuse texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis } @MATERIAL,1 { shader = KSP/Alpha/Translucent Additive mesh = Screen (1) texture = _MainTex,SquadExpansion/Serenity/Parts/DeployedScience/Assets/Grid texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis } @MATERIAL,2 { shader = KSP/Emissive/Specular mesh = marcoPantalla mesh = polySurface116 mesh = Switch1 mesh = Switch2 mesh = Switch3 mesh = Switch4 mesh = BaseGenericParts mesh = squareButton1 mesh = squareButton2 mesh = squareButton3 mesh = squareButton4 mesh = squareButton5 mesh = squareButton6 mesh = squareButton7 mesh = squareButton8 mesh = squareButton9 //texture = _MainTex,SquadExpansion/Serenity/Parts/DeployedScience/Assets/GenericParts_diffuse texture = _MainTex,TURD/TU_BG_AllInOne/allred texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump texture = _Emissive,SquadExpansion/Serenity/Parts/DeployedScience/Assets/GenericParts_emissive } } Screen capture You can see that all meshes are red, including these which are not linked to the allred texture (sat dish meshes in particular). Quote Link to comment Share on other sites More sharing options...
Manwith Noname Posted June 13, 2021 Author Share Posted June 13, 2021 (edited) @OnlyLightMatters You may have tried this but this is where I would start... @PART[DeployedSatDish]:FOR[000_Standardised_Switching]:NEEDS[TexturesUnlimited] { MODULE { name = KSPTextureSwitch sectionName = Appearance currentTextureSet = Stock_Default_DeployedSatDish textureSet = Stock_Default_DeployedSatDish } } +KSP_TEXTURE_SET[Stock_Default]:NEEDS[TexturesUnlimited] { @name = Stock_Default_DeployedSatDish @MATERIAL { @shader = KSP/Specular mesh = Base mesh = MountBase mesh = PanelMount mesh = DishCore mesh = Antenna mesh = LeafBot mesh = LeafLeft mesh = LeafRight mesh = LeafTop texture = _MainTex,SquadExpansion/Serenity/Parts/DeployedScience/Assets/satDish_diffuse texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis } MATERIAL { mode = create shader = KSP/Alpha/Translucent Additive mesh = Screen (1) texture = _MainTex,SquadExpansion/Serenity/Parts/DeployedScience/Assets/Grid texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump texture = _Emissive,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Emis } MATERIAL { mode = create shader = KSP/Emissive/Specular mesh = marcoPantalla mesh = polySurface116 mesh = Switch1 mesh = Switch2 mesh = Switch3 mesh = Switch4 mesh = BaseGenericParts mesh = squareButton1 mesh = squareButton2 mesh = squareButton3 mesh = squareButton4 mesh = squareButton5 mesh = squareButton6 mesh = squareButton7 mesh = squareButton8 mesh = squareButton9 //texture = _MainTex,SquadExpansion/Serenity/Parts/DeployedScience/Assets/GenericParts_diffuse texture = _MainTex,TURD/TU_BG_AllInOne/allred texture = _BumpMap,TURD/TU_Standardised_Switching/000_PlaceholderTextures/Bump texture = _Emissive,SquadExpansion/Serenity/Parts/DeployedScience/Assets/GenericParts_emissive } } If that doesn't work, my main suspicion would be the Screen mesh with (1) in the name might be causing a severe breakage. Also, if it doesn't work, can you paste the contents of the ModelData.txt file from a TU export, if you ran that, or expand the mesh hierarchy in the Object Inspector window and grab a screenshot. Something else that might be useful, enable verbose logging, also log errors and exceptions to screen in game so you'll get a heads up when things break. Check in the TU options accessed through the game difficulty menu to enable some extra logging (if I remember correctly where that is now). You can upload a paste to somewhere like pastebin.com or PM a copy of the entire KSP.log if you want me to scan through that for ideas. To keep it clean, load the game, go straight to the editor, add the parts in and try to alter them through TU controls, then exit out. The thing I will say, although I covered some objects that Kerbals grab out of storage containers, they're not very nice to work with in game. Though I suspect you may have found that already. Edit: Oh, another useful thing to check when debugging, the module manager cache. Edited June 13, 2021 by Manwith Noname Quote Link to comment Share on other sites More sharing options...
OnlyLightMatters Posted June 14, 2021 Share Posted June 14, 2021 (edited) There are no visible errors linked to Screen (1) in the KSP.log, which I check every time things are going south, both for game loading and running /playing with the part in the VAB. Full logs from TU in this KSP.log https://drive.google.com/file/d/13VXnXXdG1X_HkwSC6vIhSkt8o5nATf3c/view?usp=sharing I make my cfgs from the exported UVs from TU to see how the meshes are linked to textures, and this is where I saw the odd name of this mesh (space and parenthesis for an identifier, really?) Short extract here ------------------------------------------- Mesh Name Model: Screen (1) Render Type: MeshRenderer ++++++++++++++++++ Material #: 0 Material Name: ScreenGrid Shader Name : KSP/Alpha/Translucent Additive RenderQueue : 3000 _MainTex : SquadExpansion/Serenity/Parts/DeployedScience/Assets/Grid (UnityEngine.Texture2D) _MainTexOffset : (0.0, 0.0) ++++++++++++++++++ ------------------------------------------- Complete file here : https://drive.google.com/file/d/1whtXsMqfkFe_YTEGmPPl5QRtfKUwoM51/view?usp=sharin Object Inspector confirmed the information already collected : https://nsa40.casimages.com/img/2021/06/14/210614084626461874.png I've sometimes had some issues with MM's cache so I already tried to delete it then rerun the game. No effect here. Do you mean inspect MM cache ? I've not tried yet adding the create statements, will do that this morning. Edited June 14, 2021 by OnlyLightMatters Quote Link to comment Share on other sites More sharing options...
OnlyLightMatters Posted June 14, 2021 Share Posted June 14, 2021 (edited) @Manwith Noname finally i've had some time to test your code proposal between 2 meetings and it's working! The mode = create statement was missing in my original attempt. Thank you for your help Edited June 14, 2021 by OnlyLightMatters Quote Link to comment Share on other sites More sharing options...
OnlyLightMatters Posted June 14, 2021 Share Posted June 14, 2021 New Pre-Release. It's all Shiny effect is available for deployable science instruments. https://github.com/OnlyLightMatters/TURD-MH-BG/releases/tag/prealpha004 Quote Link to comment Share on other sites More sharing options...
Manwith Noname Posted June 14, 2021 Author Share Posted June 14, 2021 9 hours ago, OnlyLightMatters said: @Manwith Noname finally i've had some time to test your code proposal between 2 meetings and it's working! Great news! Strictly speaking, that line shouldn't be required and TU will default to that mode if no mode is set. I just put it there for completeness as when checking logs, you can end up with lots of messages about it being missing. 16 hours ago, OnlyLightMatters said: Do you mean inspect MM cache ? Yes, it can be very helpful. You can basically see how the entire part config ends up after all module manager patches. Also, a note on your allred test texture. There is already a red texture available in the placeholder textures folder named Paint. Can be handy sometimes ;D Quote Link to comment Share on other sites More sharing options...
AndrewsonPaul Posted June 27, 2021 Share Posted June 27, 2021 Textures Unlimited Recolour Depot update 1.12 Quote Link to comment Share on other sites More sharing options...
Spaceman.Spiff Posted June 27, 2021 Share Posted June 27, 2021 4 minutes ago, AndrewsonPaul said: Textures Unlimited Recolour Depot update 1.12 What’s wrong with it? Quote Link to comment Share on other sites More sharing options...
Manwith Noname Posted June 28, 2021 Author Share Posted June 28, 2021 Any parts Squad have updated (solar panels come to mind) or added will either behave strangely or not work at all. I haven't got round to checking things as yet but it will happen. Quote Link to comment Share on other sites More sharing options...
theleg Posted July 5, 2021 Share Posted July 5, 2021 (edited) I am unable to make the stock game parts shiny at all(there is no recolouring GUI option showing), but this mod is working for Procedural Parts...please help... Edit: Uninstalling ReStock fixed the issue. Edited July 5, 2021 by theleg Quote Link to comment Share on other sites More sharing options...
theleg Posted July 5, 2021 Share Posted July 5, 2021 On 6/15/2021 at 2:44 AM, OnlyLightMatters said: New Pre-Release. It's all Shiny effect is available for deployable science instruments. Any updates? Can't wait to try out MH with TURD and your mod... Quote Link to comment Share on other sites More sharing options...
LHACK4142 Posted July 5, 2021 Share Posted July 5, 2021 Does this work with Restock? Quote Link to comment Share on other sites More sharing options...
theleg Posted July 6, 2021 Share Posted July 6, 2021 (edited) 9 hours ago, LHACK4142 said: Does this work with Restock? Nope. It doesn't work with ReStock and Venn's Revamp. Edited July 6, 2021 by theleg Quote Link to comment Share on other sites More sharing options...
theleg Posted July 6, 2021 Share Posted July 6, 2021 (edited) deleted Edited July 6, 2021 by theleg Quote Link to comment Share on other sites More sharing options...
LHACK4142 Posted July 7, 2021 Share Posted July 7, 2021 Ok, so I deleted Restock, installed Textures Unlimited, made sure Module Manager was installed, and put the .zip file in the gamedata directory. I'm not seeing anything other than a few parts being a bit shinier than usual, and no way whatsoever to change the colors of parts in the VAB. What did I do wrong? Quote Link to comment Share on other sites More sharing options...
theleg Posted July 7, 2021 Share Posted July 7, 2021 3 hours ago, LHACK4142 said: Ok, so I deleted Restock, installed Textures Unlimited, made sure Module Manager was installed, and put the .zip file in the gamedata directory. I'm not seeing anything other than a few parts being a bit shinier than usual, and no way whatsoever to change the colors of parts in the VAB. What did I do wrong? Did you install TURD? Install TURD with TU... Quote Link to comment Share on other sites More sharing options...
LHACK4142 Posted July 7, 2021 Share Posted July 7, 2021 12 minutes ago, theleg said: Did you install TURD? Install TURD with TU... Yep. TURD is the aforementioned .zip file Quote Link to comment Share on other sites More sharing options...
theleg Posted July 7, 2021 Share Posted July 7, 2021 27 minutes ago, LHACK4142 said: Yep. TURD is the aforementioned .zip file Don't put the .zip file in the Gamedata folder. First extract it, then you will see a Gamedata folder within the extracted file. Copy the contents of that Gamedata folder in the Gamedata folder of the game. Quote Link to comment Share on other sites More sharing options...
LHACK4142 Posted July 7, 2021 Share Posted July 7, 2021 17 hours ago, theleg said: Don't put the .zip file in the Gamedata folder. First extract it, then you will see a Gamedata folder within the extracted file. Copy the contents of that Gamedata folder in the Gamedata folder of the game. Worked. Thank you! Quote Link to comment Share on other sites More sharing options...
Dominiquini Posted July 11, 2021 Share Posted July 11, 2021 It's really cool to be able to change the colors this way! Unfortunately it doesn't seem to be working well for engine shrouds! Quote Link to comment Share on other sites More sharing options...
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.