Jump to content

Honey Bee

Recommended Posts

	class Shipwreak
	{
		items[] = {
				{ { "Gems", "CfgLootTable" }, 5 },
				{ { "MetalBars", "CfgLootTable" }, 26 },
				{ { "PartOreGold", "magazine" }, 10 },
				{ { "PartOreSilver", "magazine" }, 13 },
				{ { "ItemKiloHemp", "magazine" }, 12 },
				{ { "ItemScraps", "magazine" }, 16 },
				{ { "PartOre", "magazine" }, 18 }
		};
	};

The items in this table are the name, type and percentage chance. For the first two, Gems and MetalBars, with a 5 and 26% chance respectively they say to look at other tables, see below. For the other items, they are magazines - specific items - with their own percentage chance. The Gems and MetalBars tables are:

	class MetalBars
	{
		items[] = {
				{ { "ItemGoldBar10oz", "magazine" }, 1 },
				{ { "ItemGoldBar", "magazine" }, 9 },
				{ { "ItemSilverBar", "magazine" }, 20 },
				{ { "ItemCopperBar", "magazine" }, 20 },
				{ { "ItemAluminumBar", "magazine" }, 20 },
				{ { "ItemTinBar", "magazine" }, 30 }
		};
	};
	class Gems
	{
		items[] = {
				{ { "ItemJade", "magazine" }, 5 },
				{ { "ItemRuby", "magazine" }, 8 },
				{ { "ItemSapphire", "magazine" }, 9 },
				{ { "ItemTopaz", "magazine" }, 10 },
				{ { "ItemOnyx", "magazine" }, 10 },
				{ { "ItemAmethyst", "magazine" }, 10 },
				{ { "ItemEmerald", "magazine" }, 10 },
				{ { "ItemCitrine", "magazine" }, 10 },
				{ { "ItemGarnet", "magazine" }, 13 },
				{ { "ItemQuartz", "magazine" }, 15 }
		};
	};

In these tables, which are called up if the weighted percentage hits their entries in the original table, there are percentage chances of each of these specific "magazines" being found... 

Note: vehicle, magazine, weapon, item are ARMA specific definitions and do not necessarily mean that a "magazine" is a magazine... they are configuration definitions. For example, every person is a a vehicle, as is a building... but that's probably TMI...

Link to comment
Share on other sites

So, in the simplest of cases, say you wanted to make the shipwreck loot really high value, you could do that by changing the table to look like this:

	class Shipwreak
	{
		items[] = {
				{ { "ItemGoldBar10oz", "magazine" }, 15 },
				{ { "ItemGoldBar", "magazine" }, 20 },
				{ { "ItemJade", "magazine" }, 15 },
				{ { "ItemRuby", "magazine" }, 15 },
				{ { "ItemSapphire", "magazine" }, 20 },
				{ { "ItemOnyx", "magazine" }, 15 }
		};
	};

This would give a 15% chance of a 10oz gold bar, 20% of a 1oz bar, 15% chance of a Jade gem, etc...

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