Shock Ability - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html) +--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html) +--- Thread: Shock Ability (/thread-3692.html) |
Shock Ability - Lightning - 05-22-2018 Is it possible/easy to make the "Shock" ability used by General Leo consume MP? I just wanted to make it so that it costs around 50 MP for General Leo to use his Shock ability in my mod. RE: Shock Ability - madsiur - 05-22-2018 Yes it's possible but you gotta code a check for enough MP, deduct the MP used from total and consider command disabling if MP below 50 and command enabling when MP goes back higher than 50, as an example following the use of an elixir. I'm not sure you could easily hook up to the existing system since Shock is not a spell and will likely have to redo part of the MP logic for this ability only. (Shock is also a spell but it is not cast here like spells are) RE: Shock Ability - Lightning - 05-22-2018 (05-22-2018, 02:34 AM)madsiur Wrote: Yes it's possible but you gotta code a check for enough MP, deduct the MP used from total and consider command disabling if MP below 50 and command enabling when MP goes back higher than 50, as an example following the use of an elixir. I'm not sure you could easily hook up to the existing system since Shock is not a spell and will likely have to redo part of the MP logic for this ability only. (Shock is also a spell but it is not cast here like spells are) Sounds too complex for a non-coder like me to get into. RE: Shock Ability - ShadowDreamer - 05-23-2018 (05-22-2018, 11:16 AM)Lightning Wrote:(05-22-2018, 02:34 AM)madsiur Wrote: Yes it's possible but you gotta code a check for enough MP, deduct the MP used from total and consider command disabling if MP below 50 and command enabling when MP goes back higher than 50, as an example following the use of an elixir. I'm not sure you could easily hook up to the existing system since Shock is not a spell and will likely have to redo part of the MP logic for this ability only. (Shock is also a spell but it is not cast here like spells are) I'm not a coder by any means but it's less complicated if you know where to look. If you go [here] it is disassembly of C2 (Assassin / Terri Senshi) and search for Shock you get the following: Code: Shock So if you use a coding tool (I use WinHex32) you can search for those pointers and make edits accordingly. I think this area might be relevant: Code: C2/57AA: BD 00 00 LDA $0000,X (get spell # from menu) But again, I'm a novice when it comes to coding so take this with a grain of salt. RE: Shock Ability - Tenkarider - 05-24-2018 Golden rule for newbies: make backups of ROM before dealing with hex RE: Shock Ability - Turbotastic - 05-25-2018 (05-23-2018, 12:48 AM)ShadowDreamer Wrote: I'm not a coder by any means but it's less complicated if you know where to look. I hate to be a spoilsport, but as madsiur communicated, it isn't that easy. The battle menu is designed to only allow Magic (including the Equipped Esper) and Lores to deduct MP. "But isn't Shock a spell?" It is...but it's not a spell in the same way as Flare or even Aqua Rake is, each with spots allocated in the menu and an MP cost defined. The code in the second part is useless because it only refers to the Magic/Lore menus, and Shock is not normally cast out of those. There are then two ways of going about this. 1. Adding a 'Megahit" clone to the learnable spell list by creating a new spell than can be cast (advanced). 2. Rewriting the "Shock" command so that it costs MP (and what would you like? A mini-window like with Lore/Magic with Shock as the only option? For the command to be used and succeed and deduct the MP without fanfare if successful, but fail otherwise?...this is also advanced) It's possible and the outline on how to proceed is straightforward...but this is not easy by any stretch of the imagination. RE: Shock Ability - GrayShadows - 05-26-2018 I wonder, actually, if you could repurpose the unused Summon command (with the appropriate targeting fixes) to accomplish this. IIRC, it deducts the appropriate MP for your equipped esper, doesn't it? I don't remember offhand if the current coding disables the command at low MP, but the functionality to disable commands in certain circumstances exists (no appropriate weapon equipped, Imp status, etc), and could definitely be adapted. If you want Shock to cost MP, but not Megahit (i.e. it costs MP when Leo uses it, but not when an enemy does), there's some additional coding you'd need to do, because you'd need to hardcode the MP cost into the function rather than pulling it from spell data, but that's not actually all that hard, either. RE: Shock Ability - Turbotastic - 05-27-2018 PowerPanda tried to work with the Summon command for a different purpose, but got stuck. Catone released a patch that allowed for the creation of an 8-option menu, but the MP problem still remains. Edit: Take anything I say with several grains of salt, as I am a complete nincompoop. RE: Shock Ability - Lightning - 05-27-2018 Thanks for the responses, guys. I tried editing a bit, but got nowhere. I think I will finish the rest of my mod first, and then maybe a few of you guys can help me with it. I also want to make sure the mod stays compatible with real hardware (which it currently is). I do have another question that maybe you can help me with. I am trying to change Vanish in to Image using FF3usME, but I can't get the casting effect right. Does anyone know which bytes to use in order to get the bubble effect for image? Currently, vanish has these animation codes in FF3usME: 027E 00B9 FFFF FFFF Sound: 89 Byte10: 10 Speed: 16 I tried messing with these to change it to other stuff, but it glitched big time. Can anyone either give me an alternative effect I can use for image, or tell me how to get the blue bubble effect? I am open to suggestions to make this effect look good. Thanks! RE: Shock Ability - madsiur - 05-27-2018 The first 4 pairs of bytes are pointers to animation scripts, regrouped by layer or sprite script. In order to get what you want, use the same value at the same place as another spell with the bubble effect. You can also change the scripts themselves but it's more work. |