(Need some help) - Base Building DayZ 1.0 w/ Gates + MUCH MORE!

Phenom

Well-Known Member
I am sure some of you have seen this thread on tunngle, if not here's the link to it http://www.tunngle.net/community/topic/116641-official-base-building-dayz-10-w-gates-much-more/

There's a few issues with it still as it was kinda dumped up there quickly but none of them are major apart from the fact the gates don't work (no leaver etc). And the codes to use on the gates are painful, I modified this to 0# for the time being.

I've asked a few times on tunngle but posts just seem to get pushed down the line by users posting the same question time and time again so thought I would ask here ;)

I am unable to find any reference to operate_gates.sfq, I've found all the code for the keypad, the positioning of it, the reference to the image file, the code checking and verification but I am unable to find any reference to what happens after the code is accepted.

It's supposed to grant you with an option (leaver) on the keypad, but this I don't believe is going to work as operate_gate.sqf isn't called from anywhere. In the files supplied it's mentioned in a readme.txt file that fn_selActions.sqf will now handle the operation of the gates, however there doesn't appear to be any reference to it in that file.

Am I totally missing something here? is it just a matter of me adding the operate_gates.sqf file to my init file so I get the leaver?
 
On my phone now, so I can't look at code, but IIRC the gate codes were coded by killzone kid and humbleuk. Also alby is very good with the base building. There is also zedar who is working on base building. So I am sure you should getsome help
 
I had a quick check and it does not seem that the actions have actually been added anywhere. It states that they should be in fn_selfActions in one README and yet there is nothing there regarding gates or keypads. I will take a deeper look at a later stage but if people really want gates and more then I am willing to add them into my construction system when it is released open source soon. However mine is client side currently.
 
Well it's good to know I am not going crazy then ;) gates/keypad is a good idea IMO and if a 4x digit code could be generated automatically instead of the way codes are being generated now then it would be great.
 
Mrjei posted up this little snippet of code that's added into the fn_selActions file that gets things working. It would be nice if someone has this construction setup nailed and is willing to share it as with the one supplied I've probably deleted half the files supplied, modified a few things and overall it's not that great.

Code:
if ((dayz_myCursorTarget != cursorTarget) && (cursorTarget isKindOf "Infostand_2_EP1") && keyValid) then {
                _lever = cursorTarget;
                {dayz_myCursorTarget removeAction _x} forEach s_player_gateActions;s_player_gateActions = [];
                dayz_myCursorTarget = _lever;
                _gates = nearestObjects [_lever, ["Concrete_Wall_EP1"], 35];
                if (count _gates > 0) then {
                        _handle = dayz_myCursorTarget addAction ["Operate Gate", "fixes\operate_gates.sqf", _lever, 1, false, true, "", ""];
                        s_player_repairActions set [count s_player_gateActions,_handle];
                };
};
 
the keypad and gates works as follows:

1. put two gates keypads on inside and other outside of your base
2. operate one of those, put the code press # o * (don't remember wich :p ) to submit
3. go away from the keypad , go back to the keypad, then scroll the middle mouse wheel and you will se an "open gates" select it and the buildings for classes "Hhedgehog_concrete","Concrete_Wall_EP1" will be raised.
 
Thanks Zedar for trying to help, but it has nothing to do with how they operate, it's the fact that the operate_gate.sqf (which operates the gates) wasn't called anywhere at all in the supplied code.

In the released version a file called fn_selActions.sqf was provided that supposedly contained the call to "operate_gate.sqf" which it didn't, this is where the problem was.

So you could do a hand stand or dance to gangnam style in front of the keypad, it wouldn't have gotten you anywhere, because the code wasn't there to do anything.
 
I advice you all against the use of the keypad in its current implementation. Believe me I have just today looked at the code and yeas, bits of it are shamelessly downloaded and stolen from our mission. Pisses me off especially because it is a no brainer kinda code.

Anyway access code is supposedly the control pad coordinates rounded and stuck together like UID for tents and deployables. This means that if you have GPS you can work out access code for any keypad out there. Also I'm not so sure how he stops you from opening someone elses gates if you can build keypad yourself in proximity of the gates. Rubbish code from rubbish people.

Dont steal kids.

im sorry if this code was stoled i obtain that from damiyco....

it have a rule to avoid the deploy of other keypad in a predefined radius.


The GPS part... i think it's very hard.... becouse there isn't any way for the player to obtain the exact Z coordinate and direction muy UID its generated in base of 4 params: x,y,z,direction it's imposible to know the UID, dependes of course how the UID it's generated!
 
Couldnt you replace UID with ID so the keycode becomes the number of it's ID in the database? Would make it harder for people to guess
 
As much as I love the building function and my now secure base there's a god awful lot of bugs. The object removal code works in-game but that's where it ends, on restart those objects are back in-game.

The build able objects move ever so slightly each restart, which means you can find your buildings inaccessible, even if you had separated them by several meters, or the keypad inside one of your walls.

I modified entercode.sqf as was recommended by Mrjei to the following keyCode = _lever getVariable ["ObjectID","0"]; problem is I am unsure how you're able to change the code from 0# to anything else. i have gone into the instance_deployable table and tried modifying the "deployable_id" the "unique_id" and the "id" neither work and you need to continue using 0# to access the keypad.

Obviously I am doing something wrong there but it's the only reference to the keypad I can find in the DB.
 
Does this mod currently only work bliss or has someone installed this on Pwnoz0r server build? I know it says it can work on other server builds but i just wanna be sure before I start testing =)

After watching the video I just have to have this =) But I think i'll wait until they setup the github that I think they planned to do
 
I would wait, there's a fair few bugs and it took me a while to get it all working on bliss nicely (including gates)
 
Basically stuck at the same point as Phenom.

And I can't seem to get IED's to explode... I can make them, disarm them.. but not detonate them by any means.
 
I'm also with the same problem I've tried several suggestions so far nothing ever works the gate when it bug the buildings and save option to create a new building and the items are still in inventory are not deleted after the creation of the building, I believe that the problem is related to Variable ObjectUID this line of code in player_build.sqf.

Code:
//_uid = _worldspace call dayz_objectUID2;
//_object setVariable ["ObjectUID", _uid, true];
// set the codes for gate
//--------------------------------
_dir = round(_this select 0);
_p1 = round((_location select 0) * 10);
_p2 = round((_location select 1) * 10);
if (_p3 < 0) then {_p3 = round((_location select 2) * -10);}
else {_p3 = round((_location select 2) * 10);};
_uid = format["%1,%2,%3,%4",_p1,_p2,_p3,_dir];
//--------------------------------
 
I managed to load the script and get the recipe book and all but the building are not getting built.
I put all the necessary stuff in my inventory then right click a sandbag, but its not making the recipe...it just deploys the sandbag :/
Any ideas why ?
(using Dayz Control Center 1.7.4.4)
 
Back
Top