ToME: the Tales of Maj'Eyal
http://forums.te4.org/

Modding question: Specifying item attributes/egos/powers
http://forums.te4.org/viewtopic.php?f=50&t=45338
Page 1 of 1

Author:  Mittsies [ Thu Dec 24, 2015 4:36 pm ]
Post subject:  Modding question: Specifying item attributes/egos/powers

Here's what I have so far. Very simple, it just adds 3 new items to every new character.

Code:
class:bindHook("ToME:load", function(self, data)
   local desc = require("engine.Birther"):getBirthDescriptor("base","base")
   table.insert(desc.copy,resolvers.inventorybirth{ id=true,
      {type="charm", subtype="torque", name="iron torque", ego_chance=-1000},
      {type="scroll", subtype="infusion", name="healing infusion", ego_chance=-1000},
      {type="scroll", subtype="infusion", name="wild infusion", ego_chance=-1000},
   } )
end)


Obviously these three items are randomized based on character level, and I'd like them to be specific. So my question is: what syntax is necessary to specify the attributes/egos/powers of each item? (i.e., giving the torque a specific power, giving the heal a specific value amount, making the wild remove physical detriments, etc.). When looking at how races got their starting 50 heal infusion, I noticed this chunk of code "alter=function(o) o.inscription_data.cooldown=12 o.inscription_data.heal=50 end", but wasn't sure what syntax to use to apply it. I've looked at many other mods, looked at character save data, searched through the forums, but I couldn't find any example of this.

Any assistance is highly appreciated, thank you.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/