Banner
Views: 865,155,600
Time:
20 users online:  1UPdudes, anonimzwx,  bebn legg, Bruno_Peixoto,  BTD6_maker, Dan2point5, Dark Prince, edgar, FabioBR98, Gammed Z, Gurggz, IcyFruit, kaigem, M9wA, mikairanutshack, OEO6, Ralshi02, Samuel Zuccati, TheMorganah, Y.Y. - Guests: 53 - Bots: 54 Users: 47,907 (2,072 active)
Latest: DesvaroNicky
Tip: If you edit level 0, make sure you also edit level 100. Both of them are used for the bonus game.Not logged in.
Extra bytes on this sprite are super confusing
Forum Index - SMW Hacking - SMW Hacking Help - Extra bytes on this sprite are super confusing
Pages: « 1 » Link
I'm trying to use this Coin + Muncher sprite, but it has confusing options under the extra byte options.

It says if the extra bit is set, then it will be a muncher, but you have to set the extra bit to use it, and it feels like none of the options do what i think they should do.

I'm trying to make an outlined muncher, and that requires extra bit 1 to be 0 extra bit 2 to be 6. This makes no sense to me. Can someone please help me?

--------------------
who knew it would take 3 years for me to learn how to insert a custom block into lunar magic


The "extra bit" is seperate from the "extra bytes". When inserting a sprite manually in Lunar Magic, you get this box:



Note the "extra bits" box. With that box, generally the original game's sprites use extra bit values 0/1, while custom sprites use 2/3. Hence, when referring to the "extra bit" in custom sprites, we mean using either 2 (clear) or 3 (set) there.

The "extra bytes" meanwhile refer to the big "extension" box at the bottom. This particular sprite uses two extra bytes, so you just type two bytes into that box (e.g. 00 00). When the ASM file refers to bits of the extra bytes, that means to start with the value as binary, and then convert it to a hexadecimal value after setting the bits as desired. Bit 0 refers to the rightmost digit, while bit 7 refers to the leftmost.

For example, in your case you want exta byte 2 bit 6 set to make the muncher act as an outline. So start with an 8-bit value and find bit 6:
Code
00000000
 ^- this is bit 6

And set that to 1, so you get 01000000. If you convert this binary value to hexadecimal, you then get 40. So you should set extra byte 2 to 40. In LM, this means setting the extension field to "00 40".



You can also set up the extra bit/extension settings within Pixi's CFG editor; this will then add entries to Lunar Magic's "custom collections of sprites" tab of the sprite selection window with those values, like this:



Just open the sprite's CFG/JSON file in the CFG editor, switch to the "Custom List" tab, and add rows to that list. You can add a hover-over description for the sprite in the "Lunar Magic" tab as well. When you're done, make sure you then save the file as a JSON file rather than CFG, as only the JSON format supports those settings.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
@Thomas:

Don't mind me, I more or lesss understand how to use the extra bytes, but since this is open, I want to take advantage of this thread.

Is the Boo Ring compatible with the current version of PIXI? I'm getting an error message about MeiMei telling me the about an extra byte change detection without even opening the file.
That's no error message but a bugfix: Extra bytes are up to four bytes of additional data for each sprite in the sprite level data. The sprite level data is a stream where each entry uses minimally three (no extra bytes) up to seven (four extra bytes) bytes. And that's where the problem is: While the game will work just fine, Lunar Magic doesn't keep track of the extra byte count for each sprite in each level. As such, if you change the extra byte count, Lunar Magic will load garbage from the level if left uncorrected. And this is where MeiMei is coming into play: It corrects the extra byte count for each level which results in Lunar Magic reading the correct amount of bytes per sprite.

--------------------
Okay, my layout looks ugly.
So, in other words, will PIXI still insert the sprite regardless of the error message? I honestly haven't really played with the sprite after getting the message, but I'll try giving it a go.

e: it didn't. I honestly don't know how to fix this.
Let's repeat this: It is not an error message, it just tells you that the table which holds the amount of bytes per sprite has been changed (e.g. you have replaced a sprite which uses no extra byte to a sprite with uses two extra bytes).
If you're still unsure, just post a screenshot of the supposed "error" message and we can confirm that it really is not an error.

--------------------
Okay, my layout looks ugly.
thanks for all the help! i think i can get this now.

--------------------
who knew it would take 3 years for me to learn how to insert a custom block into lunar magic
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - Extra bytes on this sprite are super confusing

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy