Adding Damage Formula spellcasting ability or skill focus. [SOLVED]

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
81
Reaction score
167
First Language
Eglish
Primarily Uses
RMVXA
Hello there quarantine people!

First of all. I will leave a list of the scripts I use. Because the script I am requesting needs to be compatible with my scripts.
Victor Engine - Basic Module
Victor Engine - Trait Control
Basic Window Resizer v1.1
Hime - Effect Manager
Hime - Effect: Set Variable
Sleek Item Popup v1.10
CP Dungeon Generator
Falcao Pearl ABS Liquid v3
Pearl Battle Royale Add-On
Bug Fixes for Falcao's Pearl ABS Liquid v3
Battle Royale + Sixth's ABS Bugfixes Patch
Basic AI Module
Sneak States Addon
Stat Bonus Addon
Tool Restrict Snipper
EXP Bar Fix for Falcao's ABS
Movement Speed Altering Features
Yanfly Engine Ace - Ace Message System
Yanfly Engine Ace - Extra Param Formulas
Yanfly Engine Ace - Ace Equip Engine
Yanfly's Ace Equip Engine: Instance Items patch
Yanfly Engine Ace - Passive States
Yanfly Engine Ace - Party System
Yanfly Engine Ace - Slippery Tiles
Yanfly Engine Ace - Common Event Tiles
Yanfly Engine Ace - Ace Item Menu
Yanfly Engine Ace - Ace Save Engine
Yanfly Engine Ace - Save Engine Add-On: New Game+
Yanfly Engine Ace - Button Common Events
Yanfly Engine Ace - Ace Skill Menu
Yanfly Engine Ace - Follow-Up Skill
Yanfly Engine Ace - Ace Status Menu
Yanfly Engine Ace - System Options
modern algebra - Drop Options
Yanfly Engine Ace - Spawn Event
Yanfly Engine Ace - Adjust Limits
Yanfly Engine Ace - Gab Window
Yanfly Engine Ace - Move Restrict Region
Galv's Shop Upgrade
Tsukihime - Event Features
Jump to point - Snipper
Hime - Item Rarity
Hime - Instance Items
Hime - Item Affixes
Selchar - Random Affixes
Selchar - Instance Equip Leveling Base
Selchar - Equip Upgrade Scene
Selchar - Basic Instance Weapon Durability
Selchar - Basic Instance Armor Durability
Selchar - Equip Repair Scene
Selchar - Weapon Durability Armthrift Effect
Hime - Equip Events
Bravo - Hunger/Thirst/Sleep System
Falcao - Fog effect
modern algebra - Select Any Item
Nicke - Save Maniac
Galv's Move Route Extras
Galv's Variable Instance Bars
CSCA Core Script
CSCA Menu Organizer
CSCA Achievements
Soulpour777 - Expanded Skill Description
Falcao - Mmorpg Alchemy
Hime - Title Large Choices
Galv's Visibility Range
MOG - Weather EX
MOG - Simple Diagonal Movement
MOG - Animated Title A
MOG - Event Sensor Range
MOG - Anti Animation Lag
KMS_MiniMap

Now ermm... *Looks in the spoiler and starts sweating* HA... It is a mess... :aswt:
Anyway!
What I am looking for is to be able to change the damage formula a.atk or a.mat depending on class note tag.
By using a new Damage Formula code.
a.boc * 1
boc = base of class; or something like that.
What does it do? Class 2 has a notetag. <skill luk> Which means that the class 2 with that tag using skill 21 with the damage formula.
a.boc * 1
the a.boc will become a.luk.
If class 3 has a note tag <skill mdf> uses the same skill (Skill 21) that skill damage becomes a.mdf * 1 instead. and so on.
I do not want all the skills to have to use the same damage. Therefor I want to give the skill it's own damage formula tag or note tag.

In any case. If maybe within my scripts there is a way with the Custom Set ups that some scripts have with the damage formulas and someone knows what code to use. That would work for me as well. If it works with the ABS that is.

Thank you for reading hope you understand :aswt:
Stay safe and stay healthy!
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,105
Reaction score
11,445
First Language
English
Primarily Uses
RMVXA
You could go about this in a different way, which would be to designate a specific attack skill for each actor. That way the damage formula for an actor would use the stats that you want. Try Vlue's 'Set Guard/Attack Skills' script.
The only way to tell if it is compatible with your existing scripts is to install it and see what happens. It might be better to put it below other battle and skill scripts.

EDIT
On a different note, looking at your script list does raise some questions. Victor Sant and Yanfly scripts can often clash, and I'm wondering why you have 3 core engine scripts: Victor, Yanfly and CSCA. Do you actually need all those variations?
 
Last edited:

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
81
Reaction score
167
First Language
Eglish
Primarily Uses
RMVXA
You could go about this in a different way, which would be to designate a specific attack skill for each actor. That way the damage formula for an actor would use the stats that you want. Try Vlue's 'Set Guard/Attack Skills' script.
The only way to tell if it is compatible with your existing scripts is to install it and see what happens. It might be better to put it below other battle and skill scripts.

EDIT
On a different note, looking at your script list does raise some questions. Victor Sant and Yanfly scripts can often clash, and I'm wondering why you have 3 core engine scripts: Victor, Yanfly and CSCA. Do you actually need all those variations?
Thank you for your reply Kes.
The Set Guard/Attack Skills is the same as copying 3 times 300+ spells that any class can find.
And it is not about the attack or guard that I'd like to adjust. Its about the 300 spells.

