multi-hits based on agi

Status
Not open for further replies.

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,868
Reaction score
521
First Language
English
Primarily Uses
N/A
Looked an couldn't find anything on this. I was wondering if there was a script out there that makes the multi-hit chance of multi-hit moves to be based on AGI? Is there a script out there that does this? Thank you in advance

For example. there is a skill that has the potentail to hit 3 times
If a.agi is *2 b.agi or higher the skill hits 3 times
if a.agi is *1.5 b.agi the skill has a 50% chance to hit twice and a 50% chance to hit thrice
if a.agi = b.agi it has a 1/3 chance to hit once, twice, or thrice
if a.agi is *0.5 b.agi it has a 50% chance to hit once and a 50% chance to hit twice
any lower than the last example, and it only hits once
 

magnaangemon01

Miles Montgomery
Veteran
Joined
Jun 7, 2014
Messages
447
Reaction score
237
First Language
English
Primarily Uses
RMVXA
Using agility? Sounds like Suikoden. I know the attack + on the database, but maybe what you need is a script. Have you checked the Master Script List?
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,868
Reaction score
521
First Language
English
Primarily Uses
N/A

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,868
Reaction score
521
First Language
English
Primarily Uses
N/A
Heyoo!

I made this for you (my first public script :o)!

Hope it helps, do let me know :)


-edit-
Oh, it's "awaiting approval before being displayed publicly" :/

-edit 2-
While we wait for that to get approved, it should do everything you've requested, all you need to do is use the corresponding notetag on any skill you want to apply your agility based calculations for.
Um, thank you. What do i owe you?

Also, this is for vxace right?
 

The_Sarah

Veteran
Veteran
Joined
Jul 18, 2020
Messages
55
Reaction score
32
First Language
English
Primarily Uses
RMVXA
Um, thank you. What do i owe you?

Also, this is for vxace right?
No problem! Helping eachother out with scripts and game making is what this forum (I think) is all about!

As for what ya owe me, the terms are in the forum post I made for the script, but it's taking a while to get approved for some reason.
- Basically I made it for you (and others) for free, you can use it in free games or commercial games but if you end up sharing those free games with others (or selling your commercial games) with my script in them, then just make sure ya credit me.

-------- Temporary Addition to this Reply --------
Yay! The forum thread I posted has been approved! Thus this section has been removed from this reply.
-------- End of temporary addition to this reply --------

Also yes, it's for VX Ace :)
That's the only version of RPG Maker I currently have! :o
(So I'm learning code and making a game on that one first, then plan to buy MZ at the end of the year after my first game release if all goes well)
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,380
Reaction score
1,562
First Language
English
Primarily Uses
RMMV
Why not allow for a digit to be entered in the notetag so that the user can vary the number of multi-attacks without editing the script? Just a friendly suggestion. :) Also, would you mind if I refactored this a little bit for you? I enjoy optimising scripts, but obviously I don't want to step on your toes and your solution is perfectly functional as-is.
 

The_Sarah

Veteran
Veteran
Joined
Jul 18, 2020
Messages
55
Reaction score
32
First Language
English
Primarily Uses
RMVXA
Why not allow for a digit to be entered in the notetag so that the user can vary the number of multi-attacks without editing the script? Just a friendly suggestion. :) Also, would you mind if I refactored this a little bit for you? I enjoy optimising scripts, but obviously I don't want to step on your toes and your solution is perfectly functional as-is.
Do you mean my one?
Oddball requested rather specific agility based results so I just went with that.
I could probably make it more general-user friendly by doing something like you mentioned though.
Not a bad idea for not-incredibly-sleepy future me.

As for refactoring... sorry I'm still incredibly new to this whole scripting scene. What do you mean by refactoring this?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,380
Reaction score
1,562
First Language
English
Primarily Uses
RMMV
Do you mean my one?
Oddball requested rather specific agility based results so I just went with that.
I could probably make it more general-user friendly by doing something like you mentioned though.
Not a bad idea for not-incredibly-sleepy future me.

As for refactoring... sorry I'm still incredibly new to this whole scripting scene. What do you mean by refactoring this?
That's fair, the specificity would make it difficult to expand.

