MeroMero |
Posted on 03-10-16, 08:06 pm in What are "overlays"?
|
Death by cuteness
Karma: 6589 Posts: 389/598 Since: 05-01-13 |
Posted by KingYoshi For example, I don't know why there should be information about each level in the overlays. I'd think all information that's needed is stored in the files in the \course folder. True, but think of it as a skeleton, you will still need the flesh and the nerves so-to-speak to move that skeleton because otherwise that skeleton is just good for decoration. arm9 and overlays provide that much needed flesh and nerves (or in other terms how the game should handle the different behaviors and parameters). For example to play a level smoothly, the game needs to handle: _camera behavior _entrance behavior _level completion behavior _losing a life behavior _actors/sprites behavior _Mario/Luigi behavior _the tilesets/backgrounds/models/textures priority _et cætera I'm not taking into account the graphics themselves since this is the job of the VRAM to handle this. There's probably a lot more that I forget but you get the picture, those behaviors needed to be coded, and then read by the game. And how do you do that? Thanks to the arm9 and the overlays. |
MeroMero |
Posted on 03-10-16, 09:38 pm in Super Mario Bros. Within the Limit! (rev. 1 by MeroMero on 03-10-16, 09:41 pm)
|
Death by cuteness
Karma: 6589 Posts: 393/598 Since: 05-01-13 |
Your screenshot for level 2-1 made me think about something:
_you can choose which level will have a snowy end-of-level castle as seen in this video: _open arm9.bin with NSMBeditor _go to offset 0×1EF0 you should see this string: 00 00 00 00 00 00 00 00 00 00 00 FF 07 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 For example: If you want to have a snowy castle in level 2-1, look at the course folder for the corresponding bgdat.bin (In this case all 3 who begin with B01). Now look at the file ID (for B01_1_bgdat.bin it should be 942, 944 for B01_2_bgdat.bin and 946 for B01_3_bgdat.bin). Subtract 900 to the file ID (942 here) and then divide the result by 2. 942-900=42 42/2=21 Then divide by 8, the result will give you the byte offset while the remainder (between 0 and 7) will give you the bit number for the byte specified by the result. 21/8=2 with a remainder of 5. Look at the byte at offset 0×1EF0+2: 00 Use this site to convert from hex to binary, and from binary to hex: http://www.binaryhexconverter.com/ Bits are read from right to left: 7-6-5-4-3-2-1-0 Since you need to set bit number 5 as 1, you get this: 00100000 If you do the same thing for file 944 and 946: 944 result:2, remainder:6 946 result:2, remainder:7 00100000 should become 11100000 Now convert from binary to hex: 11100000 should be E0 in hex. Since this is byte number 2, insert E0 at offset 0×1EF0+byte number (in this case 2), which means you have to write E0 at offset 0×1EF2: 00 00 E0 00 00 00 00 00 00 00 00 FF 07 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 And now if you try level 2-1, the end-of-level castle (whether it is the normal exit or the secret exit) should be snowy. Anyone who uses my hack ROM as a base can use this trick. |
MeroMero |
Posted on 05-11-16, 05:23 pm in Vertical level problems (rev. 1 by ImageBot on 11-21-16, 03:20 am)
|
Death by cuteness
Karma: 6589 Posts: 397/598 Since: 05-01-13 |
For your first problem:
Firstly you have to make sure that the X-coordinate of the camera is 0 (the red rectangle in the screen below). If not the level will refuse to load. And secondly you have to make sure that the camera width is equal to: 256×2n with n being a whole number whose first iteration is 0. Here are all the possible values: _256×20 which is 256×1 whose result is 256 _256×21 which is 256×2 whose result is 512 _256×22 which is 256×4 whose result is 1 024 _256×23 which is 256×8 whose result is 2 048 _256×24 which is 256×16 whose result is 4 096 _256×25 which is 256×32 whose result is 8 192 For your second problem: Usually this happens when the entrance from where Mario is supposed to enter is located under the view, if that's the case just place the entrance inside the view. Also the view setting for the entrance must be equal to the view number of the View from where you want to load the entrance. If there's something not clear, don't hesitate to ask for clarifications |
MeroMero |
Posted on 06-11-16, 11:41 am in Camera moving out of view when Zoom is active
|
Death by cuteness
Karma: 6589 Posts: 405/598 Since: 05-01-13 |
If you want the technical details, the minimum height you have to reach for that glitch to happen is actually "Zoom value"/2.
Also the 12 bottommost tiles become the 12 topmost tiles when the view is shifted downwards. In your example, since your zoom value is 18, the glitch happened because Toad went at least 9 tiles above the bottom of the View. |
MeroMero |
Posted on 06-13-16, 07:23 pm in Splunkin Remodel Code
|
Death by cuteness
Karma: 6589 Posts: 406/598 Since: 05-01-13 |
If anyone (more specifically skawo) is interested in the possibility of having both Splunkins and Shy Guys in the same Area without any restrictions, then:
In arm9: Paste the following at offset 0×1B00: 68 00 9F E5 00 10 A0 E3 55 20 00 EB 00 00 50 E3
0D 00 00 0A 19 62 01 EB BE 20 D0 E1 50 10 9F E5
02 20 80 E0 0C 20 92 E5 02 20 80 E0 08 00 92 E5
00 20 82 E0 BA 00 D2 E1 00 00 82 E0 08 00 90 E5
00 00 82 E0 BC 01 D0 E1 B0 00 C1 E1 24 00 9F E5
00 10 A0 E3 42 20 00 EB 1C 00 9F E5 00 10 A0 E3
3F 20 00 EB 01 00 A0 E3 04 D0 8D E2 00 80 BD E8
A6 07 00 00 B8 99 17 02 A5 07 00 00 A7 07 00 00
08 00 95 E5 10 00 10 E3 2C 00 9F 05 2C 00 9F 15
0F DD 05 EA 08 00 95 E5 10 00 10 E3 20 00 9F 05
20 00 9F 15 0D DD 05 EA 08 00 95 E5 10 00 10 E3
14 00 9F 05 14 00 9F 15 15 DD 05 EA 65 05 00 00
A6 07 00 00 64 05 00 00 A5 07 00 00 66 05 00 00
A7 07 00 00 08 00 94 E5 10 00 10 E3 01 10 A0 13
02 10 A0 03 C8 DA 05 EA 08 40 95 E5 10 00 14 E3
01 10 82 00 A8 DA 05 EA 08 00 94 E5 10 00 10 E3
4C 00 A0 03 F5 00 A0 13 83 DB 05 EA 08 00 94 E5
10 00 10 E3 4D 00 A0 03 F6 00 A0 13 84 DB 05 EA
08 00 94 E5 10 00 10 E3 4E 00 A0 03 F7 00 A0 13
82 DB 05 EA 08 00 96 E5 10 00 10 E3 70 00 A0 13
A4 00 A0 03 A5 DB 05 EA In overlay 71: At offset 0×2CF8: replace 011082E0 with 5225FAEA At offset 0×2D68: replace 0210A0E3 with 3125FAEA At offset 0×3078: replace 4C00A0E3 with 7624FAEA At offset 0×3090: replace 4D00A0E3 with 7524FAEA At offset 0×309C: replace 4E00A0E3 with 7724FAEA At offset 0×313C: replace A400A0E3 with 5424FAEA At offset 0×3630: replace 74009FE5 with EA22FAEA At offset 0×363C: replace 6C009FE5 with EC22FAEA At offset 0×3670: replace 3C009FE5 with E422FAEA At offset 0×372C: replace 04D08DE2 with 8B22FAEA Change all the A5070000, A6070000 and A7070000 as you see fit, according to the files you want to load. How to use? This code will read the sprite data of each instance of Sprite 284 (Splunkin), more specifically: _If nybble 10 is odd, then this specimen will be a Shy Guy (or anything else you want); _If nybble 10 is even, then this specimen will be a Splunkin. Note that they can now both co-exist. This is for US version. |
MeroMero |
Posted on 06-17-16, 08:09 pm in tutorial Animate any background (rev. 1 by MeroMero on 06-17-16, 08:44 pm)
|
Death by cuteness
Karma: 6589 Posts: 411/598 Since: 05-01-13 |
So as I learned sprites 316 and 317 are not required to create a wavy background, setting the Animation ID of the BG of your choice to 2 is the only necessary condition.
BUT, the waves only work when they are : _either directly behind Water, Lava, Poison Water, Unused jungle effect _or if Sprite 316 is present in the View To bypass this restriction: On (decompressed) overlay 0, at offset 0×1913C replace 01A192E7 with 00A0A0E3. Now you can use this effect to simulate for example a heat haze on desert backgrounds. Note that you still have to use the Water, Lava or Poison Water sprite, but you can place it 5 to 8 tiles under the View. |
MeroMero |
Posted on 06-19-16, 04:54 pm in Misc. patches thread
|
Death by cuteness
Karma: 6589 Posts: 413/598 Since: 05-01-13 |
Improved Blue Shell for ASM-Template:
repl_021111DC_ov_0A:
STMFD SP!, {R6-R7}
ADD R7, PC, #0x164
ADD LR, PC, #0
BX R7
CMP R1, R6
ADDLT PC, PC, #0x14
CMP R0, #0
MOVLT R0, R6
RSBLT R0, R0, #0
MOVGE R0, R6
LDMFD SP!, {R6-R7}
B 0x21111F4
LDMFD SP!, {R6-R7}
B 0x21111FC
repl_021114D8_ov_0A:
STMFD SP!, {R6-R7}
LDR R6, =0x203A784
LDR R6, [R6]
LDR R6, [R6, #0x2F8]
LDR R6, [R6, #0x7B0]
TST R6, #0x80
MOVEQ R0, #0
ADDNE R0, R0, #0x80
CMP R0, #0
ADDNE PC, PC, #4
LDMFD SP!, {R6-R7}
B 0x21114E0
ADD R7, PC, #0x100
ADD LR, PC, #0
BX R7
LDR R7, =0x203A784
LDR R7, [R7]
LDR R7, [R7, #0x2F8]
LDR R1, [R7, #0xC4]
LDR R2, [R7, #0xC8]
CMP R1, R2
MOVEQ R1, #1
MOVNE R1, #0
CMP R2, #0
RSBLT R6, R6, #0
CMP R1, #0
STRNE R6, [R7, #0xC4]
STR R6, [R7, #0xC8]
LDMFD SP!, {R6-R7}
B 0x2111528
repl_0211162C_ov_0A:
TST R2, #0x80 @Check if D-Pad_Down is pressed
ADDNE R0, R0, #0x80
CMP R0, #0
BNE 0x2111634
B 0x211169C
repl_02111874_ov_0A:
STMFD SP!, {R6-R7}
ADD R7, PC, #0xA0
ADD LR, PC, #0
BX R7
MOV R1, R6
LDMFD SP!, {R6-R7}
B 0x2111878
repl_021122E8_ov_0A:
STMFD SP!, {R6-R7}
ADD R7, PC, #0x84
ADD LR, PC, #0
BX R7
CMP R0, #0
MOVLT R0, R6
RSBLT R0, R0, #0
MOVGE R0, R6
LDMFD SP!, {R6-R7}
B 0x21122F8
repl_02112574_ov_0A:
STMFD SP!, {R6-R7}
ADD R7, PC, #0x5C
ADD LR, PC, #0
BX R7
CMP R0, #0
MOVLT R0, R6
RSBLT R0, R0, #0
MOVGE R0, R6
LDMFD SP!, {R6-R7}
B 0x2112584
repl_02115D14_ov_0A:
STMFD SP!, {R6-R7}
ADD R7, PC, #0x34
ADD LR, PC, #0
BX R7
CMP R0, R6
ADDGE PC, PC, #4
LDMFD SP!, {R6-R7}
B 0x2115D40
LDMFD SP!, {R6-R7}
LDR R0, =0x203A784
LDR R0, [R0]
LDR R0, [R0, #0x2F8]
LDR R0, [R0, #0x7B0]
TST R0, #0x80
BNE 0x2115D18
B 0x2115D40
@Relative function
STMFD SP!, {LR}
LDR R6, =0x203A784
LDR R7, =0x208B350 @Pointer for Starman duration counter
LDR R7, [R7] @Get Starman remaining time
CMP R7, #0 @Check if Starman counter is 0
MOVNE R7, #4
LDR R6, [R6]
LDR R6, [R6, #0x2F8]
LDR R6, [R6, #0x264] @Get Mario's current action
CMP R6, #0 @Check if Mario is airborne
MOVEQ R7, #0
LDR R6, =0x212E344 @Pointer for running speed
LDR R6, [R6, R7] @Get max speed
LDMFD SP!, {PC} Copy/paste in an empty file in Notepad++ and save as ****.s (for example blueshell.s). Basically if you run at max speed, you have to press (and maintain) D-Pad_Down to get Mario rolling in his shell, otherwise he runs as he would without a shell. Also Blue Shell's speed is increased under the effects of a Starman. |
MeroMero |
Posted on 06-29-16, 12:51 pm in Misc. patches thread (rev. 3 by MeroMero on 06-29-16, 09:24 pm)
|
Death by cuteness
Karma: 6589 Posts: 438/598 Since: 05-01-13 |
Springboard fix for ASM-Template:
repl_021551C4_ov_36:
MOV R1, #1 @Mario will throw both Big and Small Springboard the same way
BX LR @Also has the added benefit of despawning a Big Springboard when thrown into a pit
repl_0215524C_ov_36:
CMP R5, #0x10000
MOVGE R5, #0x10000
MOVLT R5, #0x8000
STR R5, [R4, #0x4D4] @Equalize hitbox's length and height to the Springboard's
STR R5, [R4, #0x4D8] @"
LDR R1, =0x216C030
MOV R12, #0
STR R12, [R1] @Make Top collision for Big Springboard equal to 0
STR R12, [R1, #4] @"
STR R12, [R1, #0x30] @Make Bottom collision for Big Springboard equal to 0
STR R12, [R1, #0x34] @"
MOV R12, #0x1000
STR R12, [R1, #0x10] @Shave 1/32nd of Big Springboard height to get bottom Side collision
STR R12, [R1, #0x20] @Shave 1/16th of Small Springboard height to get bottom Side collision
MOV R12, #0xF000
STR R12, [R1, #8] @Top collision at 15/16th of a tile beginning from the bottom (like a Small Spgbrd.)
STR R12, [R1, #0x24] @Shave 1/16th of Small Springboard height to get top Side collision
MOV R12, #0x10000
STR R12, [R1, #0x18] @Distance between Right and Left collision is equal to Big Springboard length
MOV R12, #0x1F000
STR R12, [R1, #0x14] @Shave 1/32nd of Big Springboard height to get top Side collision
BX LR I know skawo already did the Big Springboard-pickup fix, but not only does this one include skawo's fix, but it also includes 2 other bug fixes: _Side collision for Small Springboard was fixed and will allow it to pass below a 1 tile high ceiling* _Big Springboard no longer gets stuck in walls due to the Top and Bottom Collision being equal to 0 *What happened is that the Side Collision height was indeed the same as the Springboard's, but began at 3/16th of Springboard's height to end at 19/16th of said object height, hence the reason it wouldn't get through a 1 tile high passage! Now the Side Collision begin at 1/16th of Springboard's height and ends at 15/16th of said object height's. |
MeroMero |
Posted on 06-30-16, 03:58 pm in Misc. patches thread
|
Death by cuteness
Karma: 6589 Posts: 441/598 Since: 05-01-13 |
Starman fix for ASM-Template:
nsub_020A08C0_ov_00:
LDRH R3, [R0, #0xC]
CMP R3, #0x1F @Check for Actor 31 (Item from Brick/Block)
ADDNE PC, PC, #0x38 @If the check fails go to the end of the function
LDR R1, [R0, #8]
MOV R3, R1, LSR #0x18
CMP R3, #0x30 @Check if Power-up is thrown sideways
ADDNE PC, PC, #0x28 @If the check fails go to the end of the function
MOV R1, R1, LSL #0x1B @Pseudo-modulo 32
MOV R1, R1, LSR #0x1B @"
CMP R1, #1 @Check if Power-up is Starman
ADDNE PC, PC, #0x18 @If the check fails go to the end of the function
LDR R3, =0x20D38C0
LDRB R1, [R0, #0x1C8]
CMP R1, #0 @Check if hitbox is set
ADDNE PC, PC, #4 @If yes then bypass address change
CMP R2, #0 @Check if Starman relative height is below 0
LDRLT R3, =0x20D3CBC @If yes then change address in R3
STR R3, [R0, #0x53C]
LDR R3, [R0, #0xD4]
LDR R1, [R0, #0xE4]
BX LR This little one will fix a bothersome glitch with the Starman. If you ground-pound a Block/Brick containing a Starman, it will get spawned from below the Container, right? But what happens if there's ground directly underneath the Container, such as there is no space between the ground and the Container? Then the Starman will get thrown sideways, but unlike other power-ups who do the same, you won't be able to collect the Starman! Guess what, this ASM hack fix exactly that, by making Mario able to collect even Starmen spawned that way. Posted by cros107 I swear MeroMero, all you've been doing for the past 2 weeks is writing ASM :p And in actual assembly as well! Almost, almost, but yeah pretty much. |
MeroMero |
Posted on 07-12-16, 04:27 pm in tutorial Edit world-map icons
|
Death by cuteness
Karma: 6589 Posts: 463/598 Since: 05-01-13 |
The same thing I said to snake block, I can do that but first I want to finish my (groundbreaking ?) ASM Hack, in fact I already finished it but I still need to re-arrange the, how many? Oh yeah, 2220 new files that I created in a folder named visual_course!
I can give a hint about what it is: this ASM Hack emulates NSMB U behavior kinda. |
MeroMero |
Posted on 07-17-16, 01:54 pm in Misc. patches thread
|
Death by cuteness
Karma: 6589 Posts: 475/598 Since: 05-01-13 |
Code updated!
http://nsmbhd.net/post/49596/ 2 conditions to use the looping: _First set nybble 4 to 5 or D. _Second when creating the Path for the (Ice) Snake Blocks, the penultimate node must be at the same place than node 0, and the last node must be at the same place than node 1. Tested on a NDS for good measure. |
MeroMero |
Posted on 07-26-16, 05:47 pm in download ASM Hacks ready for importing (rev. 1 by MeroMero on 07-26-16, 05:48 pm)
|
Death by cuteness
Karma: 6589 Posts: 483/598 Since: 05-01-13 |
This mod:
_makes Mario always enter and exit a vertical pipe exactly at the center to prevent Shell Mario's shell from being seen; _makes Mario always enter and exit a horizontal pipe 1/8th of a tile higher to prevent Shell Mario's belly from being seen; _fixes horizontal pipes' entry point to be the same no matter from where you try to enter said pipe, which is useful if you try to enter the pipe while standing on a vertical moving lift for example. |
MeroMero |
Posted on 08-09-16, 05:45 pm in Swapping animations in NSBCA?
|
Death by cuteness
Karma: 6589 Posts: 535/598 Since: 05-01-13 |
It's relatively simple, here's how you do it:
_open the .nsbca in the Hex Editor _go to offset 0x1D, the byte there (noted N) will give you the number of animations in the .nsbca _apply this formula (in hex) to find the address where is stored the first animation's offset: 0x30 + [(0xN - 0x1) × 0x4] or 48+[(N-1)×4] in decimal _each of the N addresses is 4 bytes long Just swap the offsets you want and you're set. |
MeroMero |
Posted on 08-13-16, 12:44 pm in Invincible Mario graphics?
|
Death by cuteness
Karma: 6589 Posts: 538/598 Since: 05-01-13 |
Found it!
Location: arm9 Offset: 0x26290 Palette slot size: 2 bytes Palette size: 64 bytes Number of colors: 32 |
MeroMero |
Posted on 08-13-16, 07:57 pm in Misc. patches thread (rev. 5 by MeroMero on 08-14-16, 08:35 am)
|
Death by cuteness
Karma: 6589 Posts: 541/598 Since: 05-01-13 |
Time Stop:
repl_020AFA80_ov_00:
LDRB R1, [R0, #4]
LDR R2, =0x20CA850
ANDS R1, R1, #0x80 @Check if Event ID 40 is set
LDRB R0, [R2] @Load Freeze Actor bit
LDRB R1, [R2, #0x48] @Load Freeze Timer bit
ORRNE R0, R0, #4 @If yes set Freeze Actor
ORRNE R1, R1, #1 @and Freeze Timer
BICEQ R0, R0, #4 @If not unset Freeze Actor
BICEQ R1, R1, #1 @and Freeze Timer
STRB R0, [R2] @No matter the result
STRB R1, [R2, #0x48] @Store both settings
LDR R0, =0x208AF3C
MOV R1, #0
BX LR
repl_020A261C_ov_00:
AND R0, R0, #0x22 @Don't check for Freeze Actor bit
BX LR
repl_02168E70_ov_36:
LDRH R0, [R7, #0xC]
CMP R0, #0x8C @Check if Actor is Single Event Chainer
BNE .Return
ADD R5, R7, #0x33C
LDRB R4, [R5] @Get Trigger ID
LDRB R5, [R5, #1] @Get Target ID
CMP R4, #0x28 @Check if Target ID is Time Stop ID
BNE .Return
LDR R0, =0x208AF3C
ADD R6, R0, #4
ADD R9, R0, #0x48
SUB R5, R5, #1
ANDS R7, R5, #0x20
MOVNE R0, R6
LDR R0, [R0]
LDR R6, [R6]
MOV R8, #1
AND R7, R5, #0x1F
MOV R8, R8, LSL R7
ANDS R6, R6, #0x80 @Check if Target ID 40 is set
BEQ .Return
ANDS R0, R0, R8 @Check if Trigger ID is set
BEQ .Return
LDR R0, [R9, R5, LSL #2]
STR R0, [R9, #0x9C]
.Return:
MOV R0, #1
BX LR This ASM Hack will activate only while Event ID 40 is active. If Event ID 40 is set via a ?-Switch, then actors and timer will be frozen while the ?-Switch is active, and will resume their last action once the ?-Switch effect wears off. |
MeroMero |
Posted on 08-16-16, 11:17 am in beta 2.0 Pokemon MindCrystal
|
Death by cuteness
Karma: 6589 Posts: 546/598 Since: 05-01-13 |
Posted by gridatttack Is French the only planned language? Spanish or English will do for me xD About time I answer this French is indeed the only planned language, considering that porting all the ASM mods I did would be too much of a hassle for me. Posted by MeroMero You would be surprised to hear that NSMB is not even my strongest suit when it comes to ASM Hacking. My strongest suit is indeed Pokémon hacking, you will see why with some examples (4 out of 25) in the spoiler below: Since those offsets are for French SoulSilver, you will need to tweak them a little if you want to use them for one of the other 13 versions. This doesn't include the ASM Hacks that I did for Abilities, Type Chart, etc. that didn't need to be stored in arm9. How I ported those ASM Hacks? Simply by using a version of NSMBe that I modified myself thanks to Visual Studio. I would put the download link and tell what I changed exactly but before doing that I'm waiting for Dirbaio to read the PM I sent to him. beta 2.0
To-do:
So, I wanted to get all the ASM Hacks out of the way, which is why I'm updating the download link now. Some changes were in the way ASM Hacks are handled, most notably ASM Hacks that were previously stored in arm9 are now stored elsewhere, more precisely where the arenaoffs begins (or rather previously began, as now it has been pushed further). That's because some glitches occurred like the Pokémon overworld icons that displayed the wrong Pokémon. Also some new ASM Hacks were made, like for example the one that make EV training a Lv 100 Pokémon possible, and the one that allows the Evolutor to work fully. Now that I got that out of the way, I can fully concentrate on the wild Pokémon and the Trainer teams! Download link: http://www.mediafire.com/download/lz83do1q3gc331b The download link also contains a source folder with all the ASM Hacks that were previously stored in arm9. I would like to take this opportunity to tell everyone that there are other good ASM Hackers out there, I think I contributed more than enough to nsmbhd. By that I mean that I won't be taking ASM requests anymore for the time being. I might answer one or two requests if I feel magnanimous enough, but don't hold your breath. |
MeroMero |
Posted on 08-26-16, 10:14 am in New NSMB Editor Builds!
|
Death by cuteness
Karma: 6589 Posts: 558/598 Since: 05-01-13 |
Lava and Poison Water data were restored.
|
MeroMero |
Posted on 08-29-16, 08:36 pm in Misc. patches thread
|
Death by cuteness
Karma: 6589 Posts: 565/598 Since: 05-01-13 |
Preview of the next ASM Hack:
Something happened in this video that shouldn't be possible! Can you find it? This is just a glimpse of what's coming, now that the first part is out of the way I can fully concentrate on the second part. Tested on a NDS for good measure. The ASM Code will be posted once it is fully completed. Hint: I already foreshadowed what the ASM Hack would be about in one of my recent posts. |
MeroMero |
Posted on 09-02-16, 11:53 am in Sprite database notice.
|
Death by cuteness
Karma: 6589 Posts: 574/598 Since: 05-01-13 |
Tbh, as I already told Hiccup, the sprite db in its current form pretty much outlived its usefulness if only for the fact that storing data as bits (1 to 48) instead of nybbles (1 to 12) would be more far more efficient.
And that's not taking into account that nybbles 1 to 4 will always be reserved for Event IDs, always. To further strengthen my point, take for example nybbles 11-12 of Actors 278 (Water), 279 (Lava) and 281 (Poison Water): In its current form the sprite db is unable to handle correctly both direction and speed, whereas if parameters were stored as bits instead, you could set bit 41 alone for the direction (0=Up, 1=Down), and bits 42-48 for speed (from 0 to 127) which is exactly how overlay 54 handles those settings for the aforementioned Actors. Other examples include Actor 240 (Self activating block) where 32 choices are possible for the item selection, and Actors whose length/height is currently limited by a Modulo "something", indicating that the whole nybble is not needed/might not be enough. This is the conversation I had with Hiccup on the subject:
Hiccup: If you had access to the sprite db, would you convert it into an actor db? Next time dirbaio comes online you should ask him Me: That would require 3 things: 1°) Modifying NSMBe with Visual Studio to take into account the association Sprite<=>Actor thanks to that table in overlay 0. 2°) Then modify the spritedata.xml into an actordata.xml, I'm pretty sure you get what I mean there. 3°) Once both of these conditions are fulfilled, actually show Dirbaio the project and then ask him to change the sprite database into an actor database. It has to be Dirbaio since that modification needs someone who have access to the SQL Database to change the column names as well as the associated SQL queries. Hiccup: For now Iguess ishould reformat the thread to look less like a mess andmore like the sprdb Me: Also, something I forgot, we should also ask Dirbaio to change the data setup for the database from nybble-wise to bit-wise. For example look at nybbles 10-11 for the Water and you'll see why bit-wise would be the logical way to go. Hiccup: Indeed. Also, it should be nybbles 1-12, not 0-11, as that makes more sense and matches all the later NSMB game level editors I want to prove to myself that I am capable of driving the project up to part 2, since part 3 involves requirements out of my control, and maybe that could also serve to prove that I can get something significant done for once that doesn't ends up in immediate failure. Part 1 is already done, 2 is WIP, and 3 as I said pretty much falls on Dirbaio. |
MeroMero |
Posted on 09-05-16, 03:38 pm in New NSMB Editor Builds! (rev. 1 by MeroMero on 09-05-16, 03:39 pm)
|
Death by cuteness
Karma: 6589 Posts: 578/598 Since: 05-01-13 |
Remember my Sprite 84 helper, if you put a zoom right above 32, you'll see what happens.
Basically, if you put a scrapped width of 3 for example, the zoom won't take into account the 3 closest columns of tiles from each part of the Y-axis (in total 6 columns). Oh derp, I didn't touch Actor Sets names yet, but that can wait for the next update, for now I just want to chill a bit. |