Users browsing this thread: 1 Guest(s)
Random Offering

#1
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Author: madsiur
Version: 1.2
Release: 04/28/2016
Apply to a FF3us 1.0 ROM
Download


Files
randomofferingC2.asm: For implementation in bank $C2
randomofferingEE.asm: For implementation in bank $EE or any other bank

Apply with xkas 0.06
Command example: xkas randomofferingEE.asm romname.smc


This is one of my first ASM modification that was implemented in RotDS redone now in an ASM file for greater customization. It allows the offering to strike between 1 and 4 times, each with 25% chance with default setting. To edit the chances of striking modify the three CMP values. The following setting as an example would allow 12.5% of 1 hit, 50% of 2 hits, 12.5% of 3 hits and the rest (25%) for 4 hits:

Code:
CMP #$20        ;12.5% will have branched at that point (32/256 = 12.5%)
BCC exit
CMP #$A0        ;62.5% will have branched at that point (0xA0 - 0x20 = 0x80 = 128/256 = 50%)
BCC twoExtra
CMP #$C0        ;75% will have branched at that point (0xC0 - 0xA0 = 0x20 = 32/256 = 12.5%)

For further customization, one or many extra CMP and branche(s) could allow a chance of 10 or 12 hits (5 or 6 without Genji Glove). Note that because how the code is structured, the number of hits in vanilla game is either 2 or 8 and one hand is not taken into account if no Genji Glove (thus 1 or 4 hits depending on offering). Because of that with both Offering and Genji Glove equipped, you will always strike 2, 4, 6 or 8 times.

Finally I added the option to remove the half damage property of Offering. Just comment and/or uncomment bottom code to enable or disable this option.

Edit: I use offset EE/AF01 for a lot of my ASM tweak. It is your responsability to change the org offset in order to relocate the code and manage properly your free space.  

Edit2: On a side note it happened twice during my testing that Terra (party leader with offering) would take the attack stance after selecting the Fight command but she would lose a turn, meaning she would not attack and keep the attack stance pose until I select the Fight command again and then she would attack normally. I wonder if that's a known bug or if I accidentally created that possibility but I'm not sure how I could have done that.

Edit3: Bug fixed (I think) and version 1.1 released.      

asm file:
Code:
hirom            ;do no touch
;header            ;comment out if you have a header

org $C21622
JSL random
BRA branch1629

org $C21629
branch1629:

org $EEAF01        ;Free space (note: I put all my other tweaks here as well.
;                                   It's up to you to manage your space.)
random:
STA $3A70
BCC exit
PHX
INC $BE
LDX $BE
LDA $C0FD00,X    ;random number
PLX
CMP #$40        ;25% will have branched at that point
BCC exit
CMP #$80        ;50% will have branched at that point
BCC twoExtra
CMP #$C0        ;75% will have branched at that point
BCC fourExtra
INC $3A70        ;6 extra strikes
INC $3A70
fourExtra:
INC $3A70        ;4 extra strikes
INC $3A70
twoExtra:
INC $3A70        ;2 extra strikes
INC $3A70
exit:
RTL


;Uncomment next 4 lines for potential full damage of each strike
;org $C22C06
;BRA branch
;org $C22C0B
;branch:

;Uncomment here (and comment above) to put back half-damage of each strike
;org $C22C06
;BCC branch2C0B    ;(Check for offering)
;LSR $11B0        ;(Halves damage)
;org $C22C0B
;branch2C0B:
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Robo Jesus (12-24-2017)

#2
Posts: 281
Threads: 18
Thanks Received: 13
Thanks Given: 8
Joined: Mar 2014
Reputation: 8
Status
None
Cool. The Offering could use some tweaking for sure, it's very overpowered. I might incorporate this into my own project.
  Find
Quote  

#3
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
If you disable half-damage modification for offering, I think it compensate for the randomness (having a moderated chance of 1 or 2 hits). Still you can play with odds which allow a nice balance in the end.

Edit: On a side note it happened twice during my testing that Terra (party leader with offering) would take the attack stance after selecting the Fight command but she would lose a turn, meaning she would not attack and keep the attack stance pose until I select the Fight command again and then she would attack normally. I wonder if that's a known bug or if I accidentally created that possibility but I'm not sure how I could have done that.

Edit2: Bug seems to be fixed.
  Find
Quote  

#4
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I released an updated version (1.1) with the bug mentioned previously fixed. (probably >.>)
  Find
Quote  

#5
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
This patch has been updated to version 1.2. Basically I've done a default bank implementation ($C2 here) and a $EE (or other bank) implementation. I've also updated the readme and added more explanations.

The following patches (and threads) have also been updated to 1.1 for one or all reasons mentioned above:

Equipment Check Event Command
Cursed Tweak
Random Battle and Boss Themes
  Find
Quote  

#6
Posts: 169
Threads: 19
Thanks Received: 2
Thanks Given: 15
Joined: Jul 2015
Reputation: 2
Status
None
(04-24-2016, 10:44 AM)Madsiur Wrote: If you disable half-damage modification for offering, I think it compensate for the randomness (having a moderated chance of 1 or 2 hits).

Can you elaborate on what this means? So vanilla Offering does half-damage with each hit, and by disabling that property as well making it limited to 1 or 2 hits, you can make it more balanced?

Just trying to understand what would be an ideal setting for this tweak. I'm much interested in this, I was going to exclude Offering from my personal rom but this has potential to make it something that resembles fair.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite