Jump to content

Custom Loot Tables via missionConfigFile


Torndeco

Recommended Posts

Disclaimer

This is not the most efficent way todo custom loot i.e 100k+ missionfile,

But it allows for more flexible loot changes + adding in new loot positions

 

If all u are doing is replace / removing the odd weapon there are better ways todo it

 

Infact this way is pure lazy but allows u to alter all the loots & loot positions & zombie loot etc...

Or if u want to add loot postions for buidlings u added to server, that don't normally spawn loot

 

 

Github

https://github.com/Torndeco/Epoch-Custom-Loot

 

 

Credit

All credit goes towards http://opendayz.net/threads/tutorial-custom-loot-tables-and-adjusting-spawn-rates.11589/

I just altered it for epoch quickly, i may have made some mistakes

 

To find loot positon (works with only buildings in map i.e not spawned in by server, check out

http://opendayz.net/threads/find-building-loot-positions.11031/

Link to comment
Share on other sites

  • 2 weeks later...

Also another tip is if u like to have zombie free bases...

Instead of teleporting zombies away

 

We do a check for plotholes before spawning loot & zombies

Doesn't prevent wild zombies from spawning & wandering into the base.

Plus we already have the file included in the mission file, its just a small change in size to add it.

 

player_spawnCheck.sqf

{
    _type = typeOf _x;
    _config =         missionConfigFile >> "CfgBuildingLoot" >> _type;
    _canLoot =         isClass (_config);
    
    if(_canLoot) then {
        _nearbyPole = (getPos _x) nearestObject  "Plastic_Pole_EP1_DZ";
        if (isNull _nearbyPole) then {
......................
.....................
....................
        };
    };
Link to comment
Share on other sites

Config.cpp contains more than the 2 files I linked.

I have the loot info split into 2 files and it's just the default epoch loot and positions

It's just contains a loot typo fix for a residential spawn location, fixed already on github for next epoch version.

The whole ideal of the files is that u can edit the file and alter the loot yourself for your server.

Link to comment
Share on other sites

  • 2 weeks later...

One Problem, Zombies aren't spawning.  any ideas why?  i followed your guide to the letter and am currently scrolling through the files to see if i have missed something. 

 

Arma2oaserver.RPT file being spammed with:
 

} forEach _msgList;>
20:29:14   Error position: <_msgList;>
20:29:14   Error Undefined variable in expression: _msglist
20:29:14 Error in expression < allGroups;
 
dayz_serverObjectMonitor = _safety;>
20:29:14   Error position: <_safety;>
20:29:14   Error Undefined variable in expression: _safety
20:29:14 Error in expression <oad, _interval, time]];
};
};
 
Any ideas?
 
Fixed: found half the code for the cfgbuildingLoot.hpp was missing (my fault) and a spelling error when editing the Building_spawnZombies.sqf (may fault again) 

but other than that, about an hour of testing later and still no problems :D thanks Torndeco

ps.  Still getting the .rpt file spam of:

};
} forEach _msgList;>
20:50:28   Error position: <_msgList;>
20:50:28   Error Undefined variable in expression: _msglist
20:50:28 Error in expression < allGroups;
 
dayz_serverObjectMonitor = _safety;>
20:50:28   Error position: <_safety;>
20:50:28   Error Undefined variable in expression: _safety
20:50:28 Error in expression <oad, _interval, time]];
};
};

Any Ideas of what causing it?
Edited by Ethan_296
Link to comment
Share on other sites

http://www.armaholic.com/page.php?id=411

 

Install unRap

 

run unRap + Extract

@DayZ_Epoch\addons\dayz_code\config.bin

 

....

Should be similar process, in the progress of upgrading my servers atm

 

 

edit:

 

 

#include "extras\custom_loot\CfgBuildingLoot.hpp"
#include "extras\custom_loot\CfgLootSmall.hpp"
#include "extras\custom_loot\cfgLoot.hpp"
 

Link to comment
Share on other sites

