[Tool] Playable character sprite calibration tool

General discussion about Super Mario Bros. X.
User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1790
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby Wohlstand » Sat Mar 21, 2015 12:02 am

FanofSMBX wrote:Could you please add a lunadll.txt output with "MemSet" using these offsets to make SMBX larger players?
http://talkhaus.raocow.com/viewtopic.ph ... ht#p246507
I'm needing this for a Kirby playable.
Already presented lunaLUA function which apply hitboxes directly from ini file (which saves with your image file which you calibrated. Don't edit gfx offsets, because ate not available address of them

nil loadHitboxes(int characterId, int powerUpId, string iniFilename)
Loads the hitbox settings for specific player and it's power-up state from INI file made by Special Calibration tool.
Note: GFX-offsets of each frame is overwriting yet. Use image calibration to calibrate position of frame without editing of GFX offsets.
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

User avatar
John The White Yoshi
Koopa Shell
Koopa Shell
Posts: 605
Joined: Fri Jan 10, 2014 12:22 am

Re: [Tool] Playable character sprite calibration tool

Postby John The White Yoshi » Mon Mar 23, 2015 1:31 pm

This is awesome. I'm definitely using this for when I need to fix playables.

Hey! Can we get this stickied please?

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1790
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Small update

Postby Wohlstand » Mon May 04, 2015 9:35 pm

Calibration tool has been updated!

There are small bug-fixes of the tool.

Changelog 2.0.2
  • Missed animation slots has been added
  • Some typos has been fixed
  • Added ability to save calibration ini file into any custom directory!
Updated version you can get on the main post
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2846
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby HenryRichard » Thu May 21, 2015 6:39 pm

I think it would be better to post this here than in the LunaLUA topic.
I'm using this code:

Code: Select all

function onLoad()
	--Set the player heights
	--loadHitboxes(int characterId, int powerUpId, string iniFilename);
	loadHitboxes(1, 1, "andario-small.ini")
	loadHitboxes(1, 2, "andario-big.ini")
	loadHitboxes(1, 6, "andario-bullet.ini")
	loadHitboxes(1, 7, "andario-gold.ini")
	loadHitboxes(2, 1, "noigi-small.ini")
end
I get a "Attempted to call global 'loadHitboxes' (a nil value)" error when I test.
The .ini files are in the world folder - is that wrong?
Also, I tried both with and without semicolons - same error.
Jesus is my savior.

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1790
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby Wohlstand » Thu May 21, 2015 8:00 pm

HenryRichard wrote:I think it would be better to post this here than in the LunaLUA topic.
I'm using this code:

Code: Select all

function onLoad()
	--Set the player heights
	--loadHitboxes(int characterId, int powerUpId, string iniFilename);
	loadHitboxes(1, 1, "andario-small.ini")
	loadHitboxes(1, 2, "andario-big.ini")
	loadHitboxes(1, 6, "andario-bullet.ini")
	loadHitboxes(1, 7, "andario-gold.ini")
	loadHitboxes(2, 1, "noigi-small.ini")
end
I get a "Attempted to call global 'loadHitboxes' (a nil value)" error when I test.
The .ini files are in the world folder - is that wrong?
Also, I tried both with and without semicolons - same error.
Hi, this is a bug in LunaLUA made accidentally while refactoring. LunaLUA 0.7 and LunaLUA 0.5 Has than function working with no bugs. In the current version of LunaLUA this function doesn't works because how I told, it was a bug whick caused with missing of binding entry.
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

Fennor
Rex
Rex
Posts: 94
Joined: Sat Apr 25, 2015 12:08 pm

Re: [Tool] Playable character sprite calibration tool

Postby Fennor » Thu May 28, 2015 4:06 pm

I noticed that when loading a sprite in the calibrator it automatically updates the hitbox value correctly. (If you load mario-2, width will be 24, height 54 and duck height 30).

However when you load Link, it shows 30 for duck height. But I think the duck height of Link actually is 44. (y offset is 8 instead of 22) So if you load Link and change nothing at all but safe it, your ducking animation will go through the floor since 30 is the wrong ducking height.

Maybe that got mixed up because Link has two different duck heights. I am not sure about that, but I think he must have one duck height for enemy collisions, and 1 for block collisions. I assume he has a smaller duck height for block collision so that he can slide through gaps with a height of one block. If you change the duck height to 100, he can still duck-slide through such gaps, while enemies can hit you at the very top. But if you jump while being in such a small gap, you will glitch even more with a higher duck height.

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1790
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby Wohlstand » Thu May 28, 2015 4:10 pm

Fennor wrote:I noticed that when loading a sprite in the calibrator it automatically updates the hitbox value correctly. (If you load mario-2, width will be 24, height 54 and duck height 30).

However when you load Link, it shows 30 for duck height. But I think the duck height of Link actually is 44. (y offset is 8 instead of 22) So if you load Link and change nothing at all but safe it, your ducking animation will go through the floor since 30 is the wrong ducking height.

Maybe that got mixed up because Link has two different duck heights. I am not sure about that, but I think he must have one duck height for enemy collisions, and 1 for block collisions. I assume he has a smaller duck height for block collision so that he can slide through gaps with a height of one block. If you change the duck height to 100, he can still duck-slide through such gaps, while enemies can hit you at the very top. But if you jump while being in such a small gap, you will glitch even more with a higher duck height.
Any hitboxes I researched with a special level where I probed hitboxes with holes, slope celling, etc. Later, Kevsoft with using of IDA gave me built-in hitboxes values. All presented values are equal to hardcoded values.

Remember than: View != Real
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

Fennor
Rex
Rex
Posts: 94
Joined: Sat Apr 25, 2015 12:08 pm

Re: [Tool] Playable character sprite calibration tool

Postby Fennor » Thu May 28, 2015 6:19 pm

Wohlstand wrote:
Fennor wrote:I noticed that when loading a sprite in the calibrator it automatically updates the hitbox value correctly. (If you load mario-2, width will be 24, height 54 and duck height 30).

However when you load Link, it shows 30 for duck height. But I think the duck height of Link actually is 44. (y offset is 8 instead of 22) So if you load Link and change nothing at all but safe it, your ducking animation will go through the floor since 30 is the wrong ducking height.

Maybe that got mixed up because Link has two different duck heights. I am not sure about that, but I think he must have one duck height for enemy collisions, and 1 for block collisions. I assume he has a smaller duck height for block collision so that he can slide through gaps with a height of one block. If you change the duck height to 100, he can still duck-slide through such gaps, while enemies can hit you at the very top. But if you jump while being in such a small gap, you will glitch even more with a higher duck height.
Any hitboxes I researched with a special level where I probed hitboxes with holes, slope celling, etc. Later, Kevsoft with using of IDA gave me built-in hitboxes values. All presented values are equal to hardcoded values.

Remember than: View != Real
As I said I think that ducking Link has two different hitboxes (unlike the other characters. I think that is also the reason for the strange behaviour when jumping as a ducking link when you are in a small gap with a height of only 32 pixels). One for block collisions, and one for npc collisions. That means while it may seem to fit when testing it with holes, slopes etc. or even what Kevsoft showed you, it doesn't mean that it will fit against npcs.

I tested it, too. I just loaded the Link sprite, and safed the hitbox values without changing anything (duck height 30). First of all the graphic moved down through the floor. Also while sniffits that stand on a block above the floor (so the sniffit is standing 32 pixels above the floor) usually can hit Link while he is ducking, they didn't hit me anymore with the safed hitbox (even though I didn't change any of the values, I just safed the values that showed up when loading the sprite)

