Throw Weapon (Final Fantasy Style)

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
49
First Language
Portuguese
I'm in need of a plugin that makes a skill into something like Final Fantasy "Throw". It's a skill where choose a weapon from your inventory and throw it at the enemy to deal damage based on the weapon attack stat. When you throw a weapon, you lose it forever. It would be nice if it's compatible with Yanfly plugins.

Another nice feature to have would be to show the weapon icon flying to the enemy when you throw it. But I think that would be optional.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,440
First Language
Portuguese
Primarily Uses
What a coincidence, I was thinking about this today and how this can be done with the Mix Actions.

If you don't mind putting some hard work, you can do it.

First setup your Mix action with something like this:

<mix command: 'Throw'>selection 1: wt1, wt2, wt3failure: s1</mix command>- On the selection 1, place all weapon types you want to be throwable (use wt*, where * is the weapon type ID)

- Set the "failure" to be the action that will be used when throwing the weapons.

- Then here comes the hard part: you will need to add tag <mix consumable> to each weapon, so if you have many weapons, this can be a huge pain...

- Now add this code to the pluing (it will be added to original plugin at the next update):

Game_Action.prototype.mixItem = function(index) { var obj = this.mixAction()[index - 1] return obj ? this.subject().getMixItem(obj) : null;};This code allows you to retrieve the items used on the mix. So you can use 'this.mixItem(1)' on the damage formula to get the first mix item, wich is in your case the weapon.

For example, to get the weapon atk, use 'this.mixItem(1).params[2]' inside the formula.

(a.atk + this.mixItem(1).params[2]) * 4 - b.def * 2 will add the weapon atk to the user atk (the rest of the formula is the same as the defaul atk damage).

You can make things harder if you want each weapon throw to have it's own display name and own animation, since you will need a different skill for each weapon, and will need to add each of them to the mix setup. something like this:

<mix command: 'Throw'>selection 1: wt1, wt2, wt3failure: s1w1 = s10w2 = s11w3 = s12w4 = s14</mix command>This works, but require a lot of effort, so you might want to wait for a dedicated plugin to come out.
 
Last edited by a moderator:

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
49
First Language
Portuguese
Thank you Victor. This goes pretty close to the real thing. I thought about doing it with the mix actions but I didn't know I could select only one category (I thought I needed to mix 2 things for it to work). It is a pain to configure everything, but I will keep to your method until someone makes something more specific. Thanks a lot.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly with some Witcher 3 followed by Haunting Ground! Feel free to drop by!
I have at least three ongoing projects and I have no idea what to do with them.

Gotta love game dev.
I keep seeing the 'file tear' icon when I'm on some post that has images. I'm not sure if it's just me or it's the post, based on the replies I see.
Me: anime is okay. There are a couple good ones and a lot of really bad ones but the good are worth it. Brother: if you bring anime anywhere near me I'll break your nico nico kneecaps
Wasting so much time trying to get a sprite behavior to work. I feel like banging my head against a wall.

Forum statistics

Threads
94,277
Messages
919,586
Members
124,000
Latest member
Rinion
Top