Quantcast
Channel: RGSS3 Scripts (RMVX Ace) Latest Topics
Viewing all articles
Browse latest Browse all 416

Saba Kan's Ao no Kiseki Battle System 0.28 (And Rokan's AT Bonus)

$
0
0

This script was not written by me! I simply translated it from Japanese and posted it here to share! Do NOT ask me for support, I'm not a scripter (I'll try, but most likely fail)!

And done. Now, the script I've painstakingly translated for you guys is:

Ao no Kiseki Custom Battle System

Version 0.28

by Saba Kan of

jzrma.jpg

プチレア - PetitRare

Updated: 2012/01/21

Email asking for and being granted permission to translate and share:

kirinelf さんへ

わざわざメールありがとうございます。

日本語ですみません。

もちろん歓迎します、どうぞ翻訳なさってください。

> http://www.rpgmakervxace.net

> http://forums.rpgmakerweb.com

おお! これからもチェックさせていただきます!

2012年3月26日21:42 Kirin:

> こんにちは、

>

> 僕は英語のRPGVXAのコッムニティからのkirinelf です。キリンで呼びますこと

> もいいです。あの。。。日本語があまり上手でわありませんですから申し訳あり ません。よろしくおねがいします!

>

> 今回のメールの理由はRPGVXAのRGSS3スクリプトを翻訳したいことです。貴方様 のスクリプトを英語に翻訳してもいいでしょうか?もちろん

> 貴方様の記載もあ ります。自分を書いた事も絶対言いません。

>

> 僕の目的は面白そうなスクリプトを翻訳して、このサイトにほかの英語のユーサ と分かち合います:

>

> http://www.rpgmakervxace.net

> http://forums.rpgmakerweb.com

>

> そのサイトは英語RPGVXAの一番大きいコッムニティです。

>

> お返事を根気よくて待ています。

>

> kirinelf (キリン) より。

The above, translated:

To kirinelf:

Thank you for going out of your way to send an email to me.

Sorry for this being in Japanese.

Please be my guest and translate them as you wish.

> http://www.rpgmakervxace.net

> http://forums.rpgmakerweb.com

Oh! I'll be sure to check these sites from now on too!

2012年3月26日21:42 Kirin:

> Hello,

>

> I am kirinelf from the English speaking RMVXA community. You can call me Kirin.

> I'm not very good at Japanese, so I apologize for that. Pleased to make your acquaintance!

>

> The purpose of this email is to ask about translating RMVXA's RGSS3 scripts. Is it alright

> to translate your scripts into English? Of course, you will be credited. I will not claim

> to have written any of your scripts.

>

> My aim is to translate scripts I find interesting and to share them with the rest of the

> English speaking community, namely at these sites:

>

> http://www.rpgmakervxace.net

> http://forums.rpgmakerweb.com

>

> These sites are the largest English RMVXA communities.

>

> I will await your reply patiently.

>

> From kirinelf (Kirin)

