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,181
Reaction score
836
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,052
Reaction score
7,140
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,181
Reaction score
836
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,052
Reaction score
7,140
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

Observation Log 1 on the planet of "RPGMAKERWEB": Local RMXP community seems to have very few survivors. Their script tech-level is in the early Stone Age(about the same as 66RPG in 2007).
Some cats/wolves/squirrels are spotted, they are likely friendly. :3
Keep working on establishing more meaningful contacts.
May try to use the "I Come in Peace" protocol if encounter any hostiles.
Using hiddenone's QTE tutorial I've been able to setup a simple fishing system. Instead of just the pointer moving, the goal moves as well. Holding the action button scrolls the pointer and pressing the down arrow key hooks the fish. The speed of both is variable as well as the number of successful hooks needed for a catch.
When someone helps you solve a problem, it's good to report the thread so it can be closed, but it's also nice to go back and post in the thread to let them know their suggestion actually worked. And, you know, to say thanks for helping.

Forum statistics

Threads
108,925
Messages
1,040,631
Members
141,375
Latest member
semih4472
Top