Users browsing this thread: 1 Guest(s)
Request: No items lost at Colosseum

#11
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(09-25-2018, 04:42 PM)Lightning Wrote: Can Madsiur's patch be tweaked to only prevent item loss when the player loses a match?  If you win, your current item should still be traded for the new one.

You'd have to remove the item bet when you add the new item to inventory. This is done at $C25D79. I don't have time to do this now unfortunately.

Edit: I've tried putting the $C2499E code at $C25D79 but changes are not reflected in inventory window afterward. I'm not really sure what the problem is..

Edit2: Well I got it working! You'll need to change that org $C26469 to a spot where you have enough free bytes since a previous hack was using that space iirc.

Code:
hirom

org $C25D79
   jsr free_space
   nop
   nop

org $C2499E
   bra jump

org $C249C4
jump:

org $C26469
free_space:
   tdc
   lda $0205
   rep #$10
   phx
   ldx #$0000
loop:
   cmp $2686,X
   beq found
   inx
   inx
   inx
   inx
   inx
   cpx #$0500
   bne loop
found:
   dec $2689,X
   lda $2689,X
   bne exit
   lda #$FF
   sta $2686,X
exit:
   plx
   sep #$10
   lda #$01
   sta $2E75
   rts
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Lightning (09-26-2018)

#12
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
So far so good! Now we just have to hope as I continue my play-through on real hardware that all these hacks we've created don't collectively blow up my hardware. Lol.
  Find
Quote  

#13
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I forgot the case of the reward being the same as item bet with a quantity of 1 (and battle won). The above code would remove 1 then null the item, and when later 1 would be added to item it would still be null so it wouldn't display in the inventory. I have 2 untested solutions for this:

1) I added a check, if item waged is same as item won, nothing happen, including no Colosseum message:
Code:
hirom

org $C25D79
   lda $0207
   cmp $0205
   beq skip
   jsr free_space

org $C25D8F
skip:

org $C2499E
   bra jump

org $C249C4
jump:

org $C26469
free_space:
   tdc
   lda $0205
   rep #$10
   phx
   ldx #$0000
loop:
   cmp $2686,X
   beq found
   inx
   inx
   inx
   inx
   inx
   cpx #$0500
   bne loop
found:
   dec $2689,X
   lda $2689,X
   bne exit
   lda #$FF
   sta $2686,X
exit:
   plx
   sep #$10
   lda #$01
   sta $2E75
   lda $0207
   sta $2F35
   rts

2) I added a check when the quantity is added, if it's 1 then I put the item as not null, since previous quantity was 0 and item had being nulled out. This solution keep the Colosseum message:
Code:
hirom

org $C25D79
   jsr free_space
   nop
   nop

org $C25D8F
skip:

org $C2499E
   bra jump

org $C249C4
jump:

org $C26469
free_space:
   tdc
   lda $0205
   rep #$10
   phx
   ldx #$0000
loop:
   cmp $2686,X
   beq found
   inx
   inx
   inx
   inx
   inx
   cpx #$0500
   bne loop
found:
   dec $2689,X
   lda $2689,X
   bne exit
   lda #$FF
   sta $2686,X
exit:
   plx
   sep #$10
   lda #$01
   sta $2E75
   rts
  
org $C14491
   jsr free_C1
  
org $C1FFE5
free_C1:
   sta $2689,X
   cmp #$01
   bne exit2
   lda $602D,Y
   sta 2686,X
exit2:
   rts
  Find
Quote  

#14
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
I wanted to test out the fixes in your last post, but I was unable to replicate the bug you mentioned! I modified my mod so that betting 1 Assassin would win you another Assassin, but it seemed to work as it was supposed to (I made sure I only had 1 Assassin knife in my inventory). Losing the battle would leave me with 1, as would winning the battle. Maybe the True Duel patch is preventing the bug from happening on my end?
  Find
Quote  

#15
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(09-26-2018, 09:12 PM)Lightning Wrote: I wanted to test out the fixes in your last post, but I was unable to replicate the bug you mentioned!

It's just something that popped into my mind afterward while thinking about the code.. Maybe there is no bug then. Carry on!
  Find
Quote  

#16
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
(09-26-2018, 09:13 PM)madsiur Wrote:
(09-26-2018, 09:12 PM)Lightning Wrote: I wanted to test out the fixes in your last post, but I was unable to replicate the bug you mentioned!

It's just something that popped into my mind afterward while thinking about the code.. Maybe there is no bug then. Carry on!

Haha, no problem.  I can understand your logic behind thinking there would be a bug.  I will keep testing and let you know if I stumble across something.  I think the only time betting an item wins you the same item in my mod is the sword that recruits Leo, and I didn't see any problems with that!
  Find
Quote  

#17
Posts: 96
Threads: 3
Thanks Received: 2
Thanks Given: 3
Joined: Dec 2011
Reputation: 1
Status
None
It would be awesome to have a complete rewrite of the coliseum.
Personally, I'd rather have a system where you get to choose which opponent to face and then get charged an entry fee.
I've never liked the idea of betting items and not knowing ahead of time what opponent is triggered.
  Find
Quote  

#18
Posts: 82
Threads: 5
Thanks Received: 1
Thanks Given: 2
Joined: Jun 2014
Reputation: 2
Status
Medicated
(09-30-2018, 10:33 PM)Vanya Wrote: It would be awesome to have a complete rewrite of the coliseum.
Personally, I'd rather have a system where you get to choose which opponent to face and then get charged an entry fee.
I've never liked the idea of betting items and not knowing ahead of time what opponent is triggered.

That's a completely different Colosseum style but I like it too.
Having random bosses sitting in their cages waiting to be released and killed for a prize.

But the way FF6 uses it, it basically asks you to save before you try and when you fail, you go through the process of a soft (or hard) reset and trying again immediately or later. Having a 'don't lose items when you fail' gets around  that.
But not if you win and replace the item.

I think some items have this quality to them... it might be associated with instant death or retreat? I'm not sure. You generally don't lose an item when you get [Sneeze]'d by Chupon but I've noticed this with some other battles I've lost.
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite