Jump to content

How to Alter Female Mounted AID Formula in FE8?


Kngt_Of_Titania
 Share

Recommended Posts

I'm working on a balancing and revamping patch for FE8, and I'd like to make it so female mounted units have the same AID formula as males. I'd prefer to do this directly, but a method to tag all female units as male for the purposes of changing their AID formula will work as well.

I have not been able to find how to do this anywhere on the internet, and I don't see a patch for it (besides the AS hack, but I want to keep CON working the same way it is to maintain the FE8 "feel"). Does anybody know a way to do it?

EDIT: On a similar topic, does anybody know how to alter the formula(e) for the LUK stat? I'd like to buff it a bit -- it's a little too weak of a stat as it stands, imo.

Edited by Kngt_Of_Titania
Link to comment
Share on other sites

can't you just make units not female in nightmare

and animations are linked to the class, too, so making a unit not-female is still going to let that unit retain a female animations.

i honestly can't think of something else that the "female" character ability might be used for

Edited by dondon151
Link to comment
Share on other sites

can't you just make units not female in nightmare

and animations are linked to the class, too, so making a unit not-female is still going to let that unit retain a female animations.

i honestly can't think of something else that the "female" character ability might be used for

Yeah, that should do the trick. Thanks.

For some reason, I was thinking it'd be in the Class Module, not the Character one.

Link to comment
Share on other sites

you alter the formulae for the luck stat by screwing around in the code until you find somewhere that references said stat

I know that this will sound stupid, but how do I go about doing that?

More specifically, what do I use to mull around the code; a Hex Editor like HxD? In addition, how will I know when I find a reference to the formulae?

I have to assume there's some tool required that I haven't downloaded yet and is necessary for this task.

Edited by Kngt_Of_Titania
Link to comment
Share on other sites

Assembly. You'll probably need a multitude of programs. The basic explanation is that you'll need to learn how the programming works and edit the programming. There isn't really a... tutorial on it, so to speak. There are tutorials on ASM in general, but not really all that applicable to FE. It's intuitive and forces you to comprehend things on your own. XP

Link to comment
Share on other sites

Assembly. You'll probably need a multitude of programs. The basic explanation is that you'll need to learn how the programming works and edit the programming. There isn't really a... tutorial on it, so to speak. There are tutorials on ASM in general, but not really all that applicable to FE. It's intuitive and forces you to comprehend things on your own. XP

Thank you. Something tells me it's going to be a long journey to get it down pat.

Link to comment
Share on other sites

you could probably do it with HxD but i wouldn't recommend trying

2nA7j.png

you can find a reference to the formula by mucking around in memory until you can find the byte that stores the final value of the formula you want to edit

set a write-break to that byte and it should bring you to the end of the routine that calculates the value

Link to comment
Share on other sites

you could probably do it with HxD but i wouldn't recommend trying

2nA7j.png

you can find a reference to the formula by mucking around in memory until you can find the byte that stores the final value of the formula you want to edit

set a write-break to that byte and it should bring you to the end of the routine that calculates the value

Since I'm new to this, can you (or anybody) give me tips on how to find the reference to the formula? Here's what I've pieced together so far:

A) I assume I'm looking for an "ldr" function since you're saying "stores the final value".

B) I'd imagine it's located somewhere near the beginning of the code, so around "08010000", since that seems to be around where max HP is formulated according to Hextator.

C) From mucking around, I noticed that setting a break at 08018892 caused the ROM to stop on the prologue map before the words "Player Phase" appear, which is when (I would assume) stats such as "CRIT" would be calculated -- obviously, it has to happen after the characters are loaded on to the map but before one can open the menu to view stats. So I think I'm close, but I have no idea of knowing if I truly am.

Link to comment
Share on other sites

well you're actually off on every count

first off, "str" is the opcode that stores values, and it would be "strb" in particular (and ldr is not a function)

yes it's "near" 08010000 but that could be anywhere from 08010000 to 08100000 (since that is *roughly* where all the code in the ROM is stored). just based on what i've found near that offset in the past, it's far more likely you stumbled across the loading routine for "load the player phase graphic"

why would you set a break at that offset in particular? in general it's a good idea to have a general idea of where you're going to find what you want (either directly in the code or via memory, since the former is what we want it'd be better to set a read-break in memory). you're also wrong about where it's loaded- crit is calculated on the spot every time it's needed (or, rather, it only stores the crit value of the currently loaded unit), you'd be better off setting a read-break to a specific character's luck stat and tracing forward until you find something that looks similar to what you want

EDIT

Incidentally the screen I showed you doesn't actually have any hints for you, I'll admit I was trying to scare you. Most people generally give up after they see that :P

Edited by CT075
Link to comment
Share on other sites

If you want to learn assembly, read the Ultimate Tutorial. It won't tell you how to do exactly what you want, but much like teaching Events it should teach you what you need to know to do it on your own, given you put forth all the time and effort (do not expect it to be easy or quick, unless you are a natural it will probably not be either of those).

Link to comment
Share on other sites

why would you set a break at that offset in particular? in general it's a good idea to have a general idea of where you're going to find what you want (either directly in the code or via memory, since the former is what we want it'd be better to set a read-break in memory). you're also wrong about where it's loaded- crit is calculated on the spot every time it's needed (or, rather, it only stores the crit value of the currently loaded unit), you'd be better off setting a read-break to a specific character's luck stat and tracing forward until you find something that looks similar to what you want

Mainly because I had no idea where to start from, tbh. So after reading Ch. 74 of the Ultimate Tutorial and at least getting the basic idea down, I think I could handle it. However, there is one thing I still can't find that's keeping me from getting started:

Where in the world is the pointer where character data starts in FE8? I see the Ultimate Tutorial gave me it for FE7, but I can't find it for the ROM I'm using.

Btw, thank you SO much for your help. I wouldn't have gotten this far without your assistance.

Edited by Kngt_Of_Titania
Link to comment
Share on other sites

Check a cheat codes list for FE8 and look them up. If you're not sure how that works, chec the video link somewhere in the assembly chapter or one of the other chapters might have info in it. (Pretty much just ignore the first "digit" of the main code part of a cheat code and that's your offset)

You can also check doc, NL and Hextator have lots and I'd be shocked if the FE8 offset wasn't there

Lastly, you can figure it out yourself, since that is part of ASM (I mean SOMEONE had to figure them out to start with, no?)

Link to comment
Share on other sites

MAJOR EDIT: By pure "luck" (*ba da tish*), I managed to find the pointer where Eirika's LUK stat is stored! Thank god. And yes, I changed the Hex value and her LUK did change when I ran the ROM back up again, so it's tested and proven (it's 0x202BEAD, btw). However, obviously that pointer won't be referenced, so I'm trying to piece together what pointer IS referenced in the code. Annoying, but at least I have my foot in the door.

+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

ASM makes me feel like an idiot, I swear.

So reading Burning Gravity's last post, I go and check Hextator's Doc again and find this gem:

List of pointers (Too large to post pic)

Useful, but there are some things I don't get. For example, looking at the text, I see multiple entries for Eirika:

Eirika Palette: 0x88A9D14-0x88A9D34

Not what I'm looking for.

Mini Start at 880DA18; Eirika at 88AA334

Chibi artwork?

Eirika: 0x88AA524-0x88AB524

Ah! This should be it. Let's take a peek...

EirikaCharacterStats_zps742f08f3.png

What the hell?! Why are we doing left shift logic here...there's no reason to multiply anything by 2^#0x0 = 1, is there? Alright, I'm stumped; that seems like the most meaningless code ever. (By the way, this massive series of lsl lines continues for a while)

Well, let's try something easier to ease into it, see what I'm doing wrong. Hmm -- ah, here we go!

0x8BE2264 Iron Sword max uses mod (add 0x24 to get to next weapon)

Searching_zps0eca9ca9.png

And the results?

FnF_zpsb5f4ab0d.png

Facepalm_emote_gif.gif

Edited by Kngt_Of_Titania
Link to comment
Share on other sites

normally by now i'd do it for you and save you the agony but since you do seem to legit want to learn this i'll give you some hints (or, in particular, one)

MAJOR EDIT: By pure "luck" (*ba da tish*), I managed to find the pointer where Eirika's LUK stat is stored! Thank god. And yes, I changed the Hex value and her LUK did change when I ran the ROM back up again, so it's tested and proven (it's 0x202BEAD, btw). However, obviously that pointer won't be referenced

why

Link to comment
Share on other sites

normally by now i'd do it for you and save you the agony but since you do seem to legit want to learn this i'll give you some hints (or, in particular, one)

why

I'm probably wrong, but I meant that I won't likely see a direct reference to 0x202BEAD in the code (i.e. if I searched that string, I get no results), since they would write it to work for any character. Looking at Burning Gravity's tutorial and assuming his method is based off of the one used in the ROM, what I *should* see (again, I think) a reference to is the string:

0x202BEAD - 0x19 (from Hextator's guide stating that LUK is the 25th byte) - 0x48 (size of each character "slot" in the ROM) = 0x202BE4C

...And, indeed, I get multiple "hits" upon searching, namely at the pointers:

- 0x8031716

- 0x803172C

- 0x8031756

- 0x803176C

- 0x80A5170

- 0x80A5AAE

- 0x80A5C64

- 0x80A6474

- 0x84644BA

- 0x84644C2

- 0x846458E

- 0x84645B4

I get no results searching for 0x202BEAD (Eirika's LUK stat) or 0x202BE94 (first byte; Eirika's portrait).

Link to comment
Share on other sites

you're going about it the wrong way

set a read break (if you don't know how i wrote an explanation in the UT thread)

Alright. It's really late now and I'm getting too tired to think straight, so I'll tackle it when I'm rested. Fewer mistakes that way. I'll look over your post in UT in the morning and work on it then.

Thanks again. You have no idea how much I appreciate it.

Btw, noticed this in the code when mulling around:

ldr r5, =#0x202BE4C

mov r4, #0x3D

Just out of curiosity, what exactly is the difference between ldr Rd, =# and mov Rd, #? Looking them both up, they both seem to insert a numeric constant into a register. Is there a difference in the way that they do that, or did I mistake what one (or both) of them do?

Edited by Kngt_Of_Titania
Link to comment
Share on other sites

1) you need to learn the difference between an offset and pointer

2) the offset of an individual stat is never going to be referenced in ASM, that would be highly inefficient, only the beginning of a pointer table will ever be referenced directly, as it states: more specific offsets are calculated through the ASM routine themselves

3) you can set a break on memory read of the address using [202BEAD]? and then see when it's read to but keep in mind it will be read to multiple times so you need to set up a situation that is relevant first or else you will just end up beating around the bush so to speak

0x48 (size of each character "slot" in the ROM)

in the RAM

not the ROM

the ROM is what you edit in a hex editor, the RAM is the memory that you can access via the memory viewer. when playing the game, the ROM is put in the memory at 0x08000000, and ASM is run when the game is running, so ASM/pointers in general will always reference the ROM as if though it is in the RAM

and FYI when somebody says a pointer they usually mean something in a hex editor that gives an offset to something else

the offset of that pointer would be the place where you are at when you encounter the pointer/the word/the 4 bytes

also that lsl thing where you multiply by 1, didn't that strike you as odd that it repeats over and over? and more importantly the bytes there are 00 00? if you multiply r0 by 1 it will still be r0; in other words, it doesn't do anything, so yes, it IS pointless, because you're not looking at ASM: you should be looking in the first megabyte of the ROM if you're looking at actual ASM routines (there might be ASM routines and plenty of data and pointer tables related to them later in the ROM, but that's not as relevant right now)

anyhow you should come up with a slightly better strategy for tackling this. Gather more information and the such. you're honestly going to have a hard time since you're trying to jump around and take shortcuts and that's partially why you're making a lot of mistakes. Naturally it's your choice and you might be successful eventually but you might also not and I'm much less inclined to give you help

- trying to find formula for luck stat--is there any doc on how this is calculated?

- if not, how can we find the routine? come up with several ideas. see which one is most feasible. outline a strategy to tackle it. one strategy is to set a break on memory when the luck stat is loaded. one thing that you learn through ASM hacking/reading doc/experience is that... to put it simply, stats etc. are calculated against a "dummy" enemy when you load the stat screen so that it can find the numbers to display for hit, avoid, etc--naturally, luck will be a part of that, so making a save right before you hit the "R" button on a character would be an easy way to set up a situation where luck is calculated

- if you can find the attack/battle data buffer that would help a bit too because all the stats etc. for a battle are stored in an area (in FE7 it's like 0x0203A3F0 or something). then you can find the luck stat there by analyzing the values and more importantly you could find something like the critical hit % or something that luck affects and then set a break on memory read on that so you can watch it go through the process of calculating that. naturally it will have to use luck at some point and that's your cue to expand what luck affects to some larger area through one of the two major methods (see the UT thread) and then make it do more.

though honestly you might be able to just insert it into anywhere before it finishes calculating all the data in the buffer, it might be a little less efficient or disorganized but meh, if it works :|

EDIT: move has a limited value range (what is it, 0x00-0xFF? Cam can help here)

ldr can load a word from an offset as well e.g.

ldr r0, Offset @ Loads word at offset "Offset"

Offset:

.long 0x0202BD50

ldr r0, [r1] @ Loads the word value at the offset r1

ldr r0, =Ox0202BD50 would do the same thing but sometimes assemblers get nitpicky and don't like it though all it will do is append the word 0x0202BD50 to the end of the routine and then use a relative offset to reference it, i.e. the same thing in the first example

the 3rd one is the most unique in that it uses a register and loads the word there: mov r0, r1 would mean r0 = r1 where r0 gets its value changed, but ldr r0, [r1] means r0 = word value at the offset of r1

this should also be covered in the UT though without as much emphasis since it's not too complicated

Edited by Burning Gravity
Link to comment
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.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...