The World of Layonara  Forums

Author Topic: gem mining: what helps?  (Read 570 times)

davidhoff

gem mining: what helps?
« on: June 27, 2009, 08:22:39 pm »
Hi, just wondering if when one is mining gems (fire opal, for example), does it make a difference who does the mining or what that character's skills or attributes are as far as determining the success of the harvest?  Or is it simply random and everyone has the same chance of a good/bad harvest?

Thanks,

Tralek
 
The following users thanked this post: willhoff

Hellblazer

Re: gem mining: what helps?
« Reply #1 on: June 27, 2009, 08:43:06 pm »
i think it's random with dicing involved.

darkstorme

Re: gem mining: what helps?
« Reply #2 on: June 27, 2009, 11:37:07 pm »
If you look at the code for the original Craftable Natural Resources (CNR) script, upon which our systems are based, you'll see that when mining for gems, chopping wood, digging sand, etc, there's an x% chance that the deposit will be "used up" and vanish.  This is independent of character attributes, craft skill levels, etc.

While I suspect that the percentage is adjusted in our resource system, the underlying concept is the same - any time you get a chunk of mineral/piece of wood/lump of ore/etc., there's a chance that it's the last one.  So if x is, say, 10%, barring tool breakage, the chance that you get:
  • 1 chunk: 100%
  • 2 chunks: 90%
  • 3 chunks: 81%
  • 4 chunks: 73%
  • 5 chunks: 66%
  • And so on: 59%, 53%, 48%, 43%, 39%, 35%....


So if you were REALLY interested, you could record the number of chunks of mineral x you got and work backwards from there to get the "used up" chance.  Of course, the fact that Bioware's random number generator is less than totally random works against you in this regard, but a large enough sample size should yield a good approximate.  This is left up to the reader. ;)
 

davidhoff

Re: gem mining: what helps?
« Reply #3 on: June 28, 2009, 04:49:59 am »
Thank you Darkstorme for your detailed response...nice to know how it works.
 

Dorganath

Re: gem mining: what helps?
« Reply #4 on: June 28, 2009, 12:15:23 pm »
It's close, but we've tweaked the system that darkstorme links and describes.

In any case, yes, it is a fixed percentage chance per attempt of finding a piece of mineral as well as a fixed percentage chance per attempt of the deposit being used up and a fixed percentage chance per attempt that the tool will break.

An "attempt" is defined as an iteration through the loop, so each time your character gets one of those floaty messages, like "Sheesh, this is hard work!", that's an "attempt".

There is no modification based on character attributes or skills.

A deposit will always return at least one mineral before it is used up.  It does not keep track of how many pieces have been returned to determine future chances except to compare against a absolute maximum cap.  For minerals, this cap is 99 pieces and I've never seen more than 20-some pieces coming from a single deposit.

Oh also, the random chance for these now uses an enhanced random number generator that we included in a somewhat recent update.  It still has to use the Bioware random generator to an extent, but it shakes it up a bit more and seems to have a pretty flat distribution.
 

darkstorme

Re: gem mining: what helps?
« Reply #5 on: June 28, 2009, 03:57:59 pm »
Oooh, an improved RNG!  Be still my heart... has that been incorporated into the crafting system proper as well?
 

Dorganath

Re: gem mining: what helps?
« Reply #6 on: June 28, 2009, 04:10:24 pm »
Quote from: darkstorme
Oooh, an improved RNG!  Be still my heart... has that been incorporated into the crafting system proper as well?

I'm not sure, to be honest.  I don't think so, but I'd have to look.  I replaced a wrapper function that the system uses to retrieve a d100, but I'll have to look to see if that impacts the actual crafting attempt roll.

The RNG is not used everywhere (not yet, at least), since we wanted to make sure the relatively untested code didn't break critical things...or like...cause greater soul strand losses.
 

Aerimor

Re: gem mining: what helps?
« Reply #7 on: June 28, 2009, 04:16:52 pm »
Since the thread is open.  That first time you target a gem vien and nothing happens and you have to target it again to get it going....does that count?

Thanks
 

Dorganath

Re: gem mining: what helps?
« Reply #8 on: June 28, 2009, 05:35:00 pm »
I'm not sure what you mean by "does it count".

There may be a die roll there, but I think the worst that happens is the tool breaks.
 

Aerimor

Re: gem mining: what helps?
« Reply #9 on: June 28, 2009, 06:36:59 pm »
I meant doesn't count for extinguishing the vein or the tool.  

As far as the tool beaking, not enough of a concern to really care.

As for there being two 10% chances that the first chunk is the last chunk is what I was really curious about I guess. But if it can't roll at all until the first chunk is aquired, then there can't be two rolls.  One for the phantom strike and one for successful interaction.  So I think I answered my own question with the information given?
 

Dorganath

Re: gem mining: what helps?
« Reply #10 on: June 28, 2009, 08:12:18 pm »
10% is just a number that darkstorme threw out, and it's not the real number (no, I'm not saying what the real number is).

In any case, I think I understand your question now, and it's slightly irrelevant.  The deposits are coded to always give at least one piece of mineral, whether it breaks or not, and there's no cumulative effect as to whether or not the deposit will be used up.  It's the same random chance every time.  While laws of statistics suggest that the more rolls you have, the more chances you have for a favorable (or unfavorable) result, the base chance never changes, and is the same each time regardless of how many attempts have been made or how many bits or mineral have been returned.

Perhaps to clarify a bit more, each "attempt" (which is not necessarily each click) on a deposit draws three distinct die rolls:  Tool breakage, deposit breakage and deposit yield.  Each is rolled and handled separately, except to say if the deposit "breaks" then it kicks out a chunk of mineral (or clay or sand, depending) as well.
 

davidhoff

Re: gem mining: what helps?
« Reply #11 on: June 28, 2009, 09:25:18 pm »
Alright...good information.  Thank you.  Random it is, with at least one harvest, and keep going till your luck runs out or you hit the cap (which I doubt will happen).

Regards,

Tralek
 

Xaltotun

Re: gem mining: what helps?
« Reply #12 on: June 29, 2009, 08:14:16 pm »
Yes, good to know. Not worried about the cap as I would probably be crushed under the weight of all that stuff anyway. :D
 

 

anything