[XP]Enhancing the Default Battle System

Started by Wraith89, November 17, 2014, 04:54:18 pm

Previous topic - Next topic

Wraith89

November 17, 2014, 04:54:18 pm Last Edit: November 24, 2014, 05:17:54 pm by Wraith89
I should have seen it coming but there is a space limit preventing me from posting more in this post. Ha ha.


Enhancing the Default Battle System in RMXP



Introduction

I think I've done enough lurking around to see how this works, so I thought I would give it a shot and write things I have tried for projects I have made.

I wrote this draft in Notepad before posting this up, just because I wanted to.

A lot of people using RMXP criticise the default battle system for being rather boring or linear, and most of the time, it ends up with many people switching to a different battle system. I do understand the sentiment, but when making a classic turn based RPG, the default system is not always bad. In fact, I tend to use it for the most part, but I do agree that in many ways it is lacking and very limited in functions. In this little tutorial I am writing I will share some of my ideas and what I did to change some mechanics and other ways of perhaps balancing the game (it is still a work in progress!!). If you are looking for an action battle system, you are probably best off with Blizzard's Action Battle System right here in this forums.

I hope I can inspire some neat ideas that you can try to make your battle systems more fun and more varied, somewhat. I myself have not gone through everything just yet, though, but I do plan on implementing new systems eventually.

Some Precautions


  • ALWAYS BACK UP YOUR WORK. Save your files, and whenever you can, copy and paste everything from your Data folder in your project into another directory. There are times you can have big problems when RMXP decides to corrupt itself and say "Unable to load xxxxx.data", which is bad. I had that happen a couple of times when the editor decided to crash on itself for me, so it is usually the best course of action to back up the important parts.

  • If you want to test out a script before implementing it into your main project, make a new project and test it out before doing anything. When implementing into your main project, check to see if there are compatibility issues or not. Those always caused me headaches, but after extensive testing I usually found a way around.

  • Saving some scripts you may use into a notepad file may be helpful. I would do that so you can come back and copy/paste whenever you wish.

  • PLAYTEST PLAYTEST PLAYTEST. Playtesting is very useful, and very helpful. Click on that green triangle button at the top. Click it, learn it, love it. There is a huge difference between a game that has been playtested thoroughly and ones that has not. If you are meticulous enough, you may log any errors or so in some text file and such, or go right ahead and fix it. Do note that when you Test Battle, any changes you made to a script has to be SAVED before battle testing, otherwise the changes will not apply.

  • A lot of this will be time consuming, so when making your project, you will have to do some extensive planning and such before diving into the task. Once you do get into the task it will seem overwhelming, especially if you are doing this alone for hobby purposes like me. Do other things if you are not up to the task for the meantime, or open up multiple projects, toy around with other things, and try to have fun. Do not do things that you do not want to do: you should not force yourself to do so.

  • I want cookies.




Useful Scripts







The Default Damage Formula Explained

This only applies if you have not touched anything that may or may not change around the battle formula.

Although you can pretty much decipher what each stats do if you toy around with the default scripts a bit (Game_Battler 3 mostly) or read the Help file, sometimes it may be a bit difficult to understand. A tutorial made by Crystalgate on Rpgmaker.net seems to shed some light into this, but I will start explaining some things in a simplified manner and discuss some limitations with it.

