RPG Maker MV

RPG Maker MV

OKTrashPanda Jun 15, 2021 @ 12:20pm
Variable multiple strikes?
I've been combing the internet trying to find an answer and I'm not getting anything that works yet. I'm looking to change the default attack so that the number of hits changes depending on your character's Hit%. Basically every time hit% increases by 10 I want the maximum number of hits per attack to go up by one. The original Final Fantasy did something like this. I've seen a lot about the Yanfly Engine but the documentation for it is very confusing to me and I can't quite figure out how to implement this. Can anyone help out?
< >
Showing 1-8 of 8 comments
Regrettucini Jun 22, 2021 @ 6:58pm 
That's a good Idea. Why not agility instead of hit rate though?
OKTrashPanda Jul 1, 2021 @ 4:50pm 
Because that's what I felt like doing. I'm still trying to figure out how to do this. I've found plugins that let my change it by hand at certain events but I haven't found anything that lets me turn Attack Times into a formula which is what I really need.
Dusk_Army Jul 2, 2021 @ 12:34am 
Well... I have a stupid suggestion that might approximate what you want, at least in part. I've made multi-hit attacks before by having the skill call a Common Event that orders the party member to use it again. However, it only works for one party member at a time (ie, the Force Action command requires a specific actor/enemy position), as far as easy implementation goes.

I think you could get it to work though, by using some Script commands to figure out whose turn it is. It won't look quite like FF1 (it's more like X-Fight in FFVI), but I think it should work? I'm unsure though. What you're asking for is pretty complex.
OKTrashPanda Jul 2, 2021 @ 10:09pm 
I've been bashing my head into this since first asking for help and it's driving me quite nutty so I wouldn't mind doing it the hard way and making some kind of conditional branch. I THOUGHT I struck gold when I tried scripting it as:

$gameActors.actor(x).TRAIT_ATTACK_TIMES = $gameActors.actor(x).hit / 10 + 1

But apparently that wasn't it, nor was $gameActors.actor(x).addAttackTimes and I tried using $gameActors.actor(x).traitsSet but I'm pretty sure I'm getting the syntax of it wrong anyway. At this point I'm leaning toward one of the dynamic trait plugins but I'll also have to hard code values at level up for that rather than use a formula to determine it based on hit%. Sooooooo frustrating! I've found so much documentation on many aspects of the program but very little on how to use scripting other than people just snarkily saying "lol just learn js scrub" as if that's something I can do over the weekend.
Caethyril Jul 3, 2021 @ 4:21am 
By default, traits exist on the static database objects and have fixed values; realistically, you'd want a plugin for this. Consider this one:
This gives you a scriptable notetag that you can use on your Attack skill, e.g.
<Repeat: 1 + a.hit * 10>
Note that the hit value is stored as a decimal, i.e. 1 = 100%. That's why I used * 10 here. Remember to save to apply Plugin Manager changes before testing~

There's an MV/MZ script call reference sheet here:
There's also some community-compiled MV documentation here:
However, that one might be difficult to follow if you're unfamiliar with coding.

If you want to understand and come up with your own scripted solutions, you'll need to be familiar with JavaScript and the parts of the core scripts (and/or other plugins) that you want to modify. Trihan has a Jump into JavaScript series in case you're interested in learning both at the same time:
I agree that it'd probably take much longer than a few days to learn, though!
Dusk_Army Jul 3, 2021 @ 2:35pm 
Originally posted by OKTrashPanda:
I've found so much documentation on many aspects of the program but very little on how to use scripting other than people just snarkily saying "lol just learn js scrub" as if that's something I can do over the weekend.
Rudeness aside, there is some truth to that. RPG Maker is supposed to be easy to use, and there's definitely a lot of stuff you can do without touching the code, but it has its limits.

JavaScript is, in my experience, irritating to use. It's soft-typed language (I think that's the term, could be wrong), meaning that variables are not locked to one kind of data. In other words, if you're not paying enough attention to what you're doing, you can accidentally pass "four" to a function that's expecting "37". If you can get past the quirks, it's not difficult to work with, though; just frustrating.

If you're planning on doing a lot of work in RPG Maker, it's worth taking some time to understand how it runs under the hood. That's true of any engine, really.
OKTrashPanda Jul 3, 2021 @ 6:20pm 
Thank you very much for that plugin, Caethyril. At first I saw you multiplied by 10 instead of dividing so I got confused and changed it back, then got confused why it wasn't working. Then I remembered the value is stored as a percentage of 1, not an integer. Seems to be working exactly as I want it to now! I'm going to still try to learn js but that's a slow process.
Caethyril Jul 4, 2021 @ 4:20am 
Great, happy RPG Making! ^_^
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Jun 15, 2021 @ 12:20pm
Posts: 8