How can I make a weapon that changes its attack
methods with the level of the character ?
(e.g. "Swing" replaced by "Slash" when fighter level is craftman etc.)
Actually, I would also like to have methods dynamically replaced
during the game, whenever I want.
(like meeting a Sword Master that teaches one of your char a special attack that works with all sword-type weapons...)
(done) Attack methods (and other stuff)
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

I can contend with adding a class "SWORD" for the last example,
but I believe creating new archetypes just for changing
attack methods is not the simplest solution, especially if
I need a lot of character-dependant attack methods.
EDIT : hey, Beo, weren't you thinking 'RTC' ?
Things work differently in DSB !
but I believe creating new archetypes just for changing
attack methods is not the simplest solution, especially if
I need a lot of character-dependant attack methods.
EDIT : hey, Beo, weren't you thinking 'RTC' ?
Things work differently in DSB !
Last edited by Joramun on Tue May 08, 2007 6:06 pm, edited 1 time in total.
What Is Your Quest ?
I didn't say it was the simplest, I simply said it was the one you'd be able to do right now 
Not sure how the action activations work, if you can have a weapon auto-launch an external action window then that would be the easiest way - whether RTC can do that just now I don't know I'm afraid
However, option windows come from item options anyway, so you'd need to create the variants for your party and learning skills. Hmm...

Not sure how the action activations work, if you can have a weapon auto-launch an external action window then that would be the easiest way - whether RTC can do that just now I don't know I'm afraid
However, option windows come from item options anyway, so you'd need to create the variants for your party and learning skills. Hmm...
- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
No, I'd rather make you look like a nut.beowuuf wrote:if you want to erase my posts and make Joramund look liek a nut

Anyway...
There are ways to do this now, but none of them are very good.
What I'll add for 0.16 is the ability to specify an arch's attack methods as a function returning a table.
So, you could do something like:
(Consider this Lua-pseudocode, I haven't really tested it)
Code: Select all
obj.some_sword.methods = method_func
Code: Select all
function method_func(id, who)
return { {"SWING", 0, 0, some_func}, {"CHOP", 0, 0, some_func} }
end


The point being that the return value doesn't need to be constant, so, you could query the character's experience level, or whatever else, and return appropriate methods. If it's level-based, specifying the level and skill in the method are superfluous, but, it might not be, and to change the format would be more trouble than just keeping it constant, so, they'll remain.