The damage formula for basic attacking is:
Damage = (Attacker's ATK - [Target's PDEF / 2]) * (20 + Attacker's STR) / 20


For skills, the damage formula is:

Damage = (Skill Power + [Attacker's ATK * Skill ATK-F/100] - [Target's PDEF * Skill PDEF-F/200] - [Target's MDEF * Skill MDEF-F/200]) * (20 + [Attacker's STR * Skill STR-F/100] + [Attacker's DEX * Skill DEX-F/100] + [Attacker's AGI * Skill AGI-F/100] + [Attacker's INT * Skill INT-F/100]) / 20


You can find these mostly in Game_Battler 3 script.

Those STR-F, MDEF-F, etc are all factor things that can be modified in the skills section of your database.

ATK: This is the base attack part of the basic damage formula. This part is usually acquired when you are equipped with a weapon: if you do not have a weapon, you will never be able to damage your opponent (without external scripting that is). That is how it is.

PDEF: It is exactly what it sounds like and this is your physical defence, affecting how well a character takes physical attacks. Physical attacks are just normal attack commands or skills that have an ATK-F factor. A PDEF equal to an ATK will reduce half the damage taken, while having twice the PDEF will completely negate physical damage.

MDEF: Magic Defence for sort: this will reduce the damage taken by spells. Spells are defined as skills that have a MDEF-F greater than 0. Like P-Def, M-Def with equal value as Skill Power will reduce the damage to half, twice will completely negate.

EVA: This is the evasion probability value, which means how likely your character is to dodge specific attacks. Skills with EVA-F higher than 0 will take this into account, but EVA-F of 0 means the skill will completely ignore the evasion factor. BE CAREFUL when you touch the EVA of a monster or your character. Raising the EVA stat even minimally can potentially be game breaking and very frustrating (unless said monster is supposed to be a dodge machine). I would be more moderate and try something like 1-10, but even 10 might be stretching it. An EVA of 100 means the character will evade ANYTHING that doesn't have an EVA-F equal to 0. This is a static stat: it does not scale like anything else. The target's agility and the attacker's dexterity also plays a factor in the evasion (8 times the target's agility divided by the attacker's dexterity added to the raw EVA stat), but the effect is usually minimal. The raw EVA stat is usually the big factor here.

eva = 8 * Target's AGI / Attacker's DEX + Target's EVA


STR: This is the stat that affects how much physical damage one may inflict. Remember it will not work without a weapon. However RMXP seems to be completely random and add a 20 to your base Strength when calculating damage. Kind of strange, especially when you are making a game where stats are actually quite low. So if your character has a strength of 50, it will basically count as a strength of 70. We will write about how to change things later.

DEX: This is the stat that should affect the accuracy of your standard attacks and skills with an EVA-F greater than 0. As you can see, the eva code at the top shows you where it takes effect. It also has an effect on critical hit for your standard attack. The probability is:

(4 * Attacker's DEX / Target's AGI)%


However, Dexterity seems to be not too useful as a stat in general. As written above, the EVA stat is usually the one with the most effect in determining whether you dodge or not. I will try to state some workarounds for this later to make DEX a more relevant stat.

AGI: This is the stat that affects a character's speed and chance to evade, though once again, the raw Eva stat does more for this. Agility has a small effect of negating critical hits as written in the dexterity section, but again, the effect is minimal. They should have made a luck stat or something for that. It also determines the turn order in the battle, so the higher agility stat should go first, right? Well, it should, except the turn order code that is found in Game_Battler 1 is:

A random number from 0 to (10 + AGI/4)-1


Yes, RMXP is full of funny arbitrary numbers that mess things up. Basically if you are running a low stat game, that extra 10 added will make everything so random you start wondering if your Agility is even relevant at all. An Agility stat of 4 or 5 will hardly make a difference with each other. We will get into some workarounds later.

Escape chance formula is:
(50 * average character AGI / average enemy AGI)%


INT: Intelligence is basically what makes a person smart. I think. What was it again? Oh right... this is the stat that influences the power of a magic skill, that is, if you made sure the skill's INT-F is higher than 1 (set it to 100 for standard magic attacks). There is a basic flaw to this system as in those old school RPGs where eventually the magic skills will start paleing in damage compared to physical attacks, even if said skill had an elemental advantage against the foe. This is because physical attack skills can be raised with the power of weapons, but magic attacks usually do not get influenced by attack power of weapons. In fact, giving your magician higher power wand/staves seems useless because all it does is raise a stat that they would never use! This fundamental flaw also requires you to make tiered skills (which means first Fire skill is made to do some set damage, while there is a second Fire skill you get later that is stronger and renders Fire useless, leaving you with a LOT of useless skills later). You can try to do a workaround by adding INT boost to higher level staves, but it is not exactly as practical as the attack level raising for physical characters. We will discuss what we can do with this stat later.

So basically, if you are using the default formula and have no plans on modifying it, using small stats would not really work out the way it should because the default formula likes to add random numbers to your static stat, usually not making sense. So let us see what we can do to make things a bit better...





Modifications / Extra Things
  • Achtung!: This part will require some fiddling with the script editor, so if you are unsure, try this in a new project or back up your project before doing this. Some wrong turns can cause a phenomenon where multiple people will suddenly chuck their computers out their window for no good apparent reason.

  • This will be a long section and the meat of this tutorial, so pay attention. These are merely suggestions and you do not have to follow it this way if you disagree with anything. It is your game so you can do whatever you want, as long as the script editor agrees. Ha ha.

  • I would recommend grabbing some other scripts too, such as Blizzard's Tons of Addons here. When using this, make sure you configure the script and turn on whichever functions you want implemented to your game. They are found in all parts above with blahblahblah = false. Turn it to true and it will work. Remember that or else you will be wondering why nothing is actually working.

  • If you are having trouble with script order, this topic should help.

  • Do NOT grab this, however. Apparently, the SDK police will get to you first if you do... whatever that means. *shrugs*





Changing the Battle Aesthetics

Spoiler: ShowHide


Font is a little bit too big is it not?


The default Arial Black looks ugly, does it not? Some people think so, others do not. It is entirely preferences. You can try to change things around by editing the Windowskins to your liking, or with scripts such as Custom Damage Font most likely by Cogwheel or ThallionDarkshine's Cool Damage script to change the appearance of the default battle.

What I did: I used the Custom Damage Font and spammed the font 'Papyrus' all over just because I thought it fit the theme of my game well.

Spoiler: ShowHide

Icons always look better than [Poisoned] or whatever normally shows.


Also, you may want to use icons as status effects intead of the default. While Tons of Addons has that feature, it never seemed to work, even when I lowercased everything and put a "States" folder inside the Icons folder... maybe there is something wrong with my computer finding directories. Whatever. So if you have the same problem, try this rewrite by Falcon, original script by Ccoa.

Spoiler: ShowHide
# Status Effects as Icons
# Original Script by Ccoa
# Since Falcon didn't have 1337 search skills, he rewrote this
class Window_Base
 #--------------------------------------------------------------------------
 # * Draw State
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     width : draw spot width
 #--------------------------------------------------------------------------
 def draw_actor_state(actor, x, y, width = 120)
   for i in 0...actor.states.length
     if i < 5
       ix = 24 * i
       bitmap = RPG::Cache.icon($data_states[actor.states[i]].name + ".png" )
       self.contents.blt(ix+x, y, bitmap, Rect.new(0, 0, 24, 24))
     end
   end
 end
end


Just put icons (24x24 pictures) inside the icons folder with the names of the state in your database in PNG format. For example, "Venom" state would be venom.png in your folder. It displays 5 icons at a time apparently, and it doesn't seem to work for enemies, as it seems to only draw actor states. If Blizzard's script works for you, just go ahead and use that. Somehow, I am having problems with it even in a blank project.

There is also this that will make the options in the default battle seem more appealing by adding an icon adjacent to each choices. I have not tested this yet, but I plan on implementing it eventually.

Lastly, if you are not too fond of the RTP default, there are other sites out there that generally has other alternative set of sprites.

This thread has a link to many resources.

A lot of people do use Naramura's sprites, I use Etolier as the terms of use are quite lenient, the characters are very cute, and the graphics are relatively easily modified compared to the very detailed resources out there. That is just my preference, I am sure you can find other versions that may suit you more or have artists make some for you. I could definitely draw on non-digital medium though, unfortunately, so I could not help you with making your graphics, sorry :(

It is crucial you give credit to whoever actually produced the resources for you. Always read their terms of service and see if they conflict with your other resources or not. Credits should be given when credits are due.

Changing Turn Order Formula

So like I said, we will find some ways of changing around the damage formula so the game can work as you intend to. First of all, that turn based thing that is completely randomised because of that extra 10 should be fixed.

Go into your script editor by doing what I do here.

Spoiler: ShowHide

Pressing F11 will also suffice


Then go to Game_Battler 1 and jump to line 263.

Spoiler: ShowHide


If you see the code, it should read:
@current_action.speed = agi + rand(10 + agi / 4)


You can instead change that into:
@current_action.speed = agi


This will help make turn orders make more sense as it will be solely based on the user's Agility stat rather than Agility stat + gobbledy gook. You can try something like "agi + rand(1)" if you want the agility stat plus a random number between 0-1 to determine turn order, or some other number if you are using bigger stats.

I want a priority attack!

A priority attack is an attack that goes first regardless of the user's agility stat. When two priority moves from both sides are executed, the user with the higher agility stat will go first. Think Quick Attack and clones from Pokemon, if you will. For this, we will have to grab gameus's First Strike Skills code.

To install it, go to your script editor, click on Main, and go push the Insert button so you can insert a new script. Most custom scripts will usually go BELOW the default RMXP scripts and above MAIN. MAIN should almost ALWAYS be at the bottom, if not always.

Spoiler: ShowHide


After that, paste the code inside the blank section and within the Config section, insert the IDs of skills that will go before ordinary skills.

Spoiler: ShowHide


In this example, skills 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 will be the priority attacks.

Seems though Gameus made a mistake someplace and said to remove the following lines from the script:

    if $game_system.attack_always == false
     if $game_party.attacked
       return
     end
   end




What about Gale Wings?

What, so you can spam Brave Bird all over? I suppose this kind of thing will add some new dimension to your game I guess. Well, Gameguy seemed to have made a script that is similar to the effects of giving priority to all moves, but not just to a specific element. It is called First Strike States, which you can grab from here. Paste this code anywhere below the default scripts (Scene_Debug) and above Main. I guess where First Strike Skills and First Strike States go in their order should not matter. Basically, this is just like the first strike skills, except it gives you a state where your normal attacks will act like first strike skills.

The instructions are in the script, but to do this, create a state that you want for this by entering into your database and into the states tab.

Spoiler: ShowHide

After expanding your maximum stats, go ahead and add a new state that represents your new first strike state.
Make sure to check NONRESISTANCE as with any other buff states in general.


After that go into your script editor and change the state ID into whatever is your new First Strike state.

Spoiler: ShowHide


One thing I noticed is First Strike State attacks precedes priority from First Strike Skills though. I have no idea how to make it so they would be equal, because I am not a scripter. I just toy around with them to find a desired effect.

What I did

I made a stat called "Wings", which gives the user the ability to fly... or it was supposed to but I could not find a way to implement that mechanic, so I made it a first strike state instead. This is prominent on characters with wings, and will disappear in 5 turns. Also, a bow and arrow attack can instantly remove the wings status from an enemy because I figured bows are effective against avian creatures.

Spoiler: ShowHide

The Garuda is casting wings buff here


In this state, the Garuda will always strike first... not like he was not fast to begin with anyways...

For first strike skills, I made different variations of Quick Attack like skills, usually involving swords or knives, because I don't see axe or spear skills being capable of that. That is just me.



How do I provoke an enemy to attack a certain character instead of targetting somebody randomly?


There are actual skills for that made in different RPGs. RMVXAce has a default skill for Paladin called Provoke which does just this. However, we can also do that in RMXP with another script. Once again, made by Gameus, it is called Taunt states. Like we did for First Strike States, create a new state, make it nonresistance, set a skill that targets self with Taunt. The configuration is actually quite easy to use. Set it so state => probability. Setting it to 500 like me is ridiculous as it basically means Taunt is nearly guaranteed to hit. Likewise, setting it to a negative value repels opponents from hitting a specific character, which may be useful for fragile characters. It influences the chance of attacking a certain target, so I have this type of skill on Cyrus, since he is the big bulky character that can take multiple hits, proving to be very useful.

I would recommend making the skill that triggers Taunt to be a First Strike skill: usually the big guys are much too fat and slow to move first, so redirecting quickly may be useful. However, I'm uncertain if the attack direction is calculated before the turn even starts or during the battle, so it may just be useless after all. In either case I did it just to give the illusion that it works first.

Spoiler: ShowHide

Copy and paste the taunt script into the script editor. Configure according to the directions.


Create the taunt state first because you need to define what ID the taunt state is obviously. Make sure it is set to nonresistance! The bottom part should release after battle, and make it last for a certain amount of turns or else the enemy will continue to attack your taunt guy forever. I set it at 3, you can do whatever you want. Always update the Knockout status as well to REMOVE any other state that was made, including this one.


When making the taunt state make sure it targets self, only use in battle, and set the change state to + Taunt.




Weapon Damage Formula Modifier

Note: This section will deal HEAVILY on Game_Battler 3 and modifying it, so what I would suggest is rather than editing the default Game_Battler 3 script, copy it and paste it right above Main and below anything else you have (but above Blizzard's scripts) so we can have a go on this. From what I understand, the Game_Battler 3 copy we have on the bottom will overwrite the default version and if things go wrong you can always delete the copy and try again. This is why you see so many scripts that edit the Game_Battler class to polish things up. Back up your project: this can get messy if you keep forgetting to wrap up "if" statements with the proper amount of "end"s. Copy and paste scripts into Notepads if you want to do this.

Spoiler: ShowHide




Some useful scripts that I had to rip off from:

Xelias's Passive Augments

Xelias's Alternative Attack Algorithms

If you look at these scripts they all modify a lot of the methods used in Game_Battler 3.

It seems PhoenixFire did her own modifications here based off Xelias's script. This is pretty much how we are going to do this.

I merged a couple of Game_Battler 3 rewrites (both Xelias's scripts up there and gerrtunk's skill state effectiveness, which I do not exactly comprehend much) and trying to work off of it as well to get a combined effectiveness out of it. So far it works, but there are many bugs so far.

Do note that many other scripts may cause incompatibilities with the rewrites of Game_Battler 3, so keep an eye out on that.


Doing something about that Magic/Physical Damage System

We discussed about what the problem with magic is, as it requires to be tiered and can only achieve so much damage while physical attacks can go up to no end. There is much work to do, so what exactly can we do to workaround this?

One good thing here is you can use Ryex's Weapon Unleash Skills script to workaround this entirely and make it so staves automatically or have a chance to cast a spell by simply attacking, but this is not the only solution here, as you do nothing to modify the way spells work.

Another thing we can do is have the spells like Fire and Lightning ACTUALLY take effect of the Atk-F stat so it can work just like your other techniques. That's right, we are going to do that so that bigger and better staves are not just fancy things to have while you level. I mean, who is going to use physical attack with a staff anyways? Attack-F should have an effect on mages too, you know.

Spoiler: ShowHide

Delas fire damage? This maker is full of typos... oh well. The red is what you want to change, the green is if you want accuracy to play a factor with spells, otherwise leave it at zero.


Like this, except with the EVA-F, be careful of that. If you want magic skills to take the regular evasion formula into effect, set that to 100. Otherwise, if you want it to always hit anyhow, set that to 0.

This way, your magic damage will correlate to the attack power of your wands/staves so that your wands/staves can actually have an effect other than being ornamental weapons that adds a couple of INT points. You will have to adjust your skill base powers and enemy's MDEF accordingly, however, to match the balance of the game so that magic is not too overpowered.

However, this comes with a flaw: primarily the magic damage was determined if the Atk-F was 0, but now that is no longer the case, and states like Silence would pretty much be useless now, right?

Open up your Game_Battler 3 and go into around line 23.

Spoiler: ShowHide


Instead of doing this:
 if $data_skills[skill_id].atk_f == 0 and self.restriction == 1


Replace that atk_f == 0 with:

if $data_skills[skill_id].int_f >= 1 and self.restriction == 1


This makes it so silence will affect skills that have an Int-F of equal or greater to 1 to be the types that get sealed.


If you made it so healing skills get affected by Attack-F too go to around Line 119 of that and change the following from

Spoiler: ShowHide


if skill.atk_f > 0


into this:

if skill.atk_f > 0 && skill.power > 0


This is to ensure healing always hits: do this while Gloria or your cleric is blinded without the modification healing can miss! Of course make sure your healing skills have an Eva-F of 0 and a skill power with a negative value.

This does, however, come with some bug that I have yet to fix. If I silence an enemy with magic powers, somehow it will still use magic skills without stating that it did so and my party silently gets strange status effects like randomly falling asleep and such. I would like to find a fix for this, and I tried a workaround such as making a battle page "If enemy is silenced, force attack", but apparently battle pages do not allow conditional branches with if conditions for status effects. I think Heretic's script for Battle Conditions should remedy this, but I still do not know how to work it right. I will try sometime later.

Hey, why stop there when we can do something else like adding the ability for spells to do critical hits? You can go around Line 146 in Game_Battler 3 where it says:

Spoiler: ShowHide


if self.damage > 0


Which means if the skill's damage is greater than zero (in short: damaging spell/skill)... we can add this right below it and right above the Guard Correction formula as so...

  if rand(100) < 4 * user.dex / self.agi
           self.damage *= 2
           self.critical = true
         end



This is the same critical formula found in the regular attack part of the script. You can modify it so instead of the 4 times user's Dexterity divided by Target's Agility formula and the critical damage being 2x into something else if you wish to.

Overall, this here makes it so magic and physical attacks are somewhat on a level field and that one is useful for enemies with lower physical defence and the other is useful for enemies with lower magical defence. This is how I do it anyways. If you have any other ideas, go ahead and post it here.


Strength is so one dimensional

It really is, and in fact I'd like to differentiate my classes a bit by giving different roles. Like the stated physical / magic attack problem up there, what if each class's weapon utilises a different battle formula instead? I thought it was a great idea, and I thought of ways to give each character a different role so that they may complement each other. Sounds good? Of course. Why use Aluxes when, say, Cyrus hits harder and is just as accurate due to the poor game mechanics? And what is the point of Dorothy and Estelle if they have little differentiation as well other than just being... fast? This is where I would like to address the issue and make an enjoyable game where everybody has an actual role of some kind so there is an incentive to play them.

Character Design Ideas

Here are my ideas for the default actors in RMXP as I am using them in my project, just because I want to give them a story and not let them be testing tools for everything over and over. :P

Here are some rough ideas to help us get started with some pros and cons we can have when we design our characters....

Spoiler: ShowHide
Rough ideas

Fighter (Aluxes):
Pros:
+ Fastest of the warrior branch
+ Most accurate weapon in sword out of the sword/lance/axe trio
+ Has the capability to hit multiple times, increasing chances of critical hits
+ When promoted he has the highest damage potential with multiple multiplying states that can be stacked on top of each other along with other passives

Cons:
- Each individual hits can be rather weak and not too effective on targets with high P-Def
- Requires the highest Dex for equipping swords compared to spears and axes



Lancer (Basil): (in my game the class is Squire)
Pros:
+ Very well rounded so his spear can initially hit harder than Aluxes's sword
+ Spears can hit multiple times too with certain skills
+ Highest MP of the warrior branch
+ When promoted he has useful support skills for enhancing defences of party members
+ Is tanky himself

Cons:
- Slower than Sword users
- May be too well rounded and does not get a self attack buffing skill
- Lower base HP than both Aluxes and Cyrus



Warrior (Cyrus):
Pros:
+ Highest base HP of all playable characters
+ Gains very high defence that makes him really hard to damage from the physical side
+ Axes are a powerful weapon of choice: hits the hardest of sword/lance/axe trio and is good for piercing barriers and requires the lowest Dex
+ Has the Taunt skill to provoke enemies to attack him, tanking most hits that were meant to be aimed at frailer party members

Cons:
- Axes are the most inaccurate of the three weapons
- Very slow
- Has absolutely no Magic Defence
- Usually his skills only hits once, though there are exceptions



Thief (Dorothy):
Pros:
+ Highest Agility: Agility is her main stat and will also affect weapon damage
+ Is a dodge tank that she rarely takes hits
+ Has steal skill so she can steal rare items off specific foes
+ Her dagger hits multiple times and can induce strange status effects
+ When promoted, has a skill that has a chance to instantly kill a target (except most bosses... most)

Cons:
- Relies on RNG (Random Number Goddess) to dodge hits because RNG is evil
- Very plushy: when hit takes way too much damage
- Individual hits are very weak, much like Aluxes's, but worse



Archer (Estelle):
Pros:
+ Highest Dexterity: Dexterity is her main stat and will also affect weapon damage, this makes her the most accurate party member
+ Deals obscene damage against avian creatures (birds/winged creatures), making her almost unfair to use vs them
+ Has a fair dodge rate
+ Has crowd control with Brigade
+ When promoted, gains a support skill that raises the hit rate of all party members

Cons:
- Otherwise not too great against non-avian characters, but still okay
- Gets slaughtered by close combat foes
- Not too defensive either: cannot wear heavy armour



Gunner (Felix):
Pros:
+ Very high damage from multiple weaponry: hit multiple times with chaingun/machine gun, hit multiple foes with shotgun or hit hard up close, etc...
+ Effective against multiple foes, especially avian
+ Very effective crowd control skills
+ Is somewhat durable and can wear heavy modern armour
+ Has passive skills that power up his normal attacks

Cons:
- Requires specific bullets/shells for specific skills
- Is rather slow and not too accurate
- Doesn't appear in the game for the first arc because he doesn't fit thematically :(



Cleric (Gloria):
Pros:
+ Best support ever: must have in almost all cases
+ Saves up a lot of potions with healing and remedy skills
+ Healing can damage undead foes
+ Can use stat enhancing skills to help allies
+ Has the highest Magic Defence of all characters
+ Has Light spells that is very effective against forces of darkness
+ When promoted gains a passive skill Slayer which quadruples Light damage vs forces of darkness: a dedicated evil slayer

Cons:
- Not too tanky physically and can fold easily to hard hits
- Has an elemental weakness to Darkness
- Light spell is otherwise very weak against non Dark foes



Mage (Hilda):
Pros:
+ Easily the most versatile character with offensive elemental spells for different situations
+ Highest MP of all characters
+ A lot of status inducing skills
+ A lot of debuffing skills to lower the stats of opponents (which actually work on some bosses)
+ A Disc One Nuke, if you will: deals ridiculous damage against most magical defensively starved foes
+ Has crowd control
+ Can learn MP Shield passive skill eventually to help redirect most damage taken to MP instead of HP, to help longevity
+ When promoted, learns a passive to further increase the power of magic attacks

Cons:
- Total glass cannon: very susceptible to damage when hit (can be mitigated with MP Shield passive)
- There are some bosses and regular enemies completely immune to spells
- MP Shield means a lot of MP can be drained much quicker (though it preserves your health, which is usually more important)



There are some of my rough ideas, as you can see, and I have done a lot to make it into reality. Although a few of the characters do in-fact overlap in some roles, I did make it so they are as distinct as possible in other areas.

So what do we do with Strength?

First off, if you look around line 51 in Game_Battler 3, you will see this:

self.damage = atk * (20 + attacker.str) / 20


That is where that extra 20 Str formula comes in, so that your 50 Strength counts as a 70 instead. If you wish to be more practical, just get rid of that 20 + so it will look more like:

self.damage = atk * (attacker.str) / 20


I don't know, I found that extra 20 to be a little awkward. You can also change the / 20 operation into something like / 2 or / 10 for more damage. Play around and see what works best. Make sure you save before battle testing for your changes to have any effect.

Unique Weapons

This is where you basically modify how physical attacks work. Now if you look at Xelias's Alternative Algorithms script, you can see what he did and he created a large amount of "if statements" for different weaponry that you could modify for your own use.

Around that same line at 51 and 52, you can add a bunch of extra if statements just like Xelias did (make sure you close any ifs with ends)

# Calculate basic damage
       atk = [attacker.atk - self.pdef / 2, 0].max
     self.damage = atk * (attacker.str) / 10


At the top of your Game_Battler 3 script (above "class Game_Battler"), add all of Xelias's configuration codes as this will be key to your script.

This part:

OTHER_WEAPONS_IDS = []
ALL_WEAPONS_IDS = []
ATMA_WEAPON_IDS = []
... etc...


This is where we define your user made weapons that use alternative damage calculations. This is where my idea of "Estelle's bows use dexterity instead of strength" ideas can come into fruition. Place in all your regular weapon ids such as swords or spears inside "OTHER_WEAPONS_IDS" brackets so it would look like

OTHER_WEAPONS_IDS = [1, 2, 3, 4, 5, 6, 7, 8]


After line 51 and 52, copy what Xelias has in his script starting from

    if attacker.is_a?(Game_Actor)
  if ATMA_WEAPON_IDS.include?(attacker.weapon_id)
    atk = [attacker.atk - self.pdef / 2,0].max
    atk2 = atk * (attacker.str) / 10
   self.damage = atk2 + ((atk2*((attacker.hp*100)/attacker.maxhp))/100)
   end


... all the way down to...

       if OTHER_WEAPONS_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.str) / 10
  end


Be sure to put an extra end statement in the end to close off that original "if attacker.is_a?(Game_Actor)" otherwise you will be full of very annoying "A Syntax Error occurred!" message from RMXP without it pointing you to its actual location. It has happened to me multiple of times and I did not like that. Every 'Ifs' must be closed with an 'end', remember that.

Now to make Estelle's bow use dexterity instead of strength when used, in the configuration section, add:

BOW_IDS = []


And inside that bracket, place in ALL IDs of every bow weapons you plan on using. (The default Bronze/Iron/Steel/Mythril bows are IDs 17-20).

Then in that whole long list of If/end statements of weapon calculations (between any 'end' of a calculation and an 'if' of another calculation), add this code snippet:

      if BOW_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.dex) / 10
  end


I had it correspond to the modified strength formula we did so there is no extra 20 (you can keep that extra + 20 if you'd like). See, the only difference here is we use (attacker.dex) instead of (attacker.str) for this specific weapon. So we are telling the game if we are using what we call bows, they wil deal damage based on the user's dexterity and not their strength. Also, since dexterity increases the user's accuracy ever so slightly, we have now made Estelle differentiated from her other friends by being more accurate than others without having to enforce strength on her. Isn't that wonderful?

Let's test this out, shall we?

Spoiler: ShowHide

Estelle has a very small Strength stat of 15 with a higher concentration of dexterity.


Bring it on!


Maybe... the Cockatrice wasn't such a good idea to demonstrate because being a bird, it takes really high damage from bows... but you get the idea: otherwise the damage would have been quite low, even with that weakness. Yes, my game is generally low stat game.


You can do the same with other fun calculations included here, including "Ninja_Swords" for thieves I suppose (to make Dorothy faster than the other characters) and special weapons like "Masamune" or "Blood Sword". Play around and see what works best for you.

Now say you wish to give that same bow some extra critical hit rate. Remember the regular formual was 4 times the attacker's dexterity divided by the target's agility. If you look around line 57 (or some really obscure line because you added the configurations at top... just Ctrl + F for # Critical correction) you will see the critical code as plain as day:

        if rand(100) < 4 * attacker.dex / self.agi
         self.damage *= 2
         self.critical = true
       end


Replace it with Xelias's critical modifier here:

        if attacker.is_a?(Game_Actor)
   if GENJI_WEAPON_IDS.include?(attacker.weapon_id)
       if rand(100) < 8 * attacker.dex / self.agi
         self.damage *= 2
         self.critical = true
       end
       end
     if KIKU_ICHIMONJI_IDS.include?(attacker.weapon_id)
       if rand(100) < 4 * attacker.dex / self.agi
         self.damage *= 4
         self.critical = true
       end
     end
   elsif rand(100) < 4 * attacker.dex / self.agi
         self.damage *= 2
         self.critical = true
       end
       end


As you can see, what Xelias calls Genji weapons has a higher chance of critical hit by multiplying dexterity by 8 instead of usual 4, and Kiku Ichimonji (these Japanese names are confusing: being Korean if they were in Kanji I could probably read it) it uses the normal critical calculation but when hit by a critical the damage is multiplied by 4 instead of the usual 2. You can replace either one of those names into "BOW_IDS" if you want, or add a completely new one that looks something like:

    if BOW_IDS.include?(attacker.weapon_id)
       if rand(100) < 8 * attacker.dex / self.agi
         self.damage *= 2
         self.critical = true
       end
       end


It goes in between the second end of the KIKU ICHIMONJI and the elsif that determines the formula for other weapons. Do as you would like. If you want to test it out and see if iti works, replace that critical formula and place an obscene number like 100 * attacker.dex / self.agi to see if it actually has an effect.

There we go! If you found it satisfactory, you can go ahead and try this out with other characters with other weapons too. Go for it: it should not be too difficult if you get the idea.

Also, when making bow skills, make sure to set the STR_F to 0 or something low (if you want strength to be a secondary stat instead) while setting the DEX_F to 100, so that Estelle's bow skills are now powered up by her dexterity and not her strength.

Spoiler: ShowHide


But this makes Strength even MORE useless

Wait, if Dexterity adds up Estelle's power just as much as Strength adds to Aluxes's power but has the added effect of increasing critical hit power and accuracy, that would make Strength the useless stat, right? Especially because Dorothy also gets the same power raise from agility but gets quicker and more evasive. It simply isn't fair!

Well, there are some workarounds to this. One is making sure Strength affects another stat much like the other two. Usually, in RPGs, this translates to slightly increasing HP as Strength goes up or Intelligence raising MP as it goes up.

This script by gameus is useful for this job. In here we can go ahead and modify how HP and MP is progressed, along with other thing, but for now we can concentrate on the HP/MP. Place it anywhere above main and below Scene_Debug and above Blizzard's script, as putting it below it seems to not make Passive Skills script work at all.

Look around line 412ish and you can see this:

    n = [[base_maxhp + @maxhp_plus, 1].max, Config::Max_HP].min


We are going to fix this so that the HP correlates to the actor's Strength and raises itself accordingly. This is how:

    n = [[base_maxhp + @maxhp_plus + base_str*3 + @str_plus*3 + @level*4, 1].max, Config::Max_HP].min


Replace that line with this, and modify it as you will. Basically, your character's strength times 3 will be added to your character's base HP, along with 4 times your character's level. Go ahead and modify the values in there if you wish and play around and see what works best for you. Now we gave Strength a different role altogether as well! Yay!

If you want to do the same for MP and the Intelligence stat, go to line 477. Notice the class is now Game_Battler. This is important. Take lines 477 to 484:

  def maxsp
   n = [[base_maxsp + @maxsp_plus, 0].max, Config::Max_SP].min
   for i in @states
     n *= $data_states[i].maxsp_rate / 100.0
   end
   n = [[Integer(n), 0].max, Config::Max_SP].min
   return n
 end


Highlight it, cut it (Ctrl + X) and paste it (Ctrl + V) right below line 418 (the end statement for def max HP).

We will then change this line:

    n = [[base_maxsp + @maxsp_plus, 0].max, Config::Max_SP].min


into something like this:

    n = [[base_maxsp + @maxsp_plus + base_int*3 + @int_plus*3 + @level*3, 0].max, Config::Max_SP].min


Modify each parameters as you wish. The reason we moved the SP section into the Game_Actor setting is because Game_Battler class affects both enemy and player, and enemies do not have a level value, causing RMXP to crash and go berserk, stealing candies from babies even. And that is not good.

I will eventually post up a good copy of my edited Game_Battler 3 script once it actually makes sense. It is functional, but right now it is a big mess and I am uncertain if it is in a presentable fashion.

Creating Passive Skills

In Blizzard's Tons of Addons, you can find a section where you can add passive skills to further differentiate your characters by adding a static value to specific stats that are helpful, such as adding more strength to Cyrus or some small evasion boost to Dorothy. I use it because I use Blizzard's Stat Distribution System and want to prevent homogenisation of each characters' stats to give each one a focused stat buff gained from some level ups or quests. You may want to try this script out too, as it allows some customisation of character and adds more dimension to your game, if you wish. I will explain this process later.

Spoiler: ShowHide


The instructions are rather simple. Ctrl + F for "Passive Skills" in Tons of Addons 2 and where it says
when x then return [a, b, c, d, e, f, g, h, i, j, k, l]


You replace x with the skill ID number (like skill #300 for example) and the values in the brackets are what you add for HP, SP, STR, DEX, AGL, INT, ATK, DEF, MDEF, EVA, gold multiplier and experience multiplier, respectively. Of course you can just read the instructions written up there. If you want to customise your game to a large degree, I am afraid that this type of script database configuration is what you will have to do.

Spoiler: ShowHide


Fill this template out as many as you can: in fact you will find a lot of scripts just like this in Blizzard's script addons. It is a simple layout and should not cause much problems once you thoroughly test it. When filling the database with passive script, make sure these scripts are set on Occasion as "Never" so it is not used, but rather just augmentations that add to your base stats. Think Maplestory skills like Physical Training or some other similar games with similar aspects.

This is where you can differentiate your characters and really flesh out their strengths and weaknesses! With Aluxes and the likes, perhaps you can give them slight buffs to their HP and perhaps Dexterity, and mostly into Strength, while Cyrus can gain a massive buff in HP and Def, but lowered MDef (yes, you can set negative values). Thieves are generally evasive so let's add 20 into the evasion stat or something (be very careful with the evasion stat: it can be a huge game breaker!). Who knows? Keep experimenting and see what works out for you.

However, as you know, there are many other different passive skills that games have to offer that is not static stat boosts, right? We get interesting ones in other games such as Undershirt from Rockman Battle Network series (survive with 1 HP when hit with a fatal hit) or skills that exchange damage taken to MP instead of HP (Magic Guard from Maplestory?) or damage increasing in power as health range sinks lower and lower. This is where we take Xelias's Passive Skills and copy and paste the necessary parts into our modified Game_Battler 3 script.

Be careful, this huge modification can end up not well if you keep forgetting to use end statements like I occasionally do, and all the needed parts should be placed in the right places. Keep in mind there is an identification called "Blood Sword" in this script as well as his Alternative Algorithms, so rename one of the Blood Sword ID tag into something else. Do backup and save your scripts and such before modifying such a large code. You do NOT have to do this, but if you wish, I can show you how I did it.

Like before, take the configuration section you see in the actual passive skills script by Xelias:

GUARD_PLUS_ID = 81
MP_SHIELD_ID = 82

...

BARE_ANIMATION_SELF_ID = 0
BARE_ANIMATION_ID = 4


And place it at the top along with the other configurations. We will not be using the Passive_Skills_IDS and Passive_Word in this case, as those are mostly modifications to the menu system, and not directly relating to battle in itself. You can, if you want, and copy the script to its entirety and such and try to successfully merge them. It is rather difficult, though. I will eventually write down a working one where everything is functional as it should be. A lot of them currently seem quite buggy and has some problems.

Right below the configuration section and below Game_Battler (but above everything else that is in the default) add this:

Spoiler: ShowHide
def states_plus(plus_state_set)
   # 有効フラグをクリア
   effective = false
   # ループ (付加するステート)
   for i in plus_state_set
     # このステートが防御されていない場合
     unless self.state_guard?(i)
       # このステートがフルでなければ有効フラグをセット
       effective |= self.state_full?(i) == false
       # ステートが [抵抗しない] の場合
       if $data_states[i].nonresistance
         # ステート変化フラグをセット
         @state_changed = true
         # ステートを付加
         add_state(i)
       # このステートがフルではない場合
       elsif self.state_full?(i) == false
         # ステート有効度を確率に変換し、乱数と比
 if self.is_a?(Game_Actor) && self.skill_learn?(STATE_RESIST_ID)
   if rand(100) < [0,50,40,30,20,10,0][self.state_ranks[i]]
           # ステート変化フラグをセット
           @state_changed = true
           # ステートを付加
           add_state(i)
         end
         end
       unless self.is_a?(Game_Actor) && self.skill_learn?(STATE_RESIST_ID)
         if rand(100) < [0,100,80,60,40,20,0][self.state_ranks[i]]
         @state_changed = true
           # ステートを付加
           add_state(i)
         end
         end
       end
     end
   end
   # メソッド終了
   return effective
 end



If you are using the State_Resist passive ability, that is. At the very bottom of the script, add this section at the bottom with the elements section but above the last end (last end statement must be there remember!)

Spoiler: ShowHide
class Scene_Battle
 def make_skill_action_result
   # Get skill
   @skill = $data_skills[@active_battler.current_action.skill_id]
   # If not a forcing action
   unless @active_battler.current_action.forcing
     # If unable to use due to SP running out
     unless @active_battler.skill_can_use?(@skill.id)
       # Clear battler being forced into action
       $game_temp.forcing_battler = nil
       # Shift to step 1
       @phase4_step = 1
       return
     end
   end
     if @active_battler.is_a?(Game_Actor) && @active_battler.skill_learn?(DEMI_MP_ID)
       @skill.sp_cost /= 2
     end    
           if @active_battler.is_a?(Game_Actor) && @active_battler.skill_learn?(TURBO_MP_ID)
       @skill.sp_cost *= 2
       end    
   # Use up SP
   if @active_battler.is_a?(Game_Actor) && @active_battler.skill_learn?(BLOOD_PRICE_ID)
   @active_battler.hp -= (@skill.sp_cost)
 else
   @active_battler.sp -= @skill.sp_cost
   end
   # Refresh status window
   @status_window.refresh
   # Show skill name on help window
   @help_window.set_text(@skill.name, 1)
   # Set animation ID
   @animation1_id = @skill.animation1_id
   @animation2_id = @skill.animation2_id
   # Set command event ID
   @common_event_id = @skill.common_event_id
   # Set target battlers
   set_target_battlers(@skill.scope)
   # Apply skill effect
   for target in @target_battlers
     target.skill_effect(@active_battler, @skill)
   end
 end
end

class Game_Actor < Game_Battler
 def animation1_id
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.animation1_id : BARE_ANIMATION_SELF_ID
 end

 def animation2_id
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.animation2_id : BARE_ANIMATION_ID
 end

 def element_set
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.element_set : [18]
 end


This is for the brawler attack where you can set no weapons to do damage. There are some customisation to do in this part too, though, such as the weapon element set if you wish to have an element to the default Brawler skill attack (I used the element I call Null in my database, you can just delete that element section if you wish).

Note: There is a huge bug and I really need help in fixing: where Demi MP and Turbo MP is, the MP cost lowers and raises itself, respectively, like it should, but it continues to do that every turn so eventually, if I have a Fire skill that costs 6 MP, it will become 12 the next turn, 24 the next turn, 48 the next turn, and it will keep increasing even when the battle ends. It is rather infuriating and I do need help on that, if anyone can. I just set those values to 1 at the moment until I can find a fix for it.

Everything else may actually get tricky and where the passives take place in the normal attack, paste it right below the other conditions from Alternate Algorithms, while placing brawler at the bottom. I have it to look SOMETHING like this just to give you an idea of how it should be to work properly.

Spoiler: ShowHide
        atk = [attacker.atk - self.pdef / 2, 0].max
     self.damage = atk * (attacker.str) / 10
   if attacker.is_a?(Game_Actor)
  if ATMA_WEAPON_IDS.include?(attacker.weapon_id)
    atk = [attacker.atk - self.pdef / 2,0].max
    atk2 = atk * (attacker.str) / 10
   self.damage = atk2 + ((atk2*((attacker.hp*100)/attacker.maxhp))/100)
   end
      if VALIANT_KNIFE_IDS.include?(attacker.weapon_id)
    atk = [attacker.atk - self.pdef / 2,0].max
    atk2 = atk * (attacker.str) / 10
    minushp = attacker.maxhp - attacker.hp
   self.damage = atk2 + ((atk2*((minushp*100)/attacker.maxhp))/100)
   end
    if LIMITED_MOON_IDS.include?(attacker.weapon_id)
    atk = [attacker.atk - self.pdef / 2,0].max
    atk2 = atk * (attacker.str) / 10
   self.damage = atk2 + ((atk2*((attacker.sp*100)/attacker.maxsp))/100)
 end
      if CONFORMER_IDS.include?(attacker.weapon_id)
    atk = [attacker.atk - self.pdef / 2,0].max
    atk2 = atk * (attacker.str) / 10
   self.damage = atk2 + (atk2*(((attacker.level*100) / 99)/100))
 end
     if MASAMUNE_IDS.include?(attacker.weapon_id)
    atk = [attacker.atk - self.pdef / 2,0].max
    atk2 = atk * (attacker.str) / 10
    minushp = self.maxhp - self.hp
   self.damage = atk2 + ((atk2*((minushp*100)/self.maxhp))/100)
 end
       if PROJECTILE_IDS.include?(attacker.weapon_id)
    atk = [attacker.atk,0].max
    self.damage = atk * (attacker.str) / 10
  end
     if BOW_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.dex) / 10
  end
     if DAGGER_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.agi) / 10
  end
     if BLOOD_SWORD_W_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.str) / 10
  end
     if MIND_BLASTER_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - ((self.pdef+self.mdef)) / 4, 0].max
    self.damage = atk * (((attacker.str + attacker.int)/2)) / 10
  end
     if GUARD_BREAKER_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.str) / 10
  end
     if GENJI_WEAPON_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.str) / 10
  end
     if KIKU_ICHIMONJI_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.str) / 10
  end
     if ROBOT_WEAPON_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (((attacker.str) / 3) + ((attacker.dex) / 3) + ((attacker.agi) / 3)) / 10
  end
      if OTHER_WEAPONS_IDS.include?(attacker.weapon_id)
   atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.str) / 10
  end
      if attacker.is_a?(Game_Actor) && attacker.atk == 0
       atk = [attacker.str - self.pdef / 2, 0].max
     self.damage = atk * (attacker.str) / 10
     end
     if attacker.skill_learn?(BRAWLER_ID)
         atk = [10 + attacker.str/1 - self.pdef / 2, 0].max
     self.damage = atk * (attacker.str) / 10
   end
  if attacker.is_a?(Game_Enemy)
     atk = [attacker.atk - self.pdef / 2, 0].max
    self.damage = atk * (attacker.str) / 10
  end
  end


