Users browsing this thread: 1 Guest(s)
Turning Runic into Cover

#1
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Next speed-bump... trying to turn Runic into Cover, I am looking to set "battle" as one of the abilities blocked by it, the only problem is that any Command function loads battles settings, meaning Runic blocks itself, and even if I get past the original Runic cast, any action by any of my characters would trigger it.

My first thought was to find the attacker in the RAM data and make it so it only blocks attacks made by enemies, but for some reason I seem to either have the wrong RAM value, or its 0'ed during this part of code because I can't get a good branch off of it.

Main point... I'm looking for something to differentiate "battle" from commands used by my characters.

Any thoughts?
  Find
Quote  

#2
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Can you possibly re-word what you are trying to do in a simpler fashion? I can't seem to understand what the hell any of that means lol! It's just confusing me I've never seen a question like this. You want to create a new skill from Runic called Cover?? Or, is it you want Runic to not block a certain attack, or WHAT?


We are born, live, die and then do the same thing over again.
Quote  

#3
Posts: 2,769
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
he wants to replace runic with cover, basically making a new command altogether, which personally isnt a bad idea 4 Arc in ur hack Wink


"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  

#4
Posts: 708
Threads: 50
Thanks Received: 12
Thanks Given: 0
Joined: Jan 2010
Reputation: 15
Status
None
^ that up there plus:

what he is saying is he is desperately looking for the branch that Runic uses which signifies its actual execution after using the ability. As how when Runic is used, any magic attack (friend and foe alike) would 'execute' the command 'runic' and the ability would be used. He wants to make it so that only the enemies' attack would activate the execution of the ability as opposed to either friend or foe's action.
  Find
Quote  

#5
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Runic is called in the attack sequence, when you choose an action in C2. What I think Edrin wants is turning it into Cover, like in FFIV. Cover block all physical attack if I'm not mistaken. What should be changed is not where Runic is called, but branch to somewhere instead where any potential physical attack from an enemy is blocked, like with the True Knight Relic if any party member is in low HP. The code already exist for that so you would need to remove the low HP condition only. I shall come with some code tonight to support what I'm saying.
  Find
Quote  

#6
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Thanks for the help. I might have a work around, but it will be kinda tedius to implement. Essentially I will have to go back and remove the runic flag manually after the attack is set up for each menu action so they don't trigger it.

I wasn't dead set on having it work just like true knight/love token, but if it ends up working better that way then sure. For starters tho I just need to differentiate my parties attacks from the enemies.

Sorry for no code for direction, I typically only have time to post from my phone on the weekends. But search c2 bank for "runic function" to help give you an idea of some of what I'm looking at.
  Find
Quote  

#7
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I had a look at all this an a big obstacle I see is that the runic function is before the damage calculation. On the other hand, True knight is after the damage calculation. In other words, you would need to block an attack before the damage has been calculated and more important, targeted. Runic determine the Runicker before the attack while true knight need to wait after.

Take a look at the branching in this order. You would with some heavy modifications probably go like 5-2-3-4 instead of 1-2-3-4-5. I can't find an easy solution to this, sorry. Maybe you have a better idea than me of how to handle this situation:

1)
Code:
C2/3225: 20 2B 35     JSR $352B   (Runic function)
2)
Code:
C2/322B: 20 9D 2B     JSR $2B9D   (Damage Calculation)
3)
Code:
C2/3233: 20 92 32     JSR $3292   (Got to #4)
4)
Code:
C2/329B: 20 7E 58     JSR $587E   (targeting function)
5)
Code:
C2/32A8: 20 3B 12     JSR $123B   (True Knight and Love Token)
  Find
Quote  

#8
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
I think what I may end up doing is leaving the Runic function alone for the enemy version and instead write up a new ability to essentially apply the love token effect in reverse, whoever you select you get the love token effect for. There are already mechanics built into the game to accomplish what cover does, so why reinvent the wheel?
  Find
Quote  

