1. Hello Guest!
    Welcome to the Bug Report forum, please make sure you search for your problem before posting here. If you post a duplicate (that you post the same issue while other people have already done that before) you will be given a warning point which can eventually lead into account limitations !

    Here you can find a guide on how to post a good bug report thread.
    Space Engineers version --- Medieval Engineers version
  2. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

[1.121.10] Jump distance is improperly divided between number of attached ships with landing gears

Discussion in 'Bug Reports' started by Iliurgul, Feb 7, 2016.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Iliurgul

    Iliurgul Trainee Engineer

    Messages:
    15
    EDIT: Solved in 01.133

    This bug happens when you have a ship with Jump Drives and then attach other ship using the landing gear. Normally when two ships are connected (by a connector or attaching a rotor) the mass is added and the max jump distance decrease a bit. But when a landing gear is locked, the max jump distance is drastically divided between the number of ships that are attached by landing gears.

    In example (Being Ship1 a +5.000.000kg whit severals Jump Drives, and Ship2 a small ship with 120.000kg):
    -Ship1 has aprox 3300km of max jump
    -Ship1 with Ship2 connected using connector has a bit less than 3300km of max jump
    -Ship1 with Ship2 attached has aprox 1650km of max jump (3300/2)
    -Ship1 whit two of Ship2 attached has aprox 1080km of max jump (3300/3)
    -Ship1 with three of Ship2 attached has aprox 800km of max jump (3300/4)

    Conclusion: The max jump of a ship with X ships attached is divided by each other ship
    -CurrentMaxJump = MaxJump/(1+NºofAttachedShips)

    Two screenshots of the example:

    Ship2 is connected in the hangar of Ship1, but the landing gear is not locked, the Jump distance is a bit less than 3300km:
    [​IMG]

    Now the landing gear has been locked, and the Jump distance has been halved:
    [​IMG]


    Observations:
    -Doesn't matter which ship has the locked landing gear, the jump distance is decreased anyway.
    -Doesn't matter large or small ships.
    -If Ship1 is connected (by connector) to Ship2, then Ship3 is attached (by landing gear) to Ship2, te jump distance of Ship1 is correctly decreased a bit, and no divided.
    -This happens in creative, survival, singleplayer or dedicated server.
     
    Last edited: May 5, 2016
  2. Iliurgul

    Iliurgul Trainee Engineer

    Messages:
    15
    This bug persists in 1.121.10
     
  3. plaYer2k

    plaYer2k Master Engineer

    Messages:
    3,160
    Yeah this bug exists for a very long time. In fact it exists since 01.101 afaik ("landing gear fix").
    Though i thought it got fixed but might snuk back into the game again when planets released like some other bugs.

    Let me quote myself from 2015-11-02, which is the oldest reference i could find
    That sadly makes jump drives for carrier pretty useless.
     
    • Informative Informative x 2
  4. Iliurgul

    Iliurgul Trainee Engineer

    Messages:
    15
    I suspected that the landing gear update would be the reason, thanks for the reply.
    I hope that KSH can solve this bug, is incredibly annoying do in every large jump detach each ship, connect with the connector, then jump, and after reattach all to avoid problems with bugged connectors and small ships smashing your carrier from the inside.
     
  5. Beyogi

    Beyogi Trainee Engineer

    Messages:
    56
    Wait? Connectors work during jumps? I had this interesting effect where I jumped with my mining ship connected and the mining ship was left behind. not cool
     
  6. plaYer2k

    plaYer2k Master Engineer

    Messages:
    3,160
    Alright i could finally update to the latest version and noticed that the bug is still present.

    I have fixed the bug within the 01.125 source code from git by replacing the default GetMass function the following modification:

    Code:
            private double GetMass()
            {
                double mass = 0f;
                Sandbox.Engine.Physics.MyPhysicsBody weldParent;
    
                foreach (var grid in m_connectedGrids)
                {
                    // Get the weld parent for each grid and only add the mass if the grid has no parent or it is the root (it is its own parent).
                    weldParent = grid.Physics.WeldInfo.Parent;
                    if(weldParent == null || weldParent == grid.Physics)
                        mass += grid.Physics.Mass;
                }
                return mass;
            }
    
    @Phand @Drui I am highlighting youse for some attention to confirm or reject this tiny fix. That is unless it was intended to fix it otherwise like through reducing the individual grids mass when welding them together by the number of grids that weld together.


    To recap again.

    The bug is that when grids weld together (landing gear lock or piston/rotor weld) their mass gets set to the sum of all weld together grid.
    The side effect of that was that when you weld 10 grids with each 10 000 kg together each individual grid then has a mass of 100 000 kg (10x 10 000 kg).
    The jump drive GetMass function however was simply iterating through all grids and sum the masses up. The result was highly inflated masses for welded grids.
    This was especially annoying for cargo ships with jump drives when the fighters lock onto the cargo ship through landing gears. Thus a very high mass carrier with maybe 5 mil kg to which 4 fighters with each merely 10 000 kg lock would suddenly get the jump range characteristic of a 25 mil kg carrier.

    The easiest way to reproduce this is by having a grid with jump drive, cockit reactor and rotor as well as enough mass (i.e. heavy armor blocks) so that the mass is high enough to push the range below the 2000 km mark.
    Then if the rotor is not weld the range will be C < 2000 km. However as soon as the rotors weld option is enabled the jump range becomes C/2.



    There also is another thing that would be nice to get a fix in the same class.

    Code:
    result.Append("Weight of transported mass: ").Append(MyHud.ShipInfo.Mass.ToString("N")).Append(" kg\n");
    
    should be
    Code:
    result.Append("Transported mass: ").Append(MyHud.ShipInfo.Mass.ToString("N")).Append(" kg\n");
    
    Weight [N] is mass [kg] multiplied by gravitational acceleration [m/s²].
    The "laymans weight" here would be redundant because it is correctly refered to mass anyway and thus it would be redundant as well an "engineering game" should use proper terms in general.
     
    • Like Like x 1
  7. plaYer2k

    plaYer2k Master Engineer

    Messages:
    3,160
  8. EEBKiller

    EEBKiller Trainee Engineer

    Messages:
    36
  9. Iliurgul

    Iliurgul Trainee Engineer

    Messages:
    15
    Fixed with the last update 01.133 and connector welding, although in the same ship of the example now the jump distance is 2830km, before was of 32830km :S
     
  10. plaYer2k

    plaYer2k Master Engineer

    Messages:
    3,160
    How many jump drives do you have?
    Using my formula i get ~2830 km range for ~5 300 000 kg mass and 6 jump drives. With 7 jump drives however it is ~3300 km.

    Maybe one of the JDs is charging, defective or disabled?
     
    • Informative Informative x 1
  11. Iliurgul

    Iliurgul Trainee Engineer

    Messages:
    15
    Ups, I forgot remove all the cargo yesterday, it was 979 tons of cargo jejeje. Mistery solved, now is 3.362 km of jump with 7 jump drives in a grid mass of 5.205.178 kg
     
Thread Status:
This last post in this thread was made more than 31 days old.