Author Topic: Accessory Question  (Read 6300 times)

tylerkschrute

  • *
  • Posts: 39
    • View Profile
Accessory Question
« on: 2011-11-05 22:02:55 »
So, I recently got into the whole FFVII modding phenomenon and have been having lots of fun changing things around, particularly using black chocobo and wall market. However, there is one thing I wish to do that I can't seem to figure out. For the accessories protect ring and sprint shoes, the "auto" statuses they grant are in fact not auto at all; they run out after a certain amount of time as if you had simply cast the raw spell itself. I want to make it so these accessories grant a true "auto" status, where the status remains active throughout the whole battle. I thought I could achieve this using wall market since from what I gather that is the main program dedicated to editing item, materia, and weapon properties as they relate to battles but unfortunately I can't find a way to do it.

Would this involve more complex editing of the kernel? Like I said I am pretty much a complete novice right now.

Jenova's Witness

  • Right Wing Safety Squads
  • *
  • Posts: 471
  • I ♥ SCIENCE
    • View Profile
.
« Reply #1 on: 2011-11-06 01:39:16 »
.
« Last Edit: 2015-11-16 10:12:25 by Jenova's Witness »

ShoeUnited

  • *
  • Posts: 11
    • View Profile
Re: Accessory Question
« Reply #2 on: 2011-11-08 08:12:20 »
Auto in those cases actually mean "automatically cast at beginning of battle".  But I see what you're trying to do, you wish for the effect to last like having beserk or poison.  I would look into the addresses that affect those status ailments and seeing if there is either an option to make haste an ailment, or trying to make haste recast upon a certain factor (not unlike Auto-Life).

nfitc1

  • *
  • Posts: 3013
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Accessory Question
« Reply #3 on: 2011-11-08 17:03:04 »
WARNING!! WARNING!! TECHNICAL INFORMATION APPROACHING!!

There's a function at 0x5D0297 that is specifically devoted to applying accessories' effects at the beginning of battle. There are only five: Haste, Berserk, D.Sentence, Reflect, Barrier/MBarrier. All these do is set the character's corresponding status to active at the beginning of the battle. When that happens in-battle, the status is handled and appropriate things happen. A timer is set up for each status and the effect happens. When the timer reaches 0 the effect ends. This is the way it was intended to be. It's a more accurate description to say "Start with [status]" instead of "Auto [status]". The description of this accessory is a little wordy. Saying "Automatically puts you in/sets up [status]" really means "Start battle with [status]". It doesn't mean "Continuous [status] effect" like FF8 or FF9 would.