Edit: Sometimes it is hard for me to understand what you are saying. Your name sounds german, that is also my native language. If you wish I can explain what I mean in german (private message). But now I am going to bed

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1790
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby Wohlstand » Fri May 29, 2015 10:05 am

Fennor wrote:
Wohlstand wrote:
Fennor wrote:I noticed that when loading a sprite in the calibrator it automatically updates the hitbox value correctly. (If you load mario-2, width will be 24, height 54 and duck height 30).

However when you load Link, it shows 30 for duck height. But I think the duck height of Link actually is 44. (y offset is 8 instead of 22) So if you load Link and change nothing at all but safe it, your ducking animation will go through the floor since 30 is the wrong ducking height.

Maybe that got mixed up because Link has two different duck heights. I am not sure about that, but I think he must have one duck height for enemy collisions, and 1 for block collisions. I assume he has a smaller duck height for block collision so that he can slide through gaps with a height of one block. If you change the duck height to 100, he can still duck-slide through such gaps, while enemies can hit you at the very top. But if you jump while being in such a small gap, you will glitch even more with a higher duck height.
Any hitboxes I researched with a special level where I probed hitboxes with holes, slope celling, etc. Later, Kevsoft with using of IDA gave me built-in hitboxes values. All presented values are equal to hardcoded values.

Remember than: View != Real
As I said I think that ducking Link has two different hitboxes (unlike the other characters. I think that is also the reason for the strange behaviour when jumping as a ducking link when you are in a small gap with a height of only 32 pixels). One for block collisions, and one for npc collisions. That means while it may seem to fit when testing it with holes, slopes etc. or even what Kevsoft showed you, it doesn't mean that it will fit against npcs.

I tested it, too. I just loaded the Link sprite, and safed the hitbox values without changing anything (duck height 30). First of all the graphic moved down through the floor. Also while sniffits that stand on a block above the floor (so the sniffit is standing 32 pixels above the floor) usually can hit Link while he is ducking, they didn't hit me anymore with the safed hitbox (even though I didn't change any of the values, I just safed the values that showed up when loading the sprite)

Edit: Sometimes it is hard for me to understand what you are saying. Your name sounds german, that is also my native language. If you wish I can explain what I mean in german (private message). But now I am going to bed
I think, you had old hitbox properties
here are full hitbox list:
http://engine.wohlnet.ru/docs/_SMBX64/hitboxes.txt
I'm Russian, but you can also communicate with Kefsoft which my friend and my co-developer

EDIT: I just fixed duck height for Link:
https://github.com/Wohlhabend-Networks/ ... b839f3a3a8

Take those INI files and put into your "calibrator/spriteconf" with replacing to apply fixed calibrations of Link
link-calibrations.zip
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

Fennor
Rex
Rex
Posts: 94
Joined: Sat Apr 25, 2015 12:08 pm

Re: [Tool] Playable character sprite calibration tool

Postby Fennor » Fri May 29, 2015 10:52 am

Thanks.

Yes, those hitboxes are correct. I thought I had the newest version of the sprite callibrator since I downloaded PGE - which included the sprite calibrator - just recently.

User avatar
Imaynotbehere4long
Kamikaze Koopa
Kamikaze Koopa
Posts: 1389
Joined: Thu Jan 23, 2014 3:00 pm
Current Project: Chaotic Culmination: Universe Rescuer

Re: [Tool] Playable character sprite calibration tool

Postby Imaynotbehere4long » Mon Jul 20, 2015 3:14 pm

I tried to use this just now, and although it aligned the sprites properly, the sprites became darker and the mask sprites turned grey, making the main sprites transparent. All I did was move the sprites, test the animations, and save the file as a "masked gif," so I don't know what went wrong.
I've decided to cancel SMBXville Under Seige. After my 1st Senior year of college, I realized I wouldn't have enough time to devote to finishing my four-level episode. Apologies to those who cared.
My favorite quote on the entire forum:
Spoiler: show
mechamind wrote:
AeroMatter wrote:People who think "autistic" is an adjective and not a verb.
You autistic some people so much with that statement.
My SMBX portfolio:
Spoiler: show
Image
(includes a Sonic 3D Blast styled level.)
SOMEONE ANSWER MY CRY FOR HELP: http://www.supermariobrosx.org/forums/v ... =69&t=2026

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1790
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby Wohlstand » Mon Jul 20, 2015 3:22 pm

