Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Conditional Turns CBS V4.0

Status
Not open for further replies.
Conditional Turns CBS
Version: 3.0


Introduction

This script transforms the Group Turns Based Battle System (aka DBS) into a CTB Condition Turns/Timer System. A description of how the system works can be found here.

Screenshots

Ok, create a new project. now goto the database and test play. It looks like that except there are gradient bars on the hp sp, the state has been removed in place for another one. There's your screenshot.

Demo

http://www.rmxp.org/forums/downloads.php?do=file&id=6

Script

:':)':)'( <- the families

Instructions

Okay I am going to make this as clear as possible

Initial Directions
  1. First Download the Demo via the Download Manager
  2. Get Winzip, Ultimatezip, or some other crazy program to open zip files, and install it.
  3. Find the downloaded file
  4. Right Click on the file and select Extract or Open your Unzipping program and Extract the files from the archive
  5. Open RPG Maker XP if you haven't already
  6. Open the Project File
  7. Copy Each Script from the demo or paste them all into one script and add that, I only have it in multiple script form for organization.
  8. Setup the Gradient Bars if you want
  9. Find the Setup Portion of the CTB Battle System Script
  10. Get yourself a snack
Setup and Customization

Now I am going to explain this a second time, the code in the setup is already commented once with the instructions, but I'm going to explain it again code by code
System Options
  1. Code:
      #--------------------------------------------------------------------------
      # * The Speed of the System in Frames
      #--------------------------------------------------------------------------
      Speed = 100
    The Speed of the system this affects how long it takes for the first person's bar to fill.
  2. Code:
      #--------------------------------------------------------------------------
      # * How the Speed is Based
      #     0: Current_Action.Speed 1: Agility
      #--------------------------------------------------------------------------
      Base_Speed = 0
    How the speed is based use 0 for speed (agi + rand(10 + agi / 4)) or 1 for agility
  3. Code:
      #--------------------------------------------------------------------------
      # * At Gain 
      #     0: Random 1: Steady
      #--------------------------------------------------------------------------
      At_Gain = 1
    How the bars fill use 0 for a random rate or 1 for a steady rate
  4. Code:
      #--------------------------------------------------------------------------
      # * At Max
      #--------------------------------------------------------------------------
      At_Max = 65536
    Don't worry about this, it has little effect on the execution of this script. but its the maximum at.
  5. Code:
      #--------------------------------------------------------------------------
      # * Full At Se
      #     syntax - RPG::AudioFile.new(filename, volume, pitch)
      #--------------------------------------------------------------------------
      Full_At_Se = RPG::AudioFile.new("033-Switch02")
    When the bar is filled this sound effect is played. if volume is not specified it is assumed at 100, and if pitch is not specified it is assumed at 100 as well.
Action Cost Setup
This section of the setup defines the cost, which is how much the bars go down after acting the values here are to be given as percentages (0-100)
  1. Code:
      #--------------------------------------------------------------------------
      # * Action Cost Attack for Actors 
      #     syntax - actor_id => cost
      #--------------------------------------------------------------------------
      Action_Attack_Actor = {}
    This is the cost to attack per actor if their weapon is not found in the Weapon Cost hash then it will get the value from here.
  2. Code:
      #--------------------------------------------------------------------------
      # * Action Cost Attack for Weapons 
      #     syntax - weapon_id => cost (Do not setup 0)
      #--------------------------------------------------------------------------
      Action_Attack_Weapon = {}
    This is the cost to attack per weapon. if the weapon id is not found here then it will look at the value defined per actor.
  3. Code:
      #--------------------------------------------------------------------------
      # * Action Cost Attack for Enemies
      #     syntax - enemy_id => cost
      #--------------------------------------------------------------------------
      Action_Attack_Enemy = {}
    This is the cost for enemies to attack.
  4. Code:
      #--------------------------------------------------------------------------
      # * Action Cost Defend (Percentage)
      #--------------------------------------------------------------------------
      Action_Defend = 50
    This is the cost to defend
  5. Code:
     #--------------------------------------------------------------------------
      # * Action Cost Escape (Percentage)
      #--------------------------------------------------------------------------
      Action_Escape = 75
    This is the cost to escape
  6. Code:
      #--------------------------------------------------------------------------
      # * Action Cost Wait (Percentage)
      #--------------------------------------------------------------------------
      Action_Wait = 25
    This is the cost to wait
  7. Code:
      #--------------------------------------------------------------------------
      # * Action Cost Per Skill 
      #     syntax - skill_id => cost
      #--------------------------------------------------------------------------
      Action_Skill = {}
    This is the cost to use a skill, if the value for a skill isn't defined the default is used (see below)
  8. Code:
      #--------------------------------------------------------------------------
      # * Action Cost Per Item
      #     syntax - item_id => cost
      #--------------------------------------------------------------------------
      Action_Item = {}
    This is the cost to use an item, if the value for an item isn't defined then the default is used (see below)
  9. Code:
      #--------------------------------------------------------------------------
      # * Default Action Cost
      #--------------------------------------------------------------------------
      Action_Default = 100
    This is the big default if a action is not attacking, defending, using a skill or item, waiting, or escaping then this value is used
  10. Code:
      #--------------------------------------------------------------------------
      # * Default Cost To Attack
      #--------------------------------------------------------------------------
      Action_Attack = 100
    This is another big default, If the value for Weapon and Actor is not defined for an actor or the Value for Enemy is not defined for an enemy then this value is used
  11. Code:
      #--------------------------------------------------------------------------
      # * Default Cost For Using A Skill
      #--------------------------------------------------------------------------
      Action_Skill.default = 100
    This is another default if the value for a skill is not defined then this value is used
  12. Code:
      #--------------------------------------------------------------------------
      # * Default Cost For Using An Item
      #--------------------------------------------------------------------------
      Action_Item.default = 100
    Yet another default if the value for an item is not defined then this value is used.
  13. Code:
      #--------------------------------------------------------------------------
      # * Do Not Touch Unless you know what you are doing
      #--------------------------------------------------------------------------
      Action_Attack_Actor.default = Action_Attack
      Action_Attack_Enemy.default = Action_Attack
    This is another one of those do not touch sections, This sets the defaults for the attack hashes.
