Jump to content
bangabob

Loot system (Configurable Loot script)

Recommended Posts

Loot system



By BangaBob





Description

Fast, reliable loot spawning system. Simply place a marker over the map and call the script. Add/Remove loot that spawns and adjust the probability of spawning.

Features

  • Spawn Weapons, Attachments, Uniforms, Vests and backpacks
  • Light Weight script
  • Easy to use
  • Configurable to fit any mission
  • Multiplayer compatible

Download

here (v0.1)

ArmAholic here (v0.1)

Edited by BangaBob
  • Like 2

Share this post


Link to post
Share on other sites

Kinda cool that you explain how it works.

But there is similiar script which is superior to this. :\

Share this post


Link to post
Share on other sites
Kinda cool that you explain how it works.

But there is similiar script which is superior to this. :\

Which one is that?

Share this post


Link to post
Share on other sites

Very nice BB! So how could this link in with an inidbi script on the server? Or how could we get it to refresh the items every day etc?

Share this post


Link to post
Share on other sites
how could we get it to refresh the items every day etc?

You could potentially add all the _holders into a global array. Then every 24 hours delete all the holders and run the script again.

What is inidbi?

Share this post


Link to post
Share on other sites

Thanks Bangabbob, looks very easy to use look forward to trying it out.

Share this post


Link to post
Share on other sites

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites
Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Cheers mate

Share this post


Link to post
Share on other sites

Congrats with the release BB. Great script and great video!

Share this post


Link to post
Share on other sites

