Breaking the Limits of FE1 (Thoughts and feedback welcome!)

Hi there.

Normally, I work in the shadows, only releasing when my project is absolutely finished. This was because I felt there’s a sort of “curse” where if you announce your project too early, it’ll never get finished. Today, we’re going to try something different.

I’m working on a very big FE1 project (well, actually, it’s kinda a bunch of projects), and I’m going to share my developments so far. If you have ideas on what would make the game more fun to play, I’m all ears.

I’m greatly expanding the kind of hacks that are possible within the NESFE engine by adding a number of mods. To decide what’s worth adding, I have two primary goals:

I add whatever mods…

  • Make the game more fun
  • Make the game easier to customize

So here’s a few of the notable mods so far:

Expanded ROM

Details

I’ve finally decided to upgrade the ROM space from 385 KB to 768 KB. This means all the “free space restrictions” of the original game will stop existing. The spaces for both code and graphics are doubled, with all the new banks being completely free for use. What this means for FE1 hackers is that more chapters, units, enemies, items, classes, character portraits, and so on are all possible.

The expanded ROM has been tested working on FCEUX, Retron 5, and Mesen. This means future FE1 romhacks should be playable on every emulator. The only platform not supported is the original Famicom cartidge. I believe this is worth it, as original hardware is really the worst way to experience the game (prone to random crashes, loss of data, poor video quality, need for expensive cartridge writing tools, etc.) If there’s another emulator you use, let me know and I can test it.

DTE Encoding

Details

In addition to the two dictionaries used for text compression already, I’ve added Dual-Tile Encoding as an additional form of compression. This allows you to cram even more text into the game than before. I’ve been working on a button for Basilisk that will let you even generate DTE and dictionary files for your own game scripts so you don’t have to make them yourself.

There’s just not much to show for this feature, 'cause it’s just text encoding. However, once I’ve moved each game script into its own separate text bank, you’ll never have to worry about whether your game text will fit in the ROM or not.

Here’s what Chapter 1’s intro looks like in its entirety, fully compressed. It’s the bytes that are colored blue:

Custom Map Palettes

Details

I’ve added additional code that allows you to assign a specific palette to each chapter in the game, with accommodations for the future “more chapters” mod which will allow up to around 80 maps.

There are 16 unique palettes you can assign to chapters. I figure this should be plenty. Here’s examples of some I made to test the feature out:

(Also, better graphics mod is WIP. Some graphics here won’t be final)

fceux64_g2JyQyj9HH
fceux64_ATDcJPYm0K
fceux64_akpe5ONcke

Faster Map Movement

Details

Units will move at x4 speed on the map as a built-in feature.

Original:
fceux64_oBJUsjGpGP

Modded:
fceux64_vE75a4ARnv

This was accomplished by simply calling the “move unit sprite” routine four times rather than one.

Well, this WAS a mod. For players, it worked in for every instance except for when you didn’t move. I plan to re-implement this once I find out what went wrong.

It worked for enemies at one point too, but broke on Gharnef for reasons unknown.

Press Start to View Growths

Details

Normally, when you press A after selecting a unit, it opens the stat screen. Now, if you press Start instead, it’ll show the units growths in the form of a “star rating”.

fceux64_YZyDXfJk1I

I chose this system to give players a general idea of how units will perform rather than telling them outright. I believe this will make the game more fun, perhaps entice people to give some units a chance when they otherwise wouldn’t.

I coded this in such a way that the “star ratings” can easily be replaced with the actual numbers.

The sister feature to this mod, “Press Select to View Battle Forecast” had to be paused because I still have to refactor a bunch of things first. I want the attack power calculation to account for my future mods, like Anima/Light/Dark magic and more elemental swords.

Debug Walk

Details

Technically, this was already in Illusion of Serenity, I just never told anyone about it. :stuck_out_tongue:
The button has been changed from Start to Select.

Hold Select (and nothing else) while pressing A to end turn, and your unit can move again. This is useful for testing maps. Ability to disable this for finished hacks will come later.

fceux64_fWEsmYYwix

