Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: GAX on December 26, 2010, 04:39:27 am

Title: Assistance Please: Scripting a Battle System
Post by: GAX on December 26, 2010, 04:39:27 am
Alright, a few people know I've been working on a battle system for a game.  So I'm figuring I'd do this in steps and hopefully have the community help me out.

Here are the basics of the battle system:
*Customizable Materia-like Command Menus
*Secondary MP Meter that applies to all actions (including the basic Attack, Defend, and Item commands) (Action Cost)
*RTAB-like game play

Here's the road map I've got drawn up to script this that I wanna focus each part into.  Starting with applying these methods to the default battle system, the steps shall be:

1. Implimenting the new Action Cost stat for player characters ONLY (enemies are not limited by this stat and therefore do not need it).
-1a. Setting up an algorithm to determine how this stat is calculated.
-1b. Making the stat visible with HP/MP
-1c. Setting up the basic ability cost structure (From individual spells to the standard Attack/Defend/Item commands)
-1d. Adding the Standby Option to the standard DBS command selection (pretty much a character passes at a CT cost)
2. Setting up the Materia-like System that allows one to equip skills instead of items.
-2a. Adding Equipment Menu for said "Materia"
-2b. Making these "Materia" appear within the character's Technique Menu in battle.
-2c. A method of limiting the number of skills that can be equipped at a time.
-2d. A method of expanding upon the above stated limit.
-2e. Making sure this all works with Part 1
3. Tweaking the Action Cost stat and implementing RTAB-like game play.
-3a. Deciding on how to determine rate at which the Action Cost meter replenishes.
-3b. Setting up so that a player can only act when the Action Cost meter is full.
4. Combo Attack setup
-4a.  Setup a part of the Battle Phase in which the player selects a series of skills that are executed in sequence in place of single abilities.
-4b.  Make sure this system can check all costs of said combo attacks so that no impossible combos occur.
5. Player Influence on the system
-5a. Implement a way for states and equipped items to increase or decrease the maximum value of a character's Action Cost meter.
-5b. Implement a way for states and equipped items to slow down or speed up the regeneration of a character's Action Cost meter.
6. Finalizing
-6a. Adjust for compatibility with BlizzAddons
-6b. Adjust for compatibility with the Advanced Chaos Rage Limit System.
-6c. Make sure this all works with Minkoff's Animated Battlers or a comparable system.

Whoever would like to help guide me towards what to do to make all this possible, that would be great.  Anyone looking to assist can post whatever part of the script they are undertaking and how to implement it here.  I want to have this shit ready already.

I don't expect someone to just make all this for me (if someone would like to that'd be great), just looking for those interested in helping me out.

Also...this is for a major project of mine so please don't hijack this system and call it your idea.  Atleast have the manhood to credit me on the concept.

If you would like to provide further assistance or work with me in real time on this, contact me at either of the following.  Please be advised that anyone who decides to spam me through any of these addresses with anything that annoys me will be warned, followed by possibly discipline here on the forums.

AIM - GuardianAngelX72 (always on)
MSN - GuardianAngel72@hotmail.com (may not be online)
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: gerrtunk on December 26, 2010, 04:39:36 pm
2-Check gameguys equipable skills. You just have to modifiy that script.

-5a. Implement a way for states and equipped items to increase or decrease the maximum value of a character's Action Cost meter.

This all goes in the action_cost method that calculates it. You may want to use rpgmaker default style where states % modifications are the last thing applied. I suggest looking on how atributes are calcualted, is not hard.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: The Niche on December 26, 2010, 07:20:22 pm
You may have already thought of this, but it would be cool if the player could make their own combos.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: SBR* on December 28, 2010, 04:49:15 am
Quote from: The Niche on December 26, 2010, 07:20:22 pm
You may have already thought of this, but it would be cool if the player could make their own combos.


Do you mean that when you chain two attacks together, you have to wait twice as long? That sounds pretty cool :D! Maybe certain combo's do result in an awesome hidden attack, like: High Jump + Sword Slash = Tornado Jump (twice as strong)? You could combine different characters' attacks to make new attack, like: Player A (Fire elemental guy) uses Fireball + Player B (Wind elemental guy) uses Tornado = Flame Tornado. I think I remember that from Sonic: the Dark Brotherhood (I stopped playing that, because I dislike Turn Based Battle Systems, but I might start playing it again...).

If you're going to implement that, this might be the first RTAB I'd ever use :D!

Cya :urgh:!
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: GAX on December 30, 2010, 06:43:44 am
Okay, looks like some people didn't get what I meant...

The main purpose for this thread is going to be two fold:
1 - I get a system I desperately need for my game out of the way and
2 - Allows the community to put together a script in steps that could easily be adapted later into something like a tutorial and assist others in learning how scripting works in real time rather than reading the standard posts.

Seriously, every "learn to script" post I've read is nothing but a dictionary and that's not how a lot of people (myself included) learn.  We like to learn through doing!

Quote from: SBR* on December 28, 2010, 04:49:15 am
Quote from: The Niche on December 26, 2010, 07:20:22 pm
You may have already thought of this, but it would be cool if the player could make their own combos.


Do you mean that when you chain two attacks together, you have to wait twice as long? That sounds pretty cool :D! Maybe certain combo's do result in an awesome hidden attack, like: High Jump + Sword Slash = Tornado Jump (twice as strong)? You could combine different characters' attacks to make new attack, like: Player A (Fire elemental guy) uses Fireball + Player B (Wind elemental guy) uses Tornado = Flame Tornado. I think I remember that from Sonic: the Dark Brotherhood (I stopped playing that, because I dislike Turn Based Battle Systems, but I might start playing it again...).

If you're going to implement that, this might be the first RTAB I'd ever use :D!

Cya :urgh:!


This may come into play at a later time but the combo system is pretty much doing a chain of commands.  I might at some point add in finishing attacks that'll be used at the ends of certain combos for extra damage, but I wanna take care of the above first.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: SBR* on December 30, 2010, 08:29:03 am
Quote from: The One and Only GAX72 on December 30, 2010, 06:43:44 am
Spoiler: ShowHide

Okay, looks like some people didn't get what I meant...

The main purpose for this thread is going to be two fold:
1 - I get a system I desperately need for my game out of the way and
2 - Allows the community to put together a script in steps that could easily be adapted later into something like a tutorial and assist others in learning how scripting works in real time rather than reading the standard posts.

Seriously, every "learn to script" post I've read is nothing but a dictionary and that's not how a lot of people (myself included) learn.  We like to learn through doing!

Quote from: SBR* on December 28, 2010, 04:49:15 am
Quote from: The Niche on December 26, 2010, 07:20:22 pm
You may have already thought of this, but it would be cool if the player could make their own combos.


Do you mean that when you chain two attacks together, you have to wait twice as long? That sounds pretty cool :D! Maybe certain combo's do result in an awesome hidden attack, like: High Jump + Sword Slash = Tornado Jump (twice as strong)? You could combine different characters' attacks to make new attack, like: Player A (Fire elemental guy) uses Fireball + Player B (Wind elemental guy) uses Tornado = Flame Tornado. I think I remember that from Sonic: the Dark Brotherhood (I stopped playing that, because I dislike Turn Based Battle Systems, but I might start playing it again...).

If you're going to implement that, this might be the first RTAB I'd ever use :D!

Cya :urgh:!


This may come into play at a later time but the combo system is pretty much doing a chain of commands.  I might at some point add in finishing attacks that'll be used at the ends of certain combos for extra damage, but I wanna take care of the above first.



I didn't actually fully read your first post, but now I've re-read it (I skipped the parts I had already read, though) :D. I don't really join group scripting projects and I have to work on REMEXOS too. Also, I think I'm not ready for this yet, as I haven't scripted a single Battle System. So I can't help you out...

Cya :urgh:!
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: G_G on December 30, 2010, 10:33:17 am
Quote from: SBR* on December 30, 2010, 08:29:03 am
Quote from: The One and Only GAX72 on December 30, 2010, 06:43:44 am
Spoiler: ShowHide

Okay, looks like some people didn't get what I meant...

The main purpose for this thread is going to be two fold:
1 - I get a system I desperately need for my game out of the way and
2 - Allows the community to put together a script in steps that could easily be adapted later into something like a tutorial and assist others in learning how scripting works in real time rather than reading the standard posts.

Seriously, every "learn to script" post I've read is nothing but a dictionary and that's not how a lot of people (myself included) learn.  We like to learn through doing!

Quote from: SBR* on December 28, 2010, 04:49:15 am
Quote from: The Niche on December 26, 2010, 07:20:22 pm
You may have already thought of this, but it would be cool if the player could make their own combos.


Do you mean that when you chain two attacks together, you have to wait twice as long? That sounds pretty cool :D! Maybe certain combo's do result in an awesome hidden attack, like: High Jump + Sword Slash = Tornado Jump (twice as strong)? You could combine different characters' attacks to make new attack, like: Player A (Fire elemental guy) uses Fireball + Player B (Wind elemental guy) uses Tornado = Flame Tornado. I think I remember that from Sonic: the Dark Brotherhood (I stopped playing that, because I dislike Turn Based Battle Systems, but I might start playing it again...).