Action Timer Setup
This section of the setup defines time to wait before the action is made. The values here are to be given in frames.

Its setup the same way as the Action_Costs the hashes work the same way except for different names refer to the corresponding entry in he Acton cost setup for more information
FAQ

Awaiting Question

Compatibility

SDK 2.0 compliant
requires Method and Class Library V1.5 or greater
requires Animated Gradient Bars which requires Window Sprites

Credits and Thanks

Kurisu and Raziel for betatesting
Raziel for catching 1 bug
Mea for catching 2 bugs
Raven for catching 2 bugs
Skyla for indirectly requesting

Author's Notes

I have not been receiving bug reports yet I see people going oh saying oh that script has a bug. Stop destroying the little scripter-nonscripter communication system. this is one of my pet peeves now. When reporting bugs please tell the type of the error and whats on the line the error appeared on, or just the screenshot of the error. SO REPORT BUGS AND GET A COOKIE.

I am open to suggestions for future versions, if you have something you'd like to say then post and I'll consider it.
 
Hey Trickster, :#

Five defends in a row =
'scene_battle' line 430: NoMethoodError occured.
undefined methood 'current_action' for nil:NilClass
Line: if @active_battler.current_action.is_a_attack?

Escape when not failed=
'scene_battle' line 430: NoMethoodError occured.
undefined methood 'current_action' for nil:NilClass
Line: if @active_battler.current_action.is_a_attack?

I noticed somtimes when the escape fails it allows the player to select a second time without taking away from the bar. Was there a cost to a failed escape?

Also I noticed the errors are the same... so maybe I'm give the commands too fast? That might also be a possiblity. I found some serious lag with the slanted bars. I didn't have too many programs open and my computer isn't taht old so maybe reconsider those bars. I think it's just because they're slanted. It lags enough so that it disrupts the game play a bit on mine. I'll double check to see if it does it with just that.

Nice script Trickster. I may use this one for my one battle system. :D Is there a possiblity you can make it work with turns lined up instead of with bars? Kind of like how FF10 does it?

Anyways hope that helps ya.
 
Heh, thanks. *Gets the whip out at Raziel for not catching these*, but hey alot less buggier than the ATB+CTB Battle System. Actually I'm splitting that script into three parts and here is part I of it.

as for your errors it seems as though the battle gets set to nil, I will look into this.

Escape costs 75% of their bar. I'll look into that as well

During my testing the bars did not lag for me at all, there is an opton to turn off the slanting its in the other setup (for the Gradient Bars), but I don't really see that lagging.

Hmm, well the Bar at the bottom has to stay, if you use any other bar then it will not update

Give me a mock up or more to go on and I'll script this for you (for all of the bugs you caught :))
 

Mea

Member

Besides the defend bug, I noticed that if you select an action (like attack), then before you select your target, if you try to backtrack by hitting "esc", the character completely loses their action.
 
heh perfect timing as I am fixing the bugs and revising the code as I type this, give me a few hours or so. I have already (fixed?) the bugs raven has mentioned

AND I'LL SHOW YOU AN INTERESTING DEMO FZ :mad:
 
And Demo updated to Version 1.1 thanks to everyone that caught bugs in my system, and also Fz check out the demo now :p

EDIT and Updated to Version 1.2 cleaned up code and fixed a small glitch when using for instace the defend command (It really didn't defend), also this will be the last update for now.
 
Updated to Version 2.0

Fixes many of the bugs version 1.2 had (Thanks Mea :))

Updated to Version 2.1

Cleans up code a bit, Fixes the Bar Decreasing Bug (Thanks Mac :))
 

Shiro

Member

I'm having a really tough time trying to figure out what's the difference between your CT and ATB.

I downloaded and loaded both demos but they looked exactly the same to me.

I feel really silly for asking, but could you tell me the difference between your two scripts?
 
Perhaps its just me, but during the phase where im selecting an action, arent the bars supposed to stop filling up?... cause mine arent....

perhaps it is just me though...
 
ASK AND YOU SHALL RECIEVE

Updated to V2.3

Speed is changeable in game $game_system.battle_speed
When Selecting an acting all bars can stop (Changeable Option in Setup)

Updated to V2.3.1

Fixes a potential command window hanging bug
 
Here's another question for you.. .

Is there any way so that the action takes place immediatly after selecting it? It seems that there is a delay in between the selection of the action, and the action itself...
 
This is probably the wrong place to ask this but what is the deal with "the families" comments. I see these comments alot and was wondering what this means. Sorry if this is a noob question or if I missed out on something. Thanks.

-The Wizard
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top