Other planned features:

  • More classes, reworked promotion trees
  • Chapter intros and events can choose from more music tracks
  • As mentioned, Press Select to View Battle Forecast
  • Separate magic tomes into Anima, Light, and Dark with reworked weapons (e.g. Aura → Resire)
  • Gain EXP from using staves
  • More/reslottable weapons
  • Reworking classes (Fighter and Hunter replaced with Warrior (Axes+Bows), Clerics use Light Magic, etc.)
  • More but I can’t remember them all right now

There really isn’t anything you can play quite yet, as I have much to do. Both the base ROM, Basilisk, and project template are all going to need major updates.

I’ll post more mods as they come provided I don’t lose interest at some point.

And one more thing… don’t quite want to announce it yet, but here’s a teaser as to what’s coming with this:

Runner_H1DvU9nLbN

20 Likes

as an fe1 fan my eyes are wide, wide, wiiiiide open. GOOD WORK SO FAR!!! KEEP GOING!!!

1 Like

All you’re doing is really cool! I especially like the bit where staff users gain exp. That was really needed imo. I wonder if you can make significant changes to color palettes. Like making grass orange for a fall feeling. Also thanks for that debug tip, I will have to try that for getting to chests easier.

1 Like

You are literally a HERO—you’re laying the groundwork for a whole new Fire Emblem romhacking scene!!!

1 Like


some seriously sick stuff here. especially in love with the variable palettes. will retire from febuilder and just make nesfe maps forever if gaiden ever gets love like this. if youre using this post as a barometer for what features people want i think weapon stats not being viewable ingame is honestly the worst thing about fe1 ux

3 Likes

Holy hell. As a contributor to the original FE1 PME by Norikins, I welcome this wholeheartedly. The Maker preview already looks peak.

Being able to change the crit/crit avoid formula might be a feature worth implementing? Like, I wouldn’t change it by default, since everyone facing crit vs. most enemies is an iconic part of the fe1 experience, but having the option to change it would be nice.

Would it be possible to add class-specific growths for enemies? IIRC they all use a kind of jank leveling system in vanilla fe1. Changing how promoted enemies calculate their stats might also be worth taking a look at.

Currently cooking up more mods!

Moved four of the big game scripts into their own banks: houses, villages/outros, intros, and recruitment dialogue. Each of them should support up to 127 dialogue line slots now. It shouldn’t have worked but it did.

This seems good. There’s not really a good existing menu to attach this info too… except, perhaps, if I could add a third option to the “Item” map menu called “About”. It might be possible to make it print dialogue with an item description and stats. I’ll look into this.

I can change it myself, no problem. As for other people changing it, that’s going to require a feature to allow people to inject ASM code into the ROM. Designing something to do that’s gonna take awhile.

What would you change to the formula? I could reasonably add an on/off toggle to an alternate crit formula, but what is it that needs to be improved?

I think this should be possible. I’ll just have to build a class growth table, probably based on Monshou. I don’t know how this is going to affect balancing though. At least, I can add this change to properly add Resistance and Magic (weapon Lv is gone) to enemies.

If you’re taking suggestions, I’m not sure how practical it would be, but how about replacing the bars in combat with the combat stat numbers like in FE3 and on? Three digits need a lot less screen space compared to the bars though, and even adding in crit chance like FE3 would still leave a lot of empty space.
This does look very nice: I’ve played around with FE1 before, but Time for Tom and these new assembly hacks are a lot more impressive compared to my one-chapter contest entries.

2 Likes

Maybe just the gba formulae for it? So crit=skl/2, cavo=lck?

Would that be customizable? I’m not sure what type of bird it makes me, but 4x is too fast for me.

As for ideas, I was playing FE1 for the first time a few months ago and was very impressed how ahead of its time it felt. My only gripe was…the godawful way ambush spawns work. It amazes me that Famicom Wars came first, yet didn’t have any of those NES‑isms as I call them, then this game thinks endless spawns from forts you can’t reach is a cool idea. (Though, I have to admit I played on your previous joke build of Switch Edition, so I can’t be 100% sure what was original)

Anyway, this is cool beans. I remember reading you don’t get enough attention for your FE1 efforts, so I hope you finally get a good foothold here. There are always people willing to play and use this stuff, though, so I never think such efforts are wasted like that.

