Re: [MOD 0.11.20+] Cursed Exp - v0.2.7
Posted: Thu May 21, 2015 12:25 pm
Really awesome mod, having lots of fun.
The code for calculating bonuses from skill levels seems to be dividing by the values specified in control.lua (resMining, resFarming, resCrafting, resExplore, resDefence)
This confused me, as I expected bigger values to be better (as for resGeneral).
Example from onplayercrafteditem.lua
The formulae divides, so this means the same as
Should it not be
?
The resGeneral bonus to experience is using multiply:
Example from onplayercrafteditem.lua
In gui.lua the values are also multiplied, not divided, so currently the tooltips do not match the formulae?
Example from gui.lua
So currently
Would mean a 100% bonus to mining at level 100, a 50% bonus to farming at level 100, and a 250% bonus to crafting at level 100, but the gui will show 100%, 200% and 40% for mining, farming and crafting tooltips.
I may be misunderstanding the code though.

The code for calculating bonuses from skill levels seems to be dividing by the values specified in control.lua (resMining, resFarming, resCrafting, resExplore, resDefence)
This confused me, as I expected bigger values to be better (as for resGeneral).
Example from onplayercrafteditem.lua
Code: Select all
local cant = math.floor(stats.crafting.level / 100/datos.resCrafting)
Code: Select all
(stats.crafting.level / 100) / datos.resCrafting
Code: Select all
stats.crafting.level * datos.resCrafting / 100
The resGeneral bonus to experience is using multiply:
Example from onplayercrafteditem.lua
Code: Select all
stats.crafting.exp = mix.round(stats.crafting.exp + ( cant * 0.1 * (1 + talents[1][7].now / 40 + stats.general.level*datos.resGeneral)),3)
Example from gui.lua
Code: Select all
gui.tableStats4.add({ type="label", name="stat4c4", caption = {"gui.stat4c4",stats.crafting.level*datos.resCrafting}, style = "cursed-label" })
Code: Select all
["resMining"] = 1,
["resFarming"] = 2,
["resCrafting"] = 0.4
I may be misunderstanding the code though.