Question regarding weapons & skills

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
guo
Metal Slime
Posts: 749
Joined: Fri Dec 04, 2009 9:12 pm

Question regarding weapons & skills

Post by guo »

Hi,

I'm looking for suggestions and ideas regarding special attacks and how they relate to weapons.
In a game with bows, guns etc that use items like bullets or arrows, what would be the best way to have special attacks related to those items? The issue I can see is the hero still knowing those attacks (let's say "multiple shot") but they don't have the requisite item equipped.

I'm not using all the stats, so I was thinking of having ranged weapons set a stat to 1, and the attack will instead-chain to a non-ranged version if that particular stat is 0.

Cheers.
vvight.wordpress.com
User avatar
Bird
Slime Knight
Posts: 227
Joined: Thu Jan 26, 2012 2:19 pm
Location: Germany

Post by Bird »

Would one attack per weapon be enough? You could use "When used as a weapon" in the "Edit Items" menu to assign one specific attack to one specific weapon.

Else, you could use a script before every battle that teaches your hero the attacks for his equipped weapon. That wouldn't override a standard fist attack, like the basic attack that costs nothing.

Code: Select all

# First, all weapon specific attacks have to be deleted (in this example attack number 22 to number 32)
variable (x)
for (x,22,32,1) do (
forget spell (hero,x)
)

# If the hero has item 141 equipped, he learns spell number 22
if (check equipment (hero,1) == 141) then (teach spell (hero,22))
All the weapon specific attacks would have to be in one of the heros spell menus set as "Learned from an item".
Last edited by Bird on Thu Jul 11, 2019 6:45 pm, edited 1 time in total.
User avatar
SwordPlay
Chemical Slime
Posts: 966
Joined: Sun Jan 22, 2017 9:32 am
Location: London, England
Contact:

Post by SwordPlay »

You can have attacks appear in a battle menu conditionally based on tags, so different equip tags can alter the battle menu in this way
User avatar
guo
Metal Slime
Posts: 749
Joined: Fri Dec 04, 2009 9:12 pm

Post by guo »

The problem arises when you have multiple heroes able to equip the same items. Eg a Bow may turn tag:bow on when equipped, but the game has no way of differentiating which hero is wielding it, therefore the tag unlocks those attacks for all heroes in the party.
I know the way forward , but it seems needlessly complicated for what I want to do. I might have the items increment a hidden stat and have the attacks check those, and chain to a different attack depending.

Which brings me to a feature request: When chaining attacks, can we have "=" for stat checks, as currently we only have "<" and ">".
vvight.wordpress.com
Post Reply