Jump to content

[Release] Lootspawner, configurable building loot system


Suppe

Recommended Posts

Ok good I am glad you found it. I was just getting ready to PM you the file I have that I know works. There are some errors with certain things you just cant fix. Then others you have to fix. When you are new to this......you loose hair and brain cell trying to determine which is which. After all those that have helped me in the last 6 months....I am glad to be able to help someone else.

Link to comment
Share on other sites

so i am getting a ton of errors, my guess is the items in the lspawner lists do not belong in that category.

  Reveal hidden contents

 

here is my lists

  Reveal hidden contents

furniture list

  Reveal hidden contents

can anyone point out which items, objects are not in the right categories:

lootWeapon_list = [

lootMagazine_list = [

lootItem_list = [

lootBackpack_list = [

lootworldObject_list = [

Link to comment
Share on other sites

so i found this list, cannot remember where. may have been on this thread.  

  Reveal hidden contents

 

does anyone have a more updated list, being we are now on epoch 0.3.3

 

 

Link to comment
Share on other sites

  • 3 weeks later...
  On 9/7/2015 at 9:38 PM, tinboye said:

so i am getting a ton of errors, my guess is the items in the lspawner lists do not belong in that category.

 

Hidden Content

 

here is my lists

 

Hidden Content

furniture list

 

Hidden Content

can anyone point out which items, objects are not in the right categories:

lootWeapon_list = [

lootMagazine_list = [

lootItem_list = [

lootBackpack_list = [

lootworldObject_list = [

I am also getting these same errors

Link to comment
Share on other sites

  • 3 weeks later...

Many of Errors:

  Quote


 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <d", "repairkit", true];
};

if (({_x == _loot} count exclcontainer_list) > 0) th>
 1:42:25   Error position: <_loot} count exclcontainer_list) > 0) th>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 146
 1:42:25 Error in expression <cteditem);
_lootholder = createVehicle [_loot, _tmpPos, [], 0, "CAN_COLLIDE"];
i>
 1:42:25   Error position: <_loot, _tmpPos, [], 0, "CAN_COLLIDE"];
i>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 121
 1:42:25 Error in expression <ditem);
_lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
 1:42:25   Error position: <_loot, 1];
_lootholder setdir (random 36>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104
 1:42:25 Error in expression <m);
_lootholder addBackpackCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
 1:42:25   Error position: <_loot, 1];
_lootholder setdir (random 36>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 113
 1:42:25 Error in expression <m);
_lootholder addBackpackCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
 1:42:25   Error position: <_loot, 1];
_lootholder setdir (random 36>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 113
 1:42:25 Error in expression <ditem);
_lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
 1:42:25   Error position: <_loot, 1];
_lootholder setdir (random 36>
 1:42:25   Error Undefined variable in expression: _loot
 1:42:25 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104
^A 1:42:27 Error in expression <ditem);
_lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
 1:42:27   Error position: <_loot, 1];
_lootholder setdir (random 36>
 1:42:27   Error Undefined variable in expression: _loot
 1:42:27 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104
 1:42:27 Error in expression <ditem);
_lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
 1:42:27   Error position: <_loot, 1];
_lootholder setdir (random 36>
 1:42:27   Error Undefined variable in expression: _loot
 1:42:27 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104
 1:42:29 Error in expression <ditem);
_lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 36>
 1:42:29   Error position: <_loot, 1];
