LISTINGS09 / ZEI

Zeus/Eden Interiors
8 stars 8 forks source link

Stuff Hovering #9

Closed LarsAsprah closed 5 years ago

LarsAsprah commented 5 years ago

Been using your templates for a personal version of TPW Furniture and noticed that the Z offset for objects in certain buildings are off, making stuff hover a few inches off the floor.

Here's the fixed code:

case "Land_i_Shop_01_V1_F";
case "Land_i_Shop_01_V3_F";
case "Land_u_Shop_01_V1_F": {

    _templates = [
        [["Land_Metal_rack_F",[-3.625,1,-2.88227],270],["Land_Icebox_F",[-2.75,-1.875,-2.88227],0],["Land_OfficeCabinet_02_F",[-3.49976,-0.625,0.989478],270],["Land_Ground_sheet_folded_F",[-3.33691,3.36182,1.1817],15],["Land_Sleeping_bag_brown_folded_F",[-3.31128,2.98926,1.17681],315],["Land_WoodenCounter_01_F",[-3.40454,2.41406,0.989445],90],["Land_Pillow_camouflage_F",[-3.30542,1.52539,1.94944],30],["Land_Map_unfolded_F",[-3.1626,2.06787,1.91948],285],["Land_ChairWood_F",[-2.52319,2.11316,1.09085],80],["Land_Can_V1_F",[-3.61548,1.11816,-1.88353],154],["Land_Tableware_01_stackOfNapkins_F",[-3.61548,1.3208,-1.88343],195],["Land_Can_Dented_F",[-3.61548,0.597656,-2.33624],223],["Land_Tableware_01_cup_F",[-3.61548,0.597656,-2.78438],102],["Land_BakedBeans_F",[-3.61548,1.28076,-2.78362],172],["Land_ChairWood_F",[1.53101,-0.229614,0.988916],140],["Land_Icebox_F",[1.5,1.875,-2.88227],90],["Land_BarrelWater_grey_F",[1.58057,4.22168,0.987677],255]]
        ,[["Fridge_01_closed_F",[-2.94141,3.82227,0.989281],314],["Land_Can_Rusty_F",[-3.48828,0.268066,-2.29203],60],["Land_PlasticBucket_01_open_F",[-3.40454,2.43115,0.989445],285],["Land_Pillow_camouflage_F",[-2.36987,-1.20947,1.01341],0,[359.556,359.601,0]],["Land_FlowerPot_01_F",[-1.49146,-3.21582,-2.91888],0],["Land_Sack_F",[-3.27954,1.68115,0.989401],285],["Land_BottlePlastic_V2_F",[-3.47607,0.467285,-2.28941],15],["Land_Sleeping_bag_blue_F",[-2.94507,-0.438965,0.989282],165],["Land_Icebox_F",[-3.27954,0.181152,-2.88227],270],["Land_BarrelWater_grey_F",[1.47046,1.05615,0.98852],270],["Land_Can_Rusty_F",[1.82813,1.93311,-1.88241],240],["Land_Can_Rusty_F",[1.84546,1.30615,-2.33239],180],["Land_Can_V2_F",[1.85327,1.2085,-2.33419],240],["Land_Can_V2_F",[1.84814,2.4458,-2.78458],135],["Land_Tableware_01_cup_F",[1.83276,0.50293,-2.3331],180],["Land_Can_V1_F",[1.80322,1.07764,-1.43259],345],["Land_PowderedMilk_F",[1.87012,1.80859,-1.88152],180],["Land_FoodContainer_01_F",[1.61719,4.05469,-2.88227],255],["Land_Metal_rack_F",[1.84546,0.931152,-2.88227],90],["Land_Metal_rack_F",[1.84546,2.18115,-2.88227],90],["Land_Can_V3_F",[1.84546,2.43115,-2.33515],180],["Land_TacticalBacon_F",[1.84546,0.931152,-1.43675],45],["Land_TacticalBacon_F",[1.84546,2.43115,-1.43623],315]]
        ,[["Land_CratesWooden_F",[-1.22754,1.95166,-3.5573],90],["Land_ChairWood_F",[-2.9873,-1.10156,1.10856],105],["Land_OfficeCabinet_02_F",[-3.5,0.875,1.10874],270],["OfficeTable_01_old_F",[-3.375,-0.75,1.10869],270],["Land_FlowerPot_01_F",[-1.5,-3.25,-2.83393],0],["Land_ShelvesMetal_F",[-1.12354,1.00293,-2.76301],0],["Land_Metal_rack_F",[-3.625,0.75,-2.76301],270],["Land_CanisterPlastic_F",[-3.375,1.75,1.10869],0],["Land_BottlePlastic_V2_F",[-1.24707,0.0869141,-1.49981],263],["Land_Can_Dented_F",[-0.954834,1.29297,-1.49981],336],["Land_WaterBottle_01_empty_F",[-1.31079,1.23535,-2.20481],49],["Land_RiceBox_F",[-1.01245,0.614258,-2.20481],49],["Land_Can_V3_F",[-1.24707,0.361816,-2.55981],145],["Land_PowderedMilk_F",[-1.24707,1.45654,-2.55981],135],["Land_BottlePlastic_V1_F",[-0.905518,0.313965,-2.55981],356],["Land_Can_V2_F",[-3.61548,0.347656,-1.31301],195],["Land_Can_V1_F",[-3.62939,0.597168,-2.21301],118],["Land_TinContainer_F",[-3.62354,0.881348,-2.66301],145],["Land_Can_V2_F",[-3.60522,-1.25098,-1.76301],261],["Land_RiceBox_F",[-3.61548,-1.90234,-2.21301],15],["Land_Can_V1_F",[-3.61548,-1.16113,-2.66301],185],["Land_Metal_rack_F",[-3.625,-1.5,-2.76301],270],["Land_FoodContainer_01_White_F",[1.625,4.25,1.10692],0],["Land_WoodenBed_01_F",[0.879395,0.345215,1.10748],90],["Land_FlowerPot_01_Flower_F",[2.625,-3.5,1.07886],90],["Land_Metal_rack_F",[1.875,0.5,-2.76301],90],["Land_Metal_rack_F",[1.875,2.125,-2.76301],90],["Land_PenBlack_F",[1.86548,0.604004,-1.31301],225],["Land_Bandage_F",[1.86548,0.455566,-2.21301],307],["Land_WaterBottle_01_full_F",[1.86548,0.902344,-2.66301],19],["Land_Can_V1_F",[1.86401,1.91016,-1.76301],259],["Land_VitaminBottle_F",[1.86548,2.52734,-2.66301],38]]
        ,[["Land_LuggageHeap_03_F",[1.25,-0.375,0.988981],0],["Land_ChairWood_F",[-2.48096,-1.90247,-2.88227],195],["Land_ChairWood_F",[-3.23096,-0.652466,0.989386],192],["Land_ChairWood_F",[-3.35596,-0.402466,-2.88227],255],["Fridge_01_closed_F",[1.25,4.25,0.987795],75],["Land_Mustard_01_F",[1.56592,1.83936,-1.87586],0],["Land_Ketchup_01_F",[1.65869,1.90967,-1.87485],0],["Land_WoodenTable_small_F",[-3.25,0.5,0.98939],0],["Land_WoodenBox_F",[-3.51514,3.73315,0.989489],90],["Land_CerealsBox_F",[0.362549,4.18091,-2.29193],30],["Land_CashDesk_F",[1.76025,2.4126,-2.88227],270],["Land_EmergencyBlanket_01_F",[1.66089,1.83936,-2.88227],0],["Land_Tableware_01_napkin_F",[1.53882,2.19189,-1.87457],240],["Land_ChairWood_F",[-3.23096,1.34753,0.989386],6],["Land_Icebox_F",[-3.25,1.25,-2.88227],270],["Land_Icebox_F",[0.358643,4.14526,-2.88227],0],["Land_Can_V3_F",[1.5835,2.75342,-2.36989],285]]
        ,[["Land_WaterBottle_01_cap_F",[0.0773926,3.35938,-1.8758],0],["Land_Can_V2_F",[-1.89233,-0.214355,-1.97495],105],["Land_RattanChair_01_F",[-2.75,-0.75,0.989213],345],["Land_WoodenBed_01_F",[-2.62476,3.875,0.989167],270],["Land_TableDesk_F",[1.625,0.5,0.988699],270],["Land_ChairWood_F",[1.01904,0.472595,0.988691],255],["Land_ChairWood_F",[-0.955811,-3.2652,-2.91888],60],["Land_Can_V1_F",[-2.625,2,-2.32712],15],["Land_PowderedMilk_F",[-1.96143,1.96484,-1.62138],285],["Land_Can_V2_F",[-2.0813,-0.700195,-2.32862],75],["Land_Basket_F",[-2.59741,1.7915,0.989159],0],["Land_ShelvesMetal_F",[-2.7478,1.75433,-2.88227],90],["Land_ShelvesMetal_F",[-2.7478,-0.495667,-2.88227],90],["Land_Can_V2_F",[-0.0480957,3.35107,-1.87721],0],["Land_CerealsBox_F",[-3.125,1.625,-1.62264],30],["Land_TinContainer_F",[-3.09741,-0.259277,-2.32708],285],["Land_CashDesk_F",[0.5,3.25,-2.88227],0],["Land_WaterBottle_01_pack_F",[-2.00562,1.52618,-2.68402],0],["Land_WaterBottle_01_compressed_F",[0.222168,3.38867,-2.37125],255],["Land_Can_Rusty_F",[-3.125,1.5,-2.32743],240],["Land_FoodSack_01_full_brown_F",[-2.74731,1.98749,-2.70029],270]]
    ];
};

