Language…
26 users online: 1UPdudes, Abstract, badummzi,  Blaagon, CharlieUltra, CroNo, dashlet, Dennsen86, DixyNL, GamesInTweed, GiraffeKiller, Hammerer, Inflagrandy, JezJitzu,  MarioFanGamer, Metal-Yoshi94, MorrieTheMagpie, mtheordinarygamer, Papangu, playagmes169, rafaelfutbal, Romiori, Rykon-V73, Ryrir,  Segment1Zone2, TheOrangeToad - Guests: 298 - Bots: 464
Users: 64,795 (2,369 active)
Latest user: mathew

Block Insertion with GPS

FundamentalCustom BlocksTool-Specific

  • Pages:
  • 1
  • 2
(also available as a Google Doc)

Introduction

In this tutorial, I will teach you how to insert custom blocks with the aptly named Gopher Popcorn Stew, more commonly known as GPS.
GPS is the successor to Blocktool Super Deluxe. It does many things better than it, here’s some of its advantages:
  • While still having a GUI version, GPS is a very simple command line tool, which makes it a lot easier to use.
  • It stores the blocks to be inserted in a text file rather than a proprietary database. This makes it easier to add new blocks and see what’s inserted.
  • It supports setting the acts like value of the Map16 tiles during insertion. You can do it in Lunar Magic, but this is just more convenient.
  • It has full SA-1 compatibility if your blocks are written with it in mind, too.
  • It supports shared routines, which saves space in your ROM.

What do I need?

Inserting blocks

Obtaining blocks

As mentioned above, you can either make a block with Blockreator or download ones from the custom blocks section of SMWCentral.
Blockreator is fairly simple to use. The purpose of this tutorial is not to teach you about Blockreator, however. After you make your block, click “Generate Code” and copy the code you get into a blank .asm file.
Blocks you download from the custom blocks section come in a .zip file. Inside, you should find a .asm file. That’s your block. If there are multiple .asm files, then the submission probably consists of more than one block. There might be a readme, which will probably explain what is what.
Once you get your blocks, you should put them in the blocks folder that GPS comes with. For this tutorial, I’ll be using the Destroy Yoshi block from the blocks section and a simple Blockreator block, which shatters when hit with a fireball. I suggest renaming them so you easily know what they are. Note that you can’t have spaces in the names.

The list file

In the main folder of GPS you should find a file named list.txt. This is your block list and it is where you put in the name of your blocks and where they should go.
It has a simple format. Each line in the file represents a single block which should be inserted and it looks like this: you put the Map16 number under which the block should go, then, if you want to set its acts like value, a colon, followed by the acts like value. After that, you put in a tab or a space and you type the block’s name within the blocks folder, extension included.
Here’s an example list.txt:


In this case, GPS will put ShatterOnFireball.asm as block 300 (first block on the third page in the Map16 Editor) and make it act like 130 (the cement block). It will put DestroyYoshi.asm as block 301 and it will not change its acts like value because there is no colon. Blank lines are ignored.

Release the Kraken!

After you’ve made the list, it’s time to open gps.exe:


It’s fairly obvious what you need to do: you should enter your ROM’s name, including the extension. It’s generally safer to not have spaces in the name, surround your ROM’s name with “quotes” if the name does have spaces. If you’re not using Windows Vista, you can also drag your ROM on top of the black window. Either way, press Enter after typing in the name.
If all went well, you should get a nice little message saying so:


First, it tells you that it added in the shared routines from the routines folder. You don’t need to mind this, unless you’ve messed with them.
Press Enter to close GPS. Congratulations!

Using your blocks

All you need to use your blocks is to insert the Map16 block that you mapped the ASM files to. In my case, I’d insert block 300 into my level if I want the shatter on fireball block.
I recommend inserting your blocks into one generalized area, for example the lower half of page 3, and making other blocks act like them to conserve space. For example, I can insert the Destroy Yoshi block as block 350 and then make other blocks, let’s say 4A3, 553 and 838, act like 350 to have them all destroy Yoshi without inserting the block three more times.

Frequently asked questions

What if I want to insert more blocks after using GPS?
Just add them to your list and run GPS again. It’s safe to use it as many times as you want on the same ROM.
What if I’ve already used Blocktool Super Deluxe on my ROM?
GPS automatically removes the code from BTSD when it’s run for the first time. You won’t have to use a new ROM.
Error: Couldn’t open “*.smc”
This means that GPS couldn’t find your ROM. Make sure you spelled the name properly. If that still doesn’t work, make sure there are no spaces in it. Try dragging the ROM into GPS if that doesn’t work either.
Error: blocks/*.asm: error: Couldn’t open file
A block you have put in list.txt is not present within the blocks folder. Make sure the names match and that your block’s extension is .asm, not .txt.
Error: block_boilerplate.asm:*: error: Unknown command. [incsrc blocks/*.asm]
This is generally caused by having spaces in your block names.
Error: blocks/*.asm:*: error: Unknown macro
This is generally caused by deleting files from the routines folder. Don’t touch it unless you know what you’re doing.
Thank you for that useful tutorial.

How would I delete a block if I change my mind, or replace it because there's an update of that block?



YouTube Twitter Twitch
Blocks aren't fixed i.e. you can remove or change the block anytime you want.
Originally posted by MarioFanGamer
Blocks aren't fixed i.e. you can remove or change the block anytime you want.


Oh right! So, removing them from list.txt does it? Seems that way in MAP16 thus far.



YouTube Twitter Twitch
Says that the blocks are applied, i put them on 200,201,202,203,204 but they dont appeared there, what i do?
You mean graphically? None block inserted adds graphics to blocks, only code. You have to add the graphcis yourself.
i dont get it, i added the asm blocks, so... i get only the code of the blocks in MAP 16? I added .asm archives with the GPS and nothing happened bassically


Well, after you insert them with GPS, you still have to add them to your level via Lunar Magic in order to use them. Is this really your issue? Or you're having problems in editing the MAP16 tiles? If it's the latter problem, you can refer to this tutorial for help.





Dream team (feed them, please):






Originally posted by Major Flare
Well, after you insert them with GPS, you still have to add them to your level via Lunar Magic in order to use them. Is this really your issue? Or you're having problems in editing the MAP16 tiles? If it's the latter problem, you can refer to this tutorial for help.


My problem is: I add the .asm blocks, so i try to add an grafic (the one-way blocks) but then i try to add them on map 16, they dont appear and my graphics go shit. I want blocks that acts like one ways, but as i know you need the "act as" for the block, and... i dont know the act as for the one way...
i try inserting blocks, but it says that i have to save a level in lunar magic, even though i have multiple times.
Snes9x > Zsnes


Strange... try these steps:

1) Open a clean ROM in Lunar Magic;
2) Move around some objects, then save;
3) Extract and re-insert the GFX (buttons #lm{extgfx} , #lm{extexgfx} and then #lm{insgfx} and #lm{insexgfx} )
4) Now use GPS in your ROM.

If it does not work... send me a .bps of your ROM and I'll test it.





Dream team (feed them, please):






im having the block_boilerplate.asm error and it says that it cant find defines.asm even though its in my blocks folder.
Originally posted by TheNooseMan87
im having the block_boilerplate.asm error and it says that it cant find defines.asm even though its in my blocks folder.


defines.asm should be in the main folder (the one gps and main.asm are in), not the blocks folder.
I'm having GPS issues. This is the error message:

block_boilerplate.asm:5: error: (E5016): File 'blocks/SwitchActBlue' wasn't found. [incsrc "blocks/SwitchActBlue"]

The file name for the blue switches is SwitchActBlue and it's in my "Blocks" folder
Question: Do you have SwitchActBlue in the blocks folder or not? Did you check for any typos? Did you check the extension? It could be that you have SwitchActBlue.asm but not SwitchActBlue.
Dang it, forgot the .asm on list.txt. #smw{-_-2} Thanks a million
Thanks, Now I know how to insert blocks in smw but if a block includes the GFX, How do I insert the GFX with the block #tb{:?}
We have a different tutorial for that.
I am using the switch.asm file and when trying to insert it to my rom, it says "could not open list.txt" even though it is both filled out and in the right file? can someone help? #smw{o_O?} i might give you my discord #smw{:TUP:}
Originally posted by ItsLightning
I am using the switch.asm file and when trying to insert it to my rom, it says "could not open list.txt" even though it is both filled out and in the right file? can someone help? #smw{o_O?} i might give you my discord #smw{:TUP:}

If you followed all these steps correctly, you should be able to insert the blocks:

  1. Put your blocks in the "blocks" folder of GPS.
  2. Open list.txt and enter the map16 tile, press Tab, and enter the file name. For example:
    Code
    301	switch.asm
    Do note that list.txt is in the main folder of GPS, not in a subfolder.
  3. Open GPS, enter your ROM name and press enter. You should get a message saying "All blocks inserted successfully!"
  • Pages:
  • 1
  • 2

FundamentalCustom BlocksTool-Specific