Telemindred

Telemindred the Archmage
Member
Joined
Mar 12, 2020
Messages
24
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,194
Reaction score
843
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,137
Reaction score
7,330
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,194
Reaction score
843
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
24
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,137
Reaction score
7,330
First Language
Indonesian
Primarily Uses
RMVXA
It is compatible
 

Telemindred

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

Latest Threads

Latest Profile Posts

unknown.png

Making good progress with the second chapter. :)

Still work in progress.

(Real life, it is chronically the fourth chapter that I am making.)
constructionworkconcept.pngezgif-2-0acb620ecf8d.gifezgif-2-afeaf16ebb8d.gif "The Great Wall is great. But, most people can only be the slaves who built it, leaving their bones underneath that wall. They spent their whole life to build that wall and the empire, an empire that enslaves them." :kaoswt2: I'm just going to turn it into a modern-day sad tale.

No edits, just gameplay from one area to the next. Plus all my new shiny interface stuff... And I even remember to bolt down the portal so it won't escape this time. :kaopride:
You guys just freely offer up your Autonomy?
I don't know about you, but today the covid frustration is seriously getting to me. Haven't really seen many of my friends for two years, since i moved towns the year before this all started, and well, i miss them :(
so, here's a cute alpacaraptor sketch to heighten the mood:
W7Fhp9n.png

Forum statistics

Threads
110,660
Messages
1,055,025
Members
143,786
Latest member
Avigayil
Top