Been hard at work! Unfortunately, most of it is behind-the-scenes code stuff which doesn’t have anything flashy I can show.
I do have a few new ideas on things that could really expand what we can do with NESFE. However, they might be controversial! But first, the changes.

Automatic Dictionary Optimization Button

Dictionary compression, and the new DTE, are what allow you to put basically as much text as you want in FE1. In the past, you’ve had to define the dictionary entries yourself to make use of this feature. I, for example, used a convoluted system of pasting all the game text into YWriter7 and picking from the “word count” list, then using Python scripts to sort them by size. No more.

Now, all you have to do is press this button circled in yellow, and DTE / the two dictionaries will automatically optimized for your game script. It’s really that easy!

More Text Space

All compressible dialogue has now been moved to its own banks. Now this includes shop/item dialogue, outros/villages, and recruitment dialogue, plus extending the number of dialogue slots to 127 for each one. Sometime in the future, I need to add compression code for the battle dialogue as well to support custom death quotes for every enemy unit.

Reworking Battle Code

I’ve moved a bunch of relevant battle code into its own bank, and I’m in the process of moving all the item tables into the same bank. This has a number of functions, such as supporting additional/reslottable items (127 items instead of vanilla 92).

I also need to make sure all of the battle calculations are good. I reworked my “weapon triangle” mod to accommodate the new magic triangle. The disadvantage penalty has been raised to -25 hit. I plan on making this number configurable, along with stuff like stat caps.
The hit rate algorithm itself is now based on Monshou no Nazo instead.

I will look into the optional GBA crit routine, which will be toggleable in the end.

Mars Sprite

Okay, so maybe I do have something to show. I whipped up a port of the Monshou Mars/Lord sprite in about 15 minutes. I’m looking to replace all the map sprites with Monshou’s to look nicer, but I have to rip all the sprite frames myself sadly, and that’ll take awhile.

fceux64_x11nn9qM73

I’m going to have to do some more modifications to the tileset in the hopes of allowing more classes in the game, as map sprites share the same graphics page and I need to free up space.

I’m not happy with the ocean tile at the moment. If you have an idea for a better animated tile, I’m all ears! It needs to have 3 frames (or not animated, like it is now), and the only colors you can use are black, green, blue, and white. If it only uses one 8x8 graphic tile, even better!

And now, the controversial bit.

Proposed Big Changes

So one of the biggest obstacles to modding in new things are the battle animations.

So I’ve done some investigating into how battle animations work, and it’s a big steaming pile of spaghetti code. Everything takes place in bank 0x5 (0x14010 - 0x18010). It’s a series of checks using the class ID, sometimes using the weapon ID but not always. Some classes switch the weapon sprite based on whether the item ID is less than a certain value. For example, any ID smaller than 12 is considered a sword. I’ve already fixed other checks to allow swords on any ID value, but the game has separate ID tables for many classes in the game. There’s a ton of other random tables scattered throughout the bank, handling projectiles, movement speeds, stuff that I haven’t quite figured out yet.

All this to say, I’m going to have to write a ton of MORE spaghetti code just to make the original code respect weapon types correctly AND not crash. Trying to create completely new animations is going to require a ton more research into understanding how it all works. I just don’t have that in me right now. If some clever, daring soul were to research it instead though…

But there is a way to make battle animations not an issue.
In fact, it’s already a part of the vanilla game:

Turn them off.

It should be trivial to always enable the option that turns off battle animations. Here’s the pros and cons of this change:

Pros:

  • Any class can use any weapon without the game crashing
  • No additional code is needed aside from the bit forcing battle animations off
  • The “more classes” mod can be added much sooner into NESFE
  • Existing classes can be customized much quicker
  • Battle scenes take significantly less time to finish, maps can be played much faster
  • Users don’t need art or animation skills
  • More graphic space for portraits or bigger battle sprites
  • Sprites not depicting the correct weapon held will look much more intentional since they don’t move

Cons:

  • No battle animations

But are we really missing out on anything?

BATTLE ANIMATIONS ON:

fceux64_39ALI1zE86

BATTLE ANIMATIONS OFF:

