Jump to content

lushen124

Member
  • Posts

    114
  • Joined

  • Last visited

Posts posted by lushen124

  1. Holy cow, this looks amazing. Looking forward to seeing this develop further!

    A few requests:

    -Semi-randomized starting inventories so that characters come with items they can use (is this already part of it? haven't tested it yet)

    -Would it be possible to add in classes not present in other games? (for example, monsters, monks, Hector lords, etc. in FE6, Kings in FE7, etc.)

    I'm gonna try this with FE6 as soon as I can.

    Inventories are already randomized. The missing feature is the option to keep them consistent. :)

    In its current state, the randomizer does not add any new content in. It only takes content already available in each game and randomly assigns them/tweaks them about as much as you could do with a hex editor.

    New content was beyond the scope of the project initially, not to mention doing it programmatically would be a pretty interesting challenge.

  2. Uh, run into a bug of sorts already. Garcia was replacing Eirika, randomised recruitment. His ax rank has carried over.

    9aq0ssG.png

    E - Got another one! http://i.imgur.com/hfLJ5PF.png

    Weird, I just tried 4 times, and all of the weapon ranks I got were consistent.

    u7hme5z.png

    I assume you did random recruitment as well as random classes then? Because otherwise, Garcia should remain a fighter or a warrior. Are there any other settings you used? Not sure why the other ones would make a difference, but any info helps. :)

  3. If you're here looking for a Randomizer, please use Yune!

    I'll put up a full post later with the details, but here's the link for now: https://github.com/lushen124/Universal-FE-Randomizer

     

    Latest Version: v1.1.0

    Link: https://github.com/lushen124/Universal-GBA-FE-Randomizer-Windows/releases/tag/v1.1.0

    Changelog:

    v1.1.0

    • Added the ability to generate a changelog when randomizing. It always generates a file called Changelog.html in a directory you specify. The changelog includes your settings and the updated characters/classes/items tables. Mostly for convenience so that you don't have to open up Nightmare if you're curious as to what everything changed to. Note that all strings are pulled directly from the game data, so in theory this will display ROM hacks properly. (But the current logic doesn't look in the right place for chapter units, so don't try that yet. That will happen later.) The downside is that IS decided to not use the Female flag for classes, so figuring out which class is the female variant is slightly odd. Know that if two classes with the same name show up, the first one is usually the male variant and the second is usually the female variant. They look something like this:

    fmEWa0I.pngTbs2gPN.png

    59oiGKb.pngXE67yFj.png

    • Updated weapon rank logic to attempt to transfer a character's highest rank when changing classes as opposed to randomly upping weapon ranks based on appearance. This fixes the issue where everybody starts with A rank because I didn't realize that characters would appear multiple times throughout chapters, so they got bumped several times, which almost guarantees them to be A rank by the end of it.

    v1.0.1

    • Added logic to make sure legendary weapons don't show up prematurely.
    • Updated logic for movement costs to only update them for classes of units that need them (FE6: Miledy and Gale, FE7: Fiora and Farina, FE8: Glen and Valter).
    • Removed Enemy Buff: At least Amount.
    • Added Cross Gender option when randomizing classes.
    • Fixed an issue where FE8 monster weapons were getting 1-2 range causing crashes.
    • Fixed an issue where FE8 wasn't determining an appropriate promoted class for trainees (should only affect random recruitment).

    v1.0.0

    • Initial Release.

    So a few weeks back, after talking about randomizers and other things we could potentially randomize, I decided to start a project to roll all of the possible randomizers into one easy-to-use package. The most well known randomizer is probably the class randomizer, for which there exists apps/scripts to randomize FE7 and FE8, I believe (not sure about FE6). I think there's a weapon stat randomizer somewhere as well for FE7, though I'm not sure about the other ones. Finally, one of my buddies on /r/fireemblem came up with an idea to randomize growths for a character as well, which I thought was a neat idea, though at the time, one person had to randomly generate it by hand.

    The purpose of this project was to give the user as much control as they wanted to randomize their game in the most accessible way possible.

    In any case, the fruits of that project were recently borne with the v1.0 release that I put up on /r/fireemblem and would like to share here as well. The project is open source on github and is written in Visual Basic for the Windows platforms. I have plans to do a mac one at some point in Cocoa right after I get my new macbook, so in the meantime, this is Windows only. (Somebody suggested an Android version as well, which might be a reality if I can remember how to do android programming (did it a couple of years back, but my forte is in iOS development.)

    Github link: https://github.com/lushen124/Universal-GBA-FE-Randomizer-Windows

    Link to Randomizer: https://github.com/lushen124/Universal-GBA-FE-Randomizer-Windows/blob/master/GBA%20FE%20Stat%20Randomizer/GBA%20FE%20Stat%20Randomizer/bin/Release/GBA%20FE%20Randomizer.zip

    The zip file includes the executable as well as Arch's Tutorial Slayer patch, which is necessary for FE7.

    Run the executable and you'll be greeted with a scroll that looks like this.

    CRO9p0C.png

    Everything is grayed out initially until you select a valid file using the Browse... button. Assuming you fed it a valid file (determined by the header, assuming it's a GBA header and has either game code AFEJ (FE6 JP), AE7E (FE7 NA), or BE8E (FE8 NA), all of the options will re-enable themselves and the game you fed it should show up properly underneath. Feeding it something invalid will let you know the game code it detected.

    Most options are self explanatory, but if you need help on any of them, a tooltip will show up if you hover your mouse over the checkboxes or numeric controls.

    As a reference, here's a quick rundown:

    Randomize Growths: For every important character (i.e. has a character entry), it takes the total amount of growths that unit has and redistributes it across all growth areas.

    For example, FE7 Eliwood has 80% + 45% + 50% + 40% + 45% + 30% + 35% = 325%. This option will take that 325% and randomly assign growths so that it still totals up to 325%.

    Maybe you'll get an Eliwood that's 100% HP, 50% STR, 25% SKL, 25% SPD, 100% LCK, 15% DEF, and 10% RES.

    Or you may get an Eliwood that's 10% HP, 10% STR, 10% SKL, 150% SPD, 45% DEF, and 100% RES.

    Growth variance adds or subtracts a random amount up to the specified number to their totals. So if you set a variance of 20, then Eliwood could start with anywhere between 305% and 345% to distribute.

    Force minimum growths will ensure that every growth has at least 5%. Without it, 0% growths are a (very real) possibility.

    Use weighted HP growths tries to lean more heavily on HP (since that's true most of the time).

    Randomize Bases: Same as growths, except with your personal bases. You may know this, but a character's base stats are determined by the sum of their personal base and their class base. This option only redistributes their personal bases.

    Base Variance is the same as above. It adds or subtracts a random amount up to the specified base from the total bases a character has before redistributing.

    Randomize CON: Exactly as it sounds like, but this works differently than above. There is no redistribution here, just a random number up to the variance specified that is added or subtracted from a character's personal CON.

    For example, FE7 Eliwood starts with 7 CON. With a variance of 1, he could start with 6 - 8 CON. With a variance of 2, he could start with 5 - 9 CON. With a variance of 3, he could start with 4 - 10 CON. And so on.

    A minimum CON value is also an option in case you really don't want to deal with anything lower than 3 CON, for example. Any CON that ends up less than this value is brought up to this value.

    Randomize MOV: Unlike the above, this operates on a class level, and is strictly determined by the range given. Note that male and female variants of a class are considered different classes. The range is determined by the minimum and maximum specified.

    Randomize Affinity: So straightforward it doesn't even have any options. It just assigns a random affinity to every major character (bosses included, though I don't think that matters much unless you're one of the desert bandits).

    Randomize Items: So many options... This gives you the ability to make random tweaks to weapons. They mostly operate with the same pattern. The variance is the amount of change you want to allow for a weapon's stat. For example, let's say you have an FE7 Iron Sword. It has 5 MT by default. If you set the Might variance to 5, then it could end up anywhere between 0 and 10 MT. If you don't want any low might weapons, you can set the Minimum Might to a desirable value and it will make sure weapons never go below that value. Every other stat works the same. Weight also allows you to set a maximum in case you don't want anything weighing more than 20 WT, for example.

    The final, and in my opinion, most interesting option is the ability to randomize traits. What this does is give every weapon in the game an additional random trait on top of it's normal version. The potential traits include Brave Effect, Unbreakable, Devil, Poison, Reverse weapon triangle, Eclipse effect, Magical Damage, Negates Defense (in supported games only), effectiveness to a group of classes (limited to the existing ones), or a random stat bonus (limited to the existing ones). So, for example, maybe all Iron Swords become brave in your game, or all iron axes are actually good against swords, or all iron bows halve your HP (this one is particularly annoying).

    Randomize Classes: The meat of it all. Takes all characters and gives them a random class. The options here are straightforward, but without any additional options, Lords, Thieves, and Bosses are not randomized. This is mostly so that the game is more stable (i.e. less issues with lords getting force promoted, or lacking a thief when you need one, etc.). The options re-enable them as desired.

    Allow Unique Classes will add more exotic classes to the pool. This includes Dancers, Soldiers, and Manaketes (in supported games). In FE8, this also adds monster classes to the pool.

    Buff Enemy Growths: You may know that most basic enemies get their stats from an autoleveling routine in the game based on class growths. This allows you to increase those values for a harder game. The options do exactly as they sound like: Up To Amount is 0 up to X, Exactly amount is exactly X, and At Least Amount is X up to 255. I recommend not doing that last one. I may just remove it because it's not really practical, IMO.

    Also Buff Bosses will give every boss character a somewhat matching buff so that they don't end up significantly weaker than the regular enemies on the map.

    Recruitment: This is probably the buggiest piece of the entire thing. You know those Reverse Recruitment patches that are floating around out there? This attempts to do it programmatically, with varying degrees of success. If you want to play reverse recruitment, you should probably just use one of the patches. Randomized recruitment might still have some use though if you want to experiment around with it. It does exactly as it sounds: re-arrange when each character joins the party. Does not affect scenes though, so there's some disconnect, story-wise.

    Some Screenshots:

    bkF3tf2.pngoHzNd3R.png01K39El.png

    Additional Notes:

    • Soldiers can actually promote if you randomize classes. I added logic to allow Soldiers to promote with the use of a Knight's Crest. In FE6 and FE7, they promote to General, while in FE8, they get the choice of General or Paladin.
    • Lords can also promote with less exotic items, in case you're stuck with 5 Eliwood Lords. Most use a Knight's Crest, but Lyn Lord uses a Hero Crest instead.
    • Monsters in FE8 are also given promotions if you randomize classes. They use the item you'd expect them to, that is: Mogalls use Guiding Rings, Revenant, Mauthe doogs, and Bonewalkers use Hero Crest, Baels and Tarvos use Knight's Crest, Bow Bonewalkers use Orion's Bolt, and Gargoyles use Elysian Whips.
    • Note that random item effects are additive. Brave Bow will always be Brave, but may also get, say, magical damage.
    • Magical weapons (except axes) will automatically get 1-2 range if they weren't already (this is the only reason why Magic Weapons are a thing in FE6). In addition, Magic Swords and Lances will be assigned a random spell animation if they do not already have one.
    • Some item effects are mutually exclusive. Namely, Devil, Eclipse Effect, and Poison, because they cannot be combined with each other from a technical standpoint.
    • Some characters are always exempt from class randomization. Mostly final bosses and some big name NPCs.
    • The randomizer *potentially* works with other hacks/patches, depending on how involved they are. Repointed tables are ok, but obviously, the number of items or characters the randomizer thinks there are will be off, not to mention, it no longer knows who's a boss and who's a playable character. Patches that don't modify the game too much should be ok, but full on hacks probably won't work.
    • For FE6, please use the translation patch here: http://serenesforest.net/forums/index.php?showtopic=41095 before feeding it to the randomizer. I may do this automatically in the future for you (like Arch's tutorial slayer patch), but it doesn't do it right now.

    There are some other things, but you'll find them as you play around with it.

    I make no guarantees about this being bugfree. It went through v0.33, v0.66, and v0.99 before finally being good enough for a v1.0 release, so most major issues should be ironed out. However, there can still be other issues nobody has found yet. Please report them so that I can get them fixed.

  4. Hi Vincent!

    I've attached the decompressed version of system.cmp and common.m. Also FE8Data.bin if that's useful.

    common.m: https://www.dropbox.com/s/fot2kgqc8q0mvq1/common%20-%20Copy.m?dl=0

    A decompressed version of system.cmp: https://www.dropbox.com/s/z57ub36zixbyaj8/decompressed%20-%20Copy.cmp?dl=0

    And presumably the untouched FE8Data.bin: https://www.dropbox.com/s/x2w52gldd5pjasv/FE8Data.bin?dl=0

    Looks like I can't upload directly yet, so they're all dropbox links.

  5. So I've been reading over VincentASM's hacking notes for FE10 and decided to poke around in FE9 myself to see what I could extract out of it. My goal is to be able to change basic parameters, names, strings, portraits and textures (to a certain extent anyway).

    Right now, I'll just post findings that I have for it so that if somebody else wants to take a stab at it or has some ideas on things I don't have any guesses on, they can help out as well.

    Those without background should read up on VincentASM's notes, because they're really useful in even getting the basic understanding of the wall of hex you'll be staring at.

    That being said, I do want to add one thing that I don't think was in the notes, and that's how to change character names. There's no tool for this, so it's a lot of experimentation. Luckily, this text is not specifically compressed, so you'll be looking at ascii characters, for the most part.

    Anyways, if you open up Mess/common.m, you'll find a ton of strings in the file, followed by a pointer table, followed by a list of IDs. (For what it's worth, the Mess folder also has chapter scripts for each chapter, conveniently labeled with their number + 1 (prologue is C01.m) and those can be modified directly here.) Note that common.m cannot be modified directly, or rather, it can, but will have no effect. common.m is just a reference file, as far as I know. I'll be using it in the images, but changes need to be made in a decompressed version of system.cmp, which will need to be recompressed before being imported back in.

    Actual string values inside common.m: http://imgur.com/0mu1Ja6

    At the end of the string values, you'll find a ton of pointers: http://imgur.com/sMjVUJB

    The order of those pointers is determined by the ID table after that: http://imgur.com/HQnwVR4

    Those IDs will match what you see elsewhere when it needs to be referenced. For example, Ike's name uses a pointer that points to MPID_IKE in the data file. If you look through the ID table, you'll find MPID_IKE (at 0x1FAA7) sandwiched between Ikanau and Izuka's names. It's hard to map, but the position it is in the ID table matches exactly with its position in the pointer table. If you just search the file, you'll find Ike's name starting at 0xA10. Refer to VincentASM's notes on how pointers work in this case, but that value is important. Since the game offsets the pointers by 0x20, you'll want to subtract that to get the pointer that's encoded in the table. That gives you 0x9F0. So somewhere in the file, there is a pointer to 0x9F0. If you search for the hex value, which in pointer form would be (00 00 09 F0), you'll find this sitting at 0x18994.

    So, bear with me here, because I haven't figured out this part yet, but the value immediately before and after appear to be some metadata, because they just increase, as far as I can tell. (By which I mean 00 00 55 BF and 00 00 55 CB). Presumably those values are important, but I haven't figured out why yet. Perhaps they map to something else. In any case, you don't need to touch those. But if you skip one more on both sides, you'll find 00 00 0D F4 and 00 00 0D CC. If you calculate the offsets of those (i.e. add back 0x20), you'll find Ikanau at 0x0E14 and Izuka at 0x0DEC, which correspond to the two MPID entries surrounding Ike's.

    One more caveat to change names. As I haven't figured out how to expand the text array yet (or even how to make the file longer) without blowing up some fonts, you can't really have more than what's here, which is a bit of a downer. But you may have noticed the names have seemingly random spacing of 00 bytes between them. The reason for this is that pointers need to be aligned properly. The last digit of the address must be either 0x0, 0x4, 0x8, or 0xC. If you look at the ascii representation, you'll see every string in the file starts in one of 4 columns. You best do the same, or else the game won't give you what you expected.

    Remember, as I said earlier, common.m is ignored, as far as I know. These changes need to go into a decompressed version of system.cmp and then recompressed before imported back in. I use BatchLZ77 to do this, since it's the only one that does it properly for you to reimport without the game complaining. The steps you follow are the same, but here's some more documentation a decompressed system.cmp.

    What you'll notice at the top of a decompressed version is some seemingly random bytes and paths to a bunch of files. Those bytes determine where the data for each of those files lives inside system.cmp. For example, the very first entry has 16 bytes with some good information in it:

    00 00 01 08 - Looking this up quickly will see that this is pointing to what's just below, which is FE8Data.bin.

    00 00 02 20 - If you look at where this points to, you'll see that it's identical to what is normally in FE8Data.bin (which as in VincentASM's docs, is just a reference file as well). This is where the data starts.

    00 02 3D 2C - If you look at FE8Data.bin's length, you'll find the same length. So this looks like it's the length of the data

    00 00 00 00 - Divider/Separator, I'm assuming.

    Incidentally, these files also have some data in their own headers. Remember common.m? You'll find these bytes:

    00 02 2B 56 - The length of the file

    00 01 55 AC - If you see where this points to, it's the start of the pointer table (presumably if you try to expand the strings, this should shift as well).

    00 00 00 00 - Empty bytes it looks like

    00 00 09 E2 - I'm actually not sure what this is. It could be the number of entries, but I haven't counted.

    The header of these reference files will also be in the system.cmp file, so that's why you should know about them.

    Anyways, let's take all of this and do a concrete example. We're going to change Ike's name. At this point, I'm going to copy and paste from my notes that I took earlier.

    We should be able to find offsets for all of these in FE8Data.bin?
    Ike - 0xA10
    Titania - 0xA14
    Soren - 0xA1C
    Mist - 0xA24
    Greil - 0xA2C
    Oscar - 0xA34
    Boyd - 0xA3C
    What if we subtract 0x20 from all of those?
    Ike - 0x9F0
    Titania - 0x9F4
    Soren - 0x9FC
    Mist - 0xA04
    Greil - 0xA0C
    Oscar - 0xA14
    Boyd - 0xA1C
    The pointer table starts at 0xD6550. This table changes something, but not correctly... Ignore that, this was before I figured out the word alignment.
    Note: How did I find 0xD6550? You have to know where common.m lives in system.cmp. You want to find the entry that's within the bounds of that file, since you may find the above values elsewhere in the file too, but you don't want to change those. The header of system.cmp should tell you where common.m lives, so you should limit your search in that range.
    Ike's at 0xD9914
    Titania's at 0xD9C3C
    Soren's at 0xD6CA8
    Mist's at 0xD9A94
    Greil's at 0xD98AC
    Oscar's at 0xD9B34
    Boyd's at 0xD96F4
    So let's change Ike's name to "Otaku" (note how all of the other characters move to their nearest aligned word). With the space we have, we'll need to update quite a few names, but in the interest of saving time, we'll let Mist's name take the fall since we don't see her in my example chapter. Ike starts as he normally starts, but Titania now starts at 0x9F8, Soren now starts at 0xA00.
    Now we save that, and re-compress it and then put it back in with either GCTool or Gamecube Rebuilder (I prefer the latter). Assuming everything went well:
    Now the goal is to be able to increase the size of system.cmp and the text array table without blowing up fonts. :)
  6. Ok, I found the staff experience calculation routine using the debugger. I looked for either add rX #0xA or mov rX #0xA and found it pretty quickly.

    If anybody is looking into the EXP stuff for FE8, 0x2C676 holds the instruction that adds 10 to the experience gained. The actual instruction is add r2, #0xA and in hex, that's 0A 32. I didn't have time to track down the back trace of that to find what called it, but maybe somebody with more time on there hands can take a look at how it got there.

    In the meantime, if anybody wants to universally increase all staff experience gains in FE8, you can change the value there. The first byte of the instruction in little endian is the immediate value that's being added to the staff experience. By default, it's 10 (0x0A). I changed mine to 20 (0x14) so in my case, I replaced the value at 0x2C676 to be 14 32.

  7. Hi all, I've got another question for anybody who can help.

    I'd like to get a custom heal staff that's basically the same as a regular heal staff but with different EXP gain (among different name and description and whatnot). The easy way would be to figure out where the EXP routine is for FE8 and modify it there for all staves (which was my initial intent), but I haven't been able to find documentation on that. So if that's something that's already known, I don't have to create this weapon. But since I assume it's not yet known, I was just going to create this custom staff instead that had more cost per use to increase EXP gain in a very roundabout way.

    I've read Blazer's guide on the topic already and using the offsets listed below for FE8, I was able to find the tables there. I didn't particularly want to repoint just for a single item, so I just jacked an unused item's spot (Mine, ID 0x7A) and put my item there. I then copied and pasted the item usability entry and item effect entry for the Heal staff and pasted them where Mine's entry used to be. This mostly works. But now I'm running into three mildly entertaining issues.

    First is that while the usability condition works properly (i.e. only shows up when there's an adjacent unit that needs healing), the targeting system is borked. It still thinks it's dropping a mine somewhere (the scrolling text below also reflects this), so it targets all the empty spaces around the healer. If you actually go to confirm, it actually heals like normal. Maybe there's another pointer table for targeting routines?

    This leads to the second issue: the music that plays is the attacking BGM, instead of the staff BGM. I figure that's also located elsewhere. I would have thought making the item a Staff would be sufficient, but I guess not. (I sincerely hope IntSys didn't make another table to map items to BGM, but judging by what I've seen thus far, they probably did).

    Finally, it doesn't heal the correct amount. The target was missing 5 HP and the staff healed 4. Are there some other hard coded shenanigans going on in the game that's looking explicitly for a specific item ID to figure out how it works? I noticed the item effect table had the same routine pointer for all of the healing staves, so I assume that's just telling it to heal, but how much to heal is not specified here (yet another table?).

    Just to give an idea of what I have right now: http://imgur.com/a/HYdkF

    I know FE8 is not as well documented as FE7 is, but if anybody has any documentation or thoughts on this, that would be greatly appreciated.

  8. So I solved the first mystery, just in time for another more bewildering one.

    Turns out, Nightmare adds default entries for the spell associations for you? I looked back through the table of spell associations that I had repointed elsewhere, and I found entries for my custom weapons already in there. I don't remember putting them in there, and they were in some rather odd spots. So what was happening was, my custom axe already had an entry further up in the table that had set its animation to none. So it was never getting to my entry at the very end. Is Nightmare supposed to be doing this, or am I screwing up more and more of my game as I go on? The entries were too perfect to be random chance. It was a proper spell association entry with all of the right values for no animation. All of the other ones around it were also correct.

  9. I'm still experimenting with everything, but it seems like custom bows work at the very least, so all hope is not lost. Hand axes are just bugged. Damn boomerang effect.

    That is quite surprising that it hasn't caused bigger issues if the table is expanding into other potential data structures.

    That sucks about the hand axe thing. If I had time, I'd look into the ASM myself to do it in a more sane way, but I haven't delved that deeply into hacking just yet. Ironically, that means I'll just have to settle with hacking it together to get it to work for now.

    Thanks a lot for your help though. This is really useful info. :)

  10. I *believe* that hand axes are weird because they need to wait for the axe to return, which something like excalibur doesn't do. Someone who has more experience with animations would be able to help you more than I would (Rey? Alex?)

    I can buy that for why Excalibur broke the Hatchet animation, but that unfortunately doesn't help me with my initial issue of attaching animations to new weapons. It would be really lame if FE8 had a hard check on the ID. It's definitely not a limit on the number of spell associations, because even putting my custom weapon in place of an existing one didn't work. And unfortunately, that's the only thing I can think of right now.

    I also want to make sure that the right way of making new ranged weapons is to create a custom battle animation entry for every class that can use it and tie it back to the class itself. That seems extremely unnecessary, but it was the only way for me to get Ross to at least look like he's going to throw the axe instead of just standing there like an idiot carrying what he thinks is a melee weapon. It seems extremely wasteful that I have to create 5 battle animations All Axes, Hand Axe, Tomahawk, Hatchet, and now my custom axe working properly, just to get this working halfway. And that's just for Ross (Journeyman). I'd need to do it for Fighters, Pirates, Warriors, Heroes, Generals, Great Knights, and Berserkers.

  11. what happens is that, somewhere in memory, there is a table that maps an icon index to its graphic loaded in memory

    for example, if the "iron sword" graphic happens to get loaded into VRAM tile index 150 (this is a simplified example, so these aren't even close to actual likely numbers), the list will have "150" as part of its entry for iron sword

    the bug arises from the fact that the memclear operation that wipes this table only wipes the memory allocated for the vanilla table; I don't know how big that is offhand but if you've expanded it's definitely not enough. This causes less problems than you might think for reasons I won't get into, but it does mean that the later entries of the table don't get updated if you need to reload the graphic.

    Therefore, when you load, say, a newly-inserted "forblaze" icon into memory, it creates an entry at index 0xF3 that says the graphic is loaded into tile index 125. Five minutes later, you want to see that image again, but you've since cleared this icon cache. Because the table doesn't get properly updated, at that point, however, when you load the next set of icons, you might be loading an iron axe into tile index 125. What the game does is looks at the entry for forblaze, sees that an entry exists, and just displays whatever's there, even if the actual graphic has changed in the meantime. That's why your icons are swapping seemingly "at random".

    All my fix (which is actually unrelated to Alex's fix, it works perfectly as a standalone patch) does is to ensure that each icon is actually loaded before displaying by checking the icon index to a list that contains the indexes of all currently loaded icons (this list is always accurate except for very rare edge cases due to how the vanilla system works).

    Interesting. So it sounds like, there's an array in memory that's probably about as many items as I have (expanded) large, with each entry being either empty (needs to load from ROM), or an index of sorts in the graphics memory (is already loaded in RAM). And when it needs to clear this table, it wipes the only the first X entries (where X is the size of the original set) so that they're all empty or 0. But it doesn't wipe beyond that point. So icons at high indexes will appear cached, but may have been overwritten. So it's likely a lot more than just 0xF0 is bugged. I know the original set had a few empty slots after the last icon, so the first 3 or so are probably ok. But it probably breaks things beyond that as well.

    I wonder if this is also causing the initial issue I have where my first custom weapon shows up buggy at first. I suspect when the table is initialized, it probably also didn't clear beyond what it knew about, so that icon probably had some junk in there the first time it's viewed.

    In any case, thanks for the explanation. Working on a different bug with item animations in FE8 now. :) Having a surprising amount of trouble with getting custom weapons to have spell animations, especially after how easy it was with FE7.

  12. Thanks for the info. I think I'll temporarily avoid this problem for now by just making use of some of the empty space in the existing icon set. I should be able to fit all of them with those.

    I'm stuck with item animations now though. I tried adding the spell animation to a custom throwing axe using the Nightmare module, but the game just kind of stalls whenever the axe is supposed to be coming out. The music continues to play, but the game itself is effectively frozen. I tried it with a custom javelin item and it also hangs. Yet, all of the existing spell animations for existing weapons work fine. My only guess is that the weapon ID is out of range when it goes to check for the spell association. I tried overwriting one of the existing spell association entries (Hatchet) with my custom weapon's ID, and it still hangs. (hatchet also hangs, obviously because it's no longer attached) Then I tried changing hatchet's spell animation to make sure it was looking in the right place, and that seems to work (though perhaps it didn't like what I changed it to because it stalled right after finishing the Excalibur animation).

  13. Hi,

    I've been working on a hack for FE8 that uses new weapons with custom icons. I've gotten some of these to work properly, but now I have a weapon which shows up properly initially, but then glitches after a few turns depending on what I'm doing. I've seen it turn to junk, or turn into the lance weapon level icon found in the status screen. I'm not entirely sure why this one (and only this one) has an issue.

    Here's what I've done so far:

    I've moved and repointed the item data table and item icon table to 0x101E360 and 0x1020B60, respectively. I went through the ROM and changed all instances of the old address (0x809B10 and 0x5926F4) from their old values (10 9B 80 08 and F4 26 59 08) to their new addresses (60 E3 01 09 and 60 0B 02 09). I inserted the graphics using GBAGE starting at 0x1027B60 (which take up offsets 0xE0 - 0xF0).

    0xF0 is the icon that is glitching. As far as I can tell, the other icons are fine (mostly anyway, the one with icon 0xE0 shows garbage the first time, but then fixes itself).

    Am I missing something, or is there a glitch with weapon icons beyond 0xEF? I heard there was an issue with FE7 with some icons (though I'm not sure what the actual effects of it are) beyond a certain point.

    Just to show what's going on:

    Here's the weapon showing up properly initially. http://imgur.com/fweeUfI

    Here's the weapon showing up properly in the item menu. http://imgur.com/OC7cJQk

    I press down once and: http://imgur.com/BNhZyDP

    And now it's stuck: http://imgur.com/LHJKz2Q

    It turns to garbage later, I think.

    Any ideas?

×
×
  • Create New...