As we worked on some of the historically inspired missions for Making History we came back across one of our old favorite challenges - how to name portions of a vessel. So I thought I would share some information about what we looked at and where we ended up with respect to the new Vessel Naming additions in KSP 1.4.
The Problem
In KSP you build (and sometimes even save) a series of craft, which when launched become vessels in the game. So you build your magical Kerpollo 11 craft, send it to the launchpad, fire off the main engines, explode on the pad, revert to the VAB, adjust a bit more, launch again, lift off, flip due to misplaced aero parts, plummet to the ground, explode in a different place, revert to VAB... alright admittedly this is how my game usually goes and I should maybe skip to the actual naming stuff...
So we launch our sufficiently tested Kerpollo 11 and as we stage off used sections they get automagically named Kerpollo 11 Debris, or Kerpollo 11 Probe, and we end up once we reach the Mun and land with our Lander on the Mun called Kerpollo 11 and a half dozen other Kerpollo xxxx variations around the solar system. And then there's the always fun, rover scenario, where when you deploy the rover it’s called Shipname pod of the wrong type. As we were implementing some of the Making History missions we really wanted to adjust this behavior so we could name sections of a vessel and the CSM could be Kerpollo 11, the Lander "The Beagle" (cause the beagle has landed made me chuckle), and so on...
After a quick brainstorm we came up with following solution: we’d simply change the structure so that a vessel would be made up of component parts, let’s call em vehicles, and each vehicle would have its own name... After a quick run through in a few people’s heads we then went and gave ourselves a long talking to, because while that would be a great way to do vessel naming, it would also change one of the fundamental constructs in the game, and all the knock on effects that would have for us, for the players with their existing saves, the modders with other components. And even if that worked, to solve part vessel naming and some other challenges... we still have to handle the dock/undock process
So using our alternate thinking strategy - aka Nestor telling us to try again - we worked through a few items and came up with the following:
- Each part can have a name, and type assigned to it
- Each naming preference can have a priority, so when more than one part in a vessel has a name assigned to it we can work out the vessel name
- When the vessel changes - docking, undocking, staging, we can then reassess the assigned names to determine what each vessel should be called
This idea turns out to be quite a simple solution, while also not affecting any existing systems or structures that would mean impacting players and modders.
So what does this look like in the game?
On any command module during construction you can open the Part Action Window and choose "Configure Vessel Naming"
Here we can set a name, set the type that will be assigned and a priority - the higher the priority the more importance this name has over others of lower priority
So if we look at an example of how this might work in a larger vessel, some photo manipulation magic lets me show you this
In the example we can see
A = Red Buggy and is a Rover (Priority 8)
B = Yellow Buggy and is Debris (Priority 10)
C = Blue Buggy and is a Rover (Priority 12)
So when we save and Launch this vessel (A+B+C) it will be a Rover called Blue Buggy
If we then undock A we will have:
- A = Rover called Red Buggy
- B+C = Rover called Blue Buggy
Undock C from B and then dock it with A and we have
- A + C = Rover called Blue Buggy
- B = Debris called Yellow (and cause its debris it will be uncontrollable - yes that caught me out too)
Through this hopefully you can get the names you want on the vessels you want right from the Editor.
Extra Credit...
...or at least I hope I get credit!
By default this option only shows for Command Modules like the original rename vessel option and only in the editor (VAB/SPH), but if you want to extend that behavior then this info could be useful.
If you add this to a parts cfg file then it too will have that option appear in editor
showVesselNaming = True
If you change this setting in settings.cfg to be true then the configure vessel naming option will show for parts configured when in flight mode
SHOW_VESSEL_NAMING_IN_FLIGHT = True
You can also configure the maximum number of priorities and the default priority from the settings.cfg
Hope you've enjoyed this story on some of the development or 1.4.
Edited by TriggerAu
images and editing
Recommended Comments