Jump to content

1.4 - Add Additional Part Variants?


Recommended Posts

In 1.4 now, you can change the design and model of certain parts (variants). Most parts have 2-3 basic stock variants, but I see some people on here, and on the internet, using much more. How can I add additional part variants to certain parts? I see in the VAB and SPH, when clicking on the arrow in the top left corner to open the sort parts page (not sure if this is the right name sorry), there's a tab with other variants, though I don't know how to add them to parts, or add more variants.

Thanks!

Link to comment
Share on other sites

18 hours ago, bewing said:

You need to create your own DDS texture, and then add it as a variant into the part's config file.

 

Any Tutorials on how exactly to do this? I'd like to make some custom part variants? I can make .dds texture files no problem, but I'm a bit lost digging around in the game files trying to figure out where everything needs to go.

Link to comment
Share on other sites

  • 2 weeks later...

i tried this one. but i doesnt work. probably my syntax is not correct.

i ignored location files in this one and i just "added" a new "themeName". i dont know if this is possible that easy.

@PART:HAS[#name[Size1p5_Tank_01]]:FINAL
{
	MODULE
	{
		VARIANT
		{
			name = Green
			displayName = Green
			themeName = Green
			primaryColor = #00ff00
			secondaryColor = #006600
			TEXTURE
			{
				mainTextureURL = GSSkins/Parts/FuelTank/Assets/Size1_5_Tanks_green
			}
		}
	}
}

 

Link to comment
Share on other sites

1 hour ago, KingPhantom said:

i tried this one. but i doesnt work. probably my syntax is not correct.

i ignored location files in this one and i just "added" a new "themeName". i dont know if this is possible that easy.


@PART:HAS[#name[Size1p5_Tank_01]]:FINAL
{
	MODULE
	{
		VARIANT
		{
			name = Green
			displayName = Green
			themeName = Green
			primaryColor = #00ff00
			secondaryColor = #006600
			TEXTURE
			{
				mainTextureURL = GSSkins/Parts/FuelTank/Assets/Size1_5_Tanks_green
			}
		}
	}
}

 

 

VariantThemes.cfg defines the variant themes, you'll want to add your new ones in there:
 

VARIANTTHEME
{
    name = Green
    displayName = #autoLOC_1234567 <- need to set this up in dictionary.cfg
    description = #autoLOC_7654321   <- need to set this up in dictionary.cfg
    primaryColor = #00ff00
    secondaryColor = #006600
}

 

Edited by klesh
Link to comment
Share on other sites

4 hours ago, Kurld said:

Does this approach work the same way for models as it does textures?

It appears you cannot change models using variants. You can only show or hide meshes within the existing model, and only the first model if the part is made up of multiple models. That said, there is no documentation, so perhaps you can and I simply haven't been able to figure out how.

Edited by Electrocutor
Link to comment
Share on other sites

OK, so one of the things I'd like to figure out how to do is make a variant of the Rocketdyne F-1 from my Saturn V parts pack so that I can have gimballing and non-gimballing versions without having to load up two separate part configs. The structures my model for the gimbal pistons/static struts are separate objects. I just show/hide the appropriate ones when exporting the two versions from Unity. So it sounds like it may be possible to do using the new methods?

Is there an example somewhere?

 

Link to comment
Share on other sites

21 hours ago, Kurld said:

OK, so one of the things I'd like to figure out how to do is make a variant of the Rocketdyne F-1 from my Saturn V parts pack so that I can have gimballing and non-gimballing versions without having to load up two separate part configs. The structures my model for the gimbal pistons/static struts are separate objects. I just show/hide the appropriate ones when exporting the two versions from Unity. So it sounds like it may be possible to do using the new methods?

Is there an example somewhere?

 

Gimbals are done through PartModules, which are part of the part-config, and variants do not allow you to change cfg properties. The showing and hiding of meshes within a model via PartVariant is visual only. These will have to be two separate parts, but I think it'd make more sense to just set gimbal to 0 via right-click.

Link to comment
Share on other sites

Yeah I was hoping to be able to simply change the visual mesh and then maybe as a bonus figure out a way to make the part gimbal or not..  I could do it with a plugin but I don't have that much time lately.

Link to comment
Share on other sites

  • 1 month later...

The less parts a mod introduces the better. We already have a major problem with in VAB/SPH lag and loading times due to the huge number of parts that you need to make the game experience worth it.

Thanks are a prime canditate for such a culling. Right now for example we could cut out about 20 cylindrical tank models by replacing it with one part that can go in diameter from 0.65m to 7.5m , it can vary it's heir to full , half , quarter and has about 5 textures white , orange , riggatoni white , some variants with black stripes Saturn V style and some variants with gold/silver foil.

The same treatment could be done to conic adapters tanks , nose cone tanks , round tanks and the MK2 / MK3 variants.

One part with multiple options in texture , size and length is the way to go.

Link to comment
Share on other sites

13 minutes ago, General Apocalypse said:

One part with multiple options in texture , size and length is the way to go.

Hello, and welcome to the forums!  :)

Interesting idea, but it won't work with the current implementation of variants, and getting it to work would be harder than you might think.

ModulePartVariant just allows providing a one-dimensional list of options.  e.g. "I have a part where I'm choosing between paint jobs... and nothing else changes".  Or, "I have a part where I'm picking one of a collection of shapes... and nothing else changes."

What you want is to have multi-dimensional variants, e.g. "here's one knob that picks a paint job, and here's another knob that picks the shape, and you can adjust those knobs independently of each other."

It doesn't work that way.  You only get one knob.  If you want to have "white, blue, or red" as available paint jobs, and "short, medium, or long" as available shapes, then you could model this as a variant with 9 options (white short, white medium, white long, blue short, blue medium, blue long, red short, red medium, red long)... but that would be a pain in the fundament for players, who would have to scroll past all these different options to pick just the one they want.  And it would also be a pain in the fundament for the modder, who would have to produce three different model variants and nine different texture variants.  And if you wanted to have yet another knob to turn (e.g. radius)... then the number of models and textures would just explode exponentially and it would become an unworkable mess.

Yes, it's possible to have independent knobs like you want... but only if the things being tweaked are completely independent of each other.  For example, yes, you could have one ModulePartVariant that picks a red, white, or blue texture... and you could have another ModulePartVariant that picks a short, medium, or long model.  Totally doable, and they'd show up as two variant-picker sliders for the part, and it would work.  ...Except for the fact that unless you have a very dull/uninteresting texture, the texture is generally carefully crafted to exactly match the shape of the part.  And your "pick a texture" knob doesn't know about the "pick a size" knob, and can't adjust.  The way parts and textures work, in most cases it would be hard to have a single "white" texture that would work on multiple sizes all using the same texture.  Yes, it's possible to make something work if you get clever with UV mapping and the like.  But it would put constraints on what kind of texture you could have.

And then there's the real kicker, which is that variants can only change the shape and the texture-- not the properties.  So even if you could have just a single "cylindrical fuel tank" with tons of variants... all those variants would have exactly the same mass, cost, amount of fuel contained, etc.

And that's really the crux of the matter.  What you're asking for is to have Swiss-army-knife "parts", where one "part" is really multiple parts with different properties.  And variants don't work that way.  It's not the design:  they're for changing appearance only.  If you want different properties, it's a different part.

Of course, you could say "I wish they'd change the way variants work so that they can change the properties" ... and that's a valid request.  However, it's actually a pretty hard design problem and it's not super obvious what the "right" answer would be-- a thing that one person likes would make matters worse for someone else.  (For example, as a player I happen to like having different fuel tanks as different objects with different buttons to choose from in the parts panel of the VAB, and I would hate it for my own gameplay if they were all collapsed into one object that I then had to pick the properties of.)

So it's a hard problem to solve.  I'm not saying that it would be impossible to improve the current design... simply that I haven't seen any specific, concrete, detailed suggestions that strike me as better, yet.

Link to comment
Share on other sites

Thank you very much for the welcome post and for your well written , well argued opinion. I am quite impressed with the quality of it.

I saw that Near Future has some options with his mod including for some tanks , or maybe it was another one using something called B9PartSwitch I believe ?

Anyway there is an implementation with size and while I agree that the implementation will be difficult it is a bit of a must. As for the cost there isn't much to it AFAIK since fuel costs tend to be quite huge. Maybe there should be a limit of the size with 1 part going from 0.65m, 1m, 2m; one for 3.75m, 5m, 7.5m and one for 10m, 15m and 20m. 

As for properties I agree that xenon holding tanks and tanks that are made from advanced materials should be lighter and more expensive. Overall if we end up with something like 18 different types of tanks for the entire game (with normal mods so no Interstellar stuff) that would be quite good.

Tanks are a prime target since they are already heavier than IRL and they don't present huge technical problems and polemics like engines or capsules. Plus the tanks sections gets overwhelmingly populated even in stock play let alone with mods.

To be quite honest it would be best if Prime Division or whoever handles the PC version updates would implement the base mechanism of multi-dimensional variants since that would guarantee some level of bug suppression within the code itself.



 

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...