• Whats in a Vessel Name?


    TriggerAu

    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"
    VesselNaming.png
     

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

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

    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

    • Like 54


    User Feedback

    Recommended Comments



    This is a nice system and sounds like it is well designed.

    But could it possibly be that it doesn't play nice with vessels made before this system was implemented?

    I just docked a new vessel (with these naming options set, priority of 5) with an old vessel (station which was built before this was implemented) and it changed the name of the station. Later, after undocking, I noticed the name on the part of the station was actually changed! Thats bad. Possibly a bug in there?

     

    Edited by klapstoelpiloot

    Share this comment


    Link to comment
    Share on other sites
    13 hours ago, klapstoelpiloot said:

    This is a nice system and sounds like it is well designed.

    But could it possibly be that it doesn't play nice with vessels made before this system was implemented?

    I just docked a new vessel (with these naming options set, priority of 5) with an old vessel (station which was built before this was implemented) and it changed the name of the station. Later, after undocking, I noticed the name on the part of the station was actually changed! Thats bad. Possibly a bug in there?

     

    Sounds like a bug, or a use case not thought of - If you can log a bug report with deets, save, etc and poke me back with the number that would be much appreciated

    Share this comment


    Link to comment
    Share on other sites
    On 5/7/2018 at 12:37 AM, TriggerAu said:

    Sounds like a bug, or a use case not thought of - If you can log a bug report with deets, save, etc and poke me back with the number that would be much appreciated

    I fixed the problem by editing persistent.sfs and copying the VESSELNAMING structure from a newly made vessel to my (old) space station. So I don't have a 'broken' environment anymore for you to reproduce this. But you can probably reproduce this easily using these steps:

    • Make 2 vessels, with different naming settings
    • Remove the VESSELNAMING structure from 1 vessel
    • Dock the 2 vessels
    • Undock the 2 vessels
    • Observe the name of the vessel without VESSELNAMING structure

     

    Share this comment


    Link to comment
    Share on other sites

    I'm loving this new feature in 1.4! It's a long wanted feature that I couldn't solve properly with mods.

    I had installed a mod that was meant to do that one point... Persistent Dynamic Pod Names. But it didn't work well, at least with my designs.

    The only issue I have, is with craft made / launched before 1.4. They all are given the names of the new craft I dock to them, for the time they remain docked. As I can't edit the vessel naming priorities for in-flight craft, the only way to fix this is to edit the savefile to include a VESSELNAMING structure for them with adequate priorities (e.g. for stations).

    I don't see a reason why it couldn't be done in flight, but I'm already looking forward for a mod that adds that feature also to the currently active vessel. :D

    Share this comment


    Link to comment
    Share on other sites

    Sound slike the handling of a default name isnt quite  right - lemme see if I can tune that.

     

    On 5/10/2018 at 11:59 PM, 81ninja said:

    I don't see a reason why it couldn't be done in flight, but I'm already looking forward for a mod that adds that feature also to the currently active vessel. :D

    Done that one for ya already

    Quote

     

    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


     

     

     

     

    • Like 3

    Share this comment


    Link to comment
    Share on other sites

    I honestly liked this feature of 1.4!  It is so helpful when you are doing a Mun Mission:D

    • Like 1

    Share this comment


    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now