Telemindred

Telemindred the Archmage
Member
Joined
Mar 12, 2020
Messages
20
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Alright, so I'm needing/looking for any script out there which can alter the critical damage that's dealt when an attack lands a critical hit. To be clear: I'm not looking to change the overall critical damage in the system, I've already learned how to change it from x3 to any other number. What I'm needing is a script that allows me to alter the critical damage for each individual skill. My goal is to have certain weapon skills have a higher chance of critical hits, and higher critical hit damage, than other weapon skills. So far I haven't found anything, and I'm still learning about scripting basics and am unable to make one myself as of right now.

Does anyone know of any scripts out there that I could use?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,188
Reaction score
839
First Language
Hungarian
Primarily Uses
RMVXA
Try this script:
Not tested, but it should work.

But be aware of compatibility issues.
Due to how the default code of the engine handles damage calculations, overwriting the method is the only way to change the damage at the right place.
The damage calculation method is probably one of the worst coded part of the default engine. >.>
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,064
Reaction score
7,168
First Language
Indonesian
Primarily Uses
RMVXA
@Sixth you could just "delete" the default apply_critical and use another method that accepts an item as a parameter then use the critical calculation there. For example, in the ActionResult --> make_damage.

But I don't disagree that it is one of the worst code in the default code.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,188
Reaction score
839
First Language
Hungarian
Primarily Uses
RMVXA
Modifying the make_damage method in the ActionResult class would return incorrect values.
The damage already passed through an integer conversations by then, and applying multiplication there would make the variance calculation less... variant. :D

The item_element_rate is the only suitable method for aliasing for this, but several more used scripts overwrite that method already too (like those multi-element scripts, for example, if I remember right).
But now that I think about it, aliasing that method would still be more compatible than overwriting the whole damage calculation, since it would be just a matter of placement to make these script work together.

Updated the script with the new version.
 

Telemindred

Telemindred the Archmage
Member
Joined
Mar 12, 2020
Messages
20
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Would it be compatible with most of Yanfly's scripts? Or would their scripts be among the 'probably incompatible without a patch' list?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,064
Reaction score
7,168
First Language
Indonesian
Primarily Uses
RMVXA
It is compatible
 

Telemindred

Telemindred the Archmage
Member
Joined
Mar 12, 2020
Messages
20
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Alright. Thank you very much guys, I really appreciate the help
 

Latest Threads

Latest Posts

Latest Profile Posts

I haven't been on here in forever wow(missed my forum birthday T-T). Anyways, I'm dabbling in BGMs, here's something I'm actually willing to share.

Binge-watched 6 episodes of the Erased anime... And that means I've watched half of it?! Sigh...
I'm bad at base-building games (looking at other players created an aesthetically beautiful base compared to me), but IDK why I keep playing the game and seek more of it.
Pyra and Mythra in smash ultimate are way too OP. They're basically Smash 4 Bayonetta 2.0, and not in a good way. Very toxic and unfair. At least they're hot tho.

Forum statistics

Threads
109,197
Messages
1,042,970
Members
141,700
Latest member
skybola188
Top