How to Affect Crits?

Started by Jacko22 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to Affect Crits?

I want to have several different effects based around critical strikes in my mod, but I don't know how to affect them. The simplest example is the dagger weapon class, which I want to deal more damage with crits. Would the be possible with the current version of MCreator (and how)?

Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Honestly, the simplest way i…
Mon, 05/11/2026 - 01:26

Honestly, the simplest way i have integrated Crit Damage is via Custom Stats i made.

I don't think we can really affect how the Vanilla Crit damage goes for since it's like a multiplier i believe, perhaps by code, but i can't help with that.

What i've done, is make the melee item cause 0.1 damage (Just so the hit lands, but without hindering your DPS) while the procedure 'Upon Entity Hit with Item' calculates the output of DMG.

I have the following variables : CritRate , CritDMG, PhysicalDMG.
The way i made Crit is simple afterwards..

This is solely for when it DOES crit, assuming the random returns True : 
If (CritRate/100) >= Random (0,1) do : 
[Deal (PhysDMG + (PhysDMG x (CritDMG/100))) Damage to Entity]

What i'd do in your case would be to naturally give more CritDMG to your Dagger class by default, so they gain advantage upon critting. If you're looking to really use Vanilla Crits, maaaybe there's a way to detect if a player Crits and then add some extra damage freebies. I can't check right now if that's a possibility, else i hope this helped.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That's exactly what I…
Mon, 05/11/2026 - 04:07

That's exactly what I planned to do but it seemed like too much work to apply the system to the vanilla weapons. IDK if it would even be possible. 

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Kinda unrelated (not sure if…
Mon, 05/11/2026 - 04:15

Kinda unrelated (not sure if it would be better to start a new topic) but do you know if it would be possible to change the health values of vanilla mobs and the player? My current plan would be to multiply the player's health by 5, bosses by about 7.5, and most other mobs by 3-4.

Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I also kind of did something…
Mon, 05/11/2026 - 09:47

I also kind of did something that could help you with the HPs.

Although it doesn't affect the player, we'd have to pass by with another trigger or something, I tagged 'small mobs' , 'Elites' , and 'Bosses'.

Each mobs 'Upon Entity Spawns' Global Trigger receive a certain amount of Hp Scaling depending on the difficulty world they spawn in. I simply checked:

If entity is tagged as 'modid:Small'
Set attributes [maxHP] to X amount
Set Current Health to [Max Health] for Provided Entity

In your situation, you could probably find out which mob specifically you wanna inflate its HPs and just do [Max HP] x 7.5 for the Ender Dragon, for example. I even changed their Melee DMG to be inflated too, using the same thing, just with an extra block and that's it.

For the player, i guess you can inflate the HP attribute each respawn and each Joining of the world.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Where do you create custom…
Mon, 05/11/2026 - 18:00

Where do you create custom variables /tags? Is it a mod element or do you make it in the procedure screen?

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Another thing - not to feel…
Tue, 05/12/2026 - 04:17

Another thing - not to feel like I'm stealing your work, but do you have any tips on adding the variable based damage system retroactively to vanilla?

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I found the answer to my…
Tue, 05/12/2026 - 05:07

I found the answer to my question abt tags and variables.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please! So far the crit…
Tue, 05/12/2026 - 21:20

Please! So far the crit system is working perfectly, I just want to know how you apply changes to vanilla items and tags to vanilla mobs. I found how to override vanilla textures but that seems to be the extent of what I can change.

Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry for the wait!! Omg i…
Thu, 05/14/2026 - 14:27

Sorry for the wait!! Omg i feel bad, i was supposed to check on you, hehe~ 

Alright, so for your question about Vanilla Content, i really don't know if we can modify their DMG output or do anything with them. I've checked through Global Triggers in Procedures, and there is nothing to help such as a "Upon Item hitting Mob". Maybe someone out there knows.

As for your Critting, i think this should work out, but you have set your DMG Dealer with DMG times CritChance. I don't know if that's normal for what you want to do, but you might just want to put a custom modifier, depending on what amount of DMG Boost you want.

Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also, upon reviewing, you…
Thu, 05/14/2026 - 14:32

Also, upon reviewing, you might want to change your variables as well.

They are currently probably set to "NUMBER" (GLOBAL_MAP). This ties this variable to the MAP itself as a singular number.

You'd probably want to set it to "NUMBER" (PLAYER_PERSISTENT). This ties it to EACH player individually without messing with each others. Persistent will allow it to stay even after Dying instead of reseting.

Don't hesitate if you need something again! Me or other people will probably try to help out still~!
 

Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That seems promising!That…
Mon, 05/18/2026 - 18:12

That seems promising!
That might be the most you can do, but if it works, I'm happy!~

Maybe you can create an Item tag rather than test for every swords, if you want to have it simpler down the line. You could then check "Is item in main hand [Is Item tagged as : (X) ]" ?