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.

Help in actually using GubiD's Tactical Battle System

I tried the demo and I must say, its very good. The instructions to import it to another game was helpful. But now what? Is there a set of instructions for how to work with the TBS?


If not, I have several questions...

1) How do you start a tactical battle on a map? What script(s) need to be run and how?
2) What events need to be run for the battle to start and end?
3) Do you have to write a new script for each battle?
4) How many enemies per battle are allowed?
5) How do I designate an enemy to be handled by the tbs script?
6) Are the stats of heroes and enemies imported?
7) Is there a template for Gtbs battle sprites?

I may have more questions later. Thank you if you can help.
 

boon

Sponsor

mavis_d6":19fys1qu said:
I tried the demo and I must say, its very good. The instructions to import it to another game was helpful. But now what? Is there a set of instructions for how to work with the TBS?


If not, I have several questions...

1) How do you start a tactical battle on a map? What script(s) need to be run and how?
2) What events need to be run for the battle to start and end?
3) Do you have to write a new script for each battle?
4) How many enemies per battle are allowed?
5) How do I designate an enemy to be handled by the tbs script?
6) Are the stats of heroes and enemies imported?
7) Is there a template for Gtbs battle sprites?

I may have more questions later. Thank you if you can help.

I've tried to answer these as best as I can. It's been a very long time since I've used it.

1. As far as I'm aware, this was able with events alone which are described in the script/demo.
2. -
3. No, you do not have to write a new 'script'. There is one script. You do have to write new events.
4. I think it's unlimited, however too many enemies can slow the game down and bore the player.
5. -
6. Yes, the sats of the heroes and enemies come from the database.
7. I thought the battle sprites were just the characters?
 
There's a help file within the scripts that'll tell you the answer to all of those questions.

If you imported it directly from the demo, it's called GTBS_General_Help and should be all the way at the bottom of the imported scripts above Extra_Troops
 
Okay. New problem.

This time it is after the battle is over. The victory conditions display, then gold is given. Then I get an error.

"Unable to find Data/Map004.rxdata"

So I created a map004 just to see what happens, and it telelported my character to it!

Could someone tell me why the system is doing this after any GTBS battle, and if there is a way to stop it?
 
Everything dealing with things you can change in the script is labeled and documented with explanations on how to do certain things. I'll answer your question this time, but please look at the config scripts themselves before asking these kinds of questions. The help files and the comments (green text) are there for the specific purpose of showing you the basic ways of doing things.

The one you need to change in this instance is in the GTBS_Open/Exit_Info script. I don't have RM on this computer, so I can't tell you exactly what to do, but from what I remember the top set of cases is what you change to have a battle on a different map than the calling map.

The bottom set of cases controls where you get sent after a battle. If you want to retain the same map, then remove the case with the calling map ID from that set. This area is only for a case in which you want to be teleported to a different map after the battle.
 
I read the instructions that described the script. No disrespect to GubiD but this isn't described very well. When reading it, I am not even sure what is what or what I am supposed to do. Believe me, I am reading each instruction word-for-word but these instructions don't tell me how to do anything.

OpenExitScript.jpg


For example. The instructions...
# [
# Return to calling map and position(True, False),
# Goto Map_ID(only used if first if false),
# Return to [X, Y] on specified map,
# Return direction
# ]

...leave me very confused. Am I supposed to type these somewhere? Or are they supposed to alter this somehow?

def self.battle_exit_info(map_id)
case map_id
when 1; return [false, 1, [16,15], 4]
when 3; return [false, 4, [5,14], 8]
else; return [true, 1, [1,1], 2]
end
end
end

And if so, how this causing the teleport to a map004 and how do I stop it? Sorry for being so newbish about this and thanks for your help.
 
Sorry for coming off so annoyed, but this seemed pretty self-explanatory to me, but on further inspection I can see how someone could be confused. I'll break this section down bit by bit for you.

The top part says:
Sets battle_scene to change if called from specified map, otherwise it is self

Below it is part of the script.

This part of the config is for having a battle on a different map than the one that you run the Battle Processing event from. This means that if you don't change ANYTHING in this section, your battles will only take place on the map that you call them from. Random battles, forced battles, etc. If this map's ID # is 1, then it will take place on map ID #1.

