Jump to content
Sign in to follow this  
Crimson Red

Randomish Item Effect Hacking Notes

Recommended Posts

Uh, stayed up too late and thought too hard and this is what I came up with: essentially, nothing but some basic observations and ranting, I didn't actually accomplish much unless you want to turn the 60-use vulnerary into a 60-use elixir or pure water or anti-toxin I suppose... yeah, no....

Item Effect Hacking Notes

--------------------------

0x2D0D0 - Pointer to offset for Vulnerary item effect routine. Right after is the elixir pointer.

0x2D18C - the last entry, the 60-use vulnerary.

0x2D190 - ASM routines start here

0x2D1E2 - Vulnerary healing amount byte

0x2D04C - Table start--the pointer to this table is at 2D048.

The distance from the starting point of the table to the vulnerary entry is 0x84 bytes, or 0x21 entries. The value in the Nightmare Module under staff/item effect matches that exactly!

However, the last entry overall is 0x33, the 60-use vulnerary. This is cool except the table itself has 0x51 entries. That doesn't make sense: are there extra entries here for something that aren't being counted overall? I don't even know...

As I thought, copying the entire data from the elixir to the vulnerary did not change the vulnerary's effect. It's hardcoded for item 0x6B to have entry 0x21 as the effect, some other way...

Changing the value at 0x2D1E3 from 0x21 (the entry value for the vulnerary) to 0x22 or 0x23 makes the vulnerary act like an elixir. I don't know what this means, though: furthermore this same pointer is shared with the 60-use vulnerary so... idk, idk...

0xB96158 - ???

0x1250A68 - Heal Staff item data offset

0x12515A8 - 60-use vulnerary item data offset

Uh got lazy on taking my random notes so here's some Skype stuff:

[9:46:12 PM] ballin1337: failed again...

[9:46:17 PM] ballin1337: I think that's my last idea.

[9:46:24 PM] ballin1337: I changed the Unlock staff to have the heal effect

[9:46:29 PM] ballin1337: but the "staff" option won't activate.

[9:46:49 PM] ballin1337: meaning that somewhere else are a bunch of bytes that determine when a staff can activate.

[9:47:51 PM] ballin1337: Furthermore... the heal and mend and recover staves all use the same base pointer for their effect. Which doesn't make sense: they all heal different amounts (unless they cap anyway), so they should all have different effect pointers.

[9:48:47 PM] ballin1337: In conclusion, there is something else going on here, and until I hack that, I cannot replicate the effect of a staff, or even replicate the effect of the vulnerary. ALL I can do is change the properties of a vulnerary... but aside from uses there is nothing to change, so, I'm screwed.

So, I tried making various changes, but none of them were really successful. I can turn the vulnerary into an elixir, but there is little point in that except to maybe make an unbreakable elixir (the only property of items worth editing is in fact their uses). I can't duplicate the vulnerary's or elixir's healing effect and relocate it elsewhere: the game stops, possibly because of branching routines needing the data in a certain location, I don't know. I can't turn the Unlock staff into a healing staff because the requirements for activating the "Staff" option to appear are... simply put, different. Somewhere in the ASM is this, but I don't know where--it's likely close by, but I honestly couldn't tell. I tried turning the vulnerary into a healing staff but encountered the same problem: although I can change the effect, I can't actually make the option to activate that effect appear. It's possible that there's even more data somewhere deciding how much the heal staves heal because if there "effect pointer", as I deemed it, is the same, then there HAS to be something else being involved here.

Thus I do not have information to make any significant changes. That is the simple reality of this. Oh well, it was a fun little time, even if I didn't really accomplish anything... *shrug*

Edited by Strawhat Luffy

Share this post


Link to post
Share on other sites

Okay, Klok. Okay.

get back to us when FEXP gets a turbo button, then we'll talk

Share this post


Link to post
Share on other sites

Silly children, complaining that FEXP is slow when it's as fast as playing FE on a regular cartridge.

What?! Only hipsters play on cartridges! Kool kids use roms for everything...!

Share this post


Link to post
Share on other sites

Silly children, complaining that FEXP is slow when it's as fast as playing FE on a regular cartridge.

What?! Only hipsters play on cartridges! Kool kids use roms for everything...!

the keyword is 'turbo'

Share this post


Link to post
Share on other sites

To be fair, that's an error of the game creator, not necessarily the engine. As long as you limit the number of events to about 80 or less on a map, it usually never freezes. Generic War had nearly 200, which is why it was so slow woolol.

I've learned a lot about its limitations though so MoH should run much smoother than GW.

Share this post


Link to post
Share on other sites

To be fair, that's an error of the game creator, not necessarily the engine. As long as you limit the number of events to about 80 or less on a map, it usually never freezes.

Silly children, complaining that FEXP is slow when it's as fast as playing FE on a regular cartridge.

does not compute

Share this post


Link to post
Share on other sites

okay, can we not argue about a beta FE game-making engine that Klok likes to suck the dick of, maybe actually either discuss the notes or let this topic get no replies like it should? just requesting this since like, you're cluttering meh topicz and you started it Klokinewb

EDIT: typo

Edited by Strawhat Luffy

Share this post


Link to post
Share on other sites

FEXP actually plays a lot faster when you hold down the "Action" button (Which would be like holding down "A" on a GBA) but there is occasionally a slight pause when the enemies turn grey after moving. This pause is normally unnoticeable, but if you have a lot of events on the map the pause can take about .45th to .75th of a second per unit due to AI having to scroll through more events.