So what does this script do? Well, the Legend of Heroes (Eiyuu no Kiseki) series is a very popular RPG series in Japan. This battle system mimics the RPG part of the system, being unable to fully contain the awesome of the sRPG elements of the original system (At least, that's what I like to believe). I won't link to my normal screenshots since it's hard to find the right parts to screenie, and it's 2:40am and I can't be bothered trying. Instead, here's a video:

Features

  • An order bar showing the order battlers will act in.
  • Able to specify delay and charge times for skills; have a long charge time but 0 delay, or a powerful skill that you can use immediately but has an insane delay, stuff like that.
  • Charges can also be used to have skills that place a state on certain people, so a little bit of creativity can go a long way.
  • Allows you to be able to interrupt skills that're being charged.
  • You can also deny the ability to interrupt skills with a simple tag.
  • States can have tags too!
  • Edit unit spacing and location along with the location of the entire order bar for a bit customization.
  • Subscripts allow you to have an escape command in battle, modify window appearances and have bonuses.

There really are quite a few features and setting up shenanigans that you need to be aware of, and for that reason I've included a How to Use text file I wrote up myself after experimenting with the demo that I hope will help you guys.

There are six scripts: A main script that handles the bulk of the processing, another main script that handles turn order, a third main script that handles design and aesthetics, and three sub scripts. The first sub script allows you to have an escape command. The second subscript modifies the windows a bit for more aesthetical changes. The third is a bonus script that's a little different: See below for details.

Without further ado, here're the scripts:

1. Main script #1: Main Battle System

2. Main script #2: Order Manager

3. Main script #3: Display Configuration

4. Sub script #1: Escape Command

5. Sub script #2: Window Modification

6. Sub script #3: Rokan's AT Bonus

Now, this is an interesting beast. This script is not by Saba Kan, but by Rokan. Here are his T&Cs in a spoiler, to prove that I'm allowed to do this:

Terms and Conditions on his site:

  • RGSS2: You must be a registered user of RPG Maker VX.
  • RGSS3: You must be a registered user of RPG Maker VX Ace.
  • Photos: Feel free to use as you please.
  • Modifications are allowed freely.
  • Redistribution of original materials is forbidden; allowed after modification.
  • I am not responsible for any damage or ill events that arise from using my materials.
  • Please backup your work before use.
  • Please read through all the instructions.
  • Free for commercial use.
  • Credits and reporting usages are not necessary.
  • No requests accepted.
  • All support and/or bug reports are to be done in public on my site.
  • Please use common sense.

Linkback:

att4iv.jpg

回想領域 - Kaisou-Ryouiki

Reflection Domain

Webmaster: Rokan

The script also requires a few images that need to be placed in the Graphics/System folder. This is a link to the images required for the script to run: [Link] I have also attached them to this post for easy access.

The demo can be found here: [Link] This is quite a simple script IF you know what you're doing, which takes a bit of playing around. So I've included a demo to save you the trouble of accidentally ruining your current project or having to start a new project just for this. Aren't I kind?

For those of you who can't be bothered downloading the demo, I'm including a copy of the documentation here.

How to Use

Place the three scripts in the order I've numbered them above Main and under Materials.

1 - This is a main script. It contains the bulk of the actual data involving the calculations, notetag readings, battler speeds and so on.

2 - This is a main script. It handles turn order.

3 - This is a main script. It's the eye candy script; modifies the positioning and spacing of the order bar as well as the information text that shows up.

4 - This is a sub script. It adds an escape command into the system.

5 - This is a sub script. It adjusts the window sizes of the battlelogs, help windows and so on to optimize space.

6 - This is a sub script made by a different scripter. It unlocks the trademark AT Bonuses of the system, allowing different bonuses to activate on different turns.

Place the images in the System folder into your Graphics/System folder.

(The images that start with AT_BONUS_ are needed only for sub script 6, Rokan's Ao no Kiseki Style AT Bonus script)

The setup is easy in theory. The only possibly confusing thing is if you're not too good at maths, since you can use various Ruby syntax and formulas for anything that has a number value. Here's how things work.

Note: I'll be referring to 'turns' and 'units' here. Each action uses up a turn, and each slot on the order bar is a unit. Fundamentally, they're the same, but whenever I refer to a unit, I mean the slots in the order bar and their order. Turns are overarching throughout the battle.

*******

Speed

*******

The core of an ATB is speed. It determines how often you can act, and is based on agility. This is how your speed is calculated (It's a little complicated) in the script:

battlers = $game_party.battle_members + $game_troop.members # Gets information of all the members in the battle.

total = 0.0 # (1)

for battler in battlers

total += battler.agi # (2)

end

mean = total / battlers.size # (3)

standard_deviation = 0.0 # (5)

for battler in battlers

standard_deviation += (battler.agi - mean) * (battler.agi - mean) # (5)

end

standard_deviation /= battlers.size # (6)

standard_deviation = Math.sqrt(standard_deviation) # (7)

for battler in battlers

if standard_deviation != 0

battler.spd = ((battler.agi - mean) / standard_deviation) * 10 # (8)

else

battler.spd = 0 # (9)

end

battler.spd *= (SPEED_INFLUENCE / 100.0) # (10)

battler.spd += 50 # (11)

1) First, we zero the total just to make sure there's no leftover data.

2) We then total up all the agility values of the battlers.

3) Said total is divided by the number of battlers to get the average agility value of all battlers.

4) We zero the std dev for the same reasons as in (1).

5) This is where things get a little complicated. Basically, it takes each individual battler's agility, subtracts the average agility of all battlers from it, squares the remainder, then adds all the results of the individual battlers together. That's your new std dev.

6) Back to simple stuff. Divide the new std dev by the number of battlers.

7) Simple square root of the calculation in (6).

