Users browsing this thread: 1 Guest(s)
Excluding Weapons from Use With Genji Glove

#31
Posts: 453
Threads: 45
Thanks Received: 195
Thanks Given: 116
Joined: Feb 2017
Reputation: 23
Status
None
Thank you! Even knowing it was C1 was further than I had gotten before. I can see that the relevant space starts at C1/4B73. I'll dig into this!


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  

#32
Posts: 292
Threads: 22
Thanks Received: 117
Thanks Given: 117
Joined: Dec 2018
Reputation: 18
Status
Moog
Don't know if this helps, but NovaliaSpirit's C1 disassembly has the following note (which Assassin's did not).

Code:
Equipping a character mid-battle (or something to do with it)
C1/8D98:    AD027B      LDA $7B02        (from C1/5529, X = C)
C1/8D9B:    F006        BEQ $8DA3
C1/8D9D:    AD007B      LDA $7B00
C1/8DA0:    8DB57B      STA $7BB5
C1/8DA3:    9CE388      STZ $88E3
C1/8DA6:    ADCB7B      LDA $7BCB
C1/8DA9:    F006        BEQ $8DB1
C1/8DAB:    A913        LDA #$13
C1/8DAD:    8DC27B      STA $7BC2
C1/8DB0:    60          RTS
That's just a snippet, the code goes on like that until C1/9103 (which appears to be the last RTS for that command). I don't know how helpful this will be, but if what you're looking for isn't at 4B73 perhaps it might be here.

Wish I could be more help.
  Find
Quote  

#33
Posts: 453
Threads: 45
Thanks Received: 195
Thanks Given: 116
Joined: Feb 2017
Reputation: 23
Status
None
Progress has been made on this today, for the first time in years! The problem has always been that I can restrict Genji Glove usage from the menu, but not from re-equipping in battle. This isn't TOO big of an issue, as hardly anyone re-equips in battle, but since it could be used to place 2 weapons that were not Genji Glove compatible on someone, it invalidated the rest of the hack. I am still hoping to find a way to restrict useage, but for now I have programmed in a "way out". You simply can't use the Genji Glove if you are re-equipping during battle. You can switch the 2nd weapon to a shield, but not to another weapon.

After that, I implemented the "Piercing Damage" and "2x Jump Damage". Piercing damage, being an entirely new concept, required $0F bytes of free space. The 2x Jump Damage unfortunately needed to be done without subroutines (lots of internal branching), and the code was 2 bytes too long to put it in its normal place. (It is $0E bytes long, and the 2 in-line places I could have put it were $0C and $0E bytes.) I may circle back to this and see if I can relocate a different part of the jump damage routine in order to do everything in line, but for now, it is taking up more free space.

There are a crap-load of conflicts with the code I already have and CV Reynold's Bugfix patch (considering I rewrote the entire Optimize Routine), so I will need to figure out what to do about that. I also need to retrofit Gray Shadow's code to make Shock respond to the Runic flag, and figure out what to do about Brushless Sketch. I'm kind of leaning towards skipping that, as it relocates a TON of code in C2 and will cause conflicts with almost any patch it is applied to.


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  
[-] The following 2 users say Thank You to PowerPanda for this post:
  • C-Dude (04-02-2021), madsiur (04-02-2021)

#34
Posts: 292
Threads: 22
Thanks Received: 117
Thanks Given: 117
Joined: Dec 2018
Reputation: 18
Status
Moog
It is too bad that the C.V Bugfix compilation doesn't come with a batch file and .asm library; that would make it easier to not only figure out where conflicts occur, but to relocate code as necessary. I'll plan a bit of code based off the vanilla diassemblies, only to go into the hex and see that the code has been shifted by the bugfix compilation.

So in fewer words, I understand your pain.

There's a lot of unused space in the C4 bank, if you're hurting for room in C2. The trick is finding the custom code that can safely be JSL'd or JML'd, as opposed to the stuff that absolutely HAS to be in C2 for subroutines.

I can tell you that the C2 natural magic learning lifts out to another bank fairly easily. Oh... but you're using MMMMMagic... I'm not so sure about that one.

Simply blocking the Genji equip effects in battle is a brilliant solution to the problem, though; it may not be what you envisioned but it at least lets you keep the player from breaking the game with it.
  Find
Quote  

#35
Posts: 453
Threads: 45
Thanks Received: 195
Thanks Given: 116
Joined: Feb 2017
Reputation: 23
Status
None
Okay, I've got a release. I'm going to close this thread, which was a question thread, and post it over in the Patches, Bugfixes, and Tweaks forum.

I have decided to release the "Dual Wield Restriction" as a standalone patch, without incorporating any of the other equipment bits. This allowed me to ensure compatibility.


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  

#36
Posts: 180
Threads: 1
Thanks Received: 68
Thanks Given: 20
Joined: Oct 2015
Reputation: 18
Status
None
another key function is C1/89D5.  my comments are a little off, in that they should parallel C1/4B73's more.  that is, $7B39 and $7B3A are not the current hand, but the candidate gear from the Item list.

inserting checks right after C1/89EC and C1/4B8D to see if the candidate gear and the other hand's gear both possess your new 2-hand flag and if not, jumping to C1/89FD or C1/4B9E, respectively, should work in theory.  now, i don't see where Bank C1 ever loads the $D850NN item data.  so i'm seeing a couple options:

1) use the loaded Item ID, multiply by 30 (e.g. via C1/18CA; or maybe 4 ASLs, a SEC + subtract, then another ASL, but that might not even be any faster, given the need to enter and exit 8-bit Accumulator mode.), and read your flag from ROM Item data.  it won't be fast code, and could be prohibitive in C1/4B73, which lights/grays multiple items every time you scroll.  in contrast, i don't see it being an issue for C1/89D5, which i think is just called in response to manual cursor selections.