fceux64_q0OqPlUob7

Is there any other reason why I shouldn’t just turn battle animations off for good and allow class customization as soon as possible?

And one more big on, though I think less controversial:

I’d like to add features that depend on player progress, like storing Support Points between units. Or, more ambitiously, it is theoretically possible to program “fog of war” into the game like the developers originally intended. However, there’s not enough RAM to do this yet.

The game developers have used up nearly all the available RAM for the game. There’s no way to get “more RAM” without working up some massive ASM voodoo magic that completely changes how the game runs…

…except there is one way. The developers already knew about it.
FE1’s programmers got more RAM for their game by using the game’s save data space, SRAM, as functional RAM. A bunch of game data sits in SRAM in addition to your save file.

If we remove the second save file from the game, that frees up an extraordinary amount of RAM/SRAM for mods.

The second file was fine back in the day when all you had was a dinky Famicom cartridge, and you lived in Japan, and you had a sibling, who also happened to be into Fire Emblem, and also wanted to play the game at the same time as you.

But outside of that scenario, you’re really just not using multiple save files in today’s day and age. With emulators, you can make an infinite number of separate save files, created in seconds. Save states are also a reliable way to protect your progress, or even “branch” your save progression into multiple paths, all with simple keystrokes.

Besides, last time I tried to play through vanilla FE1 on my actual cartridge on my actual Famicom complete with buzzing and screen flicker, the cart decided to wipe BOTH my save files halfway through the game.

Just wanted to know if these two big ideas are going to be met with vicious backlash from potential fans before I decide to commit to them. If these changes would make you refuse to make FE hacks, please say something. I’ve been a very poor judge of what audiences want in the past.

The latter idea, removing file #2, is not going to come for a long while, so I wouldn’t worry about it too much. It would mostly be important for really big mods further down the road.

That’s the noteworthy changes so far.

You did? Cool, thanks! You played the more recent version that plays like vanilla, right?
If Chapter 25 seemed completely normal, then that’s a yes. Just curious.

4x movement speed would probably end up being like many of the other features: I add an option to remove the mod. Removing mods will be a feature that will come shortly before release, whenever that is.

I’m thinking that ambush spawns being a nuissance is something that comes down to the map design. Kaga’s a pretty ruthless designer. In my mods, I’ve tried to telegraph where spawns come from with stairways, special forts, or hallways, and spawns are always well out of the player’s intended path.

Spawns, endless or not, serve a very important role in making NESFE hacks. Only 20 enemies can be present on the map at any time, so having reinforcements lets you have enemies after turns have progressed and players have killed enemies, getting around this limit.

I struggle to think of any way to prevent ambush spawns from being annoying. Perhaps, the “FUNDS” menu box could display the first turn enemies will spawn or something?

This is something I plan on looking into soon. It IS possible! I remember getting it to work a few years ago. I only reverted it because it broke on the enemy side or a few edge cases or something. Sadly, I’ve had to change computers and can’t find the drives which would have the proof of this in action.

I’m much more experienced with assembly now, so I’m going to redo the feature from scratch. I might just re-arrange ALL the info on those boxes to make them more useful.

Here’s what that would probably look like:

If anyone else has a better idea on what the battle boxes should display, let me know! :smiley:
I can program just about anything.

A full public release of this stuff is gonna take awhile. However, I’m thinking it might be a good idea to throw the work-in-progress patch and Basilisk files up for download soon. That way, if someone else wants to play around with FE1’s code, see what breaks, or maybe somebody better at assembly than me can come in and tell me how to do things better. More FE1 research is always welcome! It’s currently a one man show here in Polinymland.

Phew, that was a lot to write! That’s the status update for now.

4 Likes

I would prefer battle animations to stay.

1 Like

Really cool to see you make FE1 modding a thing! Battle animations are one of the franchise’s biggest strengths though, it would be a shame to sacrfice it.

1 Like

polynim_watr

abc abc animated on the left pair, abcba on the right pair.
image
With different BG colors so that they’re easy to tell which one is which

Having made these, I feel like the correct approach is definitely going to be leaning more on the dots-like approach that the original water has, whole waves are kind of busy and would rather have more than one character tile to work with…

