Author Topic: Trying to give Magus dual and triple techs. (Help wanted - see first post)  (Read 7279 times)

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs.
« Reply #15 on: December 28, 2008, 06:24:06 pm »
I knew you'd be the one to find those.

I relocated the 12 byte tech headers and 11 byte magic headers (See this for more information).

Techs are running smoothly, but normal attacks are not dealing any damage.

Edit: Got normal attacks working, through a mini-hack. Tech headers start at 5F5000, but Cyclone starts at 5F500C. For some reason the game isn't loading the proper x value to read the normal attack headers, so I placed a copy of one of them at 5F5000.

This is the code that's giving me the problem, which I haven't edited at all.
Code: [Select]
Disassembly:
$C1/C90B C2 20 REP #$20 A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envMxdizc HC:0054 VC:070 00 FL:16
$C1/C90D A2 10 00 LDX #$0010 A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0060 VC:070 00 FL:16
$C1/C910 64 2C STZ $2C    [$00:002C] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0066 VC:070 00 FL:16
$C1/C912 64 2E STZ $2E    [$00:002E] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0072 VC:070 00 FL:16
$C1/C914 66 2A ROR $2A    [$00:002A] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0078 VC:070 00 FL:16
$C1/C916 90 07 BCC $07    [$C91F] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0084 VC:070 00 FL:16
$C1/C918 18 CLC A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0090 VC:070 00 FL:16
$C1/C919 A5 28 LDA $28    [$00:0028] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0096 VC:070 00 FL:16
$C1/C91B 65 2E ADC $2E    [$00:002E] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0102 VC:070 00 FL:16
$C1/C91D 85 2E STA $2E    [$00:002E] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0108 VC:070 00 FL:16
$C1/C91F 66 2E ROR $2E    [$00:002E] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0114 VC:070 00 FL:16
$C1/C921 66 2C ROR $2C    [$00:002C] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0120 VC:070 00 FL:16
$C1/C923 CA DEX A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0126 VC:070 00 FL:16
$C1/C924 D0 EE BNE $EE    [$C914] A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0132 VC:070 00 FL:16
$C1/C926 7B TDC A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0138 VC:070 00 FL:16
$C1/C927 E2 20 SEP #$20 A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envmxdizc HC:0150 VC:070 00 FL:16
$C1/C929 60 RTS A:0080 X:0080 Y:000B D:0000 DB:7E S:06DA P:envMxdizc HC:0156 VC:070 00 FL:16

Edit 2: I have everything moved, but the pointers to tech descriptions aren't loading the right data. Whenever I try to change the bank it loads from, the game crashes.

Edit 3: ...Forgot to change the location of the pointers. Only thing left to change is the in battle pointers to tech descriptions. After that I can start adding the new techs.
« Last Edit: December 30, 2008, 11:55:42 pm by Mauron »

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs.
« Reply #16 on: December 31, 2008, 03:57:30 pm »
Double post, as this has fallen into oblivion (page 2).

I've relocated all the known data to the end of the ROM, in the 5Fxxxx range.

This includes data I found over the past few days, including which PCs show up on the menu next to a tech screen.

I still need to find where the game decides to place each tech group in the battle menu and regular menu, and control reading/writing the tech learning process.

For the brave, I've included the location of the moved data and a patch to fiddle with. Nothing has been expanded yet, but extra space is available at the end of each group.

Code: [Select]
5F0000-5F0667 - Tech Names
5F0668-5F098F - Tech Targeting
5F0990-5F0AC7 - Tech Description Pointers
5F1110-5F118D - Double Tech requirements
5F118E-5F11DC - Triple Tech requirements
5F11C4-5F11E9 - Tech Group Characters
5F3B0D - Tech Descriptions
5F5000-5F56E4 - 12 byte Tech Header
5F56E5-5F5D40 - 11 byte Magic Header
5F5D41-5F5DF5 - Tech Performance Groups - This controls which PCs perform a tech in battle.
5F5DF6-5F5E2F - PCs displayed by tech in menu
5F5E30-5F5E47 - Tech names and descriptions that appear in the character status menus - Arranged as starting tech/starting tech of next group. 2 byte groups, overlaping.

