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.

[XP] Version 2.8! CTB by Charlie Lee (v2.8) - aka a FFX like Battle System

Status
Not open for further replies.
Updated the first post with version 1.2.
Main changes: Unplayable Reaction.

Basically I have reviewed the code, also on the base of your advices (Trickster's mainly).
Besides I have implemented a FFX-like reaction feature, which I called UNPLAYABLE REACTION. In version 1.1 a player that reacted had a regular turn just after being hit. Now the player attacks the enemy (physically) automatically, and the queue of actions is unchanged (i.e. this is not a regular turn). TODO: the player loses the guard position after the reaction. That is not desired (I guess).
Fixed some bugs regarding reaction and player's states.
Fixed the "enemies behind actors" bug.
Added a few more faces to complete the set.
Used only complete enemy spritesets.

The hunt for the bugs is open.

@Trickster: I had started to compact the code as you suggested, but don't you agree that a single method accepting more parameters and having some conditional branches may slow down the execution? Especially when a method is expected to be executed a lot of times, I would trade synthesis with speed.
About what you said in point 14) of your comment: this code is written in this way for modularity, I can easily change it and try different window layouts. It will be optimized when I decide the definitive layout.
On 16) how would you load an array of images? Editing the string representing the filename?
Thanks.

Enjoy.
 
charlie.lee;284117":1qkjt16r said:
Thank you Trickster for your review. This is exactly what I expected from you experts of Ruby/RGSS.

2) Good, I didn't know.
3) Actually it's not used. I use [a, b].min instead.
8) Does Seph's Window_Selectable give an option for the row_size?
9) Why would this cause errors?
13) What's the problem with self.contents.font.name = $fontface?
14) I can't understand... some .,; please?
18) Is it because it should be @visible_memory?
19) Yes I know, it's a feature that I temporarily disabled.


3) Actually you did use those methods, check your script by using Ctrl+Shift+F and then search for min( or max(

8) I stated how to change the row_size in my previous post (<Window_Selectable>.oh = <Integer>)

9) Diedrupo already mentioned it, also $fontface and $fontface are two globals and you should restrict their use in scripts

13) see above

14) you code that I posted in my previous post was more complex and longer than needed here is a shorter version
Code:
      self.contents.font.name = "MS UI Gothic"      
      self.contents.font.size = 14
      self.contents.font.bold = false
      self.contents.draw_text(x, y, 100, 32, "Name:")

      self.contents.font.name = "Ballpark"
      self.contents.font.size = 18
      draw_actor_name(actor, x + 100, y)


      self.contents.draw_text(x, y + 24, 100, 32, "Class:")
      draw_actor_class(actor, x + 100, y + 24)

      self.contents.draw_text(x, y + 48, 100, 32, "Level:")
      self.contents.draw_text(x + 100, y + 48, 100, 32, actor.level.to_s)

      self.contents.draw_text(x, y + 64, 100, 32, "Exp:")
      self.contents.draw_text(x + 100, y + 64, 100, 32, actor.exp.to_s)

      self.contents.draw_text(x, y + 80, 100, 32, "Next:")
      self.contents.draw_text(x + 100, y + 80, 100, 32, actor.next_rest_exp_s)

      self.contents.draw_text(x, y + 104, 100, 32, "Status:")
      draw_actor_state(actor, x + 100, y + 104)

18) Correct

19) hehe, ok

and to your last comment

"But I will say this, from the looks of your code so far you don't seem to know anything about OO"

Indeed, this is NOT what I expected from you experts of Ruby/RGSS. I don't
believe that. I know all that good OO practice stuff Let me say something stupid: it works after all .
As I said, I started this project very long ago (when I had only japanese comments and no complete help file), and I continued to add features each time I put my hands on it after loooong stops. That's why there is inconsistency and much more code than needed, sometimes I added methods that allowed me not to rewrite too much code.
However the add-ons part is the worst, I know.
Thank you for spending your time on this, I appreciate.

Indeed, this is NOT what I expected from you experts of Ruby/RGSS. I don't
believe that. I know all that good OO practice stuff Let me say something stupid: it works after all .

