Users browsing this thread: 1 Guest(s)
More Commands in Battle

#1
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
I've been reading through the Hacking Discussion pages, looking for ideas to play with things to try etc. In an attempt not to go around mass necro posting,

Adding more commands

The biggest thing that jumps out at me here is "there's only enough space for four commands". Yes, each character has four commands stored for them, but in battle you actually have SIX commands. The four slots as well as Defend and Row. Which brings us to this post.

Battle Command Pointers

By moving one of the basic commands that all party members have (such as Fight, Item, or Magic) over to the location in the menu where Row or Def is at, you free up one or more of the four character slots effectively giving each character a greater variety of command options. It would get kinda bothersome to have to hit left or right every time you want to attack, so a lesser used command such as Item would make more sense to put on the side of the menu.

I attempted this before and never made it work. First I tried to rewrite the Row command function to act as Item, fail. Second, I tried to direct the Row command in the battle menu to the Item function, partial success then crash. Its been awhile since I've studied this but I'm thinking I still need to go earlier in the process to where "Row" is actually placed in the battle menu (as Edrin had suggested).

The moral of the story is, has anybody ever gotten this to work? As I said, I haven't studied the dis-assemblies in awhile and don't remember if the battle menu was ever mapped out or not, my papers might be outdated as well... Would appreciate any advice on the issue.

On a side note, something mentioned in the "Adding more Commands" post, in regards to swapping commands, there are relics that swap commands such as Mug and GP Rain. If you could add those traits to something that could be equipped in battle such as a shield or weapon, would the command update mid battle? I.E. equip a Thief Knife to change Steal to Mug, or say a Runic Sword that changes Fight to Runic sort of like Dragoon Boots?

It works! Well, it works enough to ask questions, "IT" being the idea of replacing Row with Item. For starters:
Code:
C1/7C07:    A5 05            LDA $05
C1/7C09:    29 0F            AND #$0F
C1/7C0B:    C9 02            CMP #$02
C1/7C0D:    D0 08            BNE $7C17
C1/7C0F:    E6 94            INC $94
C1/7C11:    20 A9 7C        JSR $7CA9
C1/7C14:    4C 31 56        JMP $5631        (Jump to Row Command)

Changing the last line (C1/7C14) to 4C 69 57 makes it go to Item Command instead of Row Command (This being just for "window" mode, for "short" mode it seams you have to make the same change at C1/7B97). Now, at this point the item menu will open when you hit the left arrow (where Row was) allowing you to change equipment in hand, select an item, as well as select a target, however, as soon as the character attempts to use the item, the game will crash. Its obvious that something is either being done that shouldn't be, or not being done that should be (course its obvious, what other options are there?). I was leaning toward a problem with targeting...

Then I remembered that MasterZed had made a patch that changed Row into a menu with all commands from the game. Test Patch

In his patch, everything worked, including items (of course it did, look who made it). So I proceeded to go through the changes trying to find out where he cut into the normal line in order to pull up the menu. From what I saw it was the same place that I posted above, so I kept looking, then I came across this part:
Code:
C1/7CA9:    20566D      JSR $6D56
C1/7CAC:    A9FF        LDA #$FF
C1/7CAE:    8D857A      STA $7A85
C1/7CB1:    99AF2B      STA $2BAF,Y
C1/7CB4:    99B02B      STA $2BB0,Y
C1/7CB7:    99B32B      STA $2BB3,Y
C1/7CBA:    7B          TDC
C1/7CBB:    99B12B      STA $2BB1,Y
C1/7CBE:    99B22B      STA $2BB2,Y
C1/7CC1:    99B42B      STA $2BB4,Y
C1/7CC4:    99B52B      STA $2BB5,Y
C1/7CC7:    60          RTS
Changed to this:
Code:
C1/7CAC:    A902        LDA #$02
With that, the game doesn't crash, and an item is used. The problem? For starters WTF does that have to do with anything, and why does changing just the number fix anything? The real question is, what will that possibly screw up by putting something in 02 instead of FF (or would that actually be putting 02 somewhere instead of FF?). As is, I'm not even sure where to start testing to see what that last change screwed up. That being said, if you use anything other than a normal item (a piece of equipment or such) you get a seamingly random spell/attack (IE a poison rod summoning shiva). So yes, more work to be done indead, BUT knowing what C1/7CAC does would be a start.
*Edit* If line C1/7CAC is changed to "A9 01" all items I used functioned normally. Still no clue as to why though.

On another note, in regards to the OP to answer my own question, equiping or de-equipping an item that changes battle commands such as FIGHT in battle (by setting it as a shield) does not update commands mid battle.
Equiping Dragoon Boots as a shield out of battle does do it though, which would still leave the possibility of a Runic Sword or some such item...
*update* On this last part here, regarding changing commands mid-battle with equipable items, while researching the other part I did some reading regarding player menus updating after dmg, spells, etc to accont for being disabled by mute, imp, etc. Forcing a menu update might allow for this to work mid battle. Havent tried it though.
  Find
Quote  
[-] The following 2 users say Thank You to Catone for this post:
  • cdizzle (01-14-2015), SSJ Rick (01-15-2015)

#2
Posts: 35
Threads: 4
Thanks Received: 0
Thanks Given: 2
Joined: Mar 2013
Reputation: 0
Status
None
This is a pretty amazing fix, and looks exactly what I wanted!

There is one minor detail I was wondering about. Instead of changing Row, can I change Def to Item? When I play, I use Row far, FAR more than Def. I use Row almost everytime I am back attacked, but I'm not sure I've even ever used Def.
  Find
Quote  

#3
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
C1/7BA3 in the disassembly is the line for Def in Short Mode and C1/7C20 for Def in Window Mode, telling that to jump to the Item Command will make it open in place of Def, HOWEVER, when I tried it, while it did not crash it was acting the same as when I had 02 at C1/7CAC (items doing oddball attacks instead of their own).

*EDIT* Nevermind that last part, I'm an idiot I never changed C1/7CAC to "01" on the rom I was playing with at work. SO in short, you should be able to follow original instructions regarding C1/7CAC and just change the jumps at C1/7BA3 and /7C20 to repoint Def instead of Row.

Whole thing still needs testing to make sure changing A9FF to A901 doesnt break anything though.

Thinking about it though, I like your idea of replacing Def better.


The only true wisdom is knowing you know nothing.
  Find
Quote  

#4
Posts: 2,769
Threads: 88
Thanks Received: 24
Thanks Given: 88
Joined: Jun 2009
Reputation: 25
Status
None
very interesting


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#5
Posts: 826
Threads: 11
Thanks Received: 22
Thanks Given: 13
Joined: Nov 2011
Reputation: 16
Status
Double
I have to say, it's kinda funny how you say that a lesser used command like Item should be moved instead of Fight. I probably use Fight far less (outside of BNW) than Item because of how inherently worthless Fight tends to be in this game. To be fair though, this would probably cause some issues with Gau, however.


Confused Moogles FTW
Quote  

#6
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
When I say less used what I had in mind was mindless, fight spam grinding that I personally tend to do alot of. Add that to my hoarding, frugal urges to use magic over items that cost money when able...

The idea of putting fight on the side does produce some more questions however.
First, it would throw off Gau, as you said, and also Gogo. The question though is what would happen at the times when fight is replaced with Magitek or blocked entirely. Also would that change at 7CAC effect fight in the same manner or would any change at all be needed there, and would it work with Magitek (assuming it would make the change being redirected like this, my guess would be no but I dont know where that change/check is run compaired to this change).

Welp, now I know what I'm gonna play with next, just for the sake of wondering.


The only true wisdom is knowing you know nothing.
  Find
Quote  

#7
Posts: 175
Threads: 11
Thanks Received: 10
Thanks Given: 8
Joined: May 2013
Reputation: 13
Status
Well-Fed
Quote:The question though is what would happen at the times when fight is replaced with Magitek or blocked entirely.

Simply put, it wouldn't work -- the code loops through the character's four main menu commands. I mean, you could write different code easily enough, and you could probably adapt the same exceptions already used to work with this new code, but it would require that extra step of effort.

One thing worth considering is, rather than overwriting Row or Def, expanding one of the windows for an extra command -- the test patch, after all, expands the window to include four rows, so it's absolutely doable. The trick is that it has to be the same command for all characters, since the side-menus are pulled from a different part of the code. This does mean, however, that it's theoretically possible to hack Fight, Magic, and Item all into one of the side menus, leaving all four menu slots available for custom commands for each character.


