Spherical System Group Efficiency Bonus

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    To reduce spaghetti ship systems, I recommend a slight bonus with a group of system blocks grouped tightly inside a sphere containing the entire system group. The bonus should be pretty small, to avoid unnecessary restriction on ship system design.



    To avoid combat-lag, I recommend that the bonus calculations should only be done in build-mode or otherwise non-laggy ship modification situations. This eliminate any potential for an enemy to "reshape" their target's systems via combat to toy with them as a griefing method.

    There should probably also be a server variable that determines how many blocks in the group need to be destroyed before the group becomes nonfunctional. For example, if you blow away half the reactor of your opponent, it wouldn't damage the efficiency under this system. The remaining half-count of reactor blocks would continue to produce at the original efficiency, so they would still be generating half the power of the original reactor group. On the other hand, if the group-damage-threshold is set to 50% (0.5), then that same reactor that has been blown in half will stop functioning altogether, which is an expected result. Under normal circumstances, when you destroy half of a reactor, the remaining half is now scrap.

    In many cases, the optimum shape for a group should probably be a sphere with a hole through it, to allow walkways or pass-throughs for conduits or other desired "small cuts" in the shape.



    This would be a great way to make a reactor that looks like a reactor bottle, more-or-less. It would also be a great way to add even greater relevance to the spherical and cylindrical build helpers.

    Similarly, maybe an algorithm could be designed to calculate bonuses based on a flat-faced sphere, to allow more template-friendly designs.



    An algorithm to cover all these scenarios could involve calculating the voxel volume of a sphere containing the group, and then calculating a large fraction of that volume, say 4/5. This would allow a spherical group to remain at maximum efficiency if it contains either a pass-through hole, or a "core" hole. Similarly, if the hole size is calculated, and then the voxel count is then multiplied by the distance of the center of the "hole" sphere from the center of the group sphere, the results of which would be subtracted from the efficiency calculation result, that would encourage centralized holes, and discourage swiss-cheese system groups that are time-consuming, less-builder-efficient, missile-resistant, and weird.

    Distance of the hole from the center of the group is zero, so this shape is still 100% efficient for the effect of added system efficiency.


    Since the hole in this geometry is offset from the center, it is less efficient, resulting in a reduced efficiency bonus.
     
    Joined
    Feb 27, 2014
    Messages
    1,074
    Reaction score
    504
    • Purchased!
    • Legacy Citizen 4
    • Top Forum Contributor
    Has anyone actually seen a spaghetti ship yet?
    Are you meaning built in the new power system:? There were a number built in the old one.
    It certiantly is possible, but thankfuuly the majority of players find them repulsive and can't be bothered with them (except for science).
    It requires about 5 minutes more thought and a bit more blocks to build one now.

    The op, certiantly an intersting suggestion.
    If it is being implimented to counter SpaghMonsters though, the main issues there are it's absue of damage mechanics, AI aiming and design. Power isn't a big deal for them unless it is significantly impacted.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    ...
    If it is being implimented to counter SpaghMonsters though, the main issues there are it's absue of damage mechanics, AI aiming and design. Power isn't a big deal for them unless it is significantly impacted.
    In addition to battling spaghetti and (worse!) scatter-cloud designs, I have an ulterior motive involving the new power system. (Dun dun dun!)

    I wanted to see this become the baseline for a reactor system where the stabilizers have to be built in a shell directly around a round-ish reactor. Maybe with a space or two between the surface of the reactor and the inner surface of the stabilizer shell.

    I am a big fan of classic sci fi movies, so I keep thinking that I want a reactor to normally be this big, massive, localized bulk-system group, like a boiler, which basically starts and ends at the feed lines. I don't like encouraging the reactor to reach all over the place like string reactors in V1 or distant stabilizers in V2.
     
    Joined
    Aug 23, 2016
    Messages
    758
    Reaction score
    129
    Well you didn't say how to calculate the bonus, and it wouldn't be suitable for systems like shields or thrusters for example, but I'd like to see this concept applied to reactors, because it would disrupt spaghetti meta to some degree. So I've liked it.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    Actually, shields and thrusters could enjoy tight-grouping bonuses. Maybe it could be reduced, so that they can still be used as filler blocks, without much heartache.

    Code:
    //  Pseudocode for calculating a bonus multiplier.
    
    //  This software will undoubtedly have
    //  some sort of function or method
    //  that will get the dimensions of a group
    
    // Givens calculated during building:
    //  Group_Block_Count
    //  Group_Mass
    //  Group_Len_X, Y, Z
    //  Group_Min_X, Y, Z
    //  Group_Max_X, Y, Z
    
    Group_Center_Coordinate = ((Group_Max_X-Group_Min_X), (Group_Max_Y-Group_Min_Y), (Group_Max_Z-Group_Min_Z))
    
    Group_Diameter = ceil(sqrt((Group_Max_X-Group_Min_X)**2 + (Group_Max_Y-Group_Min_Y)**2 + (Group_Max_Z-Group_Min_Z)**2))
    
    // The radius can be an integer or a float with a .5
    Group_Radius = (Group_Diameter / 2)
    
    // Use the program's built-in functions to get
    // voxel volume by creating a new entity
    // consisting entirely of area triggers
    // aligned and centered on the current group
    // using the sphere build-helper,
    // count the voxels generated in this spherical group
    // remove the new entity, and return
    Group_Sphere_Volume_Count = sphere_volume_count_function_or_method (Group_Center_Coordinate,Group_Diameter,Group_Diameter,Group_Diameter)
    
    // Repeat for all the multi-voxel "holes"
    // Calculate distances from hole center
    // to group center. If distance = 0, discard
    // else, multiply block count of hole by
    // hole center distance, and multiply by
    // config Sphere_Hole_Offset_Bonus_Multiplier
    
    Group_Min_Bonus_Count = Group_Sphere_Volume_Count * 4 / 5
    
    Group_Bonus_Ratio = Group_Block_Count / Group_Min_Bonus_Count
    
    // Given from config variables
    //  Sphere_Bonus_Ratio_Min
    //  Sphere_Bonus_Ratio_Max
    //  validated so that Min < Max
    //  else default to 0.5 and 1.0
    
    If Group_Bonus_Ratio > Sphere_Bonus_Ratio_Max
    Group_Bonus_Ratio = Sphere_Bonus_Ratio_Max
    
    // Subtract all hole "bonuses"
    //  from Group_Bonus_Ratio
    
    If Group_Bonus_Ratio < Sphere_Bonus_Ratio_Min
    Group_Bonus_Ratio = Sphere_Bonus_Ratio_Min
    
    // Given from config variables
    //  a list of block types (shields and thrusters by default)
    //  to reduce the bonus and
    //  another list of block types (?)
    //  to increase the bonus
    //  a list of block types
    //  and a bonus multiplier for each (E.g. 0.5 and 1.5)
    If Group_Type IN (Group_Less_Bonus_List)
    Group_Bonus_Multiplier = 1 + (Group_Bonus_Ratio * Group_Less_Bonus_Multiplier)
    ElseIf GroupType IN (Group_More_Bonus_List)
    Group_Bonus_Multiplier = 1 + (Group_Bonus_Ratio * Group_More_Bonus_Multiplier)
    Else
    Group_Bonus_Multiplier = 1 + Group_Bonus_Ratio
     
    Joined
    Aug 23, 2016
    Messages
    758
    Reaction score
    129
    Actually, shields and thrusters could enjoy tight-grouping bonuses. Maybe it could be reduced, so that they can still be used as filler blocks, without much heartache.
    Many people like to line hulls with shield blocks (which makes sense to some degree of "realism" seeing as that is where they act), so that would be a big change that probably wouldn't be very welcome.

    I like the idea of a "perfect" reactor being a sphere, but a perfect thruster group looking like a sphere would feel very strange...
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    Many people like to line hulls with shield blocks (which makes sense to some degree of "realism" seeing as that is where they act), so that would be a big change than probably wouldn't be very welcome.

    I like the idea of a "perfect" reactor being a sphere, but a perfect thruster group looking like a sphere would feel very strange...
    Yeah, but rectangle bonuses would be attacked as promoting doom cubes. Meh. Whatever.

    You could set the new Group_Less_Bonus_Multiplier config option to zero (0.0) as a default instead of 0.5 and those filler/subsurface blocks will be fine. Thrusters and shields would no longer get any bonus for grouping.