Making your own CBS

View previous topic View next topic Go down

Making your own CBS

Post  Notune on Fri Nov 16, 2007 9:43 pm

This was originally some sort of article that was very long that I wrote in the past. Mainly, it is just about having a CBS system for a Rm2k3 game. Here goes.

First, create your own variable. Call this your monster's name, and HP1. Then, comes the hard part. It's creating the damage that this monsters sustains when your hero attacks him, with the hero's attack points. Here is how to get your character's attack points, and other stats basically:

At the beginning, inside your intro, do variable operations that add to your hero's attack, defense, and range stats. Range doesn't do anything but enhance the chance for your hero to attack. To do these variable operations:

Create Variables [Attack, DEFENSE, and RANGE] and add 7 to attack, 6 to defense, and 1 to range. Like this:
(this is just an example. All of the variable numbers are made up, starting from 1.)

: Variable Oper: (V001: Attack) +, 7
: Variable Oper: (V002: Defense) +, 6
: Variable Oper: (V003: Range) +, 1

Then, create something to show these variables like a custom menu, which should look like this. It should be made as a common event, with parallel process and a switch named: "Menu allowed". Named Custom Menu. Like This:

Name: Custom Menu Start Condition: Parallel Process Switch: (0001: Menu Allowed) - ON
Page Code:
Note: Create KEYPRESSED 1, other switches and variables.
: Input key proc: (Save to variable KEYPRESSED1) Cancel Key
: Branch Conditions: (0004: Keypressed1) is 6
: Show choices (Party Stats/Item Management/Save Game/Level Up)
(Party Stats) handler:
: Messg: Name: \n[1] Level: \v[5] Attack: \v[1] Defense: \v[2] Range: \v[3]
: Call Main Menu

(Item Management) handler:
: Memorize Location: Location (beforem), X (beforem), Y (beforem)
: Teleport: Item Management (1,1)

(Save Game) handler:
: Call Save Menu
: Forbid Saving

(Level Up) handler:
: Branch Condition if Variable (0006: Experience) is greater or equal to 20
: Variable Operations: (0005: Level) +, 1
: Messg: Level Up! You are now level \v[5].
: Attack increases by 2.
: Defense Increases by 1.
: Variable Operations: (0001: Attack) +, 2
: Variable Operations: (0002: Defense) +, 1
: Variable Operations: (0006: Experience) -, 20

: End
: Variable Operations: (0004: Keypressed1) -, 6

That shows your character stats while giving you the option to save the game, go to item management, or level up. All you have to do is increase your XP by something to get to either 20, or you can preset the 20 to anything you want, but you have to subtract that from the variable after you have done your business with leveling up and increasing stats. The Item Management screen should have some spot to teleport you back, or to recall to the position you were before you were teleported there, using the Memorize Position command. This is how to do this on that event.

Event Conditions:
Touched By Hero

Layer:
Below Hero

Page Code:
: Switch Oper: (0001: Menu Allowed) - ON
: Disable Menu
: Recall to position: Saved in (Location (beforem), X (beforem), Y (beforem)

Thatis how you do that for the item management. Create a new event, something that looks like a chest, and do the following commands there. Also follow the other steps.

Event Start Condition:
Touched by Hero

Layer: Below Hero

Page Code:
: Messg: Welcome to Item management! Note that you can only use a item once, and if that item reaches 0, you cannot use it again.
: Show Choices: (potion/healing dust)
: (Potion) Handler
: Branch Condition: (0007: Potion) is 0
: Messg: You don't have any!

: Else Handler
: Branch ConditioN: (0007: Potion) is 1 or more
: Variable Operations: (0007: Potion) -, 1
: Messg: You have gained 50HP!
: Change Hero HP: \n[1] + 50

: (Healing Dust) Handler
: Branch Condition if Variable (0008: Heal Dust) is 0
: : Messg: You don't have any!

: Else Handler
: Branch Condition if Variable (0008: Heal Dust) is 1 or more
: Variable Operations: (0008: Heal Dust) -, 1
: Change Hero HP: Whole Party 30HP increase
: : Messg: Your party has gained 30HP each.

Now, all you have to do is add the variables POTION and HEAL DUST. Alright, moving onto the actual battle event. Now, that you have got the basics. Creating the battle event consists of the monster's variable: it's name and then HP, and if it's your first monster variable with that monster, put a 1 after the HP. If it's your second, 2, after the HP, and so on. Here is the page code for a MAGIC/ATTACK custom field map battle system.

Event: Page 1
Conditions: Action Key start
Page Code:

: Show Choices (attack/magic)
: Attack Handler
: Branch Conditions: Attack is 3- less
: Messg: You have done -- damage to enemy!
: Variable Operations: (MonsterHP1) -, --

Else Handler
: Branch Conditions: Attack is 4 or more
: Messg: You have done -- damage to enemy!
: Variable Operations: (MonsterHP1) -, --


END
The enemy attacks you!
-- damage was delt.
Your HP: -, --

Magic Handler
Which spell?
Show Choice: (4 different spells)

Then, add this to each magic spell:
You have done -- damage!
Variable Operations: (monster1hp) -, --
The enemy attacks you!
-- damage was delt.
Your HP: -, --

Event Page 2:
Variable: (monster1hp) is 0
Touched by hero

: Enemy is dead!
: -- experience is gained.
: Variable operations: Experience +, --
: -- gold is gained.
: Change money: -- increase
: Switch Operations: Enemy Dead 1 ON

Event Page 3:
Switch: Enemy Dead 1 - ON
Action Key
_______________________________
:

That is all to the battle system! The "--" are for your own specific numbers. That is all you have to do for the game's battle system. Now, all you have to do is create the amounts of XP and GP gained, and then change the enemy's name, switches, and etc! The last thing you need is a good storyline that fits with this battle system.

Notune
Admin

Posts : 6
Join date : 2007-11-16
Age : 23
Location : West-Coast, Washington

View user profile http://rm2k3satrus.freeforum.me.uk

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum