News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] How can I make groups of tiles bigger than 2x2?

Started by M13, June 30, 2011, 09:58:06 PM

Previous topic - Next topic

M13

Basically, I'm somewhat new to this. I learned a bit ages back, but I never really knew all that much. I'm just getting into it again, so I'm pretty much back to the very basics.

That said, I found a tutorial on how to use BTS to create groups of tiles that can all be shot or bombed at once, but I can't seem to get it to create groups bigger than 2x2. I'm fairly certain I've seen groups of tiles bigger than 2x2, but I can't remember where they are offhand and don't even know what AREA to look in, so I'm hoping someone can help.

Thanks!

MetroidMst

As far as I know 2x2 is it, unless you can do some ASM to make bigger groups possible.

M13

Thanks for the quick reply, though that's not what I was hoping to hear. *sigh*

Any tutorials out there for ASM editing? I realize I should get more familiar with the basics first, but it can't hurt to have such a tutorial for later.

EDIT: Also, is there any way anyone can think of to force a player through a shot block passage pre-morphball without the possibility of getting stuck? Any passage 2 high can be spinjumped into, causing the player to be permanently stuck. That means that even if I use two 2x2 blocks atop one another, it's still possible to shoot out only the bottom one and spinjump into the hole, getting yourself stuck.

MetroidMst


JAM

M13
Yes, it's possible. By the way, every door is physically shootable 1*4 or 4*1 block. No ASM knowledge is required. At all.

I did explaination in Old SMILE Help Thread. Search there. Between pages 25 and 29. Result I've got was bombable 3*3 block.

MetroidMst

Oh? I thought it wasn't possible to do it any bigger because the 3rd blocks would be air... Well, silly me.

Quietus

Quote from: M13 on June 30, 2011, 10:05:04 PMeven if I use two 2x2 blocks atop one another, it's still possible to shoot out only the bottom one and spinjump into the hole, getting yourself stuck.
I'm pretty sure you could actually just hold Aim Up and Aim Down to shoot the block above you, so you couldn't really get stuck. :^_^:

Silver Skree

Not if you play using some retarded keyboard setup.

Like me.

Scyzer

Quote from: Quietus on July 02, 2011, 07:06:27 PM
Quote from: M13 on June 30, 2011, 10:05:04 PMeven if I use two 2x2 blocks atop one another, it's still possible to shoot out only the bottom one and spinjump into the hole, getting yourself stuck.
I'm pretty sure you could actually just hold Aim Up and Aim Down to shoot the block above you, so you couldn't really get stuck. :^_^:

What if you get stuck on TOP of a 1x1 shot block?
DUN DUN DUNNNN!!

Quietus

I reckon you'd have to be stuck right in the middle to not be able to aim down. :heheh:

begrimed

Posting this here to save having to look for it in old SMILE help thread, and 'cause I'll wanna do this later I think.

Quote from: JAM
We'll need to create 2 new PLMs. One for Bomb and Power Bomb attack, second one for Speed Booster and Screw Attack
I've placed them at F000 and F004. Code will start at F008.
So, first PLM header is 83 CE 08 F0 (instructions CE83, F008)

Code of 2*2 bomb block is good for 3*3. According to PLM details by Kej, 2*2 Respawning Bomb Block Collision Reaction is located at and leads to 24C87.  You should copy code from 24C87 to 27008.

The code is:
46 8C 06 24 87 C1 CC 46 8C 0A
04 00 9D A3
04 00 AD A3
04 00 BD A3
80 01 CD A3
04 00 BD A3
04 00 AD A3
04 00 9D A3
01 00 D7 A4 BC 86

Orange: pointer to part 2
Yellow: pointers to graphics
Aqua: time of displaying each state (in frames)

Copy the code to 27008 and change orange pointer to 12 F0 (leads to 27012).

Then we'll need to create new graphic for each state and change pointers to them.

Again, graphic from 2*2 block is great to start with.
Look at 2239D:
02 00 53 00 53 00 00 01
02 00 53 00 53 00 00 00

Green: quantity of blocks (wide)
Brown: start next line
White: end
Red: tile number to display
Blue: block type (0 is air, 1 is slope etc. Order is the same as in SMILE when changing the type of block)]
Purple: complex.