How to fix:
I can't give you step by step instructions. Basically, you'd have to find where this timer is incremented/decremented (however it's handled) and make a check for the accessory with that effect. If it's present, don't alter the timer for that status. Don't ask me where this can be done or how to check. I haven't looked into it enough. There is a check when stealing/manipulating that looks at the increase steal/manip rate of the accessory.

tylerkschrute

  • *
  • Posts: 39
    • View Profile
Re: Accessory Question
« Reply #4 on: 2011-11-08 19:25:14 »
Oh lawdy lawdy. I'm a complete novice when it comes to hacking :evil: :evil:

I was hoping there was some easy fix to this but I guess not. I don't think I'm ready to tackle something like this yet haha.

ShoeUnited

  • *
  • Posts: 11
    • View Profile
Re: Accessory Question
« Reply #5 on: 2011-11-09 06:15:44 »
Actually, judging by NFITC1's post the fix is simple in concept.  It's just time consuming to find the right addresses to modify.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Accessory Question
« Reply #6 on: 2011-11-09 09:15:00 »
WARNING!! WARNING!! TECHNICAL INFORMATION APPROACHING!!

There's a function at 0x5D0297 that is specifically devoted to applying accessories' effects at the beginning of battle. There are only five: Haste, Berserk, D.Sentence, Reflect, Barrier/MBarrier. All these do is set the character's corresponding status to active at the beginning of the battle. When that happens in-battle, the status is handled and appropriate things happen. A timer is set up for each status and the effect happens. When the timer reaches 0 the effect ends. This is the way it was intended to be. It's a more accurate description to say "Start with [status]" instead of "Auto [status]". The description of this accessory is a little wordy. Saying "Automatically puts you in/sets up [status]" really means "Start battle with [status]". It doesn't mean "Continuous [status] effect" like FF8 or FF9 would.

How to fix:
I can't give you step by step instructions. Basically, you'd have to find where this timer is incremented/decremented (however it's handled) and make a check for the accessory with that effect. If it's present, don't alter the timer for that status. Don't ask me where this can be done or how to check. I haven't looked into it enough. There is a check when stealing/manipulating that looks at the increase steal/manip rate of the accessory.

Can you actually modify AI based on what accessory is equipped?

nfitc1

  • *
  • Posts: 3013
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Accessory Question
« Reply #7 on: 2011-11-09 15:08:37 »
Can you actually modify AI based on what accessory is equipped?

I don't think the AI has access to this info. Not all the data is mapped so I suppose it's possible. Maybe I'll take a look at it later.

Actually, judging by NFITC1's post the fix is simple in concept.  It's just time consuming to find the right addresses to modify.

Possible? Maybe. It's really hard to tell right now since I can't see the code that does this. Statuses are checked and set all over the code so anyone of them could be the one that checks the timer to unset it.

EDIT:
It looks like the removal actually happens at 0x434D0A. It's pretty tight and doesn't have room to check the accessory or call a function and do something different based on results. In a nutshell, all it does is remove the status that it's told to remove (based on a fixed array) from the actor's active status list.
The calling of this function could be redirected though to a sub that COULD check for accesory.
Hmm, even more interesting.......change 0x434D34 (0x034134 in a hex editor) from 23h to 0Bh and all statuses become permanent until healed.......... Just a thought. Might not work. It'd suck to have a permanent Paralysis though. Especially if everyone got inflicted by it at once.
« Last Edit: 2011-11-09 16:57:14 by NFITC1 »

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Accessory Question
« Reply #8 on: 2011-11-09 17:11:28 »
Permanent negative status stuff would be awesome for my hardcore mod

But what happens with death sentence, barrier / mbarrier / invincible / shield
There has to be a "duration" value for these statuses somewhere
I think it's easier to manipulate the duration for those things than just set them all permanent ( permanent invincible? one time aerith limit, all battles become super easy mode )

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Accessory Question
« Reply #9 on: 2011-11-09 17:16:56 »
There is.  The barrier etc are simply counters.  They start at FF and go down to 00 (if i recall), but the actual status effect is removed at a check point, so even though barrier is 00, it will still be up until the check is made.  Same for the rest.

The status' etc are all in the character stat areas of exe.  Each character has his own vars and counters.

I didn't record the counter, but it is easy to trace barrier (thus all of em) from 006DD78D/ 006DD74F, the barrier gauges.





xLostWingx

  • *
  • Posts: 801
  • No Comment
    • View Profile
    • FFVII Lost Wing Mod/Hacks
Re: Accessory Question
« Reply #10 on: 2011-11-09 20:00:02 »
There's a function at 0x5D0297 that is specifically devoted to applying accessories' effects at the beginning of battle. There are only five: Haste, Berserk, D.Sentence, Reflect, Barrier/MBarrier. All these do is set the character's corresponding status to active at the beginning of the battle.

Permanent negative status stuff would be awesome for my hardcore mod

I didn't record the counter, but it is easy to trace barrier (thus all of em) from 006DD78D/ 006DD74F, the barrier gauges.

So...would it be relatively simple to allow accessories to "Start battle with..." other statuses?  Start with poison/blind/regen/etc.?  Would be an awesome feature to add to Wallmarket. Sorry if I'm being presumptuous.

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
Re: Accessory Question
« Reply #11 on: 2011-11-09 20:05:36 »
There is.  The barrier etc are simply counters.  They start at FF and go down to 00 (if i recall), but the actual status effect is removed at a check point, so even though barrier is 00, it will still be up until the check is made.  Same for the rest.

The status' etc are all in the character stat areas of exe.  Each character has his own vars and counters.

I didn't record the counter, but it is easy to trace barrier (thus all of em) from 006DD78D/ 006DD74F, the barrier gauges.

So each status doesn't have a unified / general duration assigned to it by default but it's different from character to character? At least that's what it sounds like from what you're saying.
Also, if the value goes down from FF to 00 and is then removed upon check, there has to be some sort of "remove X points every Y second" values set somewhere. I know barriers go down faster / slower depending on battle speed so this could be a real pain to figure out.

I suppose all positive status's run like this? Assign status, set value to X, decrease value every Y seconds and check, if value = 00 on check, remove status. ( Except berserk, which doesn't seem to run out but is handled as positive status )
Most of the negative status effects work like this too then, or so I assume? If Y is variable based on the battle speed value ( or if the battle speed value IS Y and it's factored down or up in some way ) then it should be possible to tweak the actual durations of statuses, no?

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Accessory Question
« Reply #12 on: 2011-11-09 20:10:47 »
No, the counter code is the same for everyone... just that each has his own counter or you would always have barrier on all 3 wouldnt you :P  When you give barrier to 2 characters and 1 is knocked out, then you revive him and add barrier, he starts from FF, by this time the other 2 are further down.

Each character has his own area for his HP MP and variables.  It is all in the same area.  I never really went into the assembly much regarding the counter, except to say that it it should be very easy to make a barrier stay on indefinitely etc with some recoding.
« Last Edit: 2011-11-09 20:12:37 by DLPB »

nfitc1

  • *
  • Posts: 3013
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Accessory Question
« Reply #13 on: 2011-11-09 21:02:44 »
So...would it be relatively simple to allow accessories to "Start battle with..." other statuses?  Start with poison/blind/regen/etc.?  Would be an awesome feature to add to Wallmarket. Sorry if I'm being presumptuous.

Not from WallMarket. That takes some editing of the exe and you sacrifice at least one existing "Start with" status.