Language…
16 users online:  DeppySlide, Diego13, h.carrell, Hamsterlovin, Humpty Dumpty Magazine, Ice Man, kayami, Lotica,  MarioFanGamer, MoxieCat, Russ, Saela,  sincx, slogra, Teaser, TheOrangeToad - Guests: 95 - Bots: 143
Users: 58,745 (2,332 active)
Latest user: kayami

Lunar Magic suggestions and discussion (LM v2.52)

Link Thread Closed
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
Not until someone writes the ASM for it.

You, maybe?
<blm> zsnes users are the flatearthers of emulation
I'm also not entirely sure if anyone needs that many levels. Coming up with 512 unique and fun levels probably wouldn't be easy.
Originally posted by Aeon
I'm also not entirely sure if anyone needs that many levels. Coming up with 512 unique and fun levels probably wouldn't be easy.



It's definitely a task for sure, but I think it'd be cool to have that many levels, though idk how complicated something like that would be to make with ASM so idk if it's worth it or not, though still a cool idea.
blunted
This has recently been discussed. Adding more translevels (levels you can enter from the overworld) would be a massive change which would break most resources that make some use of the concept of a translevel. Many of the game's systems (the overworld, message boxes, and who knows what else) and a significant amount of patches would have to be rewritten to take the change into account. What's more, being able to enter all 512 levels from the overworld would require a 2-byte translevel number, which would break even more resources. All of this for a relatively useless feature - let's face it, nobody would be able to make a hack with more than 96 levels. Collaborations, as mentioned in the thread I linked, already have ASMers on the team who implement custom solutions which work for the hack without breaking everything. If you're bothered by the fragmentation (0-24 and 101-13B) and instead want the accessible levels to be contiguous (0-5F), there's a patch to do that.
Originally posted by Aeon
I'm also not entirely sure if anyone needs that many levels. Coming up with 512 unique and fun levels probably wouldn't be easy.

Maybe, but I'm still in favor of "unlocking" everything personally. It'd be a big plus for collabs, contests and the like. or just hacks that would like to have enterable areas that are not necessarily levels. This is a problem I got with M&L:TtAR: Since there were ~94 actual levels, I had to put all "rest areas" in the same slot (level 101) and use a midway entrance patch to modify where the level led on-the-fly. It worked but was really hacky and annoying to put in place.

So I'd be pretty happy to see such a limitation removed, really.

In fact, I would still be that happy if the number of enterable levels was limited to ~256 in order to keep a 1-byte translevel number as telinc1 talked about.

If it breaks so many resources, maybe making it optional (just like FastROM enabling and the like) would be a good compromise ?
I think that LM should allow you to choose translevel numbers bigger than $5F and event numbers biger than $77, but throw a warning asking if the user knows how to modify the original code to work with it.
Check out Team Hack Fix/Translations' thread full of fixed and translated SMW hacks!

Wanted Permabanned or Dead by new staff team
I posted this before but I think it got overlooked. My question is: is there a way to have the game autosave when you start a new file, even if the starting position on the overworld is moved from its default location? If not, I think that should be added, if possible, and if not, there should at least be a way to restore the default starting position and turn the autosave back on.
Originally posted by smwln
I posted this before but I think it got overlooked. My question is: is there a way to have the game autosave when you start a new file, even if the starting position on the overworld is moved from its default location? If not, I think that should be added, if possible, and if not, there should at least be a way to restore the default starting position and turn the autosave back on.

You'd have better luck requesting that on the ASM requests thread
HackPortsASM"Uploader"

Originally posted by FuSoYa
It doesn't work the other way because of the RAM layout. The global slot frame counters were intentionally stored right after the local ones in RAM (and same thing for the DMA slot RAM). So when you sacrifice global for local, the local counters array can simply overflow into the global ones. Do it the other way though and the global counters will overflow into RAM meant for DMA, which is just going to mess things up.

Of course, you could use a bit of ASM to swap the local and global list pointers and sizes in RAM to solve that. But I don't see much use for it either.


I see. I was curious if it worked that way, but I guess not.

Originally posted by FuSoYa
Perhaps, though they really would have to know what they're doing as far as vblank limitations go. Doing more in fewer slots tends to be the better choice when possible. The vanilla game can barely handle all global and local slots going at once with just the 4 8x8s line type. I guess the question is, how many people would be able to make proper use of it?


Yeah, I agree that doing more with fewer slots is generally the better option. However, I don't think it makes a difference whether the global slots are being treated as global or local slots in terms of how much V-blank and processing time is used. A single sublevel hack/A hack that takes place on a single submap that uses the global ExAnimations wouldn't be much different from a hack that used a different set of global ExAnimations for each level/submap in terms of V-Blank/processing time. There is also the fact that even if SMW can barely handle every slot running 4 8x8 line, that's simply the worst case scenario. One might need to use 33 slots and there is no way for them to reduce the slot count without sacrificing something. Maybe the situation the extra slots are being used in is not very demanding, like during a cutscene or a sublevel with few sprites. This is another reason why I suggested making this a hidden feature. The average user might not be able to make good use of it in a typical situation, but for those that understand the limits and can carefully manage things, they'd be able to do even more with the ExAnimation feature. Think of it like overclocking a CPU. The average user probably shouldn't do that, but those that know about the risk of overheating the CPU and are able to manage it get a computer that runs faster.


Originally posted by FuSoYa
Alright, no promises on LM inclusion but should be interesting to see what you come up with. #ab{:)}


Ok. :) One idea I had was to make it possible to customize the intro march. I did some reseacrh and here is a patch that makes this possible:
Link

Basically, this makes it so that the game uses 16-bit numbers instead of 8-bit for determining if the intro march should start and where it should end. If you implement this patch into Lunar Magic, then you could make it so that Mario's intro march can be modified so that Mario can move in a different direction and/or also make it possible to swim/climb instead of walk. You could also make it so that one can disable/enable the intro march and the autosave separately from one another.

And speaking of which, as smwln mentioned, the way Lunar Magic disables the intro march has the side effect of also preventing SMW from autosaving after entering the overworld for the first time. If you don't want to make it possible to customize the intro march, you should change the hijack that disables it so that it puts a JSL to the save routine instead of NOPing out the STA $1F19.

Also, while one could use this patch right now, you'd have to reapply it every time the overworld is saved in Lunar Magic because LM will overwrite part of the JSL to IntroMarchHijack1 currently.

Originally posted by smwln
I posted this before but I think it got overlooked. My question is: is there a way to have the game autosave when you start a new file, even if the starting position on the overworld is moved from its default location? If not, I think that should be added, if possible, and if not, there should at least be a way to restore the default starting position and turn the autosave back on.


I'm way ahead of you. :P I saw your earlier post and that's what got me to decide to look into this issue. Let's see if FuSoYa will consider implementing my patch into LM, or at least modify the hijack that caused the autosave bug.
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6
Mario & Yoshi's Strange Quests (2/10/2023 Build)

Other stuff:
My SMW/SMAS/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
Originally posted by yoshifanatic
This is a bit late, but if you're not going to add a function to Lunar Magic that allows one to easily import/export overworlds, then I'm going to fill in that gap via ASM patches. I've already made a patch that extracts roughly 95% of the overworld data

I'm fairly confused as to what this means. How does a patch extract data? Or, rather, after extracting the data, how does it put it into a different file?
Originally posted by yoshifanatic
I'm way ahead of you. :P I saw your earlier post and that's what got me to decide to look into this issue. Let's see if FuSoYa will consider implementing my patch into LM, or at least modify the hijack that caused the autosave bug.


Ah, okay. You made a patch for it? I think I missed it.
Originally posted by HuFlungDu
I'm fairly confused as to what this means. How does a patch extract data? Or, rather, after extracting the data, how does it put it into a different file?


Two things make it possible.

- If you give asar a ROM file name that doesn't exist, asar will simply generate a file with the name entered.

- Asar 1.40 introduced the readfile command, which allows you to read bytes from external files.

