How do I modify Steamsaw talent?

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

How do I modify Steamsaw talent?

#1 Post by jenx »

How do I overload or superload a steamsaw talent, if it's already in an addon?
MADNESS rocks

nsrr
Uruivellas
Posts: 971
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: How do I modify Steamsaw talent?

#2 Post by nsrr »

You don't need to use a super load or an overload, actually. You just need to load a data file and make sure the weight of your add on is higher than the add on which originally loads it. You can use my Bone Shield tweak for reference; just ignore the super load that it contains. In data/talents/corruptions/bone you will see how I edited the bone shield talent. Change the folders to have the appropriate names (something like data/talents/tinkers/steamsaw).

I'm not at my computer or I would put an example here, but I think you have enough experience to figure it out from my code. It's pretty straightforward. You can over write existing fields (as I did with 'absorb' and 'info') or add new fields (as with 'getThreshold'). Basically it's just 'Talents.talent_def.T_TALENTNAME.field = foo'.

Hope that's enough to point you in the right direction .

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: How do I modify Steamsaw talent?

#3 Post by jenx »

I"m not sure you have answered my question. the fodlers where the talent is, is inside the addon folder already. the steamsaw talents are themselves an addon.

so i'm needing an addon to modiy an addon - how do I do that?
MADNESS rocks

nsrr
Uruivellas
Posts: 971
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: How do I modify Steamsaw talent?

#4 Post by nsrr »

Hmm.. I guess I'm not clear on the question, then. When you say the talent is in an add on already, do you mean Embers? Or a user made addon? Or an add on you are making?

If it's either if the first two, then yes, you'll need a new add on to edit it. If it's one you are making or have already made, you could just edit and update it.

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: How do I modify Steamsaw talent?

#5 Post by jenx »

nsrr wrote:Hmm.. I guess I'm not clear on the question, then. When you say the talent is in an add on already, do you mean Embers? Or a user made addon? Or an add on you are making?

If it's either if the first two, then yes, you'll need a new add on to edit it. If it's one you are making or have already made, you could just edit and update it.
yes, i meant embers. I don't want to edit one line in embers and but have to copy over the whole lot. how can i modiy one file in embers? is it a matter of overriding it with a different weighting?
MADNESS rocks

nsrr
Uruivellas
Posts: 971
Joined: Mon Sep 21, 2015 8:45 pm
Location: Middle of Nowhere

Re: How do I modify Steamsaw talent?

#6 Post by nsrr »

jenx wrote:
nsrr wrote:Hmm.. I guess I'm not clear on the question, then. When you say the talent is in an add on already, do you mean Embers? Or a user made addon? Or an add on you are making?

If it's either if the first two, then yes, you'll need a new add on to edit it. If it's one you are making or have already made, you could just edit and update it.
yes, i meant embers. I don't want to edit one line in embers and but have to copy over the whole lot. how can i modiy one file in embers? is it a matter of overriding it with a different weighting?
Okay, I assumed you were talking about Embers from the beginning, but it's good that's straightened out.

So, yes, basically it is just a matter of overwriting. Just use the method I described in my first post. True, Bone Shield is not from an addon, so maybe that was a bad example to give you, but the method for editing a talent from an addon or from base ToME is the same, the only difference being that if it is from an addon you will have to make sure your addon has a higher weight than the one that originally adds the talent.

Here, I've attached a mock up to show you exactly how it would work for 'To the Arms', as an example. There are more detailed notes in 'sawmaiming' file.
Attachments
tome-sawtweak_example.zip
(3.11 KiB) Downloaded 75 times

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: How do I modify Steamsaw talent?

#7 Post by jenx »

Thanks!

So, though, a new problem. In Embers, damage_types.lua is in the addon, but not as superload or overload, but as data.

I want to overwrite the code in: setDefaultProjector(function(src, x, y, type, dam, state).

But I'm not sure how this would work. The dt file in embers just has a number of new damage types, that's all.

So, how do I replace the thing that is setDefaultProjector(function(src, x, y, type, dam, state) with my own version?
MADNESS rocks

Post Reply