ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed Oct 23, 2019 11:24 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Mar 14, 2016 1:07 am 
Offline
Wyrmic

Joined: Thu May 23, 2013 12:25 am
Posts: 244
So one of the things that is long overdue on the wiki is updating ego descriptions. Many of them are far out of date.

It's easy enough for me to find the egos, it is less easy for me to understand them. For example, from lite.lua:

Code:
newEntity{
   power_source = {arcane=true},
   name = " of the sun", suffix=true, instant_resolve=true,
   keywords = {sun=true},
   level_range = {30, 50},
   greater_ego = 1,
   rarity = 30,
   cost = 30,
   resolvers.charmt(Talents.T_SUN_FLARE, 3, 30),
   wielder = {
      inc_damage={
         [DamageType.LIGHT] = resolvers.mbonus_material(10, 5),
      },
      resists={
         [DamageType.DARKNESS] = resolvers.mbonus_material(10, 5),
      },
      lite=resolvers.mbonus_material(2, 1),
      damage_affinity = { [DamageType.LIGHT] = 5 },
   },
}


It's the mbonus functions that are giving me trouble here. I can track them back to mod/resolvers.lua, and that's when I start having trouble. I'd like to be able to turn something like
Code:
resolvers.mbonus_material(10, 5),
into "x to y increase" or the like.

So my questions here are:

1) How do I 'read' the mbonus family of functions? What do the inputs mean?
2) Is there an easy mapping from the function input to "gives x to y" output?
3) There is no question 3. :lol:

Thank you much!

_________________
Please help with the ToME wiki!


Last edited by ibanix on Mon Mar 14, 2016 3:38 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Mar 14, 2016 2:12 am 
Offline
Perspiring Physicist

Joined: Sun Sep 09, 2012 7:43 am
Posts: 5940
mbonus is a magical black box that returns a value scaled by the level of the item or creature it was called from.

For mbonus_material(x, y), the return value is something like (1 to x) * m / 5 + y, where m is the material tier.
So it is simply y to x+y.

_________________
My feedback meter decays into coding. Give me feedback and I make mods.


Top
 Profile  
 
PostPosted: Mon Mar 14, 2016 3:42 am 
Offline
Wyrmic

Joined: Thu May 23, 2013 12:25 am
Posts: 244
Excellent! Thank you!

_________________
Please help with the ToME wiki!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group