My overworld export patch works by using the readfile and snestopc commands to get the location of data in [ROM name defined inside the patch], using a macro to convert decimal to hexadecimal (due to a weird issue with asar's #= operator) and then using incbin with variable start and end offsets to write the data to [file name given in asar]. Asar will then generate an MWL -esque file I refer to as MWO (Mario World Overworld) that will be used by the overworld import patch I'm working on.

Originally posted by smwln
Ah, okay. You made a patch for it? I think I missed it.


Yep. Scroll up a bit and I linked to it in my previous post. The patch is primarily meant for FuSoYa, but anyone else is free to use it.
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6
Mario & Yoshi's Strange Quests (2/10/2023 Build)

Other stuff:
My SMW/SMAS/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
HI there not sure if this a bug or something we are missing. Using an unmodifyed rom other inserted levels and rom expand. The donut ghost house normal and secret exit will not activate access to top secret area. Is lunar magic or something to do with big boo boss?
There are two things you have to keep in mind for that:
  1. The secret and normal exit for the Donut Ghost House is swapped, meaning that the normal exit opens the path for the Top Secret Area and the secret exits leads to Donut Plains 3.
  2. The big boo usually activates the normal exit though in "Change Boss Sequence" you can set the exit for the boss to be a secret instead of the regular one.
I was aware of the swapping of exits.
However the user who created this level used a key hole for secret, and a goal tape for normal. The boo was never used
Isn't there a bug in SMW where vertical levels will always activate the normal exit, too?
Originally posted by yoshifanatic
Two things make it possible.

- If you give asar a ROM file name that doesn't exist, asar will simply generate a file with the name entered.

- Asar 1.40 introduced the readfile command, which allows you to read bytes from external files.

My overworld export patch works by using the readfile and snestopc commands to get the location of data in [ROM name defined inside the patch], using a macro to convert decimal to hexadecimal (due to a weird issue with asar's #= operator) and then using incbin with variable start and end offsets to write the data to [file name given in asar]. Asar will then generate an MWL -esque file I refer to as MWO (Mario World Overworld) that will be used by the overworld import patch I'm working on.

That's... Interesting. So the readfile name has to be static, correct? It can't be passed in? Are you just not comfortable enough coding in a modern language to create a more robust utility? If that is the case, would you mind sending me the patch when you are done with it, so I can create a more versatile script that can do the same thing?
Originally posted by telinc1
Is there a way to have custom external graphics files, specifically for use with sprite Map16? External versions of GFX32 and GFX33 are already supported, so having the ability to add external graphics files would make it easier to add markings or display dynamic and similar sprites whose graphics aren't in the level's graphics.


I don't see how trading one file of static tiles for another that just happens to be stored externally would help much with that. Unless you want a different system entirely where you could specify the external file to use in displaying a particular sprite, but that sounds like going a bit far just to make a dynamic sprite show up correctly only in LM.

Originally posted by Mathos
In fact, I would still be that happy if the number of enterable levels was limited to ~256 in order to keep a 1-byte translevel number as telinc1 talked about.


That'd help, but you're still looking at relocating and expanding the $7E1EA2 table in RAM. And if you're playing with that, may as well move $7E1F02 as well to expand the events to the one byte max. Among other things, that means at a minimum you're changing the SRAM save game format and rewriting the load and save game routines. Existing saves will be incompatible. Not sure if some people will be happy with LM having to take over those. And not sure if I want to spend the time implementing it and the rest required for it either at the moment.

Originally posted by Mathos
If it breaks so many resources, maybe making it optional (just like FastROM enabling and the like) would be a good compromise ?


Oh, it'd have to be optional all right. Even just the SRAM thing would make it too disruptive to consider doing otherwise.

Originally posted by Super Maks 64
I think that LM should allow you to choose translevel numbers bigger than $5F and event numbers biger than $77, but throw a warning asking if the user knows how to modify the original code to work with it.


As another hidden option? Might be a reasonable alternative for now that wouldn't take as much work, though I'd still have to change at least one of LM's ASM hacks to even make the extra data possible to save (and review some of the others).

Originally posted by yoshifanatic
However, I don't think it makes a difference whether the global slots are being treated as global or local slots in terms of how much V-blank and processing time is used. A single sublevel hack/A hack that takes place on a single submap that uses the global ExAnimations wouldn't be much different from a hack that used a different set of global ExAnimations for each level/submap in terms of V-Blank/processing time.


Yeah functionally there's no difference, though in practice people tend to use the global slots a little more sparingly just because you don't always want an animation to show up in every single level. Having the option hidden by default may end up having the same effect I suppose. I'll take a look in LM and implement it if it doesn't look like it would affect existing code much.

Originally posted by yoshifanatic
Basically, this makes it so that the game uses 16-bit numbers instead of 8-bit for determining if the intro march should start and where it should end.


Hmm, looks interesting but seems like this one might be better off as a separate patch people can configure and apply themselves.

Originally posted by yoshifanatic
And speaking of which, as smwln mentioned, the way Lunar Magic disables the intro march has the side effect of also preventing SMW from autosaving after entering the overworld for the first time.


Yeah this one's never been much of a priority since all the autosave does is just make it so you don't have to see the intro message again if you end up getting a game over before the first choice to save.

Originally posted by yoshifanatic
Also, while one could use this patch right now, you'd have to reapply it every time the overworld is saved in Lunar Magic because LM will overwrite part of the JSL to IntroMarchHijack1 currently.


Could probably be done as a last step before releasing a hack.
Originally posted by HuFlungDu
That's... Interesting. So the readfile name has to be static, correct? It can't be passed in? Are you just not comfortable enough coding in a modern language to create a more robust utility? If that is the case, would you mind sending me the patch when you are done with it, so I can create a more versatile script that can do the same thing?


Actually, it's the incbin offsets that are static. You can't use math on the start and end offsets directly, but you can indirectly by using the #= operator on a define. The problem is that asar resolves the equation in decimal when incbin expects hexadecimal offsets. So, I had to write a macro that would convert the decimal result back into hexadecimal and in a way where asar would think I'm using static offsets on the incbin.

Also, yeah, I don't have much programming knowledge outside of SNES ASM, but I did learn a bit of batch file scripting out of necessity due to how my SMW hack is being handled. The overworld extractor started off as a batch script meant for my hack, but I turned it into an asar patch so that it would be easier for me to maintain. However, all the batch script was was a script that generated asar patches that extracted overworld data and would be auto applied to a ROM defined in the script. Anyway, if you'd like to make a more versatile script for me, you can. The patch isn't quite finished yet though, but I'll PM you once it is (and after FuSoYa sees it).

Originally posted by FuSoYa
Hmm, looks interesting but seems like this one might be better off as a separate patch people can configure and apply themselves.


I disagree. This is one of those things that'd be a lot easier to use if you can see what you're doing in addition to the fact that there would be less of a chance for something to go wrong. Even if I made the patch more user friendly and set it up in a way to reduce the chances of Mario not making it to the end position, there is still the issue of the player needing to reapply the patch if they move Mario (both due to the end position not being updated and because of the hijack conflict, although I probably could find a different spot for the hijack). If this was in Lunar Magic, then all the intro march related positions would be updated every time you move Mario so that no issues would arise.

Ultimately, it's up to you if you want to implement this. But, if it was implemented, maybe it would work by allowing the user to set the direction Mario moves, whether Mario is swimming, and how many half tiles Mario's start position is shifted away from the end location and the intro march start position would display as a transparent Mario facing towards the end position? Perhaps LM would disable the intro march by default like it already does, but it could be re-enabled through an overworld menu.

Originally posted by FuSoYa
Yeah this one's never been much of a priority since all the autosave does is just make it so you don't have to see the intro message again if you end up getting a game over before the first choice to save.


Yeah, this is a fairly minor thing compared to other things, but still. While the average hack might not be hurt by this bug too badly, keep in mind that not every hack uses the same/similar intro screen. The intro in a hack could be a cutscene (either by VWF ASM or a series of rooms or whatever), a kaizo trap that takes many tries to get past, or even a full blown level. Depending on how long the intro is and the difficulty of getting to the first save point, the time spent getting back into the game after each game over could potentially add up.

Also, I pretty much already gave you the fix for this issue with the intro march patch. All you have to do is modify the hijack LM inserts to disable the intro march so that it puts a NOP and a JSL to the save routine, and is inserted 2 bytes earlier into the ROM. Alternatively, put a JSL to some new code that sets up the stack so that it can JML safely to the save routine JSL in the intro march routine if you'd prefer LM's code to not JSL directly to the save routine for whatever reason. Optionally, you could also add an option that lets one disable the JSL so that one can have the current behavior if they desire.
My Hacks:
Mario's Strange Quest V1.6
Yoshi's Strange Quest V1.3 / V1.3.1 Beta 4.6
Mario & Yoshi's Strange Quests (2/10/2023 Build)

Other stuff:
My SMW/SMAS/SMAS+W disassembly
Yoshifanatic's Discord Server: A place for fans of my stuff and/or Yoshi to chat with others.
  • Pages:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
Link Thread Closed