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.

GTBS v1.5.1.4 - A FFT Styled Battle System (5/19/2010)

1. I thought I resolved that... hmmm.  Well, the skill casting stuff is all contained in the tbs_phase_3 section.  At this point the skill has already been selected and the area drawn, but you must select your target.  If you look at the if Input.trigger?(Input::C) section you may be able to find something that says unless occupied_by? == @active_battler or something.  Just comment it and and the END statement that is coupled with it.. might be a number of lines down.  Otherwise, hold tight and I will get an update.

2. I didnt think of skills like that, that will probably come with the "line skills" update in the near future.

3. Dont Move and Dont Act are simply states that are applied to the character.  So if you would like to apply them to a character, set a skill to apply them.  The AI for these characters should handle it correctly, as for actors (your party) it should just disable the appropriate option before the "turn" is technically started.  See set_active_battler for the if statements that check the current "state" for 21 (dont move) or 22 (dont act) and see that they simply mark the "moved" or "perf_action"(performed action) for the character.  Please let me know if you cannot figure it out.

4. Again, not technically.  There is no limit to the number of summons that can be called to the field and being, unless they die, they will not be removed from the field.  I suppose the only method to stop this would be to create a new group specifically for summons.  You would need to modify many lines of code to have AI and other grab the appropriate groups for skills etc to have it not affect too many things.  I suppose one other way is to search for members of the main part that are neutral and limit that number.  To do that on a skill I would modify the def can_use_skill? function from Game_Party.  Right about where you start to see "return true" statements. 
Do this...
Code:
count = 0
for battler in $game_system.tactics_actors
  if battler.neutral
    count += 1
  end
end
if count > 3  #this is the magic number!
  return false
end

That annoyed me also, I already have it reported as a bug and am trying to figure out how to prevent them from gaining exp if they are missed.  I also eventually wanted to enable gain of job points to work with my job system I am working on, but that is a ways down the road.

EDIT:
It has come to my attention that the animated demo the main character doesnt run his "attack" pose when he is told to.  This is because the bronze sword in the database is not set to the correct animation id.  Change it to ANIM Attack! (I think that is 105 or 106) and it will work after that.  Sorry about my little messup.
 
1. I thought I resolved that... hmmm.  Well, the skill casting stuff is all contained in the tbs_phase_3 section.  At this point the skill has already been selected and the area drawn, but you must select your target.  If you look at the if Input.trigger?(Input::C) section you may be able to find something that says unless occupied_by? == @active_battler or something.  Just comment it and and the END statement that is coupled with it.. might be a number of lines down.  Otherwise, hold tight and I will get an update.

I wasn't able to find anything like this, so I guess this will have to wait. I was able to correct the Don't Move/Don't Act though, so thank you.

Also, I had scripted a battle that took a while and about halfway through the screen stopped scrolling. Any idea why this happened/how to fix it?
 
I was playing around with it and the self skill problem seems to have 2 problems. 

1. ranges dont draw because they are not told to do so.
add a ",7" to the end of line 1922 in Scene_Battle (without the qoutes)

