Tip: Layer 3 backgrounds and tides disappear when you hit a message box, so plan your level around that. For example, you can add a sublevel without layer 3 at the start/midpoint, and include your message there.
Uh, you don't insert this as blocks, but rather as a patch.
Can you help me like tutorial so I wont get confused
Insert any other block into your game using GPS (other than page 4), this will modify the code that LM inserts to deal with custom blocks. Then try inserting the FuSoYa pipes (this runs like a patch, so patch pipes.asm), be careful that if you wanted the pipes to be at other than page 4, you have to edit the “mirrored” pipes to act like the equivalent blocks (they're set to behave at $4XX from the .map16 file).
Would be nice if the map16 files can be edited with a text editor instead of hex (or someone could make a tool that import/export and convert the .map16 data), especially with notepad++ with its column editing mode. Something similar to GPS's list file:
All the “mirrored” pipes have their map16 behavior set to $4XX from the .map16 file, including turn corners other than the top-left of the 2x2 group of blocks. Thus, when set to a different page, the map16 file still uses the behavior of page 4.
In my end, this works fine but JUST IN PAGE 4, if I move them elsewhere (of couse, editing the !Map16Page define before patching, and then remapping the pipes in the sample level) some pipes doesn't work at all, particularly the ones that doesn't change Mario's position, which makes him to death:
Tested with Asar v1.71, SNES9x v1.58, in both normal and SA-1 ROMs.
I've taken the liberty to change the free RAM area which by default was using part of the stack, and this caused a few oddities such as $9D being always set in instances it shouldn't, like during the title screen movie. I've also removed a faulty 'endif' command within the 'hijackoffset' macro, which was throwing errors in Asar and making insertion fail. Aside from that, everything works properly despite pipe blocks themselves being tricky to use sometimes. Accepted.
It may sound like it is using SMB3.asm that the old blocktool by jhonwilson, that uses RAM that is the background. Remember, this is a very old tool equivalent to the augean stables but with minor fixes.
Just to note, make sure you install GPS before you install this patch, or your game will crash before the title screen loads. Another thing to note is make sure you change the freeram to another address, they are, by default using these RAM address, which are part of the level map16 table:
!Status1 = $41FFE6
!Image = $41FFE8 ;#$0042 makes him disappear and #$0043 is a peace sign
!Travel = $41FFEA ;#$01 means vertical and #$00 means horizontal
!Vertical = $41FFEC ;#$01 goes up and #$00 goes down
!Horizontal = $41FFEE ;#$01 goes right and #$00 goes left
!PowerupHold = $41FFF0 ;A holder of Mario's current powerup
!Status = $41FFF2 ;#$0042 if Mario is in a pipe and #$0000 if he isn't
!MarioXPos = $41FFF4 ;Mario's X position in a pipe
!MarioYPos = $41FFF6 ;Mario's Y position in a pipe
!Status1 = $7FFFE6
!Image = $7FFFE8 ;#$0042 makes him disappear and #$0043 is a peace sign
!Travel = $7FFFEA ;#$01 means vertical and #$00 means horizontal
!Vertical = $7FFFEC ;#$01 goes up and #$00 goes down
!Horizontal = $7FFFEE ;#$01 goes right and #$00 goes left
!PowerupHold = $7FFFF0 ;A holder of Mario's current powerup
!Status = $7FFFF2 ;#$0042 if Mario is in a pipe and #$0000 if he isn't
!MarioXPos = $7FFFF4 ;Mario's X position in a pipe
!MarioYPos = $7FFFF6 ;Mario's Y position in a pipe
As a side note, each of them are 2 bytes large except !PowerupHold (1 byte).
Hitting the bottom of any horizontal pipe caps (normal and small) will teleport you to the last exited pipe cap. Make sure you make it impossible for the player to do that
Horizontal pipe caps can be entered when the player is in the air (most of the time depending on his vertical speed).
When small horizontal pipe caps are placed on solid ground, they can play the pipe sound more than once per passing through them.
You can “nudge partial-enter” leftward-facing horizontal pipe caps, then get ejected to where the player is entering by standing in front of them and tap rightwards (1 or 2 frames though). Not a major glitch, but is weird. I assume what happens is that when you hold right, the block behaves $025, but does not immediately forces you in a pipe state until the player is further embedded into the block (partial enter and forcing pipe state are separate and not in one execution frame). It's better to just not only render the block $025, it should also set the pipe state together within 1 frame so the player guarantees that even a small nudge is a 100% enter.
If your pipe travel ends with going left, then up or down, then exit, you come out of the pipe, pushed slightly leftwards and off-center. Anytime the player goes leftwards then vertical, the vertical travel part is always off-centered.
Mario interacts with any blocks placed below the horizontal pipes, for example, the muncher can kill the player inside the pipe.