If you wanted to have it different from that, though, then you would change the following section:

def self.battle_map(map_id)
case map_id
when 1; map = 1
when 22; map = 25
when 41; map = 30
when 44; map = 45
when 46; map = 47
when 49; map = 51
else; map = map_id
end
return map
end

I took this from my own project so you can see what's going on here and what needs to be changed. As you can see, the only thing that you change here is ADDING NEW WHEN STATEMENTS. On my map ID #49, I have the battles take place on map ID #51, and so on and so forth.


Now, for the problem that you're having, it deals entirely with the bottom half of that script, "EXIT BATTLE INFORMATION." This means that any cases listed in the section below will teleport you to another map after the battle takes place on the given map. You'll understand better once I explain what the settings mean.

The settings that have you confused are in reference to the WHEN statements that you need to add or change in the script area below it. GubiD lists them in the order that they must be entered in the WHEN statement. Again, here's an example from my project:

def self.battle_exit_info(map_id)
case map_id
when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 22; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 29; return [false, 34, [1,11], 8]
when 31; return [false, 32, [14,6], 2]
when 30; return [false, 33, [10,4], 2]
when 41; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 44; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]
when 49; return [false, 52, [16,9], 4]
else; return [true, 1, [1,1], 2]
end
end

To add a new situation, you have to create a new WHEN statement here, as I have done in my project. Let's break down the numbers so you understand this better.

when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]

when 1:

This means, when the map ID is 1. Replace this with a different map ID # if you want to have a battle that takes place on that map to transport you somewhere else after it's done.

Now here comes the things that GubiD lists that you should be inputting:

when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]

This refers to what Gubid listed as "Return to calling map and position(True, False)"
Simply, if you want to go back to the same map and the same location that you got sent to the battle from, leave it marked as true. If you plan on marking this as True, then you shouldn't bother making a when statement for that map ID, as the default is set to True unless you change it.

If you mark it as False, however, that means that you DO want to be transported to a different map after a battle on the map ID # from earlier.

when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]

This is what Gubid refers to as "Goto Map_ID(only used if first if false)." Simply put, if you chose true in the first variable, then it doesn't do anything. If you chose false, however, change this number to be teleported to whatever map ID you want to go to after the fight.

when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]

This is what Gubid refers to as "Return to [X, Y] on specified map," or the coordinates you want to be teleported to on the new map (if you chose false). It looks a little complex because it uses scripting commands, but if you leave it like that ($game_player.x,$game_player.y) that will mean it will return you to the same coordinates as when you first called the battle. If you were at [5,6] before the battle began, then you will be transferred to [5,6] on the new map.

when 1; return [true, 1, [$game_player.x,$game_player.y], $game_player.direction]

Again, this is simply the direction you'll be facing once you are sent to the new map. Use that command if you want to face the same direction you were before the battle started; otherwise, change it to either 2 (down), 4 (left), 6 (right), or 8 (up). I'm not sure if those numbers match the directions, but those are the four numbers used for directional coding.

So in a simpler format,

when calling_map_id_#; return [is_this_a_new_map?_t/f, new_map_id_#, [new_x_coordinate,new_y_coordinate], direction

Just replace the text with the appropriate value. When in doubt, refer to the sample that GubiD gives you to match up formats.


So now that you know how that script area works, you should be able to identify your problem by now. If not, then I'll spell it out plain and simple here:

when 3; return [false, 4, [5,14], 8]

Let's pick this apart with the new understanding of the script.

The calling map ID is 3. That's the number directly after the "when."

It's marked false, which means that a battle on this map WILL send you to another map, which is the number that follows directly after.

4.

Your problem first came in the format of you not having a map ID #4. You got this error because the script was trying to send you to map #4 because of the conditions listed above. Now that you have a map id #4, the script is trying to send you there because the config tells it to in the above statement. How do you remedy this problem? Delete this line of code. NOT THE WHOLE THING. Just:

when 3; return [false, 4, [5,14], 8]

Elsely, if you want to leave it there as an example, just change the false to a true and it'll disregard the sending to another map completely.
 

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