Users browsing this thread: 1 Guest(s)
Final Requests for Help

#41
Posts: 515
Threads: 46
Thanks Received: 237
Thanks Given: 131
Joined: Feb 2017
Reputation: 23
Status
None
No problem for me. I have redone the Ogre Nix as an exclusive secret weapon for Kappa that does MP critical, and never breaks, so I can change that message to "The Tool broke!"

I'll have to see if I have any freespace in C1. I've shifted several things around, so I may have a hole in there I can slide that into. If not, I'll see if I can put it in another bank.

Thank you so much, by the way!

(05-08-2021, 09:45 AM)Subtraction Wrote: Okay, I have some code to make tools randomly break:

Code:
hirom

org $C1FFE5  ;  freespace
check_command:
CMP #$09
BEQ check_command_end
CMP #$01
BEQ check_command_end
CMP #$08
check_command_end:
RTS

org $C1710F
JSR check_command
NOP
NOP
NOP

org $C21887
JSR check_break
NOP

org $C24DA7
JSR check_command_c2
NOP
NOP
NOP

org $C26469  ;  freespace
check_command_c2:
CMP #$09
BEQ check_command_c2_end
CMP #$01
BEQ check_command_c2_end
CMP #$08
check_command_c2_end:
RTS

check_break:
PHA
PHP
JSR $2B63      ;  Multiply A by 30, size of item data block
REP #$10       ;  Set 16-bit X and Y
TAX
LDA $D85012,X  ;  equipment spell byte.  Bit 7: 1 = remove from inventory upon usage, 0 = nope
BPL no_break   ;  if the flag is not set, this tool never breaks
JSR $4B5A
AND #$1F       ;  1/32 chance of breaking
BNE no_break
LDA #$44       ;  "Orge Nix broke!" dialog. Works for most tools but gets clobbered by the Air Anchor "Move and you're dust!"
STA $3401      
SEP #$10       ;  Set 8-bit X and Y
TYX
LDA #$FF
STA $32F4,X    ;  null item index to add to inventory. This means the item will stay deducted from your inventory.
LDA $3018,X
BRA check_break_end

no_break:
LDA #$10
TSB $B1        ;  set flag to re-add item to inventory at the end of the character's turn
check_break_end:
TSB $3A8C      ;  flag character to have any applicable item in $32F4,X added back to inventory when turn is over.
PLP
PLA
SBC #$A2       ;  carry was clear, so subtract 163
STA $B6        ;  save unique Tool index.  0 = NoiseBlaster, 1 = Bio Blaster, etc.
RTS

Notes:
1. You have to set the "destroy if used" bit on all of the tools you want to have a chance to break.
2. When tools are used, they will temporarily be removed from the inventory, then added back after the character's turn if they didn't break.
3. When a tool breaks, it displays the "Ogre Nix broke!" message. You probably want to edit that message to be more generic or add a new one.
4. If the Air Anchor breaks, the "Move and you're dust!" message clobbers the break message.

Okay, I'm having a heck of a time with this. I've gotten it working on a vanilla rom, but on my final rom, I only have 9 bytes left in the A1 bank, instead of the 12 needed, and changing the JSR to a JSL in C2 is crashing the game for me. Any ideas? If I were to hazard a guess, it would be that bank switching is not possible in the middle of this routine.

One other fun note though. With this code, if Gogo and Edgar both have tools, then any time between when one of them chooses to use the tool and when they finish it, the tool is unavailable to the other. That's actually kind of cool.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#42
Posts: 9
Threads: 3
Thanks Received: 14
Thanks Given: 2
Joined: Apr 2021
Reputation: 0
Status
None
(05-07-2021, 02:51 PM)Lightning Wrote: Yes, I was informed of BNW not having the Genji Glove/Gauntlet by GrayShadows.  I was actually in the exact same boat as PowerPanda. In fact, I was asking around for a long time for a description in the equipment menu in addition to the Relics menu.  I was also using the Y-Button switch to equip/relic menu patch. GrayShadows combination menu does exactly what I want, but the Genji Glove/Gauntlet bug is kind of glaring... I'm hoping he is able to fix it, otherwise I might have to remove it from my hack or hope that someone else isolates the description part of the code - although I would miss the combination equipment/relics menu (once you have it, it's hard to go back).

 It could probably be rigged up to just empty the left hand if it detects there's no Genji Glove flag set anymore, or something like that? Is that the only thing keeping it from being useful? (Same question to PowerPanda, for that matter). I'd be willing to look into that if it would be of help to someone.

Edit: oh, would have to cram a link to the optimize command back into the UI somewhere too, I guess...
  Find
Quote  

#43
Posts: 515
Threads: 46
Thanks Received: 237
Thanks Given: 131
Joined: Feb 2017
Reputation: 23
Status
None
Subraction, I was able to make a 5 byte optimization in one of my previous changes, and fit your code into C1. It's working great!

Anyone who uses it should also make the following change:
Code:
C3/B7F3: 80 15
C3/B7F5 to C3/B809: Free space (fill with FF)

This allows the player to buy multiple of each tool.

You should also change the following bytes to $80 in order to make the tools breakable:
Code:
Noiseblaster: D8/632C
Bio Blaster: D8/634A
Flash: D8/6368
Chain Saw: D8/6386
Debilitator: D8/63A4
Drill: D8/63C2
Air Anchor: D8/63E0 (Not Recommended)
AutoCrossbow: D8/63FE

If you make the Chainsaw breakable, you will want to make sure to account for that in shops. (I find it works best priced at 4000 GP.) I added an unused event bit ($0BB) to when you set the clock in Zozo, and added an additional check in the tool shop in Figaro that says "If Bit $0BB is set, display shop 89 instead". 89 is an unused shop in the base game, and I made it a copy of the post-scenario WoB shop, but added the Chainsaw. I then made it so that the Chainsaw appears automatically when you get to the WoR. Finding it in Zozo simply allows you to get it early.
 

