Addons Support, requests from modders

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Addons Support, requests from modders

#1 Post by darkgod »

Hello

I'm adding addon supports to modules & tome. Currently you can override existing files or dynamically change them but this wont cut it for everything. So I decided to add a hook & events system.
Example, when the player is hit it would trigger a "mod.class.Player:takeHit" event and addons can register on this event, ie:

Code: Select all

myaddon:registerHook("mod.class.Player:takeHit", function(self, value)
    game.log("Arg I've been hit for %d!!!!", value)
end)
So my question is to people that wish to make addons: which hooks would you need/want/wish for ?
I have some that I'll add myself for they are obvious but there probably will be many more that are needed, so ask away!
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Goblinz
Module Developer
Posts: 163
Joined: Tue Dec 14, 2010 3:23 am
Location: Where I need to be

Re: Addons Support, requests from modders

#2 Post by Goblinz »

Okay great to see addons coming to life. Here are some functions that I use often when making stuff

the damage projector
actor:act()
actor:move()
actor:onTakehit()
actor:die()
I am sure there are lots more actor functions but those are the ones i have used
combat:attackTarget() and attack target with weapon
combat:checkHit()
combat:combatcrit()

THese are the functions I have modified for some reason or other. I have not done anything with items so things can be missing.
Those who complain are just Volunteering to fix the problem

<yufra> every vault designer should ask themselves exactly that: What Would Grey Do?

bricks
Sher'Tul
Posts: 1262
Joined: Mon Jun 13, 2011 4:10 pm

Re: Addons Support, requests from modders

#3 Post by bricks »

I'm curious, what hooks are currently available? actor:actBase() (I think that is it) is one I'd like to have, currently just for the sake of making calls to sustained talent's functions.
Sorry about all the parentheses (sometimes I like to clarify things).

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Addons Support, requests from modders

#4 Post by darkgod »

DamageProjector:base
DamageProjector:final
Actor:takeHit
Combat:attackTarget
Combat:attackTargetWith
ToME:load
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Hirumakai
Thalore
Posts: 192
Joined: Wed Aug 11, 2010 2:39 pm

Re: Addons Support, requests from modders

#5 Post by Hirumakai »

I would like to request the dam variable in attackTargetWith in combat.lua be passed to hooks, if possible.

Instead of:

local hd = {"Combat:attackTargetWith", hitted=hitted, target=target, weapon=weapon, damtype=damtype, mult=mult}
if self:triggerHook(hd) then hitted = hd.hitted end

replace with:

local hd = {"Combat:attackTargetWith", hitted=hitted, target=target, weapon=weapon, damtype=damtype, mult=mult, dam=dam}
if self:triggerHook(hd) then hitted = hd.hitted end

This allows hooks to take into account the amount of damage actually done by the weapon.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Addons Support, requests from modders

#6 Post by darkgod »

done
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply