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

Author Topic: Secret of Mana, Turbo - Beta 200810  (Read 329621 times)

hmsong

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
Re: Secret of Mana, Turbo - Beta 200508
« Reply #1400 on: May 09, 2020, 10:41:51 pm »
Hot damn, did you say "automation script"?  Holy crap.

ManaRedux

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Secret of Mana Redux
Re: Secret of Mana, Turbo - Beta 200508
« Reply #1401 on: May 10, 2020, 02:19:39 am »
Looking great, Queue! ;D

hmsong

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
Re: Secret of Mana, Turbo - Beta 200508
« Reply #1402 on: May 10, 2020, 05:09:03 am »
@Queue

Bug Report:  I don't know why, the room where Primm's marriage proposal in the Pandora Castle has its camera all weird -- it starts alright, then when I move sideway to sideway, the camera slowly goes left, until it loops.  More accurately, the camera doesn't move right if my character moves right, but moves left it moves left.  In vanilla, that room doesn't move at all, so I can't tell if that was vanilla bug or not.

Also, Elman (in that same room) doesn't have his dialog abortable (he repeats the same dialog, so it's not one-time dialog).

Queue

  • Sr. Member
  • ****
  • Posts: 412
    • View Profile
Re: Secret of Mana, Turbo - Beta 200508
« Reply #1403 on: May 10, 2020, 05:35:15 am »
Can you test that room with Bug_Fixes\Gather_Party_Fix Off please? I'll check it tomorrow, but I suspect that's where the problem is.

hmsong

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
Re: Secret of Mana, Turbo - Beta 200508
« Reply #1404 on: May 10, 2020, 06:38:07 am »
Yup, it's that.  That was fast.

Queue

  • Sr. Member
  • ****
  • Posts: 412
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1405 on: May 10, 2020, 04:55:38 pm »
Version 2020-05-10:
https://filebin.net/7spaiz2xfys6b2i1/SoM_Turbo.200510.zip

Changes:
- fixed Bug_Fixes\Gather_Party_Fix buggy camera behavior in very small rooms

Technical Changes:
- more prep work for the Script Augmentation Project



hmsong, let's see if I can explain some of what info you'd need to make an event that dispels stuff.

First off, actor data (actor = players, enemies, NPCs, chests) is 512 (0x200) bytes in RAM, starting at $7EE000. So the boy's data is at $7EE000 because he's always the first actor, the girl's data is at $7EE200 since she's second, $7EE400 is the sprite since he's third, the first enemy is at $7EE600, etc.

Events can access the top 256 (0x100) bytes of actor data for any given actor.

Now go look at SSE.Func.Detrimental.Dispel_Magic. You'll notice lots of STZ+X $E1?? and STA+X $E1?? instructions. X is the current actor offset. So if dispel is being cast on the boy, X = #0000, if cast on the girl, X = #0200, and so on. The $E1?? is referring to $7EE1?? which is the top 256 bytes of actor data, and X is added to the address based on the current dispel spell target.

So, let's analyze the first STZ+X $E1??:
Code: [Select]
STZ+X $E19B ' CURRENT_CHARGE_LEVELSTZ means STore Zero (which means write #00 or #0000 to the target address).
+X is because the actor offset is added to the target address.
$E??? is because it's working on $7EE??? which is actor data.
$?1?? is because it's the top 256 (0x100) bytes of actor data.
$?19B is an actor's CURRENT_CHARGE_LEVEL (as noted by the comment).

