Jump to content
  • 0

increase spawn chance of Lootable objects ?


mok21

Question

hi guys,

 

I'm looking for way to increase spawn chance of lootable objects(loot container) like furnitures, gun box, etc..

 

I've tried LSapwner. It works but there are lots items spawned on floor without container. I don't wanna this.

 

I'm satisfied with amount of Items in container, and tatal amount of spawned. with default of Epoch

 

but some of users want to "meet more Contatiners".

 

so, I've serched for options in A3_Server_Settings.pbo but failed.

 

Loot.h file has no options for spawn chance of Containers i think.. (If I'm worng plz let me know)

 

is anyone know about this? Any option or way to increase it?

 

 

(sorry for mu bad english)

Link to comment
Share on other sites

Recommended Posts

  • 0

@epochhive\addons\a3_epoch_server_settings\configs\loot.h is what you need to edit for loot spawn within containers.

 

also edit 

epochconfig.hpp

 

lootMultiplier = 0.9; // 1 = max loot bias. This controls how much loot can payout per Epoch loot container.

Link to comment
Share on other sites

  • 0

@epochhive\addons\a3_epoch_server_settings\configs\loot.h is what you need to edit for loot spawn within containers.

 

also edit 

epochconfig.hpp

 

lootMultiplier = 0.9; // 1 = max loot bias. This controls how much loot can payout per Epoch loot container.

 

 

thanks for ur kindness tinboye.

 

I've already changed Lootmutipier. (set to max)

 

but it is not option for Container's Spawn chance but amount of items in the containers. and "CfgMainTable" that located inside of loot.h file is same. It is for amout of items whitin Containers...

 

I'm looking for ways to increase Spawn chance of Container itself. :(

Link to comment
Share on other sites

  • 0

 

it would be easier, not to mention better done by just changing the values instead of running an irrelevant loop:

 

https://github.com/EpochModTeam/Epoch/blob/master/Sources/epoch_server_settings/configs/loots.h

class Trash : Default
{
	chance = 0.33;//chance of loot
	lootMin = 1;//min amount of loot
	LootMax = 6;//max amount of loot
	tables[] = {
			{ "Items", 5 },
			{ "Backpack", 5 },
			{ "Pistols", 3 },
			{ "Uniforms", 9 },
			{ "Vests", 7 },
			{ "Headgear", 9 },
			{ "Food", 9 },
			{ "Hand", 10 },
			{ "Equipment", 10 },
			{ "Generic", 15 },
			{ "GenericLarge", 18 }
	};
	antagonists[] = {
			{ "UAV", 30 }, // I_UAV_01_F
			{ "Cloak", 30 }, // Night = Epoch_Cloak_F, Day = Epoch_Sapper_F
			{ "Sapper", 25 }, // Epoch_Sapper_F
			{ "SapperB", 15 }  // Epoch_SapperB_F
	};
};
Link to comment
Share on other sites

  • 0

he DOESNT want more loot in the ITEMS

he wants MORE physical ITEMS!

 

cosmetics... cosmetics!!!!!!!!

 

In the first post he says

 

 

I'm satisfied with amount of Items in container, and tatal amount of spawned. with default of Epoch

 

but some of users want to "meet more Contatiners".

 

 

Read the post instead of running an irrelevant comment...

Link to comment
Share on other sites

  • 0

in epochconfig.hpp:

lootMultiplier = 0.5;

if you want more loot you should either define more locations in the buildings or better yet, just increase the amounts of items each lootable object spawns like i suggested.

 

he DOESNT want more loot in the ITEMS

he wants MORE physical ITEMS!

 

cosmetics... cosmetics!!!!!!!!

 

In the first post he says

 

 

 

Read the post instead of running an irrelevant comment...

 

you can change the amount of lootable objects thats in epoch in epochconfig.hpp, your script is completely irrelevant, not to mention it will decrease fps for some (if not all) players, to run large loops like this.

 

also, having more lootable objects spawn in will impact server aswell as client fps, so yea your idea is horrible, lol.

 

considdering that, it is the better way not to mention easier to control, by just increasing the values i suggested.

Link to comment
Share on other sites

  • 0

#1 he doesnt want more loot as mentioned.

 

#2 yes he could define more locations in the buildings as I have explained how to do in another post on here.

 

#3 yes it may decrease your fps a bit due to the extra objects being spawned in. Unless he has a full server its going to make little difference particularly since it is simply just the epoch lootspawning script basically running again for a closer range once every 5 seconds so not a huge overhead on the clientside compared to alot of scripts out there. So your basically saying that the Epoch lootspawner script that the devs have made is a terrible idea eh? 

 

#4 whats your problem mate? you have a serious beef with people answering peoples questions or something? 

 

If your not going to be polite or add anything new to the topic dont bother posting and telling people that what they offered is rubbish.

Link to comment
Share on other sites

  • 0

#1 he doesnt want more loot as mentioned.

 

he should still know the better way to do it

 

#2 yes he could define more locations in the buildings as I have explained how to do in another post on here.

 

why didnt you just link that in the first place then?

 

 

#3 yes it may decrease your fps a bit due to the extra objects being spawned in. Unless he has a full server its going to make little difference particularly since it is simply just the epoch lootspawning script basically running again for a closer range once every 5 seconds so not a huge overhead on the clientside compared to alot of scripts out there. So your basically saying that the Epoch lootspawner script that the devs have made is a terrible idea eh? 

 

spawning loot is part of the idea in the mod, so its kinda unavaidable, however adding another loop doing exactly the same will not only cause an fps impact but possibly also spawn multiple lootable objects in the same locations, possibly making it impossible to loot either not to mention the impact it will have on fps per extra player in the game.

 

imho any while loop is a bad idea, but its not like you can avoid using it, however some are obviusly better than others and this one is not one of the best.

 

#4 whats your problem mate? you have a serious beef with people answering peoples questions or something? 

 

the only negative replys in this thread, from what i can see, comes from you.

not sure what your problem is and tbh i couldnt care less, im just stating my oppinion.

 

If your not going to be polite or add anything new to the topic dont bother posting and telling people that what they offered is rubbish.

 

i cant be arsed to put a check on who will feel what about what i say, i will state my oppionions whatever you feel about them.

 

besides that:

 

Read the post instead of running an irrelevant comment...

 

you say what i posted was irrelevant, im saying its not.

fact is its a horrible idea, to do what you did in this script, hence why i provided a better alternative.

 

if you feel offended in any way, then its not really my problem.

im not trying to discurage you in any way, im just saying its a bad idea and it can be done in a better way.

Link to comment
Share on other sites

  • 0

Each to his own but i provided him with what he asked for. you just gave him the same info that he already knows over again.

 

He can change the number of loot positions for a building, but that wont give him any more lootable objects as we know that is linked to number of players in an area. 

 

He can decide if he wants to use it or not, and if his players find it affects their fps to a point they dont enjoy he can turn it off. Simple.

Link to comment
Share on other sites

  • 0

actually i just went through the code and the loop you created will not even work along side the epoch loot script ... only one of them will spawn loot for a building, but who knows if perhaps sometimes it will hit exactly same frame and spawn loot in the building twice, i doubt that will happend very often tho, considdering you put it in an unscheduled enviorment.

 

in fact i dont even think this from epochconfig.hpp is even used any more:

lootMultiplier = 1;

however, each building defined in the config will have this:

lootBiasPos = 25;

a random number is picked between 0 and 100 and if it is below the number above it will spawn more loot objects.

Link to comment
Share on other sites

  • 0

yeah I didnt want it to 100% of the time spawn loot for every building that hadnt spawned loot nearby, so i just chucked in the random 100 to make sure not every building has loot. i just wanted it to run the spawner more often by running again. Just did enough to get it working and posted. If you have suggestions to speed it up etc and clean it up feel free to suggest.

 

yeah i knew they all had a lootbiaspos of 25 ie why i changed it to random 100.

Link to comment
Share on other sites

  • 0

yeah I didnt want it to 100% of the time spawn loot for every building that hadnt spawned loot nearby, so i just chucked in the random 100 to make sure not every building has loot. i just wanted it to run the spawner more often by running again. Just did enough to get it working and posted. If you have suggestions to speed it up etc and clean it up feel free to suggest.

 

again, this is a very extremely bad idea, you should change the value (lootBiasPos) and add more positions for each building in the config instead.

 

but if you actually want your script to spawn anything at all, i suggest you change each instance of EPOCH_LootedBlds to something else.

however that will properly spawn loot objects in same positions more than once often making it impossible to loot either, not to mention the loop is completely irrelevant if you edit CfgBuildingLootPos.

 

yeah i knew they all had a lootbiaspos of 25 ie why i changed it to random 100.

 

they dont all have a value of 25, thats just the default.

you can change it individually for each building defined, if set above 100, it will spawn loot in all positions defined.

Link to comment
Share on other sites

  • 0

 

 

 if you actually want your script to spawn anything at all

it does spawn... lots of stuff...???

unless i github'd the wrong version.... hmmmm ill have to check that.

 

whoops i accidentally deleted private variables etc

 

uploaded a working version.

 

will test the lootbias hadnt thought of that.

Link to comment
Share on other sites

  • 0

 

curious as to how your suggesting to change the @Epoch\Addons\a3_epoch_code\config.bin................

 

and to modify the lootbias of said config?

 

it checks missionconfig first, if nothing is present there, then it uses the config from config.bin.

 

it does spawn... lots of stuff...???

unless i github'd the wrong version.... hmmmm ill have to check that.

 

whoops i accidentally deleted private variables....

 

idk what you are talking about here, but either your script will not spawn loot or epoch script will not spawn loot as is becourse of EPOCH_LootedBlds global var:

 

https://github.com/happydayz-enigma/Enigma_EPOCH_Lootspawner/blob/master/Enigma_lootspawner.sqf#L68

 

each building is put into this array and when it has spawned loot once it will not allow any of the loops to spawn loot again before it is removed from this array, so only one of the loops will spawn loot in a building.
only exception would be if there is more than 10 buildings within 30m of the player.
 

wich loop will spawn loot, we cannot know for sure, could be yours tho considdering it is a smaller loop than the epoch default masterloop.

however i still do not see any reason at all to have this extra loop since you can just change the value in CfgBuildingLootPos and have the default loop spawn loot objects in all the positions available.

Link to comment
Share on other sites

  • 0

So your suggestion does work in that yes if a building spawns loot, it spawns loot at all its positions. But it doesnt spawn loot in more buildings which i think is what mok21 was after. But it is a valid option for anyone who wants a bit more loot on their servers without running any extra scripts. 

 

For those reading who dont know what I mean by this : If your a single player in an area in epoch you will spawn loot at say 1 in 10 buildings and each building will spawn a certain amount of lootable objects (generally 25% of the defined objects positions). The more players nearby, the more loot that spawns at any building as its tied to the number of players. By setting the lootbias to 100 on each building you will spawn x4 more lootable objects in/around those buildings

 

 

For example when you run into a house and find a couch, if you ran into the same house now you would see a couch, fridge, freezer & cooker.

 

you wont have any more houses spawning with loot, just more loot in said house.

Link to comment
Share on other sites

  • 0

 

 

it checks missionconfig first, if nothing is present there, then it uses the config from config.bin.

 

yeah i had a bit of brain fade and wasnt thinking straight when i typed that.

 

 

 

idk what you are talking about here

 

I had uploaded a dodgy version to github that wasnt working due to a few things i had accidently deleted. reuploaded a working version. 

 

 

 i suggest you change each instance of EPOCH_LootedBlds to something else.

however that will properly spawn loot objects in same positions more than once often making it impossible to loot eithe

 

yeah i had originally created my own global array but decided against it very quickly because of the likelyhood of spawning loot ontop of each other. I would have had to add in a check if any Epoch objects had been spawned there first and then spawning the loot... too messy.

 

 

 

wich loop will spawn loot, we cannot know for sure, could be yours tho considdering it is a smaller loop than the epoch default masterloop.

 

well it seems to work so im guessing this loop is running faster than the masterloop.

Link to comment
Share on other sites

  • 0

So your suggestion does work in that yes if a building spawns loot, it spawns loot at all its positions. But it doesnt spawn loot in more buildings which i think is what mok21 was after. But it is a valid option for anyone who wants a bit more loot on their servers without running any extra scripts. 

 

For those reading who dont know what I mean by this : If your a single player in an area in epoch you will spawn loot at say 1 in 10 buildings and each building will spawn a certain amount of lootable objects (generally 25% of the defined objects positions). The more players nearby, the more loot that spawns at any building as its tied to the number of players. By setting the lootbias to 100 on each building you will spawn x4 more lootable objects in/around those buildings

 

 

For example when you run into a house and find a couch, if you ran into the same house now you would see a couch, fridge, freezer & cooker.

 

you wont have any more houses spawning with loot, just more loot in said house.

 

thats not entirely true, obviusly more loot will spawn in more buildings if the chance of spawning it is increased.

 

i dont see the reason at all for this extra loop tho, and you are still adding the buildings to EPOCH_LootedBlds array, making it impossible for the default loop to spawn any loot at all.

commenting it out, isnt exactly a good idea either, as that will allow the script to run over and over on each building spawning massive amounts of lootobjects.

Link to comment
Share on other sites

  • 0

 

 

thats not entirely true, obviusly more loot will spawn in more buildings if the chance of spawning it is increased.

where is this chance of spawning loot increase you speak of???? I cant see how your saying its going to spawn more loot in more buildings without changing the masterloop.sqf which is what is controlling which buildings it is going to spawn loot into.

 

I tested your suggestion and as I said it works to a point.

 

 

 

you are still adding the buildings to EPOCH_LootedBlds array, making it impossible for the default loop to spawn any loot at all.

 

I dont care what the default loop does. if it cant spawn loot thats fine, as this one does it perfectly fine.

Link to comment
Share on other sites

  • 0

I'm  appreciate for you guys concern about this topic, Happydayz and Halv.

 

 

 

if i can set more spawn chance for Containers, then I'll abjust amount of items in container, surely. (set it to lower than now)

 

I'm going to test Happydayz's way. thanks for ur help.

 

 

btw, I thought epoch mod has own default 25% chance for lootable containers. because I saw below line in change log of 0.3.1.0

 

"[Changed] Increased loot position bias for all buildings from 15 to 25%."

 

so I thought if i can change it to higher than 25%, I'll be able to get more spawn chance for containers with epoch's default loot system

 

and there are somekind option that can simply changed will exist..

 

I'm sorry for my ignorance. :(

 

 

i'm very appreciate your effort to help to me, again

Link to comment
Share on other sites

  • 0

where is this chance of spawning loot increase you speak of???? I cant see how your saying its going to spawn more loot in more buildings without changing the masterloop.sqf which is what is controlling which buildings it is going to spawn loot into.

 

this is basic math, if more loot spawns in each building, more buildings will have loot.

 

I dont care what the default loop does. if it cant spawn loot thats fine, as this one does it perfectly fine.

 

well, either way you should still limit how much will spawn in each building or you will end up with a problem at some point, nothing is stopping the script from spawning incredible amounts of loot objects on top of eachother.

 

 

btw, I thought epoch mod has own default 25% chance for lootable containers. because I saw below line in change log of 0.3.1.0

 

"[Changed] Increased loot position bias for all buildings from 15 to 25%."

 

so I thought if i can change it to higher than 25%, I'll be able to get more spawn chance for containers with epoch's default loot system

 

and there are somekind option that can simply changed will exist..

 

this is exactly what i was trying to explain eariler, you just need to edit lootBiasPos for each building defined in CfgBuildingLootPos to achive what you want, no extra loops required.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...