Please login or register.

Login with username, password and session length
Advanced search  

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed. Find out how you can help in the Recruitment section.

ASM Requests  (Read 54874 times)
Pages: 1 ... 13 14 [15]
aacroke [Posts: 8]
  • View Profile
  • share
  • [September 02, 2019, 06:42:43 AM]
Re: ASM Requests
« Reply #280 on: September 02, 2019, 06:42:43 AM »
Why not just export the weapon sheet in shishi, erase the rugs, and import it again?  Same basic result, no ASM needed

Using Shishi included with v0.492, there is no "weapon sheet". If you're referring to replacing the rug graphic within ITEM.BIN, this has already been done, and only affects the menus.

I'm looking to replace the actual attack animation, and I think ASM editing is far more appropriate than editing graphics for this situation. I might not know how to pore through the ASM or modify it, but I am logical enough to know that, somewhere, there's a case selection where the attacking weapon type is considered, and the appropriate animation is selected based on it; I also imagine that changing one byte somewhere (and possibly a checksum or two as a result) would be the only requirement in achieving my goal.

The rugs have been replaced with fists, much like Tifa uses. I've hijacked the vanilla gauntlets for the task, and replaced the rugs - but instead of my Brawlers punching Algus in the face, they whip out a silly carpet and lash him – and we all know his face deserves to be punched.
Victor FrankeinSprite
CONMAN [Posts: 335]
  • View Profile
  • share
  • [September 10, 2019, 08:16:13 PM]
Re: ASM Requests
« Reply #281 on: September 10, 2019, 08:16:13 PM »
I'm using .491 shishi and maybe I missed something but not the item sheet but the weapon sheet.  I'm sure editing this will change it.
aacroke [Posts: 8]
  • View Profile
  • share
  • [September 11, 2019, 03:41:52 AM]
Re: ASM Requests
« Reply #282 on: September 11, 2019, 03:41:52 AM »
Alrighty, so firstly, this is also present in 492, and I missed it completely. Thank you CONMAN, I did find it and modified WEP sufficiently. The yellow attacking effect is left behind when these weapons are attacked with – but this differentiates it from an unarmed attack, and probably other attacks share the effect (so I don't need to remove it).

Problem solved! I now have a completed mod. Time to read some important info on whether my mod qualifies and how to share it!
bizenboat [Posts: 11]
  • View Profile
  • share
  • [November 07, 2019, 05:41:35 AM]
Re: ASM Requests
« Reply #283 on: November 07, 2019, 05:41:35 AM »
Hi!

I'm new here and trying a little FF7 project to learn more about ASM and events. I've made some progress but could use some guidance if anyone has the time.

Right now I'm trying to modify Absorb Used MP to absorb MP based on the amount of damage done. I was hoping to use MP as a proxy for the limit bar. Ideally it could absorb (dmg/max hp*20) MP, but anything related to the damage would be nice. I don't know what math can be done with ASM.

I'm using the documentation here http://ffhacktics.com/wiki/Face_Up_and_Absorb_Used_MP_usability and comparing to http://ffhacktics.com/wiki/Damage_Split_Usability since that uses damage.

I haven't been successful in understanding the debugger and hex yet but here is what I have right now in ASM mode.


This does absorb some MP when hit by some abilities, but it's not an amount that makes sense to me. One ability absorbs 2 MP, another absorbs 255 MP... doesn't seem tied to damage or mp used so I don't know what I did wrong. Any pointers would be appreciated!

Thanks
Glain [Posts: 523]
  • View Profile
  • share
  • [November 08, 2019, 05:22:36 AM]
Re: ASM Requests
« Reply #284 on: November 08, 2019, 05:22:36 AM »
Just eyeballing it, you also need to copy the HP damage into r2.  Also, why remove the branch?

Then look at what's happening at 0x18cfc4.  In the current modification, it's taking the HP damage, interpreting it as a RAM address and loading from it.
Instead, once again, just copy the HP damage into r2:

This would just try to absorb the full HP damage.  If you want to do a calculation like (dmg * 20 / maxHP) then you would need some more code space, and may need to use some free/kanji space.
« Last Edit: November 11, 2019, 11:18:14 PM by Glain »
bizenboat [Posts: 11]
  • View Profile
  • share
  • [November 08, 2019, 02:06:18 PM]
Re: ASM Requests
« Reply #285 on: November 08, 2019, 02:06:18 PM »
Thank you Glain!! I didn't know that "move" was an option, I thought lhu/lbu were the same as move. Awesome! I mostly just removed the branch for debugging purposes and to clear up more room while I was testing things. If I need more room I might remove the chance to react branch because I want this to happen all the time anyway.

OK, this is absorbing the full damage and now I can just play around with calculations.... Thanks again!
Glain [Posts: 523]
  • View Profile
  • share
  • [November 11, 2019, 11:13:27 PM]
Re: ASM Requests
« Reply #286 on: November 11, 2019, 11:13:27 PM »
Actually, looking at this again, there would be a load delay issue with trying to copy the r17 value into r2 here.  While that could be avoided by loading r17's value earlier, there's no need to copy the value into r2 at all.  Just use r17 in the relevant locations.

Code: [Select]
   (...)
   lhu r17, 4(r3)
   nop
   beq r17, r0, 0x0018cfd0      # Branch to end if No HP damage was dealt

0x18cfcc:
Code: [Select]
   sh  r17, 0x0026(r3)

0x18cfc4 becomes free and could just be replaced with a nop (or a call to a routine in free space for a calculation?).
bizenboat [Posts: 11]
  • View Profile
  • share
  • [November 12, 2019, 05:27:04 AM]
Re: ASM Requests
« Reply #287 on: November 12, 2019, 05:27:04 AM »
That's true, but it's good to know about the move command. I haven't seen that command documented anywhere for r3000 or psx codes, but it works, so that's cool!

I ended up getting rid of the reaction % check so this will happen every time, and I moved the "skip if 0" to after the math. Not sure if this would be of use to anyone else but here's the patch I'm using anyway. Thanks again for the help!

Code: [Select]
<Patch name="Absorb Used MP -> Limit Bar">
    <Location file="BATTLE_BIN" offset="125F74" mode="ASM">
lui r3,0x8019
lw r3,0x2d90(r3) <!-- action -->
addiu r29,r29,0xffe0
sw r31,0x0018(r29)
sw r16,0x0010(r29)
sw r17,0x0014(r29)
lhu r17,0x0004(r3) <!-- hp damage -->
        nop
addu r16,r4,r0
lui r4,0x8019
lw r4,0x2d98(r4) <!-- defender -->
nop
lhu r2,0x002a(r4) <!-- max hp -->
nop
sll r17,r17,0x04 <!-- dmg*16 -->
div r17,r2 <!-- dmg*16/max hp -->
mflo r17
beq r17,r0,0x0018cfd0 <!-- skip if =0 -->
    </Location>
    <Location file="BATTLE_BIN" offset="125FC4" mode="ASM">
move r2,r17
    </Location>
</Patch>
Pages: 1 ... 13 14 [15]