Jump to content
MaxPowers

Black Lake Castle

Recommended Posts

Hello. Here is a castle I made in the middle of Black lake. But here's the catch I have this working beautifully on my server hosted by HFB but when I put it into my second server hosted by Vilayer any of the objects that I leveled with this INIT code do not stay leveded. The INIT code that I used is the following 

 

_this setVehicleInit "this setpos [getpos this select 0, getpos this select 1,((getpos this select 2) + 2)]; this setVectorUp [0,0,+0.1]";   This code works fine with HFB but not with Vilayer.

9NTYdqs.jpg

 

 

Images:http://imgur.com/a/ZGiIq#0

Pastbin :http://pastebin.com/QN4393a3

 

I would very much appreciate any info as to why the INIT code will not work on Vilayer hosted servers.

 

Oh more info I have the file in my server PBO in a file called map and it's commented in server_functions.sqf as [] execVM "\z\addons\dayz_server\map\black_lake_castle.sqf";

Share this post


Link to post
Share on other sites

Looks really cool. I have a Vilayer server, so I'll test it and see if I get the same thing.

 

*EDIT* Tested it on my server, hosted by Vilayer and it works fine. Epic addition! I can't imagine how long it must have taken to create this.

The one problem that I'm having is the it does not stay level. Maybe you can help another New Jersey brotha out by walking me through the steps you used to implement it into your server?

Share this post


Link to post
Share on other sites

The one problem that I'm having is the it does not stay level. Maybe you can help another New Jersey brotha out by walking me through the steps you used to implement it into your server?

 

All my map addons are server side. I put them in a folder in my dayz_epoch folder in the villayercustomcode folder, then call them from my init/server_functions.sqf like this:

[] execVM "\z\addons\dayz_server\mapedits\black_lake_castle.sqf";

It came out straight. As a matter of fact, I'm making it an "admin zone" just for me and my admins.

 

*edit* Any chance that you would share the biedi file so I can make some small edits/addons?

Share this post


Link to post
Share on other sites

Normally I don't share my customizations because they are what makes my server unique, but this custom building is the best custom building I've seen to date, so I will share my admin zone so it can benefit others. 

 

Here's how you can set up a zone that only allows certain players in. I created this as an admin only zone.

 

1. Edit your init.sqf. Find this:

dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");

Below that, add this:

[] execVM "custom\adminzone\adminzone.sqf";

If you keep your customizations in a different folder, change the "custom\adminzone". Otherwise, create a folder called custom\adminzone in the folder/file that you find init.sqf

 

2. Create a file called adminzone.sqf and put the below code. This will place a marker on your map:

_this = createMarker ["adminzone", [13352.4, 11976.2, 0]];
_this setMarkerShape "ELLIPSE";
_this setMarkerColor "ColorRed";
_this setMarkerType "Warning";
_this setMarkerBrush "Grid";
_this setMarkerSize [80, 80];
 
