Save-Point

Full Version: Save-Point
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Board Message
Sorry, you do not have permission to access this resource.
Save-Point - The GTBS amending Game_Battle 3 (RTP script)?

Save-Point

Full Version: The GTBS amending Game_Battle 3 (RTP script)?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The GTBS amending Game_Battle 3 (RTP script)?

Hello all.
I use GTBS 1.5.1 for RMXP, and I made drastic changes in Game_Battle 3, with regard to the calculation of basic damage. However, despite working on a new project, the changes are ignored when tested in the battle system GTBS. I believe this is because the GTBS self.damage rewrites or other values ​​defined in Game_Battle 3. This occurs? Where?

Here are some changes that I made, that work on new projects:

Game_Battle 3, without modification, line 49, 50 and 51
Quote:# Calculate basic damage
atk = [attacker.atk - self.pdef / 2, 0]. max
self.damage = atk * (20 + attacker.str) / 20
my modification



Quote:# Calculate basic damage
atk = [attacker.atk/2 + rand(attacker.atk)/2 - self.pdef/2, 0].max
self.damage = [atk + 2 * attacker.str - (self.base_maxhp/100 + self.str/10)/2, 0].max
Basically, the standard form considers the Attack Gun constant. And then make an account there with crazy strength times the variable 'atk'. However, when self.pdef be 2x larger than attacker.atk, atk = 0, and self.damage = 0. So if Goku uses a wooden sword and slams it against you defend yourself with a dining table, you will not suffer anything. I do not think that makes sense, so I made my own.

It worked very well, but not in GTBS. Does anyone know if it is rewritten in self.damage GTBS?
GTBS's tactical system is actually entirely separate from the turn-based battle. You can even use both if you want! The place you want to look for tactic damage is
Code:
def make_attack_damage_value(attacker)

Also! GTBS XP is at 1.5.2 and it fixes some important bugs. Consider updating.
Dude, thank you. I've been given a lot of work, right?
Well, I found the method on line 3163 make_attack_damage_value the GTBS v1.5.1 - Part2, but found none to manipulate numbers to calculate the damage, as in Game_Battle 3 near line 55.
For example, in 3281 the same line GTBS v1.5.1 - Part2 is recalculated Evasion. There I have numbers to move and change the value. In the calculation of damages, I found nothing about recalculate.

Forgive the horrible English.
Dude, thank you. I'm giving a lot of work, right?
Well, I found the method make_attack_damage_value on line 3163 in GTBS v1.5.1 - Part2, but found none to manipulate numbers to calculate the damage, as in Game_Battle 3 near line 55.
For example, in line 3281 of the same GTBS v1.5.1 - Part2 is recalculated Evasion. There I have numbers to move and change the value. In the calculation of damages, I found nothing about recalculate.

Forgive the horrible English.
Oh oops! No, the one you want is in part 3. In my copy it starts on line 874. It looks like;
Code:
def make_attack_damage_value(attacker)
    damage = attacker.atk * 4 - @actor.def * 2        # base calculation
    damage = 0 if damage < 0                        # if negative, make 0
    damage *= elements_max_rate(attacker.element_set)   # elemental adjustment
    damage /= 100
    if damage == 0                                  # if damage is 0,
      damage = rand(2)                              # half of the time, 1 dmg
    end
    amp = [damage.abs * 20 / 100, 0].max
    damage /= @actor.super_guard ? 4 : 2                   # guard adjustment
    return [damage, amp]
  end
Thank you so much!
Now it is very likely that my problem is resolved.

Should I upgrade to version 1.5.2 for GTBS, I'll need to redo all the settings and ajutes in all scripts? Or I can just install the patch update, without having to copy the whole script?
I really have customized a lot of other scripts GTBS, as I did this damage calculation ...

EDIT


I think I rushed ...
Well, I made some changes and was thus the first part:

Code:
def make_attack_damage_value(attacker)
damage = [attacker.atk/2 + rand(attacker.atk)/2 - @actor.pdef/2, 0].max
#damage = attacker.atk * 4 - @actor.def * 2        # base calculation
#damage = 0 if damage < 0                              # if negative, make 0
damage += [2 * attacker.str - ((@actor.base_maxhp/50 + @actor.str/5)/2).round, 0].max
damage *= elements_max_rate(attacker.element_set)
# elemental adjustment    damage /= 100
#if damage == 0                                                # if damage is 0,
#  damage = rand(2)                                          # half of the time, 1 dmg
#end
amp = 0                                                            #[damage.abs * 20 / 100, 0].max    damage /= @actor.super_guard ? 4 : 2
# guard adjustment    return [damage, amp]
end


Note that even if the attacker.atk (which I think is the attack of the weapon) is zero, the final damage is not zero. There is a damage bonus equal to 2x the attacker.str


Even so, an unarmed character / attack with 0, 1 or a very low value, keeps giving 0 damage. Am I wrong setting? In Game_Battle 3, the constants used to define those who suffered the attack were like 'self.pdef', and now I'm writing in GTBS '@ actor.pdef', to follow the pattern. Is this correct?
Furthermore, in 3 Game_Battle damage is called 'self.damage', and here is just 'damage'.
@actor is the person being attacked, yes.

It looks all correct to me! But do note that even if there is bonus damage, it can still be 0 if @actor's maxhp and str are high enough.
For me it also seems to work. But it does not work .. I'll try to modify the rest of the script. What about STR and HPMax who suffers the attack, I doubt that at some point be enough, the denominator is too high.
Do you know if I need to re-add all the script to upgrade to version 1.5.2? Because I modified almost everyone, and I'll have to do it all again ...

Thank you for your help, buddy.
(03-24-2013, 12:25 AM)inominavel07 Wrote: [ -> ]Do you know if I need to re-add all the script to upgrade to version 1.5.2? Because I modified almost everyone, and I'll have to do it all again ...
Just try adding in the bugfixes I sent you a PM about. If they modify the same things you do, you'll have to do those again, but I doubt you modified the pathfinding and similar.