Make this shape out of six unique 1x1 textures.
The front section makes the painting wobble as you approach it.
The back section are the warps.
* Note: If using the same paintings as a vanilla level you can simply copy it's Geometry Layout Script and write it over yours.*
Import your area into a level in a fresh rom using SM64 ROM Manager.
Apply the correct collision type to your 6 painting collision textures. The first type that appears in the list are the warps followed by the others, in order of left to right.
Enable 'Inside Castle' object bank.
Make sure Mario has a valid spawn point and connect your warps. Look at vanilla in Quad64 to see how this works.
Save and backup your ROM.
Open the area in your ROM using Quad64.
Go to Misc>Script Dumps>Geometry Layout Script
If you scroll down you will see a node with a bunch of lines starting with 18 00
Underneath these is the line 05 00 00 00 // Close Node. Copy the first address from this line.
Open your ROM in HxD and go to that address using Ctrl+G.
Scroll down to the lines that are all 00 and write:
18 00 00 00 80 2D 5D 0C
to processes Mario's position (used for the ripple effect), followed by the following for each painting you want to render in the level:
18 00 XX YY 80 2D 5B 98
The XX parameter tells the game which painting list to use (0 = HMC pool, 1 = Castle Paintings, 2 = TTM slide entrance), while the YY parameter tells the game which painting in that list to use. Here are the painting lists:
(XX == 00)
00 = Shiny black pool in HMC = [07 02 55 1C]
(XX == 01)
00 = Bob-omb's Battlefield = [07 02 36 20]
01 = Cool-cool Mountain = [07 02 36 98]
02 = Whomp's Fortress = [07 02 37 10]
03 = Jolly Roger's Bay = [07 02 37 88]
04 = Lethal Lava Land = [07 02 38 00]
05 = Shifting Sand Land = [07 02 38 78]
06 = Hazy Maze Cave (Shiny black pool) = [07 02 38 F0]
07 = Dire Dire Docks = [07 02 39 68]
08 = Wet Dry World = [07 02 39 E0]
09 = Tiny Huge Island (Tiny painting) = [07 02 3A 58]
0A = Tall Tall Mountain = [07 02 3A D0]
0B = Tick Tock Clock = [07 02 3B 48]
0C = Snowman's Land = [07 02 3B C0]
0D = Tiny Huge Island (Huge painting) = [07 02 3C 38]
(XX == 02)
00 = Painting leading to slide in TTM = [ 07 01 2F 00 ]
Copy your new line of code and delete it. Paste it (insert it, don't write it) in front of the 05 from the address you found with Ctrl+G.
Save your ROM and test. Entering the painting warp should make the camera move to the rendered painting at its vanilla location, if it doesn't you've done something wrong.
You can now export your level as a .lvl64 and import it to your romhack. Remember to backup and test your ROMs frequently when hex editing, this greatly helps troubleshooting data entry mistakes.
Backup your ROM.
Take the hex values from the previous list that are in square brackets (ignore the 07). Add this to E0BC10 (the location the painting data starts) using a hex calculator.
Go to the resulting address in your hack using HxD.
You can edit other painting properties here but the ones we're interested in are the following locations (these correspond to their position in the list; 10 is the start of the next row):
(float) 0x08 - Rotation around X-axis
(float) 0x0C - Rotation around Y-axis
(float) 0x10 - X position
(float) 0x14 - Y position
(float) 0x18 - Z position
The painting position data uses its lower left corner. Enter the coords and rotation of this location using a floating point calculator (hexidecimal). Note that the axis correlating to Z is flipped in Sketchup/Blender, so just make positive values negative, and vice versa.
Save and test the ROM. You should now have a fully functional painting.
Backup your ROM.
Open your hack in Texture64 or N64Rip.
Find the vanilla painting textures by using a hex calculator to add 109 (in hex) + the bank + address listed here: https://queueram.com/n64/sm64/textures/ (this address may change in future ROM Manager updates).
Replace with your custom texture.
Test the ROM.
If you followed these steps in order you should now by looking at a working custom painting in a custom level in an SM64 hack. Congratulations hacker, you defied a long legacy of people who were either unable or too lazy to do this.
Q: Level(s) corrupted
A: You didn't delete that line of code or inserted code when you should have overwritten, and every address located after it was moved. Try using a fresh ROM if you continue experiencing this.
Q: Game crashes
A: You changed code at the wrong address.
Q: How do I work out my co-ordinates?
A: Place a small object where you want it to be then use that object's location. You can determine rotation this way as well (it may face a different cardinal direction to the painting).
Q: Only the first painting in the list wobbles
A: You pasted the code that processes' Mario's location more than once.
Q: My addresses are different
A: ROM Manager moves stuff around, that's why the instructions say to use a fresh ROM and import the level. If it's the textures you possibly forgot to add 109 or did it in decimal, or RM was updated. The list is still in order so just work out where you are and what offset to add.
Written by Quills on 27/02/2025 using resources from Hack64.net and Cheezepin.