Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

> Grid-based battle positions
Tsukihime
post Jun 15 2012, 06:45 PM
Post #1


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




This script will extend the default battle system.
The default system does not have any concept of "battle positions". For example, if there are 4 monsters on the screen, that's it: there are 4 monsters on the screen.

It makes no difference whether they're lined up horizontally, or lined up vertically, or they're scattered all over the field.

The grid based system is meant to add an imaginary grid to the battle so that you can actually say Slime B is behind Slime A.

Some things that should be provided by the script

1. the ability to define the dimensions of the grid. Width and height; pretty standard.
2. the ability to define restrictions on where actors/enemies can be placed.
3: a uniform way to access a battler's position. Try to keep this as encapsulated as possible since everything else will depend on these methods.
4: battle positions should be made obvious based on where the battler sprite is positioned. If one slime is behind another slime (or, in 2D, on top of another slime), that fact should be reflected in the position values (you can use x,y coords or index from 1 to n).

Visuals of the grid itself is not important. You don't need to know that you're on a specific square, but you should do some calculations on each troop's screen x and y to calculate their positions.

By providing such a positioning system, the following scripts can be easily written as extensions:

-"rows". In final fantasy for example, you had the option of being in the "back row" or the "front row". It is obvious that you need a way to specify "position" in order to actually say that someone is in the front or back.

-position-based targeting. You have a skill that hits every monster in a straight line. You have another skill that hits every monster within a certain radius from the target. You want to be able to target empty positions on the field in order to hit more monsters. Not possible without having such a grid.

-moving around the battle field. In some games, battlers don't just stay in one position. You can choose to move to another position on the field. Why should your actors stay on one side of the field and enemies on the other side? Why not have all battlers move wherever they wish?

-ranged attacks. If you're not beside the battler, you can't hit him with a knife unless you're throwing it. If the enemy is too close to you, how do you expect someone to shoot an arrow? Doesn't make sense. Positions provide a way to determine whether you're close (or far) enough to execute an action.

-3D positioning. Rather than just a 2D grid where you go from top to bottom, left to right, you add some depth to it. That means you can have slimes BEHIND a slime, or bats ABOVE a slime.

Keep these in mind as you're writing the script, since the script is pretty much absolutely useless on its own so if it is not flexible enough it won't do much good.

The targeting system does not need to be changed. The only thing that needs to be done is to write extra logic to actually give battlers some positions.

This post has been edited by Tsukihime: Jun 15 2012, 06:56 PM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   

Posts in this topic
- Tsukihime   Grid-based battle positions   Jun 15 2012, 06:45 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 20th May 2013 - 10:10 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker