Heyoo!
This is my first ever public script!
Hits Times Agility v2.4
by The_Sarah
Introduction
This script ties the amount of times a skill is activated in a turn to the difference in Game Actor's agility to the Game Troop Member's agility.
---------------------
Patch Notes
- Update 6 -
Version 2.4 is released!
i) Code stuff:
This version gets rid of the item_hits_generator instance variable and makes it so skill hits are based directly on the random number generated plus any additional numbers required.
- So, for example, "item.repeats = rand(2) + 1" gives us 50% chance to hit once or twice, as rand(2) generates a 0 or a 1 and 0 + 1 is 1 and 1 + 1 is 2... at least according to my old Maths teacher.
ii) The Advanced Tutorial Tips have been updated accordingly.
iii) This version also cuts out some of the fat in the code of version 2.3.1
iv) Please remember, since Update 5, the Notetag for this script is no longer <sarahrepeats> and is instead <multihits>
Spoiler: Previous Patch Updates- Update 5 -
Version 2.3 is released!
i) This version changes the Notetag from "<sarahrepeats>" to "<multihits>"
ii) This version allows the player to put the Notetag "<multihits>" in a skill that BOTH the Enemy Unit and the Player Party Member can use without any problems.
iii) This version adds a small Module to the Script.
iv) This version includes some Tutorial Tips on Scripting and reverts the Script to a more direct approach for altering the amount of hits done (rather than using Variables like previous versions did).
v) This version is awesome.
vi) Updated to 2.3.1 to fix a slight oversight that would break the game. This is now fixed. Everything is perfect.
vii) This version is perfect.
- Update 4 -
Version 2.2 is released!
i) This version is just a simple aliasing update, but now you can use this script with as many other scripts as you like and there shouldn't be any coding conflictions.
ii) I have erased versions 2.1 and 1.0 as they do not have aliased methods and thus can conflict with other scripts.
iii) I have changed to using this Forum's Code and Spoiler box systems for sharing the code, rather than an external Pastebin link.
iv) Updated to v2.2.1 to fix an oversight on the speedcheck of being between 1* and 1.5* the speed of enemy.
- Update 3 -
i) I have made a version 2.1 and renamed it a little.
ii) I'll leave the original Pastebin link for version 1.0 below (the simplest version of this script), but will now tweak the rest of this post so it's relevant to version 2.1.
Spoiler: Previous Patch Updates
-Update 2-
i) Version 2.0 was a bit over the top. So see update 3 as I have now streamlined this more detailed version into something more readable and hopefully less intimidating.
-Update 1 -
i) Turns out there's a required format to submitting scripts, so I have filled mine out.
---------------------
Features
Original script made by me (The_Sarah).
Initially requested by Oddball.
Further edits done by me (The_Sarah) but after reading tips from Kyonides and Trihan
The Script by default makes it so:
If actor agi is 2* enemy agi or higher the skill hits 3 times.
If actor agi is equal to or greater than 1.5* enemy agi (but less than 2*) the skill has a 50% chance to hit twice and a 50% chance to hit thrice.
If actor agi is equal to enemy agi it has a 1/3 chance to hit once, twice, or thrice.
If actor agi is equal to or greater than 0.5* enemy agi (but less than 1*) 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 .
How to Use
Place script below materials and above main in the Script Editor.
Basic Use -
i) Write the "<multihits>" Notetag in the Notes Box section of any skill you want to have this script's effects.
ii) The Notes Box section of skills are found under Skills in the Database.
iii) The Notetag is written without the speech marks.
iv) Notetag: "<multihits>"
Advanced Use -
You can alter the amount of times a skill hits (within a Speed Check) by editing the number that comes after the "item.repeats = " part of the Editable Method in the Script.
Information on how rand() works has also been included in the Tutorial Tips of this script.
Expert Use -
Additional Agility Times (Speed Checks) can be created, but will require some coding/scripting on your part to create (tutorial tips are included in the Script).
Script
Hits Times Agility v2.4 by The_Sarah
Spoiler: Click this to see Script
Credit and Thanks
Me, aka The_Sarah for making the script.
Oddball for the idea.
Kyonides and Trihan for ideas on how to improve it.
Terms of use
1) Users must link to this forum post when sharing the script elsewhere.
2) Users must provide credit to The_Sarah when using the script in free games & sharing those games with others.
3) Users must provide credit to The_Sarah when using the script in a game selling commercially.
4) If Users have edited the script, credit must still be provided to The_Sarah for the original script.
5) Other than that, there is no cost and it is free to use wherever.
本贴来自国际rpgmaker官方论坛作者:The_Sarah处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/the_sarah-v2-4-multi-hits-based-on-agility.124792/