About the game
News
Sign in
Register
Top Players
Forum
10:44
4005
 online
Authorization required
You are not logged in
   Forums-->Creative works-->
1|2|3

AuthorSMITH EFFICIENCY calc - What durability return your smith ?
ADDED: when durability is not entered manually, durability after repair works fine.

TO CORRECT: Bug with low-durability items (like 0/2, 0/3 and low-level smith) produces false result.
Why you didn't add this
style="display:inline";
in FORM tag as I suggested?

Just try it and you will see the effect.
How is that possible to get false result?

Calculation is very simple:
If an item has 0/d durability and smith skill is z, then after repair you get item with durability x/y, where:
x = Math.max(1,Math.floor(d*z));
y = d-1;

Examples:

1) If your have an item 0/47 and smith skill is 30% then
d = 47
z = 0.3
and
x = Math.max(1,Math.floor(47*0.3)) = Math.max(1,14) = 14
y = 47-1 = 46
So, item 0/47 becomes 14/46 after repair.

2) If your have an item 0/2 and smith skill is 30% then
d = 2
z = 0.3
and
x = Math.max(1,Math.floor(2*0.3)) = Math.max(1,0) = 1
y = 2-1 = 1
So, item 0/2 becomes 1/1 after repair.
I see that here
http://www.lordswm.org/dodatki/smith_calculator.js
you are using Math.round,
use Math.floor instead.
ok, i will.
Im new in js. When i started, i never used it.
But when i want to do sth - i will do that :)
Thanks for help.
Now working fine :)
Robai, thanks for help :)

http://www.lordswm.org/strony/eng/014-costs/index.html
I'm glad you made it.

A tiny problem:
when you first load the page you see
Durability: 0/
After repair: 6/6

It would be more logical to add a default value, because durability after repair (6/6) looks strange, because durability wasn't specified.

Instead, it should be this:
Durability: 0/7
After repair: 6/6
Hmm - i leaved field for manual entry.

I do this later, now i free time in weekend.
anyone can send me a depleted item sell cost? 0/max durability -1, -2 etc.
anyone can send me a depleted item sell cost? 0/max durability

is it?
https://www.lordswm.com/photo_pl_photos.php?aid=789
No. Here are 0/MAX_DURABILITY.
I need a MAX_DURABILITY -1, -2, etc.
Long ago it was some disscussion about that.
It might interest you:
https://www.lordswm.com/forum_messages.php?tid=1846959&page=last
In short, the answer to your question is this:

Inventory price for item 0/d (when the new item has durability n/n) is this:
Inventory_price = Math.max(0.65*(d/n),0.25)*new_item_price
Robai, thanks again, i will check this.
Ok, done - now, when page is loaded, items have depleted durability (0/MAX_DURABILITY)
Nice work LITWIN !

Some suggestions :
* In your smith calculator, add a column with the cost per battle, calculated with the "smith cost" and the durability after the repair.

* In your market table, the smith repair time and smith points could be calculated from the repair cost
Always:
smith_points = 0.00025*repair_cost

There is an arror in your page for Sword Of Retribution:
smith_points = 0.76
Instead, it should be
smith_points = 0.00025*1088 = 0.272
Or alternatively,

Smith Points = Repair cost / 4000 (Equal to 1 point.)

So Sword of retribution, 1088/4000 = 0.272

(I find using all those 0000's in the above formula a bit more tedious)

I'm liking what's happened so far! :)
Repair time isn't completely clear to me, but here
https://www.lordswm.com/help.php?section=39
is written this:
2) Repair time and guild points gained only depend on the estimated value of the artifact and are in direct proportion to it. Thus, the more expensive the object is, the longer time it will take to repair it and the more guild points it will grant;

Arctic said here
https://www.lordswm.com/forum_messages.php?tid=1846959&page=last
this:
The system prices for resources are 180 for wood and ore; 360 for other.

Some formulas:
repair_cost = 0.4*item_estimated_cost
repair_time = some_factor*item_estimated_cost

Actually
repair_time = Math.floor(some_factor*item_estimated_cost)
I'm not sure about cheap items. Maybe repair time is always at least 5 min.
Then
repair_time = Math.max(5,Math.floor(some_factor*item_estimated_cost))

The only thing isn't clear to me is some_factor. I guess this:
some_factor = 3/500 = 0.006

Examples:

Sword of might:
item_estimated_cost = 15000+4*10*360 = 29400
repair_cost = 0.4*item_estimated_cost = 11760
smith_points = repair_cost/4000 = 2.94
repair_time = some_factor*item_estimated_cost = 176.4 min
Litwin_time = 2*60+56 = 176 min

Hauberk:
item_estimated_cost = 4000+1*6*180+1*5*360 = 6880
repair_cost = 0.4*item_estimated_cost = 2752
smith_points = repair_cost/4000 = 0.688
repair_time = some_factor*item_estimated_cost = 41.28 min
Litwin_time = 41 min

Steel Cuirass:
item_estimated_cost = 8000+1*10*180+1*10*360 = 13400
repair_cost = 0.4*item_estimated_cost = 5360
smith_points = repair_cost/4000 = 1.34
repair_time = some_factor*item_estimated_cost = 80.4 min
Litwin_time = 1*60+20 = 80 min

Shoes Of Aspiration:
item_estimated_cost = 5000+2*2*180+1*4*360 = 7160
repair_cost = 0.4*item_estimated_cost = 2864
smith_points = repair_cost/4000 = 0.716
repair_time = some_factor*item_estimated_cost = 42.96 min
Litwin_time = 42 min

Tower Shield:
item_estimated_cost = 18000+1*20*180+2*10*360 = 28800
repair_cost = 0.4*item_estimated_cost = 11520
smith_points = repair_cost/4000 = 2.88
repair_time = some_factor*item_estimated_cost = 172.8
Litwin_time = 2*60+52 = 172

But there is a mystery with Mithril Longsword:
https://www.lordswm.com/art_info.php?id=mif_sword
Formula
repair_cost = 0.4*item_estimated_cost
doesn't work here!

I found that only item_estimated_cost is an exception here.
I.e. instead of
item_estimated_cost = 24000+2*15*180+4*15*360 = 51000
lets take this
item_estimated_cost = 24000+2*15*180+4*14*360 = 49560

Then we have correct other values:

repair_cost = 0.4*item_estimated_cost = 19824
smith_points = repair_cost/4000 = 4.956
repair_time = some_factor*item_estimated_cost = 297.36 min
Litwin_time = 4*60+57 = 297 min
I read this somewhere :

1 smith point = 4000 gold spend on repairing = 60 min of repair time

So there is no need to use 'some_factor', use this instead :
repair_time = smith_points*60
1|2|3
Back to topics list
2008-2024, online games LordsWM