and this is the argument of generating a working solution vs generating a good solution (speed vs quality). Just coding something that works is good but it does no one any good if you can't come back to it say 6 months later and don't know what the heck you were thinking while you did this. This is all well and good if this is just for you, but other people will be using this and maybe some of them will like to edit your work and here comes the problem. If your code was written well then it should take less time to edit than something that was not coded as well, but if you are writing something just for yourself and you know that you will not be editing it then hack away at your code, otherwise try to put some more thought into it use comments and be consistent.

and the reason why I said you don't have any knowledge of OOP was code like this

Code:
[COLOR=Red]      self.contents.font.name = "MS UI Gothic"      
      self.contents.font.size = 14
      self.contents.font.bold = false
      self.contents.draw_text(x, y, 100, 32, "Name:")

      self.contents.font.name = "Ballpark"
      self.contents.font.size = 18
      draw_actor_name(actor, x + 100, y)[/COLOR]
[COLOR=Blue]
      self.contents.draw_text(x, y + 24, 100, 32, "Class:")
      draw_actor_class(actor, x + 100, y + 24)[/COLOR]
[COLOR=SeaGreen]
      self.contents.draw_text(x, y + 48, 100, 32, "Level:")
      self.contents.draw_text(x + 100, y + 48, 100, 32, actor.level.to_s)[/COLOR]

[COLOR=Purple]      self.contents.draw_text(x, y + 64, 100, 32, "Exp:")
      self.contents.draw_text(x + 100, y + 64, 100, 32, actor.exp.to_s)[/COLOR]

[COLOR=DimGray]      self.contents.draw_text(x, y + 80, 100, 32, "Next:")
      self.contents.draw_text(x + 100, y + 80, 100, 32, actor.next_rest_exp_s)[/COLOR]
[COLOR=Sienna]
      self.contents.draw_text(x, y + 104, 100, 32, "Status:")
      draw_actor_state(actor, x + 100, y + 104)[/COLOR]

In the code in red you could have overwritten method draw_actor_name and have that code in that method

In the code in blue you could have overwritten method draw_actor_class and have that code in that method

and the same thing for the code in other colors

