BP pointers for Ships & Stations

    Joined
    Jan 31, 2015
    Messages
    1,696
    Reaction score
    1,199
    • Thinking Positive
    • Likeable
    Suggestion: Every entity spawned from a blueprint or saved to a blueprint, sets in its code a single, semi-static pointer referring to that BP (either the one it was spawned from, or the most recent BP it was saved as).

    Purpose: Streamlined repairs in shipyards by allowing a damaged ship to be repaired (deleted & re-spawned, actually, retaining permissions & name) from its original/latest BP, shipyard supply permitting.

    The pointer would be extremely easy to implement and is calculation free unless the ship is then saved as another BP in which case the pointer is instantly changed to refer to the newer BP then reverts to being a static pointer, just pointing at that BP.

    When a shipyard attempts to repair a damaged ship, it then looks for the pointer, assess the total blocks required to build it (including turrets) and subtracts the the remaining un-destroyed blocks currently on the ship from those figures. The remainder (representing the destroyed blocks that need replacement) is then the "cost" of repair (a confirmation dialogue to the player might be desirable at this point). The shipyard could then simply delete the repair cost from its linked storage/shop, delete the entire damaged entity and all docked entities under it, and re-spawn from the BP in question.

    It would be super nice if shops could do this with their paid repair feature too - charging repair costs based on the block difference multiplied by the shops' prices for those blocks plus a service fee, or if player shipyards could 'order' additional needed blocks for a hefty markup.
     
    Joined
    Aug 23, 2016
    Messages
    758
    Reaction score
    129
    The end effect sounds good and desirable, but how can you make this reliable? Presumably not all BPs are always loaded in memory, and even if they were their location would change on reset, so I assume your pointer is in fact a BP name and/or path, but there's no gaurantee the blueprints for every ship on a server will always be there - a BP can be removed, even if the ships linked to it are stilll in use.

    To get the result described you'd need to save a copy of the BP with every instance/ship built from it (which I think should be done).
     

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    The end effect sounds good and desirable, but how can you make this reliable? Presumably not all BPs are always loaded in memory, and even if they were their location would change on reset, so I assume your pointer is in fact a BP name and/or path, but there's no gaurantee the blueprints for every ship on a server will always be there - a BP can be removed, even if the ships linked to it are stilll in use.

    To get the result described you'd need to save a copy of the BP with every instance/ship built from it (which I think should be done).
    Don't think of it like a C pointer, its likely to be. This ship is this BP. Schemas talked about this. We should be able to do this for every entity. This allows all sorts of repairs.
     
    Joined
    Jan 31, 2015
    Messages
    1,696
    Reaction score
    1,199
    • Thinking Positive
    • Likeable
    The end effect sounds good and desirable, but how can you make this reliable? Presumably not all BPs are always loaded in memory, and even if they were their location would change on reset, so I assume your pointer is in fact a BP name and/or path, but there's no gaurantee the blueprints for every ship on a server will always be there - a BP can be removed, even if the ships linked to it are stilll in use.

    To get the result described you'd need to save a copy of the BP with every instance/ship built from it (which I think should be done).
    To be honest, I'm fine with non-BP related ships not being able to be repaired the same way. Also, if you spawn in a ship then delete the BP knowing you need it to repair from, well... I don't think we need to worry about protecting people from their own lack of foresight. Also, if you just load the same BP with the same name back in...

    Come to think of it, this could form the basis for an upgrade system as well, since it should be possible to tell a shipyard to 'upgrade' a docked ship to another design or BP and have it do so simply subtracting the difference (which would be grand, if you have several interrelated BPs all using the same core components).
     
    • Like
    Reactions: Panpiper

    nightrune

    Wizard/Developer/Project Manager
    Joined
    May 11, 2015
    Messages
    1,324
    Reaction score
    577
    • Schine
    • Top Forum Contributor
    • Thinking Positive
    To be honest, I'm fine with non-BP related ships not being able to be repaired the same way. Also, if you spawn in a ship then delete the BP knowing you need it to repair from, well... I don't think we need to worry about protecting people from their own lack of foresight. Also, if you just load the same BP with the same name back in...

    Come to think of it, this could form the basis for an upgrade system as well, since it should be possible to tell a shipyard to 'upgrade' a docked ship to another design or BP and have it do so simply subtracting the difference (which would be grand, if you have several interrelated BPs all using the same core components).
    This was my idea when I suggested station upgrades in this thread: Recognized - Station Upgrades
     

    alterintel

    moderator
    Joined
    May 24, 2015
    Messages
    869
    Reaction score
    596
    • Likeable
    • Community Content - Bronze 2
    • Legacy Citizen 3
    This is a very good idea, and I do hope that something is implemented soon to address ship repairs.

    I personally like the idea of block HP going to zero, vs getting destroyed. Once a block is reduced to zero HP, it becomes intangible and no longer interacts with the rest of the world. Think of it as a ghost block. Then it becomes a very simple matter of replenishing HP to repair the block.