Well folks, here it is!
This one took quite a bit of extra effort but I was right in thinking it'd be in my wheelhouse after learning about making Sub Commands for my main game project.
FFIX Style Throw Script
version 1.2.1
by The_Sarah
Introduction
A final fantasy styled Throw script!
The user can create their Throw skill in the Database (with whatever Damage Formula they want to use) and then use Notetags to decide who has the skill and how much damage individual items will do when thrown.
---------------------
Patch Notes
- Update 2-
Version 1.2 is done!
i) This one fixes a bug that would happen if you had two characters throwing the same item in a turn.
ii) This one also finishes aliasing all methods so the script should hopefully work with any number of other scripts.
iii) This one also removes the bug to do with empty enemy names.
iv) This is (hopefully) that last bug-fixing/neat-making script update, any future updates should either be me adding additional Damage Related Notetags (or other requests) or adding in planned features (like ally-targeting and chance of item pick-up).
v) Version 1.1 has been removed and replaced with Version 1.2.
vi) Pastebin Link removed as site seems to be having issues, future code drops will be done with this Forum's code and spoiler insertion methods.
vii) Updated to 1.2.1, some finishing touches made on aliasing and some if and case statements rephrased.
-Update 1-
Version 1.1 is done!
i) This one makes it easier to assign characters the Throw skill (via notetags now) and cleans up a lot of the code.
ii) It also adds in some aliases and fixes a couple bugs.
iii) It also adds some people to the special thanks section
iv) As there were a few bugs in the original 1.0 version of the script, I will remove that version and only have version 1.1 available on this thread from now on.
---------------------
Script Features
.
With this script, you can make any number of characters (who are Game Actors in the Database) able to use the "Throw" skill.
The Throw skill (by default) is found underneath any chosen character's SPECIAL/MAGIC command and above that character's GUARD command when in battle.
The skill will open a unique Throwable Object Window.
- This window will then show the player a list of any Items, Weapons or Armour that they have in their inventory that you (the game maker) have decided can be thrown in your game.
The player can then pick from this list and throw the object at an enemy.
The object thrown will decrease in the party's inventory by 1.
Any damage a thrown object does is calculated based on whatever YOU wrote in your "Throw" Skill's damage formula (in the Database), as well as whatever Notetag you have assigned to the Item/Weapon/Armour thrown.
How to Use
Copy and paste the Script into a slot above Main Process and below Materials in your Script Editor.
.
Then follow these 5 steps:
Step 1) Create a "Throw" skill in your Database like you normally would for any custom skill.
Step 2) In the Editable Region in the script (just below the Script Intro), change the number 185 to the number of your Throw skill's id in the Database.
Step 3) For any character you want to be able to use the Throw skill, simply add a notetag saying (without the speech marks) "<Throw>" .
- Add this <Throw> notetag in the relevant character's Note Box (in the Game Actors section of the Database).
Step 4) For any items, weapons or armour in your game that you would like to be throwable:
i ) You must write a Notetag in their Note Box sections in the Database.
ii ) A
full list of the notetags you can write, as well as information on what they each do, can be found below "Features" in the Script Intro section of the Script.
iii) This list is found in the section named "~ NOTETAGS KEY ~".
Step 5) Enjoy the script! Maybe leave a like on this forum thread post?
The Script
(click the spoiler button and copy paste this section)
Spoiler: Ruby Code
Screenshots
.
1)

2)

3)

4)

5)

FAQ
.
Q: Can you add more notetag damage options?
A: Yes I can! Simply ask on this forum thread for what you'd like and I'll do what I can when I have the time (which honestly shouldn't be too long a wait lol).
Credit and Thanks
.
The_Sarah (aka me) for being awesome and writing this script
.
Also:
* TheoAllen (RPG Maker Forum user) for initially helping me with figuring out the make_damage_value method.
* Kyonides (RPG Maker Forum user) for helping with Module Instance Variables and Regex.
* A-Moonless-Night (RPG Maker Forum user) for helping me with Aliasing and to finally understand how to grab specific parts within a Regex string.
* LockeZ Ninja Throw (Script) for helping me figure out how to decrease items when thrown.
* Any future refractors or nice people who give me tips on future versions of the script
* And
all of you who download the script and use it! Because sharing is fun
Author's Notes
.
Future versions will come out on the same page as this one.
Planned additions to the script include ally-targeting and adding in a random chance of picking up items you've thrown at the end of each battle.
Any requests for extra Note Tag options will also be realised in future versions.
Terms of Use
.
(1) When sharing this script online, please link to this original Forum Thread page.
..
(2) If you share a game with this script in it (freely or commercially), you MUST credit me in the game.
i ) Ideally like this: "Throw Script by The_Sarah"
ii ) If you edited it then like this: "Original Throw Script by The_Sarah"
..
(3) Other than that, this script is free to download and use or edit in any game or project (free or commercial).
Love and Peace everyone!
Love AND Peace!
本贴来自国际rpgmaker官方论坛作者:The_Sarah处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/the_sarah-v1-2-1-final-fantasy-style-throw-script.124964/