Modding question: Specifying item attributes/egos/powers
Posted: Thu Dec 24, 2015 4:36 pm
Here's what I have so far. Very simple, it just adds 3 new items to every new character.
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.
Code: Select all
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)
Any assistance is highly appreciated, thank you.