Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: Karifean on 2013-09-09 17:51:04

Title: (FF7/PC) Field Script: Check/Remove Materia?
Post by: Karifean on 2013-09-09 17:51:04
Is there any way to check for specific materia or remove them? The designated opcodes don't seem to work at all.

The only scripts I could think of that do this are the Huge Materia and the initiation of the Yuffie sidequest, but both of those seem to be hardcoded using the MENU opcode.

On a similar note, is it possible to unequip all party members' accessories?
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: sithlord48 on 2013-09-09 18:52:41
accessories can be unequiped using black chocobo or manually setting the characters accessory offset (0x1E character table) to 0xFF. iirc it can not be done in game. using makou you might be able to set equipment via scripts but im not sure and can't think of when this happens in game.
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: JBedford128 on 2013-09-09 19:08:48
I know Aeris has her accessory removed when she leaves the party, so it must be possible.
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: nfitc1 on 2013-09-09 19:24:43
It doesn't happen in the game and you can't set it via script like that. :( Any Item manipulation occurs from the item inventory, not equipped things.

Materia doesn't work like this either. :O There's not a function that just remove one specific materia either. That's a bit surprising.
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: Karifean on 2013-09-09 19:28:16
It doesn't happen in the game and you can't set it via script like that. :( Any Item manipulation occurs from the item inventory, not equipped things.

Materia doesn't work like this either. :O There's not a function that just remove one specific materia either. That's a bit surprising.

So basically there's no way? That bites.

And sith, I think you misunderstood. You can unequip accessories ingame with the triangle/menu button. The question was whether it's possible to force this via field scripting.
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: Sega Chief on 2013-09-09 20:04:18
I can maybe help with the accessory thing. As far as I know, accessories are removed along with Materia with the '17' function in 'Modules - Display Menu' (they're used in Shinra tower to un-equip party members before the Gunners and Rufus fights; these are in the 'direct' group of their respective field screens if you want to look at them).

Are you trying to get rid of KOTR for the boss-rush mod? I thought a potential work-around might have been to remove the party's Materia/Accessory by using '17' for each party member in turn (changing 'Short', the field below it, determines which party member it affects). This puts every Materia in the inventory assuming there's space. I'd have thought you could then 'target' KOTR and other banned Materia using Remove Materia under Party & Inventory (it looks like it asks for AP as an identifier as well as the Materia itself) but I just tested it with Fire Materia sitting at 0 AP and it was a no-go, unfortunately.
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: nfitc1 on 2013-09-09 21:11:34
REDACTED
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: Karifean on 2013-09-09 21:39:14
I can maybe help with the accessory thing. As far as I know, accessories are removed along with Materia with the '17' function in 'Modules - Display Menu' (they're used in Shinra tower to un-equip party members before the Gunners and Rufus fights; these are in the 'direct' group of their respective field screens if you want to look at them).

Ah, thank you. The MENU opcode seems to do all kinds of stuff with your inventory. Well that at least solves that issue. Though that makes me wonder... what if you've filled your materia inventory and then you're forced to unequip them? I might have to test that.

Quote
Are you trying to get rid of KOTR for the boss-rush mod? I thought a potential work-around might have been to remove the party's Materia/Accessory by using '17' for each party member in turn (changing 'Short', the field below it, determines which party member it affects). This puts every Materia in the inventory assuming there's space. I'd have thought you could then 'target' KOTR and other banned Materia using Remove Materia under Party & Inventory (it looks like it asks for AP as an identifier as well as the Materia itself) but I just tested it with Fire Materia sitting at 0 AP and it was a no-go, unfortunately.

Yeah, KotR, Mime, Double Cut and the Master X Materia. It also removes Elixirs, Megalixirs, Hero Drinks and Ribbons, though the latter weren't removed if you still had them equipped, I should be able to fix that with the MENU command you posted.

The problem is that both the Remove Materia and Amount of Materia opcodes don't seem to do anything. I tested both ways (either just not letting you into the Hall of Battles or removing the forbidden materia upon entering) both with either 0 or 500k AP and neither worked out. Guess I'll have to rely on the players.
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: nfitc1 on 2013-09-09 21:57:28
Though that makes me wonder... what if you've filled your materia inventory and then you're forced to unequip them? I might have to test that.

If you try to unequip it, the unequip routine won't let you and it'll stay where it is. Materia birth acts differently and starts erasing materia in your inventory.
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: Sega Chief on 2013-09-10 11:57:26
Here's an idea for another work-around. You could edit the Materia itself in the Kernel using NFITC1's WallMarket (I remember you saying you can open that up now). That way, when people load up a save with your mod installed, the banned Materia will be useless so even if they go in with them it won't be of any use. Giving the banned Materia the exact same data as Underwater Materia should do the trick. Gjoerulv was able to change Master X Materia to other things so it should be possible. Haven't tried it though.
Title: Re: (FF7/PC) Field Script: Check/Remove Materia?
Post by: Karifean on 2013-09-10 17:25:24
Yeah, that was the other possibility. Though I had really hoped not to have to do that. Seems like I'm out of options, though.