When editing the cfgbuilding_loot.sqf we add a bunch of items, but there is always certain things that spawn EVERYWHERE!  

For instance, combolock and lockbox @ a rate of 0.005 spawns 4 in a 2story Panelak,  Also a winny spawns like crazy there too

Also AK107 GL Kobro spawns at about 5/barracks.  When its rate of spawn is 0.04 and other weapons are well over 0.10.

Link to comment
Share on other sites

To make your custom loot changes edit...

 

extras/custom_loot/config.hpp

extras\custom_loot\config.hpp
extras\custom_loot\cfgLoot.hpp

 

Recommend u use  -showScriptErrors

In dayz commander -> settings -> Launch Parameters

That way u will notice if u make a typo mistake

Link to comment
Share on other sites

thanks for the reply . ive been trying to test to see if i can modify the spawns in certain buildings the most obvious one for me was the hospital 

 

i wanted something to spawn in the hospital that normaly doesnt, so i added the wooden arrow . me and a friend have tried several times to see if it drops and still nothing 

 

heres the code i used in cfgLoot.hpp

 

hospital[] = {
{
"ItemBandage",
"ItemPainkiller",
"ItemMorphine",
"ItemEpinephrine",
"ItemBloodbag",
"ItemAntibiotic",
"WoodenArrow"
},
{
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.90
 
im wondering if there is something im missing or done wrong . as it still spawns the same things . just no arrows
 
i havent edited the config.hpp file as wasnt sure which section to change
Link to comment
Share on other sites

ok so ive been going back over your instructiosn .. again thank you for the tutorial .. but i have a question in the part where you say 

 

2)

Save as  extras/custom_loot/config.hpp

http://pastebin.com/7hA4c9vu

 

Save as extras/custom_loot/cfgLoot.hpp

https://raw.github.c...igs/cfgLoot.hpp

 

Save as extras/custom_loot/CfgLootSmall.hpp

https://raw.github.c...fgLootSmall.hpp

 

 

Edit description.ext in your mission

Add the following to the very top of the file

#include "extras\custom_loot\config.hpp"
#include "extras\custom_loot\cfgLoot.hpp"

 

do i need to make a folder called extras and within that folder another folder call custom_loot

 

as i cant name the files  extras\custom_loot\cfgLoot.hpp"

 

and also do i need to have the sqf files listed in the tutorial in the same folder ?

 

again thank you for any help provided, i know im probably asking really basic question  B)

Link to comment
Share on other sites

Hi !

 

I have tried this today.. 

I have strictly followed each steps of your explanations..  i've check every steps twice to be sure about typo errors...

 

now the problem is that i stay stuck on the black screen "waiting for the host"

 

Any idea about what it should be?

Link to comment
Share on other sites

I have used your tutorial and have done custom loot tables on other servers before as well.  I'm having the same problem as always.  For some reason some items just don't want to spawn in, regardless of the spawn chance I give them.  It's like the server is reading the loot table and just stops after a certain point.  I've double and triple checked the loot files to make sure that there isn't an extra comma or semicolon inserted between the items to prevent items from being read.  Any ideas?

Link to comment
Share on other sites

First I just want to say thank you for the time you took to do all this and to help others with their servers.  I know all this is very time consuming and answering questions from every direction can be trying.  Having said that, your instructions appear to be fragmented.  Could you possibly edit your initial post to include all fixes/additions for clarity?

 

I'm doing custom loot on my server and we we're having mixed results.  Some luck getting certain items in but many others were spawning seemingly with total disregard to the loot files (6 winchesters in one room, crazy stuff like that).  So I see an updated post saying you forgot something, with a link to new files.  In those files is a new folder and variables.sqf that I do not see referenced in your instructions.  

Again I sincerely appreciate your help and willingness to share, but everyone would benefit including you with clearer instructions.  You wouldn't have dummies like me asking a million questions.

 

I'd be willing to jump on your TS or you on mine to help go through this and write up step by step instructions with you.

 

Thanks again.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...