Jump to content

[1.4.1] Snap Building PRO


Recommended Posts

This is awesome, great job!

I only have one thing i would like to ask about:

 

- I was building with a friend, i was the one placing the item down, (was a wall) I had the preview snapped nicely on top of another wall (by pressing F) and the only thing left to do was to press space to build. However my friend told me that he  could see the preview of the wall bouncing up and down all over the place and shifting, while on my screen it was perfectly snapped where i wanted it. This ofcourse was all put back to normal once the item was built, but i was just wondering whether anyone else has experienced something like this when watching people snap build, etc.

 

Thanks again

Link to comment
Share on other sites

Hello

 

i try now since Hours to build custom stuff like a Sandbag Watch Tower i use the right click menu whit the following script

class ExtraRc {
	class ItemEmerald {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Chairs {
            text = "Chair";
            script = "createDialog ""WGT_INTERIOR2"";";
        };
		class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
		class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
		class Shelf {
            text = "Shelf";
            script = "createDialog ""WGT_INTERIOR5"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
		class Tablz {
            text = "Table";
            script = "createDialog ""WGT_INTERIOR7"";";
        };
		class extr {
            text = "Exterior";
            script = "createDialog ""WGT_INTERIOR8"";";
        };
    };
	class ItemKiloHemp {
		class smokeweed {
			text = "Smoke the shit";
			script = "execVM 'custom\smokeshit.sqf'";
		};
	};	
	class ItemBriefcase100oz {
		class carepackage {
			text = "Call carepackage";
			script = "execVM 'custom\carepackage.sqf'";
		};
	};
    class bulk_ItemSandbag {
        class sandWatchTower {
            text = "Sandbag Watch Tower";
            script = "[""Land_Fort_Watchtower"",[""ItemToolbox"",""ItemEtool"",""ItemHatchet_DZE""],[[""PartPlankPack"", 1],[""bulk_ItemSandbag"", 1],[""forest_net_kit"", 1]],[0,6.5,2.5]] execVM ""custom\snap_pro\player_build.sqf"";";
        };

};

when i use it now in game i get stuck in a building already in progress loop the sandbag tower isn't visible 

 

TinyGrab-H6ao3XvZ.png

Link to comment
Share on other sites

- I was building with a friend, i was the one placing the item down, (was a wall) I had the preview snapped nicely on top of another wall (by pressing F) and the only thing left to do was to press space to build. However my friend told me that he  could see the preview of the wall bouncing up and down all over the place and shifting, while on my screen it was perfectly snapped where i wanted it. This ofcourse was all put back to normal once the item was built, but i was just wondering whether anyone else has experienced something like this when watching people snap build, etc.

Yea that's part of multiplayer code, I did not use any public vars to reset velocity for players around, it is only reset locally. You could think of it as physics engine trying to figure out what's going on, similar desync is seen when driving vehicles, however in this case there is no code that helps prevent this. Some could potentially add public var that resets velocity to [0,0,0] when object is detached, but I think that is just unnecessary network traffic.

 

 

Hello

 

i try now since Hours to build custom stuff like a Sandbag Watch Tower i use the right click menu whit the following script

when i use it now in game i get stuck in a building already in progress loop the sandbag tower isn't visible 

You are passing wrong variables probably used with other custom player_build systems. Think you should use spawn instead, but execVM could work, too, I guess.

 

Try something along these lines (did not test syntax, just an example):

script = "[""Land_Fort_Watchtower""] execVM ""custom\snap_pro\player_build.sqf"";";
// or
script = "[""Land_Fort_Watchtower""] spawn snap_build;";

It could work, but if it doesn't, it's probably because item was not found in configFile, in that case you will have to design your own player_build to adapt (which is most likely the case you will end up with).

Link to comment
Share on other sites

Hello

 

i try now since Hours to build custom stuff like a Sandbag Watch Tower i use the right click menu whit the following script

 

class ExtraRc {
	class ItemEmerald {
        class PicFrame {
            text = "Picture Frame";
            script = "createDialog ""WGT_INTERIOR1"";";
        };
		class Chairs {
            text = "Chair";
            script = "createDialog ""WGT_INTERIOR2"";";
        };
		class Beds {
            text = "Bed";
            script = "createDialog ""WGT_INTERIOR3"";";
        };
		class Bath {
            text = "Bathroom";
            script = "createDialog ""WGT_INTERIOR4"";";
        };
		class Shelf {
            text = "Shelf";
            script = "createDialog ""WGT_INTERIOR5"";";
        };
		class Misce {
            text = "Misc";
            script = "createDialog ""WGT_INTERIOR6"";";
        };
		class Tablz {
            text = "Table";
            script = "createDialog ""WGT_INTERIOR7"";";
        };
		class extr {
            text = "Exterior";
            script = "createDialog ""WGT_INTERIOR8"";";
        };
    };
	class ItemKiloHemp {
		class smokeweed {
			text = "Smoke the shit";
			script = "execVM 'custom\smokeshit.sqf'";
		};
	};	
	class ItemBriefcase100oz {
		class carepackage {
			text = "Call carepackage";
			script = "execVM 'custom\carepackage.sqf'";
		};
	};
    class bulk_ItemSandbag {
        class sandWatchTower {
            text = "Sandbag Watch Tower";
            script = "[""Land_Fort_Watchtower"",[""ItemToolbox"",""ItemEtool"",""ItemHatchet_DZE""],[[""PartPlankPack"", 1],[""bulk_ItemSandbag"", 1],[""forest_net_kit"", 1]],[0,6.5,2.5]] execVM ""custom\snap_pro\player_build.sqf"";";
        };

};

 

when i use it now in game i get stuck in a building already in progress loop the sandbag tower isn't visible 

 

 

 

 

Try this: 