So, let's say we want to do this same thing (setting CURRENT_CHARGE_LEVEL to 0 for the boy) using an event. The event command \stats1_boy== lets you write a byte to the top 256 bytes of the boy's actor data. The 1 in \stats1_* is the same as $?1?? in $E19B. And so, \stats1_boy== 9B 00 would do the same as STZ+X $E19B (when X = #0000 = boy).

Not everything in SSE.Func.Detrimental.Dispel_Magic is a STZ (STore Zero); many are STA, which means STore the value in the A register (to the target address). So before the STA+X instructions, you have to note what value A has. For example, look at this chunk of code:
Code: [Select]
LDA #01
STA+X $E1B7 ' TIMER_ATTACK_BUFF_DURATION
STA+X $E1BA ' TIMER_ACCURACY_BUFF_DURATION
STA+X $E1BB ' TIMER_EVADE_BUFF_DURATION
STA+X $E1BC ' TIMER_DEFENSE_BUFF_DURATION
STZ+X $E19D ' SABER_SPELL_USES
STZ+X $E1B8 ' WALL_USE_COUNTER
A is being set to #01 (LDA = LoaD A), and then some actor data is being set to 1 via STA+X, while some is being set to 0 via STZ+X.

All of that actor data is in the top 256 bytes ($E1??), so all of that can be replicated using event command \stats1_*. For example, \stats1_boy== B7 01 would do the same as STA+X $E1B7.

Things get more complicated when it comes to some of the other parts of dispel, namely altering:
$E1FA      ' UPDATE_FLAGS
$E1B1      ' MISC_FLAGS
...because the dispel magic spell doesn't simply set them to specific values, it does some math on those values which the event system cannot do. It would require some analysis to determine if it's safe to set them to fixed values (or some trial and error).

---

Quote from: hmsong
Hot damn, did you say "automation script"?  Holy crap.
I'm not positive what you think this means, but it's a script (code) that takes reconstructingmana's newly translated game script (text) and formats it into ZPS syntax, then puts it in place of the vanilla script (text) while leaving the non-text event commands, which I then can run through the ZPS Patcher to modify the ROM.

Annoyingly, "script" means multiple relevant things. In the context of the game's text, it's used like "movie script" where it's talking about the text (and in theory actor commands, but in this case only text). In the context of programming, a script is code read by an interpreter as-is (as opposed to being compiled into machine code or bytecode).

---

The camera issue was related to very small rooms: player screen coordinates never go negative if the current map is small enough and my new offscreen camera code (in Gather_Party_Fix) didn't account for that. I think I got it fixed correctly. Thanks for noticing it so soon; I had only been testing in large outdoor areas (especially using whip posts when offscreen in the Lofty Mountains).



reconstructingmana (and anyone interested in the retranslation), to clarify on that picture, I just wanted to show off some of the text in-game finally; you can ignore any of the other non-vanilla aspects of the image. The Script Augmentation Project won't be tethered to the rest of this Turbo project and will work as and be provided as a stand-alone patch (probably in IPS format), it will just also be one of the text options included in the Turbo patcher as well. At the moment, testing within the Turbo project framework gives me lots of diagnostic capability (e.g. debug controls to teleport around).

Lyrin

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1406 on: May 10, 2020, 06:48:08 pm »
When this project is complete, would you consider adding some of the features to Seiken Densetsu 3/Trials of Mana?

hmsong

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1407 on: May 11, 2020, 02:23:15 am »
This is a bit... overwhelming.  I understood the first half of the explanation.  I need some time to process the 2nd half (I'm looking at the SSE.Func.Detrimental.Dispel_Magic and trying to follow along).  So far, all my fragile mind can process is, "Oohh, I see those letters.  I'm physically following what he's saying."  Haha... (nervous).  Crap.

I hope there were no other rooms that had that strange camera effect.  It's not like I was able to test every single room in the game.

Lyrin

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1408 on: May 12, 2020, 12:17:03 am »
Found a weird bug.
I made it to the Fire Temple, and in my "infinite idiocy" managed to skip going through the side paths.
By doing the "Strong Attack" forward several times, you can actually go up the ramp located in the first room.
It can be done with Knuckle, Sword, Axe, Spear, or Javelin.

ManaRedux

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Secret of Mana Redux
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1409 on: May 12, 2020, 11:40:05 am »
Found a weird bug.
I made it to the Fire Temple, and in my "infinite idiocy" managed to skip going through the side paths.
By doing the "Strong Attack" forward several times, you can actually go up the ramp located in the first room.
It can be done with Knuckle, Sword, Axe, Spear, or Javelin.

http://www.flyingomelette.com/oddities/oddities25.html

Lyrin

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1410 on: May 12, 2020, 12:29:03 pm »
http://www.flyingomelette.com/oddities/oddities25.html
First time player, so I didn't know about that. This makes it a lot easier to do though, just hold up and attack about five times.

Queue

  • Sr. Member
  • ****
  • Posts: 412
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1411 on: May 13, 2020, 02:02:40 am »
Quote from: Lyrin
When this project is complete, would you consider adding some of the features to Seiken Densetsu 3/Trials of Mana?
Nope. This is a labor of love, and sadly for Trials of Mana, I do not love it. I think it's super pretty and I enjoy its storytelling and split story routes, but I dislike the gameplay and itemization, and don't have the soft spot for it required to motivate me to completely overhaul it to a form I would find fun.

The games have nothing in common code-wise (other than both being SNES games), so any changes to it would be from scratch. I also had the good fortune that zhaDe had done so much for this game that I could build on top of.

Quote from: Lyrin
Found a weird bug.
It's harmless; I think it lets you get to a weapon orb early, but you can't fully sequence break or get stuck or anything.



Quote from: hmsong
I hope there were no other rooms that had that strange camera effect.
Other rooms were affected in the same way; it should be any room narrower than 19 tiles (there aren't a lot but still more than just that room in Pandora Castle). But they all should work fine now since I improved the camera code (it didn't require any change to the room itself). Rooms that small screen wrap differently than larger rooms, and my camera code wasn't aware of the difference.

ManaRedux

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Secret of Mana Redux
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1412 on: May 13, 2020, 09:07:34 am »
Nope. This is a labor of love, and sadly for Trials of Mana, I do not love it. I think it's super pretty and I enjoy its storytelling and split story routes, but I dislike the gameplay and itemization, and don't have the soft spot for it required to motivate me to completely overhaul it to a form I would find fun.

Glad I'm not the only one!

Cookie Knight

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1413 on: May 13, 2020, 09:14:40 am »
Hey, is the stamina drain from guarding supposed to stop at 47? It wont go down to zero or stop blocking for me. unless I let go of the button.

Queue

  • Sr. Member
  • ****
  • Posts: 412
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1414 on: May 13, 2020, 06:47:31 pm »
Well, a SAP milestone on my end. The integration script now makes it through the entire retranslation, mostly successfully.
Here's the output log:
Code: [Select]
-- Special Case: 11 020   25
-- Special Case: 11 021   30
-- Special Case: 11 022   37
-- Special Case: 11 023   42
-- Options Skip: 050  147
-- Options Skip: 062  150
-- Options Skip: 064  157
-- Options Skip: 065  162
-- Options Skip: 081  166
-- Options Skip: 099  200
!! Text Discarded: 099  204
Ready to buy the cheapest goods around?
!! Repeated Lines: 0AA  217
-- Options Skip: 0CE  297
-- Options Skip: 0CF  301
-- Options Skip: 0D0  305
-- Options Skip: 0D1  309
!! Text Discarded: 0D1  313
Where are you headed?  50GP anywhere!
-- Options Skip: 0DB  326
-- Options Skip: 0DC  331
-- Options Skip: 0DF  338
!! Text Discarded: 0DF  342
Air Delivery for 50GP!
-- Options Skip: 0E0  342
-- Options Skip: 0E1  346
-- Options Skip: 0E2  350
-- Options Skip: 0E3  354
-- Options Skip: 0FB  416
-- Special Case: 17 10C  545
-- Options Skip: 11A  694
-- Options Skip: 133  750
-- Options Skip: 134  754
-- Options Skip: 1B0 1344
-- Options Skip: 1B3 1381
-- Options Skip: 1B5 1388
-- Options Skip: 1B9 1424
-- Options Skip: 1BD 1465
-- Options Skip: 1C5 1497
-- Options Skip: 1CC 1555
-- Options Skip: 1CE 1563
-- Options Skip: 1D6 1646
-- Options Skip: 1DF 1723
-- Options Skip: 1EE 1820
!! Repeated Lines: 206 1936
-- Options Skip: 20F 1961
-- Options Skip: 23C 2143
-- Options Skip: 253 2185
-- Options Skip: 2A7 2563
-- Options Skip: 2AA 2574
!! Bad Character: % 25 2FC 2956
-- Options Skip: 310 2971
-- Options Skip: 314 2978
-- Options Skip: 318 2981
!! Text Discarded: 318 2989
I will also save!  Meow!
-- Options Skip: 319 2989
!! Text Discarded: 319 2997
As always, make sure you have the equipment you need!
-- Options Skip: 331 3009
!! Repeated Lines: 388 3181
-- Options Skip: 38C 3186
-- Options Skip: 3DC 3525
!! Repeated Lines: 4E3 4279
!! Bad Character: % 25 4E6 4387
!! Bad Character: % 25 4E7 4424
-- Options Skip: 5DA 5050
!! Bad Character: % 25 5F8 5077
-- Options Skip: 65F 5266
-- Options Skip: 66B 5271
-- Text Event Count: 708

++ Success
There are about 50 typos in the SAP spreadsheet in the original English column that need to be corrected (mostly missing punctuation, especially quotation marks, but also a spelling correction or two that make the integration script choke because it expects the vanilla typo, like auxillary or allabout).

All of the "Text Discarded" errors should be resolved when the text option text gets expanded to multiple rows (and that'll also deal with all of the "Options Skip" warnings).

I need to improve the line wrapping logic, improve the logic that delineates different speakers, add exceptions for the intro cutscene so that it doesn't wait for input between chunks of text, and slightly modify how the game handles the newline character, but in general, the hardest part of making the integration script is complete.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 411
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1415 on: May 15, 2020, 06:05:50 am »
Nope. This is a labor of love, and sadly for Trials of Mana, I do not love it. I think it's super pretty and I enjoy its storytelling and split story routes, but I dislike the gameplay and itemization, and don't have the soft spot for it required to motivate me to completely overhaul it to a form I would find fun.

I'm not looking to debate the issue, but I'm genuinely interested in what is meant by itemization here. Would love to better understand the criticism of SD3.

Queue

  • Sr. Member
  • ****
  • Posts: 412
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1416 on: May 15, 2020, 03:27:56 pm »
In this context, itemization is referring to equipment stats and how they affect the game, particularly if they provide choices for character personalization.

My complaint with the game is its equipment is linear and bland. Aside from the sudden jump in magic defense on body armor in Dior, no body armor is noteworthy, and each new item is a +1 with a different name. As far as I recall, head and hand armor remain completely boring and just +1 their way through the game. Duran has one shield of note that gives some status immunities, but since it's for 1 subclass, it's not a choice, but just an aspect of the class. And that's it. The game would've played no differently if the defense boosts given with equipment had instead just been given upon level up or upon reaching certain locations, without having to suffer the nightmarishly slow menus; they provide no choices other than allowing you to keep "difficulty" higher by intentionally not upgrading (or accidentally I guess). Weapons don't fare any better, and suffer from the same single endgame "option".

Compare that to Secret of Mana where, despite plenty of flaws, there are some distinct choices available in how you equip a character. Many weapons have status procs that could decide which you use, and which could even incentivize not "upgrading" the weapon. A few body or head armors have status immunities, which is typically only on hand armor, so that's neat, and ideally you'd choose hand armor based on what immunities you wanted. The Faerie's Ring, and the huge defense jump as you end the Sunken Continent / start Pure Land, are large flaws in the game's equipment that remove choice.

Why am I so focused on choice? Because otherwise why even have equipment that can be changed out? Just add whatever stats come from boring items to an equally boring linear character level up system and save the player the tedium. If it's not clear, I also don't like pointless level up systems (which Secret of Mana suffers from). Trials of Mana does classes acceptably and having at least some amount of stat allotment when leveling is good design (though it does still try and homogenize that). But that's about it.

I'd hold up, uh, probably MS Saga of all things, as my favorite equipment system. List-based for primary equipment choices which have pros and cons (this waters down by the end of the game when melee and ranged equipment converges), Tetris-grid for further customization, with some early game items that remain on-and-off relevant through the whole game since they can be squeezed into leftover spots on the Tetris-grid. For favorite item balance, maybe New Vegas, as most terrible "low level" stuff can be used endgame given the right character setup (in general).
« Last Edit: May 15, 2020, 03:33:49 pm by Queue »

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 411
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1417 on: May 15, 2020, 04:01:25 pm »
Thank you for the lengthy discussion. You make a compelling case for one of the weakest aspects of the game. I initially thought you were referring to the use items, which is an element I'm more happy with. Not only are the equipment upgrades as bland as you describe, but the process of buying and equipping things itself is terribly unintuitive and cumbersome.

I suppose that I'm able to overlook that aspect of the game because there are other aspects that play so strongly to my preferences. I particularly love games that force me to make permanent choices between diverse characters and classes. The fixed characters and their fixed roles in Secret of Mana probably feels as bland to me as how the equipment in SD3 feels to you. Too many pros and cons with equipment choices can even become a source of stress for me. I sometimes find myself ignoring the pros and cons and simply going with numeric superiority if I feel like the variables are too many. There is, however, a sweet spot that SD3 falls significantly short of.

I'm currently playing through the Trials of Mana remake. There were a lot of respectful and intelligent changes to the game, but aside from an array of new accessories with unique abilities, the other equipment is largely as vanilla as it was, unfortunately.
« Last Edit: May 15, 2020, 09:25:59 pm by Chicken Knife »

Mr X

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1418 on: May 16, 2020, 09:35:09 am »
Have tried the latest update, the Deafult Spirit levels does not seem to work correctly for the Girl but for the Sprite it does seem to work just fine.

I set Gnome to be level 1 and Sylphid level 2 as deafult but the Girl got Gnome at Level 0 while Sylphid at level 1, while Sprite got them as intended.

ManaRedux

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Secret of Mana Redux
Re: Secret of Mana, Turbo - Beta 200510
« Reply #1419 on: May 16, 2020, 10:48:40 pm »
There hasn't been much discussion about the Script Augmentation Project, so I'll talk.

I threw in the towel on my Phase 3 (new stuff) materials getting here from Japan.  I should have realized when I ordered them well over a month ago that the COVID-19 situation would delay them indefinitely.  Instead, I found a domestic source for one of the two books (I quickly received a third book from a different place in Japan), and will wait for the other.  I will probably proceed with the two I have, and if something in the delayed book is worth it, I'll beg forgiveness later.

As for Phase 2 (relocalization of original script), we have acquired a Japanese history professor (who is also a fluent scholar of the language and a longtime fan of the game) to critique the first draft line by line.  So far, he has provided invaluable analysis into 21% of the script, and will continue to provide commentary line by line.  It's the type of scholarly knowledge of writing systems and cultural contexts that I could only have dreamed of realizing at the start of the project.  If he works at his current pace, I'd say this will be complete in the next 1-2 weeks. 

Queue, once the new book arrives on Monday, I should have a proposal for Phase 3 for you.