Users browsing this thread: 1 Guest(s)
Some final code requests (and screenshots)

Posts: 314
Threads: 20
Thanks Received: 0
Thanks Given: 1
Joined: Dec 2017
Reputation: 2
Status
None
Actually, I've decided to keep the Tintinabar in my hack thanks to the discovery of the "Unhardcoded Tintinabar" patch by Lenophis. This hack allows me to do two things that I wanted: add healing powers to other items, and to allow the healing to work on the entire party!

This has inspired me to give Leo his own unique relic: The Magi Exosuit. Since Leo refused a Magitek infusion (according to the original plot), my new plot has Cid building him a special suit that grants him special powers without any unnatural modifications to his own self, thus keeping him a "warrior's warrior". Smile
  Find
Quote  

Posts: 314
Threads: 20
Thanks Received: 0
Thanks Given: 1
Joined: Dec 2017
Reputation: 2
Status
None
Can anyone tell me how to cut the Step Mine MP usage in half? I know that the Step Mine damage is controlled by the number of steps, and the MP it uses also gradually goes up with the steps - but the current MP usage in my mod is far too much since I reduced the damage caused by Step Mine. It causes about 2,500 damage but takes 108 MP (I reduced the damage caused by Step Mine). There must be a byte somewhere the controls this.
  Find
Quote  

Posts: 51
Threads: 5
Thanks Received: 2
Thanks Given: 0
Joined: Apr 2018
Reputation: 8
Status
Shell
Code:
C2/566E: E0 44 00     CPX #$0044     (are we pointing at Step Mine's menu slot?)
C2/5671: D0 09        BNE $567C      (branch if not)
C2/5673: AD 64 18     LDA $1864      (minutes portion of time played, from when main
                                      menu was last visited.  or seconds remaining,
                                      if we're in a timed area.)
C2/5676: C9 1E        CMP #$1E       (set Carry if >= 30 minutes)
C2/5678: AD 63 18     LDA $1863      (hours portion of time played, from when main
                                      menu was last visited.  or minutes remaining,
                                      if we're in a timed area.)
C2/567B: 2A           ROL            (MP Cost = [hours * 2] + [minutes DIV 30] or
                                      unintended [minutes remaining * 2] +
                                      [seconds remaining DIV 30])
If you want to halve the MP cost, replace the ROL with a NOP. This makes the LDA $1864 and CMP#$1E pointless, so I'd NOP them too, but it's not strictly necessary.
  Find
Quote  

Posts: 314
Threads: 20
Thanks Received: 0
Thanks Given: 1
Joined: Dec 2017
Reputation: 2
Status
None
(05-09-2019, 04:44 AM)Subtraction Wrote:
Code:
C2/566E: E0 44 00     CPX #$0044     (are we pointing at Step Mine's menu slot?)
C2/5671: D0 09        BNE $567C      (branch if not)
C2/5673: AD 64 18     LDA $1864      (minutes portion of time played, from when main
                                      menu was last visited.  or seconds remaining,
                                      if we're in a timed area.)
C2/5676: C9 1E        CMP #$1E       (set Carry if >= 30 minutes)
C2/5678: AD 63 18     LDA $1863      (hours portion of time played, from when main
                                      menu was last visited.  or minutes remaining,
                                      if we're in a timed area.)
C2/567B: 2A           ROL            (MP Cost = [hours * 2] + [minutes DIV 30] or
                                      unintended [minutes remaining * 2] +
                                      [seconds remaining DIV 30])
If you want to halve the MP cost, replace the ROL with a NOP. This makes the LDA $1864 and CMP#$1E pointless, so I'd NOP them too, but it's not strictly necessary.

For some reason this didn't work.  Step Mine in my game still costs 108MP, even after NOP'ing C2/5676 - C2/567B.  The amount of MP Step Mine uses is not contained in a saved game, is it?  That could explain it if so.  If not, then I don't know what is going on.
  Find
Quote  

Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(05-09-2019, 12:31 PM)Lightning Wrote: For some reason this didn't work.

I think you need to keep the LDA $1863.
  Find
Quote  

Posts: 314
Threads: 20
Thanks Received: 0
Thanks Given: 1
Joined: Dec 2017
Reputation: 2
Status
None
(05-09-2019, 07:04 PM)madsiur Wrote:
(05-09-2019, 12:31 PM)Lightning Wrote: For some reason this didn't work.

I think you need to keep the LDA $1863.

Even then Step Mine is costing 108MP in my game.  The Savegame file does not keep this data stored anywhere, does it?
  Find
Quote  

Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(05-10-2019, 01:37 AM)Lightning Wrote: The Savegame file does not keep this data stored anywhere, does it?

MP costs is not saved in SRAM but number of steps yes.
  Find
Quote  

Posts: 314
Threads: 20
Thanks Received: 0
Thanks Given: 1
Joined: Dec 2017
Reputation: 2
Status
None
(05-11-2019, 10:45 AM)madsiur Wrote:
(05-10-2019, 01:37 AM)Lightning Wrote: The Savegame file does not keep this data stored anywhere, does it?

MP costs is not saved in SRAM but number of steps yes.

In that case, something is wrong with the modifications I'm making. I'm aware the number of steps is saved to a save-slot, but no matter what I NOP in the code, Step Mine still uses 108MP in my saved game.  It's almost as if that particular bit of code you guys put up is not actually used by Step Mine at all, regardless of what the notes say.
  Find
Quote  

Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Well in that case, use a debugger and set a breakpoint at C2/566E to see if the code is executed when you use step mine.
  Find
Quote  

Posts: 51
Threads: 5
Thanks Received: 2
Thanks Given: 0
Joined: Apr 2018
Reputation: 8
Status
Shell
(05-11-2019, 04:17 PM)madsiur Wrote: Well in that case, use a debugger and set a breakpoint at C2/566E to see if the code is executed when you use step mine.

To be clear, this code is run at the start of a battle, not when you use step mine.

The reason it didn't work is because you're using a 1.1 ROM, and I gave you the code for 1.0. Searching the 1.1 ROM for "E0 44 00 D0 09", the code I quoted appears to start at C2/586E in 1.1.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite