Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Item Qua reduction  (Read 1916 times)

0 Members and 0 Guests are viewing this topic.

Shroud

« on: 15, October 2014, 23:32:11 »
Just checking but are weapons meant to lose qua? I've got one that is down to 76 qua
(click to show/hide)
It seems to only apply to weapon and rest is fine. No idea if it's a bug or a feature. I'm unsure if I've done something unusual. I've fought giants in OP and beholders in DT and am a priest with a 2h weap  ;)
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

smacky

« Reply #1 on: 16, October 2014, 15:49:17 »
Not a bug as such.

Code: [Select]
    /* skill_value will determinate the quality OF the repair source */

    /* lose a quality point if the repair is heavy */
    if(item->item_quality/5 <= item->item_quality - item->item_condition && !(RANDOM()%3))

For example the intention seems to be if you repair a qua X item when it's con falls below a certain Y it has a 1/3 chance of losing a point of qua during the repair.

My maths senses are tingling though. They tell me the calc is borked so you stand to lose qua when con is actually high (ie, a light repair). I think <= should be >=?

EDIT: Or change to if (qua / 5 >= con && !(RANDOM()%3)).

EDIT2: No, it's correct already. Or is it? My head hurts.
« Last Edit: 16, October 2014, 16:02:33 by smacky »

Shroud

« Reply #2 on: 16, October 2014, 19:18:42 »
Got it, so it's not a bug but a stealthy feature added when no one noticed ;)

Would I be correct in assuming that skill value refers to the Blacksmith used? So if I go to a high level one I get no item damage and if I go to a lower level one (e.g. iluma or guild hall) my items will get wrecked?

Looking at code in layman's terms and ignoring random bit it's

qua/5 >= qua - con for threshold
qua >= 5qua - 5con
-4qua >= -5 con
4qua >= 5 con (hilariously if you add 5con and 4qua to both sides it reverse sign, although plugging into initial equation finds multiplying by -1 is correct)
If con =< 0.8qua then repair can lose qua

So for an 80 qua item threshold is 64 con. I'll note that as item gets more and more damaged threshold gets lower so for a 40 qua item it's down to 32 con or 8 dmg and at 10 qua it's down to 8

P.S. If code works as intended it would be possible to make perishable equipment. For example a temporary RoA with 1 or 2 qua that would get quickly destroyed with repairs
« Last Edit: 16, October 2014, 19:25:04 by Shroud »
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

smacky

« Reply #3 on: 16, October 2014, 21:42:05 »
Actually it's been like that for at least 9 years.

ATM, no, the smith does not have any effect on the quality of the repair. I interpret /* skill_value will determinate the quality OF the repair source */ as a TODO. So the intention was that when repair was a skill, the repairer's level would be used to calc this stuff. The current code is a working solution in lieu.

Shroud

« Reply #4 on: 16, October 2014, 23:26:56 »
That long? I remember hearing that it used to be possible to lose qua but it never happened so I assumed it wasn't working so I was a bit surprised to see it happen. Maybe it's my imagination but rate at which equipment gets damaged has increased since it's introduction.

I guess if you want an extra money sink a potential thing to add is a restore feature that increases an item's qua from it's current level to it's initial level at a much higher cost than repair or an improvement skill that increaes an item's qua up to a certain cap.

If it's all working as intended then there's no problem. Although I'll need to be careful with my expensive equipment so it doesn't lose qua as it directly affects % prots and dps ;)
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

smacky

« Reply #5 on: 17, October 2014, 12:20:44 »
AFAICS the repair code has never been touched in those 9 years.

The damage rate may have changed. I have a vague memory of _people_ or longir making some sort of noise about this. SVN says that on 20120303 _people_ 'Don't damage shields when attacking - Only weapons (although in the future this should be changed if we ever allow shield bashing).'

I think it is all working as intended but as I said above, I think it was only meant to be a temporary 'good enough if not ideal' solution

_people_

« Reply #6 on: 18, October 2014, 06:18:18 »
The logic behind that change was that when you attacked, either your weapon or your shield had a chance to receive damage. But if you're attacking, you shouldn't be using your shield (unless you're attacking with your shield, which is implemented only in /streams/combatBalance). So I changed that.
-- _people_ :)

Shroud

« Reply #7 on: 18, October 2014, 12:48:06 »
Actually if I understand correctly weapons damage a lot faster than anything else for a simple reason. If you're attacking there's a 100% chance weapon will be damaged if anything takes damage. If you're attacked since you have around 10 or so pieces of equip you only have a 10% chance of a specific piece of equipment being damaged so in melee combat weapons damage around 10x faster than rest of equip
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

smacky

« Reply #8 on: 18, October 2014, 17:28:19 »
Makes sense to damage weapons only on attack.

IDK how it decides which equipment is damaged after a hit. I assume it is random. Perhaps some things to do might be:
  • if weapons only take damage on attack, they should not take damage when you are hit.
  • shield then body armour then other armour should have precedence for damage when you are hit.
  • can't remember if misses are just misses or if we can say was blocked, but perhaps we damage shield or weapon (parry) for block?

Tags:
 

Related Topics

  Subject / Started by Replies Last post
5 Replies
1378 Views
Last post 05, July 2005, 19:02:48
by MarcK
6 Replies
916 Views
Last post 01, January 2006, 19:14:13
by Lothien
3 Replies
957 Views
Last post 14, September 2006, 00:05:15
by tehill
23 Replies
10309 Views
Last post 21, May 2011, 01:52:36
by petarkiller
0 Replies
33 Views
Last post 27, November 2021, 15:41:27
by Dolfo