#9
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Ok, so I need some help with Runic's targeting? I see the table in the CF bank, but that still doesn't allow me to change runic's target... It seems some abilities have hard-coded targeting but I'm having a heck of a time tracking it down. I don't think it's in the C2 Bank at all unless I am missing something major. If how I'm reading it is right, C2 has more to do with the actual actions as they are performed; while the C1 bank deals with action selection through menus and whatnot as well as sprites and some other stuff... so I would expect to find it in the C1 Bank... but so far all I'm finding is Runic's animation.

All targeting for non-listed abilities appears to happen here:
Code:
Several Commands

C1/7792:    9C412F        STZ $2F41        (Fight jumps here)
C1/7795:    A938        LDA #$38
C1/7797:    48        PHA
C1/7798:    EE6B7B      INC $7B6B
C1/779B:    ADC27B      LDA $7BC2
C1/779E:    8D837A      STA $7A83
C1/77A1:    9C7D7B      STZ $7B7D
C1/77A4:    9C7E7B      STZ $7B7E
C1/77A7:    9C7F7B      STZ $7B7F
C1/77AA:    9CCE7A      STZ $7ACE
C1/77AD:    9CCF7A      STZ $7ACF
C1/77B0:    9CB162      STZ $62B1
C1/77B3:    9CB262      STZ $62B2
C1/77B6:    9CB462      STZ $62B4
C1/77B9:    AD847A      LDA $7A84      (character targeting)
C1/77BC:    3006        BMI $77C4      (branch if random target is set)
C1/77BE:    8536        STA $36        (otherwise save for now)
C1/77C0:    C902        CMP #$02       (is only "one side only" set?)
C1/77C2:    D00D        BNE $77D1      (branch if not)
C1/77C4:    AECA62      LDX $62CA
C1/77C7:    BF6177C1    LDA $C17761,X
C1/77CB:    8D7D7B      STA $7B7D
C1/77CE:    4C0179      JMP $7901

etc...

but I can't find anything, beyond the things affected by the targeting table in the CF bank, that are mentioned here that would differentiate abilities like Runic from abilities like Jump or Steal that allow for targeting. I have tried changing all of Runic's targeting bits to match Steal and Jump, still can't retarget Runic. I get that Runic is designed to only affect the character using it, I just don't see anything in the code that should keep me from moving the cursor after changing the targeting bits.

Once I understand targeting more fully, I think I will be ready to turn Runic to Cover.
  Find
Quote  

#10
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(07-26-2012, 08:07 PM)Edrin Wrote: Ok, so I need some help with Runic's targeting? I see the table in the CF bank, but that still doesn't allow me to change runic's target... It seems some abilities have hard-coded targeting but I'm having a heck of a time tracking it down. I don't think it's in the C2 Bank at all unless I am missing something major. If how I'm reading it is right, C2 has more to do with the actual actions as they are performed; while the C1 bank deals with action selection through menus and whatnot as well as sprites and some other stuff... so I would expect to find it in the C1 Bank... but so far all I'm finding is Runic's animation.

Unless I'm mistaken, the targeting would be in C2. As for C1, it's usually for animations and graphics. I could find this:

Code:
C2/3538: B9 A0 3A     LDA $3AA0,Y
C2/353B: 4A           LSR          (is this a valid target?)
C2/353C: 90 20        BCC $355E    (branch if not)

The ram map I have doesn't specify what is this byte ($3AA0) but maybe it's where the target is store (between the 4 party member and the 6 possible monsters). Targeting is is a bit out of my scope, simply because I never really changed anything related to it. I'll try to check this more deeper tonight.

In the meanwhile, you can check the RAM map I have posted. It's taken from various sources and it's quite reliable when you need to know what is loaded: https://www.ff6hacking.com/forums/showth...p?tid=1408

Another thing you can do is ask help on the Slick Forum in the "Game Modification Station" sub-forum. Lenophis or Assasin could probably come up with a better answer than mine, as they are responsible of many of the comments you see in C1, C2 and C3. Assasin is also a C2 specialist.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite