Jump to content

Help desperately needed - FSTextureswitch mod - 1.2


Benji13

Recommended Posts

Hello. I need help. I've been working on a mod (for 1.2 btw, would probably still work in 1.1.2 though) that adds 4 different sized disks as parts to the game. They all use the same model. To spice the mod up a bit I've decided to use FSTextureswitcher (through IFS) to allow switching between multiple textures. The part(s) work, both the textures (I've only made two so far) work but switching the textures doesn't. I wrote a MM patch for each part that adds the FStextureswitch module to it and the right-click menu comes up in the editor (see figure 1) but clicking the 'next texture' button does nothing (see figure 2). It says that it has changed texture, but it looks the same. I think that the problem might be the 'objectName' line as (I think) it is the line that actually says which part to switch. I am unsure as to what to write in here. I have tried the name of the model, the name of the parts, the in-game name of the parts and the even name of the .blend file from when I made the model before I exported it to unity and converted it to a .mu. I know that there was a mod for 1.0.5 that told you the objectName for parts in the VAB but 1.0.5 is no longer available from the KSP store and I doubt that the parts would work anyway. I read somewhere that you could install a .mu plugin for blender and find out that way but the plugin no longer works (from my testing, I could be doing it wrong). I have uploaded the mod and my .blend file to dropbox (link below) for anyone who wants to take a look. Any help would be greatly appreciated, I have been trying to figure this out myself for ages. I might be able to provide more information if you need but I think I've pretty much said everything already. I am totally fine with someone just writing the patch for me and I will totally give you tons of credit when/if I release the mod. I just want it to work.

Dropbox link (mod itself is inside 'Gamedata' folder): https://www.dropbox.com/s/bz2kg2t8fvh1h4n/Structural Disks-Need Help.zip?dl=0

Figure 1: Right-click menu works-

QZ0uNZ1.jpg

 

Figure 2: Texture not switching after clicking button-

45B5wvH.jpg

 

Thanks,

Benji13.

Link to comment
Share on other sites

Why use FStextureswitch through IFS instead of just FS by itself? Second, why add the texture switching module through a MM file when you can just plop it into the parts .cfg file? Lastly, if you have multiple sized parts using the same exact model and texture, why not just have 1 part have add a TweakScale module to it (seeing as you already gave the part(s) a FStextureswitch module)?

Anyways, here is what a FStextureswitch module should look like when not added through MM:

MODULE
  {
    moduleID = 0
    name = FStextureSwitch2
    textureRootFolder = Liquidhype/Parts/delta2/gem46al/
    textureNames = gem46TEX;gem46TEX7;gem46TEX8;gem46TEX9
    objectNames = gem46al
    textureDisplayNames = blank;7;8;9
    nextButtonText = Next Texture
    prevButtonText = Previous Texture
    switchableInFlight = false
  }

Make sure to add a "/" at the end of textureRootFolder like seen in my example and make sure to have the other textures placed inside of the folder you are referring to with the textureRootFolder line.

Link to comment
Share on other sites

30 minutes ago, liquidhype said:

Why use FStextureswitch through IFS instead of just FS by itself? Second, why add the texture switching module through a MM file when you can just plop it into the parts .cfg file? Lastly, if you have multiple sized parts using the same exact model and texture, why not just have 1 part have add a TweakScale module to it (seeing as you already gave the part(s) a FStextureswitch module)?

Anyways, here is what a FStextureswitch module should look like when not added through MM:


MODULE
  {
    moduleID = 0
    name = FStextureSwitch2
    textureRootFolder = Liquidhype/Parts/delta2/gem46al/
    textureNames = gem46TEX;gem46TEX7;gem46TEX8;gem46TEX9
    objectNames = gem46al
    textureDisplayNames = blank;7;8;9
    nextButtonText = Next Texture
    prevButtonText = Previous Texture
    switchableInFlight = false
  }

Make sure to add a "/" at the end of textureRootFolder like seen in my example and make sure to have the other textures placed inside of the folder you are referring to with the textureRootFolder line.

1) Because it does the same thing just as well and some other things better. 

2) I'm not sure. Did I mention that it's my first mod?

3) One of my main mods (KR&D) doesn't like tweakscale and I know many other people don't so I decided to just make a couple extra configs. 

The rest) Ok, thanks. But I'm still not sure exactly what the objectName line is. Name of part? Name of mesh? If it is the mesh or model or something like that can you please suggest how to find that? I am quite new to modding and have never gone beyond making an OP Rhino engine before. Thanks,

Benji13. 

Edited by Benji13
Link to comment
Share on other sites

@Benji13 use the following MM patch to cover all your parts at once:

@PART[structuralDisk*]:FOR[StructuralDisks]
{
    MODULE
    {
        name:NEEDS[Firespitter,!InterstellarFuelSwitch] = FStextureSwitch2
        name:NEEDS[!Firespitter,InterstellarFuelSwitch] = InterstellarTextureSwitch2
        textureRootFolder = StructuralDisks\Parts\StructuralDisks/
        textureNames = textureDarkGreyMetal;textureGreen;
        textureDisplayNames = Grey Metal;Green;
        objectNames = Cylinder
        prevButtonText = Previous Color
        nextButtonText = Next Color
        statusText = Current Color
        showListButton = False
    }
}

Also, by changing the option "showListButton" from False to True you can log every object that the part model has so that you can find out the name of the mesh that you want to change.

Source: Firespitter module documentation

Link to comment
Share on other sites

9 hours ago, Phineas Freak said:

@Benji13 use the following MM patch to cover all your parts at once:


@PART[structuralDisk*]:FOR[StructuralDisks]
{
    MODULE
    {
        name:NEEDS[Firespitter,!InterstellarFuelSwitch] = FStextureSwitch2
        name:NEEDS[!Firespitter,InterstellarFuelSwitch] = InterstellarTextureSwitch2
        textureRootFolder = StructuralDisks\Parts\StructuralDisks/
        textureNames = textureDarkGreyMetal;textureGreen;
        textureDisplayNames = Grey Metal;Green;
        objectNames = Cylinder
        prevButtonText = Previous Color
        nextButtonText = Next Color
        statusText = Current Color
        showListButton = False
    }
}

Also, by changing the option "showListButton" from False to True you can log every object that the part model has so that you can find out the name of the mesh that you want to change.

Source: Firespitter module documentation

Thanks, I've got it working now. If only I read a bit further down the manual...

Link to comment
Share on other sites

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...