    class bulk_ItemSandbag {
        class sandWatchTower {
            text = "Sandbag Watch Tower";
            script = "[""Land_Fort_Watchtower_EP1"",[""ItemToolbox"",""ItemEtool"",""ItemHatchet_DZE""],[[""PartPlankPack"", 2],[""bulk_ItemSandbag"", 3],[""forest_net_kit"", 1],[""ItemGoldBar"", 1]],[0,6.5,2.5]] execVM ""custom\snap_pro\player_build.sqf"";";
        };

obviously amend paths to your own.

 

Pry

Link to comment
Share on other sites

Also don't forget to add it to your allowed items in the variables file ;-)

 

Find:

 

dayz_allowedObjects =

 

add to array: "Land_Fort_Watchtower_EP1",

 

I have it at the end but make sure it's in this array somewhere:

 

dayz_allowedObjects = ["MAP_picture_a","MAP_picture_a_02","MAP_picture_a_03","MAP_picture_a_04","MAP_picture_a_05","MAP_picture_b","MAP_picture_b_02","MAP_picture_c","MAP_picture_c_02","MAP_picture_d","MAP_picture_e","MAP_picture_f","MAP_picture_f_02","MAP_picture_g","MAP_wall_board","MAP_wall_board_02","MAP_wall_board_03","MAP_F_ch_mod_c","MAP_ch_mod_h","MAP_armchair","MAP_ch_mod_h","MAP_ch_office_B","MAP_chair","MAP_Church_chair","MAP_hospital_bench","MAP_kitchen_chair_a","MAP_lavicka_1","MAP_lavicka_2","MAP_lavicka_3","MAP_lavicka_4","MAP_lobby_chair","MAP_office_chair","MAP_F_postel_manz_kov","MAP_F_postel_panelak1","MAP_F_postel_panelak2","MAP_F_Vojenska_palanda","MAP_postel_manz_kov","MAP_postel_panelak1","MAP_vojenska_palanda","MAP_fridge","MAP_Kitchenstove_Elec","MAP_washing_machine","MAP_P_Basin_A","MAP_P_bath","MAP_F_bath","MAP_lekarnicka","MAP_P_sink","MAP_toilet_b","MAP_P_toilet_b_02","MAP_almara","MAP_case_a","MAP_case_bedroom_a","MAP_case_bedroom_b","MAP_case_cans_b","MAP_case_d","MAP_case_wall_unit_part_c","MAP_case_wall_unit_part_d","MAP_case_wooden_b","MAP_Dhangar_borwnskrin","MAP_Dhangar_brownskrin","MAP_Dhangar_knihovna","MAP_library_a","MAP_shelf","MAP_Skrin_bar","MAP_Skrin_opalena","MAP_Truhla_stara","MAP_briefcase","MAP_Dkamna_bila","MAP_Dkamna_uhli","MAP_F_Dkamna_uhli","MAP_icebox","MAP_mutt_vysilacka","MAP_notebook","MAP_pc","MAP_phonebox","MAP_radio","MAP_radio_b","MAP_satelitePhone","MAP_smallTV","MAP_tv_a","MAP_vending_machine","MAP_lantern","MAP_bucket","MAP_MetalBucket","MAP_FuelCan","MAP_SmallObj_money","MAP_conference_table_a","MAP_desk","MAP_Dhangar_psacistul","MAP_F_conference_table_a","MAP_kitchen_table_a","MAP_lobby_table","MAP_office_table_a","MAP_pultskasou","MAP_SmallTable","MAP_stul_hospoda","MAP_stul_kuch1","MAP_Table","MAP_table_drawer","MAP_kasna_new","MAP_Misc_Boogieman","MAP_ChickenCoop","MAP_Misc_Greenhouse","MAP_Misc_Hutch","MAP_Misc_Well","MAP_PowerGenerator","MAP_psi_bouda","MAP_pumpa","MAP_stanek_3","MAP_stanek_3_d","MAP_stanek_3B","MAP_AirCond_big","MAP_AirCond_small","MAP_antenna_big_roof","MAP_antenna_small_roof","MAP_antenna_small_roof_1","MAP_drapes","MAP_drapes_long","MAP_GasMeterExt","MAP_Ladder","MAP_P_Ladder","MAP_LadderHalf","MAP_P_LadderLong","MAP_Misc_loudspeakers","MAP_parabola_big","MAP_P_Stavebni_kozy","MAP_Heli_H_civil","MAP_Heli_H_army","MAP_Heli_H_cross","MAP_Heli_H_rescue","MAP_Sr_border","MAP_drevo_hromada","MAP_garbage_misc","MAP_garbage_paleta","MAP_Ind_BoardsPack1","MAP_Ind_BoardsPack2","MAP_Ind_Timbers","MAP_Kontejner","MAP_Misc_GContainer_Big","MAP_Misc_HayStack","MAP_Misc_TyreHeap","MAP_Misc_WoodPile","MAP_pneu","MAP_popelnice","MAP_sekyraspalek","MAP_seno_balik","MAP_concrete_block","MAP_Concrete_Ramp","MAP_ramp_concrete","MAP_woodenRamp","MAP_brana","MAP_Houpacka","MAP_nastenkaX","MAP_Piskoviste","MAP_snowman","MAP_Barel1","MAP_Barel3","MAP_Barel4","MAP_Barel5","MAP_Barel6","MAP_Barel7","MAP_Barel8","MAP_Barels","MAP_Barels2","MAP_Barels3","MAP_barrel_empty","MAP_barrel_sand","MAP_barrel_water","MAP_P_bedna","MAP_box_c","MAP_P_cihly1","MAP_P_cihly2","MAP_P_cihly3","MAP_P_cihly4","MAP_metalcrate","MAP_metalcrate_02","Misc_concrete","MAP_Misc_G_Pipes","MAP_Misc_palletsfoiled","MAP_Misc_palletsfoiled_heap","MAP_obstacle_get_over","MAP_obstacle_prone","MAP_obstacle_run_duck","MAP_paletaA","MAP_paletyC","MAP_paletyD","MAP_Pallets_Column","MAP_P_pipe_big","MAP_P_pipe_small","MAP_P_ytong","TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","Uroven1DrevenaBudka","Uroven2KladaDomek","Uroven3DrevenyDomek","Uroven1VelkaBudka","Uroven2MalyDomek","Uroven3VelkyDomek","malaGaraz","velkaGaraz","kingramida","krepost","ori_safe","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","Land_Fort_Watchtower","Land_Fire_barrel_burning","FireBarrel_DZ","HeliHCivil","HeliHRescue","HeliH","Land_Table_EP1","Land_Table_small_EP1","Land_Chest_EP1","Land_Bench_EP1","Land_fortified_nest_big","Land_radar_EP1","Land_prebehlavka","Land_Cabinet_EP1","Land_Ind_IlluminantTower","Land_Ind_TankSmall2_EP1","Land_Rack_EP1","Land_Shelf_EP1","Land_CncBlock_Stripes","ZavoraAnim","MetalFloor_Preview_DZ","Microphone3_ep1","Loudspeaker","Notebook","Misc_Videoprojektor","Land_dum_istan3_hromada2","MAP_sara_Domek_sedy","MAP_deutshe_mini","hruzdum","dum_rasovna","WoodStairsRails_DZ","Land_Fort_Watchtower_EP1","MAP_Misc_WellPump","Land_pumpa","FireBarrel_DZ","Land_Campfire_burning","ASC_runway_BluelightB","ASC_runway_YellowlightB","Land_fortified_nest_big_EP1","Land_vez","Land_A_Castle_Stairs_A","Sign_Checkpoint_US_EP1","Land_Ind_TankSmall2_EP1","RampConcrete","WarfareBCamp","Land_Climbing_Obstacle","MAP_leseni2x","MAP_leseni4x","mbg_slum01_EO","mbg_slum02_EO","mbg_slum03h_EO","FlagCarrierUSA_EP1","FlagCarrierBAF","FlagCarrierGermany_EP1","PowerGenerator_EP1"];
Link to comment
Share on other sites

So finally got round to having a play on my live box with my Plot for Life and this mod (thanks to PryMarys merged player_build.sqf).

 

All appears to work well (after adding in the fn_selfactions variables to variables.sqf).

 

The snapping does seem a litle strange with it building up a slight offset which compounds the more you build (higher levels in my case).  Understandable with so many missmatched types of buildables to try and cope with.  My build still came out pretty good.

 

One thing that came out a bit problematic was stairs.  They seemed to have difficulty being rotated if not snapped.  I was trying to build a set of stairs to wone side of a metal floor panel.  I snapped to the center back point, with the stairs top, of the metal floor panel above.  I then picked up the stairs to move them sideways and the stairs then rotated 90 degrees after dragging them slightly.  I could then not re-rotate them to any anger apart from left -> right or right -> left.

 

Snapping objects also sometimes rotates them 90 or 180 degrees.  This is easy to rotate back to where they should be but is another action required.

 

Everything else seems ot work pretty well.

 

Any ability to set a default value as I am having to turn on snapping, then choose manual snapping, then choose the snap point to use for snapping.  It would be good to be able to defauly to Snap on -> manual snap so I would just have to choose the snap point ot use.

Link to comment
Share on other sites

I'm wondering if its possible to have floor peices do Angles / Slopes to make pitched roofs.

 

That would be very good if possible, but not sure it can be done as item coordinates are generally X,Y,Height, Direction facing (not nessecessory in that order) so there is no angle parameter in the postional system AFAIK.

Link to comment
Share on other sites

Not in the DB record, but what about the internal setVectorUp([ex, ey, ez])?

 

Some patches ago many buildables were placed (after server restart) parallel to the ground, to my knowledge that would be without a setVectorUp definition for the object.

 

Then came a patch where those buildables were placed horizontally, so I guess Epoch now internally uses setVectorUp([0 0 1]).

 

So it would certainly be possible to do this but one would have to pimp up the DB position record (disturbing your extra ID information placed there) and simultanously adjust Epoch's placement routines.

 

A less general solution would be to introduce classnames for objects with certain fixed slopes and handle them like one does with the existing 2 classes (horizontal, slope following).

Link to comment
Share on other sites

Not in the DB record, but what about the internal setVectorUp([ex, ey, ez])?

 

Some patches ago many buildables were placed (after server restart) parallel to the ground, to my knowledge that would be without a setVectorUp definition for the object.

 

Then came a patch where those buildables were placed horizontally, so I guess Epoch now internally uses setVectorUp([0 0 1]).

 

So it would certainly be possible to do this but one would have to pimp up the DB position record (disturbing your extra ID information placed there) and simultanously adjust Epoch's placement routines.

 

A less general solution would be to introduce classnames for objects with certain fixed slopes and handle them like one does with the existing 2 classes (horizontal, slope following).

 

Interesting, thanks for the info.

 

As you note, without the DB record being changed, it will all revert to non-sloped though.

 

Changing the DB record wouldn't be be too tricky (even with the ownership from A Plot for Life still using the worldspace field) but changing all the references and build scripts would be a fairly large rework for what people would likely find a small improvement (although building a ramp based escape route out of an invaded base has all sort of win written all over it  ;)  ).

Link to comment
Share on other sites