8) If the new std dev isn't 0, we take the battler's agility and subtract the mean, then divide it by the std dev and multiply by 10.

9) If it's 0, then meh. It's 0.

10) This is where an option in the configuration block appears. SPEED_INFLUENCE defaults to 100 (So there's no change), but if it's 150, for example, you multiply the result by 1.5.

11) Finally, just in case you have a speed of 0, we chuck a free 50 on for you. Because we're kind.

This SHOULD mean that the minimum speed for any battler is 50, but if Debug is enabled, in the sample demo, the slimes and bat have speeds of under 0 (41 and 45 respectively). I'm not quite sure why this is. But meh, at least now you know how it's calculated.

Yes, I DID open an Excel file and go through all the calculations to see if I've got everything right. I have. >_>

For those of you not so inclined to go messing around in scripts, here's what the sample demo characters have:

Eric: Agi: 15 Speed: 50

Natalie: Agi: 28 Speed: 71

Terence: Agi: 15 Speed: 50

Slimes: Agi: 12 Speed: 41

Bat: Agi: 14 Speed: 45

Play around with them to get a good balanced battle speed.

*******

Delay (Skills, Items, States)

*******

This is pretty much the most important thing about this CBS (Aside from speed). As with most types of battle systems, doing certain actions have a certain delay before the actor can act again. Take for instance Final Fantasy X. You can visually see how your actions affect when you can next act. Using a normal attack for instance usually has a shorter delay, while using more powerful skills take longer before you can act again. Of course, speed is also taken into account, but eh. Details. This is where it all comes together.

The formula given for the default delay in the demo is this: < [(90 - a.spd) / 2, 5].max > What this means is that the default delay for a normal attack is < 90 - the speed of the attacker, then halved > or 5, whichever is higher. This means that the lowest your delay can ever go is 5. In the sample demo, for example, Eric and Terence have a normal attack delay of 20.

To assign a delay to a skill, simply place <delay> n in the notebox of a skill, where n is the formula/value of the delay. For example, the above default delay is located in the notebox of Skill #1: Attack as:

<delay> [(90 - a.spd) / 2, 5].max

Note that this tag can be used in states as well, in which case when the state is applied to a character, ALL of that character's skills take on the delay value placed in there. For example, having a state with <delay> 0 will cause that state to make any action the character does have no delay, essentially being able to act multiple times in succession (Unless skills with <charge> in them are used, see below).

Finally, this tag can also be used in Item noteboxes.

*******

Charge (Skills, Items, States)

*******

This battle system allows you to have skills that take time to charge. You can call it charging or channeling, really, it's the same in concept. Upon using a skill, the user gets knocked back a certain number of units on the order bar and a symbol pops up on their unit. When it's their turn again, they unleash the skill they've been charging. It's that simple. The notetag itself is about as simple. It's <charge> n, where 'n' is the number of units it takes for the user to charge up or finish channeling the skill. This does NOT take into account stuff like delays and hastes, so a skilled player can prevent enemy skills from executing by simply delaying the enemy and speeding up their party, squeezing in enough turns for their party to take out the enemy before they can execute their skill. As an example, a spell that takes 5 units to cast (5 turns assuming no delay/haste shenanigans are going on) will have the following notetag:

<charge> 5

This is the main reason I distinguish between units and turns. <charge> 5 makes the skill charge for 5 units, BUT it might take 10 turns before the actor can actually unleash the skill.

Nice and simple, no? What's NOT so simple is the array of options available for a simple <charge> n notetag. Well, it's still simple in theory, but meh. Basically, there are three options that can be placed in a notebox that has the <charge> n tag. These are:

