Design-level questions regarding RMXP's DBS

Started by Fantasist, May 24, 2010, 03:05:29 pm

Previous topic - Next topic

Fantasist

May 24, 2010, 03:05:29 pm Last Edit: May 24, 2010, 03:07:10 pm by Fantasist
OK, I've been holding back for some time now, but I need help with this. Here's the deal:

I'm trying to implement the concept of "Stamina", where an actor has no HP or SP, but Stamina. All actions (Attack, using physical or non-physical skills, or getting hit while defending), use stamina. So there's no point for the regular "Attack" option in battle. I want everything to have a stamina cost. So I plan to stop using Game_Battler::attack_effect altogether. For this reason, I want to know the difference between attack_effect and skill_effect. What does attack_effect do that skill_effect doesn't already?

LONG VERSION: ShowHide
I'm trying to come up with some changes to the DBS and it starts with the concept of Stamina. Basically, an actor doesn't have HP or SP, but Stamina. Every action except "Do Nothing" and "Defend" take some points out of stamina. When stamina reaches zero, the actor "faints" or is KOed. Every action, be it a skill (Kamehameha), physical attack (Roundhouse Kick) or a combination of both (Going into KaioKen and delivering a punch) takes points out of stamina. Also, any damage taken is in terms of stamina, not HP.

Stamina itself is a derived stat. For ease of calculations, I've simply added HP and SP. So basically, "Max_Stamina = Max_HP + Max_SP". To achieve this effect and to simplify the process, I'm using HP as the base condition for consciousness, so that all the internal functions like "dead?" and hp0 will work.

Now, I have an equipment system in mind that resembles EQUAP. Basically, some skills are attached to weapons and equipping them will give you access to those skills. For example, you can use "Slash" with any kind of sword equipped.
Since I want every action to use stamina, I thought about completely removing normal attacking and associate a skill with each weapon. So when I select "Attack" in the battle menu, the "Slash" skill is executed and cuts points from stamina. In effect, the method Game_Battler::attack_effect is never used. For this reason...

I want to know the difference between Game_Battler::attack_effect and Game_Battler::skill_effect. So far, all I've noticed is that skill_effect does everything attack_effect does, except critical damage correction. Is this right, or is there anything more to it? Also, attack_effect simply uses attacker's ATK and defender's PDEF for damage calculation. It also adds attacker's STR into the mix:

      # Calculate basic damage
      atk = [attacker.atk - self.pdef / 2, 0].max
      self.damage = atk * (20 + attacker.str) / 20


But a skill configured with an attack factor (ATK_F in the database) does more or less the same thing:

      # Calculate power
      power = skill.power + user.atk * skill.atk_f / 100
      if power > 0
        power -= self.pdef * skill.pdef_f / 200
        power -= self.mdef * skill.mdef_f / 200
        power = power.lbind(0)
      end
      # Calculate rate
      rate = 20
      rate += (user.str * skill.str_f / 100)
      rate += (user.per * skill.dex_f / 100)
      rate += (user.agi * skill.agi_f / 100)
      rate += (user.qsn * skill.int_f / 100)
      # Calculate basic damage
      self.damage = power * rate / 20


skill_effect doesn't use ATK, STR and PDEF directly like attack_effect, but all of them are factored, in a much more controlled way if you ask me.

So basically, is it okay if I stop using attack_effect altogether? I can move the critical damage calculation into skill_effect with a condition checking if the skill is physical (ATK_F > 0). Can I do that?
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Jragyn

Why not just comment it out and find out what happens?

I agree with your opinion that the skill_effect method seems alot more controlled than the attack_Effect, thus why I always end up re-writing the damage algorithm for regular attacks...never really considered it though to the extreme your planning on going here.

In suggestion, perhaps you should consider using or writing a script that simply removes the 'attack' command, and adds direct skill usage into your command box? ie: FF6 has direct skill usage of things like 'Shock' or 'Steal', but well...you could tie in direct skills like Slash or Super Slash... etc. Of course this could get lengthy in regards to command window hieght... but hey, ideas? :D I like this idea you have.


--J
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Fantasist

First off, thanks for the reply :)

QuoteWhy not just comment it out and find out what happens?

But it's not that simple, is it? I'm not just testing a line of code, I'm trying to figure out how the numbers work. I need to analyze the effects of using skills always, and how it will affect the game balance. TBH, what I really needed is a tute on how to configure skills. I've spent an hour checking out the Database window and skills in some RMXP games. I've tried a few things and I think I'm getting a hang of what values to use.

I'll let enemies use normal attacks, but actors will only have skills.

QuoteIn suggestion, perhaps you should consider using or writing a script that simply removes the 'attack' command, and adds direct skill usage into your command box? ie: FF6 has direct skill usage of things like 'Shock' or 'Steal', but well...you could tie in direct skills like Slash or Super Slash... etc. Of course this could get lengthy in regards to command window hieght... but hey, ideas? :D I like this idea you have.

I can handle the interface, but I first need to decide exactly what I'm going to do before I waste time on it. The idea so far is that every actor has a basic skill (weapon-less). If the actor doesn't have anything equipped, "Attack" uses the basic skill. If any weapon is equipped, "Attack" uses the basic skill of that weapon. So you start out without a weapon, and attacking will execute the skill "Punch". As soon as you equip a weapon, the weapon's basic skill is assigned (equip a sword and you'll get "Slash"). You can also customize what to assign to "Attack" in the menu.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Jragyn

So the "Attack" command, essentially, is like...attack with whatever your holding?
"Attack" then becomes a generic command that will entail the details of whatever the player defines?

Well, on the note of commenting out the "attack_effect" definition, I notice it only pops up twice in the entire RTP set of scripts at all, once as the >def attack_effect< and another in Scene_Battle4, under the >def make_basic_action_result<, leading me to believe that getting rid of it would mean you'd have to redefine how enemies make their normal attacks, or you'd have to make up a new one for how actors use their 'attacks'.

When I really sit down and think about this, my head kinda hurts, lol.
Sorry if I'm just stating what you've already stated, or already thought about.
I know it helps me if I throw out all the facts and then look once more :]

Its kinda funny you throw out a topic like this though, because I recently began a project involving not the stamina system, but the idea of weapons determine your attack methods(skills) and thus why I suggested to you the idea of just utilizing a script that creates direct commands in battle.

I can send you a brief lookie if your interested :D (though this doesn't solve your hp/sp/stamina fun)


--J
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Fantasist

QuoteSo the "Attack" command, essentially, is like...attack with whatever your holding?
"Attack" then becomes a generic command that will entail the details of whatever the player defines?

Pretty much. Or, I'll disable the player config thing. Or, simply make Attack repeat the previous action (whatever skill the user used previously). Or I'll dump the whole thing, who knows.

PS: Just realized this topic is pointless ;_;
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews