Posts: 1,128
Threads: 43
Joined: May 2009
Preview, preview, oh, I like previews...
As you can see I'm working on enhancing the configurability of the BS's appearance.
Here the skill selection window uses its own skin, with personalized font color, and it has custom position, sizes, text size, opacity... all set from the configuration, no need to find these settings within the script anymore...
EDIT: all started when I noticed that with the current settings you can't see how many MPs the active battler has while you're selecting a skill, as the battle status window gets covered...
Posts: 1,128
Threads: 43
Joined: May 2009
I'm working on new battle formulas.
Here is what I have at the moment for skills with power>0.
Code:
# A base value of damage is calculated from the skill's power
# Optionally the skill's power can be used as an exponent
attack = (skill.is_exp_damage())?Math.exp(skill.power/10.0):skill.power
# This multiplier is based on the caster's parameters and the F modifiers of the skill
stats_multiplier =
user.str * skill.str_f / 100 +
user.dex * skill.dex_f / 100 +
user.agi * skill.agi_f / 100 +
user.int * skill.int_f / 100 +
user.atk * skill.atk_f / 100
# The modifier is used only if not zero
# If the modifier is zero the damage will not depend in any way on the caster's stats
attack *= stats_multiplier unless stats_multiplier == 0
# Element tagging can be used to increase the skill's power
attack *= 10 if skill.is_damage_x_10()
# This is configurable and lets you adjust the range of damages
attack *= 0.1
# mdef_f and pdef_f indicate what percentage of the skill's power can be neutralized
# with mdef and pdef
defense = [attack * skill.mdef_f / 100, self.mdef].min +
[attack * skill.pdef_f / 100, self.pdef].min
# The standard element correction
attack *= elements_correct(skill.element_set)
attack /= 100
# The final result
power = [attack - defense, 0].max
I'm gonna get rid of the distinction between skills and techniques, because it has been confusing for users and because you can easily reproduce them with the new formulas.
I'm interested in comments and ideas.
Posts: 627
Threads: 38
Joined: May 2009
Can you make it so that the user can make their own battle formulas? The way it's set up right now, I think I read on another forum that you can't get stronger if you don't have better attack power or something like that. But my characters stay with 1 weapon. Is there any way to change that?
Also, do you know of any blue mage scripts that would work with this battle system?
My partner in crime = TREXRELL
Posts: 1,128
Threads: 43
Joined: May 2009
That was a problem with the old formulas. The stats had too little influence on the damage (and this led someone to think that there wasn't any at all).
Now (I mean from version 2.12 onwards) you can set up a skill so that the damage depends on Attack, Strength, Agility, Dexterity, Intelligence or a combination by using the ATK-F, STR-F... fields in the database editor, in a similar way as with the default BS.
Writing new formulas is a matter of ten lines of code, the largest part of the work is to design them, so I don't think I'm going to write something configurable. Also a beginner scripter can easily edit this part.
As to the blue magic script I saw something on youtube recently, try searching for videos showing tests with this BS.
Posts: 627
Threads: 38
Joined: May 2009
What 10 lines do I have to edit to change the damage? I've looked at the script and I really didn't understand what was going on. I tried to make it so that when you attack, you get 3% MP and when you defend, you get 5% HP. But I couldn't find the one for defend and when I made it heal MP with the attack, I realized that the enemy was healing when they attacked too. Not a bad feature, but not what I was going for, so I deleted it. About the blue mage script, I never thought to look on youtube, I'll try that, thanks.
My partner in crime = TREXRELL
Posts: 1,128
Threads: 43
Joined: May 2009
Yin,March 13, 2009 02:19 am Wrote:I tried to make it so that when you attack, you get 3% MP and when you defend, you get 5% HP.
Well this is not about the damage formula then.
You want the player to get MP or HP depending on his action. I could add something like this in the future. I could make a little add-on...
Posts: 627
Threads: 38
Joined: May 2009
Yeah, thats not about the formula, thats just something I was trying to do.
My partner in crime = TREXRELL
Posts: 1,128
Threads: 43
Joined: May 2009
Continuing with the presentation of the battle formulas here are the basic calculations for physical attacks:
Code:
# Calculate basic damage
if MNK_STATIONARY_WEAPONS.include?(attacker.weapon_id)
power = attacker.atk * attacker.dex
else
power = attacker.atk * attacker.str
end
power *= ATTACK_DAMAGE_RANGE_CORRECTION
defense = self.pdef
power = [power - defence, 0].max
Here, the result will depend linearly on the attack value of the used weapon, and on one parameter of the user: the strenght for close combat weapons, and the dexterity for ranged weapons.
Posts: 627
Threads: 38
Joined: May 2009
Looks like it's coming along well so far. And the preview looks nice. I never really gave it any attention (the MP not being in sight while choosing). Can't wait for the update!
My partner in crime = TREXRELL
Posts: 4
Threads: 0
Joined: May 2009
Charlie, I love your battle system so much. I seem to have found an issue with your new version. I am using the Multislot Equip Script and when you go to the Status Window it removes the ability to change the Overdrive type. The font of the font of the screen is bolded then when you press Shift it goes to regular. Before and after pressing Shift it does not show the bar on the top or the "Shift" button graphic. Thanks. I hope this error can be corrected. I love this battle script.