Jump to content
  • 0

[RELEASE] Enigma_EPOCH_CfgBuildingLootPos


           G                 GM    G             A      
   GMAEN  M E     E IGM   IG   N   AEN    EN    EN      
          E IG    I MAE  GM        NIG  EN G    IGM     
   N      I  AE   M ENIG A         G  ENI  A    MA N    
   G      MA  IG  E I MAEN         A  IG   N    E  G    
   A      EN  MA  I MAENI          N       G    I   E   
   NIGMA  IG   NI M  NIGM         IG       AE  GMAENI   
   G      MA    MAE  GMAEN      IGMA       NI  A   GMA  
   A      EN    E I  AEN G      MAEN       GM  N    EN  
   N       G     GM  NI  AEN    ENIG       AE        G  
   G       A     AE  GM   IGMAEN GM        NI M         
   AENIG  E          A       N             G            

Have you ever wished you could set your own loot positions? 


Have you added in custom buildings that dont spawn any loot objects?


With the latest version of Epoch 0.3.1 you can now define any buildings lootable objects and their position within said building!





Go to - https://github.com/happydayz-enigma/Enigma_EPOCH_CfgBuildingLootPos to get the tools!




There you will find a sample mission file and included inside the custom folder is a copy of the generic CfgBuildingLootPos.hpp



Please note this is a ROUGH script... Im sure there is a better way to get the information out, and it seems to be really laggy sometimes with the cursortarget not finding the object right in front of it! just keep trying different positions of looking at it - often further away is the answer! You can also try and search the object the look at it. That seems to work also.


If you have suggestions I will gladly take your feedback/expertise!



Unhide the Spoiler for the Readme!





Load this mission up with your favourite 3D editor and you will find the scroll option "Take Loot Position" is now on your mousewheel.


Go to any building that you want to spawn loot for and postition any of the following lootable objects:




















Next looking at your newly placed loot object select "Take Loot Position" from your mousewheel.



You should get a message in the top right of the screen saying something like this: "Chair_EPOCH position has been copied to your CLIENT RPT"


If you get the message " ---- is NOT an epoch Lootable Object" then you are either not looking at a lootable object as listed above, or as seems to happen with a few editors, they take a while for the object to be properly seen by the script. In which case give it 10seconds and you should be able to look at it and try again.



Open up your client RPT file. It can be located by opening up run and typing ----- %programfiles(x86)%\Steam\steamapps\common\Arma 3\profiles


You are looking for your most recent RPT!


scroll to the bottom and you will find something like this:



23:11:03 "class Land_i_Stone_Shed_V3_F: Default


        fridgePos[] = {{ { [346.734,-264.233,-11.4554] },273.825 }};




Now open up the CfgBuildingLootPos.hpp.


First thing you need to do is check that the building you are adding objects too isnt already included in the file!


So in this case search for





In this case it is already in the files!


But imagine it isnt for this explanation.


You can now add 


class Land_i_Stone_Shed_V3_F: Default


        fridgePos[] = {{ { [346.734,-264.233,-11.4554] },273.825 }};



Right after


    class Default


        fridgePos[] = {};

        shelfPos[] = {};

        pelicanPos[] = {};

        wardrobePos[] = {};

        bedPos[] = {};

        couchPos[] = {};

        cookerPos[] = {};

        tablePos[] = {};

        lockerPos[] = {};

        toolRackPos[] = {};

        shoeboxPos[] = {};

        lootBiasPos = 25;

        lootType = "normal";




Do the same for any other objects you place. 


Note: if the classname is already there you only need to copy the line



        fridgePos[] = {{ { [346.734,-264.233,-11.4554] },273.825 }};

and place it into the relevant buildings classname!



If you have multiple positions for the same object (in this case a filing cabinet) then you would enter the positions like this:


filingPos[] = {{ { 1.82031,0.972656,-1.75876 },91.8 },{ { 1.82031,1.55664,-1.75876 },91.8 }};


Now take your new edited CfgBuildingLootPos.hpp and place it anywhere into your servers mission file.




Inside your Description.ext add the line:


#include "custompath\CfgBuildingLootPos.hpp"



and next time you load up the server your newly set loot positions will have a chance of spawning when a player is near!



Share this post

Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Latest edit: remember you can define the lootbiaspos for any building! What does this mean?  The Lootbiaspos determines how many lootable objects will spawn in any particular building when a player normally spawns loot there! 


Default for most is 25%. 


For Example: 


Say a building has 10 loot positions. 

Every player that goes past said building has a chance of spawning loot there. Say you walk up to it and a random 2 lootable items have spawned in. That is the lootbias of 25% coming into effect.


If you had set the lootbiaspos for the same building to 100% and walked in you would find all 10 lootable objects would have spawned in.


Credit to halv for drawing my attention to this.

Share this post

Link to post
Share on other sites
  • 0

New version up on github that is only a fraction of the size of the original file. Next version will take all positions within a specified distance just been having issues with it ignoring my if statements and giving positions of bee's and whatnot as objects in your rpt lolz

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.

Answer this question...

×   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.


  • Advertisement
  • Supporters
  • Discord

  • Create New...