By refactoring, I just mean tidying up the code a bit and making it more efficient. :)
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,402
Reaction score
499
First Language
English
Primarily Uses
RMVXA
Oddball requested rather specific agility based results so I just went with that.
I like the script. I'm going to test it out in my game. I was hoping to use an ATB but the FPS drops drastically. With your script I could make some skills do multiple attacks. So thanks for that.
I did edit it for my purpose, as all I would want is if agi is >2 than enemy, then attack twice; else attack once.
I'll get to checking if it works for me later. But thanks.

If you work at it and continue to improve you'll become just as good as the other ruby scripters here. I've only spent a little bit of time here and there, so my knowledge is not where it should be.
Keep it up.
 

The_Sarah

Veteran
Veteran
Joined
Jul 18, 2020
Messages
55
Reaction score
32
First Language
English
Primarily Uses
RMVXA
That's fair, the specificity would make it difficult to expand.

By refactoring, I just mean tidying up the code a bit and making it more efficient. :)
Hmm, what you do with the script on your end is your business so I don't mind edits and what not (as long as I'm still credited if you then share the game with an edited version of the script lol).

And I am curious about this refactoring, as I could probably pick up some knowledge from seeing this script made neater.

But give me a couple days first before you upload a refactoring then will ya?

I wanna try to make it more general-purpose built like you initially suggested first. So once I've uploaded a 1.1 or 2.0 or whatever (not sure how numbering versions works lol) then I'll let you know and you can have at it :).

I like the script. I'm going to test it out in my game. I was hoping to use an ATB but the FPS drops drastically. With your script I could make some skills do multiple attacks. So thanks for that.
I did edit it for my purpose, as all I would want is if agi is >2 than enemy, then attack twice; else attack once.
I'll get to checking if it works for me later. But thanks.

If you work at it and continue to improve you'll become just as good as the other ruby scripters here. I've only spent a little bit of time here and there, so my knowledge is not where it should be.
Keep it up.
Thanks so much for the kind words! :D

Also yeah I don't mind you editing it for your own purposes, just as long as credit is still given if the game is then shared with an edited version of my script in it (as I think that's the best way to do crediting, though if there's some other protocol do let me know, again, still kind of new at all this).
 
Last edited:

The_Sarah

Veteran
Veteran
Joined
Jul 18, 2020
Messages
55
Reaction score
32
First Language
English
Primarily Uses
RMVXA
That's fair, the specificity would make it difficult to expand.

By refactoring, I just mean tidying up the code a bit and making it more efficient. :)
But give me a couple days first before you upload a refactoring then will ya?

I wanna try to make it more general-purpose built like you initially suggested first. So once I've uploaded a 1.1 or 2.0 or whatever (not sure how numbering versions works lol) then I'll let you know and you can have at it :).
Hey Trihan! 2.0 is out!

I couldn't make the "adding actor speed check windows" super simple for people, but the script's now more general purpose built (with multiple editable regions included) and has detailed examples for how to script in additional times to check that hopefully even people with limited to no scripting experience can read and understand.

I also got some tips on making it neater by someone on the thread I made for the script so I adopted those and yeah.
It's fully editable now, still easy to use for simple applications and now hopefully kind-of-easy to use for more advanced applications too.

Head on over to the link: https://forums.rpgmakerweb.com/index.php?threads/multi-hits-based-on-agility-the_sarah.124792/

And get your refactoring game on to share with me if you still feel like it lol.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,868
Reaction score
521
First Language
English
Primarily Uses
N/A
This post is solved and can be closed
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,900
Reaction score
8,262
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

One 3-day jam and a Game Awards... this month is moving... \o/
Maker-ing has been being the best thing that happened to me this year so far. it is so good to rescue some old skills fo creativity and the people I have met are really incredible. I love my coffelanders and tocudos buddies. Maybe one day I will reach other countries folks too. S2
Well... My game plays better at 1920x1080, so I guess that's the new resolution. Still runs at 60FPS. :LZSexcite: Also... I really want a boss to be able to build new maps around the player... Mostly because it's visually spectacular! I'm er... not quite sure yet how I can do that without making MV explode.... But I'll find a way, anything in service to the "sparkles"! :kaopride:
How to change your netbooks screen resolution

Forum statistics

Threads
100,791
Messages
979,586
Members
132,436
Latest member
jefigeb851
Top