i mean if you give me an fe1 battle animation editor i am going to make animations for it. and blackmail some other people into doing so. :)))))

animations are cool and are the reason i am here. and while a bunch of fe1’s aren’t great, a lot of them also have a particular charming cuteness to them. they’re very nifty.

I would personally say that, like, fe1 having actual animation means it isn’t ‘a complete fe1 editor’ unless it has some ability to mess with those. but i empathise with the position that “wow, all of this is garbage” and also “i don’t want puzzle out how to be able to read that”

2 Likes

1 billion% in favor of nuking battle animations especially if it makes editing classes easier and allows more cool stuff to exist. i never play with animations on in any game even though i love the nesfe ones with all my heart

1 Like

I downloaded it from here, FEU, and it was before you made the final post explaining the joke. You had said it was an older patch that was here, I believe. Anyway, I stopped right after finishing chapter 9 due to getting burnt out, which is solely a me problem. I just don’t vibe with Fire Emblem like I can with Advance Wars; the way I react to enemy stats has me turtling a bunch in FE, but in AW I’m very much so able to be aggressive. I went back to finish Sacred Stones, however, which I had abandoned last year, so I’ll definitely be back to visit FE1.

The issue I had with FE1’s spawns was the fact that the enemies were invisible until you triggered them. Once you got in range, they would manifest and attack you. Made it really difficult to trust I was sending a unit that could take the hit even when it was a really obvious spawn point. My thoughts were they should either not spawn until player phase or they should be spawned ahead of time. Hmm, though knowing there’s a 20 enemy limit explains why the latter can’t work. In that case, my own theoretical FE1 rebalance would have them be player phase spawns if they’re range- or area-based.

And also, maybe certain ones shouldn’t be endless, such as what was going on with chapter 9. That one really felt ridiculous to me because the game told me I should grab the treasure from there, only to find out the thing is a death trap and those pirates snowball fast. Thank goodness I fed Marth so well and formed a train of units to backpedal out of there with the Wyrmslayer in tow. Still lost a guy, though. (Didn’t even use the Wyrmslayer, anyway. Merric got a crit)

But, like, I understand FE1. I appreciate what it does, too. I just really don’t like the way ambushes function in it. And, I can take ruthlessness, as I’ve beaten the final battles of both SNES and NES Wars games, but I would expect a situation so extreme as endless spawns on a peninsula to be nearer to the endgame!

All reinforcements are turn-based, not zone based. I guess FE1’s map design was good predicting where the player would be by each turn that it feels like the enemy is reacting to your movements.

Wow. Haven’t been read that hard since Smash Ultimate’s CPU players. Legit, there was even a chapter where I initiated combat with the boss, then the reinforcements came in as if the boss quote triggered it. But, like, you mean they legit don’t spawn in the instant I enter their range? Because there was also a chapter where I was fighting the boss and had time to kill with other units, so I went backwards to bait some ambushes and the music changed from “almost victory” to “standard” mid-turn because they seemingly spawned off-screen when I inched closer.

I’m fairly certain that reinforcements are always turn based. One of their bytes defines their “spawn turn”, and if that value is greater than 0x80, I believe it triggers endless spawns on spawn_turn-0x80. I wouldn’t put it past Kaga to add some check for distance to the player, however. Further research will be needed to confirm exactly how it works.

It seems removing battle animations is fairly unpopular going off this small sample, so I guess that’s out for now.

I will try to make battle animations at least not crash the game. Customizing animations will probably be a long way out then, even more so modding in additional classes.

I’m thinking I should prioritize getting something people can use out first rather than something with the most modding support. Even sooner, I’d like to get a somewhat stable version that people can play with a little if they’re bored and feel like helping me test it.

Pretty cool, thanks!
I guess I forgot to mention, the version of water I use now does use two tiles, so you actually have two tiles plus the option for any of the four tiles to be a solid color.
I can technically use four unique tiles but I’d hate to waste too many tiles on the water.

The animation pattern is indeed a, b, c, c, b, a.

I only worry that animated tiles might be distracting to the player, but I dunno… I might try testing some of your ideas when I get a chance.

1 Like