Update: Land_i_Stone_HouseBig_V1_F and derivatives has stuff way out of bounds. Here's the fixed code.

case "Land_i_Stone_HouseBig_V1_F";
case "Land_i_Stone_HouseBig_V2_F";
case "Land_i_Stone_HouseBig_V3_F";
case "Land_i_Stone_House_Big_01_b_clay_F": { 

_templates = [
        [["Land_Camping_Light_off_F",[-1.79932,0.184082,2.12683],0],["Land_Rope_01_F",[-1.79834,-0.222168,1.47623],105],["Land_ShelvesWooden_F",[-1.85303,-0.10791,1.15872],0],["Land_Bandage_F",[-1.77197,-0.391602,2.12497],115],["Land_Antibiotic_F",[-1.73315,0.152344,1.78497],89],["Land_Sleeping_bag_folded_F",[1.36084,3.16846,2.00471],45],["Land_Ground_sheet_folded_F",[0.780273,3.55469,2.0072],345],["Land_GasCooker_F",[0.904785,2.90234,2.01056],0],["Land_GasCanister_F",[0.718506,2.98828,2.01056],120],["Land_ChairWood_F",[0.92627,2.52832,1.16314],207],["Land_ChairWood_F",[0.0568848,3.19434,1.16314],321],["Land_WoodenTable_small_F",[1.05054,3.24512,1.16314],270],["Land_CratesShabby_F",[3.07568,3.17334,-1.67007],0],["Land_Basket_F",[5.98804,3.79932,1.1464],0],["Land_Shovel_F",[0.614258,3.20801,-0.578715],120]]
        ,[["Land_Basket_F",[0.308594,-1.23193,-1.69738],270],["Land_BarrelEmpty_F",[1.2041,-1.17285,-1.70392],0],["Land_BarrelEmpty_grey_F",[-0.774902,-1.23828,1.11018],0],["Land_Sleeping_bag_blue_folded_F",[-1.68213,3.48535,1.16206],0],["Land_Pillow_F",[-1.26123,2.44971,1.18224],30],["Land_Ground_sheet_folded_blue_F",[-1.71582,3.0918,1.17363],330],["Land_Sleeping_bag_brown_F",[-1.31641,1.30566,1.17509],0],["Land_GasCooker_F",[-1.59668,2.8125,1.16488],0],["Land_GasCanister_F",[-1.81348,2.6875,1.16488],330],["Land_Sacks_goods_F",[1.16309,3.10059,1.18325],0],["Land_BarrelWater_F",[6.05713,3.14941,1.18749],0]]
        ,[["Land_Can_Rusty_F",[-1.36865,0.728027,2.0054],289],["Land_Can_Rusty_F",[-1.64209,0.944824,2.01063],37],["Land_WoodenTable_small_F",[-1.58984,1.32227,1.15604],0],["Land_ChairWood_F",[-1.57715,2.2207,1.15604],6],["Land_ChairWood_F",[-1.57715,0.220703,1.15604],192],["Land_BarrelWater_grey_F",[0.359863,-1.24268,-1.70987],0],["Land_Can_V2_F",[-1.22705,1.16846,2.01063],271],["Land_GasCooker_F",[-1.5874,1.59814,2.00873],0],["Land_Can_V3_F",[-1.82715,0.97998,2.01063],303],["Land_Can_V3_F",[-1.28613,1.05176,2.01063],183],["Land_GasCanister_F",[-1.8374,1.59814,2.00873],0],["Land_GasTank_01_yellow_F",[0.621094,3.47998,1.15181],0],["Land_LuggageHeap_01_F",[0.573242,3.28223,-0.833594],0],["Land_Sacks_goods_F",[2.96387,2.17627,-1.84251],255],["Land_Pillow_F",[1.49951,3.41699,1.78885],0],["Land_ShelvesWooden_F",[1.33594,3.44482,1.16687],90],["Land_Shovel_F",[1.18506,3.14453,1.1645],75],["Land_Sleeping_bag_folded_F",[1.20557,3.51416,2.11916],0],["Land_Ground_sheet_folded_khaki_F",[1.53955,3.31055,2.13673],345],["Land_Rope_01_F",[1.20166,3.41504,1.47761],0],["Land_Camping_Light_off_F",[1.08008,3.3418,1.79069],0],["Land_Sacks_goods_F",[4.14795,2.57422,-1.64146],0,[-0,0.148038,0]]]
        ,[["Land_ShelvesWooden_F",[-1.2019,-1.35596,1.1192],90],["Land_ChairWood_F",[0.965576,1.86572,1.1699],336],["Land_Basket_F",[0.537354,3.16504,-0.599946],225],["Land_Can_V2_F",[1.19385,1.03174,2.0245],190],["Land_MobilePhone_old_F",[1.04199,1.50146,2.0245],344],["Land_Bandage_F",[-1.04785,-1.43652,2.08545],238],["Land_IntravenBag_01_full_F",[-1.12573,-1.37598,1.74545],279],["Land_DisinfectantSpray_F",[-1.48584,-1.45801,1.74545],167],["Land_WaterPurificationTablets_F",[-1.0498,-1.25928,1.42545],186],["Land_WoodenTable_small_F",[1.45923,1.05029,1.1699],330],["Land_ChairWood_F",[1.96558,0.133301,1.1699],162],["Land_Basket_F",[1.55811,2.19434,-1.66572],195],["Land_BottlePlastic_V1_F",[1.58594,0.945313,2.0245],151],["Land_ButaneTorch_F",[1.50879,0.742188,2.0245],353]]
    ];
};

I've also noticed in my extensive testing that Land_Shed_Big_F/Small_F templates and their derivatives also suffer from this issue, but since those spaces are already usually occupied by stuff baked into the map I don't use them. As of now, these are the only ones that I've seen which have this problem. The other templates have no issues with placement (at least nothing major, I did notice very minute placement errors for various small objects), though I haven't checked out CUP and other modded templates.

LISTINGS09 commented 5 years ago

Thank you for taking the time to correct these. I've now included them.

I did take a look at the Sheds, but unfortunately they have no solid floor. This means if the building is placed at a +/- Z Coordinate, items will appear to float or sink into the ground since all templates are positioned according to the model and not the ground underneath.