2. Active_battler cannot be the target of skills.  (I think this was put in place due to some skills actually "duplicating" the character causing them to go faster and other sort of problems... but as a quick work around.
Change the line 2424 in Scene_Battle from
if (GTBS::is_summon?(@spell.id)>0 and occupied_by?(@cursor.x, @cursor.y)!= nil) or @selected == @active_battler
to
if (GTBS::is_summon?(@spell.id)>0 and occupied_by?(@cursor.x, @cursor.y)!= nil) and @selected == @active_battler


tofurkey..
I noticed a bug somewhere in the scrolling and so it should be resolved with the new update. (I completely re-wrote it)
 
Ok, that worked fine, although this allows me to target attack skills on myself as well. I suppose that can't really be avoided, but I just thought I'd let you know.

Do you have a list of planned additions/fixes for this update like you did last time?
 
Tell you what... change it to this...
if (GTBS::is_summon?(@spell.id)>0 and occupied_by?!=nil) or ([1,2].include?(@spell.scope) and @selected == @active_battler)

That says... if its a summon and the square is taken... or if spell is attack skill and target is active_battler... error, else carry on if targets > 0

I am working out a list for the new update.  I am going to try taking on line skills.  I need to re-write the targeting module to get that to work.  Plus this will open the door to a couple new features.  Like if you step off the targetable tiles the target disappears and when you return in range, then it will reappear (like Vandal Hearts 2).  I was also looking at updating the AI and some ideas on how to make it faster. (setting flags on characters as we play instead of finding it all at the time of the move.( should be easyish... so I guess we will see.  Plus you can count on some bug fixes and a couple of other new features: AoE settings for weapons (this was a request), skills such as "spin fist" (attack all sides).  I need to review my log of what is remaining and give you the rest of the list, but that will wait til later.
 
I really like this battle system. One of my favorites :] You did and awesome job on this.
but
I'm getting an error  :'( After any battle, exactly after it tells you what Items you found, this error occurs
http://i203.photobucket.com/albums/aa259/Sketchizt/problem.png[/img]
The line the error is one says:
window.dispose

But what I can tell, this error does not occur if you dont find any items from the battle

The only scripts im using are this one, fukuyama's caterpillar, ccoa's UMS, wyatt's desert heat, near's pathfinding, cogwheel's bars, and some a mog's menus
 
please provide me with a demo of your project.  I havent seen this problem during testing or during my demo builds of the system.  Many other people have also used it without this error, so I wonder what you are using that is causing this error. 

Edit: On second thought try removing the Catipillar script and see if the error goes away, I heard there was one that seemed to have problems.  Maybe its fukuyama's.
 
I tested it again..and for some reason, that error isn't happening anymore.
One time with the caterpillar, and one time without it.
I tried it a few more times just to be sure. I don't know how it fixed...but, I guess the problem is solved.
Sorry ><
If the problem ever happens again, I'll send you a demo :]
 
Well whatever it is, I added a quick statement to prevent it anyway.  On the line where it disposes the windows.. window.dispose add unless window.nil?..  so the total line would be...
window.dispose unless window.nil?
that way it wont perform the dispose function if the window is nil/null and for some reason exist.
 
Hi Gubid,

I encountered another problem, or at least it seems like a problem.

I want to have a battle with neutral characters on my team. However, because I had already scripted a battle beforehand that used neutrals, I ended up not being able to make the neutral #50, since that was taken.

However, in this new battle, the two neutrals that I am using (51 and 52) are unable to be referred to. The guide says to call it "neutral2" and "neutral3" on the map, but when I run the battle, I get this error:

Script '-Scene_Battle_TBS-' line 344: NoMethodError occurred.

undefined method '+' for nil:NilClass

It works fine if I have neutral1 and neutral2, but then I have the problem of having the wrong guest in the battle.
 
I love you...

*clears throat* um, after reading the script I still don't know how to have more than 8 enemys in a troop. could it be explained to me?
 
*clears throat* um, after reading the script I still don't know how to have more than 8 enemys in a troop. could it be explained to me?

Go to the Extra Troop Members script in your Script Editor. You should see something like this near the top:

##sets when troop_id, then add enemy, by id
    case troop_id
    when 34
      extras = [33, 33, 37, 37] #each item is a enemy number

The first 34 refers to the troop number in the database. Make a new case and change that number to reflect whatever troop ID is going to have more than 8 troops. If you want more than 8 troops, add the enemy ID number of whatever extra enemies you want into the extras = []. Then on the map, just add extra events like enemy9 and enemy 10 and they will be filled in according to whatever numbers are in the extras = [].
 
tofurky.. thanks for the help there..

on your problem, are you using the first release of the code?  I fixed it in the update to only use the values returned instead of checking for all in-between that may not exist... Here is the code that it should be using the calculate the neutral characters
Code:
    #place neutral characters
    for n in neutral_num
      actor = $game_actors[n+50]
      if actor != nil
        $game_actors[n+50].setup(n+50)
        actor = $game_actors[n+50]
        actor.neutral = true
        $game_system.tactics_neutral.push(actor)
        actor.place(neu_location[n].x, neu_location[n].y)
        @friendly_loc.push(neu_location[n])
        @spriteset.battler_sprites.push(Sprite_Battler.new(@spriteset.viewport1, actor))
      end
    end
That should start around line 340 or so.
 
Ok, I figured it out.  I will use a different method to get around this in the future, but here is a interim solution..

Replace the neutral placement code I gave earlier with this.. .
Code:
#place neutral characters
    for n in neutral_num
      unless n ==nil
      actor = $game_actors[n+50]
      if actor != nil
        $game_actors[n+50].setup(n+50)
        actor = $game_actors[n+50]
        actor.neutral = true
        $game_system.tactics_neutral.push(actor)
        actor.place(neu_location[n].x, neu_location[n].y)
        @friendly_loc.push(neu_location[n])
        @spriteset.battler_sprites.push(Sprite_Battler.new(@spriteset.viewport1, actor))
      end
      end
    end
 
Very, VERY impressive update.
Nice job.

I have one small question though. I imported the script into my game. Everything runs smoothly untill the battle is over. I see my gold go up, the items I found and then the lvl-up and congratulation text. Yet after that I get the following error:

http://home.planet.nl/~Lisker/RPGMaker/ ... /error.png[/img]

Now the line where it goes bad is just this (Red Line is line 31 in the module):

for window in @windows.values
window.dispose
end

My project is the same as the one I sent you before. Nothing has changed scriptwise but yours.

I hope this is enough info for ya.

-Lisker
 
@Lisker
I reported that same exact problem a few posts up :P
Gubid said how to fix it about 9 posts up from yours :]

But anyway. It works fine now without any problem at all.
 
I'm having a problem, evry time I go to a map for to do a battle (this only happens on the one map) the game freezes and a little window pops up that says "Script is hanging". how do I fix it?
 
Zammysoul":2z4lhm83 said:
@Lisker
I reported that same exact problem a few posts up :P
Gubid said how to fix it about 9 posts up from yours :]

But anyway. It works fine now without any problem at all.

Oh did he? ROFL my bad for posting when drunk. Thanks a mil <3.

Anyway great TBS.
 

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