2 high bits are used for flipping.
4:   horizontal flip
8:   vertical flip
C:   horizontal & vertical flip

2 low bits are used for tile number to display
000:   first tile in CRE
0FF:   last tile in CRE
100:   first tile in SCENERY
3FF:   last tile in SCENERY


We'll need to add 1 more block to each line and add 1 more line. It will look like this:

03 00 53 00 53 00 53 00 00 01
03 00 53 00 53 00 53 00 00 02
03 00 53 00 53 00 53 00 00 00

(not fully colored)

Place this code to 27040 and change pointers from 87 4C to 40 F0.

Repeat the process for next pointers:
AD A3 (223AD)
BD A3 (223BD)
CD A3 (223CD)

Tile 53 should be replaced with:
54
55
FF

Don't forgot to change pointers to new states.


Then make the last state with correct graphics and type of blocks.


We'll need to correctly set type of blocks in last state of 3*3 block.

How I've done this:
*--   08 FF FE
|||   FF FF FF
|||   FE FE FE

* shootable
| vertical line
- horizontal line
Pink: BTS

It also can be done like this:

*--   08 FF FE
|--   FF FF FE
|--   FF FE FE


This is how the 3*3 block should be placed in level. You'll need to recreate this in last state. All tiles are 58 (looks like bombable block)

03 00 58 F0 58 50 58 50 00 01
03 00 58 D0 58 D0 58 D0 00 02
03 00 58 D0 58 D0 58 D0 00 00



Now we should done the second PLM. Second instruction will be first byte after orange bytes F00F (2700F). First instruction for all Bomb Block Bomb Reaction (according to Kej's docs) is CEDA (24EDA).

So, write pointers to these instuctions at 27004:
0F F0 DA CE


Last step is changing BTS.

All BTSes are located in bank 94. How to find where is place link to new PLMs using BTS 08 (bombable)? Let's find BTS 07. BTS 07 is 2*2 block.

Collision reaction is PLM D0B4 (according to PLM details). Go to A0000 and search for B4 D0. Next 2 bytes are 2F 86? Then, this BTS is unused. Change them to 00 F0 to point to 27000.

Bomb Block Bomb Reaction is PLM D0D4 (according to PLM details). Go to A0000 and search for D4 D0. Next 2 bytes are 2F 86? Then, this BTS is unused. Change them to 04 F0 to point to 27004.


Done.

To make 3*3 block works it should contains of these types of blocks as I mentioned earlier.

*--   08 FF FE
|||   FF FF FF
|||   FE FE FE

* shootable
| vertical line
- horizontal line





As for shootable 3*3 (or 1*3) you'll need to create new 16*16 tile. Creating 8*8 tiles aren't nessesary. All you need is create middle block in 3*1 shootable by flipping 8*8 tiles.

M13

Uhh... Stupid question, probably, but how does one make a new PLM?

I can't seem to find it in the SMILE thread. I see, "Try to find an item in a different room you know you won't use, move it out of reach, and use its index for your new item." as well as the part about index numbers, but I don't see HOW to actually make a new PLM. I've also explored the menus and I still don't see it. O_o


Quietus

Are you talking about actually coding an entirely new PLM, or do you just mean getting an extra (new) PLM within a room?

M13

I'm trying to add a new PLM to a room. Once I get there, we'll see if I can figure the rest out. >.>

Thanks for the patience. :)

Quietus

Well, the old way, which is a touch easier for beginners, is to find a room with enough PLMs for the room you're using, and then just swap the PLM pointers for the two rooms.  But...

Nowadays, the method is usually to repoint the PLMs to free space, and then add as many as you actually need.  For a beginner's guide to this, read through Grime's guide here.

Crashtour99

I feel I should point out that there are 2 basic types of PLMs.

Regular PLMs, like item pickups, missile doors, health stations, etc.

BTS PLMs, like bomb/shot/speedbooster/blue door/etc. blocks.  These are PLMs created by certain BTS types and are not included in the PLM list that the pointer goes to.  The guide by JAM, posted here by Grime, is for creating a new BTS PLM.