other things like the Color.copy method and teh methods min and max you created (If I remember if you do not put those in a class then it gets placed in either class Object or module Kernel or something else I don't remember, but they are global methods since you can call them from anywhere)

As I said, I started this project very long ago (when I had only japanese comments and no complete help file), and I continued to add features each time I put my hands on it after loooong stops. That's why there is inconsistency and much more code than needed, sometimes I added methods that allowed me not to rewrite too much code.
However the add-ons part is the worst, I know.

ahh okay that explains it, but remember the easiest way to confuse a reader is by having inconsistent material.

and one final word I don't mean to insult you (or anyone for that matter if I make a post in your topic) but I am giving you critique from a programmers point of view (which is rare since you get it from the non-programmers point of view) you don't have to change your code, but it is just a few suggestions. also note that I tell myself the same things when I am looking back at code I previously wrote.
 
Trickster;286590 said:
3) Actually you did use those methods, check your script by using Ctrl+Shift+F and then search for min( or max(

Ah, ah. Yes I found it and changed it, min and max are not in the project now.

Trickster;286590 said:
8) I stated how to change the row_size in my previous post (<Window_Selectable>.oh = <Integer>)
Uhm, I see. But I think that as long as my window classes work well I will keep them. You know... credits... satisfaction... :D
Generally speaking I agree with your point of view, and I have already explained why my code is not in perfect OO style. My only objection was that you gave an absolute judgement from my work in progress code, that imho was too extreme.
Said that, I'm ok, no offense.

@YuiHorie: check this http://www.rmxp.org/forums/showthread.php?t=24730
and/or search side view battlers.

A question for everyone: do you use some IDE for RMXP editing?
 
Sorry for double posting... I have released an update.
Version 1.3 only had minor changes, this is 1.4.

You'll find a new technique: Altruismo.
Altruismo allows to "cover" an ally and to take the damage of a physical attack in his place. The animation system was updated too and the "covering" char now moves himself in front of the "covered" one. Note that he may also perform a reaction if in reaction state!
I have also added a configuration parameter to decide if a char returns to the guarding state after an unplayable reaction.

To do: I want to add another similar technique from FFX that is "Trincea". It is similar to Altruismo but the "covering" char is in guarding state.
I also have to fix a bug for which the learning status window does not recognize when a char has learned some skill with mechanisms different than the implemented FFIX one.
Finally, for the moment, I could introduce a "stay still" element to discern when a skill, or a weapon, are used without moving (Yes, I know, I said that this was not a BS issue, but I can't resist...)

See you soon, and please report any bug.
 
This is great! I think I'll use it :thumb:

Little Italian Translation Note: Consiglierei "Trench" o "Entrench" (Trincea o Trinceramento, insomma) per Trincea, per Altruismo proverei Cover o Altruism...andando sul letterale...
 
Eh, eh. Thank you. I wanted to keep the italian words on purpose... :D
If I had to translate them I would like "cover" for sure... but I don't like "trench" or "Entrench" too much.
I would say: Altruismo -> Sacrifice and Trincea -> Cover.

I have an update BTW. See the first post tonight.
 
Updated with version 1.6.

- Skill learning resume window implemented
- Configurable delays and variance (kind of) for the BS
- Improved behavior for haste-hastega
- Some visual and timing configuration parameters available
- Implemented a configurable multiplier for the level->exp_points relation
 
Is there any way you can update this with a newer version of DVV/Minkoff's animation system? This is a nice set up, don't get me wrong, but the newer version of the animation system is easier for a scripting nobody to use, and has more features.
 
I'm recently working in that direction actually. For example I had altered the numbering of the steps of phase 4 in order to introduce my reflex feature and this had required a simple change to the animation system, now I came back to the original numbering and the compatibility has been increased.
After all my system is a succession of regular battle system turns, in which only one char/enemy takes an action.

There are a few things more that I changed in the animation system: the altruismo/trincea animation (with which the char that covers an attacked ally moves himself in front of the ally and takes the attack instead of him), and the fact that skills classified as techniques need the character to move towards the target and not to stand in the cast position.

As of now if DDV/Minkoff's system is still compatible with the default BS, it should be almost compatible with mine, in the sense that it should not give errors, but some features added by me should not work. I will work on it in the future.
 
NICE! Without trying to sound too noobish (I am new afterall) how do I move the enemy sprites? they are always in the middle at the bottom of the screen for me.
 
finalcloud;292261 said:
NICE! Without trying to sound too noobish (I am new afterall) how do I move the enemy sprites? they are always in the middle at the bottom of the screen for me.

Well, it's not something that you can explain in a few lines. Take a look around in the forums... you need to build up some scripting and/or eventing skills. When you have some familiarity with ruby i suggest you to study some finished systems, such as Minkoff's or similar ones.

@Kyotomaru: see a few posts above.
 
Updated with version 2.0, now including Minkoff/DerVVulfman animation system v10.0!

It looks like everything works fine, also the "Trincea/Altruismo" movements.
The only thing that I have to fix at the moment is the fact that when an enemy uses a skill and the target reflects the skill on it, the "step forward and cast" animation is not shown for the enemy. I suppose that it's because the enemy is the caster and is hit at the same time.
I also needed a little alias to Actor's screen_x to shift the party positions and to prevent them from being behind my turns window. It should not interfere with all the features provided by the animation system (formations and so on...).

Uhm, it seems to me that the frame rate is a little slow... do you confirm?
Bugs-hunters... it's your turn now.
 
@charlie
how do i configure the skill attached to the weapon?
for example, I want to make another skill to be learned by the tech sword?
or i want to make another skill to be learned by my own weapon??

thanks...
 
OK, I resume the general procedure to set skills to be learned by using weapons.

First create your weapon in the Weapon Tab of the Database.
Second go to the Classes Tab in the database and create a new class named exactly as the weapon. Then you can add skills to be learned by adding them in the skills table INSIDE the Classes Tab. You may also want to decide after how much exp points that skill is learned. It is the level that you select in the skills table times the parameter that you set up in the configuration part of my scripts. It's LEARNING_EXP_POINTS_MULTIPLIER, and the default value is 5. So if you select level 10, then that skill will be learned after the player earns 50 points.

Note that if a skill is associated with multiple weapons, the player is able to collect points for that skill with all of them and they get summed.

Hope this helps. Let me know if you (all of you) have any problems.
 
Regarding the 'Actor Command Window' and 'Turn Order Display'

Is there a way to stop it refreshing/resetting when you go from one option to the other? It's understandable to have it refresh when it goes from one battler to the other, but when you go from 'Attack' to 'Item' in the system...
 
Status
Not open for further replies.

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