If you start understanding how this works, you can make your own customisable weapon formulas and make something interesting from there. Remember to always back your scripts up! I cannot stress that enough, ALWAYS BACK THEM UP!

In the critical correction section, add this above Genji Weapon configuration

Spoiler: ShowHide
      if attacker.is_a?(Game_Actor) && attacker.skill_learn?(CRITICAL_BOOST_ID) 
       if rand(100) < 8 * attacker.dex / self.agi
         self.damage *= 2
         self.critical = true
       end
       end


As usual, change the formula to however you desire.

Now find #Subtract damage from HP section in Calculating Normal Attacks, as that is where we add our new passives.

I have it to look something like this:

Spoiler: ShowHide
       if attacker.is_a?(Game_Actor)
     if MIND_BLASTER_IDS.include?(attacker.weapon_id)
       self.sp -= self.damage
       self.damage = sprintf('%+d %s', -self.damage, $data_system.words.sp)
       end
     if BLOOD_SWORD_W_IDS.include?(attacker.weapon_id)
      healing = (self.damage*PERCENT_DRAINED)/100
       self.hp -= self.damage
       attacker.hp += healing
     end
     if ALL_WEAPONS_IDS.include?(attacker.weapon_id)
       self.hp -= self.damage
     end
     end
     if self.is_a?(Game_Actor) && self.skill_learn?(MARTYR_ID) && self.damage > 0
     sp_recovery = self.damage/10
     self.sp += sp_recovery
   end
     if attacker.is_a?(Game_Actor) && attacker.skill_learn?(INQUISITOR_ID)
     sp_recovery = self.damage/10
     attacker.sp += sp_recovery
   end
     if attacker.is_a?(Game_Actor) && attacker.skill_learn?(ADRENALINE_ID) && ((attacker.hp*100)/attacker.maxhp) < 30
     self.damage*= 2
   end
     if attacker.is_a?(Game_Actor) && attacker.skill_learn?(FOCUS_ID) && attacker.hp = attacker.maxhp
     self.damage*= 2
   end
   if self.is_a?(Game_Actor) && self.skill_learn?(LAST_STAND_ID) && ((self.hp*100)/self.maxhp) < 30
     self.damage/= 4
   end
   if attacker.is_a?(Game_Actor) && attacker.skill_learn?(BLOOD_PRICE_ID) && self.hp > 1
     attacker.hp -= attacker.hp/10
     self.damage += self.damage/2
     end
   if attacker.is_a?(Game_Actor) && attacker.skill_learn?(CHARGED_ATTACKS_ID) && attacker.sp > 0
     attacker.sp -= 6
     self.damage += self.damage/3
   end
   if attacker.is_a?(Game_Actor) && attacker.skill_learn?(BLOOD_SWORD_ID)
     hp_recovery = self.damage/10
     attacker.hp += hp_recovery
   end
   if self.is_a?(Game_Actor) && self.skill_learn?(ONCE_MORE_ID) && self.hp > 1 && self.damage > self.hp
   self.damage = self.hp - 1  
   end
    if self.is_a?(Game_Actor) && self.skill_learn?(MP_SHIELD_ID) && self.sp > 0
     self.sp -= (self.damage*0.8).floor
     self.hp -= (self.damage*0.2).floor
   else
     self.hp -= self.damage
   end