2) expand Function C2/54DC to read your custom flag from ROM Item data, and store its result in a variable that IS regularly loaded in Bank C1.  i'm thinking that the top 4 bits of $2E76 or perhaps the bottom 3 bits of $2E73 are free.  those are or would be read in the relevant Bank C1 functions via:

a. C1/4B73 (Candidate Item and Current Hand):
$2E73: $2D and $890E
$2E76: $268A,Y and ($2B8A,char_index or $2B9E,char_index [where char_index = $62CA * 5], based on an unknown hand selector)

b. C1/89D5 (Candidate Item and Current Hand):
$2E73: $7B3A and $7B3C
$2E76: $268A,X and ($2B8A,Y or $2B9E,Y .  depending on how the function is reached, the hand selector is $7B00 , or LDA $894B,Old_Y , where Old_Y probably equals Var $62CA .)

the $2E76 route looks uglier, but i'm actually more confident in it having free bits than $2E73, and things shouldn't be that hard once we nail down the hand selector.

-----

what were the limitations you were running into after investigating C1/4B73 several weeks ago?
Quote  

#37
Posts: 453
Threads: 45
Thanks Received: 195
Thanks Given: 116
Joined: Feb 2017
Reputation: 23
Status
None
(04-08-2021, 07:52 AM)assassin Wrote: what were the limitations you were running into after investigating C1/4B73 several weeks ago?

As someone who does not actually know how to code, all of my hacks thus far have been finding a piece of code that does something parallel to what I want to do, and then finding a way to repurpose it and insert it where I need it. That is why, on my thread about making Kappa ignore the imp spec flag, I had originally done a character check the only way I knew how... by copying over the check to see if the battle should be ended with the "Banon Fell..." message. 

With this code, I could tell by reading through your commented disassembly that the check on the weapons was only surface-level. It only checked to see what type of item it was, weapon or shield, and didn't get down to checking the properties flag. This is because Gauntlet doesn't actually restrict your ability to equip a weapon; you can equip anything you want, but you might not get the benefit of the Gauntlet. So when I saw that, and I couldn't find any similar code to check the properties within the in-battle item menu, I knew that I had hit a wall that I would not be able to scale. If you are able to, then I will happily test and use your code. I'll even use xkas rather than entering it by hand!   Laugh

The patch, with my code, can be found here: https://www.ff6hacking.com/forums/thread-4092.html


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite