The World of Layonara  Forums

Author Topic: Harvesting Tool Durability  (Read 755 times)

Gulnyr

Harvesting Tool Durability
« on: March 29, 2009, 02:31:21 pm »
I was just doing a little oak chopping and got a bit irked.  Jennara had three axes.  The first did pretty well and got a few branches before it broke, but the second and third broke in quick succession having barely scratched the tree.  Grr, y'know?

I was thinking it would be nice to get at least one branch per axe, but realized I did better than that if my branches were averaged over the axes (about one and two thirds each).  Still, it doesn't really feel that way, which might be why the system is so irritating to many people.  

So I came up with a different idea: why not have gathering tools (axes, shovels, gem chisels...) have a smaller range with a higher minimum and maybe an upper cap?  It would work differently and need to be recoded, but each tool would produce some resources so it wouldn't feel like a complete waste when it finally breaks.  And IC, it would 'break' because it was no longer sharp (or whatever applies) and need to be repaired or replaced.

The big problem I see with this idea is that each tool would need to be tracked similar to the way normal weapons are tracked for bangs against ore, and that could be excessive.  Maybe there's a better way.

Understand, please, that I don't mind tools breaking.  That's fine.  It just feels bad when they break without doing anything.
 
The following users thanked this post: miltonyorkcastle, Hellblazer

darkstorme

Re: Harvesting Tool Durability
« Reply #1 on: March 29, 2009, 05:24:59 pm »
The nice thing about the current system (from a coding point of view), assuming that the system is relatively unchanged from the base CNR system, is that the only check is a dice roll.  Some percentage chance of a tool breaking each time it's used.  It's ridiculously low-effort in terms of server processes - one if statement.

A possible solution I'd offer is to make it so that the check is made when you successfully get a bit of CNR, rather than when you start, to prevent breakage before you get anything, while retaining the current system.
 

Hellblazer

Re: Harvesting Tool Durability
« Reply #2 on: March 29, 2009, 05:52:48 pm »
that does sound better. And since we have the option of making the tools. What about giving a higher durability to tools that are crafted out of different material? Copper axe.. breaking the fastest to, maybe iron or platinum being the hardest?

Would give a better use to that overly easily forgotten part of the crafting system. And would make it more worthwhile, in the end if the crafted items returns more cnr than the one you buy that are obviously low grade craftman retailer out to get you back as fast as possible to sell you more of their tools that will break as fast.

Ravemore

Re: Harvesting Tool Durability
« Reply #3 on: March 29, 2009, 06:20:18 pm »
Awesome idea Hellblazer. Would enhance crafting greatly in my opinion.
 

Gulnyr

Re: Harvesting Tool Durability
« Reply #4 on: March 29, 2009, 07:03:15 pm »
Quote from: darkstorme
A possible solution I'd offer is to make it so that the check is made when you successfully get a bit of CNR, rather than when you start, to prevent breakage before you get anything, while retaining the current system.


I like this because it seems simpler than a complete overhaul and means every tool is at least a little bit useful.  

But what prevents people from exploiting it by getting one bit of CNR, stopping, then starting again on a nearby deposit to get the next first bit of CNR, then back again and so on?  Or, to say it another way, how does the system track things so there aren't unbreakable tools and infinite 'first bits?'  Wouldn't there still have to be some extra counter or toggle checker somewhere?
 

cbnicholson