The MP Shield change I made was so that I can displace MOST damage to SP while not being completely impervious to HP. I had to floor it so the damage does not return a decimal, but I am sure there is a better way to do this. I do need lessons on the actual scripting: I am no expert. Do what you would like: look at the formulas and see if you wish to change anything inside and adjust it to your own accord. There are many many interesting ideas here and you can even try making your own, I suppose. I hope you are learning a bit about how some of these scripts work: it is not too bad when you get the hang of it, I believe. I will get into one custom one I made eventually.

Now we move on to the skills section of Game_Battler 3. This is where the bulk of the passives exist, so we might as well, right? In the skills section find #Element Correction and replace the entire section before #If damage value is strictly positive with this:

Spoiler: ShowHide

     elements = (elements_correct(skill.element_set))
     if user.is_a?(Game_Actor) && user.skill_learn?(ELEMENTALISM_ID) && skill.mdef_f > 0
     elements *= 2
     end
     if self.is_a?(Game_Actor) && self.skill_learn?(GEOMANCY_ID) && skill.mdef_f > 0
       elements /= 2
     end
       self.damage *= elements
     self.damage /= 100


This is if you want that elementalism/geomancy passive that raises your elemental power or decreases the elemental damage you take. I say it is cool.

There are both Guard sections in Normal Attack and Skill which we can replace, but I think we can cover that in another section where we can discuss about changing the functionality of the Defend option altogether.