0257DF-025822: Load Tech Descriptions

3FF8F7: Load Double Tech Requirements. 10 11 5F
3FF948: Load Triple Tech Requirements. 8E 11 5F
025AA9: Load Tech Name for "Learned" text. 00 00
025AB1: Load Tech Name for "Learned" text. 5F
02BDDF: Load Tech Name for menu. 00 00
02BDE4: Load Tech Name for menu. 0B 5F
02BE64: Load Tech Descriptions for menu. 90 09
02BE6A: Load Tech Descriptions for menu. 5F
0D0323: Load Tech Descriptions in battle. 90 09
0D032A: Load Tech Descriptions in battle. 5F
010B75: Load Tech Name in Battle. 5F
010B6A: Load Tech Name in Battle. 00 00
01C9CA: Load Tech Targeting. 68 06 5F
01D5F0: Read 12 byte Tech Header. 00 50 5F
01CBAE: Read Tech Performance groups. 41 5D 5F
01CBB5: Read Tech Performance groups. 42 5D 5F
01CBBC: Read Tech Performance groups. 43 5D 5F
01D5CE: Read 11 byte Magic Header. E5 56 5F
01CB6F: Read 11 byte Magic Header. E6 56 5F
3FF866: Read PCs displayed by tech in menu. F6 5D 5F
02BCE9: Read PCs displayed by tech in menu. F6 5D 5F
02BBF3: Load Tech Group Characters. F6 5D 5F
02BD18: Load Tech Name Group Ranges. 30 5E 5F
3FF864: Load maximum memory range for techs learned in menu. --- This is the first part I haven't altered yet.
01CA34: Dual Tech range start in battle.
01CA38: Dual Tech range end in battle.
01CCE6: Triple Tech range start in battle.
01CCEA: Triple Tech range end in battle.

[attachment deleted by admin]

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Trying to give Magus dual and triple techs.
« Reply #17 on: December 31, 2008, 04:30:30 pm »
Incredible!

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs.
« Reply #18 on: December 31, 2008, 10:49:51 pm »
The whole thing has gone a little screwy now that I've tried inserting the new data.

The menu... I'm not sure what's working and what's not. I think it's going smoothly there. There's probably a value on where to start dual/triple techs similar to the ones I found for battle earlier.

In battle, dual techs are misplaced under seemingly random PCs. Triple techs aren't showing up at all. Physical attacks are broken again, in a different way than before.

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Trying to give Magus dual and triple techs.
« Reply #19 on: December 31, 2008, 11:07:30 pm »
:|...Evil little bugger to work with.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs.
« Reply #20 on: January 01, 2009, 11:53:58 am »
I found the problem with physical attacks.

The code I posted in reply #15 is the problem again, along with the code run prior to 01D5B3 (I can't find where that is for some reason).

Also, speed bars are broken. >_< PC3's resets PC1's for some reason. PC2's seems to be working fine.

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Trying to give Magus dual and triple techs.
« Reply #21 on: January 01, 2009, 03:53:08 pm »
O_o...That's odd.  I don't know if it's right but maybe check out the tidbits in the 6th letter patch?  The speed bar and whatnot was there and could screw everything up if you messed with the wrong byte.

V_Translanka

  • Interim Global Moderator
  • Arbiter (+8000)
  • *
  • Posts: 8340
  • Destroyer of Worlds
    • View Profile
    • http://www.angelfire.com/weird2/v_translanka/
Re: Trying to give Magus dual and triple techs.
« Reply #22 on: January 01, 2009, 08:55:40 pm »
I don't know how much I'd want to see this...The only way I could see this as being a good idea would be if