If you're going to implement that, this might be the first RTAB I'd ever use :D!

Cya :urgh:!


This may come into play at a later time but the combo system is pretty much doing a chain of commands.  I might at some point add in finishing attacks that'll be used at the ends of certain combos for extra damage, but I wanna take care of the above first.



I didn't actually fully read your first post, but now I've re-read it (I skipped the parts I had already read, though) :D. I don't really join group scripting projects and I have to work on REMEXOS too. Also, I think I'm not ready for this yet, as I haven't scripted a single Battle System. So I can't help you out...

Cya :urgh:!


Great time to start learning how to make a battle system.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: SBR* on December 30, 2010, 11:03:32 am
Quote from: game_guy on December 30, 2010, 10:33:17 am
Quote from: SBR* on December 30, 2010, 08:29:03 am
Quote from: The One and Only GAX72 on December 30, 2010, 06:43:44 am
Spoiler: ShowHide

Okay, looks like some people didn't get what I meant...

The main purpose for this thread is going to be two fold:
1 - I get a system I desperately need for my game out of the way and
2 - Allows the community to put together a script in steps that could easily be adapted later into something like a tutorial and assist others in learning how scripting works in real time rather than reading the standard posts.

Seriously, every "learn to script" post I've read is nothing but a dictionary and that's not how a lot of people (myself included) learn.  We like to learn through doing!

Quote from: SBR* on December 28, 2010, 04:49:15 am
Quote from: The Niche on December 26, 2010, 07:20:22 pm
You may have already thought of this, but it would be cool if the player could make their own combos.


Do you mean that when you chain two attacks together, you have to wait twice as long? That sounds pretty cool :D! Maybe certain combo's do result in an awesome hidden attack, like: High Jump + Sword Slash = Tornado Jump (twice as strong)? You could combine different characters' attacks to make new attack, like: Player A (Fire elemental guy) uses Fireball + Player B (Wind elemental guy) uses Tornado = Flame Tornado. I think I remember that from Sonic: the Dark Brotherhood (I stopped playing that, because I dislike Turn Based Battle Systems, but I might start playing it again...).

If you're going to implement that, this might be the first RTAB I'd ever use :D!

Cya :urgh:!


This may come into play at a later time but the combo system is pretty much doing a chain of commands.  I might at some point add in finishing attacks that'll be used at the ends of certain combos for extra damage, but I wanna take care of the above first.



I didn't actually fully read your first post, but now I've re-read it (I skipped the parts I had already read, though) :D. I don't really join group scripting projects and I have to work on REMEXOS too. Also, I think I'm not ready for this yet, as I haven't scripted a single Battle System. So I can't help you out...

Cya :urgh:!


Great time to start learning how to make a battle system.


Although I've never scripted one yet, I HAVE looked at the SBS and I think I kinda get how it works. I haven't looked at it for a long time though, just a small glance :D.

I think I might script one someday, but REMEXOS and... Sigh...

Cya :urgh:!
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: GAX on December 30, 2010, 11:32:32 pm
G_g, homie, you wanna help with this?

Anyways, here's what I figure should be the first part of the project since it's actually the important piece:

So on to step 1!
The current algorithym for the base maximum Action Cost is going to be ((AGI+INT)-(Level/2)).  This may get adjusted later but for starters this should work.

So yeah, I need the following information:
1 - Should I put this directly into the default scripts or should I start on an entirely separate script?
2 - If making an entirely separate script, should I copy-pasta from a default script and if so where?
3 - How should I write the basic algorithym into play so the stat exists on each character but not on enemies?
4 - How would I make the stat appear in the default battle system?
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: ForeverZer0 on December 31, 2010, 12:03:32 am
1

2

3

class Game_Battler
  def agi
    if self.is_a?(Game_Actor)
      n = WHATEVER YOUR CUSTOM ALGO IS
    elsif # Enemy
      n = [[base_dex + @dex_plus, 1].max, 999].min # Normal way
    end
    for i in @states
      n *= $data_states[i].dex_rate / 100.0
    end
    n = [[Integer(n), 1].max, 999].min
    return n
  end  end
end

