Jump to content

How do random drops work?


Shalko

Recommended Posts

Hello,

 

Does anybody know how random drops work in boe? 
I think the code related to this is in boe.items.cpp, but there are five different constants, each with 5 arrays and I cant wrap my head around that. Does anyone know and could shed some light on this?

 

Btw. I poked around the files in the GIT repo and I noticed that there is a “treasure” value for both the monsters and the items in a given scenario, does that mean that monsters can only drop items with the same treasure value?

 

Thanks!

Link to comment
Share on other sites

If I recall correctly, monsters can drop items with that treasure value or a lower treasure value.

 

The actual place_treasure function is indeed quite complicated… it looks like treas_char holds indices into min_chart and max_mult, which appears to limit the minimum and maximum value of the dropped items. The amt variable is how much gold drops, and id_odds is indexed by your Identify skill to determine the chance of the item being identified… the level parameter of the function is actually half the level of the monster that died, and the loot parameter is the monster's "treasure" value. It also looks like the rightmost column of treas_chart and treas_odds are never used, since both loot and j are in the range 0..4.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...