_lootholder setdir (random 36>
 1:42:29   Error Undefined variable in expression: _loot
 1:42:29 File loot_addon\LSpawner\fn_LSgetBuildingstospawnLoot.sqf, line 104

 

 

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...
  • 3 months later...
  On 7/12/2016 at 9:34 PM, BloodDragon said:

How can i find the New houses from Tanoa and add this for looting? Sorry for my bad English

Expand  

Open Editor, choose buildings you want, save without bin and take out the classnames..

or

show in Editor Console, copy name and paste into your list..

or

put those entries from me into your LSlootBuildings.sqf in loot_addon\LSpawner

Edit for your taste and tell me if I forgot some..

["Land_House_Small_01_F", 0],
["Land_House_Small_02_F", 0],
["Land_House_Small_03_F", 0],
["Land_House_Small_04_F", 0],
["Land_House_Small_05_F", 0],
["Land_House_Small_06_F", 0],
["Land_Shop_City_01_F", 2],
["Land_Shop_City_02_F", 2],
["Land_Shop_City_03_F", 2],
["Land_Shop_City_04_F", 2],
["Land_Shop_City_05_F", 2],
["Land_Shop_City_06_F", 2],
["Land_Shop_City_07_F", 2],
["Land_House_big_01_F", 0],
["Land_House_big_02_F", 0],
["Land_Shop_Town_01_F", 0],
["Land_Shop_Town_02_F", 0],
["Land_Shop_Town_03_F", 0],
["Land_Shop_Town_04_F", 0],
["Land_Shed_01_F", 0],
["Land_Shed_02_F", 0],
["Land_Shed_03_F", 0],
["Land_Shed_04_F", 0],
["Land_Shed_05_F", 0],
["Land_Shed_06_F", 0],
["Land_Shed_07_F", 0],
["Land_Slum_01_F", 0],
["Land_Slum_02_F", 0],
["Land_Slum_03_F", 0],
["Land_Slum_04_F", 0],
["Land_Slum_05_F", 0],
["Land_Addon_01_F", 3],
["Land_Addon_02_F", 3],
["Land_Addon_03_F", 3],
["Land_Addon_04_F", 3],
["Land_Addon_05_F", 3],
["Land_warehouse_01_F", 0],
["Land_warehouse_02_F", 0],
["Land_SCF_01_warehouse_F", 0],
["Land_House_Native_02_F", 0],
["Land_House_Native_01_F", 0],
["Land_Warehouse_03_F", 0],
["Land_FuelStation_01_workshop_F", 0],
["Land_FuelStation_02_workshop_F", 0]      ,

Watch out, last comma is not needed at the end of the list..

Link to comment
Share on other sites

  On 7/12/2016 at 11:32 PM, Tarabas said:

Open Editor, choose buildings you want, save without bin and take out the classnames..

or

show in Editor Console, copy name and paste into your list..

or

put those entries from me into your LSlootBuildings.sqf in loot_addon\LSpawner

Edit for your taste and tell me if I forgot some..

["Land_House_Small_01_F", 0],
["Land_House_Small_02_F", 0],
["Land_House_Small_03_F", 0],
["Land_House_Small_04_F", 0],
["Land_House_Small_05_F", 0],
["Land_House_Small_06_F", 0],
["Land_Shop_City_01_F", 2],
["Land_Shop_City_02_F", 2],
["Land_Shop_City_03_F", 2],
["Land_Shop_City_04_F", 2],
["Land_Shop_City_05_F", 2],
["Land_Shop_City_06_F", 2],
["Land_Shop_City_07_F", 2],
["Land_House_big_01_F", 0],
["Land_House_big_02_F", 0],
["Land_Shop_Town_01_F", 0],
["Land_Shop_Town_02_F", 0],
["Land_Shop_Town_03_F", 0],
["Land_Shop_Town_04_F", 0],
["Land_Shed_01_F", 0],
["Land_Shed_02_F", 0],
["Land_Shed_03_F", 0],
["Land_Shed_04_F", 0],
["Land_Shed_05_F", 0],
["Land_Shed_06_F", 0],
["Land_Shed_07_F", 0],
["Land_Slum_01_F", 0],
["Land_Slum_02_F", 0],
["Land_Slum_03_F", 0],
["Land_Slum_04_F", 0],
["Land_Slum_05_F", 0],
["Land_Addon_01_F", 3],
["Land_Addon_02_F", 3],
["Land_Addon_03_F", 3],
["Land_Addon_04_F", 3],
["Land_Addon_05_F", 3],
["Land_warehouse_01_F", 0],
["Land_warehouse_02_F", 0],
["Land_SCF_01_warehouse_F", 0],
["Land_House_Native_02_F", 0],
["Land_House_Native_01_F", 0],
["Land_Warehouse_03_F", 0],
["Land_FuelStation_01_workshop_F", 0],
["Land_FuelStation_02_workshop_F", 0]      ,

Watch out, last comma is not needed at the end of the list..

Expand  

It work fine. Thank you for your list and you little Tutorial to extract the Class names.

Link to comment
Share on other sites

  • 4 weeks later...

I'm using this script on Altis to spawn CUP and Apex weapons, works really well.

Just had to change loot tables.

If anyone needs them here are the createvehicle.text exceptions that you need to add to be able to fire the CUP launchers.

!="CUP_M_47_AT_EP1" !="CUP_R_OG7_AT" !="CUP_R_PG7V_AT" !="CUP_R_MEEWS_HEAT" !="CUP_R_SMAW_HEDP_N" !="CUP_R_SMAW_HEAA_N" !="CUP_R_MEEWS_HEDP" !="CUP_M_Javelin_AT" !="CUP_R_PG7VL_AT" !="CUP_R_M136_AT" !="CUP_R_PG7VR_AT" !="CUP_R_RPG18_AT" !="CUP_M_Stinger_AA" !="CUP_M_9K38_Igla_AA" !="CUP_M_NLAW_AT" !="CUP_M_9K32_Strela_2_AA" !="CUP_M_9K115_2_AT13_Saxhorn_2_AT"

Added to first line of Battleye/createvehicle.text

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  On 2/27/2015 at 8:53 PM, Suppe said:

the lootspawner is not more in your epoch.mission.... I have only packed the Lootspawner in a beautiful autostart addon. Very good, because now lazy people can no longer view or steal your settings.

for example... 90 % of the bornholm server use my lootspawner settings (files are marked and with header from me and in 90 % of the bornholm server u will found m< "edit by Suppe")   so it is antithief !

in "@epochhive\addons\"  it is safe :D

Expand  

Dude! Great job!

 

You beat me to the punch! :)

