Codex Overhaul

First off: what the heck is the Codex? It’s basically an in-game encyclopedia where you can look up ships, weapons, and so on. The current implementation is very, very old and and this point really showing its age – frankly, it’s clunky and not very useful, but on the bright side, it’s also not strictly speaking a required feature, so it was fine to leave it be for a while. I’ve been on a roll with QoL work lately, though, and the game is certainly far enough along now for a proper Codex rework, so I decided to jump into it – I’d have to do it at some point!

I started working on the Codex update with a sort of standard question to get my bearings, design-wise – “why is this in the game?” That’s a question with sharp edges, because if there isn’t a good answer, then maybe it should be cut instead, and the time and effort put into other things. Obviously, that didn’t happen, or we’d have a much shorter blog post!
However, I didn’t have a great answer at first. “Some ships and weapons have longer descriptions than what fits in the tooltip, and it would be nicer to read them in a larger font, besides” and “it’d be nice for the player to look up stuff they don’t have access to in-game right then” – which, alright, that’s not *terrible*, but not great either.

Fundamentally, though, the concept of a “Codex” is just fun. It’s a place for the game to showcase a lot its content, though it needs to be done in a way that doesn’t spoil it. And, of course, if it turns out to be an actually-useful reference, that would be ideal. So, it’s definitely worth working on, and I started on the overhaul without having a very specific idea of where it would end up. Sometimes, you just don’t know what’ll spark until you actually see it in the game.

Related entries
In this case, what really got things rolling is the idea of having a section for “related entries” that showed you, well, entries that are related to the one you’re looking at. The initial thought was, when viewing an entry for a ship, to show its built-in hullmods as related entries you can click on to check out. That sounds good – it’s a way to learn about a ship without doing a ton of digging around tracking all these entries down manually – and I hadn’t really thought about it beyond that.

So, I did that – put together a basic Codex UI – all new code, but the same basic layout as before, with a list of categories/entries on the left, and detail on the right, that just makes sense – and added ships and hullmods. What I didn’t expect, and what made the whole thing take off in terms of usefulness, is making the relationships go both ways – the entry for the hullmod would show you all the ships it’s built into.

This is actually really interesting information that’s hard to get at otherwise! You can see, for example, every ship that has Rugged Construction built in. Or the Ballistic Rangefinder, or all the Automated Ships. Doing the same linking with ship systems lets you easily see all the ships the share the same system.

It’s a qualitative¬† difference – it felt like it let me get a clearer picture of all the stuff that’s in the game, and how it’s connected. That was really exciting! And I think that’s where the primary value of the new Codex is, in letting you explore the relationships between things. It’s not just “let me get a little bit more info about the thing I’m looking at”. It’s “let me see how it fits in with other things, and learn about those, too, if I want to”.

This solves a bunch of minor but nagging problems with the UI – “I’m looking for a ship to buy, what do these built-in hullmods do?”, or “I’m looking at a skill and it unlocks a new hullmod and an ability, what do those do?” Now, there’s a way to find out!

With that, let’s stop with the how-it-came-about and dive right into how the new Codex works. First, I’ll go over the major features, and then spend a bit of time going through each category; some of those have more noteworthy things to talk about than others.

Codex navigation
As I mentioned, it’s the same basic layout as before, with an entry list on the left and a space for details on the right. The basic categories are Ships, Stations, Fighters, Weapons, Hullmods, Ship systems, Special items, Industries, Commodities, Stars & planets, Planetary conditions, Skills, Abilities, and Gallery (more on these later).

The UI keeps track of the history of the entries you’ve looked at; you can go back and forward through it by pressing the on-screen buttons, the arrow keys, and the Q/W keys. For example, if you select one ship and then another to compare their stats, you can press Q and W to go back and forth between them instantly. Or, if you’re looking at the entry for a ship and click on a related hullmod, you can press Q (or any of the other options) to get back to looking at the ship.

If the entry is longer than what fits on the screen – meaning, there is a scrollbar – the history remembers the position of the scrollbar, so you go back to *exactly* where you were. The goal is to make navigation smooth and painless, so there’s as little barrier as possible to exploring the connections in the Codex.

There’s also a button to go up to the parent category, with similar shortcuts. Right now the top level has all the categories, and none of the categories have nested sub-categories – just entries – but nested categories are supported, in case that’s needed in the future. And, there’s a button to open a random Codex entry – if we’re being honest, that one’s just for fun.

Most categories have a set of tags – based on the entries that are in them – that can be used to filter the list. For example, you can choose to see all of the Destroyer-class ships that are also Low Tech, or all of the weapons that deal High Explosive damage and are also Beams, and so on.

