Expanding on Ranger skills

As a rule, all classes in FCQ are limited to 4 active skills.

This is a design constraint to keep each skill useful. In FCQ, you won’t have the equivalent of a level 1 Fire spell cluttering your skill list after you’ve learned the much superior level 3 Firaga.

It also keeps battles feeling snappy. Find your skills in 2 clicks. No scrolling required.

Equally important, this restriction is also to keep me sane. Even with only 4 skills to a class, but over 20 classes, that’s still a lot of skills. It’s plenty of work to conceptualize and balance them all.

With one exception

However, there was one area where this limitation felt… well, too limiting. My Ranger class has the ability to manipulate the elements. Since there are 4 elements, there are 4 related skills. That’s all. Just 4 support skills that are identical, except for their elemental affinity.

My workaround, while staying true to the rules, is to give the Ranger a toggle skill. Using Desert Camo or Swamp Camo will swap between two sets of 4 moves each.

  • Embed (elemental support)
  • Submerge (elemental support)
  • Ambush (new)
  • Desert Camo (toggle)

and

  • Parch (elemental support)
  • Levitate (elemental support)
  • Survival (new)
  • Swamp Camo (toggle)

A decent compromise

It’s slightly clunkier than just putting more than 4 skills in a scrolling list, since it takes a couple seconds to use the toggle skills. But I’m willing to accept that speed-bump since it keeps the menu behaviour consistent and gives the class a unique quirk.

Changes to dual-wielding

Dual-wielding is the concept of holding a weapon in each hand instead of a weapon and a shield, or a two-handed weapon. It’s a fun way to give your characters more options for customization. The problem with the way RPG Maker MV handles dual wielding is that there’s no visual feedback from it. Your attack animation still only hits one time, no matter how many weapons you hold.

Plugin woes

I’ve been using a plugin to fix this issue. But it’s been giving me grief, randomly changing my character’s stats between each weapon swing and leaving them permanently altered. The plugin’s support was shaky anyway, so rather than spend time troubleshooting, I looked for an alternative.

A practical solution

RPG Maker forums user Arkzein shared a code snippet using Yanfly’s action sequences to simulate a proper dual-wielding effect.

It does what it should quite elegantly, allowing the user to swing each weapon individually and letting those hits have different strengths depending on the weapon’s strength. I added a few extra features to it, including

  • a check to see if the weapon fires long-distance, or if the player should approach their target before the attack begins.
  • a check to see if the user is carrying two weapons (so it acts like a regular one-hit attack for users with one weapon).
  • a check to see if the 2nd weapon has a different animation than the first (otherwise it just repeats the first animation).

Sample code

Here’s the snippet in full:


// M.o.v.e. forward a little i.f. firing a missile
if user.attackMotion() == 'missile'
  move user: forward, 48, 10
  wait for move
else
// M.o.v.e. to the target
  move user: target, front base, 10
  wait for move
end

// I.f. the user has multiple weapons + dual-wield
if user.weapons().length > 1 && user.isStateAffected(129)
 EVAL: user._weap1 = user.weapons()[0];
 EVAL: user._weap2 = user.weapons()[1];
 // Unequips second weapon
 EVAL: user.forceChangeEquip(1, null);

 // 1st weapon attack
 MOTION ATTACK: user
 MOTION WAIT: user
 action animation
 wait for animation
 action effect

 EVAL: user.forceChangeEquip(0, user._weap2);

 // 2nd weapon attack
 MOTION ATTACK: user
 MOTION WAIT: user
 // animation of 2nd weapon
 EVAL: target.startAnimation(user.weapons()[0].animationId);
 wait for animation
 action effect

 // Restores weapons
 EVAL: user.forceChangeEquip(0,  user._weap1);
 EVAL: user.forceChangeEquip(1, user._weap2);

else
 // Regular 1 weapon attack
 MOTION ATTACK: user
 MOTION WAIT: user
 action animation
 wait for animation
 action effect
end

The weird dots in the comments are because action sequences don’t have the concept of comments. So if I didn’t put dots in between the letters of “i.f.” it would be interpreted as a programmatic if statement.

Merging updated scripts

The developers supporting RPG Maker MV (the engine behind FCA) released a fairly significant bug into the code with version 1.3.2. It relates to the way skills are learned, and since that’s a significant factor in the gameplay of FCA, I decided to refrain from updating my codebase.

Updating to 1.3.4

They just recently fixed the bug. So I went through and updated all of the core scripts (from 1.3.1 to 1.3.4) and all of Yanfly’s scripts.

To my surprise, FCA still boots up properly and I’m even seeing a huge improvement in how battles perform (better frame rate). But I’m seeing more stuttering on the regular map screen.

Time to run the rest of my tests and see what’s broken!