Page 1 of 3

Creating custom blocks of any size

Posted: Tue Feb 04, 2014 2:30 pm
by HeroLinik
This is pretty much a revolutionary discovery in SMBX, publicised by SkyBlueYoshi of the Knux forums, although it hasn't made its way here yet. It allows people to push SMBX further past its limits and allow for blocks of all shapes and sizes.

Here's examples of what he's done:
Spoiler: show
Image
Image
Image
By now, unless you used it, you should be wondering how he changed the slope angles and made the blocks bigger. Here's how he did it:
Spoiler: show
First open up your SMBX, make a regular level and save it as .lvl file. Then choose the block you want to customize and open the debugger (in View--Debugger) and record its coordinate. After that, open up your .lvl file using Notepad (or other tools like Notepad++) and search (Ctrl+F is the common hotkey) its coordinate.

Using the New Blocks.lvl (download link available in this post: http://www.sendspace.com/file/8sjqj7), suppose we want to change the block at coordinate (X:-199616,Y:-200256), then after searching "-199616" or "-200256" we can navigate to the following code:

-199616
-200256
32
32
82
0
#FALSE#
#FALSE#
"Default"
""
""
""

Here is the meaning of these codes:

-199616----X coordinate
-200256----Y coordinate
32----Block's height
32----Block's width
82----Block ID
0----Contained item ID
#FALSE#----Invisibility
#FALSE#----Slippery
"Default"----Layer
""----Death
""----Hit
""----No More Objects in Layer

By changing the height and width, we can customize its size.

About blocks:
Changing

32
32

to

64
64

, the block will be rendered as 64*64 and its actual hitting boundary will become 64*64 as well.
Changing to

10
12

will do the same except for the size (obviously).

About slopes:
First the basic principle:
Image
This is a 32*32 slope
Image
This is a 64*32 slope
Image
This is a 128*32 slope
From this we can know the slope is actually rendered by drawing the diagonal. So by changing the height and width of the slope we can create any slope of any size and any slope angle we want.
Using New Blocks.lvl as an example, after finding the following code:

-199520
-200512
32
32
299
0
#FALSE#
#FALSE#
"Default"
""
""
""

If we change

32
32

into

64
32

,the slope will turn from
Image
to
Image

If changing

32
32

to

32
96

,the slope will turn from
Image
to
Image
Yes. It's THAT simple! Now you know how to create any size of blocks and slopes you want!
However, he didn't invent the method. GreenNekoHaunt was believed to have used it as well. Here's his method:
Spoiler: show
1. open your level file with a normal text editor
2.search for exactly "next" including the double quotation marks
3. once again this is the block code:

Code: Select all

-199904
-200032
32
32
65
0
#FALSE#
#TRUE#
"Default"
""
""
""
  • the first five are the same as in the above tutorial
  • This is an id that defines what object is inside of the block (this can be any number from 0 to 1292)
  • This can either be #TRUE# or #FALSE# it tells if the block is invisible or not
  • This can either be #TRUE# or #FALSE# it tells if the block is slippery or not
  • Name of the layer
  • Name of the Death Event Trigger
  • Name of the Hit Event Trigger
  • Name of the No more Objects in Layer Trigger
4. add a modified version of that code above the "next" save the file
5. open the level file in your editor and you will see the result of the hack
Credits go to the makers of the tutorials, SkyBlueYoshi and GreenNekoHaunt. Enjoy making blocks of all shapes and sizes!

Re: Creating custom blocks of any size

Posted: Tue Feb 04, 2014 2:42 pm
by Emral
imagine a slide level using 32x320000 sized slopes :3
Edit:
You know what I'm talking about

Re: Creating custom blocks of any size

Posted: Tue Feb 04, 2014 2:54 pm
by DarkShadeX
Lemme Hug you Castlewars :3
This gives me tons of ideas and hell we can make SM3DL Blocks now

Re: Creating custom blocks of any size

Posted: Tue Feb 04, 2014 7:08 pm
by Julia Pseudo
Oh yeah, I remember this and it truly is revolutionary, if a bit annoying to implement. Would it actually work to make 3D Land blocks though?

Re: Creating custom blocks of any size

Posted: Wed Feb 05, 2014 1:30 am
by turtwig1123
castlewars wrote:
Spoiler: show
First open up your SMBX, make a regular level and save it as .lvl file. Then choose the block you want to customize and open the debugger (in View--Debugger) and record its coordinate. After that, open up your .lvl file using Notepad (or other tools like Notepad++) and search (Ctrl+F is the common hotkey) its coordinate.

Using the New Blocks.lvl (download link available in this post: http://www.sendspace.com/file/8sjqj7), suppose we want to change the block at coordinate (X:-199616,Y:-200256), then after searching "-199616" or "-200256" we can navigate to the following code:

-199616
-200256
32
32
82
0
#FALSE#
#FALSE#
"Default"
""
""
""

Here is the meaning of these codes:

-199616----X coordinate
-200256----Y coordinate
32----Block's height
32----Block's width
82----Block ID
0----Contained item ID
#FALSE#----Invisibility
#FALSE#----Slippery
"Default"----Layer
""----Death
""----Hit
""----No More Objects in Layer

By changing the height and width, we can customize its size.

About blocks:
Changing

32
32

to

64
64

, the block will be rendered as 64*64 and its actual hitting boundary will become 64*64 as well.
Changing to

10
12

will do the same except for the size (obviously).

About slopes:
First the basic principle:
Image
This is a 32*32 slope
Image
This is a 64*32 slope
Image
This is a 128*32 slope
From this we can know the slope is actually rendered by drawing the diagonal. So by changing the height and width of the slope we can create any slope of any size and any slope angle we want.
Using New Blocks.lvl as an example, after finding the following code:

-199520
-200512
32
32
299
0
#FALSE#
#FALSE#
"Default"
""
""
""

If we change

32
32

into

64
32

,the slope will turn from
Image
to
Image

If changing

32
32

to

32
96

,the slope will turn from
Image
to
Image
Yes. It's THAT simple! Now you know how to create any size of blocks and slopes you want!
However, he didn't invent the method. GreenNekoHaunt was believed to have used it as well. Here's his method:
Spoiler: show
1. open your level file with a normal text editor
2.search for exactly "next" including the double quotation marks
3. once again this is the block code:

Code: Select all

-199904
-200032
32
32
65
0
#FALSE#
#TRUE#
"Default"
""
""
""
  • the first five are the same as in the above tutorial
  • This is an id that defines what object is inside of the block (this can be any number from 0 to 1292)
  • This can either be #TRUE# or #FALSE# it tells if the block is invisible or not
  • This can either be #TRUE# or #FALSE# it tells if the block is slippery or not
  • Name of the layer
  • Name of the Death Event Trigger
  • Name of the Hit Event Trigger
  • Name of the No more Objects in Layer Trigger
4. add a modified version of that code above the "next" save the file
5. open the level file in your editor and you will see the result of the hack
Credits go to the makers of the tutorials, SkyBlueYoshi and GreenNekoHaunt. Enjoy making blocks of all shapes and sizes!
ow, I think I just sprained my brain.
sorry if im rude but, could somebody help me make some custom blocks? I might need some for a project im starting.

Re: Creating custom blocks of any size

Posted: Sat Feb 08, 2014 3:21 pm
by moemoe02
I also posted a topic for this but it was locked anyways http://www.smbxgame.com/forums/v ... =35&t=1057

Re: Creating custom blocks of any size

Posted: Sat Feb 08, 2014 6:03 pm
by FallingSnow
moemoe02 wrote:I also posted a topic for this but it was locked anyways http://www.smbxgame.com/forums/v ... =35&t=1057
Yes, and it served no purpose since this topic is for the exact same reason and was posted first.

Re: Creating custom blocks of any size

Posted: Wed Aug 13, 2014 6:36 pm
by Wohlstand
With PGE Editor is possible to use the custom blocks with any sizes:
- The SMBX is using the static values of block size and animation frame offset, and you should to define the each value.
- The PGE Editor is defining block's and BGO's sizes by image size dynamically, therefore you can use any images as custom blocks and target block size will be captured from image size directly when you place them.

What I mean?

Read My little tutorial:
- create the dummy image with any size (set the size which you want use as target block) and save it as custom block image. (like block-3.gif).
Spoiler: show
Image
- Put this image with some level file and open this level in the PGE Editor (or reload them by F5 key).
Spoiler: show
Image
- Find your custom block in the toolbox and take them for placing.
- Place these blocks on the level map. It will have the custom image's size. (animated block size will calculated with formula:
height=image_height/total_frames)
Spoiler: show
Image
When you done your work with level, save file and open them in the SMBX and try test:
Spoiler: show
Image
Note: if you creating sprite for animated block, image must have same frames number which defined globally for same block ID.
- PGE Editor will automatically calculate frame height and frame offset (one_frame_height = image_height / total_frames ), and animation will be displayed correctly,
- but in the SMBX frame height defined statically, and frame positions on the image will be wrong. Because you should to use the default image height for animated blocks.

P.S. I recommend to take the laboratory build of the PGE Editor, because in them fixed a lot of bugs which had current build.

Re: Creating custom blocks of any size

Posted: Wed Aug 13, 2014 9:02 pm
by sezixor
It doesn't appear to be working for me. I have found and isolated the problem, but that still doesn't mean I have found the solution. It lets me save the file and proceed to something else without changing my modification to the text file, but not so much when I go into smbx. The problem is, whenever I save the level I am working with in the editor, the text numbers that I modified change back to normal! I tested this multiple times, changing the very top numbers of the text file to one digit higher. They were fine after I saved the text file, but they were changed back to normal when I saved in the editor.

It's really quite odd, has anyone else had this error? It might be my computer but I'm not really sure.

Re: Creating custom blocks of any size

Posted: Thu Aug 14, 2014 12:41 am
by Veudekato
maybe you save level in smbx? when you press f5 and press yes he will save level edited in smbx (not lvl file)

Re: Creating custom blocks of any size

Posted: Thu Aug 14, 2014 1:02 am
by Willhart
I thought this trick was common knowledge by now. I've been using it a long before I made my maglx level. With the help of copy paste tool I had to make only one of each block for the entire level. I've already made one that uses 64x64 tileset. Huge rezised cloud blocks can also work as custom size backgrounds.

Re: Creating custom blocks of any size

Posted: Thu Aug 14, 2014 2:50 am
by Wohlstand
sezixor wrote:It doesn't appear to be working for me. I have found and isolated the problem, but that still doesn't mean I have found the solution. It lets me save the file and proceed to something else without changing my modification to the text file, but not so much when I go into smbx. The problem is, whenever I save the level I am working with in the editor, the text numbers that I modified change back to normal! I tested this multiple times, changing the very top numbers of the text file to one digit higher. They were fine after I saved the text file, but they were changed back to normal when I saved in the editor.

It's really quite odd, has anyone else had this error? It might be my computer but I'm not really sure.
Remember: if you edit file by pge on by notepad while smbx is opened, don't save file on test run by SMBX. Always press "No" on ask for test, SMBX will overwrite your modified version with state which was in the smbx before, and you will lose your modification.

Re: Creating custom blocks of any size

Posted: Tue Aug 19, 2014 11:22 am
by Veudekato
Veudekato wrote:new video... i explain the easy way to resize block with this editor. (dont using notepad)




How to make Custom block with any size:
http://www.youtube.com/watch?v=bGk7lmmm ... 1wa3VkOs3Q

Re: Creating custom blocks of any size

Posted: Tue Aug 19, 2014 8:40 pm
by HenryRichard
This also works if you use the "global swap" in the debugger (So you can make 32*16 slopes by swapping out pipes for them). It's eaisier than picking through the txt files, though not as easy as it is in PlatGEnWhol.

Re: Creating custom blocks of any size

Posted: Wed Aug 20, 2014 2:21 am
by Veudekato
HenryRichard wrote:This also works if you use the "global swap" in the debugger (So you can make 32*16 slopes by swapping out pipes for them). It's eaisier than picking through the txt files, though not as easy as it is in PlatGEnWhol.
please...PlatGEnWohl* becouse Platformer game engine by wohlstand

Re: Creating custom blocks of any size

Posted: Wed Aug 20, 2014 1:06 pm
by Anphiba
oh my god, I didn't know you could do this until just now.
I would actually like to make SM3DL blocks in my episode, but does this method work with animations on special blocks?
See, I want my blocks to be SMB1 styled, and they need to glow like SMB1 blocks. I wanted the blocks to keep the glow animation.
I hope it will work.

Edit: Um, I might need some help trying to get this to work.
This is something I've never done before.
So I might need a video tutorial... :lol:
Call me a noob all you want...
I don't care.

Re: Creating custom blocks of any size

Posted: Wed Aug 20, 2014 1:09 pm
by RudeGuy
Anphiba wrote:oh my god, I didn't know you could do this until just now.
I would actually like to make SM3DL blocks in my episode, but does this method work with animations on special blocks?
See, I want my blocks to be SMB1 styled, and they need to glow like SMB1 blocks. I wanted the blocks to keep the glow animation.
I hope it will work.
Yes, it works with animated ones, as long they are resized.

Re: Creating custom blocks of any size

Posted: Wed Aug 20, 2014 1:10 pm
by h2643
But the video-tutorial is already posted in this topic. Look above.

Re: Creating custom blocks of any size

Posted: Wed Aug 20, 2014 1:10 pm
by Wohlstand
Anphiba wrote:oh my god, I didn't know you could do this until just now.
I would actually like to make SM3DL blocks in my episode, but does this method work with animations on special blocks?
See, I want my blocks to be SMB1 styled, and they need to glow like SMB1 blocks. I wanted the blocks to keep the glow animation.
I hope it will work.

Edit: Um, I might need some help trying to get this to work.
This is something I've never done before.
So I might need a video tutorial... :lol:
Call me a noob all you want...
I don't care.
Yea, Already exist video-tutorial, how use blocks with custom sizes: http://www.youtube.com/watch?v=bGk7lmmmjP4
Also, with same method you can get slopes with any sizes

Re: Creating custom blocks of any size

Posted: Wed Aug 20, 2014 1:21 pm
by Anphiba
WOAH!!
I didn't know that!!
Yay thanks for the link!!
I think it's really cool though. I want to use it. :D