Language…
15 users online:  AmperSam,  Ayami, Dispace,  Donut, Enan63, Green, Hayashi Neru, Joosh,  MarioFanGamer, Rhubarb44230, ShadowMistressYuko,  shovda, signature_steve, Sweetdude, Tomi P - Guests: 249 - Bots: 326
Users: 64,795 (2,378 active)
Latest user: mathew

[Tool] Quad64 (v0.1.1) - A brand new open-source SM64 level editor


Hello everyone. I've been around the Super Mario 64 hacking community for a couple years now, but just never got around to making anything for SMWC's C3 expos. Today is my first ever entry with a new level editor for SM64 called Quad64.

Screenshots:






(Level from Kaze's Super DK 64)

Features:

* Edit the positions and properties of objects like Stars, Platforms, Enemies, etc.
* Edit Warps, Painting Warps, and Instant Warps.
* You can view and edit up to 8 areas (starting with area 0) in a level.

The main focus of Quad64 is to be like Skelux's Toad's Tool 64, but with better ROM compatibility.

* Both the vanilla 8MB ROM & extended ROMs (including ROM hacks) can be modified using this tool**
* You can modify any of the 4 major regional versions of SM64, which includes the North American, European, Japanese, and Japanese Shindou edition ROMs
* You can load and save ROM files as big endian(.z64), middle endian(.v64), or little endian(.n64)
* Supports most of the N64 texture formats: RGBA16, RGBA32, IA16, IA8, IA4, I8, and I4. (CI textures are interpreted as grayscale)

** Note: Macro & Special objects are not editable with the vanilla 8MB ROM, since they are MIO0 compressed. You can use queueRAM's sm64extend tool to extend any vanilla ROM file, which will let you edit these objects.

sm64extend GUI:


If you want to be able to modify Macro & Special objects, then you will need to use an uncompressed extended ROM. I've made a simple graphical user interface for queueRAM's sm64extend program.
This simple little tool will expand your ROM to the size you want and uncompress all of the MIO0 data.

Improvements over VL-Tone's original SM64 extender:
* Works with the European, Japanese, and Japanese (Shindou Edition) ROMs
* Properly aligns the data blocks, so the extended ROMs should fully work on real N64 hardware.
* Creates an extended ROM in less than a second.

Download Links:
Quad64 [Download][Win32]: http://bin.smwcentral.net/u/26355/Quad64.zip
Quad64 Source Code [Github]: https://github.com/DavidSM64/Quad64
sm64extend GUI [Download][Win32]: http://bin.smwcentral.net/u/26355/sm64extendGUI%2528v1.02%2529.zip
This is awesome! Thank you so very much for this!

This is awesome man, can't wait to see how far this tool will go.
Oh man. With this (honestly, the last time I used Toad's Tool 64, some of the incorrectly displayed models creeped me out - does this display them better?) and the upcoming release of Super Mario Odyssey, I might try getting into SM64 hacking sometime.
Kinda in hibernation for a while. I hope to be back in full swing soon.
And it even works on Windows 10!!!
Literally the only thing holding at least 2 people I know back from attempting SM64 hacking, it was really unfortunate that that just didn't work at all.

This looks great, thanks for make and sharing!
Your layout has been removed.
I noticed it says you can edit instant warps, how would you set that up for custom levels? Since I cannot find a way to change the warps to other warp types.
Team CornersoftYoutube
I don't know much about SM64 hacking, but damn, this sure is some impressive work. People have been attempting to make their open source SMW level editors again and again, but AFAIK all of them gave up before their editors even got anywhere near Lunar Magic's functionality. Coding a decent level editor for a 3D game certainly is all that much harder, yet you already did quite a remarkable job at it. Here's hoping that you will be able to keep your motivation for much longer and get this tool as far as it can get. #smw{:TUP:}
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!

Originally posted by Luigixhero
I noticed it says you can edit instant warps, how would you set that up for custom levels? Since I cannot find a way to change the warps to other warp types.

Instant warps are completely different to the normal warps, so they can't be directly converted into them. Each normal warp takes up 8 bytes of memory, while each instant warp takes up 12 bytes of memory.

Normal warp connections have 4 parameters to them and are triggered by objects:
(1) Warp ID to jump from
(2) Level ID to jump to
(3) Area ID to jump to
(4) Warp ID to jump into

Instant warp connections have 5 parameters to them and are triggered by collision:
(1) Collision Trigger ID
(2) Area ID to jump to
(3) Teleport Mario in the X-direction after warp
(4) Teleport Mario in the Y-direction after warp
(5) Teleport Mario in the Z-direction after warp

The Trigger ID corresponds to the Collision Type in Skelux's SM64 Editor. A trigger ID of 0 will use the Collision Type 0x1B, ID 1 = 0x1C, ID 2 = 0x1D, and ID 3 = 0x1E.



While you can setup the collision for the instant warps in the SM64 Editor, there is no way to setup the instant warp command itself using the SM64 editor tool yet. You will need to do that in a hex editor.

Luckly when you import a level, it will generate some "no operation" level script commands that you can freely write over. If you only need a single instant warp, then you'll only need to overwrite 2 of the no operation commands.

Cut out two of the 0x10 (no operation) commands:

Code
10 08 00 00 00 00 00 00
10 08 00 00 00 00 00 00

And insert the following inside your desired area part of script (after the 0x1F command and before the 0x20 command):

Code
28 0C 00 01 00 00 00 00 00 00 00 00
10 04 00 00

or simply this if you don't care about being wasteful:

Code
28 10 00 01 00 00 00 00 00 00 00 00 00 00 00 00


Every 3 no operation commands you remove will give you enough space for 2 instant warps. You can find a reference to all of the Level script commands on this page here.

I can probably add some functionality in the level editor to find the no-operation commands, which would allow you to freely Add/Remove warps and other minor stuff in custom levels. No promises though!

You can also go ask Skelux to add instant warps in the next version of the SM64 Editor, but whether he'll do it soon-ish is something I can't say.

Updated to version 0.1.1

Fixed some of the more major bugs that people have found, and added a couple new options in the settings menu. Kaze's "Last Impact" should hopefully no longer crash in this version.

* The program will now ask you if you want to save the ROM file before opening a new ROM, launching the ROM in an emulator, or closing Quad64, etc. (if the file is not already saved).
* Added an option to cull triangle backfaces in settings
* Added an option to automatically save the ROM file when the "Launch ROM" button is pressed
* Added a black wireframe outline to the collision map, so now you should see where each triangle is.
* Fixed some crashing errors that appeared in some of Kaze's ROM hacks.
* Fixed a bug where the editor read the Macro Preset ID wrong, so Macro Objects should now no longer get corrupted.
* Fixed wireframe rendering
* The "Platform not supported" error message when trying to build the source code should be fixed. (Thanks Guccifer)

Let me know if there are any more crashes with any specific ROM file.

I also want to make a big to-do list of ideas that I could implemented into the editor at sometime in the future. If you have any ideas, leave a reply below and I'll consider them if they are reasonably possible to add in.

The most requested feature that I've heard from people so far in the SM64 community is that they want some "blender styled" camera/object movement controls as an alternative to the on-screen TT64 controls. I'll be working on that in the next major version of the tool, along with some form of texture editor.
Not sure if you read my PM, Davideesk, but I might as well repost my suggestion list here again:

- Vertex RGBA Editor
- Correct visualization of objects that use 0x32 behavior scale command. (including some others)
- drag-and-drop interface for items and enemies (or a duplication tool), and a polygon tool with texture support. That would be kinda cool.
- An option to be able to see the level boundaries, so you can tell if you are making your level in the right place. (Like, for example, so you don't place objects past the level boundaries and are unable to get to them.)
- Integration of Skelux's SM64 Editor (also known as Skelux's Level Importer)
- Quick level preview feature (in-game). This would mean to skip the logo, intro, file select, and castle and just jump straight into a level of your choosing.

For skipping, I thought I would paste this ASM code here:
Code
// peach skip
.orga 0x6bd4
addiu r0, r0, $0009

// lakitu skip
.orga 0x6d90
addiu s0, r0, $0000

// skips mario head screen at begining of the game (but not after a game over)
.orga 0x9114b8
tgei t0, 0x0000
bnez r0, 0x00911cf0

// level intro text skips
.orga 0x4b7c
addiu r0, r0, $4b3d
.orga 0x4924
beq r0, r0, $00004940

Originally posted by Guccifer
Not sure if you read my PM, Davideesk, but I might as well repost my suggestion list here again:

- Vertex RGBA Editor
- Correct visualization of objects that use 0x32 behavior scale command. (including some others)
- drag-and-drop interface for items and enemies (or a duplication tool), and a polygon tool with texture support. That would be kinda cool.
- An option to be able to see the level boundaries, so you can tell if you are making your level in the right place. (Like, for example, so you don't place objects past the level boundaries and are unable to get to them.)
- Integration of Skelux's SM64 Editor (also known as Skelux's Level Importer)
- Quick level preview feature (in-game). This would mean to skip the logo, intro, file select, and castle and just jump straight into a level of your choosing.

For skipping, I thought I would paste this ASM code here:

Code
// peach skip
.orga 0x6bd4
addiu r0, r0, $0009

// lakitu skip
.orga 0x6d90
addiu s0, r0, $0000

// skips mario head screen at begining of the game (but not after a game over)
.orga 0x9114b8
tgei t0, 0x0000
bnez r0, 0x00911cf0

// level intro text skips
.orga 0x4b7c
addiu r0, r0, $4b3d
.orga 0x4924
beq r0, r0, $00004940

I can probably add in some of these features like the seeing level boundaries and the Vertex Editor, but I doubt that SM64 editor integration would ever happen. I have my own importer tool that supports more options, even importing COLLADA models. Even still, it might take a while for me to fully implement a feature like that.

By the way, you don't need any ASM code to skip the logo, title screen, and file select. You can just modify 2 level script commands at 0x108A1C:

Code
At ROM address 0x108A1C:
13 04 00 10 // Select level to jump into (0x10 = Castle Grounds)
00 10 00 15 00 2A BC A0 00 2A C6 B0 15 00 00 00 // Load straight into the 0x15 segment for loading levels.
Originally posted by Davideesk

By the way, you don't need any ASM code to skip the logo, title screen, and file select. You can just modify 2 level script commands at 0x108A1C:

Code
At ROM address 0x108A1C:
13 04 00 10 // Select level to jump into (0x10 = Castle Grounds)
00 10 00 15 00 2A BC A0 00 2A C6 B0 15 00 00 00 // Load straight into the 0x15 segment for loading levels.


Oh right. I totally forgot about that! I never really had the chance to find a documentation on SM64 scripts, though I heard VL-Tone had ones, but then other rumors occured of them being out of date and all links seem to be broken too, so I gave up. Excuse me for the off-topic question, but might have a link to an updated documentation on SM64 scripts in general?

EDIT: Oh, I believe I found it. Nevermind.
Great work! Can't wait till you finish this in full. :)

Here is a preview of what I'm working on for the next update, the Texture Editor! Which will allow you to view/edit/export textures used by level geometry and objects, textures that were not editable in TT64 like the HUD, level backgrounds, and even the ending cake image! Note: You can only edit the textures in extended ROM files.

I was originally going to include this in the v0.2 update, but I don't want people to wait a long time in-between updates. My plan now is to complete the texture editor, and add in a few other little changes and release the update as v0.1.2, then I will immediately start on the alternate control schemes for version 0.2. I have no estimate release date yet for v0.1.2, but hopefully it shouldn't take too long.

Screenshots:

Does this also include editing textures from imported levels? This could be a wonderful oppertunity to make it possible to edit the masks of custom textures so we can do fancy stuff with it.


Originally posted by BlackStone187
Does this also include editing textures from imported levels? This could be a wonderful oppertunity to make it possible to edit the masks of custom textures so we can do fancy stuff with it.


It'll be more of a texture replacer than an actual editor in this first release, so don't expect any fancy functionality from it yet.

Something I noticed with Super Mario 8MB and Kaze's Last Impact is that a lot of the textures are flipped vertically for some reason. I'll have to add in a option to auto-flip the texture on importing and exporting.

uhh this is insane