As I mentioned earlier, each entry has a “related entries” list – it’s the same UI as the main list, just embedded in the entry’s detail, generally on the right side of it.

And, finally, there’s a search feature that searches through the entry names. The entries whose names start with the search string are shown first; other matches are shown later. This is mostly just there so you can go to a specific entry more quickly – open up the Codex, press Ctrl-F, type in “ons” (the search is not case sensitive) and you can select the Onslaught’s entry in a few seconds. The list of search results is updated immediately as you type.

Codex integration
So we’ve got something that’s useful, but how do you actually get to it? There’s a Codex option in the main menu and the campaign menu, and a button you can press to show you the entry for a ship – from the fleet screen, and from combat. That was good enough when the Codex was more of a “you’re really digging deep for a bit of extra backstory” proposition, but for a feature with more immediate usefulness, that’s just way too much of a pain to access. It needs to be smooth and slick! It needs to be available everywhere, instantly!

Thus: pressing the F2 key pretty much anywhere in the game will instantly bring up the Codex. This works mid combat, while in another dialog, just – anywhere. In addition, in many screens¬† this action is context-aware and will open the Codex to the right entry immediately. For example, pressing F2 in the refit screen will open the entry for that ship, pressing it in the character screen will open the entry for the currently displayed skill, pressing it in combat while targeting a ship will bring up that ship’s entry, and so on.

In addition, when viewing a tooltip for any of the things that have related Codex entries, pressing F2 will bring up that entry. For example, you might mouse over an Alpha Core in your inventory, and press F2 to open the Codex directly to it from there. Tooltips that support this have a “Press F2 to open Codex” prompt at the bottom.

The goal is, again, to make the interaction flow as smooth as possible. As in an earlier example, if you’re looking at a skill and want to know exactly what the hullmod it unlocks does, you can press F2, click on the hullmod in the related entries section, and then press Escape to get out of the Codex and right back to what you were doing in the character screen. It’s fast, it’s always there, and you don’t need to stop what you were doing to access it.

Unlocking Codex entries
It’s important for the Codex not to be a spoiler, so some entries – for example, [REDACTED] ships, or special items you might find, or even AI cores – need to be unavailable at first. On the other hand, it shouldn’t be a grindy slog to unlock the Codex into a useful state, so most things start out unlocked. If it’s something you could find just by browsing a typical colony market, chances are it starts out unlocked. If you’re curious, the Codex has around 800 entries total right now, a bit under 200 of which start out locked.

For the entries that are locked, the way to unlock them is generally to either 1) have the item in your possession, or 2) look at the tooltip for that item. The latter is enough to say that the player is aware of the thing’s existence now and showing the entry won’t be a spoiler; I don’t want the process to be more onerous than that. For ships in particular, encountering them in battle will also unlock them for the Codex, so you wouldn’t have to mouse over every enemy just to make sure they got unlocked. Once an entry is unlocked, it stays unlocked across all of your saves.

A very few special ships don’t have Codex entries at all, but for example even the Ziggurat does have one.

For veteran players, there’s a setting in the config file that will just unlock the entire Codex. And for players that are bothered by the “Locked” entries just sitting there, mocking them – there’s a config setting to hide those.

Now, let’s take a closer look at all the categories! I won’t talk about every single one, just the ones where there’s something to say beyond “yep, it’s there”.

By default, the Ships category shows the base hulls – that is, the ship with all of its weapon slots empty (except for built-in weapons), no hullmods (except for the built in ones), no fighters, and so on. You get to see the ship in its basic state with its stats unaltered by hullmods and other loadout choices.

But, if you’re opening the Codex from the fleet screen or from the refit screen, or anywhere similar where you’re looking at a specific ship, then it *will* show you the details for that specific ship and its loadout, including “related entry” links to all of the weapons and fighters it has mounted, and all of the hullmods it has installed.

One of the tricky parts in making this work was the layout of the detail entry – the stats panel that’s in the ship tooltip is too wide to fit in the space available, with the list on the left and the related entries on the right. So, I ended up squishing it down a bit, which required shortening some of the labels in the stats panel. For example, “Fuel cost / light year” became “Fuel cost / ly”, “Recovery cost (supplies)” became “Recovery (supplies)” (that it’s a cost is hopefully clear from the context), and so on. In the screenshots, it might look like there’s plenty of room, but sometimes the values can be much longer than normal. For example, instead of “10.0”, the maintenance cost might be “3.5 (-6.5)” if it was modified by a hullmod, etc; below is a screenshot where the values take up more space.