Current Project: FF6: Tensei | Discord ID: TristanGrayse
  Find
Quote  

#8
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
I've looked at hex way to much today, starting to see hex code on the walls...
Anyway, I went back and played with the Test Patch again. It opens a different window depending on which slot you go to the side from, so there'd almost have to be four seperate, window pulling commands. I think (and I stress THINK) its drawing... say a magic window, then populating it with whatever commands based on where you opened it from. Seems like having four seperate windows would take up to much space for a normal game. That being said, if you could find where/what is called to draw the main character command window (position,4 slot size, everything) then instead of loading the individual character commands into it, load as you said, Fight Magic Item and Row into it. You'd save space by not actually coding a NEW window or curser positions, the normal checks for Magitek, X-Magic, Jump, disable, Etc should still work. Depending on your needs you might need to add a check for Gau or Gogo to disable some or all of it.
I poked around a bit but I didn't find where the main battle command window is called/filled, might have looked right at it and just not actually SEEN it though. After finding that, shouldn't be to much of a task to slap a little extra code in to fill it as needed. Then you'd have your four custom character slots plus another menu that would pop up over it with the default commands.
I could be wrong, and by all means I be happy for someone to fill that idea full of legitimate holes (give me a good reason to not try it! please!). If not, hrm... could be interesting.

*Update* Okay, this one has me stumped for now. I was playing with the idea to edit an under used command like possess to draw a menu containing three or four static commands, including the checks to disable or modify them. Rename the skill to some like "Next Page" and assign it to a character iust like any other skill or replace Def with it. The result would be three variable commands per character then the shared stuff. The more I study on it, not sure if its a practical idea and just kinda not overly fond of it (nor drunk enough to code it)... there is another option though as you said the Test patch adds four rows, then it puts a new menu in each row. To do it in C1 without drawing a new menu in C2 you could make the changes that make each instance of Row or Def (based on what slot you were in when you pushed to the side) jump to a different command. I know it dont take alot of space but the areas those changes are made in are pretty well uncommented that Ive seen which leaves it to trial and error, at least at my skill level (in this case lack there of).

Wow that one got really long and twisted quick, how my train of thought doest derail more often I'll never know.


The only true wisdom is knowing you know nothing.
  Find
Quote  

#9
Posts: 96
Threads: 3
Thanks Received: 2
Thanks Given: 3
Joined: Dec 2011
Reputation: 1
Status
None
This is giving me some cool ideas.
Thinking about it what I think would be ideal for my personal use would be to have these modifications:
-Row sub-menu would contain Fight, Defend, Row, and Items.
-The cursor should be changed to start on the row sub-menu by default.
-Main menu contains each character's predetermined commands.
-Command swapping relics should add their commands to the main menu instead of swapping them out.

There are a bunch more things that could be really cool to do, but just this would make the game much more fun especially if combined with other patches like Imbued Magic.
I should like to mention that I don't feel particularly concerned for Gau with this set up because his core commands wouldn't go anywhere.
On the other hand, I do wonder if this might mess with Gogo's command selection.
I know for a fact that if you add commands to the other characters in FF3ME or via game genie code all the commands that are appear in every character's command list becomes available for Gogo to use.
Well, temp characters like Leo, Banon and the Ghosts don't count.
So I've always assumed that those commands get added to Gogo's list as part of the event commands that add character's to your party.
Thus, I'm thinking that commands added by equipping a relic probably wouldn't show up on his list.
Of course, this is all theoretical at this point and I'd have to test my theory out with some save state hacking.
  Find
Quote  

#10
Posts: 676
Threads: 44
Thanks Received: 26
Thanks Given: 21
Joined: Jan 2015
Reputation: 11
Status
Zombie
According to what I've seen in the event log, Gogo's command list is added with the bit that checks you've obtained that character (in other words your first conclusion).

As the sub menu, I sure couldn't pull it off at this time.
As for starting with the cursor in the sub menu, I think I pulled that off by mistake once or twice so it should be possible.
As for command relics, I'm not sure that would be practical to accomplish since it only replaces a command on a character by character basis. At this point the characters wouldnt have skills like Fight or Magic in their own list so... the best I'd hope for is making the items replace other character specific skills (like mug and gp rain).

I definatly will not say not possible, but I personally didnt find great documentaion regarding battle windows.


The only true wisdom is knowing you know nothing.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite