Spawned/Sub-entity naming

    Joined
    Dec 5, 2015
    Messages
    108
    Reaction score
    58
    • Community Content - Bronze 1
    So, when admin spawning a ship without changing the name (or encountering an npc ship), the name generally follows the format of [faction or player name][long string of numbers]. The same seems to occur when spawning a ship with sub-entities (docks and turrets) even when changing the name. Is there a way to "set" the names of sub-entities (for example, showing turrets as [parent ship name] Turret #)?
     
    Joined
    Sep 29, 2013
    Messages
    434
    Reaction score
    1,614
    • Master Builder Silver
    • Competition Winner - Small Fleets
    • Legacy Citizen 8
    You could rename them by hand. It will not save in a blueprint though.
     

    DrTarDIS

    Eldrich Timelord
    Joined
    Jan 16, 2014
    Messages
    1,116
    Reaction score
    310
    Mod fodder.
    I'm sure the part of the code that names entities can be changed. Question is if QOL is worth it?

    If I Recall Correctly: Turret-docks get the _R# designation, and anything on a rail dock gets the old _l# designation. Far to lazy to unzip and run and doublecheck though (feel free to do it and attach pictures). Both cases it's from the legacy code of the old red and green docks, turret docks being RED for the _r designation and ship/shuttle docks being GREEN getting _l because "lime green" ? Could be wrong, but it's there to check in the archive.

    IIRC; the entity numbers are not random, they are a date+time stamp based on server time at the moment "entity creation/spawn" was requested. Think it's YYYYMMDDHHmmSSFF (Y=year, M=month, D=day, H=24hour, m=minute, S=second, F=frame).

    I don't think it would take much to change the generation script to make "_r" become "_turret" and "_l" become "_dock."

    It could be a bit of a pain since that code wasn't designed for the multiple-axis way turrets changed to from the old single-stage Red Docks to the new 2+axis method. That's why you'll see the barrel of modern-spawn ships showing up as _r#_r1 while the "base" shows up as only _r1. Something might need to be added to the loop so it changes names to "_base" and "_barrel" with an fallback recursive to things more than 2 turet-docks deep.

    Not sure if it would be a significant Quality Of Life patch...even my mostly abandoned signature-link-ship has a ridiculous number of docked entities for it's fancy sliding doors, as well as a bunch of docked sub-ships. Finding a way to chose a different _whatever addendum could be a pain.

    Then again, including sub-entity names in a blueprint and having THOSE as the "_whatever" addition when spawned could be a way to do it while only adding a couple kilobytes to file size.
     
    Joined
    Dec 5, 2015
    Messages
    108
    Reaction score
    58
    • Community Content - Bronze 1
    Alright. Any idea where that part of the code might be? I've been looking but haven't found it yet