After that comes the tricky part where the part at #Subtract damage from HP in the skills section has to be modified. In between that and #State change, I have something like this:

Spoiler: ShowHide
      last_hp = self.hp
       if self.is_a?(Game_Actor) && self.skill_learn?(MARTYR_ID) && self.damage > 0
     sp_recovery = self.damage/10
     self.sp += sp_recovery
   end
       if user.is_a?(Game_Actor) && user.skill_learn?(INQUISITOR_ID)  && self.damage > 0 && skill.int_f < 1
     sp_recovery = self.damage/10
     user.sp += sp_recovery
   end
       if user.is_a?(Game_Actor) && user.skill_learn?(WARMAGE_ID)  && self.damage > 0 && skill.int_f > 0
     sp_recovery = self.damage/10
     user.sp += sp_recovery
   end
     if user.is_a?(Game_Actor) && user.skill_learn?(BLOOD_SWORD_ID)  && skill.pdef_f > 0
     hp_recovery = self.damage/4
     user.hp += hp_recovery
   end
     if user.is_a?(Game_Actor) && user.skill_learn?(TURBO_MP_ID) && skill.mdef_f > 0
     self.damage*=3
   end

     if user.is_a?(Game_Actor) && user.skill_learn?(SPELLBREAKER_ID) && skill.mdef_f > 0 && ((user.hp*100)/ user.maxhp) < 30
     self.damage*=3
   end
     if user.is_a?(Game_Actor) && user.skill_learn?(ADRENALINE_ID) && skill.pdef_f > 0 && ((user.hp*100)/ user.maxhp) < 30
     self.damage*=3
   end
     if user.is_a?(Game_Actor) && user.skill_learn?(SERENITY_ID) && skill.mdef_f > 0 && user.hp = user.maxhp
     self.damage += self.damage/3
   end
     if user.is_a?(Game_Actor) && user.skill_learn?(FOCUS_ID) && skill.pdef_f > 0 && user.hp = user.maxhp
     self.damage += self.damage/3
   end
     if self.is_a?(Game_Actor) && self.skill_learn?(LAST_STAND_ID) && ((self.hp*100)/self.maxhp) < 30
     self.damage/= 2
   end
     if self.is_a?(Game_Actor) && self.skill_learn?(ONCE_MORE_ID) && self.hp > 1 && self.damage > self.hp
   self.damage = self.hp - 1  
 end
     if self.is_a?(Game_Actor) && self.skill_learn?(HEALER_ID) && self.damage < 0
       self.damage *= 2
     end
   if self.is_a?(Game_Actor) && self.skill_learn?(LEARNING_ID) && BLUE_SKILLS_IDS.include?(skill.id)
   learn_skill(skill.id)
   end
     if self.is_a?(Game_Actor) && self.skill_learn?(MP_SHIELD_ID) && self.sp > 0 && self.damage > 0
     self.sp -= (self.damage*0.9).floor
     self.hp -= (self.damage*0.1).floor
     else
      self.hp -= self.damage
    end
     effective |= self.hp != last_hp


