No no, I got the .bat to work... (Besides your code produces an error when I save it as a .bat file.) It's just that now I need some working ASM code that prevents Mario from getting any bonus stars if he has 99, preventing the Bonus Game. Glyph Phoenix's didn't work and Airsanio erased the other option (plus it gave an error)...
This is really really important. I could just use coins instead of bonus stars for what I'm trying to do, but coins is too cliche'd.
I even tried studying the code in one of the patches that made it so you couldn't get more than 99 coins... Problem is I don't know some of the Rom banks that do stuff with Bonus Stars, and they're not in the Rom Map on the site. And it's hard to believe that after so many breakthroughs of SMW hacking, nobody's found much info on the Bonus Stars... They seem like a simple piece of the game.
Inserting custom blocks isn't hard at all. In fact it's the easiest thing in the world. Wanna learn how? Shaddap, you're learning anyway. Grab a chair. And make sure to read the WHOLE post. I don't care if it's long. This is for you and your hack, so it's important.
First thing to do, if you haven't already, is open LM (LM = Lunar Magic) and save any level one time. See, LM automatically installs tons of ASM hacks that BlockTool needs to work if it's never been saved before. If you don't do this, BlockTool will tell you you're stupid.
Still with me? Good. Now open BlockTool, and use it to open your SMW Rom. We're gonna add the Smashable Brick. So scroll down to where it says Smashable Brick on the list.
To add this block, you'll need to enter the "Map16 Number". This is referring to the number of the 16x16 block on that big picture list in LM (the one you see when you open the 16x16 Tile Editor or the Direct Map16 Access Placer). Here's the catch: They want you to put the number in DECIMAL, not Hexidecimal.
So now we need Windows Calculator. Open it up, go to Scientific Mode (there's a menu for that), and turn on Hex Mode. Now enter the Map16 number you want your custom block to be. 200 is the lowest number you should ever enter for this, 'cause the game already uses tiles 0 through 1FF and we don't wanna screw anything up. Personally I recommend 300 instead of 200, 'cause tiles 200-2FF in the Map16 are "tileset specific", which means they look different for every Gfx option and it can get confusing when your tiles suddenly look like they've vanished, but really haven't.
So, enter 300 in the calculator for this example, and then (without changing the number), switch the calculator to Dec mode. The new number that shows up is your golden ticket; THAT'S what you should enter in BlockTool. Do so, and hit the Add button. Some numbers will be saved to the list. Save the Rom, and your Custom Block is now in the hack!
But we're not done yet. Now we have to assign GRAPHICS to the custom block, 'cause so far it still looks like four pale squares. So go back into LM, go into the 16x16 Editor, and while you're at it, open the 8x8 Editor. Now, there's two ways to do this; an easy way and an advanced way.
The easy way to get graphics is to left-click on any existing tile from any page, opening 16x16 Properties, changing the "Acts Like" number to the right value (which BlockTool should tell you under Tile Info), then right-clicking on the Map16 tile (in Hex) you placed your custom block (so if you typed 300 in the calculator, it should be 300 in LM). The tile will be copied there, and your work is done. Change the palette if desired.
The advanced way is to left-click on tiles in the 8x8 Editor, then right-click on the little four squares in the bottom of the 16x16 window. I always do it this way, 'cause it gives me more control, but it's a little more time consuming. Still, if you care about your hack, you should go all-out, unless you're new at SMW hacking and are just teaching yourself the basics.
Once your 16x16 tile is set, press F9 to save it, then save the level as well just to be sure. Again, don't forget the Acts Like setting. The most commonly used values are 25 for air and 130 for a solid block. Use the others if you're sure you know what you're doing.
Now to place the tiles in a level. To do this, go to the Object List and select Direct Map16 Access. Now go down to the page your tile is on, and hover the mouse over it. It should say info about the custom tile taken from BlockTool. Place this in the level. You can resize the block however you want, but it has to be a square-shape; for complex shapes, you'll need more than one object. Save your level.
Time to test your hack. If you did everything right, your block should work perfectly! If not, well... ask yer Uncle Schwa and I'll help you with the steps you missed.
As for the rest of you, I think it's unfair to dismiss our friend here as a moron just because he can't seem to figure out an intermediate-level hacking program. It took me a while before I got it when I was a newbie... This forum is specifically meant for us to be able to help people, and if you aren't willing to do that, why are you here? I managed to help him, and I didn't even need to give him that IPS patch he wanted.
So I was inserting a tweaked variation of mikeyk's Custom Coins in my hack... The tweaked part was that it played a different sound effect when played and set the Bonus Game flag (from the Ram Map) to ON so Mario would go to the Bonus Game if he collected this tile and beat the level. I created the Bin file with TRANSASM, added the block to Blocktool with the right values, set it up and inserted it into my hack. As soon as I did this, Blocktool froze up and closed itself with the annoying Windows error message. I go into LM and whaddya know, my block was never inserted. Furthermore, when I open the hack, the screen stays black after the Nintendo Presents logo, freezing up.
Naturally I thought this was because I had screwed something up. So I monkeyed around with a few settings and kept trying. Same result each time. I changed the tile to an existing custom block (SMW Coin), thinking maybe the editor didn't like Tile #769 for some reason. Nope, it worked perfectly then.
So then I check to see if mikeyk's original Custom Coin had the same effect... Well, well well. It did. And dangit, I got this block from the DATABASE.
Case and point, mikeyk's Custom Coins in the database are broken and need to be fixed ASAP.
Unless there's something stupid and evil I overlooked, but I doubt it.
This is super simple custom block code that can be applied to a block set to act like a coin. It's supposed to make it so Mario enters the Bonus Level if he collects it and beats the level. What does it do instead? It freezes the game when it's touched.
I know SaiyoClaus used this very same piece of code near the beginning of his Bonus Level Ender custom block, so it baffles me how this doesn't work...
Each level has 8 Graphics Banks, and one Bank is composed of 128 8x8 tiles. The first 4 banks are for the level graphics, and these banks are labeled "FG1", "FG2", "FG3" and "BG". FGs 1 and 2 have all the universal tiles, such as ? Blocks, turn blocks, Munchers, pipes and whatnot. FG3 is always a tileset-specific bank, containing things like slopes and ledges for Normal or Underground tilesets, Ghost House balconies, Castle walls and spikes... Anything native to specific tilesets go in FG3. The BG bank is the same, but only contains tiles for the background. Note that it IS possible to use FG tiles for the background and vice versa, if you're making your own 16x16 tiles.
The last four banks are the Sprite Banks, labeled SP1, SP2, SP3 and SP4. Now, SP1 and SP2 have all the universal sprite graphics, such as Koopa Troopas, Jumping Pirhana Plants, Goombas, etc. SP3 has all the *almost* universal graphics. The only two default settings that use a different SP3 are the Castle set and the Ghost House set. (Yoshi's tounge graphics are also stored here.) Finally, SP4 is all the tileset-specific sprites, such as Pokeys, Puntin' Chucks, Buzzy Beetles, checkerboard platforms, etc.
There are two ways to change graphics for a level. The easy way is to click the Purple Poison Shroom icon, opening the Standard GFX dialouge, and choose a preset arrangement of banks. The sprite banks and level banks are stored seperately, so it's perfectly legit to have cave enemies in a cloud level, for instance. You'll notice each preset option lists the number of your four banks for that category.
The advanced way is to click on the Red Poison Mushroom, opening the almighty "Super GFX Bypass". NOW you can start getting dirty. With this option, you can choose each seperate bank individually. It's tougher to use, and you have to know which banks have what, but this gives you WAAAAAY more control and I always recommend using it.
But that's not all! Noooooo sir! Super GFX Bypass is the only way to get ExGFX to work. When you extract graphics from the Rom using LM, it's saved in a folder labeled "Graphics". All of SMW's graphics are stored in .BIN files here labeled "GFX##.bin", where ## is a two-digit hex value showing the number of the bank. .BIN files can be opened with TLP (Tile Layer Pro, a seperate graphics editor), but make sure to set your Format option to "SNES" when you open the file.
There's another folder you should use, too, called "ExGraphics". Files in here don't exist until you make them yourself. What I do is copy-paste files from Graphics into ExGraphics and edit them in TLP. These files are labeled "ExGFX##.bin", where ## is a hex number from 80 to FF showing the number of the ExGFX bank. If you have ExGFX files in the ExGraphics folder, you can import them to the Rom at literally anytime with the Yellow Mushroom icon.
Once your ExGFX are stored in the Rom, time to link to them. Open Super GFX Bypass. Now select the bank you'll use your graphics in, and scroll down to the hex number of the file. You should see a number in brackets as your option. That's the one! Select it, hit OK, and your level now uses your graphics for that bank!
To get some of the custom sprites to work graphics-wise, you have two options. The easy way is to rename a .bin file that comes with SpriteTool to ExGfx##.bin, put it in the folder, import it and go off that. But here's an advanced trick: Take a blank .bin file (by copying an existing bank and deleting all the tiles in TLP), then open the normal graphics bank files/custom sprite banks that have sprites you want to use. (Remember, if a custom sprite bank says "SP3", you can't use them in a bank designed for SP4.) Drag and drop tiles from existing banks into the same spot in the blank bank, then save your .bin file, import it as ExGFX and use it. With this way, it's possible to have a Buzzy Beetle and a Pokey in the same level with no glitches, or a Magikoopa and Birdo, or Spinies and Rex. The possibilities, while not limitless, are expanded quite a bit!
what you're trying to do. It should look like this:
STA $1DFC ;play a coin sound
If I'm following what you want, when you touch that block, it will act like a coin and play a sound. I'm assuming you already have the rest of the code except for the "acts like" code, so I'll leave it at that for you.
Yeah, but won't this block not disappear when Mario touches it, allowing him to collect one coin each frame?
Edit: And why do you need LDY? The Y register isn't even used in this code. @[email protected]
But that's what I did and I still get this! And the game froze also when I imported mikeyk's custom coins that were UN-changed! That's why I'm thinking mikeyk gave us the wrong reloc data to input to begin with.
I tested the unchanged coins again and they worked. Then I tested the one I had done before (convert coins.asm to a .bin file) and it DIDN'T work. I looked at the two files side by side and found something bizarre: Byte 0x73 in the normal file was 01 and in the imported file it was 81. Other than that, it was totally identical.
So I tried my block again, the tweaked one with the bonus round code, set the reloc files properly (5 bytes ahead), then went in and changed Byte 0x78 (5 bytes ahead) from an 81 to a 01. I thought for sure this would do the trick.
But it didn't. My hack still crashes when I collect the tile.
Well, thanks for your help, but I scrapped my original idea after I got my fallback to work perfectly.
I was gonna have it so you could use the Bonus Stars gained from beating levels to buy items at various shops around the Overworld. To do that I would've had to disable the Bonus Game and have it so you could never have "100" stars.
But since I couldn't get that code to work, I scrapped the idea and did this: Beating levels now gives you NO bonus stars at all, but in some levels there is a Coin Ship Idol (graphics taken from SMAS, specifically the Coin Shop on the SMB3 overworld that sometimes appears from a Hammer Bro), and when you collect it and beat the level you're taken to an Airship level (on Level 100, so it replaces the Bonus Game) where you can actually collect the floating Bonus Stars throughout the level. THEN you can use THOSE to buy items from the shops.
And so far I have everything working, thanks to you guys. This community rocks!!
Yeah, getting all that to work required several custom blocks. The Coin Ship Idol, the collectable Bonus Stars, the tons of Shop Blocks... And each one contains ASM edited and tweaked by yours truly. Holy crap, that's a powerful feeling.
I don't like team hacks. ...Well, I don't mind playing those hacks, but I hate the thought of working together with someone else. My hacks are MY dreams and inner passion given form. If I have to share my fires with other hackers, my dreams become tainted, and my soul falls into the mire of oblivion forever.
Such is the way of the Aspie.
Also, give Ghettoyouth a break, yes? As an Aspie, I know how it is to be totally into one thing, then suddenly want nothing to do with that thing and be totally into something else. It's actually a very frustrating feeling, in a subconscious way.
Perhaps you should try drawing some graphics yourself? Quite frankly I suck at graphics, and it doesn't interest me to draw my own graphics, unless they're tweaks of existing ones (point is I can't do it from scratch)... If you're into this sort of thing, though, you may wanna give it a try. If your level design skills suck ass to the tenth degree and have no hope of getting better, but you're a God with spritework and computer art, you'll still definitely have a place in this community. Same goes with any other skill.
I relate to that, actually. I'm the opposite. People have told me my level design skills are pro, but my ability to draw? I have no chance (to survive make my time, HEHE).
That said, if drawing's not your thing either, would it hurt to do a little soulsearching and find your top skill in hacking? I want to know from you now what you think it is.
Every hacker has a story. That's the groove that makes the hacking world spin it's circle. It's our diversity and uniqueness.
This thread is the place to tell your story. How did you get into the SMW hacking scene? What draws you to it, and continues to empower you with the desire to hack this game? How brightly do your memories, passion and dreams of SMW burn?
Further boosting our diversity, besides each strand in the Web of the Past that forms SMW Central, is our abilities in the Present. Some of us are pro level designers. Some of us excel in the graphics aspect. Still some of us are just great at helping other hackers realize THEIR potential. There seems to be no such thing as a nonexistant skill in the hacking scene.
So tell us, what provide YOUR wings in the SMW hacking business? What is your best skill, in your opinion? What legacy do you choose to be known by? What will be your downfall-- your worst skill in SMW hacking (also your opinion)? How have you improved, are improving, will improve?
I ask you these two questions in the holy name of The Schwa. Answer them proudly and truthfully, and realize now that we, as hackers, are all immortal in our own, distant, complex, diverse, universal way.
I'm not sad about boing's remarks, you know. But thanks for stickin' up for me.
Here's the deal. If I didn't see potential in you, I wouldn't have helped you. It's just... It makes me sad how there's such a barrier between the experts and the beginners. Even when some of the best hackers on this site helped me with ASM, I had a hard time understanding them 'cause they were speaking in terms that they were mainly used to and made sense to them. I am an advocate for effective communication, because in my life (both in real life and on the Internet) I've had tons of difficulty communicating effectively with peers and adults. This is part of having Autism (which I have, and am proud of).
That's why I give such exact directions, and THAT'S why my posts are so damn long. XD
But yes, I enjoy helping people who need it. Very much so, really. In fact, if you ever have any questions about SMW hacking I want you to PM me with them. I'm not an expert hacker; I'm in between Intermediate and Advanced (closer to Advanced), in my opinion... I know limited ASM, but am an expert at all the basics, and the basics is where you're starting, so I can help you out. Someday you'll probably surpass me, too. That's a day I look forward to.
If I remember right, Level Mode doesn't determine this sort of thing. Map16 Layer Priority does. A Layer 2 tile will show up in front of Layer 1 if its' Layer Priority is set to "Enabled" in the 16x16 editor. That's why you can have cool effects like rising and falling lava, which covers the terrain, but not the same effect with the actual terrain.
Unless you go and change all the basic terrain tiles to enable Layer Priority... but seriously, don't do that. You'll regret it if there are any spots at all in your hack featuring walk-through dirt, which is pretty darn common. :S
NOTEPAD should be the thing you code ASM in. Yes, Notepad. See, what you can do is write assembly code in a .TXT file, rename the file to an .ASM file (which works exactly the same way), then once your code is ready, you can either drag the file to the TRANSASM program icon to make it into a .BIN file, which is immediately importable as a custom block... OR you can set a .CFG file to go with it and use your raw .ASM file as a custom sprite... OR you can use xkas.exe to patch the ASM to your hack if you wrote it the right way.
I don't trust Thingy32, though. It's not native to SMW hacking. :S
But yeah, there's my advice. But wait, I have some more.
Never ever ever ever forget the RTS command, like I foolishly did. If your code doesn't hit an RTS at some point, it'll freeze. That error put me 5 days behind schedule.
Two. Branches are awesome. You can use them to make a whole lotta Or Statements, or create a Loop to repeat code x amount of times. Be careful with loops, though, 'cause if you can't break your loop, your loop might break your Rom. O_O
That's all I have... Seriously, I'm a rookie at ASM. But I thought I should try and help anyway.
Just remember this about ASM, and all computer code: Programming is a completely black-and-white concept. Every set of commands will never change its result no matter how many times it is run. That's what's beautiful about it.
(to Airsanio) Geez, that's a hard road to walk... I've been there. (I mean the bit about knowing the advanced stuff before the basics.) Not in hacking, but in other things. Well, if you need a bit of help on level design, you know who to ask, 'cause that's my strong point...
My weak point is graphics. I can rip fine, but am incapable of drawing my own. ASM used to be one of my weaknesses, but I'm slowly getting better.
I'll tell you my story of how I got here later. I'm very tired right now-- been hacking for several hours.