(05-09-2021, 08:13 PM)SirNewtonFig Wrote:  It could probably be rigged up to just empty the left hand if it detects there's no Genji Glove flag set anymore, or something like that? Is that the only thing keeping it from being useful? (Same question to PowerPanda, for that matter). I'd be willing to look into that if it would be of help to someone.

Edit: oh, would have to cram a link to the optimize command back into the UI somewhere too, I guess...

Thanks, but I don't need the relics and the equipment on the same menu. If you want to take a stab at just putting the description box in though, you'd be more than welcome to! I'm about a week away from releasing v0.99, which is the "finished-unless-I-find-bugs" version, but I'd be happy to include a change like that in v1.0!


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  
[-] The following 1 user says Thank You to PowerPanda for this post:
  • Gi Nattak (06-06-2021)

#44
Posts: 277
Threads: 19
Thanks Received: 13
Thanks Given: 48
Joined: Dec 2017
Reputation: 2
Status
None
(05-08-2021, 10:56 AM)PowerPanda Wrote: Thanks, but I don't need the relics and the equipment on the same menu. If you want to take a stab at just putting the description box in though, you'd be more than welcome to! I'm about a week away from releasing v0.99, which is the "finished-unless-I-find-bugs" version, but I'd be happy to include a change like that in v1.0!


I might be interested in this as well if GrayShadows is not able to fix the issue with Genji Glove/Gauntlet. I would be willing to go back to two separate menus if it meant I could have equipment descriptions while keeping the optimize feature with the bugs fixed! I mean, the combined menu is awesome, but the bugs combined with the loss of the optimized function makes it difficult for me to consider including it in my own hack.
  Find
Quote  

#45
Posts: 79
Threads: 12
Thanks Received: 6
Thanks Given: 21
Joined: Jun 2018
Reputation: 0
Status
None
Have you considered making tool breaks a temporary in-battle effect?
  Find
Quote  

#46
Posts: 515
Threads: 46
Thanks Received: 237
Thanks Given: 131
Joined: Feb 2017
Reputation: 23
Status
None
(05-10-2021, 01:36 AM)MysticLord Wrote: Have you considered making tool breaks a temporary in-battle effect?

Not really, no. I'm happy with the way it is. 1 in 32 is not actually that high. It still makes Tools WAY better than Throw. As long as you're mixing up Edgar's moves between Attack and Tools, it shouldn't happen very often. Plus, you can just buy extra tools if you're headed into a long dungeon, since I removed the 1-tool limit. In his scenario, there are a couple of merchants along the way that will sell you tools if you need them.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#47
Posts: 79
Threads: 12
Thanks Received: 6
Thanks Given: 21
Joined: Jun 2018
Reputation: 0
Status
None
Who was it who wanted to make Tools into FF5 Mix, only mixing mechanical parts?
  Find
Quote  

#48
Posts: 515
Threads: 46
Thanks Received: 237
Thanks Given: 131
Joined: Feb 2017
Reputation: 23
Status
None
I don't know. My biggest unimplemented idea (which WON'T be implemented) was M.Sword; a menu that allowed a physical-based character to add elemental attributes to their attack.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  

#49
Posts: 48
Threads: 5
Thanks Received: 64
Thanks Given: 3
Joined: Apr 2018
Reputation: 6
Status
Shell
(05-08-2021, 10:56 AM)PowerPanda Wrote: Okay, I'm having a heck of a time with this. I've gotten it working on a vanilla rom, but on my final rom, I only have 9 bytes left in the A1 bank, instead of the 12 needed, and changing the JSR to a JSL in C2 is crashing the game for me. Any ideas? If I were to hazard a guess, it would be that bank switching is not possible in the middle of this routine.

I didn't see this until you'd already fixed it by freeing up some space in C1, but if you want that space back, make this the only change in C1:

Code:
org $C1710F
JSL check_command_long
NOP
NOP

Then somewhere in C2 freespace, add this:
Code:
check_command_long:
JSR check_command_c2
RTL
  Find
Quote  

#50
Posts: 515
Threads: 46
Thanks Received: 237
Thanks Given: 131
Joined: Feb 2017
Reputation: 23
Status
None
(05-11-2021, 08:08 AM)Subtraction Wrote:
(05-08-2021, 10:56 AM)PowerPanda Wrote: Okay, I'm having a heck of a time with this. I've gotten it working on a vanilla rom, but on my final rom, I only have 9 bytes left in the A1 bank, instead of the 12 needed, and changing the JSR to a JSL in C2 is crashing the game for me. Any ideas? If I were to hazard a guess, it would be that bank switching is not possible in the middle of this routine.

I didn't see this until you'd already fixed it by freeing up some space in C1, but if you want that space back, make this the only change in C1:

Code:
org $C1710F
JSL check_command_long
NOP
NOP

Then somewhere in C2 freespace, add this:
Code:
check_command_long:
JSR check_command_c2
RTL

Out of curiosity, and for posterity, how is that different than just writing:
Code:
org $C1710F
JSL check_command_c2
NOP
NOP
The code above is what I tried, and it was crashing consistently. I'm glad to have it working now, and the code that I optimized is better for it. It was the aforementioned "Frankenstein's Monster" code to turn Kappa into a human when she gets the Imp status. I had a JSR and 2 JMPs to try to sandwich it all into previous nops I had added into C1, and I was able to remove the JSR, freeing up an entire subroutine's worth of space. (Only 5 bytes, but every byte counts in C1.)


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite