Chernarus CustomLoot

Dodo(DK)

New Member
Hello

how do I get the loot in the buildings I put in through infistar all the named map_ and what they called
 
In your custom loot scripts is a file CfgBuildingPos.sqf that has a code block for each building classname. After the buildings classname is the loot type that it will draw from.
You will need to have a code block like below for each building you added that does not already have a class definition. Check that the buildings you added from map_eu do not already have one but its NOT named with the map_ prefix ..... if that is the case, you can just go into your sqf file that created the buildings and change the name from map_ to land_ or whatever the prefix is.
[EDIT]. You said infistar. I assume that places them in the object database rather than an sqf file, so same applies, rename the classname in your database.
Code:
class Land_Mil_hangar_EP1: MilitaryIndustrial
{
    maxRoaming = 3;
    lootPos[] = {{-9.83203,-12.4097,-5.38129},{10.5488,-12.1318,-5.38129},{13.002,0.0214844,-5.38129},{-13.3887,0.25,-5.38129},{13.3203,20.5176,-5.38129},{-13.1865,19.9839,-5.38129},{0.0195313,21.5078,-5.38129},{0.49707,11.5469,-5.38129},{-0.836914,-0.634277,-5.38129},{0.177734,-11.6821,-5.38129}};
};

There are more options, but the above is the basic. lootPos will pull loot from cfgloot.sqf, and maxroaming is how many zombies will spawn. the lootPos[] is an array of positions inside the building where loot will spawn.

Use this script (its included in the pbo) http://opendayz.net/threads/find-building-loot-positions.11031/ (instructions are included I am sure)
You put the file into your operation arrowhead/addons folder and start arma, then press CONTROL+E to start the editor. The custom buildings you have added, place them all in a row and then go into them and point to where you want the loot position. Its copied to the clipboard so then you just tab to your notepad++ file and paste the location into the lootpos[] array.
Repeat for each loot pile and building.

Its a bit confusing, so to review the steps:
  1. Open cfgbuildingspos.sqf in notepad++
  2. download the pbo from the link and put it in your addons folder. You will have to delete it before you go to join a dayz server or you will get an error because of your extra file.
  3. Start Arma2, press control+e to open the editor.
  4. Place the buildings you want loot positions for, put them anywhere, all in a row. the actual worldspace location does not matter.
  5. Go into each building and get the lootpos, alt+tab to notepad++ and paste the lootpos into your newly created building classes lootpos[] array.
  6. Repeat.
 
As an example about the map_eu buildings, I opened the editor and placed the map_eu military barracks. Its the EXACT SAME building as the normal military barracks. If you look on the object list on the left you can see the classname is MAP_mil_barracks_i

HVZPb3Q.png


If you did this in an SQF script you would use the standard arma classname of Land_Mil_Barracks_i and if you look at the CfgBuildingPos.sqf you will see this classname already has a loot position class definition:
Code:
class Land_Mil_Barracks_i: MilitarySpecial {
    lootPos[] = {{4.56494,-2.67383,-1.14822},{0.312988,1.54492,-1.09824},{-2.95361,1.49414,-1.11823},{-3.39111,-1.99023,-0.708221},{-6.68604,-1,0.0917664},{-8.94238,-2.52441,-1.09824},{-0.59668,-1.49609,-1.10825},{3.03467,-1.00586,0.0917664},{-0.214355,-2.19531,0.0917664},{-8.93018,1.53906,-1.09824}};
    lootPosZombie[] = {{-7.97119,0.0888672,-0.223236},{-5.29053,-0.952148,-0.223236},{-1.9707,-1.5957,-0.223236},{1.48193,-2.20313,-0.223236},{5.24463,-2.05664,-0.223236}};
    lootPosSmall[] = {{3.88037,-0.905273,-0.358246},{6.48242,-2.51367,-0.978241},{3.03662,-1.78418,-0.698242},{-0.179199,0.488281,-1.10825},{-3.20703,-0.101563,-1.11823},{-3.37061,-1.08887,0.0917664},{-6.79297,-2.63086,-1.09824},{-9.29541,-0.212891,-1.09824}};
};

So, if you placed a barracks with infistar (or via the editor) and it says MAP_Mil_Barracks_i as the classname you can simply rename it to LAND_Mil_Barracks_i and it will spawn the normal loot.
 
Back
Top