Imaynotbehere4long wrote:I tried to use this just now, and although it aligned the sprites properly, the sprites became darker and the mask sprites turned grey, making the main sprites transparent. All I did was move the sprites, test the animations, and save the file as a "masked gif," so I don't know what went wrong.
Apply LazyFixTool to your source gif+mask pair (just drag & drop your image file into lazyfix tool apllication icon to run it especially for dropped by you file. You don't need to run pge editor especially for alone picture, and pge editor's gui is useful to execute batch process to entire worlds folder, or one of episodes only)
Calibrator blends mask with foreground image by alpha-blending algorithm, it is not a bitblit which in the smbx. So, you should have IDEAL mask, I.e B&W or grayscaled if you wanna use semitransparency effect.
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

User avatar
Imaynotbehere4long
Kamikaze Koopa
Kamikaze Koopa
Posts: 1389
Joined: Thu Jan 23, 2014 3:00 pm
Current Project: Chaotic Culmination: Universe Rescuer

Re: [Tool] Playable character sprite calibration tool

Postby Imaynotbehere4long » Mon Jul 20, 2015 3:36 pm

Wohlstand wrote:Apply LazyFixTool to your source gif+mask pair (just drag & drop your image file into lazyfix tool apllication icon to run it especially for dropped by you file. You don't need to run pge editor especially for alone picture, and pge editor's gui is useful to execute batch process to entire worlds folder, or one of episodes only)
Calibrator blends mask with foreground image by alpha-blending algorithm, it is not a bitblit which in the smbx. So, you should have IDEAL mask, I.e B&W or grayscaled if you wanna use semitransparency effect.
Where can I download that?

Also, according to your description, it won't fix the fact that the main, non-mask sprites were made darker.
I've decided to cancel SMBXville Under Seige. After my 1st Senior year of college, I realized I wouldn't have enough time to devote to finishing my four-level episode. Apologies to those who cared.
My favorite quote on the entire forum:
Spoiler: show
mechamind wrote:
AeroMatter wrote:People who think "autistic" is an adjective and not a verb.
You autistic some people so much with that statement.
My SMBX portfolio:
Spoiler: show
Image
(includes a Sonic 3D Blast styled level.)
SOMEONE ANSWER MY CRY FOR HELP: http://www.supermariobrosx.org/forums/v ... =69&t=2026

User avatar
RudeGuy
Luigi
Luigi
Posts: 4992
Joined: Fri Dec 27, 2013 7:36 am
Flair: local guy
Current Project: a random smw hack
Chat Username: rudeguy

Re: [Tool] Playable character sprite calibration tool

Postby RudeGuy » Mon Jul 20, 2015 3:39 pm

Imaynotbehere4long wrote:Where can I download that?
It's included in PGE, so if you have it you should have the LazyFixTool.
im bored

User avatar
Imaynotbehere4long
Kamikaze Koopa
Kamikaze Koopa
Posts: 1389
Joined: Thu Jan 23, 2014 3:00 pm
Current Project: Chaotic Culmination: Universe Rescuer

Re: [Tool] Playable character sprite calibration tool

Postby Imaynotbehere4long » Mon Jul 20, 2015 3:49 pm

Also, the tool makes the "backup" sprites too bright.
I've decided to cancel SMBXville Under Seige. After my 1st Senior year of college, I realized I wouldn't have enough time to devote to finishing my four-level episode. Apologies to those who cared.
My favorite quote on the entire forum:
Spoiler: show
mechamind wrote:
AeroMatter wrote:People who think "autistic" is an adjective and not a verb.
You autistic some people so much with that statement.
My SMBX portfolio:
Spoiler: show
Image
(includes a Sonic 3D Blast styled level.)
SOMEONE ANSWER MY CRY FOR HELP: http://www.supermariobrosx.org/forums/v ... =69&t=2026

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1790
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby Wohlstand » Mon Jul 20, 2015 11:16 pm

Imaynotbehere4long wrote:Also, the tool makes the "backup" sprites too bright.
If you have too bad or miss-matching mask, feel free to edit your foreground image in Paint.NET/GIMP where you should fill black background with transparency and save image as PNG. Then apply PNG2GIFs (tool also included with PGE, but available in bottom of the main page of engine.wohlnet.ru ) to saved file and you will get gifs pair in SMBX format
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

