News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

### Author Topic: Secret of Mana, Turbo - Beta 210301  (Read 454424 times)

#### ManaRedux

• Full Member
• Posts: 134
##### Re: Secret of Mana, Turbo - Beta 210111
« Reply #1720 on: January 12, 2021, 01:57:50 am »
Here's a fun one.  In the middle of the Mana Fortress slime fight, the sprite froze:

https://imgur.com/a/2RUifuB

The boy and the girl moved as they should, but the sprite was frozen and did nothing.  If I pressed X, I got this:

https://imgur.com/a/PakPf0D

It's almost as if he was silenced and paralyzed, but no effects wore off.

As time went by, some really amazing glitched graphics happened:

https://imgur.com/a/8GygYfM
https://imgur.com/a/ctvbmB0
https://imgur.com/a/8koZeUI

It almost looked like it was supposed to be that way.  With that, and weird stuff in the menu like this:

https://imgur.com/a/8l0E4QC

I thought for sure the game was going to crash but I was able to finish it.  Trying to cure the sprite or use items had no effect, but surely enough, Speed Up did the trick, and he was free.

Alas, on the top floor of the Mana Fortress, yet another Cure Water crash.  Least helpful screenshot ever incoming:

https://imgur.com/a/OuuIMLD

First the game went nuts deciding what to do, and then everything disappeared and darkened like that.  Whatever build I have REALLY does not like Cure Water; it causes almost every crash.

#### Queue

• Hero Member
• Posts: 525
##### Re: Secret of Mana, Turbo - Beta 210111
« Reply #1721 on: January 12, 2021, 02:23:33 am »
I think almost all of those stem from the code that hides the boomerang in the character's hand while it's thrown. The changelog for 210109 just lists the fix as:
- fixed really bad bug in Graphics\Polished_Weapons
But I wasn't kidding when I said "really bad" since if certain spells hit the character while the boomerang is in flight (and so the held graphic was trying to be hidden) a lot of memory would get corrupted.

https://imgur.com/a/8l0E4QC
That's actually a vanilla bug and unfixable. It's an issue with the Mode 7 boss fights. There just isn't enough space in the palette during those fights if you have a full ring menu.

(Edit: I responded to your last post with an edit to my last post... mentioning just in case I was saving the edit while you were writing this newest post and missed it.)

#### miaz

• Jr. Member
• Posts: 17
##### Re: Secret of Mana, Turbo - Beta 210111
« Reply #1722 on: January 13, 2021, 11:00:33 pm »
Thanks for the detailed answer Queue, good idea to number them too!
See you already implemented one of the ideas by now, awesome!
Dont sweat it though, theyre all pretty insignificant things.
Havent had time to finish the game yet, will take a gander at it this weekend though.

#### hmsong

• Hero Member
• Posts: 521
##### Re: Secret of Mana, Turbo - Beta 210111
« Reply #1723 on: January 13, 2021, 11:07:39 pm »
https://imgur.com/a/8l0E4QC
That's actually a vanilla bug and unfixable. It's an issue with the Mode 7 boss fights. There just isn't enough space in the palette during those fights if you have a full ring menu.

Yeah, I think that happens to the final Mana Beast fight too.

#### Queue

• Hero Member
• Posts: 525
##### Re: Secret of Mana, Turbo - Beta 210114
« Reply #1724 on: January 14, 2021, 05:26:17 pm »
Version 2021-01-14:
https://filebin.net/7spaiz2xfys6b2i1/SoM_Turbo.210114.zip

Changes:
- fixed character cycling for Quality_of_Life\New_Fullscreen_Menu_Controls
- fixed event timing for Text\Reborn\Proportional_Font (hopefully)
- implemented automatic line breaks for Text\Reborn

The automatic line breaks is pretty complicated so there may be bugs that need to get discovered and fixed. It's also functionally incomplete for Proportional_Font (it treats all characters as 7 pixels wide at the moment), but still better than before with the monospace line breaks. Proper Proportional_Font support will get implemented once fundamental bugs in the code are dealt with.

#### Memorex

• Jr. Member
• Posts: 33
##### Re: Secret of Mana, Turbo - Beta 210114
« Reply #1725 on: January 16, 2021, 06:29:43 am »
You guys are truly doing the lords work! Or something like that..

#### Queue

• Hero Member
• Posts: 525
##### Re: Secret of Mana, Turbo - Beta 210116
« Reply #1726 on: January 17, 2021, 01:09:01 am »
Version 2021-01-16:
https://filebin.net/7spaiz2xfys6b2i1/SoM_Turbo.210116.zip

Changes:
- implemented Bug_Fixes\Late_HDMA_Fix, which fixes the following 1-frame color corruption:

when it should look like:

So, there's a lot I can say about this bug. And it's going to get a bit technical.

You generally just experience it as a screen blink when first talking to an NPC merchant or when opening a treasure chest with money in it. It's driven me bonkers for years as tracking it down was pretty tricky. Some emulators make it more or less likely to happen because it's very timing sensitive; I think SNES9X is where I saw it most, and ZSNES least, with Mesen-S a somewhat rare in between (but Mesen-S being the only one with robust enough debugging features to track it down). It's technically a vanilla code flaw, but various SoM hacks can make it more or less likely to occur. That screenshot is pretty much a worst-case scenario; usually it's a fair bit more subtle.

So, what causes it?
HDMA getting turned on mid-frame because stuff to do during vblank took too long.

SoM was designed so that if data uploads to video memory during vblank are running late, they can finish, and you'll just get a couple black lines at the top of the screen for 1 frame, often times unnoticeable due to overscan, that part of the screen already being black, etc. However, SoM does nothing to account for missing the HDMA initialization that only occurs at the start of scanline 0. If you look carefully at the first image compared to the second, you can see 1 missing scanline at the top of the first image.