Link to comment
Share on other sites

  • 2 weeks later...

I downloaded this addon to use as a standalone lootspawner on my server and it works great without modification. I did notice all of the logs in my RPT file so I took a closer look at the files and even though I don't ever care to play EPOCH I made an account just to write this post to help others since the OP was kind enough to share . If you want to get rid of the RPT logs then do the following...

If you didn't modify the lootspawner at all, then go to fn_LSgetBuildingstospawnLoot.sqf and on line 73 change

---for "_lootType" from 1 to 5 do {---  

to  

---for "_lootType" from 1 to 2 do {---.

This will only allow the lootspawner to choose loot from lootlist 1 and 2, which is lootWeapon_list and lootMagazine_list(LSlootLists.sqf). If you want to spawn loot from lootlist 3/4/5, which is lootItem_list, lootBackpack_list and lootworldObject_list then you will need to populate those lists with item classnames, and make sure line 73 is  ---for "_lootType" from 1 to 5 do {---, replacing the number 5 with however many lists you want to spawn loot from   ....otherwise it will return "_loot" as nothing(undefined) because there are no items for lists 3/4/5 in the unmodified file. Also, you can't change the number 5 to number 4 and "skip" and item list, because of the way it is scripted. Meaning, if you want to spawn loot from list number 5, you will have to populate list number 4 as well. Hope this clears your RPT up like it did mine.

 

EDIT: spelling corrections(derp)  But also, I don't know if "syphonhose","energydrink", and "repairkit" are EPOCH classnames but if they throw errors just remove

if(_loot == "Land_CanisterOil_F") then {
  _lootholder setVariable["mf_item_id", "syphonhose", true];
  };

for each entry and that should clear your RPT up, unless of course you use this lootspawner for its intended purpose(EPOCH).  lol

Link to comment
Share on other sites

  • 3 weeks later...

Anyone using the original LootSpawner? If so, it has playableunits() calls.

In Lootspawner.sqf look for these lines (sorry mine has a customized building type array so I cannot atm give line numbers:

    while {true} do {
        _playersalive = false;
        {
            if (swDebugLS) then {
                dbgTimeplU = time;
            };
            //is Player online and alive?
            if ((isPlayer _x) && (alive _x)) then {
                _playersalive = true;
                //jogging has 4.16..., sprinting has 5.5... so if player velocity is < 6 spawn loot
                //works for players in vehicles too
                if (((velocity _x) distance [0,0,0]) < 6) then {
                //if ((vehicle _x isKindOf "Land") || (vehicle _x isKindOf "Ship")) then {
                    _posPlayer = getPos _x;
                    //get list of viable buildings around player
                    _BaP_list = nearestObjects [_posPlayer, spawnBuilding_list, _spawnradius];
                    if ((count _BaP_list) > 0) then {
                        //give to spawn function
                        _hndl = [_BaP_list, _spInterval, _chfullfuel, _genZadjust, _chperSpot] spawn fn_getBuildingstospawnLoot;
                        waitUntil{scriptDone _hndl};
                    };
                };
            };
            sleep 0.001;
            if (swDebugLS) then {
                dbgloopTimeplU = dbgloopTimeplU + (time - dbgTimeplU);
                dbgTurnsplU = dbgTurnsplU + 1;
            };
        }forEach playableunits;

Change the last line to

        }forEach allPlayers;

In LSdeleter.sqf, change line 47 from

                        }forEach playableunits;
to

                        }forEach allPlayers;

Rebuild the PBO and you are done.

 

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  On 2/12/2017 at 8:01 PM, Drokz said:

Thx for this natoed. Works good! Only thing not really working for me is the adding of scopes. Added them to weapon list but when you pick them up you cant attach them to the guns. If you sell to a trader and rebuy u can use them

Expand  

you need to change your LSlootLists.sqf for the way you have scopes spawning. see below

//here place magazines, weaponattachments and bodyitems(ex.: ItemGPS, ItemMap, Medikit, FirstAidKit, Binoculars, ...)
//used with addMagazineCargoGlobal
//"lootMagazine_list" array of [class, [magazinelist]]
//								class		: 0-civil, 1-military, ... (add more as you wish)
//								magazinelist: list of magazine class names

 

scopes shouldn't be in the lootWeapon_list of the LSlootLists.sqf

they must be add in the the lootMagazine_list of your LSlootLists.sqf

cheers

natoed

 

 

Link to comment
Share on other sites

Seems not to work. I added Scopes as you can see in the Scripts. Mags are still spawning in but no scopes. No errs in RPT

 

  Reveal hidden contents

 

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