On your different note.
I fully agree with you. But some scripts are needed for 1 of their scripts. Luckily so far I have not encounter any crash or clash or script errors. Mostly it is clashing within an actual "entering battle". My game is an abs so I am on map all the time. It seems to be working fine so far.
For Victor I need his Trait Control to give several traits to races and class. Also I can make awesome equipment doing unique passives.
For CSCA I need his Achievements and mostly I love his achievement set up. Clean and simply nice for me.
And yanfly well everyone seems to like yanfly XD
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,402
Reaction score
499
First Language
English
Primarily Uses
RMVXA
Maybe you could use a custom damage formula for each skill
Ruby:
class Game_Battler < Game_BattlerBase
#==========================================================================
#                              Class Damage
#==========================================================================
# a.class_atk(a, b)
  def class_atk(a, b)
    if a.class_id == 1
      a.atk + a.def
    elsif a.class_id == 2
      a.atk * 2
    end
  end
end
*updated to fix coding
1590845271708.png
 
Last edited:

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
81
Reaction score
167
First Language
Eglish
Primarily Uses
RMVXA
Maybe you could use a custom damage formula for each skill
Ruby:
class Game_Battler < Game_BattlerBase
#==========================================================================
#                              Class Damage
#==========================================================================
# a.class_atk(a, b)
  def class_atk(a, b)
    if a.class_id == 1
      a.atk + a.def
    end
    if a.class_id == 2
      a.atk * 2
    end
  end
end
View attachment 145886
Thank you for your reply Roninator2.
I tested it on the fire bolt spell with the custom formula, adjusted "if a.class_id == 1" to
"if a.class_id == 11", "a.atk + a.def" to "mat" and a new save. But the damage returns to 0.
Even with only the a.class_atk(a, b).
Perhaps I place the Class Damage snipper in a wrong order?
Fire Bolt.png
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,402
Reaction score
499
First Language
English
Primarily Uses
RMVXA
You mean a.mat ?

The formula stays a.class_atk(a,b)
in the script code you put your damage conditions.
if a.class_id == 11
a.mat + rand(10)
end

just keeps it cleaner that way

*edit
if you still get nothing. try finding if it is calling the formula correctly.
Ruby:
  def class_atk(a, b)
    msgbox_p("class attack called")
    if a.class_id == 11
      msgbox_p("class 11")
      a.atk + a.def
    elsif a.class_id == 2
      a.atk * 2
    end
  end
end
this will give you a popup message if it accesses the correct spot.
 
Last edited:

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
81
Reaction score
167
First Language
Eglish
Primarily Uses
RMVXA
You mean a.mat ?

The formula stays a.class_atk(a,b)
in the script code you put your damage conditions.
if a.class_id == 11
a.mat + rand(10)
end

just keeps it cleaner that way

*edit
if you still get nothing. try finding if it is calling the formula correctly.
Ruby:
  def class_atk(a, b)
    msgbox_p("class attack called")
    if a.class_id == 11
      msgbox_p("class 11")
      a.atk + a.def
    end
    if a.class_id == 2
      a.atk * 2
    end
  end
end
this will give you a popup message if it accesses the correct spot.
Yes, I mean a.mat.
The message popup so the script is running. But the damage still returns to 0 even if I use the default set up on the script.
However, I still wish to add the rand(4), rand(6), rand(8), rand(10), rand(12) and so on within the damage formula and than adding the class damage if this is possible. Not only class damage.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
646
Reaction score
422
First Language
English
Primarily Uses
RMVXA
@Roninator2 You just need to adjust the conditional structure to use elsif instead of multiple if branches:
Ruby:
class Game_Battler < Game_BattlerBase
#==========================================================================
#                              Class Damage
#==========================================================================
# a.class_atk(a, b)
  def class_atk(a, b)
    if a.class_id == 1
      a.atk + a.def
    elsif a.class_id == 2
      a.atk * 2
    end
  end
end
You could also do a case branch:
Ruby:
class Game_Battler < Game_BattlerBase
#==========================================================================
#                              Class Damage
#==========================================================================
# a.class_atk(a, b)
  def class_atk(a, b)
    default = a.atk * 4 # you could set a default formula
    return default if a.is_a?(Game_Enemy)
    # ^ terminate beforehand if the attack is being used by an enemy
    return case a.class_id
    when 1
      a.atk + a.def
    when 2
      a.atk * 2
    else
      default
    end
  end
end
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
646
Reaction score
422
First Language
English
Primarily Uses
RMVXA
@Roninator2 Yep; it returned 0 because you had multiple if branches. Ruby returns the last thing it reads, so it would have read the last branch and returned nil.

EDIT: Alternatively, you could've added a return to each branch, but it's generally best to go with a more efficient option.
 

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
81
Reaction score
167
First Language
Eglish
Primarily Uses
RMVXA
Ladies and gentlemen.
The snipper is working so far perfectly.
I have tested it on one spell so far. I will continue the testing after I add the a.class_atk(a, b) to my spells.
Thank you for your hard work both of you.
I will add you both to the credits.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Got inspired and started writing a simple tower defence battle system last night :o
Good news! I have located an amazing 3D website called SketchFab that has rotatable renderings of famous statues!
Picked up a physical copy of Megadimension Neptunia VII for the PS4 today. It's pretty good. I'm having a lot of fun with it.
The only upside of this remote semester was the plenty of funny photoshop material those facecams provided. Not that I would do that. Ever.

Forum statistics

Threads
100,514
Messages
976,696
Members
132,080
Latest member
nwr
Top