Weekly Report: 9th December 2019
Since last week's migration to data-driven features, FrontierNav is starting to feel a lot more powerful. I've spent most of this week ensuring more of the in-code features are covered by data-driven features. It's been a week of deleting lots and lots of code.
Last week I mentioned focusing on Lufia II's data entry, but I couldn't fight off the temptation of removing so much technical debt. I was constantly hitting it whenever I searched the codebase. So instead of putting up with it, I went ahead migrated the last 2 games: Xenoblade 2 and Xenoblade X. Xenoblade X is still a work in progress since it's the oldest and has the most edge cases.
Formula Properties Never?
One of the most obvious feature requests for the data tables are formulas. Since the tables are kind of like spreadsheets, having a way to use formulas seems inevitable. Whenever I need a new feature, the idea of using formulas always comes up but I always look for an alternative.
Formulas are too general purpose. It's code. And for a data-driven approach, introducing that will exponentially increase complexity when it comes to data retrieval, processing and migration.
Time will tell however as there may come a point where existing features become simpler when migrated to formulas.
Reaping the Rewards
While I was migrating Xenoblade 2, everything just started falling into place automatically. That's the great thing about having a data-driven approach to problems. Add an icon in one place, and everything connected to it will use the same icon. Change a relationship to go elsewhere and everything else follows it immediately. It really does "just work". I haven't hit a data-related bug for the entire week.
- Migrated Xenoblade 2 to be data-driven.
- Migrated most of Xenoblade X to be data-driven.
- Entities can delegate their colour and thumbnail to a relationship.
- e.g. an Item can say that its colour is based on its Rarity.
- Introduced "Fill Cells" to populate cells with the same value as another cell.
- This reduces a lot of repetitive data entry.
- Introduced experimental "Tunnel Properties" to allow Entities to delegate a property to a relationship.
- e.g. a Location has a Region and Area. Instead of setting the Region in both Area and Location, Location can say its Region is the same its Area's Region. So changing the Region in Area, changes it for Location automatically.
- Tunnel Properties are recursive, so a Tunnel can point to another Tunnel and so on until a value is reached.
- Introduced experimental "Bulk Edit" to generate text values based on other values.
- In the future, this may change to a "Formula Property" to avoid data bloat where values can be generated on the fly, but as mentioned, that comes with downsides.
- Introduced icons for Entity tags to better visualise them.
- Migrated some maps to use icons from data rather than hardcoding.
- Migrated all Entity list items to use the same layout.
Thanks for reading.