Jump to content

[1.12.x] VariantPersist v1.1: Automatically remembers your choices. Per part, per game.


Snark

Recommended Posts

What it does

When you choose a "default variant" in the editor (by clicking the little "teardrop" icon), this mod automatically saves that preference in the .sfs game file.

That way, the next time you play KSP, your choices will still be there, and you don't have to go around re-setting them every single time you play.

There's no UI, and nothing for you to do. It's silent, invisible, and automatic.

(Your choices are saved per-game, so if you're running multiple games, each one starts "fresh" and your choices are remembered in each one separately.)

Download from SpaceDock
License: MIT
Source code

DefaultVariants.png

 

Why would anyone want this?

I have definite preferences about which part variants I like best. Mk1 command pod? I want the white-with-gray-stripe look, every time. Hammer SRB? I want the one with the orange stripe. And so forth.

I like that the game has the ability for me to pick my "preferred default" (the little teardrop icon in the part panel in the VAB or SPH) so that I don't have to set it for every single part, every single time I place a part. However... the game doesn't remember my choices between play sessions!

Oh, it remembers my choices if I exit and re-enter the VAB. It even remembers them if I exit to the main menu and then load my game again. But as soon as I exit KSP, it forgets all my preferences and I have to re-do them the next time I play. It's downright aggravating to have to go through that every time.

So, I wrote this little mod so that it'll just automatically do what I wish the game did by default, which is to remember my darn choices.

 

How to install

Unzip the contents of "GameData" to your GameData folder, same as with most mods.

 

But what about <mumble mumble editor themes mumble mumble> ?

KSP has an editor feature called "themes", which you can access via the "advanced" menu in the vehicle editor. I gather that the idea is that it allows you to set an overall "theme" so that you can make your whole rocket be white, or your whole rocket be gray/orange, or what-have-you.

IMPORTANT: I have made no attempt whatsoever to make this mod play nice with the "themes" feature. Haven't coded it, haven't tested it, haven't even looked at it.

The "theme" feature in KSP is one of those ideas that sounds kinda cool "on paper", I suppose... but I find that in practice, it's absolutely useless to me. I find the UI confusing, and the in-game behavior counter-intuitive; I've tried tinkering with the feature in the game and it ended up merely confusing and frustrating me.

Furthermore... I don't actually have any use for the feature. "Themes" are not how I play KSP. I think in terms of parts, not "themes": that is, for each part, I have one particular variant that's my favorite "look" for that part, and I usually want that part to have that look. So a feature that goes through and sets all the parts to have the same theme is useless to me.

Therefore, in my own gameplay, I basically just pretend that that feature doesn't exist. So I wrote this mod to make the game do what I want it to do.

I have no idea what this mod will do if you also use the "themes" feature-- maybe it's fine, or maybe they interfere with each other. Don't know, don't care.

Therefore: if you are a player who likes to use the editor's "themes" feature, then this mod may not be for you.

Link to comment
Share on other sites

  • 9 months later...
  • 2 months later...
  • 5 months later...

Hello! I'm running this in 1.9.1 so I'm already voiding the warranty, but VariantPersist used to be working for me and it recently stopped after I did some reinstalling of mods and editing my save. Do you have any suggestions I could try to get working again, or is it best to wait for an official release?

Edited by Avera9eJoe
Link to comment
Share on other sites

On 4/1/2020 at 5:58 AM, Avera9eJoe said:

Hello! I'm running this in 1.9.1 so I'm already voiding the warranty, but VariantPersist used to be working for me and it recently stopped after I did some reinstalling of mods and editing my save. Do you have any suggestions I could try to get working again, or is it best to wait for an official release?

Hmmm, how vexing.  I wouldn't have expected stuff to break a lot going 1.8.x -> 1.9.x, as I don't think that was a major internal disruption to the KSP code.

Alas, I haven't been in a position to directly help right at the moment, as I haven't actually played 1.9.x yet (it arrived when I was right in the middle of a 1.8.x Kopernicus game, and Kopernicus hasn't updated to 1.9.x yet so I haven't updated.  And haven't had a lot of spare time to debug what's going on.

I don't have any suggestions-- would have to take a look at it myself and debug what's going on to have any idea.  IRL has been really busy lately, which is why I've been a bit scarce.

TYVM for the heads-up, though-- I'll have a look as soon as I'm able, just not sure when is all.

Link to comment
Share on other sites

It could be that I've been reverting in my save to an older save that didn't have the variants gathered yet:

dZ0KOFo.png

There aren't many listed in my persistent file, so perhaps I just need to pick them, and then quicksave

Link to comment
Share on other sites

16 hours ago, Agustin said:

does this work for pbr shaders? I have TURD installed and it would be great if it worked for that.

Shaders simply aren't relevant.  This is about variants, which is a KSP game concept.  It remembers what variant is used, that's all.  The mod neither knows nor cares that there's such a thing as a "model", or a "shader", or a "texture", or anything else.  All it does is, it knows that "this part has variants named 'A', 'B', and 'C', and I remember which one of those was chosen."  That's all.

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