_this = createMarker ["adminzonemarker", [13352.4, 11976.2, 0]];
_this setMarkerColor "ColorRed";
_this setMarkerType "mil_dot";
_this setMarkerText "Admin Castle - Keep out!"; 
3. Create a file in your adminzone folder called adminteleport.sqf with this code. It will warn players to leave the area, give them 30 seconds and if they don't, they'll be teleported just outside of the castle:
// Below, put the UID of player(s) where it says pasteUIDhere that you want to give access to the dome
if ((getPlayerUID player) in ["XXXXXX" , "XXXXXX", "XXXXXX"]) exitWith { 
titleText ["Welcome to the admin castle.", "PLAIN DOWN", 3]; //or,\\ titleText [format ["Welcome, %1", name player], "PLAIN DOWN"]; // welcomes you with your name
};
// What happens if unauthorized players get into the dome
titleText ["You are entering restricted area. Leave now.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have 30 seconds to leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have 25 seconds to leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have 20 seconds to leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have 15 seconds to leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have 10 seconds to leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You have 5 seconds to leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["Teleporting you outside of the zone.", "PLAIN DOWN", 3];
sleep 2;
player setPos [13339.5,11816.7,0];  //Porting the intruder
4. Create a file in your adminzone folder called SAR_nuke_zeds.sqf and put this code, from Sarge. This kills any zeds that spawn in the castle:

/*
    Author: Sarge
 
    Description:
    Kills all zombies in a given distance from a given point.
 
    Needs 2 parameters:
 
    _location = the exact x/y/z location of the center of the area that should be zed free
    _range = the radius within which zeds get killed
 
 
*/
 
    private["_location","_radius","_nuker","_obj_text_string"];
 
    if(!isServer) exitwith{};
 
    _location = _this select 0;
    _radius = _this select 1;
 
    _nuker = createvehicle ["Sign_sphere25cm_EP1",[_location select 0,_location select 1,1] ,[],0,"NONE"];
    _nuker allowDamage false;
 
    _obj_text_string = format["#(argb,8,8,3)color(%1,%2,%3,%4,ca)",1,1,0,1];
    [nil,nil,rSETOBJECTTEXTURE,_nuker,0,_obj_text_string] call RE;
 
    [_nuker,_radius] spawn {
 
        private ["_nuker","_radius","_entity_array"];
        _nuker = _this select 0;
        _radius = _this select 1;
     
        while {true} do {
     
            _entity_array = (getPos _nuker) nearEntities ["CAManBase",_radius];
            {
                if (_x isKindof "zZombie_Base") then {
                    _x setDamage 1;
                };
            } forEach _entity_array;
            sleep 2;
        };
    };
5. Add this to your mission.sqm file in the Sensors section. Be sure to adjust the Item# to the correct number:

       class Item9
        {
            position[]={13352.4,0,11976.2};
            a=80;
            b=80;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="adminteleport";
            expCond="(vehicle player) in thislist;";
expActiv="adminteleport = [] execVM ""custom\adminzone\adminteleport.sqf"";";
expDesactiv="terminate adminteleport; titleText [""You've left the zone"", ""PLAIN DOWN"", 3];";
            class Effects
            {
            };
        };
6. Add this to the very bottom of init.sqf:
[[13352.4, 11976.2,0],100] execVM "custom\adminzone\SAR_nuke_zeds.sqf";
You are done!

Share this post


Link to post
Share on other sites

Would love to use this but im afraid there mite be a few too many building parts for the amount i all ready have :( do you have any extra map mods for the different buildings? i mite try and make this smaller to fit on my server if you don't mind of course? 

 

@BetterDeadThanZed can I come on your server to check this out? just to see the awsomenessssss of it :D

Share this post


Link to post
Share on other sites

Would love to use this but im afraid there mite be a few too many building parts for the amount i all ready have :( do you have any extra map mods for the different buildings? i mite try and make this smaller to fit on my server if you don't mind of course? 

 

@BetterDeadThanZed can I come on your server to check this out? just to see the awsomenessssss of it :D

 

You could fly around it, but in order to let you in, I'd have to edit the one file with your UID so it wouldn't kick you. If you want to give me your UID in a private message, I'll add it. I'll be working tomorrow, but if you wanted to check it out on Sunday that would be ok.

Share this post


Link to post
Share on other sites

All my map addons are server side. I put them in a folder in my dayz_epoch folder in the villayercustomcode folder, then call them from my init/server_functions.sqf like this:

[] execVM "\z\addons\dayz_server\mapedits\black_lake_castle.sqf";

It came out straight. As a matter of fact, I'm making it an "admin zone" just for me and my admins.

 

*edit* Any chance that you would share the biedi file so I can make some small edits/addons?

I have all my map addons server side to except i made a folder called buildings then in my server_functions.sqf at the bottom i have 

call compile preProcessFileLineNumbers "\z\addons\dayz_server\buildings\BLCastle.sqf";

Share this post


Link to post
Share on other sites

I am having the same issue on my server.  It worked and looked great the first startup with it, but after a restart i had pieces floating in the air and everything was all twisted and moved around.  Cant see any errors or conflicts.  Would love to figure this out as it looks awesome. 

Share this post


Link to post
Share on other sites

I have all my map addons server side to except i made a folder called buildings then in my server_functions.sqf at the bottom i have

call compile preProcessFileLineNumbers "\z\addons\dayz_server\buildings\BLCastle.sqf";

I'm gonna try this tonight. Will report back with result

Share this post


Link to post
Share on other sites

I have all my map addons server side to except i made a folder called buildings then in my server_functions.sqf at the bottom i have

call compile preProcessFileLineNumbers "\z\addons\dayz_server\buildings\BLCastle.sqf";

I'm gonna try this tonight. Will report back with result

Just a heads up it done the same thing, looks like some type of abstract building, lol

Share this post


Link to post
Share on other sites

Does same for me sometimes then sometimes it looks normal, it is an awesom place for sure

 

Glad you say that because I just logged onto my server and it was all messed up... if MaxPowers could share the biedi file, that would be cool, because then I'd copy it and move it someplace flat in the hopes that it doesn't have that problem.

Share this post


Link to post
Share on other sites

How would move it to somewhere flat?  That's a lot of work too, unless you have a simple way to do that ....

 

Find a flat area where you think it would work and place an object nearby (but not exactly on it so it can be easily removed)

 

Just select the castle in a drag box in the 2D editor and drag it over to that location, after that just pop into the 3D editor for fine adjustment. The objects will stay in tact / position so long as you do not change their orientation. Then just delete that object you placed earlier

 

Some objects may be a little off with the change in high that could occur, coming from the fairly uneven ground underneath black lake.

 

To ensure it is always flat you could always use this:

Add the "setVehicleInit" line to the SQF file for any buildings that are leaning.  

_this setDir -415.88132;
_this setVehicleInit "this setVectorUp [0,0,1];";
_this setPos [1939.5042, 14563.26, -0.068630017];

Beidi file should look as follows:

Add the "INIT" line between the "AZIMUT" and "PARENT" lines.

AZIMUT="-67.231117";
INIT="_this setVehicleInit "this setVectorUp [0,0,1];";";
PARENT="";

 

 

Just so you know, any large edit has the potential of screwing up between server restarts, especially when the objects are all in such close proximity. It should be noted that this is not a problem with the edit, but the server and ArmA itself.

Share this post


Link to post
Share on other sites

Anyway, nice addition Max! Looks very foreboding from the entrance like that and it's size is impressive. It fits in well to that location as well and does not look at all out of place. Great work :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...