<chargemsg> n ('n' is a string that pops up in the message log when the character begins charging the skill. Use %s to denote the actor's name.)

<state> n ('n' is the ID of the state that will be placed on the actor while charging the skill. For example, <state> 2 will poison the actor while charging.)

<statescope> n ('n' can be either 'allallies' or 'allenemies', or both by using <statescope> n n. This is used in conjunction with <state> to affect all allies, all enemies, or both.)

All three are optional.

What can they be used for? Many things. For example, you could have something like a heroic song that increases the offensive power of your entire team while it's being sung (charged). Using this example, here're the notetags:

<charge> 10 # The effect lasts for 10 turns, which is how long it takes to finish singing the song.

<chargemsg> %s starts singing a song of valor and honor! # This is the message that appears when the song starts.

<state> 21 # This is the ID of a state that increases ATK and MATK. It's not necessary to set up Removal Conditions, since it's removed when the song is done.

<statescope> allallies # This causes the effect to hit all allies, but no enemies.

Finally, under 'Using Messages' in the skill tab, I'll have:

(User Name)'s song ends! # This message appears after the charge time is over and the skill is used, but since the skill's usage is technically the charging bit, this is now the skill ending message.

And there you have it, a nice song that increases the offense of your party throughout its duration. You can use this to have bards in your game, for example. There is a sample skill called Silence Song in the demo that uses the same concept, in case you want to see it firsthand.

You can also place formulas in there. So mages with high MAT can channel spells faster than those with low MAT, for instance, with a formula like this:

<charge> [100-a.mat, 0].max

The above formula means that someone with 50 MAT will take 50 turns to channel the spell, while a mage with 80 will take 20 turns. It also has a maximum checker that will make the charge cost 0 turns if the number goes into the negatives.

It should also be noted that, like the <delay> tag, the <charge> tag can also be used within states. Having <charge> 0 in a state will cause anyone in that state to charge/channel any skill/spell instantly, which is good for Limit Breaks/Overdrives or a powerful late game skill.

*******

Cancel/Interruption (Skills, Items, Weapons)

*******

So you've got an enemy charging up a powerful skill. How do you stop it, aside from outright killing the git before it unleashes? By cancelling/interrupting it, of course. For the sake of consistency, I'll stick with interrupt since it sounds better. Cancel is used in the notetags though, since I thought it fit better (And it's easier to type. >_>). Usage of this tag is very, very simple. As in, there's no configuration for general use. Here's the tag:

<cancel>

That's it. Place that in a skill or weapon and that skill or weapon can now cancel enemy attacks. Nifty~

Say what? You want that boss to have a skill that cannot be cancelled? Well you sure ask a lot. Eh. Here're two optional tags that can be used:

<nocancel> (Place this in a skill notebox and it will be impossible to cancel that skill short of killing the bugger.)

<cancelrate> n ('n' is the percentage rate that the cancel is successful. For example, setting this to 50 means that the skill has a 50% chance of cancelling a skill that's being charged. This tag must be used in conjunction with <cancel>.)

*******

Slow (Skills, Items, Weapons, States)

*******

When you're dealing with stuff like speed and turn order, it's always fun to be able to speed up your allies and slow down your enemies. That's where the <slow> tag comes in. The usage is exactly the same as with the <charge> tag, except it works in Weapon noteboxes as well. Simply place an integer or a formula after the tag to be able to slow down the target of your spell by that number of units. For example:

<slow> 2

will slow down the target by 2 units, while

<slow> rand(3) + 1

will slow the target by 1-3 turns [rand(3) picks a random value between 0 and 2, since Ruby starts counting from 0].

Negative numbers will speed up the target, so

<slow> -1

will speed up the target by 1 unit.

Now, there are two optional notetags that can be used for this. They are:

<slowrate> n ('n' is the percentage rate that the slow is successful. For example, setting this to 50 means that the skill has a 50% chance of slowing an enemy. This tag must be used in conjunction with <slow> n.)

<noslow> (Placing this tag in an actor or enemy notebox will make that actor/enemy immune to the effects of slowing. This works for both positive and negative effects, so you can't speed 'em up either.)

*******

Graphics

*******

This is just a small side section on graphical usage within the script. The script uses the actor's sprite in the order bar to show which actor's in which unit. You can also specify a default monster graphic for when you don't specify one in lines 65 and 68 in the first main script. But having all those different mosters share the same icon is kinda... boring, no? Well, you can specify enemy sprites to use in the order bar with a simple line. Here it is (Note that it doesn't have the brackets that the other notetags do): GRAPHIC n x, where 'n' is the name of the filename with the monster graphic (Located in Graphics\Characters), and 'x' is the index of the monster. Refer to the following grid to see which area of the image corresponds to which index:

0 1 2 3

4 5 6 7

As an example and as can be seen in the demo, let's assign a custom icon to the slime. Here's the tag:

GRAPHIC Monster2 2

The slime's graphic can be found in the image file Monster2.png located inside the Graphics\Characters folder, and it's the third monster in the top row, which is an index number of 2.

*******

AT Bonus (by Rokan)

*******

The is a bonus script by Rokan of Kaisou-Ryouiki, whose terms and conditions allow me to post this after translating it (modifying it). The other two sub scripts and the three main scripts are all by Saba Kan of PetitRare, so this is a nice example of a scripter scripting a very nice add-on to a battle system created by another scripter.

The AT Bonus is a trademark symbol of the Eiyuu no Kiseki (Legend of Heroes) battle system. Basically, units on the order bar are randomly assigned a bonus that can range from healing to certain criticals and more, and when the unit reaches the top, whoever's turn it is gets that bonus. This is the second main reason I distinguish between units and turns. AT Bonuses do not move around the order bar; they are fixed to their unit and slowly move towards the top, upon which they grant their bonus.

This is the list of AT Bonuses available within the script:

Recover 10% HP at start of turn.

--------------------------------------------------------------------

Recover 50% HP at start of turn.

--------------------------------------------------------------------

Recover 10% MP at start of turn.

--------------------------------------------------------------------

Recover 50% MP at start of turn.

--------------------------------------------------------------------

Recover 10% TP at start of turn.

--------------------------------------------------------------------

Recover 50% TP at start of turn.

--------------------------------------------------------------------

Critical (All damage/healing effectiveness is multipled by 1.5)

--------------------------------------------------------------------

Perfect Guard (Cannot be damaged, Cannot be healed, No Cancel, State Immunity, No Slow)

--------------------------------------------------------------------

Rush (Act twice in a row)

Sadly, these bonuses are hard coded within the script, and are thus are unchangeable to those without sufficient knowledge of RGSS3. What IS changeable though are the rates at which these bonuses activate. This is defined in the configuration block at the top of the script in a hash array. There is also a variable assignment at line 55: This lets you change the Bonus rates mid-game. Here is an example array from the demo:

0 => [100, 5, 3, 5, 3, 5, 3, 2, 2, 2],

In order, the array goes like this:

<Variable Number from line 55> => [<Chance of nothing happening>, <Chance of 10% HP Recovery>, <Chance of 50% HP Recovery>, <Chance of 10% MP Recovery>, <Chance of 50% MP Recovery>, <Chance of 10% TP Recovery>, <Chance of 50% TP Recovery>, <Chance of Critical>, <Chance of Perfect Guard>, <Chance of Rush>],

Now, the chances are NOT percentages. To get the actual percentage chance of something happening, this is what you do: (Rate)/(Total Rate)*100 = Actual Rate. This means that:

Actual Rate of Nothing Happening = 100/(100+5+3+5+3+5+3+2+2+2)*100 = 100/130 * 100 = 0.77 * 100 = 77%

So with the example given, there's a roughly 77% chance of there being no bonuses, about 4% chances of there being 10% heals and 3% chances of 50% heals of HP, MP and TP, and about 1.5% chances of Critical, Perfect Guard and Rush when the Variable defined in line 55 (Default: 10) is 0 (Default).

Feel free to play around with the hash, have higher rates of getting Critical and a near impossible chance of getting Rush, eliminate Perfect Guard completely, or whatever you feel like. Those of you who fancy yourself scripters can try and modify the default settings, maybe make it so you can define more bounuses or something? xD The sky's the limit (If you know what to do)!

*******

End

*******

And that should be that! Think I've covered everything. It's not really all that hard. If there're any questions, feel free to pop me a line. I'm not a scripter though, so don't expect too much on that note, but I might be able to help you out with debugging and figuring out what's going on.

Kirin, out.

FAQ

Q: Where do I put these scripts?

A: Above Main, under Materials. You really only need the main scripts; the other three are just bonuses.

Q: How do I use this script?

A: Read the 'How to Use.txt' file included in the demo, or refer to the same section in my post above.

Q: Help! I'm getting an 'Unable to find file: Graphics/System/<Insert filename here>' error!

A: The hint is in the error. Download the images from either this link or from the attachment and place them in the proper folder.

Credit and Thanks

- Saba Kan, for making this script.

- Rokan, for making the AT Bonus script.

- Kirin (me), for translating this.

- Enterbrain, for once again making an awesome maker.

- Google Translate, for helping me with minor translations.

- The makers of the Rikai-chan addon for Mozilla and the Rikai-kun extension for Chrome, for giving us an awesome Japanese translator.

Ao no Kiseki CBS.zip


Viewing all articles
Browse latest Browse all 416

Trending Articles