User avatar
buddyroach
Fighter Fly
Fighter Fly
Posts: 68
Joined: Sun Jul 19, 2015 1:48 pm
Flair: Glitch420
Current Project: Kuribo Red!! Coming Soon!
Chat Username: Twitch
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby buddyroach » Fri Aug 14, 2015 9:03 pm

I just wanted to say, this is a badass program. It is very well thought out and works well. It carries out multiple big tasks and even draws the spritesheets and the masks for them as well along with a text file to show smbx what to calibrate and how to tweak them. has an animator viewer so you can see what is going on. Allows you to adjust hitboxes. Tweak the frames offset so they dont cut off or overlap eachother. It lets you choose with each animation, what frames to use and in what order. This allows for new animations which differ from the original player sheets, thus more customization of sprites. Yeah I am probably just saying what everyone knows but I just really appreciate all that it does. Thank you for making this. This is awesome. What I am wondering is how you knew what to put in the text files to communicate to SMBX? Did you get the source of SMBX to know how to communicate to it?
Click These Spoilers for something awesome!
Spoiler: show
Image
ImageDownload my NPC Editor, Kuribo Blue for free today: DOWNLOAD HERE
Screenshot:
Spoiler: show
Image
Video:
Spoiler: show

Wkay
Mega Mole
Mega Mole
Posts: 277
Joined: Sat Feb 21, 2015 2:39 am

Re: [Tool] Playable character sprite calibration tool

Postby Wkay » Sat Aug 15, 2015 1:44 am

Oh my god...
You are the best person ever...
This account's dead, move on to Gunslinger, bud.

User avatar
buddyroach
Fighter Fly
Fighter Fly
Posts: 68
Joined: Sun Jul 19, 2015 1:48 pm
Flair: Glitch420
Current Project: Kuribo Red!! Coming Soon!
Chat Username: Twitch
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby buddyroach » Sat Aug 15, 2015 2:22 am

aLinktotheDead wrote:Oh my god...
You are the best person ever...
who is that to?
Click These Spoilers for something awesome!
Spoiler: show
Image
ImageDownload my NPC Editor, Kuribo Blue for free today: DOWNLOAD HERE
Screenshot:
Spoiler: show
Image
Video:
Spoiler: show

User avatar
Wohlstand
Boom Boom
Boom Boom
Posts: 1790
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Current Project: Moondust (PGE Project)
Chat Username: Wohlstand#4881
Contact:

Re: [Tool] Playable character sprite calibration tool

Postby Wohlstand » Sat Aug 15, 2015 6:30 am

buddyroach wrote:I just wanted to say, this is a badass program. It is very well thought out and works well. It carries out multiple big tasks and even draws the spritesheets and the masks for them as well along with a text file to show smbx what to calibrate and how to tweak them. has an animator viewer so you can see what is going on. Allows you to adjust hitboxes. Tweak the frames offset so they dont cut off or overlap eachother. It lets you choose with each animation, what frames to use and in what order. This allows for new animations which differ from the original player sheets, thus more customization of sprites. Yeah I am probably just saying what everyone knows but I just really appreciate all that it does. Thank you for making this. This is awesome. What I am wondering is how you knew what to put in the text files to communicate to SMBX? Did you get the source of SMBX to know how to communicate to it?
I wasn't got sources of SMBX, but we with Kevsoft are hacking SMBX and disassembling them to get most of things from SMBX. I did a lot of side experiments to grab metrics from NPC's and other items. Calibrator is a useful tool to calibrate frames on image to fit into SMBX's hitboxes, and same tool used to configure character hitboxes, make animations for each case etc. for PGE. Generated INI file can be used in the SMBX with LunaLUA usage to redefine width and height of character. Later when we will find that addresses which defining settings of player's hitbox offsets, will be possible to completely redefine hitbox of the playable character
PGE Project, my Media and supported projects: show
Support me on the Patreon
Image

PGE Project
PGE Project SMBX Topic
PGE Project Official Site and forums
Download fresh experimental builds HERE!

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers


Return to “General”

Who is online

Users browsing this forum: No registered users and 9 guests