1) the only Double & Triple Techs he would get would be ones that required one of the base element Magics (Lightning, Lightning 2, Fire, Fire 2, Water, Etc) and maybe using ones that require Laser Spin, only replacing the requirement for Magus to be Dark Bomb, I guess,

2) Magus already knows whatever ones of said Double & Triple Techs that you've already learned &

3) when you learn a new one that follows those requirements, after you learn it, it should say, "Magus learned it too, cause he aint no bitch!" regardless of whether or not he's in your party.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs.
« Reply #23 on: January 01, 2009, 11:37:49 pm »
While giving them to Magus may or may not be a good idea (Personally I'd want them only available after a sidequest where Magus is forced to combine techs in order to beat an enemy, although I'm not sure how to do this at the moment), giving them to 7th character is useful for other hacks (such as the current Schala project).

I'm ignoring the glitches that have popped up for now, and trying to get the first tech going. For some reason the new dual tech isn't loading the pointers used by other techs (It should still load one originally used by another tech, but that code isn't being called at all).

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs.
« Reply #24 on: January 05, 2009, 06:40:22 pm »
I'm getting closer to attempting to add a new tech animation. I've got room reserved in the ROM to place it, and the rest of the known data spaced out for insertion. Normal attacks are now working again. I'll probably be creating them later today or tomorrow if all goes well.

- Shows up nicely except for the fact that it's under triple techs, and Magus's MP isn't showing.

- Usually the description bar is down at the bottom. Not sure why it isn't in this screenshot. Might have been taking before I fixed it.

I promise to have better tech names and descriptions when I'm at the point of really inserting them. >_>

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Trying to give Magus dual and triple techs.
« Reply #25 on: January 05, 2009, 06:51:15 pm »
WOW!  Very VERY nice job there Mauron!

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs.
« Reply #26 on: January 06, 2009, 05:07:33 pm »
>_<

For some reason the tech animation is running very inconsistently. It seems to need another tech to start with, and not all of them work. I've been using Frog's Heal for now.

Here's a sample video.

I need to analyze some dual techs and find out how they have other PCs participate.

Edit: Set tech animation byte one to D8 and Magus shakes his head while Crono performs Cyclone.

Edit 2: Attaching latest patch, and posting my notes.

These are the relocated data ranges for techs. "Done" marks any range that needed expansion, and has been expanded.
Quote
5F0000-5F0667 - Tech Names - Done
5F0668-5F098F - Tech Targeting - Done
5F0990-5F0AC7 - Tech Description Pointers - Done
5F1110-5F118D - Double Tech requirements
5F118E-5F11DC - Triple Tech requirements
5F3B0D - Tech Descriptions
5F5000-5F56E4 - 12 byte Tech Header - Done
5F56E5-5F5D40 - 11 byte Magic Header - Done
5F5D41-5F5DF5 - Tech Performance Groups - This controls which PCs perform a tech in battle. - Done
5F5DF6-5F5E2F - PCs displayed by tech in menu - Done
5F5E36-5F5E5A - Tech names and descriptions that appear in the character status menus - Arranged as starting tech/starting tech of next group. 2 byte groups, overlapping.
5F5E90-5F5FBF - Pointers to tech animations. - Done
5F5FA0-5F6BDF - 7 byte Tech Graphics header. - Done

Commands and the value they were changed to.
Quote
3FF8F7: Load Double Tech Requirements. 10 11 5F
3FF948: Load Triple Tech Requirements. 8E 11 5F
025AA9: Load Tech Name for "Learned" text. 00 00
025AB1: Load Tech Name for "Learned" text. 5F
02BDDF: Load Tech Name for menu. 00 00
02BDE4: Load Tech Name for menu. 0B 5F
02BE64: Load Tech Descriptions for menu. 90 09
02BE6A: Load Tech Descriptions for menu. 5F
0D0323: Load Tech Descriptions in battle. 90 09
0D032A: Load Tech Descriptions in battle. 5F
010B75: Load Tech Name in Battle. 5F
010B6A: Load Tech Name in Battle. 00 00
01C9CA: Load Tech Targeting. 68 06 5F
01D5F0: Read 12 byte Tech Header. 00 50 5F
01CBAE: Read Tech Performance groups. 41 5D 5F
01CBB5: Read Tech Performance groups. 42 5D 5F
01CBBC: Read Tech Performance groups. 43 5D 5F
01D5CE: Read 11 byte Magic Header. E5 56 5F
01CB6F: Read 11 byte Magic Header. E6 56 5F
3FF866: Read PCs displayed by tech in menu. F6 5D 5F
02BCE9: Read PCs displayed by tech in menu. F6 5D 5F
02BBF3: Load Tech Group Characters. F6 5D 5F
02BD18: Load Tech Name Group Ranges. 36 5E 5F
3FF864: Load maximum memory range for techs learned in menu. 43
01CA34: Dual Tech range start in battle.
01CA38: Dual Tech range end in battle. 78
01CCE6: Triple Tech range start in battle. 78 (original 66)
01CCEA: Triple Tech range end in battle. 98
3FF900: Dual Tech Requirements in menu. 10 11 5F
014618: Read pointers to tech animations. 90 5E 5F
014626: Read Tech animation byte 1. 5E
01462C: Read Tech animation byte 2. 5E
014632: Read Tech animation byte 3. 5E
014638: Read Tech animation byte 4. 5E
01465B: Read Tech animation bytes 5+. 5E
0145BC: Read Tech 7 byte graphics header.
01BFFF: Read normal attack header byte.

Justin's notes.  Didn't seem to serve the proper purpose.
Quote
0C3AF5 - Single Tech (80 43)
0C3AF7 - Dual Tech (89 43)
0C3AF9 - Triple Tech (91 43)

Old tech data locations that were not in the offsets guide (or I just missed them)
Quote
0C249F-0C2534: Tech performance groups. 152
0C1BEB-0C20E9: Related to tech performance groups.
3FF9BB-3FF9C3: Character values for tech performance groups.
02F17A-??????: Unknown purpose.
0C2963-0C2987: PCs displayed by tech in menu.
0D5EF0-0D5FD9: Pointers to tech animation data.
0E0909-0E81B3: Tech animation data.
0D45A6-0D50FA: 7 byte tech graphics header.
0C2583-0C2589: Normal attack header byte.

Modified memory location list.
Quote
All   7E2830   07   FF   Tech to learn next (1 byte per PC)   2007.06.12
All   7E2837   07   FF   Single Techs learned (1 byte per PC)   2007.06.12
All   7E283E   01   E0   Crono Marle Double Techs learned   2007.06.12
All   7E283F   01   E0   Crono Lucca Double Techs learned   2007.06.12
All   7E2840   01   E0   Crono Robo Double Techs learned   2007.06.12
All   7E2841   01   E0   Crono Frog Double Techs learned   2007.06.12
All   7E2842   01   E0   Crono Ayla Double Techs learned   2007.06.12
All   7E2843   01   E0   Marle Lucca Double Techs learned   2007.06.12
All   7E2844   01   E0   Marle Robo Double Techs learned   2007.06.12
All   7E2845   01   E0   Marle Frog Double Techs learned   2007.06.12
All   7E2846   01   E0   Marle Ayla Double Techs learned   2007.06.12
All   7E2847   01   E0   Lucca Robo Double Techs learned   2007.06.12
All   7E2848   01   E0   Lucca Ayla Double Techs learned   2007.06.12
All   7E2849   01   E0   Robo Frog Double Techs learned   2007.06.12
All   7E284A   01   E0   Robo Ayla Double Techs learned   2007.06.12
All   7E284B   01   E0   Frog Ayla Double Techs learned   2007.06.12
All   7E284C   01   E0   Lucca Frog Double Techs learned   2007.06.12
All   7E284D   01   E0   Magus Crono Double Techs learned   2007.06.12
All   7E284E   01   E0   Magus Marle Double Techs learned   2007.06.12
All   7E284F   01   E0   Magus Lucca Double Techs learned   2007.06.12
All   7E2850   01   E0   Magus Robo Double Techs learned   2007.06.12
All   7E2851   01   E0   Magus Frog Double Techs learned   2007.06.12
All   7E2852   01   E0   Magus Ayla Double Techs learned   2007.06.12
All   7E2853   01   80   Delta Force - Crono Marle Lucca Triple Tech   2007.06.12
All   7E2854   01   80   Lifeline - Crono Marle Robo Triple Tech   2007.06.12
All   7E2855   01   80   Arc Impulse - Crono Marle Frog Triple Tech   2007.06.12
All   7E2856   01   80   Final Kick - Crono Marle Ayla Triple Tech   2007.06.12
All   7E2857   01   80   Fire Zone - Crono Lucca Robo Triple Tech   2007.06.12
All   7E2858   01   80   Delta Storm - Crono Lucca Frog Triple Tech   2007.06.12
All   7E2859   01   80   GatlingKick - Crono Lucca Ayla Triple Tech   2007.06.12
All   7E285A   01   80   Triple Raid - Crono Robo Frog Triple Tech   2007.06.12
All   7E285B   01   80   Twister - Crono Robo Ayla Triple Tech   2007.06.12
All   7E285C   01   80   3D Attack - Crono Frog Ayla Triple Tech   2007.06.12
All   7E285D   01   80   DarkEternal (Black Rock) - Marle Lucca Magus   2007.06.12
All   7E285E   01   80   Omega Flare (Blue Rock) - Lucca Robo Magus   2007.06.12
All   7E285F   01   80   Spin Strike (SilverRock) - Robo Frog Ayla   2007.06.12
All   7E2860   01   80   PoyozoDance (White Rock) - Marle Lucca Ayla   2007.06.12
All   7E2861   01   80   Grand Dream (Gold Rock) - Marle Frog Robo   2007.06.12

[attachment deleted by admin]
« Last Edit: January 07, 2009, 03:24:46 pm by Mauron »

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs. (Help wanted - see first post)
« Reply #27 on: January 11, 2009, 10:23:20 pm »
Slowdown thanks to my computer being INSANE GRAGHARLE!!!!

I make a tech in the tech editor, paste it into the game with Translhextion (I need it at the end of the ROM instead of where the techs originally were), load the ROM with Snes9X, and IT'S NOT THE SAME DATA! I know I'm loading the same file both times, because I've gotten it to save right in the past, but now it refuses to work right.

Edit: ARGH I'm an idiot.

I had an IPS patch with the same name as the ROM that was being auto-applied. Progress resumes now.
« Last Edit: January 11, 2009, 10:37:41 pm by Mauron »

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Trying to give Magus dual and triple techs. (Help wanted - see first post)
« Reply #28 on: January 11, 2009, 10:40:02 pm »
Ha.  I know exactly how you feel on that one.  I had that same exact issue with the DS project as well.  I made an IPS patch and forgot to move it and it was overlapping data and I flipped out because it wouldn't save correctly D:

Anywho, keep up this amazing work.  You're my Magus god D:

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1768
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Trying to give Magus dual and triple techs. (Help wanted - see first post)
« Reply #29 on: January 13, 2009, 01:58:06 pm »
New video.

Mid video I disabled a code that made byte one of the tech animation header 98 (multi target single tech) instead of D8 (multi target dual tech).

I have no clue what causes the freezing in dual tech mode. If anyone wants to dissect the existing dual techs it would really help.

Edit: Fixed link.
« Last Edit: January 13, 2009, 04:36:09 pm by Mauron »