Again, MP Shield was modified for my own suitable needs. However, this comes with a bug for me... as usual, because I cannot solve these for my life. Blizzard's Tons of Addons has an absorb HP/SP script which is very neat to have and adds more fun to your game, but these skills pierce right through the MP Shield and hits the HP directly AND hitting the SP too. I placed this entire script below Tons of Addons once, but that disabled other scripts like Master Thief and Regeneration did not work too well. Yes, I am hoping this can be remedied, or be a total coward and say "Absorb skills go through MP Shield", but I do not want to do the latter :/

In the item section below, find #Set damage value and reverse HP recovery amount and right below it add this line:

      if self.is_a?(Game_Actor) && self.skill_learn?(HEALER_ID) && recover_hp > 0 
       recover_hp *= 2
       end


This is if you wish to use Healer. Again, if you are not using most of these passives, you have no need to waste space and place ALL of them in. I would filter mine out as well, but for now, I am too lazy and have other priorities. :(

Making our own passive skills

I will give you an example of a passive skill I made, that is if you decided to follow all the instructions above. I thought Clerics were too weak, despite being primarily a supportive unit. I was hoping to even the deal out somewhat and have them fight effectively against the forces of darkness, giving them a specialty. So what I did was add a new configuration called "SLAYER_ID" (Slayer is the passive in Fire Emblem 8 Sacred Stones that allowed Bishops to deal more damage vs monster... concept is similar) and another below called "EVIL_IDS = []" to specify which monsters I deem evil.

So it would look like this:

SLAYER_ID = 777 (the Skill ID Number for Slayer)
EVIL_IDS = [1, 2, 5, 99, 100] (evil monsters)

Now to add the actual effect: go where all those other bunch of passive skills are and add this line:

Spoiler: ShowHide
if user.is_a?(Game_Actor) && user.skill_learn?(SLAYER_ID) && skill.mdef_f > 0 && skill.element_set.include?(13)
       if self.is_a?(Game_Enemy) && EVIL_IDS.include?(self.id)
     self.damage*=4
   else
     self.damage*=1
     end
   end



This is saying if this is a spell that is element 13 (Light in my game, change to whatever) and the enemy ID is included within the EVIL_IDS bracket, the damage is multiplied by 4, if not, damage is normal. This is not limited to the Slayer effect, of course, and can be used for other purposes, such as Fire skill against something, or whatnot. Try it out and go wild! A lot of fun new passive skills can be made if you tried hard enough.

We can test this out right now if you wish:

Spoiler: ShowHide


This is without Slayer.


Okay, since light is already effective against the Lich, the damage is quite decent... but let us amplify this.


Now let us add Slayer into the mix...


14K! That was quite scary!


Yes, that will do for now for passive skills, asides from some bug fixes I am unable to perform because I am not a competent person for that task. I will request for help when the time comes.


Blizzard's Stat Distribution System

Spoiler: ShowHide

The interface of the system looks like this.


Grab the script here.
This nifty script is useful if you like to give your actors some customisation. It goes below Blizzard's Tons of Addons apparently. Of course, it is above Main. I would explain, but the script in itself does the explaining very well by itself if you read it. However, for people making smaller stat programs like me, I set all the main stat (STR/DEX/AGL/INT) cost to equal 1, while HP/SP are at negative values so you can add a couple of HP and SP all at once. I have HP at -4 and SP at -3. Most of the time, you would expect players to increase their main stats instead of the HP/SP stat. Usually. I have Starting DP at 3 and DP per Level at 3, but this is subject to change. As for Auto Call, sometimes that can be messy, but I have it on True when battle testing just so I know the characters' exact stat values are when I playtest. I would set it to False usually if the game is released, but that is your call. It should be easy to configure generally and adding this system may help your game have more dimension and gives the illusion that there is some degree of freedom to the player's control over the character, with some imposed restrictions, of course.

Spoiler: ShowHide

This is how I configured it. You do not have to do the same obviously: stat scaling may be widely different in your game.


But how do we make sure the player won't completely invest in STR only or DEX only for specific classes?

Surely, we need to make an incentive for characters to raise their other stats as well if we need to, right? You will be sure most players playing your game will completely invest Dexterity into Estelle without needing any of the other stats, maybe except Agility, while Aluxes will only be using Strength, especially if you gave passive skills that raise Dexterity on their own to increase accuracy. Speaking of which, that is one workaround for the accuracy problems of warriors, if need be. Other than that, the best way I believe to solve this is to make equipments require stats. To do this, find Blizzard's Tons of Addons (I believe Part 2) and find the equipment requirement section. You can make it so, let's say, Aluxes's Steel Sword will require a specific amount of dexterity to equip to give an incentive to raise the unused secondary stat not to make him overpower himself with Strength. Estelle would need some strength to hold bigger bows because, well, they are bigger. Find ways to balance out your game: this will take careful planning.

Spoiler: ShowHide


I have not completely fiddled with the system yet, however, as I have yet to decide how I should balance out my characters and weaponry by power and whatnot. However, the instructions are easy and can be found in Part 2 of the Tons of Addons.

I want it so that only specific characters get to have their stats customised!

After some digging through multitudes of random script requests, I actually found an addon script that was not mentioned in the actual stat distribution system thread. You can grab it here. I have not personally tested it yet, but I believe it should work. I hope, at least.

Elemental Multiplier

So you have a skill that has multiple elements, such as a Sword/Lightning skill, but when it is calculated against a foe that is neutral to Sword and immune to Lightning, it calculates weird. I believe the modifier is additive or something rather than multiplicative. I believe I found this small script from gdunlimited.net, and it was written by metaclaw. Place this below the modified Game_Battler 3 but above Blizzard's scripts.

Spoiler: ShowHide
class Game_Enemy < Game_Battler


 def elements_correct(element_set)
   # If not an element
   if element_set == []
     # Return 100
     return 100
   end
   # make the element rates stack up
   result = 100.0
   for i in element_set
     # get the effectivenesss rate of a single element
     rate = self.element_rate(i) * 1.0
     # if the rate is say, 200, multiply the 'final rate' by 2, etc.
     result *= rate / 100
   end
   return result.to_i
 end

end


This means the foe that is immune to Lightning but neutral to Sword will still be immune to Lightning due to multiplication. This also means foes weak to both Fire and Ice and is affected by a skill with the two elements will take massive damage due to multiplication. It is something you may or may not find a use for, but try if you would like.


Skills dealing a fixed chance of inflicting status

RMXP has a very weird way of dealing with status inflicted by skills, and more often than not, it comes rather too frequently at times. Sure, you can set the status resistances from enemies off the database, but it does not always work as promised. Your actors as well would have problems with being stunned by lightning way too frequently without being actually resisting the stun status, right? There is a script for this I found in Wecoc's RM2kXP pack, but the problem is, the original author (gerrtunk) did not explain exactly how to work the brackets and such, so I hesitate to explain. It does function properly and I have successfully implemented it into my modified Game_Battler 3, but until I understand how it actually works, I will have to wait until then. Be sure to keep you updated then!


Weapon Specific Skills

So you have a character with the ability to equip multiple types of weapons (some people do this and give Aluxes, say, Sword and Axe), and you also give them skills for both sword skills and axe skills. But somehow even if they equip a sword, they are able to use their axe skills and vice versa. That sounds awfully unrealistic, even bizzare. Fortunately, there is a script to remedy this. Aqua has made this wonderful Weapon Specific Skills Script and it is easily plug and play. You will see this in many games nowadays it almost feel standard.

Spoiler: ShowHide

Copy and paste Aqua's script into your script editor, and where it says "DUMMY_ELEMENT" assign each element ID to whatever your category skills were. If Sword was element 17, for example, place it there.

In this example, I will be giving Gloria the ability to wield maces and staves. Usually, clergy do equip staves, while maces and such are usually battle priests or something in modern day RPGs. I will demonstrate how to only allow healing skills while equipping staves.

Spoiler: ShowHide

Go to your elements tab and expand it to however much you want. Aqua uses dummy elements in her script so these elements are actually just categorisations. You make an element for each, such as sword, spear, axe, etc... do as much as you would like.

Spoiler: ShowHide

It will look like this.


Spoiler: ShowHide

Next, you assign your individual weapons to a certain category element (ex: Guns go with the gun element, swords go with the sword element, etc.)

Spoiler: ShowHide

Now we tell each and every one of our skills here to be assigned to a certain categorisation element as well. Healing spells for staves, Spear skills for spears, etc... it is quite simple.

Now that we are done configuring this, let us try a playtest? Gloria should not be able to use healing skills with her default weapons.

Spoiler: ShowHide

Okay, we are equipped with our usual mace. Let us do this!


Yep, as we have configured, all of our healing spells are disabled. Greyed out. Unable to be selected!


Things will be a little different this time and we will equip a staff, or Bronze Rod as it states here.


Yes! Now healing spells actually work! But... what good is it where I don't have any healing to do?


You know what? The rules do not matter here, I am going to heal that ghost over there!


What??! Did you just heal that ghost and vanquish it? What sorcery is this??



Time out! You just healed a ghost! What?? (Targeting Anyone)

Maybe I just set the target to enemy instead of ally.

No I'm just kidding. That would be ridiculously dumb, would it not?

I cheated, because there is a nifty little script written by KK20: Target Anyone. Using this, you can configure some skills to either target your allies or your foes. Unfortunately, because of how RMXP default battle system is made, All Target skill is targetted automatically without any arrow indicators like in modern RPGs, and I'm unsure how to mess with the Arrow_Base class in the script editor, so until such a script is made, this script seems to only work for single target skills. If you want a script that targets EVERYBODY, including your allies and your enemies in one turn, there is such a thing in Blizzard's Tons of Addons (I believe Part 3).

Spoiler: ShowHide


Install the script above Main and below your default scripts, and where it says TARGET_ANYONE_TAG, set the string value into whatever name you will label your double target skills. I will just call it "Double" in this case.

Spoiler: ShowHide


Now go back to your database, expand your elements and add the element of the same name as you made your label, which in this case, is Double.

Spoiler: ShowHide


We can now go back the skills section, and click on whatever skills can target both your allies or your foes. Make their element into double. I also made a Heal element as well to determine what are healing skills.

Spoiler: ShowHide


Now what I did for that previous example was set the undead enemies in the database to have a weakness to healing attacks. For the default's case (if you did not go to Game_Enemy and modify the effectiveness values), a Grade F is -100% times effective, meaning absorbing an element. That would be useful for Fire monsters healing from Fire skills, for example, so you would set Fire to F in their database information. However, for these undead monsters like Ghosts, do remember that Healing skills have a negative power because it is primarily meant to heal. Negative times negative makes positive, and hence, damage should be taken when affected by healing skills instead of recovering health. This is why we set our undead monsters (Ghost/Zombie/Skeleton/Lich in the default's case) to F. This should work then, right?

Time to battle test!

Spoiler: ShowHide

What??? It just healed itself!


So what just happened?

Apparently, RMXP does not really do elemental effectiveness properly and deals with it in an additive state instead of a multiplicative state. At least that's what I like to believe. This is because we set those healing skills to Double, and Double as an element is 100% effective... so things went awry. We have a couple of ways to fix this. One is to put the ID of "Double" in Blizzard's Tons of Addons section 1 as a "Dummy element", and it will not calculate as any element at all (it will still function as double targeting skill). However, another way is to take that "Elemental Multiplier" scriplet above with the Hilda icon and paste it below your other scripts (below modified Game_Battler 3 and above Blizzard's scripts).

Spoiler: ShowHide


Now everything should work fine and -1 * 1 = -1. RMXP is weird like that.


What I did

Since Felix can use firearms, we all know there are many different kinds of guns out there, right? Each different weapons rely on different stats though (heavy weaponry is more strength based while lighter weapons are more dexterity based). I made it so he gets different skills for different weapons, so we have small light firearms, rapid fire machine guns, crowd control shotgun, heavy hitting combat shotgun, etc... you can do so many things with Aqua's skill. It is beautiful.

Spoiler: ShowHide

Equipped with a chaingun allows bullet skills such as Rapid Fire


However, shotgun skills cannot be used because of that.



Weapon Skills Consuming Items

The example with Felix was a bit weird because all those skills seem to consume items such as bullets or shells, but how can we make that into reality? We use Blizzard's Tons of Addons Part 2 and search for "Item Requirement". We can set skills to require certain amount of items to execute a skill.

Configuration is easy.

Spoiler: ShowHide


when (skill ID), then return [(item ID that you need), (the amount of items needed)]
when 459 then return [55, 1]

For example, skill 459 is Gun Shot, and it requires Item #55 which is Bullet, and it requires 1.

Spoiler: ShowHide


Go to your database, make your item and the rest is all configuration. I'm a bit confused though about the occasion part. If you battle test when set to Never, the skills will never activate, but set it to only in battle, you can consume them like you are eating them... so it is weird. The Scope is set to none, so I am unsure about the rest though. Either way, this is how you do it.

Technical Stuff

The Cursor Keeps Going Back to Attack!

After you executed a skill or item and wait for the next turn, the command goes back to Attack and not remembering where the cursor last was. Also when you select an item during debug battle test it goes back all the way to Item #1 and not Item #1289443578348564785 where it last was. How annoying is that? Luckily, Gameus made a script that lets all your woes go away. This is the script.

Sorting Gamuts of Spells

So the spell caster in your team (in this case Hilda) is usually so versatile she has a lot of spells. It sounds cool, in fact, that gives a lot of choices and good things because you can always hit somebody for effective damage or debuff your foes when they get too strong, etc. However, is it always a good thing? If we ask Hilda...

Spoiler: ShowHide


오빠! 기술이 너무 많아서 너무 혼란스러워요!!
Translation: I have too many skills so I am confused!!


. . .

I don't think Hilda enjoys this at all. Do you?

Gameus made a Skill Categories Script which is actually very compatible with the above section's Battle Memory, but we can also utilise Tons of Addons Part 2's "Skill Separation System" and use this instead. It uses Dummy Elements just as we set up in Weapon Requirement Skills as well.

Spoiler: ShowHide


Set up more elements as these are our skill categories.

Spoiler: ShowHide


Go inside Tons of Addons 2, find the skill separation section, and add your dummy elements, and label them in order. This is how we can categorise our skills.

Spoiler: ShowHide


Now go inside your skills tab in the database, and yes, you will have to check EACH AND EVERY ONE of these skills... again... to categorise them into their appropriate skill section. Now our Fire skill is a black magic type of skill, so we place it inside that category. Same for healing and its white magic, for example. Very simple and straightforward, you can even do it with weapon skills.

Keep in mind that with this sorting of skills, you would have to do it for every skills or else they will NOT appear in the skills window while in battle. Yes, you may forget in haste, but that is there to remind you that this is how it works. I did not set up the weapon skills yet, as this is merely a demonstration, and we are using spells in this case and not weapons. But you would have to set this up for weapon skills as well.

Now let us battle test. Don't forget to save.

Spoiler: ShowHide


좋아요! <3
Translation: I like!


Yes, now we have our skills set up and more clean than our huge pileup from before! However, keep in mind the Battle Memory Comamnds, while it works well for the battle's main menu, with the Skill Separation, it will not remember that you casted a specific type of "Healing" skill or whatever, but will remember which category you clicked on before you did anything. I'm sorry if my explanation sounds a bit weird, because I am not good at expressing things sometimes. You can test this out and see for yourself when you do battles and you will see what I mean. Gameus's separation system, though, should work just fine with the Battle Memory Commands script.



Advanced Ideas

Character Transformation


Coming Soon (when I get time to write more)

  • Changing Defend's functionality
  • Multiple hits
  • Character transformation
  • Stacking status effects
  • Elemental charges
  • State requirement skills
  • Combination skills
  • Bosses with more health than normal
  • Finding Waldo

PhoenixFire

As one of your first contributions (officially) to this site, I must, say, excellent article! I agree with you in a way; I think that the default systems, although lacking, do not get enough attention to what they are capable of, with some edits and improvements. I started learning scriptig by just editing the default scripts, and that's still how I make systems for myself. Well done!
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

Wraith89

Thank you Phoenixfire for your kind reply. I am sure the default battle does have a lot of potential, but of course it is not for everybody. But I like using what I was given and try to build off of it in many ways as possible.

I have updated the original post, shrunk a lot of images because I am sure nobody wants a large screen with everything running from my desktop shown with RMXP contents. I have also added more information as well, and plan on adding more onto this when I get the time to.

G_G

I have yet to read the entire thing, but I'm loving it so far. To help make it more organized you can always use horizontal rules [hr] And you can always use bigger and bold headers for each section of the article. [size=20pt][b]Text Here[/b][/size] It might make things a bit easier to read. But awesome article so far. Glad to see a new member contribute right away.

Wraith89

November 17, 2014, 11:54:33 pm #4 Last Edit: November 17, 2014, 11:55:46 pm by Wraith89
Right. I am usually organised when I write things like this. I tend to write in this style when I do guides and such, but I should use those [h r]tags and such as you said. I am embarrassed to say despite the fact I have used BBTags for so long, there are many out there that still eludes me.  :shy:

Thank you for your comments. It is nice getting encouraging comments, very much. It feels somewhat disorganised so far, but I will sort things out, as I am a person that edits way too much as soon as another idea pops out, resulting in me never finishing anything  :haha:

EDIT: Oops, must add a noparse tag...

EDIT2: Noparse does not exist in this board. Oops. So how do I write tags without actually enabling its effects...

G_G


Wraith89


WhiteRose

This is a great tutorial. I've always actually liked the default battle system quite a bit, myself, so this has some great ideas on how to put it to its full potential.

Wraith89

November 18, 2014, 12:21:13 pm #8 Last Edit: November 19, 2014, 12:28:17 am by Wraith89
Thank you WhiteRose. I do actually prefer the default battle system for being quite simple and almost old school but not completely. For all intents and purposes I guess a sideview battle is exactly the same thing except for the visuals, and I had a couple of those in the past. I hope this tutorial is not too confusing: I am hoping to change the legibility and organisation a bit, so I will be writing more of what I have for now.

EDIT: I actually have more to post, but there is a character limit, and I have not forseen it to reserve a post enough. I am wondering if I can make another thread for this, if this is allowed.