Sign in to follow this  
Followers 0
ErevanGaming

How to Use FStextureSwitch2 and FSfuelSwitch

15 posts in this topic

Hi everybody =)

Thanks to @dboi88 for converting z_thing's boxes to DDS format, I've been using them on my sandbox save. =)

Now am trying out on using FStextureSwitch2 and FSfuelSwitch to switch between... boxes models to use with different types of resources, but only got the FSfuelSwitch to work. ="> Am using a known mod's config as basis. Is this just a matter of getting the from MM syntax or editing the MU files is required?

Again, this is only for my personal testing, learning/tinkering purposes. ="> all rights are reserved by their respective owners. =)

 

Regards

Share this post


Link to post
Share on other sites
8 minutes ago, ErevanGaming said:

Hi everybody =)

Thanks to @dboi88 for converting z_thing's boxes to DDS format, I've been using them on my sandbox save. =)

Now am trying out on using FStextureSwitch2 and FSfuelSwitch to switch between... boxes models to use with different types of resources, but only got the FSfuelSwitch to work. ="> Am using a known mod's config as basis. Is this just a matter of getting the from MM syntax or editing the MU files is required?

Again, this is only for my personal testing, learning/tinkering purposes. ="> all rights are reserved by their respective owners. =)

 

Regards

I should be able to help you get this working aswell! I did some switchable kontainers for the MKX/KPBS integration pack using firespitter.

y4ypGTj.gif

Now this took my a LOOOOONG time to work out.

There were two things i was doing wrong. You need to refer to the base texture directly, (normally if the texture is in the same location as the model it will just pick it up, for some reason this didn't work for me and i had to expressly refer to the location, i.e. CoyoteSpaceIndustries/Parts/Assets/texture)

Secondly you need to ensure you are referring to the mesh name within the .mu which could be ANYTHING. If you post your config i'll take a look and see if i can see were you are going wrong. Also this is a great help. 

https://docs.google.com/document/d/1iD52DfHft04Hb48TEhF5a4n5JOc8efUevdg5Y_QPICQ/edit

2 people like this

Share this post


Link to post
Share on other sites

Hiya, took a while for me to work it out too,  however it's become pretty standard fare for most things i do now, here's  the MM patch I currently use ,

@PART[TruckIntake]:NEEDS[Firespitter]
{
	MODULE
	{
		 name = FStextureSwitch2
		moduleID = 0

		objectNames = IntakeActive // this is as mentioned is the name of the mesh not the part, if you are working on someone elses parts and dont know the mesh name, open the .mu in notepad and  usually the mesh name is the third or fourth human readable block of characters

		textureNames = SM_AFVs/Parts/OSHCab/OshKabS;SM_AFVs/Parts/OSHCab/OshKabDC;;SM_AFVs/Parts/OSHCab/OshKabOD;SM_AFVs/Parts/OSHCab/OshKabUC           // this the texture path and in this case translates as foldername/foldername/foldername/texture
		textureDisplayNames = Stock;Des;Grn;Urb  // this is the list of names shown in the gui 
		nextButtonText = Next Color
		prevButtonText = Previous Color
		statusText = Current Color
		showPreviousButton = true
		updateSymmetry = true
		showInfo = false
		debugMode = false
		showListButton = false
	}
}

 

3 people like this

Share this post


Link to post
Share on other sites

@SpannerMonkey(smce) that's a great tip in regards to opening the mu I never knew you could do that.

2 people like this

Share this post


Link to post
Share on other sites

Posted (edited)

23 minutes ago, SpannerMonkey(smce) said:

objectNames = IntakeActive // this is as mentioned is the name of the mesh not the part, if you are working on someone elses parts and dont know the mesh name, open the .mu in notepad and usually the mesh name is the third or fourth human readable block of characters

Thank you,i was struggling so much and this was the only thing i was missing.
Also i don't specify all of the textures path and just use this:

textureRootFolder = //path to the textures
textureNames = texturname1;texturname2;texturname3 //...
textureDisplayNames = LF; LFO; Mono //

example of my config:

Spoiler

MODULE
 {
 name = FStextureSwitch2
 nextButtonText = Next Type 
 prevButtonText = Prev Type
 textureNames = lf;lfo;rcs
 objectNames = MMI - External Gas Tank
 //mapNames = tank_NRM;tank_NRM;tank_NRM;
 useFuelSwitchModule = true
 fuelTankSetups = 0;1;2
 textureDisplayNames = LF; LFO; Mono
 textureRootFolder = sebi/parts/MMItank/texture/
 //mapIsNormal = true
 showPreviousButton = false
 moduleID = 0
 showInfo = false
 }

MODULE
 {
 name = FSfuelSwitch
 resourceNames = LiquidFuel;LiquidFuel,Oxidizer;MonoPropellant
 resourceAmounts = 200; 90,110; 200
 basePartMass = 0.1
 tankMass = 0; 0; 0
 tankCost = 0; 0; 0
 hasGUI = false
 availableInFlight = false
 availableInEditor = true
 }

 

Edited by sebi.zzr
1 person likes this

Share this post


Link to post
Share on other sites

Here's my custom CFG file =">

Spoiler

PART
{
    // --- general parameters ---
    name = B_long
    module = Part
    author = z

    // --- asset parameters ---
    MODEL
    {
        model = z_thing/Parts/Utility/Boxes/B_white_long
        texture = z_thing/Parts/Utility/Boxes/B_white_long
    }
    scale = 1
    rescaleFactor = 1.5

    // --- node definitions ---
    node_attach = 0.0, -0.60, 0.0 , 0.0, 0.0, 1.0
   
    
    // --- editor parameters ---
    TechRequired = largeVolumeContainment
    entryCost = 42000
    cost = 680
    category = FuelTank
    subcategory = 0
    title = Tripple size Box 
    manufacturer = Sklifosovsky Labs
    description = White striped box to store any kind of matter. Write there something about content if you decide to put something in it

    // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
    attachRules = 1,1,1,1,0
    

       
        // --- standard part parameters ---
    mass = 2
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.3
    angularDrag = 2
    crashTolerance = 20
    maxTemp = 3400
    fuelCrossFeed = True
    breakingForce = 1215
    breakingTorque = 1215

    MODULE
    {
        name = FStextureSwitch2
        textureNames = z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long;z_thing/Parts/Utility/Boxes/B_green_long;z_thing/Parts/Utility/Boxes/B_red_long;z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long;z_thing/Parts/Utility/Boxes/B_green_long;z_thing/Parts/Utility/Boxes/B_red_long;z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long;z_thing/Parts/Utility/Boxes/B_green_long;z_thing/Parts/Utility/Boxes/B_red_long;z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long;z_thing/Parts/Utility/Boxes/B_green_long;z_thing/Parts/Utility/Boxes/B_red_long;z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long
        objectNames = white_long;black_long;blue_long;green_long;red_long;white_long;black_long;blue_long;green_long;red_long;white_long;black_long;blue_long;green_long;red_long;white_long;black_long;blue_long;green_long;red_long;white_long;black_long
        textureDisplayNames = MetallicOre;Uraninite;Substrate;Minerals;Karbonite;Commodities;MaterialKits;Metals;Polymers;Supplies;Ore;Machinery;Recyclables;SpecializedParts;Fertilizer;Hydrates;Gypsum;Dirt;Silicates;Silicon;RefinedExotics;ColonySupplies;Organics
        useFuelSwitchModule = true
        fuelTankSetups = 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;
        repaintableEVA = true
        nextButtonText = Next Cargo
        prevButtonText = Previous Cargo
        moduleID = 2
    }

    MODULE
    {
        name = FSfuelSwitch
        resourceNames = MetallicOre;Uraninite;Substrate;Minerals;Karbonite;ExoticMinerals,RareMetals;MaterialKits;Metals;Polymers;Supplies;Ore;Machinery;Recyclables;SpecializedParts;Fertilizer;Hydrates;Gypsum;Dirt;Silicates;Silicon;RefinedExotics;ColonySupplies;Organics
        resourceAmounts = 16000;16000;16000;16000;16000;8000,8000;16000;16000;16000;16000;3200;16000;16000;16000;16000;16000;16000;16000;16000;16000;16000;16000;16000
        initialResourceAmounts = 0;0;0;0;0;0,0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
        tankCost = 28160;11200;4800;12800;5120;2400000;32000;227840;128000;40000;64;252800;112000;512000;32000;8000;160;4800;160;320;4000000;240000;8000
        basePartMass = 2
        tankMass = 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
        hasGUI = false
    }

    MODULE
    {
        name = USI_ModuleResourceWarehouse
    }
    MODULE
    {
        name = USI_ModuleRecycleBin
    }    
    
    
}

I kinda combined z's B_white_long.cfg with... MKS' Kontainer_02.cfg in my amateurish attempt =">

Share this post


Link to post
Share on other sites

Hi everybody,

Still haven't figured out the fxtextureswitch2 on the custom part am trying to work in my personal career save. =D =">

To move things along, I group the resources and paired them with a specific z_box container to skip the texture switching/selecting thing. Applied the same approach to "z's" circular hub parts which is going well. =D

Thanks again for your comments and tips! =)

 

Regards

 

Share this post


Link to post
Share on other sites

You should only have one object name. The name of the mesh you are switching.

2 people like this

Share this post


Link to post
Share on other sites
7 hours ago, dboi88 said:

You should only have one object name. The name of the mesh you are switching.

HI thats not quite true.  Why? Well take for example a stock cargo bay that you want to give a texture switch, IIRC a stock cargo bay is four individual meshes that form the floor , main hull and doors. In order for a switch to work  you'll need to list ALL the mesh components in the model you want to change the texture on . 

There is no way to select individual meshes in sph or vab, so failing to list all the mesh parts will leave items uncolored with no way of applying a texture.

You can also use many individual texture switch modules to do the same job, but that's only really useful (imo) when dealing with mesh parts that have different textures than the main mesh ,  so that instead of switching the whole model texture you can for example  , in the case of the cargo bay have a stock color hull and black doors

On 18/03/2017 at 3:54 AM, ErevanGaming said:

Here's my custom CFG file =">

  Hide contents

 

        textureNames = z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long;z_thing/Parts/Utility/Boxes/B_green_long;z_thing/Parts/Utility/Boxes/B_red_long;z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long;z_thing/Parts/Utility/Boxes/B_green_long;z_thing/Parts/Utility/Boxes/B_red_long;z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long;z_thing/Parts/Utility/Boxes/B_green_long;z_thing/Parts/Utility/Boxes/B_red_long;z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long;z_thing/Parts/Utility/Boxes/B_green_long;z_thing/Parts/Utility/Boxes/B_red_long;z_thing/Parts/Utility/Boxes/B_white_long;z_thing/Parts/Utility/Boxes/B_black_long;z_thing/Parts/Utility/Boxes/B_blue_long
        objectNames = white_long;black_long;blue_long;green_long;red_long;white_long;black_long;blue_long;green_long;red_long;white_long;black_long;blue_long;green_long;red_long;white_long;black_long;blue_long;green_long;red_long;white_long;black_long 

 

I kinda combined z's B_white_long.cfg with... MKS' Kontainer_02.cfg in my amateurish attempt =">

ALL  those underscores,  you know that they cause problems in parts names?  The underscore is translated as a period (.) and MM doesn't seem to play nice when underscores are present .  Have you got a simple switch to work?  Id use a stock structural panel and do a couple of textures and try that, it seems that you're making life difficult for yourself trying it on a complex part first. Crack the easy one and everything becomes easy

AND the object names need to be the name of the MESH not the part unless the mesh is called white_long;black_long;blue_long;green_long;red_long;white_long;black_long;blue_long;green_long;red_long

And you have the division between names wrong it needs to be like this YourMod/Parts/Folder/texture;   YourMod/etc   commas or periods will not work and it will not read the textures or parts names correctly

1 person likes this

Share this post


Link to post
Share on other sites
24 minutes ago, SpannerMonkey(smce) said:

HI thats not quite true. 

I'm aware, i just didn't want to confuse OP any further.

2 people like this

Share this post


Link to post
Share on other sites
4 minutes ago, dboi88 said:

I'm aware, i just didn't want to confuse OP any further.

Thought you may know, confusion is strong in this one :)

2 people like this

Share this post


Link to post
Share on other sites

I know how he feels though. it literally took me weeks to get my first fs texture switch working and it was my own model! 

2 people like this

Share this post


Link to post
Share on other sites

@dboi88 and @SpannerMonkey(smce)

I appreciate all your help! =) if I don't ask questions, I'd never learn how things are supposed to be done =D

Didn't know also the "underscores" messes up MM =D was just following the obviously outdated cfg file and stuff of z_thing's boxes (

 

Share this post


Link to post
Share on other sites
Just now, ErevanGaming said:

if I don't ask questions, I'd never learn how things are supposed to be done =D

No worries, as far as I'm concerned if you don't know that answer, asking the question is the best way to find out,  we all started somewhere as new mod makers, and it's one little hobby that throws up continuous new questions even for people who've been doing it for years

When it comes to the part names and underscores, if you are reworking a mod that is already in circulation, and are worried about breaking craft already built , you can change everything in the cfg except for the title, changing the title will break craft.

1 person likes this

Share this post


Link to post
Share on other sites

hi @SpannerMonkey(smce)

7 minutes ago, SpannerMonkey(smce) said:

No worries, as far as I'm concerned if you don't know that answer, asking the question is the best way to find out,  we all started somewhere as new mod makers, and it's one little hobby that throws up continuous new questions even for people who've been doing it for years

When it comes to the part names and underscores, if you are reworking a mod that is already in circulation, and are worried about breaking craft already built , you can change everything in the cfg except for the title, changing the title will break craft.

Will do that =) I already planned on restarting a new career save since @dboi88 was kind enough to convert the TGA files to DDS =) and I really want to use the parts made by z_thing =">

 

Cheers and thanks again! =)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0