SoM uses HDMA to change the first palette row just before 3/4ths the way down the screen so that textboxes and the HUD can be different colors from each other. In that space between the money display and the HUD, HDMA rewrites one color per scanline to replace colors 1 through 15 (color 0 is the background color and isn't changed). Due to how HDMA works, what it specifically does is write 0 to color 16 (unusable) and wait 127 scanlines, then write 0 to color 16 (unusable) and wait 32 scanlines, then write 1 color per scanline for the next 15 scanlines, then HDMA ends for that frame. Those first two writes don't do anything, but cause a specific number of scanlines to be skipped so that it can reach its intended start point for the 15 color write starting on scanline 158 (~10/16ths the way down the screen) and ending on scanline 173 (~11/16ths).

But if HDMA is turned on after scanline 0 has already occurred, it both misses that first "write and wait 127 scanlines" command AND it doesn't reinitialize its counters and pointers, so the data it's using is whatever the HDMA circuitry had at the end of the last frame's HDMA. And that stale data is what results in bonkers palette color replacements for 1 frame (the palette gets completely refreshed during the next vblank).

So what is that data that ends up causing bonkers colors?
Basically, what's left over gets interpreted as "write 1 color per scanline for the next 128 scanlines", the palette entry numbers to use (instead of a nice linear list of 1-15) is whatever 128 bytes are at memory address 7E05EF (00 00 22 51 E3 80 22 30 AB 00 05 21 AA 7F 74 96 and so on), and the colors to write to those palette entries are the first 256 bytes starting at the very beginning of RAM (frequently changing junk data since the beginning of RAM is where a lot of temporary variables are). The result is seemingly random palette entries getting overwritten with basically random colors. So what was the fix? When it's time to turn on HDMA at the end of SoM's NMI handler, carefully detect if we're beyond scanline 0, and if so, manually initialize HDMA settings, subtract the current scanline number from 127 and set the HDMA line counter to the remainder, then turn on HDMA. I also worked in a bug fix for an edge case in vanilla code where HDMA wouldn't get turned on just after a text box closed, but where the palette hadn't been restored from text box colors back to HUD colors, which resulted in the HUD using text box colors for 1 or 2 frames (easy to miss depending on which text box frame you were using). Edit: Of course there's a small oversight in Late_HDMA_Fix that makes the prologue log scene look wrong; it's fixed for next release. « Last Edit: January 19, 2021, 10:40:35 pm by Queue » #### ManaRedux • Full Member • Posts: 134 ##### Re: Secret of Mana, Turbo - Beta 210111 « Reply #1727 on: January 23, 2021, 04:47:04 pm » 5) You had that On: Graphics\Alternate_Karon 6) You didn't have that On: Miscellaneous\Restore_Kettle_Kin (you have the Miscellaneous section Off) 7) You had that On: Audio\Restore_Unused_Fanfares You had that On: Audio\Different_Fortress_Boss_Music Oof. Well, I guess I'll make my first request then...it's a bit difficult to find precise options (and in that case, know exactly which ones I had on), especially if we haven't played through many times. Is there any way to collapse each group of options and only expand as needed? And perhaps uncheck everything in a group and start from nothing, rather than having to uncheck a bunch of things? Also, at this point, are there any improvements that have become redundant and can be removed? It's gotten to be quite an intimidating (albeit very impressive) list. I think I forgot to mention that Kettle Kin has reverted to its US (non-chainsaw) attack. #### Queue • Hero Member • Posts: 525 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1728 on: January 25, 2021, 05:11:07 pm » Version 2021-01-25: https://filebin.net/7spaiz2xfys6b2i1/SoM_Turbo.210125.zip Changes: - updated Reborn to V1.9 - implemented Graphics\Text_Box_Wait_Indicator - implemented Title_Screen\Days_of_Mana (Off by default) - implemented Bug_Fixes\Event_Animation_Safety; prevents game lock-ups if a player is frostied or petrified when an event tries to play an animation on them - implemented Bug_Fixes\Cutscene_Movement_Speed; prevents status effects from affecting player movement speed during events, which avoids all sorts of bugs - fixed Miscellaneous\Enable_Paralyze_Status; prevents lock-ups if an event tried to move a paralyzed player - fixed Bug_Fixes\Late_HDMA_Fix; restores prologue log scene background - added sound to Miscellaneous\Enable_Matango_Caves_Trap (and added a status cure to avoid bad animations) - significant improvements to automatic line breaks for Reborn (particularly with Proportional_Font)  Text_Box_Wait_Indicator Days_of_Mana Days of Mana is a reference to an old Nintendo Power SoM guide (there are other scans of it floating around on the internet as well). It was done on a whim, and I'm no artist, so maybe the lettering could be better (it's mostly hand-shaded, and I'm bad at doing so), but what's there is there in case someone is interested. It doesn't hide the blurry part of the restored background as well, but it's not unbearable. Also, if someone is reading this, you can get out of the Goblin Village by walking far north until you hit the tree line, then walking into the trees east or west (exits to near the goblin warning sign or Gaia's Navel, respectively). I've heard rumors of Faster_Chest_Opening and/or Fastest_Chest_Opening causing some progression-stopping bug in the Great Forest, but haven't been able to run into the issue myself. Anyone out there able to fill me in? Quote from: ManaRedux Oof. Well, I guess I'll make my first request then...it's a bit difficult to find precise options (and in that case, know exactly which ones I had on), especially if we haven't played through many times. Is there any way to collapse each group of options and only expand as needed? And perhaps uncheck everything in a group and start from nothing, rather than having to uncheck a bunch of things? Also, at this point, are there any improvements that have become redundant and can be removed? It's gotten to be quite an intimidating (albeit very impressive) list. I think I forgot to mention that Kettle Kin has reverted to its US (non-chainsaw) attack. The feature sections are a lie. The little [Section] labels are themselves just a normal checkbox, and checkbox requirements down in the ZPS code check if the feature's checkbox and its related section checkbox are both On. Ignoring that the checkbox list has no functionality for collapsing / folding, the sections are just a hacky way to let the user functionally disable any features in that section from being active without having to uncheck them all, but sections as a concept isn't part of the ZPS format. There's no easier way to uncheck (or check) multiple things; just gotta go through by hand. Arrow keys and spacebar is arguably easier than using the mouse. After unchecking everything, you could click Apply to create a config file where everything's unchecked, then save and restore said all-unchecked config file to save some effort later if experimenting with minimal options. Likewise, keeping copies of config files and renaming them for use as needed saves effort later if fine-tuning selections across Turbo versions. I'm not aware of any redundant features that I intend to remove (or haven't already removed). At this point I see the overwhelming feature selection as a benefit: intentionally causing choice paralysis so users are more likely to just try default settings first, and modifying from there to suit their taste when they encounter something in-game they don't like. Seeing people turn stuff off before trying it has been occasionally frustrating. Regarding Kettle Kin, you literally quoted me where I explained your circumstances: 6) You didn't have that On: Miscellaneous\Restore_Kettle_Kin (you have the Miscellaneous section Off) « Last Edit: January 25, 2021, 05:20:52 pm by Queue » #### ManaRedux • Full Member • Posts: 134 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1729 on: January 25, 2021, 05:56:46 pm » Regarding Kettle Kin, you literally quoted me where I explained your circumstances: 6) You didn't have that On: Miscellaneous\Restore_Kettle_Kin (you have the Miscellaneous section Off) Sorry! There's so much going on with this patch I miss things. Buuuuut...shouldn't Reborn override that anyhow? Or was it removed as a feature in Reborn/Turbo so it doesn't overlap? « Last Edit: January 25, 2021, 06:34:28 pm by ManaRedux » #### hmsong • Hero Member • Posts: 521 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1730 on: January 25, 2021, 06:25:05 pm » Thanks for the update. Well well, I sure got a lot of work to do. It's been a while since I fiddled around this game. Lots of things to discover and experiment. I apologize in advance if I end up asking questions that some else in the previous pages already asked. #### lexluthermiester • Submission Reviewer • Hero Member • Posts: 913 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1731 on: January 25, 2021, 06:31:34 pm » Days of Mana is a reference to an old Nintendo Power SoM guide (there are other scans of it floating around on the internet as well). It was done on a whim, and I'm no artist, so maybe the lettering could be better (it's mostly hand-shaded, and I'm bad at doing so), but what's there is there in case someone is interested. It doesn't hide the blurry part of the restored background as well, but it's not unbearable. This is kinda cool! I miss Nintendo Power for this very reason! #### hmsong • Hero Member • Posts: 521 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1732 on: January 26, 2021, 02:44:33 am » A little late, but happy New Years. I hope 2021 will be significantly better than the hellhole that was 2020. Okay, wow. Lots of contents. Thank you so much for the rare item percentage tweaks and Dark Lich pursuit. I'm sure I was the person who requested those, and I didn't even thank you after you created them. Sorry about that. Those make the game even greater. But wow, Reborn sure changed a lot of contents (in terms of codes for the previously-existing patches). I just started, but I intend on going through all the NPC scripts and all. That'll take a while. Haha. Thank you so much for updating many of my patches. I truly appreciate it. I'm probably gonna have more questions later, but I'll start with: How do you change events for the Reborn scripts? Specifically regarding the "getting certain orbs after beating the boss" thing. You previously sent me the events codes for vanilla, VWF, and Relocalized (SoM.events.zip) and taught me many things, so I was able to make a personal patch for getting the orb order (I didn't post that here, since I felt that it was unnecessary with Weapons_Progression_Balance already existing), but with Reborn, that's probably all screwed up. I'd like to update my personal patch that's compatible with Reborn. Also, I noticed that there was something specifically for Reborn (Augment) in No Missing Monsters patch (Luka's pets), but I can't tell why you did that. I don't remember Luka's pets changing anything in the scripts. Did Reborn add something that wasn't there before? #### ManaRedux • Full Member • Posts: 134 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1733 on: January 26, 2021, 07:18:08 am » More text anomalies... Out of bounds: https://imgur.com/a/FQGPLnr https://imgur.com/a/MhzofZz https://imgur.com/a/nACR8Ro Line split: https://imgur.com/a/GIP3h68 And I know this is how it's supposed to be atm, but I personally don't think it's a good look: https://imgur.com/a/igPkNpg https://imgur.com/a/VJhxFCl It's not often that the text hits the right boundary, and when it does, it looks wonky with the left indentation. #### Queue • Hero Member • Posts: 525 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1734 on: January 26, 2021, 03:27:46 pm » ManaRedux, chainsaw Kettle Kin, like a few of the other features included with the stand-alone Reborn release, aren't inextricably tied to Reborn's script replacement, and so aren't forced On just because you have Reborn On. Worded in reverse, Reborn's script works without those features, so there's no good reason not to let users disable them; with default Turbo settings, every feature included with Reborn is also On by default. And worded yet a third way, you turned it Off. Thanks for the text error pictures, I've isolated the text that it's choking on and am figuring out the logic error that causes them. There are (apparently) still some mismatches between the automatic line break code and the Proportional Font code (usually related to periods, which have special rules for spacing). Humorously (to me), that Jema line is one I tested against and at one point had working correctly. -_- For the last two, where the text gets too close to the right edge, the first one is working as expected, and the text just needs to be manually altered to work with the Proportional Font (I'm not a fan of the three-hyphen-no-spaces pauses, but that's personal taste), but the second is actually wrong, the text should never touch the right edge (just get pretty close). I suspect more spacing issues from periods, but need to investigate. lexluthermiester, for the record, it wasn't my idea, I was just shown someone's personal project to make a physical cartridge with that labeling and barfed out a title screen to match. I hope they notice I added it. hmsong, you actually did post a "thank you" back when I originally released the Dark Lich changes. Everything that's in "SoM.events.zip" is in "SoM Turbo.zps" now. I don't think that was the case back when I sent you that ZIP file. Anyway, if you search for: { ' event scripts You'll get 4 results. In order, if you search at the top of the file:  Reborn &(patches)\Augmentation\Events\Data.asm Relocalized &(patches)\Relocalized\Events\Data.asm VWF Edition &(patches)\VariableWidthFont\Events\Data.asm Vanilla &(decode)\Vanilla\Events\Data.asm Probably the main thing to note with Reborn's script is the new \n^ line break (as opposed to just \n); it can either be parsed as a space or a newline by the patcher, to support Reborn's in-development automatic line break code. Functionally, it always is going to resolve as a space for Turbo, so just treat any \n^ you see as if they were _. I don't know for certain how you set up your personal patch (if I did know, I've forgotten). If you used the: %OFF% Event### ...style of offsets, there's a decent chance it'll be compatible with Reborn unless you added your own insertion points (Event###.Something), in which case you'll need to add them to the Reborn script as well. Regarding No Missing Monsters, yes, Reborn adds a new event that uses the Water Palace basement that is incompatible with Luka's Pets. Edit: To any non-English European-language natives out there (so, Spanish, Portuguese, French, German, etc.) what non-English character modifiers are the most valuable? So like, the basic accent, dieresis, etc.... which are the most useful to have available to convey your language? I'm trying to add support to the game's text system for combining characters, and have some preliminary stuff for ¨ and ´ but was wondering what else to look at. Right now, those two can be placed after any lowercase vowel and they'll be added to it (they misalign with i, but I'm working on it). I'm just doing so for fun, so nothing may come of it, but wanted some feedback if anyone was willing. « Last Edit: January 26, 2021, 05:06:46 pm by Queue » #### hmsong • Hero Member • Posts: 521 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1735 on: January 26, 2021, 09:43:58 pm » Awesome. Thanks. I shall work on some stuff with that knowledge. Some things though: - Why is Medical Herb (Puipui Grass) called, "Shepherd's Purse"? Purse? There's no way that's the right name. - The new spells' descriptions have some spacing problems. Do you think the best way to approach this is to make a separate section specifically for Reborn? Also, do you think you could integrate Relocalized names (spell names/descriptions, weapon names, etc) into Reborn? - Is there text letter combinations for Reborn (where 1 byte is a combination of multiple letters), like it did with Relocalized? #### Queue • Hero Member • Posts: 525 ##### Re: Secret of Mana, Turbo - Beta 210125 « Reply #1736 on: January 26, 2021, 09:56:12 pm » Version 2021-01-26: https://filebin.net/7spaiz2xfys6b2i1/SoM_Turbo.210126.zip Changes: - fixed some automatic line break logic in Reborn based on ManaRedux's screenshots - hopefully didn't break anything hmsong - https://en.wikipedia.org/wiki/Shepherd's_purse - I know about the description space issue, just haven't come up with a compatibility plan for it yet. A separate Reborn section for the descriptions might be the best approach, just labor intensive. I've experimented with letting Relocalized names / messages mix with Reborn's event text; it more or less works but was a bit messy and I want to shake out Reborn-specific compatibility bugs before committing to it. - Yes, you can use the same DTE letter pairs with Reborn as you could with Relocalized. They only don't work well with vanilla due to being incompatible with Proper-caser. Edit: Added a new release to the beginning of this post. « Last Edit: January 26, 2021, 11:16:01 pm by Queue » #### hmsong • Hero Member • Posts: 521 ##### Re: Secret of Mana, Turbo - Beta 210126 « Reply #1737 on: January 27, 2021, 12:05:03 am » - I know about the description space issue, just haven't come up with a compatibility plan for it yet. A separate Reborn section for the descriptions might be the best approach, just labor intensive. I've experimented with letting Relocalized names / messages mix with Reborn's event text; it more or less works but was a bit messy and I want to shake out Reborn-specific compatibility bugs before committing to it. - Yes, you can use the same DTE letter pairs with Reborn as you could with Relocalized. They only don't work well with vanilla due to being incompatible with Proper-caser. Oh wow. I didn't know about Shepherd's Purse name of a plant. Thanks for that. Still, I doubt that was the original intended name (which was what Reborn was intending on doing). And I'm sure most people would be quite confused with that name. Haha. Oh right, there was that Reborn's message mix that I didn't particularly like (I didn't like the whole "xxx got whacked" thing, but Reborn was trying to stay faithful to the vanilla, so it's understandable). And I agree with what you decided -- you should indeed wait and shake out the Reborn-specific compatibility bugs before committing to it. I assume skill/magic spacing issue will be dealt in Skill Screen Space patch, after the dust settles. For my private patch (I used No_Missing_Orb section), I used: Code: [Select] ' (Vanilla)@OFFCA19B7 ' Event 4A2 (Hexas)'RAW 2504 ' whip orb (\event \call 504)RAW 2501 ' whip --> sword@OFF $CA79AE ' Event 5ED (Dragon Worm)'RAW 2502 ' axe orb (\event \call 502)RAW 2500 ' axe --> glove@OFF$CA79C7 ' Event 5F1 (Axe Beak)'RAW 2507 ' javelin orb (\event \call 507)RAW 2506 ' javelin --> boomerang@OFF $CA79D4 ' Event 5F3 (Red Dragon)'RAW 2500 ' glove orb (\event \call 500)RAW 2502 ' glove --> axe@OFF$CA79E1 ' Event 5F5 (Thunder Gigas)'RAW 2501 ' sword orb (\event \call 501)RAW 2507 ' sword --> javelin@OFF $CA79F0 ' Event 5F7 (Blue Dragon)'RAW 2506 ' boomerang orb (\event \call 506)RAW 2504 ' boomerang --> whipIF [Text]IF Relocalized@OFF$E25343 ' Event 4A2 (Hexas)RAW 2501 ' whip --> sword@OFF $E2CF33 ' Event 5ED (Dragon Worm)RAW 2500 ' axe --> glove@OFF$E2CF4C ' Event 5F1 (Axe Beak)RAW 2506 ' javelin --> boomerang@OFF $E2CF59 ' Event 5F3 (Red Dragon)RAW 2502 ' glove --> axe@OFF$E2CF66 ' Event 5F5 (Thunder Gigas)RAW 2507 ' sword --> javelin@OFF $E2CF75 ' Event 5F7 (Blue Dragon)RAW 2504 ' boomerang --> whipENDIF x2 So just taking Hexas, would I do this, and it'll work for Reborn? (as well as vanilla/Relocalized) Code: [Select] %OFF% Event4A2RAW 2501 « Last Edit: January 27, 2021, 05:28:23 am by hmsong » #### Queue • Hero Member • Posts: 525 ##### Re: Secret of Mana, Turbo - Beta 210126 « Reply #1738 on: January 27, 2021, 02:51:44 pm » Hexas happens to be an easy one, so yes, what you posted would work correctly. If you look at the Hexas event (Reborn version): Code: [Select] @OFF Event4A2 '$E29EC6 Row: 4016\event \call 504 \inc= FF \inc= F8 \text_openTEXT ^F A^ N^ H^ A^ : ^S o _ m u c h _ f o o l i s h n e s s . . . \n^\event \wait_input \text_clearTEXT ^G r e a t _ ^T h a n a t o s . . . w h y ? . . . \n\event \wait_input \text_close \dec= F8 \dec= FF \call 7DC \inc= 44 \refresh_map \end\call 504 is the very first event command. So using %OFF% Event4A2, it starts overwriting the event starting at its beginning. Instead of RAW, it would be more descriptive to use the event mnemonics:
Code: [Select]
%OFF% Event4A2'\event \call 504 ' whip orb\event \call 501 ' sword orbBut ultimately that's up to you.

Dragon Worm is only barely less simple:
Code: [Select]
@OFF Event5ED ' $E34BAE\event \call 41B \call 502 \inc= 46 \goto 62A \endNotice how \call 502 isn't the first command; that means if you want to use %OFF% Event5ED you'll need to replicate the \call 41B to avoid breaking things: Code: [Select] %OFF% Event5ED\event \call 41B ' heal party + cheer animation'\event \call 502 ' axe orb\event \call 500 ' glove orb Axe Beak, Red Dragon and Thunder Gigas are easy like Hexas, where the weapon orb call command is the very first event command. Blue Dragon is like Dragon Worm where the weapon orb call is the second command, so make sure you replicate the first event command so it doesn't break anything. If you use %OFF% Event### for all of the event-dropped weapon orbs, it'll automatically work for all script variations (Vanilla, VWF_Edition, Relocalized, Reborn), and you won't need to maintain variants for each. And since Reborn isn't set in stone yet, it'll also accommodate any upcoming changes without you needing to recalculate addresses ($E29EC6, etc.).

#### hmsong

• Hero Member
• Posts: 521
##### Re: Secret of Mana, Turbo - Beta 210126
« Reply #1739 on: January 27, 2021, 07:13:43 pm »
Ohh, right.  I should have figured that out.  Duh.  You're right -- it's easier to use \event.  I don't know why I didn't use that (it's been a while).  I think you already told me that too, and I thought I used it, but I guess I forgot about it.

My whole thing is this, actually (after the corrections), using some of the ideas from the other patches:

Code: [Select]
@OFF $C8D5A8 '[17F: Empire Castle Orb Chest]'RAW BA03 86 8D 00 EB 7246 ' axe 4thRAW BA03 86 8E 00 EB 7246 ' axe 4th'RAW BC04 88 8D 00 EB 7446 ' whip 5thRAW BF03 88 8E 00 EB 7746 ' javelin 4th'RAW 344E 06 0C C0 3E 01C0 '(Armored Man)RAW 344E 07 0B 40 2D 01C0 '(Mimic Box)'RAW 344E 07 0D 00 3E 01C0 '(Armored Man)RAW 344E 06 0D 40 3E 01C0 '(Armored Man)'RAW 344E 08 0C 80 3E 01C0 '(Armored Man)RAW 344E 08 0D 40 3E 01C0 '(Armored Man)IF [Miscellaneous]IF Remove_Empire_Castle_Gate@OFF$C8D5A8 '[17F: Empire Castle Orb Chest]'RAW BA03 86 8D 00 EB 7246 ' axe 4thRAW BA03 86 8E 00 EB 7246 ' axe 4th'RAW BC04 88 8D 00 EB 7446 ' whip 5thRAW BF03 88 8E 00 EB 7746 ' javelin 4thENDIF x2%OFF% Event52F ' Event 52F (Mech Rider 2)'\event \lock \call 507 ' javelin orb (RAW 2507)\event \lock \call 504 ' javelin --> whip%OFF% Event544 ' Event 544 (Lime Slime)'\event \inc= AD \flag== 0B 02 \call 7C0 \door2= 86 \call 507 ' javelin orb\event \inc= AD \flag== 0B 02 \call 7C0 \door2= 86 \call 502 ' javelin --> axe@OFF $C896F8 '[???: Moon Palace Inside]'RAW 000F 03 0F 40 39 01C0 '(Marmablue #2)RAW DE00 82 8D 40 EB 8EC6 ' originally dark palace 1000 GP chest@OFF$C8AC70 '[???: Golden Tower 1F]'RAW BB04 8C 9D 40 EB 73C6 ' spear 5thRAW AC01 0A 1E 40 35 01C0 '(Beast Zombie)@OFF $C8ACB8 '[???: Golden Tower 2F]'RAW BA04 8C 9D 40 EB 72C6 ' axe 5thRAW BF04 8C 9D 40 EB 77C6 ' javelin 5th@OFF$C8D348 '[368: Dark Palace Palace 2]'RAW DE00 94 A4    EB 8EC6 ' dark palace 1000 GP chestRAW AD01 14 24 40 3A 01C0 '(Fierce Head)@OFF $C8D428 '[372: Dark Palace Room 2]'RAW 07 09 3A '(Fierce Head)RAW BB04 89 87 40 EB 73C6 ' spear 5th'RAW 0A 09 '(Fierce Head)RAW 000F 09 08 40 3A 01C0 '(Fierce Head) xpos+ ypos-@OFF$C89BF0 '[ 43: Ancient City Orb Chest]'RAW B905 91 B4 40 EB 71C6 ' sword 6thRAW B905 C8 B3 40 EB 71C6 ' sword 6th reposition'RAW B805 8A B4 40 EB 70C6 ' glove 6thRAW B805 CB B3 40 EB 70C6 ' glove 6th reposition'@OFF $C89C80 '[???: Ancient City Train]''RAW 000F 76 0D 40 40 01C0 '(Eggplant Man)'RAW B905 88 8D 40 EB 71C6 ' sword 6th'@OFF$C89D08 '[???: Ancient City Train]''RAW 000F 76 0D 40 40 01C0 '(Eggplant Man)'RAW B905 F6 8D 40 EB 71C6 ' sword 6th@OFF $C8DC08 '[Grand Palace 3rd Floor]'RAW B905 99 B1 40 EB 71C6 ' sword 6thRAW 0222 19 31 40 4C 71C0 ' National Scar'[Map Header/NPC Location Pointer Table]@OFF$C8735A'ADR.16 $C8DE38 '[1AD: Dummied]'ADR.16$C8DE38 '[1AE: Grand Palace (Ent)]'ADR.16 $C8DE78 '[1AF: Grand Palace (Seed)]'ADR.16$C8DEA0 '[1B0: Ancient City (Ent)]'ADR.16 $C8DEC0 '[1B1: Ancient City]ADR.16$C8DE48ADR.16 $C8DE48ADR.16$C8DE88ADR.16 $C8DEB0ADR.16$C8DED0@OFF \$C8DE38 '[428: Grand Palace Dead End]RAW BA05 89 87 40 EB 72C6 ' axe 6thRAW 000F 09 08 40 4A 01C0 '(Heck Hound)RAW D7 E1 9704 600D00 FF ' map header 430RAW 44 11 97 1A 40 5F B844RAW 45 00 98 98 40 B0 0040RAW 45 00 96 99 40 B2 0040RAW 45 01 9A 99 40 B4 0040RAW 41 34 18 93 00 A6 3010RAW 41 34 17 A0 40 CB 3140RAW 41 34 19 1B 80 C3 32C0RAW D7 E1 9706 200D00 FF ' map header 431RAW 97 01 8E 8C 47 DF 8F65RAW 97 22 8E 8C C7 DF B554RAW AF 11 8E 92 40 97 0000RAW 44 23 8E 8E 47 B0 AA14RAW DB B3 9B04 601000 FF ' map header 432RAW 000F 16 15 C8 47 01C0RAW BE05 94 8E 4F EB 76C6 ' boomerang 6thRAW 000F 8A 94 4F D3 F936RAW DB B3 9B04 601000 FF ' map header 433RAW 000F 44 30 48 31 01C0 '(Metal Crawler)RAW 000F 46 15 48 31 01C0 '(Metal Crawler)RAW 000F 48 10 48 31 01C0 '(Metal Crawler)' Vanilla/Relocalized/Reborn%OFF% Event4A2 ' Event 4A2 (Hexas)'\event \call 504 ' whip orb (RAW 2504)\event \call 501 ' whip --> sword'%OFF% Event4A4 ' Event 4A4 (Mech Rider 3)''\event \inc= 44 \inc= FF \call 503 ' spear orb'\event \inc= 44 \inc= FF \call 503 ' spear --> '%OFF% Event5ED ' Event 5ED (Dragon Worm)'\event \call 41B \call 502 ' axe orb\event \call 41B \call 500 ' axe --> glove'%OFF% Event5EF ' Event 5EF (Snow Dragon)''\event \call 505 ' bow orb'\event \call 505 ' bow --> '%OFF% Event5F1 ' Event 5F1 (Axe Beak)'\event \call 507 ' javelin orb\event \call 506 ' javelin --> boomerang%OFF% Event5F3 ' Event 5F3 (Red Dragon)'\event \call 500 ' glove orb\event \call 502 ' glove --> axe%OFF% Event5F5 ' Event 5F5 (Thunder Gigas)'\event \call 501 ' sword orb\event \call 507 ' sword --> javelin%OFF% Event5F7 ' Event 5F7 (Blue Dragon)'\event \inc= 46 \call 506 ' boomerang orb\event \inc= 46 \call 504 ' boomerang --> whip
Hopefully, I didn't make any mistake there.

Were there any cases where the event played out differently for vanilla/Relocalized to Reborn?  For example, a vanilla EventXXX is \call 500, but a reborn EventXXX is inc= 46 \call 500?  I know that there isn't for the events I used above (only compared to vanilla), but I'm just curious.