blowfish

[1.7.3] B9PartSwitch v2.10.0 (Aug 18) - module switching!!!

Recommended Posts

39 minutes ago, theJesuit said:

Hi @blowfish et al.

Is there a way to MM patch a different texture .dds file over a model that utilises B9 switches to create a different look for different resources. 

I'd like to use the Keridian Dynamics mod with different reources.  But i can't seem to find a way to point the models (using the stock retexture method) so that my own file is used.  Is there a way to get B9 to use a different texture .dds so that I can make my own for other's parts.  As this is for a release it would be cleaner to not have to get installers to overwrite a file.

Thanks. Peace.

Yes, should be possible!  Maybe check the wiki/other people's configs for the texture switching syntax and let me know if you have any points of confusion.

Share this post


Link to post
Share on other sites
4 hours ago, blowfish said:

Yes, should be possible!  Maybe check the wiki/other people's configs for the texture switching syntax and let me know if you have any points of confusion.

Thanks for the heads up! Very useful but I have a point of confusion.

Keridian Dynamics (KD) has a single texture for all tanks (plus emmisive and normal).  This texture has all 9 variants as parts of this texture, transforms FS01 to FS09

So, here is the MM patch which removes the previous Module as the @ thing wasn't working for me. 

@PART[KD-T????FS|KD-ST????FS]:HAS[@RESOURCE[KDVolume]]:NEEDS[B9PartSwitch&!Firespitter&!InterstellarFuelSwitch]:FINAL
{	!MODULE[ModuleB9PartSwitch]	{}
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = fuelSwitch
		switcherDescription = Tank Type
		baseVolume = #$../KDV5$

		SUBTYPE
		{
			name = MetalParts
			tankType = KDRocketParts
			TEXTURE
				{	texture = AngleCanMods/SimplexResources/Assets/ACStationTanks
					transform = FS01
				}	
		}

		SUBTYPE
		{	name = CustomParts
			tankType = KDMetal
			addedMass = #$../../mass$
			TEXTURE
				{	texture = AngleCanMods/SimplexResources/Assets/ACStationTanks
					transform = FS02
				}
		}
etc.

This doesn't work.  I get the 9 original transforms overlaid as such.

JpCO3DG.png

 

But if i add the texture code to the first Subtype as such:

		SUBTYPE
		{	
			name = MetalParts
			tankType = KDRocketParts
			TEXTURE
				{	
					texture = AngleCanMods/SimplexResources/Assets/ACStationTanks
					transform = FS01
				}	
		}
		SUBTYPE
		{	
			name = CustomParts
			tankType = KDMetal
			addedMass = #$../../mass$
			transform = FS02
		}

then the first works well, but not the second and third etc. where the stuff gets overlaid again.

ZfnuNda.png

JpCO3DG.png

 

Any thoughts?

 

Share this post


Link to post
Share on other sites

@theJesuit I'm guessing you want to modify the original module, rather than remove it?  Something like

@PART[blah]
{
	@MODULE[ModuleB9PartSwitch]
    {
    	@SUBTYPE[whatever]
        {
        	TEXTURE
            {
            	texture = path/to/texture
            }
        }
        // and the rest
    }
}

Having a transform inside a texture node doesn't actually enable/disable the transform, it only tells the texture switch to change textures on that GameObject

Share this post


Link to post
Share on other sites
4 hours ago, blowfish said:

@theJesuit I'm guessing you want to modify the original module, rather than remove it?  Something like <snip>

Yup, thought I'd had tried this, but now works for the transforms.  Hoorah!

Except for this issue now.

R3ubpVP.png

Where the transforms all work awesomely, but the texture on the part seems to be only the transforms of the file even the other .  It should look like this:

BBr05Dm.png

The dark tanks also have issues but not to the same extent.

How would I resolve this?  Do I need to say currenttexture or something?

Share this post


Link to post
Share on other sites
1 minute ago, theJesuit said:

Yup, thought I'd had tried this, but now works for the transforms.  Hoorah!

Except for this issue now.

Where the transforms all work awesomely, but the texture on the part seems to be only the transforms of the file even the other .  It should look like this:

The dark tanks also have issues but not to the same extent.

How would I resolve this?  Do I need to say currenttexture or something?

I would need to know more about the setup of the parts in question.

Share this post


Link to post
Share on other sites

@blowfish STOP PRESSES!

I've done it. currenttextures = <originaltexturefile> was the answer.

@PART[KD-T????FS|KD-ST????FS]:FINAL
{
	@MODULE[ModuleB9PartSwitch]
    {
    	@SUBTYPE[RocketParts]
        {	
        	TEXTURE
            {	
				currentTexture = KD-StationTanks
            	texture = AngleCanMods/SimplexResources/Assets/ACStationTanks
            }
        }
etc.

This worked.  Thank you so much!

Peace.

Edited by theJesuit

Share this post


Link to post
Share on other sites
Posted (edited)

EDIT: Disregard. This is due to the stock KSP bug that requires loading and then reloading.


Apologies if this has already been brought up. I'm having an issue with the Service Modules parts from Making History. Selecting any of the Service Module parts fires a NullReferenceException. Their shrouds cannot be removed and extra buttons are present (the extra buttons go away after leaving the VAB and returning.)

aaXzlcA.png

b9partswitch, Squad, and SquadExpansion are the only folders in the GameData folder, along with MM 3.1.1.

output log

Edited by _Zee

Share this post


Link to post
Share on other sites
11 minutes ago, _Zee said:

Apologies if this has already been brought up. I'm having an issue with the Service Modules parts from Making History. Selecting any of the Service Module parts fires a NullReferenceException. Their shrouds cannot be removed and extra buttons are present (the extra buttons go away after leaving the VAB and returning.)

b9partswitch, Squad, and SquadExpansion are the only folders in the GameData folder, along with MM 3.1.1.

output log

I don't know if this might make a difference but B9 v2.5.1 requires MM 3.1.2.

Share this post


Link to post
Share on other sites
Posted (edited)

There's a 3.1.2? I just checked the MM page and it only has 3.1.1 up.

Edit: This is the stock KSP issue, no fault of B9PartSwitch. Still don't see this 3.1.2. you speak of though. :P

Edited by _Zee

Share this post


Link to post
Share on other sites
1 hour ago, _Zee said:

There's a 3.1.2? I just checked the MM page and it only has 3.1.1 up.

Edit: This is the stock KSP issue, no fault of B9PartSwitch. Still don't see this 3.1.2. you speak of though. :P

Wrong thread?

Share this post


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


This is all I'm finding?
 

Yes, that is the correct thread for ModuleManager related inquiries

Share this post


Link to post
Share on other sites
6 minutes ago, blowfish said:

Yes, that is the correct thread for ModuleManager related inquiries

I wasn't asking for MM help. I was responding to Brigadier's response to my initial post, 6 comments up.
Sorry for confusion.

Share this post


Link to post
Share on other sites
1 minute ago, _Zee said:

I wasn't asking for MM help. I was responding to Brigadier's response to my initial post, 6 comments up.
Sorry for confusion.

Ahh, missed some context since it wasn't quoted.  There is a ModuleManager 3.1.2, the thread title just hasn't been updated.  But B9PartSwitch doesn't depend on any specific ModuleManager version.  And yes, the issue is stock (though ModuleManager does some stuff which makes it worse)

Share this post


Link to post
Share on other sites

Hey @blowfish I've encountered a new problem on ksp. and this didn't happen the last time i launched a few days ago. It says check Logs, but i cant find anything mentioning this in the logs.

From Screenshot

B9PartSwitch - Fatal Error

B9PartSwitch has encountered a fatal error and KSP needs to close.

Fatal exception wile loading fields on module moduleB9PartSwitch on part dsak.ess.al

                                                                                                      Exception while loading field subtypes on type B9PartSwitch.ModuleB9PartSwitch

                                                                                                      Exception while loading fields on subtype PartSubtype Water

                                                                                                      Exception while loading field tankType on type B9PartSwitch.PartSubtype

                                                                                                      No tank type named 'DS_H20' exists

                                                                                                      Please see KSP's for addtional details

                                                                                         Yes KSP has that spelled wrong^^^^^

 

Share this post


Link to post
Share on other sites
3 hours ago, Lightning_Gamer said:

Hey @blowfish I've encountered a new problem on ksp. and this didn't happen the last time i launched a few days ago. It says check Logs, but i cant find anything mentioning this in the logs.

From Screenshot

Do you know what's supposed to provide the DS_H20 tank type?  Something is trying to use it but can't find it.  If you don't know I might be able to figure it out based on the log and ModuleManager.ConfigCache

Share this post


Link to post
Share on other sites
Posted (edited)
13 minutes ago, Lightning_Gamer said:

@blowfish No Idea

I have been informed it might be related to this

E: If that doesn't help then let me take a look at you KSP.log and ModuleManager.ConfigCache

Edited by blowfish

Share this post


Link to post
Share on other sites
On 1/5/2019 at 11:39 AM, Lightning_Gamer said:

Hey @blowfish I've encountered a new problem on ksp. and this didn't happen the last time i launched a few days ago. It says check Logs, but i cant find anything mentioning this in the logs.

From Screenshot

B9PartSwitch - Fatal Error

B9PartSwitch has encountered a fatal error and KSP needs to close.

Fatal exception wile loading fields on module moduleB9PartSwitch on part dsak.ess.al

                                                                                                      Exception while loading field subtypes on type B9PartSwitch.ModuleB9PartSwitch

                                                                                                      Exception while loading fields on subtype PartSubtype Water

                                                                                                      Exception while loading field tankType on type B9PartSwitch.PartSubtype

                                                                                                      No tank type named 'DS_H20' exists

                                                                                                      Please see KSP's for addtional details

                                                                                         Yes KSP has that spelled wrong^^^^^

 

Well I don't know what DS_H20 is but I had the same problem and it was spamming parts from station parts expansion redux. What I did was uninstalled b9part switcher after I had already built a ship and used some cargo containers from spx and changed the cargo which uses b9parts switcher.. Unintalling and reinstalling b9 didn't do anything but uninstalling reinstalling spx did the trick. Find the mod that has that part and reinstall it.

Edited by SpaceFoon

Share this post


Link to post
Share on other sites
4 hours ago, SpaceFoon said:

Well I don't know what DS_H20 is but I had the same problem and it was spamming parts from station parts expansion redux. What I did was uninstalled b9part switcher after I had already built a ship and used some cargo containers from spx and changed the cargo which uses b9parts switcher.. Unintalling and reinstalling b9 didn't do anything but uninstalling reinstalling spx did the trick. Find the mod that has that part and reinstall it.

That problem involves my mods (Deep sky Core, Thor Tech, Airline Kuisine-- the DS_xxx tank types are mine) and Angel-125's mods and their Classic Stock mode. This is when my mods are no longer in the same play mode as Angel-125's mods (likely caused by a manual update of my mods or CKAN restoring files in my mods that are disabled by the play mode switcher.

That said.....I can't begin to grasp how reinstalling SSPXr cured your problem.

Edited by JadeOfMaar

Share this post


Link to post
Share on other sites
On 1/31/2019 at 4:55 PM, JadeOfMaar said:

That problem involves my mods (Deep sky Core, Thor Tech, Airline Kuisine-- the DS_xxx tank types are mine) and Angel-125's mods and their Classic Stock mode. This is when my mods are no longer in the same play mode as Angel-125's mods (likely caused by a manual update of my mods or CKAN restoring files in my mods that are disabled by the play mode switcher.

That said.....I can't begin to grasp how reinstalling SSPXr cured your problem.

Oh yea I had Angels Pathfinder, Bison and Heisenberg installed. Was trying to cull my mods and when I deleted B9Partswitch then the SSPX parts I had already used started not working. Weird putting B9 back didn't work but putting B9 back and re installing SSPX did work. I believe the problem with SSPX may not have happened if I didn't build a craft with SSPX cargo containers and change what they hold to ore which uses B9 and even comes with it. Because B9 left behind some config for the part? I really don't know how any of this works but I'm not using CKAN.

Share this post


Link to post
Share on other sites

I'm wondering, can the deflectionLiftCoeff be changed for different part variants using B9PartSwitch? I don't see it mentioned anywhere but I thought I'd ask. 

Share this post


Link to post
Share on other sites
1 hour ago, Starlord Kerman said:

I'm wondering, can the deflectionLiftCoeff be changed for different part variants using B9PartSwitch? I don't see it mentioned anywhere but I thought I'd ask. 

No ... in general things inside of module can't be changed ... yet.  Might be some work on that in the near future.

Share this post


Link to post
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.