 but changing all the references and build scripts would be a fairly large rework for what people would likely find a small improvement

Hmmm, I've always disliked flat roofs, aesthetically as well as practically (all the rain / player helis landing and glitching into your base ;-)

 

Perhaps at some time we'll get some new objects. We'd need a half roof (with the correct setVectorUp hardwired into the placing routines) and the corresponding triangular pediment walls....

Link to comment
Share on other sites

@raymix please take a look at this. Haven't tested myself though.

 

https://github.com/vbawol/DayZ-Epoch/issues/1424

 

Can confirm, Raymix please fix ASAP.

 

Thank you for reporting this, guys, fixed now.

 

 

IMPORTANT UPDATE:  Guys please update to latest snap pro and let me know if you have any more problems with it before 1.0.5.2 goes live. Thank you!

 

Changes:

* If player starts building an object outside the plotpole area, object can no longer be put inside nearby plotpole area (player can still enter/leave while object is detached). I did this to kinda counter the possible griefing. This is of course ignored if player continues building outside or starts building inside.

* Object's distance is now also checked against initial starting position. This fixes infinite drag and drop problem.

* Commanding menus can't be shown using F anymore. Had to disable it because menu and tutorial would pop up even when not building (no idea why nobody reported this one, lol).

Link to comment
Share on other sites

the instant upgrade works (WG Admin) i'm still trying to get the admin instant build to work though. Will post here if I am successful obviously ;)

 

 

If one of you guys would be able to merge those scripts (the one from geekgarage) with this...  :wub:

I've tried but i failed...miserably ^^

I got the admin fast build working but it broke building for non-admins, i was happily testing on my server then i started getting loads of messages on TS after putting it live on my dedi saying no one could build yet i could, i think i backed up the files so i'll upload them here and theres a base we can work from.

EDIT: These files are outdated, and this is not the latest version of SnapBuild Pro with the new fixes incorporated

Heres my files http://ge.tt/5RpmKYo1/v/0 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...