ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Mon Sep 28, 2020 6:17 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Dec 24, 2015 4:36 pm 
Offline
Low Yeek

Joined: Wed Dec 16, 2015 5:13 pm
Posts: 6
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.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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