Jump to content
KayakoChan

"ALL the Guns" Damage based on items in inventory

Recommended Posts

So this was an idea initially posted by IrateResearcher

"All the Guns" Uses the attack power of your current gun and all the guns in your inventory.

 Well, after playing around with the damage formula and variables, I accidentally stumbled upon a way that could get that done, So I decided to make the skill!

Demo link

 

It's fully set up using eventing, no scripts at all so it should work in any project (That uses a battle system allowing events). Though it's definitely not plug and play unless you.

  • Use the default database
  • Have the only character using the skill be Actor 6
So yes. Just decided to put it out if you were wondering how to make it yourself.

The skill is composed of two skills and a common event.

 

Skill one is the skill you actually see, it does nothing but:

  • Serve as the "visual" skill with the description and energy costs.
  • Call a common event
  • (Optional)Apply a 1 turn duration state on the enemy to prevent the "Attack had no effect on x" message.

N9q1SdB.png

 

 

Then we have the common event, this one is a bit more complicated. I'll try to break down what it does. In the screenshot below you'll see how it's set up

for three of the 6 guns (In the demo it's set up for all 6)

  • (Optional)Play the gun cocking sound.
  • Set the Variable storing the number of items to 0 to prevent the skill getting more powerful every time you use it.
  • Set the Variable storing total damage to 0 to prevent the skill getting more powerful every time you use it.
  • <Label-TestFlint> Tells the event where the start of the "test" sequence is.
  • Checks whether or not the player has any "Flintlock" in their inventory
  • If they do:
  • -Add 1 point to the variable storing the number of items
  • -Remove one "flintlock" from the inventory.
  • -Return to <Label-TestFlint>to see if they have more than one
  • If they don't:
  • -(optional)Return as many "flintlock" to the player's inventory as were removed. (Not doing this would result in the item being consumed.
  • -Tells the game that the "flintlock" is worth 16 damage per item.
  • -Multiplies this value by the number of items counted.
  • -Adds this value to the variable storing the total damage for the skill.
  • -Sets the variable of counted items to 0 so it can go and count the next type.
So, let's say the player has 6 "flintlock" in their inventory

Each "flintlock" is worth 16 points of damage.

16 x 6 = 96 damage.

  • After doing this calculation the script then does the same for the "Musket" and the "Dragoon", putting all their values together.
  • As you see, the only things that changed between item types are the items, and the name of the labels. So, let's scroll to the bottom here.
  • (optional)The event waits 20 frames (a little less than half a second)
  • (Optional)Another guncock sound is played.
  • The script tells Actor 6 (Kayako) to use the skill "GunVolley" on a random target.
(Note: it IS possible to pick a defined target, but since this skill targets all enemies it's unnecessary)

 

3yUIRJt.png

 

 

So, we had the hardest part behind us... we head over to the second skill it calls.

This one does the actual damage.

 

This skill is:

  • NOT directly selectable
  • Called by the common event above
  • Contains the following damage calculation:
a.atk * 2 + a.agi * 3 + v[5] - b.def * 2

 

Which does the following

  • Take the skill user's Attack power
  • Mutiplies this value by 2
  • Take the user's agility
  • Multiplies this value by 3
  • Adds the value of Variable 5 (Which is the variable storing the total damage of all items combined)
  • Divides this by the defense of the opponent (times 2)
So let's say, Actor 6 has an Attack power of 120 An agility of 98 and the attack power of all Counted items in her bag combined is 2400

The enemy has a Defense of 130

 

The damage done should be the following:

(120 x 2=)240 + (98 x 3=)294 + 2400(=2934) - (130 x 2=)260 = 2674

(240 + 294 + 4400 - 260 = 2674)

Yes, you read that right. 2674 whopping damage. The opponent's defense doesn't have much to say to that.

Obviously the skill might need some balancing, (To be honest, I am not sure if this is even how damage calculations in RPGmaker go) or the items

should be harder to acquire. But you definitely notice that!

 

UOAJ458.png

 

 

So yes, that's all there is to this skill, if you want to use something like this yourself, go ahead, no need to credit anyone.. Perhaps let me know, leave a like if you enjoyed it. Kukuku. (If you use this skill directly without modifications

you might want to thank IrateResearcher for the idea. But yes! Happy fun times!

Edited by KayakoChan
  • Like 4

Share this post


Link to post
Share on other sites

Thank you, as long as there's anyone who can use this, it's a day well spent in my eyes~♫

Share this post


Link to post
Share on other sites

Hehe the idea reminds me of SaGa Frontier's Shoot-All attack, which shoots each gun the user has equipped at until you have no ammo left. I think it was balanced by making each shot weaker and using up all your weapon's ammo (which recharges every battle, but cannot be refilled in battle at all).

Edited by KilloZapit

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted