How the??? added buildings on map are duplicated...?

Discussion in 'Map Additions' started by DangerRuss, Jul 17, 2013.

  1. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    I added a bunch of buildings to my server, and they have somehow made duplicates of themselves. For example, when you go up to a barracks and open the door, theres another door to open. Sometimes there are 3 or 4 doors to open before you're inside... So it looks like the buildings somehow copied themselves on top of themselves.. How the heck do I fix this? this blew my mind! I am at work so I cant copy my script to you right now, but I can later if you need it. Thanks for the help!
     
  2. Samirocks123

    Samirocks123 Well-Known Member

    Joined:
    Dec 18, 2012
    Messages:
    100
    Likes Received:
    3
    When i first started editing i had this issue as well, and its just a simple error. You are merging your current .sqm (The one the server is running) to your custom created .sqm that you created with your buildings. So what is happening is that since you already merged these before, the buildings are already in the servers .sqm, and now that your merging again it is just adding another building on top of it. If that makes any sense I guess.......But heres how to stop this, whenever you merge your new .sqm (The one you created) merge it with a FRESH copy of the servers mission file/sqm. Do that every time and it should be fixed! If this is confusing at all (Which it probably is) Just ask any questions and I will do my best to help.
     
  3. Johnkok

    Johnkok Well-Known Member

    Joined:
    Jun 1, 2013
    Messages:
    105
    Likes Received:
    6
    I also have this problem. When I merge my files I ftp the mission file from the server, add my updates then re-upload. Is that what you mean above? This does not work for me.
     
  4. Samirocks123

    Samirocks123 Well-Known Member

    Joined:
    Dec 18, 2012
    Messages:
    100
    Likes Received:
    3
    Make sure when you merge it, you are using a fresh copy of the servers mission file.
     
  5. Johnkok

    Johnkok Well-Known Member

    Joined:
    Jun 1, 2013
    Messages:
    105
    Likes Received:
    6
    Stupid question, sorry, but can elaborate? I download the servers mission file every time and add the changes to it. Is that what you mean?
     
  6. Samirocks123

    Samirocks123 Well-Known Member

    Joined:
    Dec 18, 2012
    Messages:
    100
    Likes Received:
    3
    Yes that is what i mean, so your taking the old server mission file and adding the changes, well, from what i can tell you are doing what i said in my first post. So make sure you grab a FRESH copy, not the one you already edited, and merge it then.
     
  7. Johnkok

    Johnkok Well-Known Member

    Joined:
    Jun 1, 2013
    Messages:
    105
    Likes Received:
    6
    Ok, I think we are on the same page then. it doesn't work for me :-(. Thanks anyway
     
  8. Samirocks123

    Samirocks123 Well-Known Member

    Joined:
    Dec 18, 2012
    Messages:
    100
    Likes Received:
    3
    Hm, thats weird, because if you are merging with a fresh server mission.sqm theres honestly no way possible it could dupe like that. Maybe you merged YOUR files on accident?
     
  9. Johnkok

    Johnkok Well-Known Member

    Joined:
    Jun 1, 2013
    Messages:
    105
    Likes Received:
    6
    What I have done exactly is in my init.sqf I added
    I use this to call the added items. The mission.sqf file I replace every time I make a change. So I delete mission.sqf and upload the new mission.sqf each time a new item has been added or changed.

    This way I don't have to mess with mission.sqm all the time

    Edit: Let me check something though as there seem to be quite a few ways to add custom buildings. I load Dayz through six launcher. I go to the main Dayz menu, hit Alt+E to get the editor. Should I be using the Arma2:OA editor or do it like I mentioned just before?
     
  10. Johnkok

    Johnkok Well-Known Member

    Joined:
    Jun 1, 2013
    Messages:
    105
    Likes Received:
    6
    I decided to try the convert HIEDI file to SQL query using: http://dayz.wofjwof.com/map.php. I have kept the mission.sqf file in as sound sources do not go into the database but other than that I deleted all the entries in the mission.sqf file. The buildings, although slightly out of alignment do not duplicate anymore. They also seem more solid than before, the previous ones used to flicker a lot.
     
  11. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    Sorry for never getting back to this. My solution is found here
    http://opendayz.net/threads/my-buildings-are-moving.12026/#post-61984

    I simply copy paste the custom map sqf into my missions folder and exe it in the ini.sqf. at the top of the map sqf you need a very specific line. I can add and save buildings in a just a few minutes with no problems. Very easy
     
  12. ZGreen-Spectre

    ZGreen-Spectre Well-Known Member

    Joined:
    Jul 16, 2013
    Messages:
    117
    Likes Received:
    20
    The way I add buildings to my mission file is, I download the oldest dayz mod that let you use the 2d editor with dayz, renamed it @dayz2d then created a shortcut of arma2 and put [email protected] in the launch paramaters. Then I add buildings onto the chernarus map using the standard arma2 2d editor with no mods, save that, load up my @dayz2d, open 2d editor, open my mission.sqm, then merge my new buildings with my mission.sqm, save and put it back in my dayz_chernarus. :) Typing it out it seems like a lot of steps, but it takes a minute or two tops to do it once I have the map ready to be merged. If anyone is actually interested in this method I can re-write this in an easier to follow way. Of course you could just copy/paste from a mission.sqm and adjust object numbers and count, but I think my way is easier and faster.
     
  13. Samirocks123

    Samirocks123 Well-Known Member

    Joined:
    Dec 18, 2012
    Messages:
    100
    Likes Received:
    3

    Haha yeah im pertty sure thats the way everyone use to do it, the problem with that way for certain people is your mission file starts to get really large after a while.
     
  14. ZGreen-Spectre

    ZGreen-Spectre Well-Known Member

    Joined:
    Jul 16, 2013
    Messages:
    117
    Likes Received:
    20
    Yeah I could see that happening, well what's an alternative then? If there is a better way to do it I'll gladly switch over. I only started all this jazz a few weeks ago and still have a lot to learn, the only scripts I've written 100% myself don't work :( but I think I'm getting better at it.
     
  15. Samirocks123

    Samirocks123 Well-Known Member

    Joined:
    Dec 18, 2012
    Messages:
    100
    Likes Received:
    3
    Im currently on my phone, but when i get home I will write a detailed tutorial on a different method.
     
  16. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    ok sorry for the wall of text Im at work... if this doesn't help feel free to message me personally and when I get home I'll show you my mission.

    Zgreen the way I do it sounds far easier than that man. Lets say you're trying to build a barrack. Open the 3d editor, load the map, go to the location you wish to place the barrack. Put something there like a wall or something stupid and save it. Then go to your documents > arma 2 other profiles and open the profile you saved this with. Then go to mission, and you'll see your map saved there in the 2 formats, one being sqf. Now really the sqf is the only one you NEED to change, but if you wish to load back up the map editor and see the barrack and adjust its position, you need to make the changes to both of the files (I forget the other format). Then you go to somewhere like armatechsquad.com and find the database name for tha barrack you're trying to build, copy that name, then go to the saved map and cut out the name of whatever object you put there (wall, well, etc.) and paste the name of the barracks over that. Save it. You can now reopen the save file in the editor to adjust the buildings how you see fit.
    Once you are done that save it, and reopen the files under your other profiles and open up the SQF format missions file. You need to delete all the text underneath the last building you have saved, and you need to delete all of the text at the very top above the first building you have saved. You then need to have

    if (isServer) then {

    at the very top. You also need to delete the group units you have in there that allowed you to save the mission on the editor (the guy you use to run around and preview with). Once tha is all done, you need to save that SQF in your missions folder on your server. Name it whatever you want , lets say Map1, and then in your init.sqf that is also in your mission folder you need to have a line that says

    [] execVM "Map1.sqf";

    then if you did all that correct you should be able to save it, and start up your server, and the buildings will be on there, and if you used the correct database name for the building, it should spawn loot without you needing to do anything more. This is the easiest way to do it, and I have experienced zero issues with it. The mission file isn't really that big, and it doesn't take any longer to load the map than it normally would.
    Feel free to send me a message if this is all too much too fast, I know it took me a few days of reading to understand what I was doing, but once you get it, its so simple you'll laugh. Sometimes I add a couple buildings, just minutes before the server restarts, just to have them for the next restart.
     
  17. Samirocks123

    Samirocks123 Well-Known Member

    Joined:
    Dec 18, 2012
    Messages:
    100
    Likes Received:
    3

    Thats not an easy way to do it, you are having to edit the .sqf and .beidi file just to get barracks, thats a waste of time. Here is my tuturial;


    Step 1: Download Jon Editor Update (http://www.armaholic.com/page.php?id=5932)

    Step 2: Place that pbo in your @DayZ folder in the Arma 2 oa Root

    Step 3: Launch DayZ, when you get to the main menu just hit Alt+E, load up your map.

    Step 4: Place a center, a group, and a unit anywhere you want (In that order) Then hit vehicle, thats where everything is at, you should see a bunch of new sections with a "#" because thats from Jon Editor Update, now edit the map to your likings.

    Step 5: When you are done editing it, save it to whatever name you would like, then open file browser and go here:

    C:\Users\YourName\Documents\ArmA 2 Other Profiles\YourInGameName\missions

    and find that folder you created, there should be an .sqf file type along with a .biedi file type.

    Step 6: Copy that .sqf to your desktop or someplace else (Leave the .biedi file) and open the .sqf with notepad++

    Step 7: Remove these lines:

    Code:
    activateAddons [
      "map_eu"
    ];
     
    activateAddons ["map_eu"];
    initAmbientLife;
     
    _this = createCenter west;
    _center_0 = _this;
     
    _group_0 = createGroup _center_0;
     
    _unit_0 = objNull;
    if (true) then
    {
      _this = _group_0 createUnit ["BAF_Soldier_Officer_DDPM", [10485.557, 2552.366, 5.7220459e-006], [], 0, "CAN_COLLIDE"];
      _unit_0 = _this;
      _this setDir 8.3060741;
      _this setUnitAbility 0.60000002;
      if (true) then {_group_0 selectLeader _this;};
      if (true) then {selectPlayer _this;};
    };
    (Note, you may not have some lines that i have, i used an extra addon called Map_eu, but that requires the client to download files)
    Now, at the top place this line:
    Code:
    if (isServer) then {
    Step 8: Put that sqf into your server's mission folder
    Step 9: Open up the init file in your server, and go to the bottom and add this line in:
    Code:
    [] execVM "filename.sqf";
    Now that should work! I typed this really quickly though so there may be errors, please correct me if there is.
     
  18. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    The only step this saves you, is copy and pasting one or two words.... it literally takes 2 seconds to cut and paste. You do not have to edit the .beidi file unless you plan on reopening the map editor to adjust the position of the building. This isnt' exactly necessary. So I can see where the editor mod saves some time, but only a minute or two at the max. I'll have to download it and see what all the hype is about.
     
  19. ZGreen-Spectre

    ZGreen-Spectre Well-Known Member

    Joined:
    Jul 16, 2013
    Messages:
    117
    Likes Received:
    20
    Ok, I see then. You are just having your init call the map, that's interesting. I think I'll stick with my method. As far as I can tell the difference between a 300 kb mission file and a 3000kb mission file is maybe a minute, which is not a big deal. My far is so much simpler and faster. Buildings are exactly where I place them 100% on the dot, I can add markers, waypoints and triggers while I'm editing, and best of all it takes me less than a minute to do it. :) Thanks for the other options though guys.
     
  20. DangerRuss

    DangerRuss OpenDayZ Rockstar!

    Joined:
    Jul 10, 2013
    Messages:
    1,258
    Likes Received:
    69
    Your way would confuse me but if it works for you i say do it. Ive added 30+ buildings and still the file is only like 1300kb so its not too bad. Also i have a vilayer server, and they unpack your miasion and server pbo's right on the database. So no unpacking/packing. Just text editing right on the control panel and clicking save. Makes life easy
     

Share This Page