Is there a way to spawn ammo? My Gaming community has decided to slim down our load-outs but we run out of ammo occasionally :( and if possible to spawn ammo this fix's our problems. Thanks, great Script keep up the good work. :yay:

edit: I mean Just ammo by the way no gear or optics or weapons just the ammo. I have all the magazine codes I just don't know how to spawn them simce I don't see a magazine spawn group

Edited by MoLoJack

Share this post


Link to post
Share on other sites

Hey Banga, I'm really liking this script, but it really puts a hurting on the server when it runs. I'd like have random loot for a MP misison on all of Altis, but when I start it up, it just chokes for a good 60 seconds, then finally starts sweeping the island and populating the buildings from west to east (which takes another 30-60 seconds).

Also, is there any way to force it to only spawn near players so it doesn't load up the map with thousands of items that no player is near? I think just having all those extra items in game will kill the server/host machine.

Edited by Meatball

Share this post


Link to post
Share on other sites
Hey Banga, I'm really liking this script, but it really puts a hurting on the server when it runs. I'd like have random loot for a MP misison on all of Altis, but when I start it up, it just chokes for a good 60 seconds, then finally starts sweeping the island and populating the buildings from west to east (which takes another 30-60 seconds).

Also, is there any way to force it to only spawn near players so it doesn't load up the map with thousands of items that no player is near? I think just having all those extra items in game will kill the server/host machine.

If its only an initial 60 seconds before a mission then it's not so much of a problem?

Making it spawn loot around players?

Well this would require a loop that checks all the players locations and spawns/despawns loot as required. This would be quite complex because of the loot overlapping when multiple players enter the same area and other locality issues.

Share this post


Link to post
Share on other sites

Seems to be that building the houselist is the biggest issue on Altis to the point of it actually making the client hang and show as Not Responding for a good 20 seconds. I could probably split Altis up into Multiple zones and spawn the script multiple times I guess.

Edited by Meatball

Share this post


Link to post
Share on other sites

Well this was easy to set up and use,, thanks banga!..

Any chance you could make rare and a normal pool..

For instance,, I don't want everyone with all the best stuff off the hop,, there could be a really low chance of getting some items, yet a good chance at the more common ? Just a thought.. Cheers man! Like always,, another great publish!

---------- Post added at 03:29 ---------- Previous post was at 03:27 ----------

Seems to be that building the houselist is the biggest issue on Altis to the point of it actually making the client hang and show as Not Responding for a good 20 seconds. I could probably split Altis up into Multiple zones and spawn the script multiple times I guess.

I split Altis into 4, then I added 0.6 to the probability and called it a day.. Got rid of that nasty hangup

Share this post


Link to post
Share on other sites

Hey banga, I'm noticing some things are not spawning, or they are spawning under the house.

The map is Altis.. If I spawn 0.6 probability and move to the debug markers, there is almost certainly nothing there.

However in contrast, if I spawn 30% probability there is a lot more markers spawned and about half of them have loot at the spawn marker.

Still more testing to do on my end, but maybe you could clarify my muck up or if it is in-fact a bug..

Cheers mate!

-----------------------------------------------------------------------------------------------------

And if I remember right you also made the spawns so the mags will match up with the weapons for the most part ?

I would rather the scavenging be a little more dynamic.. Just a thought

Edited by 3lockad3

Share this post


Link to post
Share on other sites
Hey banga, I'm noticing some things are not spawning, or they are spawning under the house.

The map is Altis.. If I spawn 0.6 probability and move to the debug markers, there is almost certainly nothing there.

However in contrast, if I spawn 30% probability there is a lot more markers spawned and about half of them have loot at the spawn marker.

Still more testing to do on my end, but maybe you could clarify my muck up or if it is in-fact a bug..

Cheers mate!

-----------------------------------------------------------------------------------------------------

And if I remember right you also made the spawns so the mags will match up with the weapons for the most part ?

I would rather the scavenging be a little more dynamic.. Just a thought

It may be overloaded when you have a high probability. I am not sure.

As for making the Mags more dynamic simply add more weapons to the pool and more types of mags will spawn.

Share this post


Link to post
Share on other sites
It may be overloaded when you have a high probability. I am not sure.

As for making the Mags more dynamic simply add more weapons to the pool and more types of mags will spawn.

I guess the mags being more dynamic and of a specific pool will be a future thing (I hope) :D

The probability I like is 0.6, that way it's more of a scavenger hunt, rather then loot in every house. However, I have been testing with 30 to 50% to better understand why items are not spawning.. Do some debug markers not spawn on purpose ? or is that an anomaly ?

I'm also noticing your spawn points love staircases, which your barrel drop tester might break under that condition..

I'll be testing this all day, as I really need this. Will be providing information as the testing goes.

Thanx for your reply.

Okay, after watching your vid again I can say that markers are meant to spawn all the time. So this leads me to believe some class names may be wrong, or that certain spawn points conflict..

Another thing to add would be: empty vehicles, rare item possibilities, and ammo pools, because explosives are in that pool. For now I'll randomize a few explosive boxes, and attach them to empty markers.

Are these objects always on the map or do they delete when you are out of range ?

I as well experience the hangup in the load, not to mention an fps hit once in game.. It does settle once all things are spawned, but my fps is about 5-10 lower,, with number of spawned in consideration of course.

This is coming up flawless now by the way.

I went in and negotiated new terms to the argument, and now it is glimmering with awesome. Thank you very much for this script.

Edited by 3lockad3

Share this post


Link to post
Share on other sites

Not sure if you get notified when people edit posts so I'll *bump* this.

Share this post


Link to post
Share on other sites

Hi there. How would I get this script to do world objects like itemsLoot= ["Land_BottlePlastic_V1_F","Land_BakedBeans_F"];

I see this may be reserved for objects that are added to the player, but I would like to add just non-usable objects. If you ask why, well I am customizing a Wasteland game and I want the Food and Water to be part of the loot. We are going to put armed civies into houses that you must battle to get food and water. The current wasteland spawn objects only put the objects outside.

I feel using this feature I can kill two birds wth one stone.

So is it possible? I did add the above but they do not spawn.

**Update** I got it working.

Added to lootinit.sqf this new variable. this to objLoot=["Land_BottlePlastic_V1_F","Land_BakedBeans_F"];

Changed this line to reflect "6" in spawnloot.sqf --- > _type=floor (random 6);

Added this to bottom of "Types"

// Spawn Objects

if (_type == 5)

then {

_objects= objloot call bis_fnc_selectRandom;

_wobjects = createVehicle [_objects,[_pos0,_pos1,(getposATL _BARREL select 2)], [], 0, "can_Collide"];

deletevehicle _BARREL;

};

Edited by SoloZone
  • Like 1

Share this post


Link to post
Share on other sites

Have a question, would a weaponsholder clean up script brake this? I have a feeling. I think its called weapons holder anyways, basically when units die and get cleaned up, their weapons etc.. are left behind, if I have this stuff getting cleaned up, do you think it will affect this script/loot?

Share this post


Link to post
Share on other sites

Well I am NEW to scripting and have been teaching myself over the last month. Watched almost every video and forum tutorial that is out there. I am having difficulty figuring some things out. I am trying to get a loot spawn script that I am going to use for a mod. I want it to spawn loot in proximity to the player (say 300m) and then remain for 10-15 min after said player is out of the area before being deleted, but I am having trouble figuring this out. I am using this script in this thread as a template to get started and making changes to it as I figure things out. If someone could lead me in the direction I need to go or give me some hints that would be greatly appreciated.

Share this post


Link to post
Share on other sites

 for "_n" from 0 to 50 do {
	sleep 0.25;
	_buildingPos=_house buildingpos _n;
	if (str _buildingPos == "[0,0,0]") exitwith {};
			if (_probability > random 100) 
				then {
			null=[_buildingPos,_showLoot] execVM "spawnloot.sqf";
					};	
				};
			};				
}foreach _houseList;

that'll fix any lag issues I think, make it 0.5 if you still get lag.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×