4
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: GAX on December 31, 2010, 10:29:01 pm
What I mean by Copy-paste is making a copy of a default script that will be modified in order to create the new script.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: G_G on December 31, 2010, 10:40:12 pm
@GAX: I might help. When I head back to Rapid, I'll have quite a bit of time on my hands without the internet consuming my time and keeping me distracted.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: GAX on January 01, 2011, 01:31:20 am
@G_g...BRO YOU KICK ASS!
*MODERATOR BROFIST*
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: ForeverZer0 on January 01, 2011, 01:54:36 am
No, you don't need to copy-paste the original. You can modify existing scripts by defining new methods, or over-writing old ones in any other script, as long as it comes after the original.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: GAX on January 10, 2011, 09:46:29 pm
Could you give me an example please?  Sorry but the last time I attempted this I turned my game into a minefield (just ask Aqua).
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: ForeverZer0 on January 10, 2011, 09:50:35 pm
Quote from: The One and Only GAX72 on January 10, 2011, 09:46:29 pm
Could you give me an example please?  Sorry but the last time I attempted this I turned my game into a minefield (just ask Aqua).


Just pick practically any demo out of the database and see how it is configured.


Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: The Niche on January 20, 2011, 08:01:24 am
Thought of something about the combo system. It'd be easy enough to event.

Skill: Combo 1
No effect.
Call common event: Combo 1

Common event: Combo 1

Control variables[Variable] = Actor [insert here]'s sp
cnd branch: [Variable] < [Total sp cost for all skills in the combo]
Show text: You don't have enough SP.
Else
Force action: Actor [insert here] use skill [skill]
#Haven't done anything with the DBS so I don't know if forced actions removes sp or not. If it doesn't, then subtract the sp cost of the skill from [Variable]
#Also, does forced actions take a turn? If so, then just repeat the last line until you reach the end of the combo. Otherwise, I don't know how to make it wait. Mebbes a regular wait command does that?
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: GAX on January 20, 2011, 05:05:50 pm
Quote from: The Niche on January 20, 2011, 08:01:24 am
Spoiler: ShowHide
Thought of something about the combo system. It'd be easy enough to event.

Skill: Combo 1
No effect.
Call common event: Combo 1

Common event: Combo 1

Control variables[Variable] = Actor [insert here]'s sp
cnd branch: [Variable] < [Total sp cost for all skills in the combo]
Show text: You don't have enough SP.
Else
Force action: Actor [insert here] use skill [skill]
#Haven't done anything with the DBS so I don't know if forced actions removes sp or not. If it doesn't, then subtract the sp cost of the skill from [Variable]
#Also, does forced actions take a turn? If so, then just repeat the last line until you reach the end of the combo. Otherwise, I don't know how to make it wait. Mebbes a regular wait command does that?




Not really looking for recommendations on how to adjust this system quite yet.  The purpose of the combo system is giving Chaotic Fury a new feel.  Rather than just entering one attack you set a chain of attacks that are executed in sequence.  Each character has a limited number of attacks they can equip at a time and a secondary sp-like stat that not only determines how many attacks they can executed, but the time between their turns (as your next turn comes up when your CT meter reaches full.  Enemies will probably need a CT meter but it's just going to be a standard 100% meter that fills based on their agility and they can only use one attack per turn).
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: GAX on February 13, 2011, 02:28:44 pm
Quote from: ForeverZer0 on January 10, 2011, 09:50:35 pm
Quote from: The One and Only GAX72 on January 10, 2011, 09:46:29 pm
Could you give me an example please?  Sorry but the last time I attempted this I turned my game into a minefield (just ask Aqua).


Just pick practically any demo out of the database and see how it is configured.





(Can't believe I took this long to reply)
While I tried this method all it did was confuse the fuck out of me and I ended up causing all kinds of hell within my project.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: Ryex on February 13, 2011, 04:38:48 pm
from what I gather your at the point where you know most all the ruby syntax you can,and your trying to make the mental leap to knowing syntax to knowing how to actual make something from the ground up (or even from a base).

I can only offer one bit of advise. get out some pencil and paper and conceptually break down the system you want into logical parts. the smaller you can make those parts and the more specialized you can make their tasks, the easier it will be to make.

stare with the big object. the battle scene, then break it up into things like the display and the data. break the data down into, enemies and actors. break each of those down into their stats and actions. have some sore of processor that you feed that data into the modify it (battle results). break the processor down into it's parts. 

in the beginning this is the best way to start understanding how to actually make something out of the simple operations you learn when the language tutorials teach you syntax. 

an added benefit of doing this is it become much easier to help you. it's a lot easier to explain how to make two small parts of a system that the entire thing.
Title: Re: [XP]Assistance Please: Scripting a Battle System
Post by: GAX on March 11, 2011, 04:38:58 pm
I don't get part of what you mean, though recently I've been getting shit together to actually flowchart the battle system (cue nightmares...now).