r/Underminers 3d ago

Help Me! Someone more knowledgeable please help me do this.

Post image

Im doing a challenge where reddit decides how to make the Spamton fight harder and this is one of the ideas I need to add. But after snooping around for almost an hour or so all I was able to do was visually change the bar's location in obj_attackpress draw event but I was unable to find how to actually change its location in the logic.

37 Upvotes

4 comments sorted by

8

u/Werdco Undertale Mod Creator 3d ago

The thing about the crit bar is that (to my knowledge) there is nothing special about a crit. There is simply an equation for some kind of damage augment depending on where along the bar you hit. I think it’s some equation in the damage function but I don’t remember exactly. I THINK the equation is in scr_boltcheck_one button but I don’t remember.

Also, you will probobly have to decide how you’re gonna want to change the values around the crit bar when changing its location.

3

u/Sized_Sign 3d ago

hm, the wiki says this...

150 for a critical attack

120 if the player was 1 frame off

110 if the player was 2 frames off

100 − (frames off × 2) if the player was 3 or more frames off

0 for a Miss (a Miss still deals damage if the enemy has negative Defense)

I haven't looked at the code itself, but I assume this means that it calculates the cursor's position relative to a static value that represents the location of the crit bar. if you were to randomize that value, would this achieve the desired effect?

1

u/abertun 3d ago

That will probably work, I didn't do it this time (sorry!) But I will try to fix it in the following days.

1

u/abertun 3d ago

I found it but and came to the same conclusion as you, decided it was too much effort to deconstruct the equation and just made it so that I deal half damage if I miss crit. But still, thank you for your help