Re: Harvesting Tool Durability
« Reply #5 on: March 29, 2009, 08:11:27 pm »
Still dreaming of that mithral pickaxe I see. :D  But It would be nice to get one bit of cnr before a tool breaks.  I had a similiar experience with coal today..first pick - 8 pieces..number 2 and three..break, break..nada. :(
"Give a man a mask and he will show you his true face." 

Oscar Wilde
 

darkstorme

Re: Harvesting Tool Durability
« Reply #6 on: March 30, 2009, 12:58:23 am »
Quote from: Hellblazer
that does sound better. And since we have the option of making the tools. What about giving a higher durability to tools that are crafted out of different material? Copper axe.. breaking the fastest to, maybe iron or platinum being the hardest?


I can see a couple of problems with that - primarily, palette space.  As it stands, the tools are all, as a general rule, crafted with oak and iron, and if multiple tools were being used, more blueprints would have to be added to the palette.  Secondarily, as it stands, as long as an item has the correct tag, it can be used as a woodcutter's axe/miner's pick/gem chisel, etc.  If we needed to discriminate between tags, that requires an additional check to be added, and this is fired by the deposit's "OnPhysicalAttack" event.  We want to keep the number of instructions to a minimum.  Even so, aside from the palette problem, it wouldn't be TOO hard to implement, I imagine.

Quote from: Gulnyr
But what prevents people from exploiting it by getting one bit of CNR, stopping, then starting again on a nearby deposit to get the next first bit of CNR, then back again and so on? Or, to say it another way, how does the system track things so there aren't unbreakable tools and infinite 'first bits?' Wouldn't there still have to be some extra counter or toggle checker somewhere?


Sorry, Gulnyr.  I didn't make myself clear enough before.  As it stands, the "does my tool break?" check takes place in the OnPhysicalAttack event of the deposit/tree/vein.  I'm saying it should be moved to the "OnDamaged" event, after a successful chopping off of a hunk/nugget/branch/bag/etc.  That way, you would get at least one sample - but your tool could still break immediately after getting it.

Edit: By the way, if anyone is interested in taking a peek at the CNR system, the one Layonara uses is based on this one, from the Vault.
 

Primalfear

  • Jr. Member
  • **
    • Followers of Prunilla
  • Posts: 82
    • View Profile
Re: Harvesting Tool Durability
« Reply #7 on: March 30, 2009, 01:27:38 am »
Quote from: darkstorme
I can see a couple of problems with that - primarily, palette space.  As it stands, the tools are all, as a general rule, crafted with oak and iron, and if multiple tools were being used, more blueprints would have to be added to the palette.  Secondarily, as it stands, as long as an item has the correct tag, it can be used as a woodcutter's axe/miner's pick/gem chisel, etc.  If we needed to discriminate between tags, that requires an additional check to be added, and this is fired by the deposit's "OnPhysicalAttack" event.  We want to keep the number of instructions to a minimum.  Even so, aside from the palette problem, it wouldn't be TOO hard to implement, I imagine.


I'm not sure how much of a lag that would create, but having one more check going due to a crafting tools tag, is probably not as bad as the check that is already being made when fighting foes with different kind of weapon for the +1 to +3 bonus of the weapon prior to enhancements. I don't imagine there is like 15 people going out mining and cutting away at the same time, when most of the time there is roughly around 15 people on the server.

Now it could be a problem if the server picks up again, and we see 10 people mining at the same time on the same server. But that is not the case at the moment. unfortunately.
 

darkstorme

Re: Harvesting Tool Durability
« Reply #8 on: March 30, 2009, 01:39:19 am »
*shakes his head*

You misunderstand.

Weapon enhancements (+1 to +15), elemental enhancements, and so forth, are performed at the engine level - that is to say, they're hard-coded into the Aurora engine.  Their checks are optimized.

Anything added by modders (that is to say, constructed using NWScript) is run in an interpreted, event-driven scripting system.  This is why very few weapons in Layonara have onHit properties.  In combat, the game doesn't wait until you hit someone to determine what you hit them with - it has that calculation cached.  For CNR, it literally does not know what you hit the deposit with until you do it, and requires more processor cycles in which to do so.

As I said, however, the larger concern isn't the script (since there are checks there already, so the additional load won't be crippling), but the palette space for the extra craftable items.
 

Hellblazer

Re: Harvesting Tool Durability
« Reply #9 on: March 30, 2009, 04:10:51 pm »
Ah alright thanks fo the clarification.

Serissa

Re: Harvesting Tool Durability
« Reply #10 on: March 30, 2009, 04:55:03 pm »
There already exists a different pick axe, a crafted one.  It's slightly smaller and hits for slightly more.  Would be really nice if it were also somewhat more durable....
 

ShiffDrgnhrt