This all sounds like such a minor thing to worry about! And in some sense it is. But at the same time, little details like that matter when trying to make a UI layout actually work; it’s more important than it perhaps sounds. It’s minor, but it also *has* to work – and at first, I wasn’t even sure if I’d be able to make it work out!

This category shows orbital stations and similar! I thought about just rolling those in with ships, but ultimately it felt better to keep it separate. Each station is linked to the modules that it uses, and you can click on those to view them individually.

Like with ships, when viewing a specific station, it will show you the actual loadout instead of having it be an empty hull. And, incidentally – the Ships category supports modular ships (which are fairly similar to stations in terms of the implementation), though right now this only comes up for mods.

This was one of the more straightforward categories to implement, The data panel fits nicely alongside a display showing the fighter wing, and leaves just enough room for the related entries list on the right. Yes, worrying about the minutiae of the layout is a recurring theme!

The nice thing here is all of the hullmods and weapons the fighter uses, along with its ship system, are related to the fighter entry, so you can very easily dig into the specifics of its loadout.

With weapons, the layout got trickier. I’d love to have put the related entries list closer to the top, but couldn’t find a good way to lay out the stats panel and the description text in that case. They don’t all fit next to each other – the text gets way too narrow. Putting the text and the stats in a column doesn’t look good, either – the stats don’t take up enough horizontal space.

I also wanted to make sure the stats were always in the same spot, so it would be easier to compare them when flipping between two entries, so that was another layout constraint. In the end, we’ve got what you see here, which I’m quite happy with, especially since weapons tend to not have too many related entries on average.

Something you might have noticed here, and in some of the previous screenshots, is a list of factions under the description. In the case of weapons (and hullmods), it’s a list of factions that more commonly sell them – not a list of all the factions that use the weapon. For ships and fighters, it’s all the factions that use them, so it’s less of a guarantee that you’d be able to find them for sale at their colonies, but still a useful bit of information. A tooltip when you mouseover the faction explains the distinction.

It’s similar to the related entries section in its role – it helps link the item the entry is about with the rest of the game world. And hopefully it will help answer all the “where do I get this weapon” questions that seem to come up quite a bit.

The detail for the hullmod entries is the hullmod tooltip, spruced up a bit, and augmented with a bit more info Рand of course, showing what the hullmod is related to Рthe ships that have it built in, the skills that unlock it,  some weapons that it might particularly benefit.

I’m rather pleased with how the hullmod tooltips look here with just a larger font and a few minor tweaks for some specific tooltips!

Ship systems
This one’s a bit special in that you don’t unlock ship systems for the Codex – rather, they become unlocked if any of the ships using them are unlocked. Also, ship systems do not have full-color icons – just the grayscale ones used in the combat UI – but giving them a color works just fine for showing them in a list here, and even makes it more immediately clear that something is a ship system.

At first, I just showed the basic system description in the entry, but that wasn’t very helpful (even if most of the value comes from the links), so I ended up adding a “System data” section, showing all the stats such as flux generation, cooldown, etc – and a more detailed “effects” section, giving some number about what the system does.

Special items
This one’s got colony items, AI cores, blueprint packages (linked to everything in them!) and similar. One of the few categories that starts out mostly locked. For colony items, you can see what industries they slot into, and what conditions they interact with.

A minor but I think interesting detail – most categories are sorted alphabetically, but in the case of skills, they’re sorted in the order you see them in the character screen, to make it easier to navigate. The main usefulness here is being able to check out the related hullmods and abilities – though just being able to read the skill’s effects in a larger font, without having to keep your mouse over the skill button, is nice too.

This category has all of the illustrations you encounter in the game! Most of them start out locked, and they are unlocked simply by seeing them somewhere. You can zoom in a bit by mousing over the image. It’s a bit of a hard hat area right now; still needs some proper names for each illustration – the ones you see in the screenshot are placeholders.

Modding support
The Codex is highly moddable – it supports fully custom entries, new categories, a nested category structure, and custom tags for every category. Modders also have control over what’s unlockable and what’s not shown in the Codex at all. The linking between entries is mostly automated, but supports manual links being made for associations the automatic code doesn’t pick up.

All in all, I’m very happy with how the Codex overhaul turned out! It’s gone from being something that was almost outside the game to playing an important role and being an integral part of it. I can’t wait for you to get your hands on it and see for yourself!


Comment thread here.


Tags: , , , , , , , , , ,

This entry was posted on Saturday, May 11th, 2024 at 1:10 pm and is filed under Development. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.