Jump to content


Photo

General questions about creating a new tactical battle system.

Battle System Tactical

  • Please log in to reply
9 replies to this topic

#1 TheCastle

TheCastle

    Advanced Member

  • Members
  • 154 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 07 August 2012 - 02:15 PM

I guess I can describe myself as an intermediate novice programer.

GTBS
^ A really great example of something along those lines.

Anyway, what I really need atm is general over arching advice on where I can research ways to build the kinds of systems needed to make something like this work in this engine.
  • How do get and place units on the board that accurately represent party members and enemies/battler stats?
  • How do I setup a new battle mode where I calculate what unit's turn is next?
  • How do I setup a curser to allow me to select different units on the board?
  • How does one display tiles that a character can move to?
  • How does one display tiles that an ability, item, attack or spell will effect?
  • How does one make it so these abilities, items, attacks or spells properly effect the target?
Basically where is a good place for me to start on figuring out the most optimal path toward creating something along the lines of GTBS.

Edited by TheCastle, 07 August 2012 - 03:02 PM.


#2 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 2,583 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 07 August 2012 - 03:30 PM

1. Create new event classes and bind them to Game_Actor/Game_Enemy objects. Or draw data specifically from RPG::Actor and RPG::Enemy, but I would use the wrapper class instead since it is easier to test your battles. Battle logic has already been written for you, so you might as well use it rather than re-writing your own.

2. You can just do what BattleManager does: produce an array of actors/enemies and just iterate over it.

3. Modify Game_Player or create a custom Game_Cursor class with specific "cursor" related properties such as selecting units. The player is the cursor, and the units are events.

4. You can highlight them if you've determined it is passable. You should probably write your own map sprite so that you can easily accomplish this.

5. Just create custom event classes for all of them. Don't try to say that a tile should be targetable. Anything that you should be able to interact with should be a separate object.

Events by themselves are already pretty good. For example, a door or a chest. You just need to invoke the event to do what you want.

6. "properly"? Just grab the event and call your method.

Edited by Tsukihime, 07 August 2012 - 03:33 PM.

himeworks011.png
My scripts.

Avatar by ShinGamix

#3 TheCastle

TheCastle

    Advanced Member

  • Members
  • 154 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 07 August 2012 - 04:01 PM

Thank you!
This is very helpful as it points me in the right direction on a lot of fronts. Ill have to figure out how to do a lot of these things but at least now I know what I am looking for!

#4 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 2,583 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 07 August 2012 - 05:45 PM

My "just use events" idea probably would be unfeasible for things like clearing a forest or anything that requires creating large amounts of events.

For example, you have a bunch of trees and you want actors/enemies to cut them down.
You can treat it as a tree NPC via events, and then when a tree dies you just change the graphic to a tree stump or something. This makes cutting down a tree the same as battling a tree...

But it might cause a lot of lag if you want to have 200 trees on your map.
himeworks011.png
My scripts.

Avatar by ShinGamix

#5 TheCastle

TheCastle

    Advanced Member

  • Members
  • 154 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 07 August 2012 - 05:59 PM

My plan is to make it so every character has a bar that fills up during the fight. You choose when to pause the game, possibly waiting for an input using an event. The input would bring up a menu...

I think in the end I will end up using events for some basic stuff myself...

I think the biggest challenge will be figuring how I bind events to scripts like you mention in the first line.

Edited by TheCastle, 07 August 2012 - 06:00 PM.


#6 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 2,583 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 07 August 2012 - 07:33 PM

I think all you really need is a way to say "this event represents actor 2", "this event represents enemy 4", "this event represents troop 7"

I mean, you could have a single event represent an entire party of actors for that matter, so if your events are written well you could possibly have arbitrary "units" on your map.

I don't think there is that much use for an event beyond representing your units. Might need to write down a set of things you might be doing with those unit events though.

Other than that, you could probably just use the event's name, or use a comment in the event page. Note that unless necessary, I would avoid parsing event commands like comments unless absolutely necessary, since there is still a performance trade-off and then you suddenly can't use the event pages as flexibly as you want to.

So if I decided to include events with my actor, like maybe everytime my actor walks I recover HP, I might have a hard time accomplishing that because my event pages are being used for maintenance purposes.

So in the event name you might just say

ACTOR: 2
ENEMY: 3
TROOP: 5
PARTY: ???? lol I don't k now

Edited by Tsukihime, 07 August 2012 - 07:34 PM.

himeworks011.png
My scripts.

Avatar by ShinGamix

#7 TheCastle

TheCastle

    Advanced Member

  • Members
  • 154 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 07 August 2012 - 11:20 PM

I went ahead and grabbed a copy of GTBS as reference and have been attempting to figure out how it works. Really interesting stuff learning a lot just looking it all over.
Its also worth noting that GTBS is way more complex than I will ever need for my game. I don't even mind if I hand place every bad guy on each battlefield and the initial party placement is fine if I just reference the formation order... *shrugs*
Its also filled with all kinds of options and customizations. Its a pretty complex thing but I have a feeling that if I build a new battle system I will only need to make it do exactly what I need and leave it at that. Its possible that my battle system will require 1/4rth the code...

Edited by TheCastle, 07 August 2012 - 11:21 PM.


#8 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 2,583 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 08 August 2012 - 02:24 AM

I don't even mind if I hand place every bad guy on each battlefield and the initial party placement is fine if I just reference the formation order


I sort of assumed you were supposed to at least provide some way to create units on the map manually.
I mean, that's how you would usually make an RPG Maker game and seems like the most intuitive way to do make a TBS game.

You might be able to get away with just 1000-2000 lines of code. The main issues is figuring out how to actually accomplish certain things. I think I wrote up 500 lines for something stupid and then figured out I could do it in 50 lines. Stuff like that.

Edited by Tsukihime, 08 August 2012 - 02:25 AM.

himeworks011.png
My scripts.

Avatar by ShinGamix

#9 TheCastle

TheCastle

    Advanced Member

  • Members
  • 154 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 08 August 2012 - 11:49 AM

Yeah that right there is exactly what I have learned from my limited experience coding or scripting for any game... When I came back to Skyrim modding I completely reworked a mod I had made before from scratch and brought it down to a fraction of what it was before while maintaining all of the original design goals.

#10 ultrabonz

ultrabonz

    Soulsearcher

  • Members
  • 17 posts
  • LocationZürich, Switzerland
  • Primarily UsesRMVX Ace
  • First LanguageGerman

Posted 11 August 2012 - 03:14 PM

del.

Edited by ultrabonz, 11 August 2012 - 03:15 PM.

I don't know where my soul is...





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users