Re: Harvesting Tool Durability
« Reply #11 on: March 30, 2009, 04:59:27 pm »
Is it possible to change the script a bit to make a crafted pick twice as durable?  Like make it have to roll vs the DC twice in order to break, instead of just once.  Is that reasonably doable?
 

Hellblazer

Re: Harvesting Tool Durability
« Reply #12 on: March 30, 2009, 08:02:33 pm »
Quote from: Serissa
There already exists a different pick axe, a crafted one. It's slightly smaller and hits for slightly more. Would be really nice if it were also somewhat more durable....
 
 I remember that pick axe and all, but from what I remember from other people that used it, beside kyle. They didn't think it was doing anything better. I guess Dorg or Darkstorm could verify that to see if the stats are different or not.
 
 
 
Quote from: ShiffDrgnhrt
Is it possible to change the script a bit to make a crafted pick twice as durable? Like make it have to roll vs the DC twice in order to break, instead of just once. Is that reasonably doable?
 
 It would probably be more easier just to remake the same coding with a different dc right from the start, and only add the check to see which weapon is being used.
 
 Not sure of what code it would be, but I imagine it is something like this.
 
 onhit get onpropriety tag.
 If *Tag1* roll 1d100
 if lower than dc destroy weapon.
 If *tag2* roll 1d100
 if lower than dc destroy weapon.
 
 Now I am no coder but from reading the code It works roughly like that, but this is very simplified. Tag1 would be the regular uncrafted cnr gathering tools, and the dc would remain the same. tag2 would be the current crafted items, and could have a dc that is half the dc of Tag1. Meaning they would have twice a chance of passing the dc than the tag1.
 
 Darky would be much better at explaining this than me. But In my comprehention of the code. It would be something like that. I am unsure if he would have to create a line for each craftable items that is used to chop mine, shovel and chisel gems. Or if one tag could be applied to all of those items that would enable the onhit check to be made. But if that is possible, then it would be less of an hassle, than to copy paste the same code and change the name of the item for each of them.

Dorganath

Re: Harvesting Tool Durability
« Reply #13 on: March 30, 2009, 10:14:18 pm »
The small pick doesn't act any different than the chisel.
 

Primalfear

  • Jr. Member
  • **
    • Followers of Prunilla
  • Posts: 82
    • View Profile
Re: Harvesting Tool Durability
« Reply #14 on: March 30, 2009, 10:33:03 pm »
Think she actually meant the mining pick being better than the one you buy at the sales men.
 

Serissa

Re: Harvesting Tool Durability
« Reply #15 on: March 31, 2009, 08:06:36 am »
Yes, the crafted mining pick is different.  Sorry for not being clear.
 

Dorganath

Re: Harvesting Tool Durability
« Reply #16 on: March 31, 2009, 09:20:04 am »
Quote from: Serissa
Yes, the crafted mining pick is different.  Sorry for not being clear.

Ah sorry, I thought you were talking about the light gem mining pick for some reason.
 

Dorganath

Re: Harvesting Tool Durability
« Reply #17 on: March 31, 2009, 09:35:31 am »
Oh and thanks for the discussion on this all.  There's some changes I'm testing right now for the next update, but they're not finalized or fully verified.

I will say though that I have adjusted the durability of crafting tools in the past, and for whatever reason, adjustments to the rate of breakage have historically had a more profound effect than it should have. The coded rate of breakage is actually less than 1% per strike  (not per bit of CNR harvested).  

Please do not go into a long discussion on how that's so not true...because I know it's not. However, it's been something of a mystery as to why we see a more rapid breakage than we generally anticipate.

There's a couple new factors that I'm working on which should bring this around closer to our "ideal" in performance, though in doing so, we may decide to increase the chance of breakage numerically if we find that it's actually producing the distribution of numbers that it should be producing and not unnaturally clustering toward frequent breakage.

Last night, without changing the breakage rate, I went through 15-20 trees with only one broken axe. Some rough and guesswork averages puts that conservatively at about 300 strikes, so it's a bit too small of a sample to know whether it's fitting in the current coded parameters. My gut feeling though is that the chances are at least being generated with a more even distribution, and if I can verify that, then I'll be very close to having something that will make people pretty happy.