However, if you limit events like Yeti did, the pause is unnoticeable. Therefore, with few events, it runs as fast as a regular cartridge game.

Edit: My bad Blazer, sorry.

Edited by Adolf Klokler

Share this post


Link to post
Share on other sites

so after thinking/looking into things a bit more

I'm slightly more confident there's another table that determines the activation requirements for the option to use a staff or item (e.g. if it's self-use, if the character is within range, if the HP isn't the max HP, if the unit's condition is poison, etc.). I don't know where it is though and *I* don't think debugging is going to help me here because I already tried deciphering the assembly and lost my patience but if you can try and get somewhere then good for you (no sarcasm, it'd be great).

EDIT: The pointer table at 0x2F248 is related... I don't feel like figuring out anymore, so that's all I got.

Edited by Strawhat Luffy

Share this post


Link to post
Share on other sites

there's a routine at 0x######## (i can't be fucked to look it up right now) that determines whether an item is usable or not

ahve you tried setting a break-on-write (with no$debugger) on the character's hp?

Share this post


Link to post
Share on other sites

no

I gave up on this

I might make an infinite elixir, a Pure Sword, or a Sealed Sword-esque healing sword just to show-off, though

EDIT: the above line is a joke for those of you who take striked lines seriously... oh that makes this line a joke too, except it isn't... ahhh mind games

Edited by Strawhat Luffy

Share this post


Link to post
Share on other sites

yes

I did

well in theory/with the help of a friend, I haven't actually done it because I'm too lazy/have no reason to/am not into showing random shit that anyone can do

Edited by Strawhat Luffy

Share this post


Link to post
Share on other sites

At 0x0802742C is a table of 0xD0 length, with pointers that are one word each; that's 0x34 entries, including the entry 0x00 as one, and I know that the last item in the item table is the 60-use Vulnerary, which has "item effect" (the useless byte that seems to do nothing) 0x33. In other words, this matches up.

Also, one could (probably) use the 60-use vulnerary item and branch it to go to a copy of the normal vulnerary routine but at a different address and then instead of

mov r0, #0xa

do something like

mov r0, #0x14

and then make it continue using the same routine as the vulnerary, which SHOULD make it heal 0x14 or 20 HP instead of 10. Granted there's only one 60-use vulnerary so eh, once you use it up, you can't really magically make it do something else >< (though you could edit the routine to say, heal 50% of HP, or maybe heal a different amount of HP based on what chapter it is, or maybe heal a mount of HP equal to one's strength or something silly like that... once you branch it out there are like, millions of options).

Anyhow, going back to do more research...

EDIT: The first entry in this table seems to be related to promotion items (I'm very confident, to say the least). It loads pointers that look like list of classes that can be promoted, and while I don't have my Nightmare Modules on hand, I'm guessing those promotion editors edit the very value at these offsets or something like that (I don't remember exactly but that sounds reasonable).

...Yeah, the routine itself seems to load the character value and compare it to the values at the address until finding a match, and, if it does, return the result as "true" (0x01 seems to be true here) or false (it keeps checking until it finds the byte "0x00", to which it goes to the end and does mov r0, #0x00 to load 0x00 into r0, which it presumably checks)

well that's cool in general but not what I'm looking for XP

aaaand further diagnosis makes me want to believe that this table in general is bull**** because most of the pointers are shared minus the first few and some other random ones and the ASM they point to fits like, perfectly for the promotion stuff, but not for this, so idk what's going on

maybe this is why the staff item effect byte in the module doesn't work, maybe it's only really used for promotion items and is irrelevant for everything else or something... sadly I can't check right now cuz I don't have my NMM's but oh well ><

EDIT2: and there are even more bull**** tables before that I don't have time to analyze (and they seem pretty damn useless anyhow) but at 0x026D10 (with, as usual, the pointer to this table being located right before it i.e. at 0x026D0C) there is a table of length 0x144, the same as the other table later on in the ROM (0x51 entries, or 0x50 entries not including entry 0x00--and the other table with entries of 0x34 that might correspond to the item byte seems useless in general so maybe we're better off dealing with these tables of greater lengths).

......

OKAY SCREW LUNCH

BREAKTHROUGH IN PROGRESS

these bytes almost definitely control whether not the item is usable. corrupting the last pointer (which I know to be the one that affects the 60-use vulnerary) made the game freeze upon hitting the "Item" menu--and I know that whether or not the item is usable or not is actually decided as soon as that menu loads, so that makes sense. Setting the pointer to something different also made the item not usable--YAY! good news! If everything works out smoothly we might be able to expand this and actually make custom items. O_O

yup, confirmed. I changed it to the pointer after the Elixir pointer thinking that it would be the Antitoxin and require me to be poisoned for me to use it; and, in fact, that's what happened. I couldn't use the 60-use vulnerary until I memory hacked myself to be poisoned O_O

okay sadly I'm out of time to do anything HOWEVER when I can I'm going to expand both tables and make them both use the vulnerary pointers and if they work that's great news and we'll probably be able to make a LOT of custom items (granted with a lot of ASM work but still) and if not then... I got no other leads so I'd prob have to ask someone else to take over >_>'

kthxbai!

EDIT: Okay I think I figured it out

man this was hopeless without any ASM knowledge

and this is hella hard too

but I think I got this

anyhow if I still need help later I'll let you know but until then I'm gonna work on trying to hack items and then eventually make up a system for custom ones :D :D :D

Edited by Burning Gravity

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...