AI War 2: Building Multiplayer

From Arcen Wiki
Revision as of 20:16, 30 June 2020 by X4000Chris (talk | contribs) (Version 2.087)
Jump to: navigation, search

Contents

Known Issues

  • Multiplayer is disabled but coming very soon. We first focused on tightening up the single-player loop (more info here), so thanks for your patience!

What's this phase all about?

Now that we've got the first expansion under our belt, and the game is feeling large and solid at the equivalent of "first AI War plus four expansions," we're ready to tackle the next big thing: multiplayer! We also are going to be adding interplanetary weapons to the base game as a free update (that's the last of the kickstarter stretch goals). This phase should wrap up all our kickstarter promises (including a laundry list of other smaller items), and we expect to have multiplayer fully functional by August.

Multiplayer should be in a beta form where folks can test on it and run into bugs in July. While Chris is mostly working on multiplayer and those other little lingering base game features, Badger is going to be doing the bulk of the work on the second expansion, Zenith Onslaught. That should hopefully launch around the same time as multiplayer.

Version 2.087

(Not yet released -- we're still working on it!)

  • Fixed a case of the GameSettings directly referencing RowsByName, which should never happen. Things should no longer error out if settings are missing.
    • Thanks to Oryutzen and Badger for reporting.
  • Added a new PermanentSerializationIndicesForThisWorld Dictionary<string, List<string>> on the world object, a bit earlier than we were planning on it.
    • This is stored from in SerializeAllAllInternalNames and similar, and should be kept forever. These are not ever replaced during the life of a savegame and its descendants. Instead the things are simply added to.
    • This was already going to be needed for multiplayer, but in the last few days we've realized it's also needed for another reasn for single-player.
    • This central dictionary allows for two critical features:
      • 1. GameCommands to use efficient non-string-based indices when passing data back and forth in multiplayer, which otherwise they cannot do.
      • 2. Single-player games and multi-player games to use consistent indices from here to store the data for "external data," which otherwise can get scrambled.
    • This also means we now have a new NameForIndexLookups on ArcenDynamicTable. This in turn means that without some other code changes, a table cannot be renamed if it is using ByIndex serialization, or it will cause all older saves to stop working. There are ways we can get around it if we ever have to, but there should be no reason for that.
    • And then also this means goodbye to the old rowNamesByOldIndex on ArcenDynamicTable, as this is now wrapped into PermanentSerializationIndicesForThisWorld instead.
    • SerializeAllAllInternalNames and DeSerializeAllAllInternalNames are also gone, and things are now handled centrally by World, based on a new list of tablesThatAreReadyAndAreSerializedByIndex.
      • If you are a modder making your own tables, please be sure to only use SerializedBy.Index for SerializedRules if you actually are going to use that functionality. Otherwise it just bloats every savegame with your mod for no reason. Very very few tables actually need that flag to be true.
    • The complexity of this particular rework made our heads spin a bit, but it's a major pillar of efficient and accurate multiplayer, so it's very exciting to have it done. The fact that it will also prevent certain kinds of mod errors is a bonus.
  • RowsByName is no longer directly accessible on arcen dynamic tables. You instead need to call one of the three GetRowByName versions, each of which behave differently but correctly depending on which behavior you need.
  • Fixed several different compiler chain issues that could lead to copying a silly number of dlls to the GameData\ModdableLogicDLLs folder, and in a couple of cases could then also lead to us not getting all of the code actually where it needed to go.
    • One result of this was in the prior beta version, there were some MethodNotFound exceptions because outdated versions of the external dlls were in place.
    • Thanks to relmz32, marty651, and ANGRYABOUTELVES for reporting.
  • Fixed a bug introduced in version 2.082 that made it so that any game with the nanocaust in them would not be able to deserialize.
    • Also added extra serialization logging info to nanocaust while we were at this.

Beta 2.086 Tell Me About The Zenith, Voice Lady

(Released June 29th, 2020)

  • The game now has a Notification for when Dark Spire Loci are warping in
    • Thanks to GreatYng for requesting
  • Savegames from the last four beta branch versions (since 2.080) may or may not load for you, apologies for that.
    • Some of them were already not loading, and were loading very odd data onto units and factions, but now new savegames should work properly again (and all older savegames are still fine).
    • Essentially, ExternalData was getting saved in the wrong fashion. There is still some brittleness here that doesn't exist in any other part of the game, and we will see if we can fix that separately so that this never happens again.
    • Thanks to relmz32, zeusalmighty, and Badger for reporting.
  • The way that external data logging is handled in the serialization logs is now a lot more clear, so we can easily go in and search for things that may be funky.
  • Fixed a bug where off-by-default mods that were supposed to be auto-included were not actually being included.
    • Thanks to Lord Of Nothing for catching this oversight!
  • Improved the logging of errors when you try to load a savegame that has a missing mod or expansion in it.
    • There was a regression in the clarity there two versions ago.
  • Fixed an issue with loading some very old savegames or quick starts.
    • Until the recent betas, the quick starts were loading fine, and things were regenerated anyhow so it made no difference.
    • But the savegames were loading fine, but then having waves or reinforcements that would not happen because of a missing AI Ship Groups (that we intentionally took out but now were recreated temporarily and then were just empty).
    • Having the data reads be more strict has let us find this problem and then fix it so that both cases now work perfectly, and the new-style AI ship groups (that have been added and are much more varied and detailed now, hence the removal of some old ones) automatically slip in on those older savegames that might have been wave-less for some planets prior to now.
  • The performance of GetHasTag should be vastly better now.
    • We now have a TagsList and a TagsDict on each GameEntityTypeData, as well.

New voice lines

  • Tentatively add support to some new voice lines for Zenith Trader (ZT respwawns, ZT ready to trade, ZT destroyed) and Devourer (player gets first vision of Devourer)
  • Add support for the voice line 'marauders attacking neutral planet' and 'nanocaust hive hack finishes'

Beta 2.084 Freedom From The Compiler

(Released June 26th, 2020)

  • Significant nerfs to the hunter fleet bonus income against MDCs
    • Thanks to ANGRYABOUTELVES for the feedback
  • Cross planet waves against a specific faction now will stay focused on that faction (and not go off and attack the player)
    • Hopefully this will fix some weirdnesses NRSirLimbo was seeing.
  • The "brighter color" hex and color for faction teams now uses new logic by -NR-SirLimbo to make sure that the minimum brightness is 300 (out of the max of 765).
    • We previously had logic in place to try to help make sure that faction names were always visible in text, but in many cases where they were almost black, they would still just be invisible.
    • Huge thanks to -NR-SirLimbo for the implementation!

Exporting Game Data To Examine It

  • Our object dumper code is now fully functional, although it takes a fair bit of hinting on a variety of tables to make it so that we don't get things like recursive outputs that spiral into multiple GB of data for one text file.
    • The two main hints that are used are the new custom attributes [NotForDumping], which should go over anything that we don't want to see at all in the dump files (working variables, things that are redundant, things that would lead to an infinite loop, etc), and [DumpInternalNameOnlyForArcenDynamicTableRow] for ArcenDynamicTableRows where we want to show just the InternalName from that field to know to what we are referring, but not include all the contents of what we are referencing.
    • Overall this lets us have a very complete picture of all the data that we're reading in from xml, and what final form it has taken after all the copy_froms, is_partial_records, and just general math that happens during load.
    • We have our own short term needs for this, but this is a feature that we think modders in particular may find useful in the future if they are wanting to make a change to some data and then see what cascading effects, if any, came from that change.
  • Put in some changes to no longer initialize EVERY big list on all of the game entity types, but instead to just initialize them as-needed. This makes game entity types a bit faster to generate on initial load, and also cuts down on their size with some useless bits on data dumps.

Whole New Code Compilation Pipeline

  • Okay... so we've completely changed how we compile our code for the game.
    • We've done this a few times before, but the most recent time was roughly a year ago when we switched to the more modern Roslyn compiler.
    • In the past, regardless of which compiler we used, we have always been directly compiling our code via having the compiler look at the raw source files and build them from there.
    • This has proved extremely problematic with certain pieces of code, most notably LINQ, which is used in a lot of libraries and we've had to work around the lack of that by making a hacky way for libraries to call up into our main unity project (which is compiled by unity) and not have it in our external dlls.
    • This was absolutely going to be untenable for multiplayer, and so this issue finally had to be fixed so that we can properly link against the various network libraries that we will be using. Overall turnaround time for each piece of work, not to mention just plain-out compatibility, depended on this.
    • Badger has actually been compiling the game himself on linux using his own custom scripts, since our windows ones don't work on that platform, and what struck Chris was that he was literally using the csproj files to directly do the compilation.
    • So, at this point we have now switched over to something that also follows that pattern. We are now using MSBuild behind our windows scripts, and that parses our csproj files as needed and calls the nice modern Roslyn compiler for us, basically getting us out of dependencies hell.
      • Unity, it's worth noting, has dozens of copies of their mono dlls, for various platforms and purposes, and it's super hard to figure out what is what and make it all fit together. We were able to get that working with most everything but LINQ, but that one aspect was the big one that has been elusive for the last three years.
    • So the problem is solved! This opens up a ton of doors and a whole lot of easier ways for us to link our code together with the networking libraries and similar. The amount of head-smashing-into-walls this has been for first Keith, and then later Chris, for years and years is something we are relieved to have behind us finally after one last long session of that.
    • If you are a windows developer or modder working with our internal build scripts, you don't have to do anything new. It all "just works."
  • We also took this chance to clean out a bunch of old script files that really are not needed or used anymore.

Beta 2.083 External Data Hotfix

(Released June 26th, 2020)

  • Fixed a bug in the last few versions (since parallel load) that was causing exceptions in trying to cast to external data for various factions.
    • We were not initially seeing this much, for some reason, but StarKelp was running into it internally with his own mod doing it intermittently. Now it's happening regularly after we put in some enforced sorting on these rows.
    • For now we've just fixed the problem with the existing data, but this whole thing exposes an underlying weakness in the way that we link external data into the game. If people later are playing with multiple mods and change their mod order, they will potentially wind up with this bug without us being able to fix it (as far as their existing campaigns go). If both mods both have external data on the same units, which is actually not the majority case at all. So it's probably an outside chance of it happening naturally in playing. At any rate, it's on our list of things to refactor sometime after multiplayer, to be a bit more flexible in general, just in case.
    • Thanks to StarKelp, ANGRYABOUTELVES, and NRSirLimbo for reporting.

Beta 2.082 Are Wormholes Visible To The Naked Eye?

(Released June 25th, 2020)

  • The Nanocaust and Dark Spire shouldn't be able to rebuild a Nanobot Center or a Locus for at least a few minutes after a previous one on that planet was destroyed
  • Fixed a one-line bug in the last couple of versions that were causing wormholes to be invisible.
    • Also fixed an oversight that could let something be invisible without throwing an exception that the player can see. If that ever happens again, it won't just be silently wrong.
    • Thanks to zeusalmighty for the report.
  • For some reason, the tech upgrades were never using their proper sorting information to get themselves into the correct order. They were simply using the xml order, which was problematic for anyone modding in new techs. And now that we read these into the game in parallel, they were in effectively random order. Two fixes with one discovery, at least!
    • Thanks to ANGRYABOUTELVES for reporting the new random order, and someone else for mentioning the mods problem, although we can't find that mantis report at the moment.
  • New "Dump All Data Tables After Load" setting in the debug section of the settings menu:
    • When the program is loaded, or after the xml files are reloaded into the in-memory data tables, write a text file for each one into a DataTableExports subfolder in the PlayerData folder.
    • The purpose of this is mainly to use with diffing tools between one run of the game and another, to see what sort of data changes happened. If you are modding and made changes to some ships and want to see how those changes cascaded, this would be one way to do that. This is also a way for us to verify correctness when we make structural changes internally.
    • This has some issues at the moment, but is something we're working on getting to be fully functional.
  • The game settings and galaxy settings no longer load in parallel, but only linearly. Their order was meant to be pulled from the xml, even though we don't usualyl do that.
  • More thoroughly fixed things so that if ANY error happens during loading of the game, it should not be able to just sit there as if it is loading something but really be hung.

Mod Capability Improvements

  • Fixed a bug that was causing the disabled expansion status and the toggled (whichever is not default) status for mods to not work properly in the last few versions. This was one of those things that we just hadn't tested well enough yet because it was a beta.
  • Mods are normally named by the folder they are in. But what happens if you need to rename a mod? Any savegames that used the old name will not be able to find it, and thus will break.
    • Therefore, a new feature has been added. If you put a ModAlternateNames.txt file in your mod folder, then you can specify alternative names that it can be found by (for purposes of linking up correctly to old savegames).
      • Inside this file, each line should simply have the other names that the mod was once referred to as.
    • If an alternative name would conflict with the name of an actual mod installed on the system (aka you set an alternative name of BeefMod and there is already an actual BeefMod present), then the actual mod will take precedence and the alternative mod name will not be in effect.
    • These alternative names don't actually show up anywhere, but basically just are ways to link to old names, so please don't go nuts with adding stuff to it.
    • In the case of the SpireRailgunShop mod, Chris had originally been using it as LordONothing_MoreSpireShips, and this entry now lets him load those old internal savegames.
      • As a one-off, this would not have been worth the feature, but it's likely to be a thing that is needed in the future. We've noticed some mod authors have multiple folders with different versions of their mods, and being able to cross-load between those in sensible fashions will now be possible. Prior to two versions ago it did not do a mod name check on them, so they never ran into trouble, but now they would. So here's the tool to get around it.
  • The TLDR of one of the xml reading improvements below is that not a mod can change a base game unit with a partial record (for instance, alter the stats of a Raider), and then any descendants of that unit even in the base game (for instance, a Dagger) will inherit the modded values. Expansions can also do this.

Xml Reading Improvements

  • Fixed a timing bug with rows that were being read in where if there were a lot of copy_froms then it was kind of at the mercy of luck as to whether or not it would load it properly. Basically since it's reading them in parallel, if it had started reading it but not finished it, it would still try to copy it over and thus of course have many problems. Now it fully waits not just until it has started reading, but until it is finished reading them.
    • This was the cause of the intermittent ghost turrets not loading properly in the last two versions of the game.
  • ImportIntoStringList_Directory() has been moved from ArcenXML to ArcenStrings, since it makes a lot more sense there (it has nothing to do with xml).
  • The way that the "what file is an error in" tracking for ArcenXML works has been redone heavily, so that we can now keep track of that on a per-node basis.
    • We're going to be processing nodes from a bunch of files at once, so that's a needed step.
  • Looking into a couple of methods that we probably won't touch right now, there are:
    • ImportAndProcessDirectory() is not actually used at the moment.
    • ImportAndProcessXmlFile() is used for reading the sprite dictionaries that TexturePacker generates for us.
      • We will keep this linear, even if later we have to extend this to handling more of them.
    • ReImportSelectIntoDynamicTable, ReImportSelectIntoDynamicTable_XMLDirectory, and ReloadSelectData are all used ONLY for super limited cases.
      • Specifically these are used to reload the LOD overrides for ships, which lets us design the LODs in-game for us with ships.
      • Given the limited nature of this, and how this isn't really something that needs to be as robust as the real game processing (since it's only used for dev purposes anyhow), we'll leave this alone for now.
    • The other xml parsing paths all pretty much go through one set of methods which is going to get a hefty rework.
  • Dynamic tables no longer use an ArcenSparseLookup for their RowsByName, but now use the threadsafe ConcurrentDictionary instead.
    • The lack of this was quite possibly the source of some very confusing bugs in the last few beta versions, potentially including StarKelp getting "DoomData'd."
  • The way that dynamic tables are read in has been completely overhauled.
    • Previously, it read in data one file at a time, first from the base game, then expansions in order, then mods in order.
    • Last release we improved it so that the order of operations did not matter between items in a single file, so if a partial record came before its original, or a copy_from came before its original, that was fine.
    • We now have extended that substantially, however, not just to be cross-file, but actually to improve the loading order and give new power to mods and expansions to change the underlying game.
    • The new loading order, with thanks to NSirLimbo, is as follows:
      • First load every item that isn't a copy_from or partial. The order is irrelevant for these, so just do them all.
      • Now do all the partials from the base game, hanging onto any that fail. Then partials from each expansion in order, and then each mod in order.
      • Now do all the copy_froms from the base game, hanging onto any that fail. Then copy_froms from each expansion in order, and then each mod in order.
        • After each batch of copy froms (base game, each expansion, each mod, etc), retry any former failures from partials or copy_froms, in the proper batch orders from before.
    • The way this works out, things are still all loaded in exact order from base game, to expansions in order, to mods in order, BUT with partial records applying before copy_froms in ever possible case.
      • This means that if two mods change the same field, the mod that is lower in the list will be the one that always applies, for each player and each time you run the game. This isn't new, but it's something that was hard to maintain while we added the following:
      • This also means that if a mod or expansion changes a unit that is later copied -- say, perhaps the Raiders is changed by a mod -- then the changes will propagate to all the descendants of the original (so, if you mod the Raider, then the Dagger will inherit those modded changes).
      • This is really useful for mods, but potentially also useful for expansions if we are adding content that goes onto existing ships for whatever reason.
    • We had also hoped that this would help solve our copy_from woes that mods were experiencing, but it turns out that is just a fundamental problem with copy_from (which we now need to investigate but can do with clarity on where and why the issue is) and is not a problem with mods or expansions. It's just by chance we haven't triggered it in the base game, so let's get that fixed!

Beta 2.081 Still-Broken Hotfix

(Released June 24th, 2020)

  • Fixed a bunch of issues that were making the game not able to generate new savegames. A couple of minor code changes led to a bunch of things not being able to calculate/recalculate properly.
    • This may or may not work with mods, it's hard to be sure right now.
    • If you get any exceptions during initial startup of the game, then it won't work correctly during that run. Close the game and reopen it and you may get no exceptions, after which it will run just fine.
    • There's an issue with the copy_from field not working entirely accurately that we still need to fix, and having mods on seems to exacerbate it but is not the root problem. Having it fixed will open a lot of doors for mods, though.

Beta 2.080 Fast Loading

(Released June 24th, 2020)

Note: at the moment in this beta, to enable or disable a mod or expansion, you have to do that in the settings screen and then restart the program. The restart of the program should become unneeded soon. But it's not for sure that this is actually working with expansions at the moment even with a restart, just yet.

Note 2: If you have problems running this version (some people do), then it's because of copy_from inheritance and different CPU timings. You can run the game after a few tries, potentially, but if not then please use the new beta branch v2078_last_before_fast_loading on Steam. We should have a fix for this tomorrow, which should also be a big boon for various mods in the future.

  • Fixed a bug where not-installed expansions in the game window were showing up with their text on top of other text.
    • Thanks to -NR-SirLimbo for reporting.
  • Added a new "XMLMods_NonDistributed" folder and type for internal use, so that as developers we can keep popular mods on hand for testing their savegames without accidentally releasing them to all players if we don't have permission to do so.

Much Faster Game Start Times

  • For the sake of simplicity and accuracy (order of operations, mainly), all of our loading of unity objects (textures, materials, meshes, sprites, music, sound effects, etc) from asset bundles has always been synchronous on the main thread.
    • Except in the case of music, where things are streamed in from disk, this actually causes the program to load more slowly than it needs to.
    • There are some bugs in unity in the async versions of their code, so long term we may not be able to use this, but we have now expanded the arcen asset bundle handling to be able to support both synchronous and asynchronous loading of items from asset bundles. We will use the new async version where we can as long as we are not running into engine bugs.
  • The bulk of our really central art and sounds and so on now loads asynchronously when the game starts, making the whole load process vastly faster for you.
  • Several icons and materials used by ships were previously being loaded inline with the xml reading.
    • This may or may not have caused some actual problems in practice, but best case it was wasting some processing time (making game load slower) when a copy_from or is_partial_record reset the icon.
  • The way that sound effect and voice clip playback is scheduled has been rejiggered fairly heavily, to allow for the indirection that is needed for our style of asynchronous loading of these effects.
  • We no longer support the side_specific_visual tag, which was used to give different visuals to different factions for the same ship.
    • In basically every case where we do that, we need more specificity than that could provide, and we use copy_from. So in reality this was just wasting a heck of a lot of time with the internal data structures that were there to support it.
    • Literally the only place that used this at all was the metal harvester points, which look different when not owned by anyone.
    • There is now a new visuals_if_natural_object and visuals_bundle_if_natural_object field pair that is being used for literally that one singular case.
    • Removing this changed a lot of code but let us fix a mysterious error that was happening since the switch to async loading, AND it makes the loading process even faster.
  • Added a new GetFactionTypeSafe() on squads, which can be used to get the Type on the faction without risk of nullrefs.
  • It turns out that one of the big problems with our use of AssetBundle.LoadAssetAsync() was NOT that we were getting inconsistent results back from it (it seemed like a lot of random things were not loading), but rather that things were coming back so fast that before we could assign our event handler to an event, it had already fired the event.
    • So we built in a subscription wrapper method that lets us never miss an event firing complete from these, even if it's already done, so that all code gets executed as requested.
    • The overall end result is a much faster-loading game without any bugs.

And Even Faster Still

  • A bunch of extra data, or data that was not being properly cleaned, has been fixed up.
    • It's mostly things like duplicate lists or dictionaries when there are built-ins right there.
  • For NodeProcessor on xml reading, we're now using Parallel.ForEach, meaning that each table still gets processed one at a time, but all the rows are parsed in the background all at once on many threads.
    • This cuts down further on loading times, but does mean that activities that are not threadsafe should be in DoPostInitializationLogic() (which we wanted to have happen anyhow), or should use a threading lock() when absolutely needed.
  • A new optional ReadXml parameter is on dynamic tables that we are initializing.
    • It defaults to ReadXml.InParallelThreads, but you can change it to ReadXml.InOrderOnMainThread.
    • This is now changed to being in order on the main thread for UIWindow, because that needs to do a LOT of nested prefab stuff and not a whole lot else. It breaks on the background thread.
  • deprecated_in_favor_of has been removed, as we didn't use it and it probably was not functional.
  • If the game runs into an exception while it is trying to load, it no longer logs errors silently and just seems to hang. Instead there's a solid chance that it will just fill the screen with crazy amounts of errors, but at the very least it is extremely clear that things have gone off the rails.
    • The game generally loads for people unless there is a mod or new code that is misconfigured, or something downloaded wrong from Steam, but in the really rare cases where it just seemed to sit there infinitely, that was really frustrating for folks.
    • And internally, we run into that a lot more as we change a lot of things and test them.
  • A bunch of how we handle errors during xml reading during startup is now more efficient and more direct.
    • The order of operations of errors really matters a lot when you've got all this multithreading going on, so our prior level of indirection had become extremely undesirable.
    • And then after a bit more investigating, we found that we needed to decentralize this more in general, and use the general exception-handling tools of C# for logging properly from each of the innumerable threads that might now be doing work. Our old style of logging was incredibly single-threaded-minded.
  • Similarly, ArcenXML.ReadingPartialRecord had to be removed, and ReadingPartialRecord is now on each individual ArcenXMLElement that the game reads from.
    • The number of things that were single-threaded-focused in xml reading is really quite typified by this, but now it works great in both styles.
  • Previously, the order in which entities were parsed mattered a LOT.
    • If the game had a copy_from entry prior to the thing it was copying being read, or if there was an is_partial_record prior to the original node, then things would error out.
    • In a lot of ways we were able to just work around this, always putting those things lower down in the same files, etc. But the ability to have partial records from another xml file, and not wonder if some OSes might sort the files differently (that does happen at times) was not present.
    • The game now actively imports rows in all kinds of random orders, even within one file, since they are often happening in parallel background threads.
    • To solve this problem, including our older version of the problem, we now do a couple of iterations to catch straggling "that wasn't there yet" nodes, making the order of your entries in files (and the order of files) no longer such a problem.
  • The Matches method on rollups really was never supposed to be used directly, because it can be quite slow and there is a perfectly-good precalculated version already in place on each game entity type data.
    • The methods have been renamed around and adjusted so that you can just call GetMatches_SemiSlow( yourrollup ) on the game entity typedata. It's vastly faster than the other kind of check, but still the sort of thing to cache if you're doing it a lot in your mod.
  • The way that the game handles checking over the nodes for incorrect xml at the very end now actually gets counted as part of the load timer, and is much faster than it was before.
    • All in all it takes around 4 seconds or so, but even with that added on the time to load the game is dramatically lower than it used to be.
  • The unrequested XML attributes file is no longer a thing, and those now get logged to the main thread instead.
    • The game now runs this in approximately half a second instead of 4 seconds, thanks to running 500 parallel items at a go on background threads. Bear in mind that this will vary between machines, and even between runs on the same machine. But it's vastly faster everywhere, regardless.

Final Results

  • The overall load process for Chris used to vary from maybe 16 seconds to 90 seconds depending on the cache state of some things and the way the wind was blowing, phase of the moon, etc. Most of the time is was on the lower end, but several times a day more than 60 seconds.
    • It now launches reliably in between 7 seconds and 24 seconds, with almost all launches being less than 12 seconds.
  • When it comes to the GameEntityReferenceData.csv file that we write with a lot of the data from ships, they are identical between the prior version of the game and this new faster-loading one.
    • (Also we now write that from a background thread even though it only takes maybe a quarter second on an average HDD).
  • There is a new v2078_last_before_fast_loading beta branch on Steam that you can use to load the prior version of the game (version 2.078) if the new one gives you problems, or you just want to see the difference on your machine.

Beta 2.078 Mod and Expansion Prepping

(Released June 22nd, 2020)

Note: at the moment in this beta, to enable or disable a mod or expansion, you have to do that in the settings screen and then restart the program. The restart of the program should become unneeded soon.

  • Fixed a kind of funky error that was newly showing up in the factions tab in the settings screen, and in the view/edit factions window in the main game, if you clicked between the AI and human factions.
    • Basically it was not taking a full frame to stop drawing the old fields and populate the new ones, so the old fields from one tab were trying to get (very invalid) data from the new data points that would be shown the next frame.
    • In the past this was still happening but did not throw an error. Was this ever causing any problems? It's hard to be sure, but probably not. Either way, having this error out now and then us able to put in a fix is some peace of mind that it can't bother things.
    • It's possible that we have a similar issue with the galaxy options tab, but that those just don't hit the point of throwing an error. If we ever run into trouble with multiplayer inconsistencies on the galaxy tab, we'll just need to remember to come in and implement this kind of fix there, too.
    • Thanks to Ovalcircle and Lord Of Nothing for reporting.
  • Fixed a bug in the last few beta versions where the high importance intel items were sorted above low, but below normal.
    • Thanks to GophTheGreat for reporting.

Improving Expansion and Mod Handling

  • Savegames have kept track of which expansions are enabled in them for a long time now, but until now they did not stop you from trying to load a savegame that used an expansion you did not have.
    • Older quickstarts that had expansions on (usually just with beacons) but no expansion content enabled will still be usable by non-expansion players.
  • Savegames have never tracked which mods are enabled for them, but now they do.
    • They also now prevent you from loading a savegame with a mod enabled unless you also have that mod enabled.
    • This sort of thing, like the expansions, gets a lot more relevant now that multiplayer is coming up, but it's also useful for our own internal testing.
  • In the case of a savegame that you are trying to load that you are missing some expansion or mods with, it gives you a complete list of what you are missing, now -- assuming that the save was created in version 2.078 or later.
  • The in-game escape menu now shows what expansions or mods are enabled in the savegame you are playing, if any are.
  • Under the hood, GetExpansionStatus_SemiExpensive() has been removed, as it was slow and also kind of confusing.
  • Added ConvertToCondensedFormat() as an extension method on strings, and it makes a unicode-style string into a condensed-format-viable string.
    • This is useful for mods that might have names that extend out of the ASCII name range, particularly for international modders.
  • Added SplitIntoWordsByCapitalization() as an extension on strings.
    • We are now using this to generate automatic "display names" for xml mods.
    • So for instance "BobsFancyMod" becomes "Bobs Fancy Mod" and "UTTTransport8" would become "UTT Transport8"
  • When you are loading the game, it now shows any expansions or mods you have installed at the top of the list of things it is loading.
    • Additionally, on the main menu if you hover over the "load time" entry at the bottom right, it shows those again.
    • We definitely predict that there would have been confusion among people with mods and expansions that don't match who are trying to play multiplayer.
  • Expansions now actually have a description field, which lets players see what they are from in-game in a brief tooltip if the expansion is discussed.
  • A variety of pieces of code for the initialization of dynamic data tables now takes in more explicit enum-based parameters to determine how they should act. Do they reload themselves if we try an reload of the xml (impossible until now), are they primary key strict, do they support indexing, etc.
  • The game now properly is able to read these settings and actually disable mods or expansions if you don't want them on for now.

Improved Modder Features

  • All of the xml FillList() methods and variants now include the following two parameters: IfPresent IfP, Uniqueness Unique
    • The former can be either ReplaceExistingList or AddToExistingList.
      • It turns out that, until now, it was always doing ReplaceExistingList. Which we had honestly kind of forgotten about.
    • The latter can either be Unenforced (always has been until now) or Required (no exceptions are thrown, it just will skip adding duplicates so there's not extra junk in there).
    • This lets us have a lot more control over exactly how xml is read in, which is mostly useful for mods, but somewhat also for variants of ships within the main game.
  • There's also a new ClearBeforeReading, which can be either Never, Always, or IfNotPartialRecord.
    • This lets us inline some of our logic for these, which previously were always either Never or IfNotPartialRecord, but you had to hunt through the code to find it before.
  • The game now supports a few new general-purpose attributes, for the first time being attribute variants.
    • Essentially, if there is an attribute that is a list, and it is called bacon for whatever reason (this could be a mod or a main game attribute, after all), you can append these things after bacon to change how the xml is read in for that specific xml node.
    • So if you have bacon="5,6,6", and normally that is read in as Uniqueness Required in the code, then you're powerless as a modder to get 5,6,6 as your results, instead only getting 5,6.
    • But NOW you can add in bacon_uniqueness in order to override that to the value you want, as one example. This works with any attribute that is a list type, whether that is defined in the core game or in code you added for a mod.
    • The valid new attribute variants are:
      • [attribute]_uniqueness, with the values: Unenforced and Required. These overwrite whatever was passed into the FillList method in code.
      • [attribute]_if_present, with the values: ReplaceExistingList and AddToExistingList. These overwrite whatever was passed into the FillList method in code.
      • [attribute]_clear_before_reading, with the values: Never, Always, and IfNotPartialRecord. These overwrite whatever was passed into the FillList method in code.
  • Previously there was no way to add to the list of tags, but now you can use the generalized feature tags_clear_before_reading="Never" and tags_if_present="AddToExistingList" combo to change that to be additive instead.
    • Thanks to StarKelp for suggesting this, which led to the rest of these generalized additions.
  • Added a new FillEnumIfPresent method, which basically only reads an enum if it is present, but otherwise leaves the original alone.
    • Previously FillEnum was always overwriting the prior value if it was present, which was unlike our other Fill methods.
    • There is a bool on here that lets us complain if it is missing (aka no new assignment, default or otherwise).
  • Added a complementary FillEnumIfAndComplainIfDefault method, which basically will give distinct complaints if it is missing, invalid, or default as a value.
    • Why we would ever really want to use this is kind of suspect, but it's actually along the lines of what FillEnum used to be doing, which was confusing and inconsistent with other Fill methods.
  • FillEnum has been entirely removed from the codebase, now instead expecting one of the two above to be used.
    • The idea here is to force us as developers plus anyone who is a modder to be explicit in what they actually want to have happen.
    • There were some frustrating oddities that were bothering modders that were probably happening because of the way FillEnum used to work.
    • Almost all cases that were previously FillEnum are now FillEnumIfPresent, which now means that they keep their value if missing a field rather than resetting to default.
      • This has huge implications, mostly positive, for any is_partial records and copy_from records. Having a record of that sort that doesn't duplicate an enum attribute will no longer reset the enum attribute to its default (probably None).
      • Places this could bite us: special_entity_type in particular. But assumedly if you are not reassigning the special_entity_type of a descendent entity, it is the same type as the original -- but you will need to actually check for that now in your xml data if you're a modder.
  • Fixed a bug where galaxy settings could not have their type properly inherited on partial records.
    • Same for core settings.
    • Same with setting_type on custom_field for factions.
    • And type on factions.
    • Several fields on damage modifiers.
    • category and firing_timing on systems.
    • design_logic on fleet design templates, and ship_cap_groups on sub-entries of fleet design templates.
    • a bunch of fields on ships.
    • type on resource production and multiplier
    • ship_cap_group on fleet items
  • The max field can now be zero on fleet_membership entries under ships.
    • This is something that is on those entries BEFORE it tries to ever add the ship to the fleet membership in general.
    • Fleet items with a maxCap <= 0 are now universally not actually added to the fleet.
    • This lets modders remove entries from fleets via mods.
    • You can also set the weight to 0 or less, and that will even more aggressively remove it.
    • The same has also now been done for ai_ship_group_membership entries.
    • Thanks to -NR-SirLimbo for suggesting.

Ability To Ship Off-By-Default Mods

  • Mods can now have a ModDescription.txt file in their folder, which lets them have a description that players can read when seeing them listed in the Game tab of the settings menu.
  • Mods can now have a ModIsOffByDefault.txt file in their folder.
    • If this file is present, then the mod won't load until the player goes into the Game tab of the settings window and turns it on.
    • This is really useful for any mods that we might want to ship with the game by default (for ease of people finding them), but make something that people have to opt into to turn on.
    • If ModIsDisabled.txt is present, then that overrides things to the point that the mod is invisible, and this file is ignored.
    • If you are a modder and you'd like to have us distribute your mod with the game, but off by default,
  • The text in ModIsDisabled.txt has been updated, to make the function of that more clear to modders.
  • The Game tab of the settings menu has been updated so that you can see all the expansions and their status (installed or not, enabled or disabled), and all of the mods that you have not hard-disabled.
    • Now that mods can be disabled more softly, we're able to do a whole lot of things that are a lot more like what a proper modloader can do.
    • We also reorganized several of the startup sequence items to properly handle this new information, now that we need to have GameSettings data loaded sooner than we previously did.

First Off-By-Default Included Mod: The Spire Railgun Shop by Lord of Nothing

  • The Spire Railgun Shop mod by Lord of Nothing is now included with the game by default (with permission), but disabled.
    • This lets people simply enable the mod by clicking a button in the settings menu, rather than having to find and download the mod from elsewhere.
    • Full description of the mod is included in the tooltips in the game.

Beta 2.077 No More Shot Errors

(Released June 19th, 2020)

  • Player-allied scourge aren't allowed to suicide at targets. It makes players nervous that the scourge might just be inept.
    • Thanks to tadrinth for the bug report
  • Some minor UI tweaks; "listen" becomes "listening", remove an unwanted space in a log message
    • Thanks to Lord of Nothing for reporting
  • Split the hunter fleet stage 3 logic into several separate sub-methods so that we can more easily see where something is going wrong if there are exceptions that pop up.
  • Fixed a bug in the hunter fleet where if there were no allied AI factions it would get a divide by zero exception every 10 seconds or so.
    • This should never be a case that actually happens, but that's a separate matter.
    • Thanks to Lord Of Nothing for reporting.
  • Fixed a bug that is probably as old as this game itself, where shots would sometimes go zipping off to the bottom left of the gravity well and disappear offscreen. It turns out that this was not just a display artifact, but actually shots that had no target to find (probably their target died around the time they came into existence, so they were trying to quickly make their way to the "no location" point.
    • Most recently in the betas, this has been causing exceptions when trying to save such shots, as they were out of bounds for the gravity well and thus causing visible exceptions during autosave or intentional save (which were harmless but annoying).
    • These shots no longer do any movement if they have nowhere to go, and thus won't go streaking off into the night.
    • Thanks to Badger, Ovalcircle, marty651, and others for reporting.
  • There were some random cases where it was possible that trying to add another ship visually to draw would not work for various reasons. It was rare, but should no longer be possible for that to throw an exception.
    • Thanks to marcaunon for reporting.

Improving Identification of Expansion and Mod Content

  • The "ForExpansion" field on the dynamic table rows has been removed. It was not being properly set in a lot of cases, anyhow.
    • Now dynamic table rows have DataSource RowFrom, Expansion RowFromExpansion, and XmlMod RowFromXmlMod.
    • These let you see if the row was originally created from an expansion, the base game, programmatically, or from an xml mod. If an expansion or an xml mod, then it links to the mod.
    • Note that variants of these things (copy_from, etc) would wind up with a value that is whatever the variant was created in. If a mod makes a variant, then the original would still be from an expansion or the base game, but the new variant would show up as being from the specific mod. Basically what you would expect.
    • Note that partial records do NOT overwrite the value. So if there's something from the base game, and then a mod uses a partial record to change data, it would still show up as being a base game item.
  • THAT said, there is a new List<RefThreeTuple<DataSource, Expansion, XmlMod>> RowAlteredByPartialRecords on dynamic table rows, which lets you track exactly how many partial records have contributed to it, and if they were from the base game, expansions, or mods.
    • Note that these row alterations are not copied over to copy_from entries. So if one mod alters an entry a bunch via partial records, and then another mod makes a variant, the variant would not have a record of the partial records that went into what it was copied from.
    • If you needed to find that for whatever reason, you could check the existing CopiedFrom attribute on the variant row. That has a chain all the way back to the original row, if you need it.
  • GetRowByName() on dynamic tables used to require three parameters -- name (stil there), create-if-missing (gone now), and expansion (gone now and was never used).
    • Mods will have to be updated to account for the new method style and behavior, and hopefully the core game itself is also handling this properly now (but there may be bugs in the short term).
    • This was a VERY old way of handling this, before we even had proper formal xml mod support, and there were some implicit behaviors that were problematic.
    • There were various overloads of this method that would complain if it could not find a row by name, but the default was for it to just silently return null. This could then lead to unexpected invisible problems.
      • This now throws a MissingArcenDynamicTableRowException instead of returning null if the name can't be found.
  • The game now uses the MissingArcenDynamicTableRowException in several key points during deserialization (loading a savegame, in other words) to let us show a message stating "hey, this savegame is talking about something called X, but that doesn't exist, so you may not have the same mods and/or expansions that the savegame was using).
    • Previously if it couldn't find things, it would either just spam errors silently and then show one final parsing error that made no sense whatsoever to anyone, or it would try to patch over things by loading a "dummy ship" in without the actual stats on it. The latter is completely gone, because that was going to absolutely break multiplayer but in very inconvenient-to-figure-out ways.
  • For the sake of flexibility and retaining prior functionality, there are a couple of new methods on arcen dynamic tables beyond just GetRowByName().
    • CreateNewRow() has been added for if you want to create a row programmatically from whatever source.
      • Previously the only way to explicitly programmatically create a row was to call GetRowByName() with an invalid name and create-if-missing true. That felt very hacky, and it made code that used it (maybe two lines in the whole codebase) very hard to read.
      • Additionally, this was kind of the only real reason for ever passing in the Expansion field, since it would then set the expansion on the created field. That didn't justify us passing in lots of mysterious nulls all around the codebase.
      • This method now, naturally, takes in string Name, DataSource Source, Expansion ForExpansion, XmlMod ForXmlMod, so that you can fully document the row's origins as you wish, just like any other row.
      • This is still a kind of method that we almost never should need to use, because the whole purpose is to let these dynamic tables be initialized and filled by xml itself.
    • GetRowByNameOrNullIfNotFound() works like GetRowByName() used to, in that it will return null if it can't find the row, rather than throwing an exception.
      • There are actually a LOT of places in the codebase, particularly in factions and commands, where we use this. Probably a lot of mods will want to use this, also.
      • The purpose of this is basically when you want to "find it if it's there, or else handle the fact that it isn't there in an intelligent way." When you have that sort of scenario, using exception handling to control program flow would be both crude and slow and hard to read.
      • There are a number of places where this method is now used in the external part of the codebase, and if the result is null it generates some other sort of error or just does something else and isn't even an error case.
      • There are some other places in the external part of the codebase where we still use GetRowByName() instead, but we took out the follow-up exceptions where it used to say "if the result is null, then throw an exception." The new exceptions automatically happen, saving code, and are more detailed.
    • GetRowByNameOrCreateIfNotFound() is really not used frequently, but is nice to have just in case. We use it a couple of places. It does what you would expect.
  • Overall we may have some short-term bugs from these changes, but they should also help us -- and modders -- avoid "invisible errors" that are way harder to track down.
    • These changes also make the code more readable, and give equal precedence to mods and expansions in terms of figuring out "what came from where."
  • Speaking of invisible errors, we found some places where dynamic tables were trying to reference other dynamic table rows in the wrong order of operations for initialization, and that was potentially causing invisible errors before (or certainly wrong data). These now errored during game startup, so we were able to fix them:
    • MapTypeDataTable was being referenced by ScenarioDataTable, so had to move to come before it.
    • GameEntityTypeDataTable was being referenced by TestChamberTable, so TestChamberTable had to move below that.
    • SpecialFactionDataTable was referencing TeamColorDefinitionTable, so that had to move up (and we took TeamColorPrefabsTable with it).
    • These somewhat fall under the category of "how did these ever work?"
  • We then had some other problems relating to entities and the order in which they were present in xml, and they were working fine but it was kind of luck that they did.
    • Something like the WarspiteArtillery, for instance, would be defined prior to the Warspite, which is something it would spawn on death.
    • The reason that this has historically worked is that it would create a stub entry for Warspite as soon as it was entered, and then later that would get filled in by the actual entity.
    • But... what if the actual entity was never filled in? We'd have zero way of knowing, and the game would just proceed with this practically-null ship. So it was time to change how these are read in, so that we actually get proper errors for the latter case, but can still order our xml how we want.
    • We now load three fields where entity type datas referenced other entity type datas in a delayed fashion, so that none of this happens. If there's an error in xml, it will no longer be invisible.
  • Added a new debug setting to personal settings: Write Savegame Serialization Logs In Realtime
    • This is used only on conjunction with the main 'Write Savegame Serialization Logs', and should almost never be used.
    • This causes the log process to write to disk immediately as it does every log action, rather that writing to a buffer and then writing the results of that buffer at the end.
    • This is one of those features that you should use if you're needing to test a deserialization that is crashing the program, which should basically never happen if you're not a core developer of the game.
    • As you may surmise, our first result after getting the game functional again after all the above changes was that any savegame was crashing the program with no error messages, so hence this.
  • The ArcenSerializationTester.Writer object has been made private, and now you just call Append or AppendLine on ArcenSerializationTester directly, so it can work in the prior style or the new realtime format.
  • The exceptions you get now when you try to load a savegame that had a mod or expansion in it that you are missing now gives an error message that is brief and actually makes it pretty clear why this is happening. It doesn't say what mods or expansions you are missing yet, but that's another next step.
    • This particular fix catches even "mods that are just changed files with added stuff" and not just properly set up mods that someone put in their own folder.
    • Thanks to Badger for suggesting.

Beta 2.076 Hotfix

(Released June 18th, 2020)

  • Hunter ships against a specific target (for example, MDCs) are now allowed to attack other things if there are no MDCs they can get to effectively.
    • Hunter Ships against a specific faction are still required to go after that faction.
    • Thanks to tadrinth for the report
  • Bonus income for AIs against specific targets is now split evenly between all AI factions in the game. This may change a bit, who knows.
  • Some nerfs to anti-player-allied-marauder hunter income
    • Thanks to ANGRYABOUTELVIS for mentioning
  • Fixed a bug from the last couple of beta versions (maybe somehow just the most recent one, but that seems unlikely) where any savegame that had shots in flight would fail to load properly.
    • All of the saves that were broken and unable to load should now be able to load fine, although we've not tested them exhaustively. Please let us know if you find any more.
    • Huge thanks to ANGRYABOUTELVES for a savegame that let us reproduce this within a few seconds. Finding the bug was then a matter of turning on savegame logging, triggering a save that would be broken, trying to load it, and then comparing the differing outputs. Without that we would have had to go with examination of the failed load log alone.
    • Thanks to ANGRYABOUTELVES, zeusalmighty, Lord Of Nothing, Bluebizzer, and others for reporting.
  • There's a handy "combat attack and speed multiplier" that you can set by holding Ctrl and clicking the faster and slower buttons at the bottom of the screen, and that's not new.
    • However, there were some problems with us never really setting that back to the proper defaults, and in the case of our switch of FInt formatting that caused a lot of things to wind up at speed 4.1 rather than 1.
    • This is now automatically and retroactively fixed for all savegames, and will work properly in the future if you have those speeds up or down in one game and then start a new one, too.
    • Thanks to NRSirLimbo for figuring out the source of the problem, and Lord Of Nothing, ANGRYABOUTELVES, and ynof for reporting.

Beta 2.074 FInt Hotfix

(Released June 16th, 2020)

  • Warning: any savegames loaded into 2.073 and then re-saved now have all of their FInt values multiplied by about 4.1.
    • The harmless end of this was that your speed was 4.1x, but on the nastier end it meant your AIP was 4.1x higher. Or on the plus side, your science...
    • This ALSO would affect any new games that were created in 2.073, since those load an old savegame no matter what (to get your last settings).
      • If your old settings are off because you loaded a save in 2.073, then please make sure that you hit Reset To Defaults in the lobby, or load a different save or quickstart into the lobby for editing.
    • Why this was affecting damage output is not entirely clear, but in some cases it seems to have been. Please let us know if you continue to observe that for some reason. We thought that was based on the galaxy options, but it seems like not.
    • Thanks to NRSirLimbo and Lord Of Nothing for catching this.
  • During gameplay, when you click into the Galaxy-Wide Options screen it now shows you ALL of the values, not just the ones you can edit.
    • As with the factions screen, it just has the ones that are non-editable as text values, but you can examine your settings this way and also see their tooltips.

Beta 2.073 Filesize Finalization

(Released June 16th, 2020)

  • Make the Marauder less likely to suicide themselves against Praetorian Dragons
    • Thanks to ynof for reporting
  • Fix another problem with waves going to an illegal location
    • Thanks to ussdefiant for the bug report.
  • Added the following methods into GameEntity_Base, to make for exception-proof thread-safe ways of finding out certain information:
    • GetTypeInternalNameSafe
    • GetTypeDisplayNameSafe
    • GetPlanetNameSafe
    • GetFactionDisplayNameSafe
  • Some various overloads have been added to the UltraEfficient methods, allowing us to pass in an optional parameter to get UEErrorStyle.ThrowExceptionIfProblem where we can add in extra context about what is wrong with data if the data is out of range.
    • Applied this to the WorldLocation serialization of all entities, so that if we have an entity that is being saved from out of range, we find out what it is, what planet, who owns it, and what the value was. This also uses the new safe getname methods.
    • Thanks to Badger for discovering that apparently in one of his savegames a shot was being saved out of the gravity well.
  • Fixed a very unusual bug where the AI was basically able to get frigates "for free" as part of their reinforcements in the rare cases that they actually used them.
    • Normally the AI does not particularly use frigates, but a few types like the special forces master or turtle do so.
    • This bug was allowing for unlimited growth of frigate strength on even planets that had been neutered, but now the strength of frigates are counting against the "strikecraft" AI reinforcement budget.
    • This won't fix old saves with too many frigates, but those should be fairly few and far between in general. And it will prevent those games from getting yet more frigates stacked up on the planets in question.
    • Thanks to DEMOCRACY_DEMOCRACY for reporting.
  • The original game version is now saved into savegames, and you can see it on the escape menu. If it was started on any version other than the most recent one, it will say "Unknown."
    • You can also now see the campaign start date/time in the escape menu. We've been storing that forever, but never showed it for some reason.

Fix To Beta Branch Inactive Wardens and Hunters

  • Nota Bene These two fixes may cause a giant flood of enemies in games that have been played for some time on the beta
  • Fix a bug (beta only) where the Hunter Fleet was just chillin
    • Thanks to a bunch of people for reporting, and to ynof for having an unrelated save game that reproduced the problem readily
  • Fix a bug (beta only) where the Warden Fleet was just chillin
    • Thanks to ussdefiant and Tadrinth for the bug report

Savegame Filesize Reduction Continues

  • Converted the various combat-space positions in shot and wormhole objects to use the new UE format.
    • Test savagame dropped from 2.3449 MB to 2.3444 MB. But hey, it took like 5 minutes. This is a good example of why we should mainly focus on heavily-used places for shifting to UE format, though.
  • Added a new GetUltraEfficientStyleThatFits() method, which lets us find the smallest UE data format of a given group that will fit a specific number.
    • Note that the actual UltraEfficientStyle enums should NEVER be serialized directly, as they are not considered value-safe as integers.
    • So in order to use this, it needs to be based off of some number that is calculatable on the serialization and deserialization process, independently.
    • Essentially, for things like time or primary key IDs, we can look at the central values that have been issued and find the appropriate wrapper on both the serialization and deserialization process.
  • We are now using the gated-smaller serialization method for GameSeconds, Primary Key IDs for all entity types, fleet PKIDs, speed group PKIDs, frame numbers, planet indices, and faction indices.
    • Any part of the game, mods or otherwise, that want to use the now-old-but-recently-new "modern" style of formatting to store or transmit these, instead of the new UltraEfficient methods, are free to do so. It won't affect anything correctness-wise, but is less efficient if it's a field that is written a whole lot of times.
    • A lot of the data in external classes just isn't written frequently enough for this to be warranted, unless it's something that is on a vast number of entities. This is really more focused on GameCommands (later) and squads (now).
  • TimeAlive has been removed from shots, as it was never used and could be inferred from info on GameEntity_Base.
  • RemainingDelayUntilEntersSim has been moved to just be on shots, and thus not take up extra space on squads, since it is only used by shots.
  • Switched over entity orders to use the new more-efficient style of reads, and that's dropped the savegame file size down to 2.2886 MB from that original 2.3449 MB we started with in this build.
    • That's another 2.4% savings compared to what we had in last night's build.
  • Now switched over Entity Systems to use the new format.
  • All of the "lookup name by index" type things for dynamic data tables like GameEntityTypeData and such have all been transitioned over to to using adaptive UE values from GetUltraEfficientStyleThatFits()
    • This plus the entity systems change drops us down to 2.2642 MB from 2.3449 MB, another 3.5% improvement in file size.
  • A bunch of extra info has been added to the world serialization and deserialization logs.
    • These are absolutely HUGE, even larger than ever before (from 40mb to 80mb in one test case for a 2mb save, for instance), if you have these turned on. However, you can also often see individual field names now, so the added clarity is enormously high.
    • A lot of other methods now contain the ability to send a field name for errors as an optional parameter, so that it can be added to this display. If you have a mod that you don't recompile against this, even if it has no errors before you recompile, you'll get method missing exceptions.
  • The main primary keys on entities of all sorts are now in the more efficient format, taking us from 2.2642 MB to 2.2464 MB.
  • We are no longer bothering to save/transmit the strength counting data in savegames, because that was utterly pointless.
    • In a midsize game it was some 100 KB, and it gets recalculated on ever sim frame prior to the sim frame running, even while paused, on the clients and the host. So within 1/10th of 1 second of connecting, the data was completely discarded anyhow.
    • This brings our test savegame down to 2.1107 MB.
  • The game will now only serialize a maximum of 63 orders per ship at once (good grief that would still be massively more than we can imagine needing). This saves a "whopping" 2.2KB.
  • The way that OrderSource is stored is now just using 1 bit, which saves 25 KB. Wow.
  • The max cloaking points that ships can have is now 32767. The max that any in the main game actually DO have is 20k, and most of them have far less than that.
    • This lets us store the cloaking points lost in the UE format "M_0_To_32ˌ767_Def0"
  • Added some new 26-bit integer formats that let us track numbers up to 67 million. Turns out the very largest health ships in the game would fall under this.
  • The maximum number of seconds that a ship can be forced to wait for repair is now 511 seconds instead of 600, letting us store this in a much smaller-format number.
  • The maximum number of ships of a single type that can be stored in an AI reinforcement point is now 4095. The maximum number of types of ships one can contain is now 511.
  • Converted a number of things on units/squads/ships to use the new more efficient methods that are adaptive for the primary key IDs, or to time for gameseconds.
  • Total drop in filesize from the above changes is down to 2.0933 MB from the prior 2.1107. A 0.8% drop is not exactly what we had in mind with this, but then again it will scale better with different savegames depending on what their data is. This is just using a single benchmark savegame right now.
  • Fixed up a few things with the damage amplification to be a little simpler and slightly more efficient, but it's so infrequently used that it's not really the problem.
    • At this point we are conscious of the fact that what was precise has turned into shooting in the dark; we need more detailed logging to identify the remaining problem cases other than strings (which will be big and easy when we get to them).
  • All of the read and write serialization methods now take a string fieldname for errors.
    • This is also now used for the deserialization logging, optionally, if the programmer passes in an extra TrackerStyle.ByFieldNameAsWell. TrackerStyle is now required when starting a tracker.
    • The idea is that now we can drill down to individual fields, where appropriate, and find out what the heck is exactly using so much space -- not just by type, but by specific field.
    • In short, this gives us the power to no longer be shooting in the dark when there is a section of code where the variables types are too dense or vague for us to understand why they are having issues.
  • Squads now export their information per field, which lets us target the fields that are actually taking up the most space.
    • Turns out that world location for squads is STILL taking up a whopping 113.7617 KB, which is more than any other field. There's an average of 32 bits per X,Y coordinate pair, and there's just no way to make that smaller without also making it less precise.
    • Less sensibly, ActiveHack_Target is taking 81.7662 KB, with an average bits of 23.00??
      • It turns out that this was because of our new UE formats with Neg1ToPos not having a special two-bit case for the value of 0.
      • This was in an attempt to save 1 bit on such fields, but ultimately this requires too much of the end programmer and is likely to lead to filesize bloat in other ways.
      • Making the shift to have that extra bit in there, but handle the two-bit case efficiently, lets us shave this down to 2.0031 MB for our test savegame from 2.0933.
      • But honestly... this feels kind of gross, because we're using an extra bit on a LOT of numbers to compensate for programmers not being precise enough. That's okay with the normal modern format of buzzsaw binary, but with the ultraeffecient version that seems antithetical.
      • Instead we adjusted the methods in ArcenSerializationAIWar2SpecificExtensions to auto-correct data that is being sent in, and if it would be a 0 in the case where that means nothing, but would take a ton of bits to store, then it puts it to -1 instead. This is a healthy middle-ground between auto-correction and data efficiency.
      • The end result of THIS method was instead 2.0169 MB, which is slightly more wasteful, but clearly that means we have some lingering bad data in there somewhere... or it's just the absence of savings from so many things that have a 0 as part of their valid indices. Long-term, despite slightly worse compression, this seems like the way to go because it would likely lead to good results eventually.
  • Added a new AddIntUltraEfficient_Clamped, which lets us automatically clamp rogue data when we are writing a savegame, versus having some sort of error pop up or having to handle data ranges that are wider than they need to be.
      • There's one version called AddIntUltraEfficient_ClampedDoNotAlterOriginal, which is not really ideal for network play as it doesn't affect the original value. The other version alters the original value to match.
      • In most cases it probably doesn't REALLY matter which one is used, since they probably don't affect sim or things that would trigger a desync, but it's good to have the flexibility to adjust as needed.
    • The items that were using the most data were things that surprised us, so all the extra instrumentation saved us a ton of time and trial and error as these would not have been high up our list.
      • CurrentParalysisSeconds converted over, was using 56.8809 KB. Now uses 3.5551 KB.
      • CurrentWeaponAddedReloadSeconds converted over, was using 56.8809 KB. Now uses 3.5551 KB.
      • CurrentEngineStunSeconds converted over, was using 56.8040 KB. Now uses 3.5558 KB.
      • NumExtrasToCreateWhenTransforming converted over, was using 56.8040 KB. Now uses 3.5551 KB
      • NextGuardingOffsetIndex converted over, was using 56.8809 KB. Now uses 3.5587 KB.
        • Also adjusted the number of GuardingOffsets to have a maximum of 63 instead of 200, since that's just ludicrous amounts in general.
    • Converted Guarding.PrimaryKeyID to the general new AddSquadPrimaryKeyID_Neg1ToPos. Was 9.9150 KB, now 7.6639 KB.
      • SecondsTillTransformation converted over, was using 56.8809 KB. Now 3.5551 KB.
      • FleetID switched to use the central AddFleetPrimaryKeyID_Neg1ToPos(), was using 33.2352 KB, now 42.6606 KB (huh!?).
      • Metal flows statuses were using 35.5505 KB for ActiveOutflowAmount (291,230 reads!!) and 28.4404 KB for MetalFlowPurpose.Length, when these almost never need to be used. This has been switched over to an intelligently-gated format.
        • ActiveOutflowAmount now uses only 11.2500 bytes (90 reads), and there are 4.5000 bytes used for MetalFlowPurpose.Length (9 reads).
    • After all these changes, we're down to a filesize of 1.6519 MB where it was 2.0933 at the start of the day. That's a 21% reduction! Now we're talkin'...
  • For really long games, we need some better ways of storing some of the information about time intervals in them.
    • We've added a new GameSecond_Neg1ToPos_Differential_Clamped method group to handle this.
    • LastGameSecondOfDecollision has been renamed to LastGameSecondOfDecollision_OrZeroIfMoreThan15sAgo, because we really don't care about how long it's been if it's been more than 15 seconds.
      • This was previously taking up 57.6484 KB of space in our savegame test case that we 10 hours in. It now takes up 5.5648 KB.
    • There's really nothing else in the game aside from strings that is common enough in our main test case games to be worth shrinking down. We're at 1.5698 MB, 2,812,809 reads, and everything is so hyper efficient except for strings that that is the last avenue open for us. We'll sort that out and then move on from this filesize-chasing stuff.
  • Split the way that strings and chars are serialized int two tyoes: FullUnicode and Condensed.
    • The only reason to use FullUnicode is if it's something that we're relating to the file system in some way (reading, not writing). But even that is a stretch.
    • There are only about 102 characters that the game actually uses, and frankly it doesn't really use all of those. The fonts supported by the game can't even display quite all of those.
    • We thus are able to map what is normally a 16-bit character encoding into our own custom 7-bit super-lightweight encoding that includes all of ASCII that is relevant to us, plus some bits beyond standard ASCII that were in our InternalNames for various ships or whatnot.
    • Anything that is outside of this range will be converted to a ? character.
    • If a modder uses unsupported characters in the "name" field of a ship or system, then that ship or system will not be loadable properly when they save and then load their game.
      • It's worth noting that there are no such restrictions on the display_name, but those already would just show up as blank characters anyhow.
    • This set of changes drops the total size of our test savegame to its final size of 1.3444 MB. We don't think we can get it any smaller than that.

FInt Data Type Internals

  • FInt has been converted over to using a "multiplication of 1000" method instead of a "bitshift by 12" method.
    • This lets us keep doing fixed-integer math where we need to, and we've tested it in unity's implementation of mono and we see no measurable practical difference in the speeds of either approach.
    • The accuracy of this new method is much improved, however, as we can appropriately represent numbers like 0.9. Previously, based on how integer math works, we could not represent that number except as 0.899.
    • It turns out that, ever since we've been using FInts (2010 or so??), we've had this problem with representing post-decimal digits in FInt. So a multiplication by what we thought of us 0.9 was actually a multiplication by 0.899, which caused various confusion in the interface when it was large numbers being multiplied-by (where did that extra 5 damage come from, etc).
    • The accuracy is now perfect in terms of storing numbers, pre and post digit, and the accuracy of operations was already perfectly accurate in an integer-math sense given the limitations of how many significant digits we allow for (three). The existing pieces of accuracy have not lowered.
    • All in all, this is a minor improvement, but something we wanted to go ahead and get in during our data transformation work. We had worried performance would be worse, but for various reasons to do with how we structured our FInt class, and in how modern processors (those from the 2012 and on) handle division -- and the fact that everything is 64bit processors now -- it's functionally identical in speed. Back in 2010, this would not have been the case.
    • Curiously, in our test savegame, this did actually shrink the size of floats and ints very slightly.
      • Floats (stored as FInts) dropped from 26.61 avg bits (798.2500 bytes total) to 24.56 avg bits (736.7500 bytes total).
      • Direct FInts dropped from 4.73 avg bits to 4.68 avg bits, for a total drop of less then 0.2 KB. Why not; that wasn't the goal here, anyway.
    • Thanks to -NR-SirLimbo for discovering the issue, suggesting a solution, and investigating this with us.

Beta 2.065 To Infinity And... No, Knock It Off

(Released June 11th, 2020)

  • If seeding multiple copies of the same faction type (for example, 3 Nanocausts), make sure we don't put those copies next to eachother. It tends to lead to boring gameplay where those factions just try to kill eachother.
    • Thanks to ArnaudB for the bug report

Solving An Odd Case Of Infinite Waves Caused By Games Started In A Recent Beta

  • Split out a number of methods into sub-methods so that our stack traces will actually be useful when a thread gets hung. We have one savegame where background threads are running infinitely and stopping play, but there's a bit more than that going on.
  • Fixed what was ultimately a harmless exception that could happen when you exit to the main menu if the game is running extremely slowly.
  • Fixed a bug where the AI could add null waves into the wave list, causing all sorts of problems.
  • Put in a limiter where if a single faction tries to add more than 200 waves at once, it will throw an exception.
    • In one savegame, we were having linear growth of waves, causing the entire simulation to stop.
    • Most of the waves were null, but there are still north of 200 waves generated, so that's a piece we still need to fix separately from that.
  • PlanWave() has been renamed to PlanWave_OrGetNull(), since it's possible that these don't actually plan a wave if they are for instance trying to do a type of wave that there is no valid target for, or there's no budget for it, or whatever.
    • This is a reminder to calling code to check for nullness and not do things like increment counters for successful waves or whatever if it is null.
    • Adjusted all the surrounding code to account for this. The only one that was notably affected was wormhole invasions.
  • Essentially, some saves started in 2.062 might have their allegiances so messed up that AIs are generating waves against "natural objects," aka metal deposits and similar. If you started your game fresh in 2.062 beta, you really might want to start a new one...
    • Players with save games from 2.062 will receive a warning message saying "You probably should start a new game" when they load that game.
  • In the escape menu, you can now see how many waves the AIs currently are launching at the moment. They might be null or not actually "waves" in the classic sense, and they might not all be against you. But if the number is super high, it's at least not invisible and we'll know something is up.
    • With waves, if there are more than 10, it now shows up as a red number in the escape menu. Same for the "last cycle time" entries if those are more than 5 seconds.
    • This way it's even more obvious when something is amiss.
    • Fun fact, now that we have this display, we can see that even in the broken savegame where it still generates 200+ waves at the moment, it then quickly collapses back down to 2 and cancels the rest.

First Usage Of The New UltraEfficient Serialization Variants

  • Implemented a new ArcenAIWar2Core class called ArcenSerializationAIWar2SpecificExtensions, to let us efficiently and consistently serialize and deserialize certain data types.
    • The first of these are "combat space ArcenPoints," aka those that are coordinates within a planet's gravity well.
    • We're able to do several things to make these a lot more efficient. Previously we had to store these as signed int32s.
    • Now we're able to first subtract 200,000 from each of their coordinates (to make them centered around zero), and then store them in a signed 15-bit integer instead (that in total takes 16-17 bits to store the way we do it).
    • Because there are sometimes values set to "literal 0,0", we also added a bool check in front of them for that state, which lets all those defaults be stored in one bit for the two numbers.
    • We then used this for simply two positions the ships have, WorldLocation and DecollisionMoveTarget.
  • Added and tested another 14 variants of UltraEfficient number types, these being signed but with no default value.
    • These are less efficient in almost all cases, except if there's something unusual like the above ArcenPoints where the zero case is already gated in an external fashion.
    • All in all this lets us shave an additional two bits off each non-0,0 point pair.
      • Given that we're talking about 2 fields on 29,123 ships in the test savegame we use for a lot of these cases, that adds up to just over 7KB. For savings from just two fields, that's nontrivial!
      • Hey, wait a second -- why isn't it more than that? Because only 29,123‬ out of the 58,246 fields were non-0,0. Those get gated behind a simple central bit, as noted above.
  • In our go-to savegame for testing serialization and deserialization with a ton of entities, there are 29,123 ships/buildings/squads/units in there.
    • When last we looked at this, before our UltraEfficient additions were put to use at all, the savegame was down to 2.4009 MB with 3,453,855 data points read.
    • We've now switched over WorldLocation and DecollisionMoveTarget, just two fields on the GameEntity_Squad class, and that has reduced the savegame file size to 2.3449 MB, with 3,508,900 data points.
      • Prior to the additional data formats noted in the above section, it was 2.3518 MB
    • The number of bools grew from 941,752 at 114.9600 KB to 999,998 at 122.0701 KB.
    • The number of Int32s fell from 174,250 at 205.7513 KB, to 57,758 at 27.9987 KB.
    • Then we also now have a new group of 58,246 UE15Bits at 113.7617.
      • Prior to the additional data formats noted in the above section, it was 120.8230 KB
    • In other words, from just changing two fields on the GameEntity_Squad class, we've reduced the savegame filesize by 2.4%. Good grief!
      • Processing-wise, this also means it did 873,690 few CPU operations to save these new numbers, as well. These are very small operations, measured in individual nanoseconds, but still. When it comes to passing a lot of data around across the network in multiplayer, it's not something to sneeze at.

XML Reading Improvements For DLC and Mods

  • Added a few dozen new "FillArrayIndex" methods into our ArcenXML class.
    • Normally we use a method called Fill, which takes in a variable by ref and assigns to it only if there is actual new data. This keeps things so that they work with is_partial records which are missing lots of values (by design) since they only want to change some values. This would primarily apply to mods, or to some extent DLC. Very occasionally to variant units.
    • At any rate, for things that are in an array or a list, you can't pass them in by ref -- so the natural instinct of the end programmer/modder is to make a temporary variable and pass that in. BUT, if they do that without initializing the temproary variable to the existing value of the array at a given index, they'll wind up getting a default value (zero, null, whatever) back in places where a partial record is used. Aka, mods and DLC won't be able to use partial records without breaking something else.
    • This new set of methods let you pass in the array or list itself (not by ref since that is implicit on arrays or lists), and the index in it that you want to assign to. This keeps the general pattern of Fill, and gets rid of the need to use a temporary variable, and thus makes the code shorter on the end coder location as well as making it work with is_partial records for DLC or mods.
    • Thanks to Badger and zeusalmighty for discovering this problem.
  • Fixed three methods in the Mercenary class that were using Fill() with a temporary variable and a string, and then assigning it in. This would not work with partial records. Now it uses the proper FillEnum method, and thus will work with partial records. Since these are not in an array, it doesn't need to use the sub-methods.
  • There are a a dozen or so places in GameEntityTypeData where we are using working variables to read in an attribute via the fill method, but these are all already okay for one of two reasons:
    • Either they check to make sure that the attribute exists in the current xml file before doing any parsing at all, so they never overwrite with default values.
    • Or they read no matter what, but then check to make sure their value is not the default value before overwriting the existing value.
    • These are all funky pieces of data, usually lookups into another table or something that requires a modifier before being assigned to the direct value, hence why they deviate from the usual patterns established elsewhere. They should not be emulated unless absolutely required.
  • On the AI difficulty table, the following xml is now read in via a loop and using the new fillarrayindex methods, making it safe for is_partial_record.
    • income_for_extragalactic_war_tier
    • hacking_wave_multiplier_
    • The ArcenSparseLookup<> for HackingDifficultyMultiplier was also changed to a List<> to be compatible with this methodology, as well as more efficient in general.
    • hacking_level_
      • The ArcenSparseLookup<> for HackingDifficultyLevel was also changed to a List<> to be compatible with this methodology, as well as more efficient in general.
    • aip_for_mark_
      • The markless version of this was also renamed to mark_0 in the xml so it could be read linearly.
    • These do need to be tested to make sure they're what we want, but they should be good.
  • Added a new FillDictionaryKey<> set of methods for most of the data types (strings and numbers) in ArcenXML, so that we can fill dictionary entries safely with these directly, while maintaining is_partial_record compatibility.
    • The dark zenith costs and outputs (DLC2) have been converted to use this.
    • This also needs to be tested to make sure it works, but it should.

Beta 2.064 Fixes to Allegiances

(Released June 11th, 2020)

  • Shark Plots now trigger off of AI sub-fleets like Instigators or Hunters as well as the AI. Shark Plots will continue to not trigger for AI-allied minor factions like the scourge or marauders.
    • Thanks to Lord of Nothing for reporting. This is a bug that's been in the code since Badger first added Shark Plots.
  • Scrapping a player command station is no longer allowed to cause reconquest warp gates to die
    • Reported by ANGRYABOUTELVES
  • Fix a number of problems related to faction allegiances; this includes the AI killing neutral structures and a number of Scourge related issues.
    • Note that if you started a save game on the previous beta you may still see a variety of problems.
    • Thanks to a large number of people for reporting
      • Note: players will see odd issues in save games from 2.063 beta patch
  • Fix a null reference exception you could hit by leaving the ARS hacking popup open when leaving one tutorial and entering another tutorial
    • Thanks to EtoileLion for reporting
  • Take another pass at making the Teach A Man To Fish achievement work
    • Prompted by a report from CRCGamer on steam.
  • The "Win on 200 planet map" achievement has been changed to "Win on 160 planets" instead, since we reduced the maximum map sizes to 160 across all maps.
    • Thanks to ArnaudB for reporting.
  • Created a new extension to our deserialization and serialization logic, named "UltraEfficient," which lets us specify extremely granular information about how we want to save and load data.
    • Basically exactly how many bits to store is built in. Thanks to UncleYar for mentioning he'd seen something like this in another game engine.
    • We kept our other innovations with things like default values using only 1 bit, and the result is something that blends the best of the method of others, and what we had in our buzzsaw binary. This is a lot more efficient to write than buzzsaw binary, too.
    • This is something we have implemented and tested, and it works, but we have not actually integrated it into the game itself yet, so there are no savings to report just yet. We'll be spot-implementing this in fields that are commonly used and which can benefit from this sort of compaction. For the rest, we'll continue using our prior approach, which is slightly more adaptive than what we have heard about in other game engines or network libraries.

Beta 2.063 Fixes and Tweaks

(Released June 5th, 2020)

Note: we discovered an issue in the 2.062 version that will cause strange issues with campaigns you started in that patch. Things like the AI hating neutral factions, or unusual factions being allied. Apologies for this! Games started in a prior version to 2.062 but played through this one should be fine. It's just new games started in Beta 2.062. This patch fixes that problem

  • The Parasitic Starting Fleet now includes 25 Parasite Hydras in addition to the existing 40 Parasites and 2 Muggers.
    • This was a bit of an underpowered starting fleet after having some changes to make it less overpowered a while back.
    • Thanks to tadrinth and Lord Of Nothing for suggesting.
  • The "strength counting data" experiment we tried last version was a disaster on pretty much every level, causing lots of confusion in the code and definitely showing that that was not the way to go with GameCommand. The strength counting data has been returned to how it used to be, which fixes bugs like the galaxy map not showing your enemy strengths properly.
    • Thanks to Badger, Metrekec, and others for reporting.
  • Discovered that some of our changes when we added fleet-wide effects for player ships caused AI ships to show their own healths in a strange way, or outright have the wrong healths. We fixed that partially last release, but overall there were a lot of things that just needed to be separated out for humans and for npcs (AI or otherwise). Those things are now separated out properly and no longer cause any strangeness that we're aware of, like AI ships having "more than 100%" health (when really they were just at full health).
    • Thanks to Ovalcircle for the report.
  • Fix a bug where the AI reserves were winding up neutral towards the player
    • Thanks to x4000 for the bug report
  • Fix a bug where player-allied scourge requested in the game lobby weren't spawning at the beginning of the game
    • Thanks to ynof for reporting
  • The AI now responds to players hacking a minor faction beacon to get a new faction; this is the Scourge, Devourer or HRF. The unlock Fallen Spire campaign hack does not provoke an AI response and explicitly says so in the hack description.
    • Thanks to Tadrinth for the suggestion
  • Some tweaks to the anti-structure Hunter ships; in general fewer are spawned because they felt OP. Also improve their ability to find targets; if you have 2 MDCs then all ships against MDCs will be able to try to make an optimal choice of which to target using generic Fireteam code during the game, instead of being locked in at spawn time.
    • Thanks to Democracy for some balance concerns
  • Fixed a bug in the beta branch with risk analyzers throwing an exception every time they tried to fire. This was related to their data being stored as an Int16 now, but some extension methods still trying to cast them from an object to an Int32. For some reason this was causing an invalid cast exception, which surprises us since the data is a valid Int32 and can be directly cast from an Int16. But apparently it being stored in the super-old format where it's an internal object class invalidates a direct cast. Most likely this is due to boxing of a value type in and object type causing the normal casts defined in the core language libraries to not kick in. It's yet another good reason to avoid the super-old style of external data storage we used for Risk Analyzers.
    • Thanks to ynof and BadgerBadger for reporting.

Beta 2.062 Savegame/Networking Data Compaction

(Released June 5th, 2020)

To play this on Steam, please go under betas and choose current_beta from the drop-down list. We would really appreciate some testers on this so that we can get back out of beta status as quickly as possible! There is not currently a way to get the beta versions on GOG, but we won't be in that status for more than a week, knock on wood. We want to make sure we didn't break anything with all the substantial changes in here, but we fully expect some savegames to throw cosmetic errors at the very minimum. Please report and upload those here: https://bugtracker.arcengames.com/

  • Add some new Planet Names based on ancient Mesopotamia
  • Allow the Outguard to kill Dyson Antagonizers
    • Thanks to GreatYng for suggesting
  • Move the "Scout the planets" objective into Beginner Objectives
  • Imperial Spire Ships should now grant vision so you can watch the Fireworks
  • When the AI spawns a ship from Spire Debris, it takes the general mark level of the AI, and is no longer just mark 1
    • Thanks to ANGRYABOUTELVES for the suggestions
  • Improve the Brownout notification hovertext
    • Thanks to Lord of Nothing for reporting
  • Added a new PKID class, and a PKIDGenerator.
    • These are not actually used yet, as they will complicate things and make save files larger again, probably.
    • This will be really important for multiplayer sync, particularly not in having rolling cascades of incorrect data that requires corrections. But as Chris started to get this implemented, he decided to wait at least one version for getting this all the way in there.
  • Added a PlanetImportanceUIOnly, which is something we can later use to let players do AIWC-style P1-P9 markings.
    • It's just the data storage right now.

General Fixes

  • Fix a null reference in the experimental astro trains code
    • Thanks to NRSirLimbo for the bug report
  • Fixed a rare but longstanding but where the message "Potential bug: planet [name] has no metal generators. This is unexpected" was showing up several times a second in some late-game macrophage games.
    • Basically this would be triggered at times where the metal harvester points were all too close together for the macrophage to be able to patrol between. Now they just hang out near the cluster of them when there's a planet with that sort of situation going on.
    • Thanks to GreatYng for reporting.
  • Fixed another instance of "DoShotMovement: Error at debug stage 3200" that could happen if your background threads raced just wrong.
    • Thanks to NRSirLimbo for the reporting.
  • Fixed an issue that may or may not have come up before, but where fire teams could not be found, even if they existed, if at least one game second of the long range planning thread had not been run already.
  • Fixed a couple of places in the macrophage code where it was making decisions based on what the humans are able to see of threat, not based on what actually exists for it to see of threat. Totally an accidental discovery, we'll see how that affects macrophage behavior when you don't have vision on its part of the map. It should be much smarter in those cases, now.
  • Improve the Major Data Center objective text.
  • Fixed a bug that could result in Spores being unable to move off planet when using smart expansion logic in a small section of the galaxy.
    • They were basically trying to go to the midway point between the two planets constantly, which doesn't exist if they're adjacent.
      • Thanks to GreatYng on Mantis for the bug report and saves -- and StarKelp for fixing.
  • Fix several null references in Notifications
    • Thanks to GreatYng for reporting
  • Fix a bug where AI Spire Research Labs and Citadels could spawn on neutral planets; they are now required to spawn on AI planets.
    • Thanks to GreatYng for reporting
  • Fix a bug in the brownout notification hovertext
    • Thanks to fwiffoforce for reporting
  • Partially constructed Logistical Command Stations no longer grant vision
    • Thanks to GreatYng for reporting
  • Improve the lobby text for Risk Analyzers to clarify things
    • Thanks to GreatYng for reporting.
  • Fixed a very old and very annoying bug where any strike or officer fleets you tried to assign to the None hotkey would reassign themselves a second later.
    • Thanks to deo, Ecthelon, and Admiral for reporting.

Achievement Fixes

  • The "Teach a Man to Fish" achievement should now work
    • Thanks to Lord of Nothing, fwiffoforce and Thrankos on steam for reporting. Probably others as well.
  • The "This Will Definitely Make Things Better And Not Worse" should now work
    • Thanks to Lord of Nothing for reporting
  • The So We're the Bad Guys Now? achievement should now work
    • Thanks to Lord of Nothing for reporting
  • The achievements for beating the Bar Fighter AI Type should now work
    • Thanks to ArnaudB for reporting
  • The achievements for beating the Kite Master hunter fleet should now work
    • Thanks to Lord of Nothing for reporting

Major Fireteams Upgrade For Some Factions (Backported From Upcoming DLC2)

Please bear in mind that none of the work that is happening on DLC2 is slowing down multiplayer at all. These are two independent projects by Badger and Chris at the moment.

  • Fireteams have been reworked to allow for factions that opt in to support requirements for "Which faction(s) or units am I required to attack?"
    • Currently only used for the Hunter Fleet in the base game.
  • The goal is to allow the AI have very strong responses against secondary factions that won't also kill you
    • For example, lets say you've requested a pretty OP secondary faction team of Nanocaust, Scourge and Marauders.
      • The AI can now spawn Extragalactic War Units that are only allowed to go after that minor faction team (which allows the AI to defend itself much more effectively).
      • When these special Extragalactic War Units defeats its enemies, it will warp out of the galaxy.
  • This lets us make more terrifying minor factions without them just ending the game (by attacking you, when you didn't do anything), and is a required item for DLC2 (because that's going to have some terrifying factions) that is backported to the base game.
  • Somewhat related: allow the Nanocaust and Marauders to have an Overall Power Level.
    • This plays into the way that the AI is able to respond to things that are "OP", in the way that we've got them reacting to the Fallen Spire in DLC1. But this lets that sort of response be mounted in purely the base game.
  • Also add a mechanism for hunter fleet fireteams to be created to target specific units in the game.
    • We can use this mechanism going forward to try to let the AI have a bonus response if you take certain very powerful objectives, which allows us to create stronger capturable structures (since we can invisibly balance them by just giving the AI a bit more oomph that will force you to defend those structures very carefully.
  • Also non-scourge minor factions can now have explicitly Defensive Fleets. Currently not used for any base game factions.

Balance

  • Fix a bug for the last two weeks where all AI units had the hull/shield values for Mark 1 units. This was a significant unintentional nerf to the AI
    • Thanks to a number of people for reporting, including Starkelp and Democracy
  • Player-allied minor factions no longer kill warp gates by default. Instead the Hunter Fleet gets lots of bonus ships intended to go after your allies.
    • Needs lots of balance testing
  • When Marauders attack with their ships, those ships can now attack other planets through wormholes. Previously those ships were required to be defensive, and the Marauders would need to build Raiders to spread through wormholes.
    • This is a potentially significant buff to allowing Marauder Empires to get off the ground quickly in unguarded areas of the galaxy.
  • When you take a Major Data Center the hunter fleet will just get a bit stronger with hunter fleet ships that will be focused exclusively on killing your MDCs.
    • This removes the anti-MDC exo waves, which were a hacky/kludgey response at best. This is probably a nerf to the AI right now and will need some tuning

Savegame File Size Reduction

  • Arcen's xml reader now supports directly reading 16bit integers and individual bytes from xml fields, which fits with the new variance in types that we have coming up in the data stored throughout the game.
  • The game now explicitly mentions that Immediate Invasion Nanocaust is very hard
  • Put in a couple of improvements so that the game is now able once again to load a good savegame after failing to load a bad savegame.
  • Adjusted the serialization class to let us specify larger buffers, and buffer growth rates, to prevent cases where incremental small additions cause repeat buffer resizes. This was slowing down even loopback network transport at the moment (aka single player), and slowing down game saves.
    • This is a performance improvement, not a data filesize improvement, hence it not being in the section below.
  • Removed all of the types of serialization code that we have except for Keith's BuzzsawBinaryArray.
    • We were wasting some cycles -- not a lot, but some -- on checking what mode we were in, and if there were delimiters, and if there were type labels, etc. Since we use none of those features, stripping it down to just the highly-performant core is a good idea for performance of network message encoding and decoding in particular.
    • This also does help make the code a bit easier for us to follow, since it's all one mode now.
    • This is a performance improvement, not a data filesize improvement, hence it not being in the section below.
  • Added a new "Write Deserialization Data Sizes" debug option in personal settings.
    • loading a game, write WorldDeserializationDataSizes.txt in the PlayerData folder. When a savegame is really large, turning this on lets us figure out what is taking up so much space so that we can potentially make some optimizations.
  • Added some complicated new classes and write structures to actually pull out data being read by type, and aggregate it as we wish, so that we can write the above sort of information.
  • Improved the way that the "external data patterns" are saved in savegames.
    • On a test case 8mb savegame, this saves half a mb.
  • A bunch of extra instrumentation has been added into the game for savegame deserialization and serialization, both, to let us see what is happening and why.
  • Found a trio of places directly in fleets, and two places in "minor faction common external" data internal dictionaries that were serializing ship names by name instead of index.
    • Converting this to use indices instead saves another 0.3 of a MB off of the large test savegame case we found.
  • New debug settings option: Write Deserialization Fireteam Data
    • When loading a game, write information about all the fireteams you're loading to disk. When a savegame has a ton of fireteams and you don't know why, or who owns them or what they are doing, this helps debug.
  • Got rid of the ExtensionMethodsFor_SpecialFactionData class, which was something that required editing a central file in order to get certain faction features. Those factions features are now implemented as virtual methods that can be overridden by other classes with us blind.
    • This did require us to add a FireteamBase class in the main ArcenCore code, but that was a solid tradeoff for making fireteams automatically work with any potential mods in the future without them having to use any central methods to do so.
  • Refactored various fireteams code to get less repetition and more centralized code for a few basic things.
  • Fixed a few places with scourge and nanocaust fireteams to clear our disbanded fire teams each long range planning pass if they were somehow missed before.
    • All of the other factions did this already, but adding this to these two shrunk the test savegame we had from 7mb to 4mb on one save and load cycle, then to 2.8mb on the next cycle.
    • This tells us that, somehow, duplicate copies of fireteams were probably being logged into at least one of the central lists, which would have this effect as well as make processing a lot slower since it would process a few things multiple times.
  • ArcenLinkedList has been split into two.
    • There is now ArcenOverLinkedList, which is still used for the three main GameEntity classes.
      • This one has a couple of funky hooks in for when an entity dies, which is appropriate for them but for nothing else. They're connected on purpose for benefits like performance and cleanup when something dies.
    • There is also now ArcenLessLinkedList, which is used for all of them, planets, fire teams, frenzy fleets, and more.
      • These basically treat each list as an independent entity, and there's no concept of an entity "dying and being removed from everything." They're independent on purpose.
  • Converting over so many things to use the ArcenLessLinkedList was a huge number of code shifts, so hopefully we didn't break anything with that.
    • We did fix some minor inefficiencies as we made these changes, aside from the efficiency boosts of this being a thing in general.
    • Now that this is done, however, we immediately get the benefit of on the first save-load cycle it takes the 7mb save down to 2.8mb. In other words, duplicate fire teams are no longer possible to accidentally have, because their lists reject that.
  • The number of fireteams has been cut down dramatically by the fix to deprecated fireteams hanging around in general, but fireteam history items are still very long compared to what they could be in terms of data size.
    • In the example savegame that was originally 8mb, which is now down to 2.8mb, we are left with 790 fireteam history strings, which total 219.6729 KB in savegame space. This is an average of 284 bytes per history item.
    • We have implemented a new history item style which stores between 2 and 5 integers, with the most common case being 4 integers.
    • Normally a 32bit integer requires 4 bytes, but thanks to Keith's buzzsaw binary array, our average storage space required is 1.79 bytes in practice.
    • We can't actually measure the effect on this exact savegame, because old history items will be kept in the less-efficient string format. But it will only keep the most recent 2 history events that are string-style, cutting it down some (often they had 3 or so).
    • However, if we take a general average of assuming that we had 790 events that were in the new format, and on average have 4 integers with, let's say, 3 bytes required for each (to be even more pessimistic), then we would go from 219.6729 KB in savegame space for those fireteam histories down to 9.2578 KB. That's a 96% compression!
    • Bear in mind that since this formmat is new, we might have introduced some bugs in the display of fire team histories, but hopefully not. It also lets us make the formatting of them be more consistent, since it's all centrally defined now. Testing thus far has been promising on the bugs front.
    • Interestingly, after letting the savegame in question run for about 14 minutes (gametime), it did increase in size by about 100 KB (huh?). But upon loading the new 14-minutes-later savegame, the fire team data had dropped from 237.6553 KB down to 21.6162 KB total for the fire teams and their histories. That is with 572 fireteams, and it looks like 10 old-style text histories and all the other histories being in the new style.
  • Mostly as a test case for something we want to do later with GameCommand, but also as a way to improve the data storage requirements (trivial) and calculation requirements (less so) for "strength counting data" for each faction, it has been split into several subordinate data structures which are only calculated when actually relevant.
    • In a game with 22 factions on 80 planets, this amount of data drops from 129.9697 KB to 94.9980 KB (see? trivial).
    • However, this does translate into only 54,651 integers being calculated 10 times per second, down from 75,238 integers 10 times per second. And that is less trivial, as those integers are not all trivial to calculate.
    • We may be able to cut this down even further, but on maps of reasonable sizes it doesn't look like this is a real bottleneck, so this remains for now just a useful test case (the test shows that this sort of thing can work quite elegantly, which is great news).
    • In savegames from before this game version, loaded into this game version, there may be strange decision-making for 1/10th of one second. But actually, probably not even that because it recalculates this even while you are paused, so by the time you could possibly unpause the data is there again. This game is kind of a technological beast.
  • Also moved the strength counting data code into its own file for easier editing in the future.
    • Also also, this provides the template for us to have more specialized strength counting things added in the future for just some factions without it being something that loads down every faction's processing time. Which could be useful or may not be.
  • The way that entity systems are serialized is now far more granular, using some serialization flags that are written at the time of saving a game (or transmitting across the network) to say what kind of data to expect.
    • This lets us omit a lot of data in cases where it is a bunch of blanks or otherwise not needed (becuse of the type of system not needing that type of data, etc).
    • The cost of this is one extra 32bit integer, in an enum flag format, and the savings is pretty substantial. This is primarily a test case for what we will do with GameEntity itself, although it's also useful inherently on systems -- to some extent we were avoiding adding too much data onto systems, because of risk of bloating save files. Now we have the mechanisms by which we can do it.
    • In our existing large-savegame test case, this moves the system data from being 166.4932 KB (not huge, we know) for 29,123 ship systems, down to 118.4746 KB for those same number of ships. That's not exactly a giant compression of data, but it was the test case after all.
  • There were some very old player profiles stored in a different serialziation format which we simply no longer support. It will probably affect almost nobody, since it's been prior to version 2.012 that profiles were in that format, and if it fails to load the old profile they just create a new one and nothing is really lost.
  • Fixed an internal issue where we were calculating the amount of bytes being deserialized slightly wrong; individual pieces of data are stored in a bitstream that can span a couple of bytes, and so typically this meant that we were overestimating how many bytes of data was actually being read.
    • This gives us a more accurate view of how large our data actually is, particularly as we drill down more.
    • The overall data size was corrected from being 2.5705 MB to 2.5702 MB, so as you can see at a macro scale it is hardly any difference at all.
    • Oddly, we discovered that a lot of bools were not properly being logged, although their macro file size was. Not sure what was up with that, but it gives us a more correct picture now. That does change our total reads of data points in the example file from 1,329,568 to 3,420,471, though -- now sub-tracked all properly. 859,317 bools read out at a size of 104.8971 KB, versus the wrong statement of 107,830 bools read out at 105.3027 KB.
    • 32bit integers were in the same boat, more or less, with 1.9432 MB being the agreed-upon correct amount for both new and old formats. But in the new format we can see it was actually 2,362,745 ints making that up, not just 1,143,492 of them. That makes a big difference to how we evaluate the cost of things in our saves.
  • Adjusted how we are saving the data for entity systems, based on how we've learned about things from the deserialization log accuracy improving.
    • Essentially, a blank value (empty string, 0 on an int or similar) is just one bit. Using a large int32 bitflag array, we don't save enough space to warrant using them. We should instead be using bool gates.
    • BUT, because of the tiny size of blank values, we need to be using them ONLY for places where we would be saving at least a couple of real values, or 2+ blanks, in order to break even on space or save space.
    • This is harder to do in small data classes, but an easier rule of thumb and actually a lot easier to read in code.
    • In this particular case, the data stored is actually NOT smaller, but this is because of some of the data types we're using, not the methodology of actually doing the saving. So we'll be improving those data types, along with a number of other things.

Revised Serialization Format

  • As part of our changes to our serialization buffer writing numbers, we now have it do a few quick comparison checks to do far fewer searches in a loop.
    • This is a major CPU timesaver during serializing a number for either disk or the network. Literally in an average savegame it may save as many as 40 million loops, 40 million bitshifts, and 40 million bitwise operators.
  • For our serialization process, we've been extremely efficient at serialiizing things via "buzzsaw binary," which has a lot in common with "variable length quantity" encoding, but is even more aggressive in size reduction. This was something that Keith LaMothe originally designed, and he documented the vast savings at the time that we had in terms of file size compared to other formats (straight out binary, or character strings), and the processing power compared to these other formats if they are then compressed for transport (as they would have to be) is really notable.
    • However, we're now taking this further, by quite a bit, and have implemented a new version of the serializer and deserializer that supports smaller data types, tighter packing of certain data types, fewer loops in all cases (as noted above), and a few other features.
    • The savings that you get out of the new type is something that you have to look at a savegame in aggregate in order to tell how much space you're saving.
    • We've verified that we can now accurately store in the new format:
    • strings (more compact) and chars (could not directly do before)
      • We may later add in an Latin-letters-centric version that has heavily stripped-down data. Right now this takes 16 bits per character, and is 15% of the savegame filesize that we're experiencing in our test save.
    • bools (literally 1 bit, same as before)
    • bytes (now stored in native size, whereas before each byte took an average of 2 bytes to store -- but we also were not using this format).
    • 16 bit ints, signed and unsigned.
      • For numbers, we also have the ability for either 0 to take 1 bit, or -1 to be the sole negative number and take 1 bit as the "null case."
        • Previously, a -1 in these circumstances would take a whopping 10 bits, so any code that had -1 as the default instead of 0 was a bloat if it was used commonly.
      • In these cases, because of some "inferred bit" logic that we've also now added (shaving another bit off most numbers), we can't tell the difference between a 0 and 1 in an unsigned zero-not-default format. So there's some extra minor code in there that actually turns 0s into just two bits of storage, while -1s are 1 bit in those formats. Kind of a double bonus, in the main!
    • 32 bit ints, signed and unsigned once again, and with the alternative defaults and so on.
      • Not counting the new defaults keeping things so much smaller as described above (and that will make the biggest difference), we're saving something like 3 bits per integer compared to the old version.
      • By the time you get to 32bit or 64bit integers, Keith had squeezed pretty much all out of it that could be squeezed, a few edge cases in our style of data aside. It was mostly in smaller number formats (supporting them directly at and below 16 bits, and using smaller bitlength number formats for 32bit and down).
    • 64 bit ints, which are used as the foundation for floats and FInts to be passed around.
  • So, after all that conversion to a new data type work, and drastic code changes, and some 30+ hours of work, we get an improvement in data sizes of...about 10%.
    • That's disheartening in the extreme (though we already got huge gains elsewhere on savegames), but one thing that is positive is that the new serialization does far less work to actually do the saving of the data, and that's a notable win for multiplayer.
    • We do also have other things we can do to get the data sizes even lower, but mostly those are strategies we could have used without having gone through all of this giant effort to get the data formats themselves 10% more efficient.
    • On the other other hand, had we not gone through all this work to get the 10% gains, we would have always wondered if it would have been more gains than that, and by going through the process of getting the 10% gains we gained a better understanding of some aspects of the codebase and fixed a number of other small bugs.
    • In the end it wasn't a wasted venture, but the payoff is disappointingly low in terms of performance/savegame gains compared to what we'd hoped it would be.
  • A variety of places in the new ArcenSerializationBuffer were throwing exceptions when data that was out of range was passed in, but now those just show an error message and write to you log, while correcting the data as best it can so that it can save.
    • This isn't for overflows or underflows, but is for when a negative number was passed or less than -1 was passed in other cases.
Data Cleanup And Fixes We Found On The Way
  • Got rid of the FPoint class, as it's not something we ever use, and we're going to be adjusting how we handle a number of our internal classes.
    • We're preparing to implement a number of new custom data types, some of which are targeted at making multiplayer performance possible without worrying about cascading desyncs or other issues of that sort.
  • Got rid of the old solar system planet info, which has been completely unused since who knows when.
  • The data it was storing should not have been serialized anyhow, but was.
  • Fixing something that has been bothering me for years, the PlanetTypeData stuff has been moved out into its own file.
    • We've always kept these type definitions in their own files, separate from the actual object definition, and why this one was an exception is unknown.
  • Basically all the enums in the game now specify their underlying data type directly, instead of just defaulting to int32.
  • A ton of data types have become more specific, as in hundreds of fields, and this will make everything serialize more compactly as well as initialize new objects slightly faster.
    • This is going to require basically every mod to be recompiled at bare minimum, along with the new requirements on how data is deserialized.
  • The old serialization gates have been removed, as we only had one in the first place, and have been using something that is xml-driven for the last few years.
    • It's apparently spring cleaning time in the code, since we're converting so many things over.
  • The science and hacking points gathered on a planet are no longer stored by faction index, but instead are stored globally for all humans.
    • This is how we made the code work anyway, so now the data storage matches. It's a major QOL improvement for players in multiplayer to not have to each gather science on each other's planets, and something we discussed publicly a while ago with a lot of people being happy.
  • There was a whole bunch of code that was using the mark level by RowIndex, instead of by Ordinal.
    • This may or may not have been a problem, it's hard to say, but if there were later modded-in mark levels it definitely would have been.
    • As it stands, it's possible that this fix might break something else, so if you see any odd mark levels, please let us know.
    • Honestly, as the code reads, it's kind of surprising that there weren't problems from this already.
  • Got rid of our "ContainsValueType" list extensions, as that seemed more potentially problematic than anything else. It was also very rarely used.
  • Got rid of the "RelatedEnumValue" field on GameCommands, as we only used that for one thing with AI scrapping units for budget refunds.
    • That scrap code for refunds was no longer in use, so has also been removed.
  • Preliminary adjustments made to our network library to handle the better data formatting that we are able to send now.
    • There's a bunch more to test with that later, but we now get a very nice binary-to-binary style of transfer, super slim, with no conversions to char arrays in the middle, or compression of parts, etc.
  • Renamed a whole lot of variables that were too vague, so that now we know if an "index" means that of a planet or faction or whatever.
    • Just general code sanitation.
  • Fixed a bug with effective full membership strengths in fleets being able to be a negative number in some cases if there was not an explicit squad cap set.
    • These now correct themselves to 0, but it doesn't seem to have been breaking anything.
  • Turns out there was all sorts of funky data in some older savegames, and we now have optional overrides on the deserializers that let us pass in a field name so that we can easily see what the field that is out of range was.
    • This is not something that you need to generally do, if you're a modder. It's just there for if you're having problems.
  • Also added in a new SetIfNextIntErrorsThenCorrect method on deserializers, which lets us correct old data rather than complain about it, for cases where we find it.
    • This is something that we should only be using where it actually comes up that there is bad data in some saves, but it's a tool to make those saves load in properly and have correct data, versus failing to load or continuing to have bad data.
  • In general there is more error-checking and self-checking now as we read in and out data, but in a way that doesn't slow the actual read and write process down.
  • Fireteams were variously setting their invalid state to be -1 through -5. By convention we use just -1 normally, and we can read/write that as two bits instead of 10 bits, so we've converted all of it to be -1 now.
    • As part of that, places we were serializing the fireteam IDs now auto-correct old data that was less than -1 to be -1.
  • Apparently it was sometimes possible to have negative hull points lost, aka more health than baseline. This is now self-correcting.
  • Fixed a transient exception that could happen in PrivateExoNotifier if you were loading a lot of savegames back to back.
  • More detailed serialization logging is now in place for when savegame logging is enabled, which lets us get a lot more info on things that are different between the versions if they are.
  • Fix to loading and then resaving certain very old savegames from around the time extra hacking event data was added (August 2019 saves were where we saw the problem in our testing). This is unrelated to any of our recent changes, but just something we caught during regression testing.

Benchmark Results

  • Test case improvements in savegame filesize:
    • SPIRER322.save: 8.3507 MB (3,858,950 data points) to 2.4009 MB (3,453,855 data points). 28.7% size
    • Last_Hope_16.save: 1.4435 MB (1,699,258 data points) to 1.0071 MB (1,570,970 data points). 69.7% size
    • decloakingTest.save: 1.4546 MB (1,752,227 data points) to 1.0690 MB (1,630,603 data points). 73.4% size
    • tech history.save: 594.1520 KB (696,137 data points) to 483.9174 KB (629,171 data points). 81.4% size
    • golem insane.save: 588.5422 KB (696,573 data points) to 483.7046 KB (628,923 data points). 82.1% size
    • fail to deser.save: 541.8727 KB (653,298 data points) to 441.2745 KB (588,517 data points). 81.4% size
    • performance_concern.save: 2.2050 MB (2,170,709 data points) to 1.3692 MB (2,127,092 data points). 62.1% size
    • LateGameZeusSpire.save: 3.5690 MB (3,073,064 data points) to 1.9468 MB (2,904,438 data points). 54.5% size
    • FreshSpireCity.save: 614.7300 KB (678,371 data points) to 500.2831 KB (642,760 data points). 81.3% size
    • assist menu.save: 412.8888 KB (545,698 data points) to 385.0891 KB (503,506 data points). 93.2% size
    • manychanges.save: 415.7845 KB (487,742 data points) to 356.0349 KB (430,439 data points). 85.6% size
    • extragalactic slow.save: 1.1419 MB‬ (787,800 data points) to 615.9395 KB (730,003 data points) 52.6% size
    • TurretTest Dec7 2019.save: 388.5265 KB (500,837 data points) to 365.4358 KB (445,445 data points) 94.0% size
    • Releasing Nanocost Aug 29 2019.save: 1.7157 MB (2,142,369 data points) to 1.1955 MB (1,992,190 data points) 69.6% size
    • Aug 5 2019.save: 1.5154 MB (1,615,230 data points) to 1.0923 MB (1,599,636 data points) 72.1% size
    • 000 bug Nov 8 2019.save: 598.0068 KB (789,163 data points) to 447.1401 KB (613,200 data points) 74.8% size
    • spire save scourge 3.save: 851.2179 KB (962,252 data points) to 643.9442 KB (881,762 data points) 75.6% size
    • Please note that all of these savegames (among others) were used as regression tests, and we verified that the data went in and came out identically. A number of these failed regression tests at various points, which we fixed before moving on. They all pass now.
  • Here are some specific subsets of data sizes based on data type, in real-world average case savegames:
    • Bools take exactly 1 bit to store. 100% size
    • Bytes (normally 8 bits) take 4.74 bits to store on average, depending on the save. 59.2% size
    • 16-bit integers that are not allowed to be null take an average of 1.78 bits instead of 16. 11.1% size
      • Largely this is probably because a very small minority of them have data, or they have very low numbers in them that can be represented in a small size.
    • 16-bit integers that cannot be less than -1 take an average of 11.38 bits instead of 16. 71.1% size
      • Largely this is because a ton more of them have data, but not all of them. And we have a special case for the -1 value where it only costs two bits. 0 costs 1 bit.
      • These are used heavily to identify fireteams, planets, and factions by index.
    • 16-bit signed integers are barely used in the game, to the point we don't have enough data to give any sort of average.
    • 32-bit integers that are signed are used almost exclusively for coordinates, and take an average of 12.71 bits (instead of 32) 39.7% size
    • 32-bit integers that are not allowed to be null take an average of 5.27 bits instead of 32. 16.4% size
      • Largely this is probably because a very small minority of them have data, or they have very low numbers in them that can be represented in a small size.
    • 32-bit integers that cannot be less than -1 take an average of 2.71 bits instead of 32. 8.46% size
      • Largely this is because a ton more of them have data, but not all of them. And we have a special case for the -1 value where it only costs two bits. 0 costs 1 bit.
      • These are used heavily to identify ships/squads, shots, and wormholes by ID.
    • 64bit signed integers are not used enough for us to have valid averages for them. But the worst case is pretty much used for the single instance of one, and it winds up using 70.00 bits instead of 64 bits. 109.0% size
    • Strings are highly variable in size, but they require one Int16 non-negative for the length, and then the equivalent of one signed Int16 for each character. 100.0% size
      • We can cut this down in a future update, but rarely do strings use more than 14% of our total savegame size on a late-game savegame.
      • There IS at the moment a floor of about 100KB of data that is being used by strings in the saves, and cutting that in half (ish) with future improvements would be nice.
    • Floats are not used for any sim-related since they are not reliably deterministic between machines.
      • But we do store some of them for purposes of some purely visual aspects, and internally we convert them to an FInt first. Under the hood, THAT is an Int64, and at any rate they wind up taking 26.54 bits instead of 64bits in our case. 41.4% size
      • Basically none of them are zero, but they are small enough numbers that we save a lot of space. Yes, smaller numbers take fewer bits in this crazy format.
    • FInts, or fixed-int numbers, which have three significant digits of precision at the moment (we are thinking of changing the format up soon, but must investigate first) take an average of 5.48 bits instead of 64. These are Int64s internally. 8.56% size

Version 2.048 Bugfixes

(Released May 22nd, 2020)

  • The text of forcefield frigates no longer mentions (erroneously) that ships under them deal half damage.
    • Additionally, they now benefit from the Heavy hull type, letting them get above mark 4 if you invest in enough upgrades.
    • Thanks to Nyteblade for reporting both.
  • Fixed a typo in the hack for claiming the new Fleet Research Station ships that was not charging you their AIP properly.
    • Thanks to kasnavada and Spook for reporting.
  • Added a new cheat code:
    • heal me
      • The issuing human player gets all of their deployed ships on the planet they are currently view completely healed in terms of shields, hull, and cloaking points.
      • This is incredibly useful for testing, if you're trying to accomplish something but your test ships are getting shot to bits.
  • Added a new "LocalMultiplierWhenNoDeltaTime" on planets, which factors in two things:
    • Firstly, if game speed is running faster. Secondly, if there is coarse background processing going on.
    • For things that normally just happen "every sim step" at a flat rate, which are few and far between, they should now be multiplied by this.
    • The lack of this is why it was taking 16 realtime seconds to decloak ships when at 4x sim speed when normally it would take 4 seconds in 1x sim speed.
    • Thanks to wm46, DEMOCRACY_DEMOCRACY, and ArnaudB for reporting.
  • Put in some code that makes decloaking far more efficient, and far more clear.
    • Essentially, as it tries to find tachyon targets it only looks at ships that can possibly be cloaked.
    • But secondarily, it then only issues orders to decloak ships that are currently cloaked.
    • This makes it so that you can tell something is busy decloaking because it haas a beam out to decloak an enemy, NOT because it has a beam out to all the things it has decloaked or could decloak on a planet (that got intense).
    • The end result is functionally the same but visually more clear and computationally vastly more efficient.
  • Found an incredibly old style of profiling logging data that we have not used for years, but which was in there slowing things down on random occasions, writing to disk in things we did not even need.
    • We've implemented several new kinds of profiling since this, and this was supposed to be toggle-on in the first place, but somehow it was getting toggled on some of the time. It has now be stripped out to be sure it is never accidentally on and wasting your CPU and disk cycles.
  • For reasons we can't at all trace, it was possible to sometimes get extra flagships of both the correct and incorrect types in a fallen spire city.
    • It now detects and removes these extras, and logs a "soft warning" invisibly to your local log. If you see these sorts of soft warnings, it won't hurt anything, but it does let you know it fixed the error.
    • This was reasonably rare, and we're taking care to make sure and add in missing flagships if there ever are any, too.
    • Thanks to Lord Of Nothing for the sole two repo cases and reports we had of this.
  • Fixed a very annoying issue where if you had ships selected directly (as in not by fleet), then when they went through a wormhole they would become unselected. This was basically working as-coded, but why we had it that way is a big question mark. When we reworked the selection code, we had thought we'd removed all things of that sort. And with the ability to give cross-planet commands (move to a point on a planet you are not on, or attack a unit on a planet you are not on), the desire to keep selections consistent regardless of where you go is definitely longstanding.
    • Thanks to FDru and Benkyo for reporting.

Version 2.047 Perks By Another Mother

(Released May 21st, 2020)

  • Fixed up the tips to no longer mention EXP, and to mention the direct science upgrades.
  • Fixed a bug where if you were C-clicking a fleet's upgrade without having enough science to do the upgrade, it wouldn't show the popup with info about what the upgrade would be like.
    • Thanks to Mitsuha for reporting.
  • Fix a divide by 0 in the scourge code
    • Thanks to Lord Of Nothing for reporting
  • Tweak the rules for when nanocaust spawners are allowed to spawn
    • Thanks to Histidine for reporting
  • Make sure AI Reserves are friendly to All AIs and hostile to all Players
    • Thanks to Lord Of Nothing for reporting some oddities
  • Added a new cheat code:
    • my potluck OR use the short form mp
      • The issuing human player gets a random grab bag of ships spawned on the center of the planet they are viewing in a new fleet named "Potluck [Something]." Many of the ships will not be ships that a player could normally get.
      • This is incredibly useful for testing hacks, for instance.

Balance Changes

  • Agile Transports now have half the health and shields of other transports, to match their description.
    • Thanks to Waladil for noticing the inconsistency.
  • Raiders, Daggers, and so on now have basically double the hull health that they did before, except vicious raiders have a bit more than double the prior.
    • Thanks to DEMOCRACY? DEMOCRACY! for suggesting.
  • All of the player and AI mobile forcefield generators, which already no longer shrink when taking damage, also no longer cause a firing penalty for ships firing from under them (aka they are now great-forcefields). This is consistent with AIWC, and makes them a lot more useful.
    • Thanks to DEMOCRACY? DEMOCRACY! and StarKelp for suggesting.
  • The AI guard post with a shield, and shield generator in general, also no longer have firing penalties for out from under them (though they do shrink). This is also now consistent with AIWC, and is basically because they are more "finely tuned."
    • Thanks to DEMOCRACY? DEMOCRACY! for suggesting.

Fireteam Changes

  • When a bunch of fireteams are deciding on a new target, the code correctly now figures out when a target is being significantly overkilled, and stop assigning fireteams to that target.
    • The practical upshot of this is that fireteam-based factions (Scourge, Hunter Fleet, etc) are now much better at dividing their attention and striking at multiple points simultaneously
    • This code has been in for some time, but there was a bug that was preventing it from working right
    • A faction can choose to keep the previous behaviour by setting NoDeathballing = false on all its fireteams.
    • For right now, the Nanocaust is going to keep its old deathball behaviour, pending discussion/polling at https://steamcommunity.com/app/573410/discussions/0/2246679252927977012/
  • Reduce a fireteam's speed bonus when attacking a planet. They were going a bit too quick, and this nerf should help compensate for the intelligence buff

Fleet Changes

  • Previously, you could only have 5 ship lines per fleet. This led to a lot of juggling of ship lines, and other unpleasant things. This limit has been increased to 40 ship lines.
    • One reason among many that this was a restriction was because of how the EXP system was set up previously. At this point there is no good reason to have things be so limited... with the possible exception of some units that give fleet-wide bonuses, like Raiders. It may be that we need to rethink Raiders having this advantage, as it may simply be too powerful.
    • At any rate, fleets can basically be whatever size organizational unit you need them to be, now, which lets them function a bit more like control groups once did.
    • Thanks to SplitterWind and others for inspiring this change.
  • Any ships in fleet lines that you swap between fleets no longer are destroyed if the member is on the same planet as its new flagship.
    • Aka, if 20 of your ships from that line are on a different planet, they would still be destroyed, but if 40 from that same line were with their new flagship, they would be preserved.
    • Thanks to Badger for suggesting.

New Hackable: Fleet Research Stations

  • Technical details: ARSes and similar can now be modded via xml to give different numbers of options of strikecraft and frigates with these options:
    • grants_stuff_to_be_added_to_player_fleets_strikecraft_options and grants_stuff_to_be_added_to_player_fleets_frigate_options.
    • The defaults remain 4 and 1, respectively.
  • Technical details: Added a new "Fleet Research Station," or FRS, which is a lot more rare than the Advanced Research Station (ARS). These are also only on the other side of the galaxy, mainly.
    • These are the first of a new group of structures to use a "grants_stuff_to_be_added_to_player_fleets_required_tag" xml attribute, which lets us limit what sort of specific ships they can grant. Modders can make us of this to do more things, if they desire.
    • This is paired with a new fleet design "OtherHackables," which can keep these new ship types out of the main rotations but still able to be gotten by special buildings.
    • Since it has to match by tag, this is really great for mods to be able to do all sorts of specific ship-granting sub buildings. And we can do that in the game if we so wish, as well.
  • Technical details: There is a new "aip_when_granted_by_hack", which is on the new FRS ship types. These are things that cost you more than mere hacking points.
    • Here again, mods can do some very intersting things!
  • The idea behind the FRSes is that they grant you costly, but very powerful and rare ship types that you can't get any other way, which give you fleet-wide bonuses.
    • The actual ships from the FRS are barely the point -- yeah, they can be cool, but the main point is the sort of bonus that they give to the entire fleet as a whole.
    • These are basically a new way of handling the Perks system, letting you get Perks from FRSes instead of what we had thought about via EXP gains in the past.
    • AND these perks are transferable between fleets, since the perks are in the form of a specialized ship.
    • It's worth noting that your fleet gets the perk even if none of the ships of the line are actually built at the moment (or at all).

6 New FRS Ships To Capture (Fleet-Wide Perks)

  • The ability that Raiders had that supercharges the speed of the rest of the fleet was indeed too powerful to just have as a random one-off ability on a variety of ships. That has been removed.
  • Added three new supercharge abilities, which caused a LOT of code changes.
    • These let a ship buff the hulls, shields, or attack power of their entire fleet.
    • This is ONLY meant to be used for player factions.
    • The strength of fleets and the ships within them get recalculated properly to account for these changes, which is a bigger deal than you might think.
    • We can also build upon this framework in a lot of various ways in order to allow for ambient effects at a planet to affect player ship stats, as another example.
      • Trying to use this for ambient effects on any form of NPC ships would absolutely not work, and also this would assume that an entire fleet is on one planet, so there are some pitfalls even there.
    • Trying to keep these things computationally-brief is tough if we're not careful, but we've been careful.
  • There is a new Turbo Raider ship, which you can only get via hacking an FRS, and which costs you 40 AIP to get, but which gives you 90 raider-like ships (wow powerful), and also makes the entire rest of the fleet (except flagship) super fast.
  • There is a new Tutelar Pulsar Tank that you can get from an FRS for 40 AIP, giving you 50 pulsar-tank-like ships (holy smokes) that ALSO buff the health of all non-flagship members of the fleet by 1.5x.
  • There is a new Inciting Parasite that you can get from an FRS for 60 AIP, giving you 90 parasite-like ships (holy smokes) that ALSO buff the attack power of all non-flagship members of the fleet by 1.5x.
  • There is a new Encircling Spider that you can get from an FRS for 50 AIP, giving you 120 spider-like ships (wow) that ALSO buff the shields power of all non-flagship members of the fleet by 1.5x (including bubble shields, if there are any, which is why some of the cost here in AIP).
  • There is a new Ireful MLRS Corvette that you can get from an FRS for 30 AIP, giving you 70 mlrs-like ships (wow) that ALSO buff the attack power of all non-flagship members of the fleet by 1.25x.
  • There is a new Ultima Fusion Bomber that you can get from an FRS for 80 AIP, giving you 80 heavy-bomber-like ships (holy smokes) that ALSO buff the attack power AND hulls of all non-flagship members of the fleet by 1.5x.

Version 2.046 Hotfix

(Released May 20th, 2020)

  • Fixed a bug where any savegame that you loaded that had drones in a fleet with a dead centerpiece would cause an exception in PerFrame_CalculateEffectiveFleetData, debugStage 784600.
    • Thanks to choam, DEMOCRACY? DEMOCRACY!, and Lord Of Nothing for reporting.
  • Fixed a bug where C-clicking a fleet's direct science upgrade button was not properly showing the past science upgrades to a fleet in terms of the comparison of mark levels.
    • Thanks to Mitsuha for reporting.

Version 2.045 Scientific Emergence

(Released May 20th, 2020)

  • Fixed a bug where if you started a new game and opened the factions menu and clicked back and forth between the AI and then the human faction, you'd get an exception.
    • Thanks to Mitsuha for reporting.
  • The fallen spire (expansion 1) code that allows for neural nets to grant new types of frigates and destroyers has been made a lot more general-purpose so that people can mod in their own neutral nets with specific frigates and destroyers (or whatever else, frankly) and have that function properly. Previously it was not possible to add custom neutral nets, but now you can do it just via xml alone.
    • Thanks to Lord Of Nothing for the request.
  • Starting from this version, the game now also tracks direct science upgrades to fleets, and not just the central tech upgrades. Any past upgrades you spent science on prior to this version will not be reflected, but future ones are.
    • Thanks to Mitsuha for suggesting.
  • In the fleet management screen where you can directly upgrade either flagships (plus any drones they have) or the entire fleet, it now notes in its tooltip that you can C-click to see what all will be upgraded.
    • Once in the C-click screen, it shows you all the benefits in great detail, just like it does on the tech upgrade screen for non-direct techs. This way you have so much more information about what the benefit of an actual tech is. This is pretty important now that there's so much more that we can upgrade by science!
    • Thanks to Mitsuha for suggesting.
  • Hopefully add support to some new voice lines related to the Dyson Sphere
    • Not very well tested.
  • Drones of all sorts, be they AI-based or part of a combat factory, or off a hive golem, now all inherit the mark level of their spawner. If their spawner dies (in the case of AI stuff, mainly), then they will stick at the mark level they were.
    • Thanks to NRSirLimbo, Poppy, Mitsuha, and Badger for reporting.
  • There's an experimental change where any drones that happen to have had techs that benefit them as a type applied, making them centrally higher than mark 1, now get those added marks on top of whatever their parent spawner's level is. This isn't used in the main game, but should help some mods.
    • Thanks to -NR-SirLimbo for suggesting.

Easier To Mod Direct Science Costs

  • Fixed up several places where the game would let you get infinite upgrades after the 6th for a given fleet, or things like that. These would not do anything, but seemed very strange.
  • The direct science upgrade costs (and number of upgrades possible) are now handled via data in the usual tech format, and assigned using a new tech_upgrade_that_is_used_for_my_direct_science field on ships.
    • This makes it so that people can mod in their own direct science costs for things, or differentiate further between specific ship types, as needed.
    • It also lets us adjust the data so that we can differentiate things for certain units ourselves, as well.
    • Please note that for anything where the flagship/centerpiece can change, like command stations, you really don't want to differentiate since this data is on the fleet itself. So the direct upgrade cost will always be the same for all command stations in general, is the main case of this right now. All other fleets tend not to have flagships that change (fallen spire aside).
    • Big thanks to -NR-SirLimbo for suggesting this refactor. It makes things way more flexible, without really changing anything you see on the interface.
  • A form of self-checking has been added for anything that it thinks should be directly-upgradeable by science.
    • This winds up catching some non-player ships, and potentially some ships from mods or expansions doing unusual things. If you want to suppress the exception in your mod, just add tech_upgrade_that_is_used_for_my_direct_science="Direct_ActuallyUnused"
  • Basic battlestations no longer benefit from the help of the central Citadel tech. They are only upgradeable by direct science, now.
    • They were far too similar to citadels in terms of their ability to tech up, otherwise, which kind of devalued citadels. It doesn't seem like they warrant their own full separate tech, though.
    • The direct science upgrades are now a bit cheaper than last build for battlestations, and a bit more expensive for citadels. Nothing giant in either case, but it skews them both a bit more, which is good.
    • Thanks to -NR-SirLimbo for inspiring this change.
  • The regenerator golem now costs 1.5x as much as the other golems to upgrade via science, except for the top two marks which are not that steep.
    • Same with the botnet golem, except it is 2x as much, top two marks aside.
    • And same with the hive golem, which is about halfway between those two, on average.
    • Thanks to -NR-SirLimbo and StarKelp for suggesting these values.

Exotic Transports

  • Cloaked transports can now be found throughout the galaxy, not just as part of the cloaked starter fleet. They are not super common, but they are not as rare as the regenrator golem.
    • They also now have their own tech line, separate from the regular transports, and their techs are 3x as expensive as normal. Except for the last mark, which is toned down because that would be crazy.
  • Agile transports can now be found throughout the galaxy, not just as part of the one of the starter fleets. They are the same rarity as the cloaker transports.
    • They also now have their own tech line, and their techs are 2x as expensive as normal. Except for the last mark, which is toned down because that would be crazy.
    • Thanks to Endovior, Fluffiest, Strategic Sage, and others for suggesting that these two above be something you can find, as well as noting that the agile ones have no downsides. If these seem too hard or easy to find in practice, please let us know.

Beta 2.044 Scientific Equality

(Released May 19th, 2020)

  • Experimental: Add a new Debug Setting, 'Enable Astro Train Power Increase'
    • When enabled, the Astro Trains will start spawning stronger trains once the player has killed enough trains. For testing/feedback purposes.
  • In order to make entering commands more rapid, particularly if you're doing many at once -- or have a small typo you need to fix -- it now remembers the last 50 commands you've entered in the chat window.
    • To cycle through past commands you've entered, hit the up arrow on your keyboard. If you passed what you wanted, hit the down arrow.
    • This only works with commands, not with actual general text chat, which it excludes on purpose.
    • So if you want to spawn some ships (or do whatever else), you can now enter the command for that once, then just hit up arrow and enter repeatedly to keep repeating what you just said.
    • Thanks to Badger for inspiring this addition.
  • There is now an alias for "player potluck" which is just "pp"
    • Thanks to Badger for suggesting.
  • Fixed a one-line error in the code in the last beta version, which led to any clicks to choose your home planet making it give you an error and then seed you on an enemy planet.
    • Thanks to Endovior for reporting.
  • Fixed a rare exception that could happen in shot visualizer if ships were being fired on at just the wrong millisecond as the ship was visually destroyed.
    • Thanks to NRSirLimbo for reporting.

Direct Science Upgrade Improvements

  • Added a new is_upgradeable_by_direct_science xml tag, which lets certain centerpieces allow for upgrades like golems or arks do.
    • This is assigned to combat factories and transports.
  • Also added is_spire_lone_wolf, which does the same thing, but uses its own cost schedule that is separate from those of arks, golems, and "other."
    • This is applied to the lone spire frigates.
  • Added a new this_centerpiece_grants_its_direct_science_upgrades_to_rest_of_fleet, which now must be true in order for anything beyond the centerpiece in a fleet to get upgrades from the centerpiece's science upgrades.
    • This was basically true for all the command stations, previously, which were all that used direct science upgrades. And it needs to be used for fallen spire cities, which use science upgrade data under the hood (though not in the interface). But for things like golem fleets, they REALLY need to not apply to their ships.
  • Added a new this_unit_gets_direct_science_upgrades_from_central_fleet, which now must ALSO be true on specific ship lines in order for the this_centerpiece_grants_its_direct_science_upgrades_to_rest_of_fleet to pass to themm.
    • This simply defaults to true. In cases where for some reason we want to turn it off, this exists. This is probably overkill and can be ignored, but is useful to have just in case.
  • Various parts of the interface have been improved to further explain the mechanics as needed, and clarify if something upgrades just the golem/ark itself, or if it upgrades the rest of the fleet along with it.
  • TLDR of most of the above:
    • Combat Factories and Transports can now be upgraded by spending direct science. But it is configured to not benefit their fleets.
    • Unlike the last two beta versions, upgrading a golem or ark now won't upgrade its fleet as well. That was crazy OP, and different from how things worked when EXP was a thing.
    • Lost Spire Frigates now work like the golems.
    • Fallen Spire cities should continue to work like they always have.
    • Arks, Golems, Lost Spire Frigates, Battlestations, Command Stations, and "anything else" all now can have their own upgrade costs that are separate from one another.
    • Thanks to Pireciter and Poppy for reporting.

Related Science Cost Adjustments

  • After a lot of discussion from people looking at the beta and going "wow, golems are just not attractive anymore without EXP because of their absurd science costs," we thought about it some and decided that the simplest thing would be to adjust some science costs a bit more for now.
    • Command stations (which also benefit their entire fleet) were: 1000, 3000, 6000, 9000, 18000, and 36000.
      • This is just patently absurd past a point, and very few people even give one upgrade to them. Granted, we didn't want them to be used to over-upgrade them, but the later costs might as well be "infinity" for how costly they are.
      • We're shifting this to 500, 1500, 3000, 4000, 5000, and 7000.
    • Battlestations were the same as command stations, cost wise, and they do also involve upgrading all the ships in their fleet, but that's still too little benefit for it to be commonly worth it. They don't give economic upgrades, for instance.
      • We're shifting them to 300, 900, 2000, 3000, 4000, and 6000.
    • Golems and arks in the last few beta versions were 500/600, 900/1000, and then 2000, 3000, 4000, 6000.
      • They WERE upgrading their entire fleets, which was a Bad Idea (tm), and that doesn't happen anymore. But even for just the golems, this was too expensive.
      • For the golems, arks, and lone spire frigates, we're switching them all for now to be 100, 300, 500, 2000, 3000, 5000
      • Investing a little bit into these is SO cheap and tempting now, and the payoff is great. Investing a lot into one really costs a lot, but not so much that it is infeasible.
    • "Other" stuff, meaning transports and combat factories, upgrade only themselves (and their drones), and in the recent beta versions could not be upgraded at all.
      • Now they cost 50, 150, 300, 1000, 1500, 3000.
      • This may be TOO cheap, but probably not. The idea is that these are definitely tempting and cheap for just a couple of marks at least. Upgrading them all the way is kind on the expensive side and doesn't seem worth it.
  • While we're at it, regular tech costs:
    • Light, medium, and heavy all previously cost 10k and then 10k for their two upgrades. Now it's 7k and then 10k.
    • Turrets previously cost 7.5k and then 7.5k for their two upgrades. Now it's 3.5k and then 7.5k.
      • Turrets should be a lot more viable in various interesting ways with the battlestation and citadel changes, and the changes here and to the command station costs. Being able to have fixed defenses that are able to keep the peace without getting your fleets involved as much is good.
    • Sentries and minefields are both a bit cheaper now.
    • Citadels are very slightly cheaper now.

Major New "Hooks" Framework For Modding

  • Added a major new framework to the game to support modders in particular being able to subscribe to various events that might happen.
    • Each hook is defined in GameData\Configuration\ExternalCodeHook, or optionally in equivalent folders for expansions or mods themselves.
      • As we did with the expansion external data, however, we might wind up keeping the expansion ones with the base game for simplicity. That may keep mods in particular as compatible as possible.
    • Each hook has a name, which is what event handlers reference.
    • Each hook has a description which explains what the heck it is for, in terms that a modder or another developer will hopefully understand. These are not ever seen by players.
    • Each hook has a mainobject_is, which defines for the modder what type the "MainObject" parameter will be (so they can cast to that from type object).
    • Each hook has a secondaryobject_is, which defines for the modder what type the "SecondaryObject" parameter will be (so they can cast to that from type object).
    • Each hook has a additionalobjects_are, which defines for the modder what the heck is in the "AdditionObjects" array parameter (this can be an array of unlike type objects, or a list of multiple of the same type of objects, or more commonly just a null array).
    • Each hook has a context_is, which defines for the modder if there is anything unusual to know about the ArcenSimContextBase that is being passed in.
      • Generally speaking there is nothing to say, but sometimes it will always be null, for instance. It will also generally be something you want to cast to ArcenSimContext from ArcenSimContextBase, but we define it as ArcenSimContextBase so that we can call this even from the ArcenUniversal dll.
  • Event handlers are defined in GameData\Configuration\ExternalCodeHookHandler, or the equivalent folder for expansions or mods.
    • These would typically be what people are actually modding in, rather than adding actual hooks (unless their mod is that huge).
    • These just define the dll and class names of the handler, and then the hook that they are attached to, and a name that needs to be unique but doesn't get used for anything.
    • It's worth noting that every time a hook handler object is defined, it instantiates a new copy of it that object. So if four different handler entries in xml all reference the same class, there would be four objects of the type of that class. You CAN store permanent data on those, but it's not recommended in most cases. You also can do something like define a static Instance variable to try to have a singleton pattern, but if more than one xml entry calls the same class, you'd have three classes not properly referenced, and then the static Instance pointing to the last-instantiated version. So a static List<> or similar would be better.
  • Four hooks have been added to start:
    • OnJournalFirstQueued
      • Executed the first time a specific final journal entry is queued. Will only ever execute once, even if the journal can occur multiple times.
    • OnJournalQueued
      • Executed whenever a journal entry is queued. Can occur multiple times per campaign, but only if the journal can occur multiple times.
    • OnJournalOpened
      • Executed whenever the journal is opened to be read by the player, just before the text is displayed.
    • OnJournalClosed
      • Executed whenever the journal entry is closed.
    • Al of these are related to journals, as you may notice, but overall the functionality of hooks is unrelated to journals. It can be used for many different things in the future, but this is just what it happens to be first used for.
    • Thanks to NRSirLimbo for suggesting these four events and thus inspiring the whole new hooks system.

Beta 2.043 The Missing Human King

(Released May 18th, 2020)

  • Map planet size ranges changed for the following:
    • Concentric from 40-250 to 40-160.
    • X, Grid, Maze, Clusters, Wheel, Honeycomb, Encapsulated, Octopus, and Simple from 40-200 to 40-160.
    • Realistic from 40-100 to 40-160.
    • Linked Rings, Swirl, and Bubbles from 10-300 to 40-160.
    • Below about 40 planets, it's rare to be able to fully generate a map properly.
  • Fixed several bugs that could happen if you had no planet or were not viewing a planet at the moment.
    • Those states should not have been happening in the first place, but if they do we want to not flood the error log with that sort of downstream error.
  • Fixed a couple of funky bugs that could lead to the player or an AI not seeding properly on their homeworlds on excessively small maps.
    • Thanks to NRSirLimbo and Ymir for reporting.

Beta 2.042 Journals, Cheats, And EXP Retirement

(Released May 13th, 2020)

To play this on Steam, please go under betas and choose current_beta from the drop-down list. We would really appreciate some testers on this so that we can get back out of beta status as quickly as possible! There is not currently a way to get the beta versions on GOG, but we won't be in that status for more than a few days, knock on wood. We want to make sure we didn't break anything with all the substantial changes in here, but also with the EXP stuff we want to make sure that good alternatives exist to something that was a bit... hacky.... before.

  • Added a new (optional to override) method DoOnFactionDismantle_ThisIsAGameBeingExited( Faction ) that provides a hook for cleaning up whatever faction data someone has amassed prior to the game exiting. This lets you clean up prior to a new game being started or loaded, and most factions don't need to do this. But some mods definitely could make use of this, we've been informed.
    • Thanks to StarKelp for requesting this feature.
  • Fixed a typo that said "prompty" instead of "prompt" in one screen.
    • Thanks to ParadoxSong for reporting.
  • A variety of citybuilding structures in The Fallen Spire (The Spire Rises Expansion) stated that they required local shard reactors and engineering centers, but none of them really did. We were going to add that sort of extra requirement a while back, but in the end the city level limitations and socket limitations (plus energy costs in general) were the right mix of limiting and flexible.
    • We've fixed it so that it no longer refers to some requirements that were never really enforced.
  • Fix a typo in the CPA notification hovertext
    • Thanks to Joey on steam for reporting.
  • Ships that have a tech assigned to them (usually from inheritance) to be able to be upgraded, but which are markless and thus non-upgradeable, should no longer appear in the "things that benefit from this" lists on the tech window. This would most notably at the moment include the Zenith Forcefield Generator.
    • Thanks to ParadoxSong for reporting.
  • The list of ships that benefit from a tech was sometimes cut off at the bottom a bit if the list was too long, but now should never be.
    • Thanks to info on Steam for reporting.
  • Hopefully make sure that the AI Reserves can no longer be allied to the player
    • Thanks to info on steam for reporting
  • Minor code cleanup for Exo generation code. No functional change
  • Slight performance enhancement for scourge code
  • The game should no longer allow you to center your view on enemy units that are not visible to you because they are cloaked or otherwise invisible to you.
    • Thanks to rkfg and Stormking2010 for reporting. This has not been tested, but should work.
  • Fixed a mis-transcription of one of the "funny" dialogue lines from the AI, and one not-funny one.
    • Thanks to Ovalcircle for reporting.
  • Fixed a couple of obscure bugs where if the game had multiple factions of the same type, then looking for the "first entity on a planet belonging to a faction of that type" would only check the first faction of that type.
    • So far as we know, this has not actually caused any issues ever, but we found it in a code review while adding some new bits.
  • Fixed a bug where if you clicked a sidbar tab while the chat window was open, it would instead open to the tab you last had open.
  • Fixed a bug that could happen when an exception popup appeared with the chat log window open, where it would try to start a coroutine on an inactive game object.
  • Fixed an error that would happen if you tried to click "Change Music" in the debug tools when music was disabled. Now it just gives you a popup saying that it's not playing any music right now.

No More Fleet EXP

  • All of the stuff relating to ships granting EXP, and fleets gaining EXP, and the (planned for sometime in the future) fleet perks from EXP has all been removed.
    • There was just absolutely no way to do this that did not encourage grinding. Plain and simple. This one aspect of the game had to be scaled back over and over again to the point where it was barely present since back in the 0.800ish days of the game. But even where it was still present, its been something people find annoying at best.
    • Additionally, when it comes to too many fleets on a planet having a penalty for being there in terms of EXP gains, that was sending a rather punitive message that people didn't appreciate. Overall this whole thing wasn't working well, and the addition of exciting perks would have just made it worse, not better.

Direct Science Upgrades For Golems And Arks!

  • There are now explicit flags for units that say is_ark and is_golem, for letting them behave certain ways.
    • Arks and Golems are now able to be directly upgraded by science like command stations are.
    • Golems are more expensive than Arks, but both are a lot cheaper than command stations. It needs to be tempting enough to use science on something that is single-fleet only but not holding your position.
    • Thanks to Democracy for suggesting that we move to science here.
  • Any fleets in old savegames that were upgraded by EXP now have those levels transitioned over to be science upgrades instead.
    • For some things like combat factories, you will thus see "fleet levels from science (unexpected)" on them.

Journals, Chat, And Cheats

  • void QueueLogMessageCommand( string Message, JournalEntryImportance Importance ) has been removed, since the old-style "journal entries are just retained chat messages" is going away.
    • Essentially chat messages can still be logged, of course, but they won't stay any longer than any other chat message does.
    • The new way to log a chat message is void QueueChatMessageOrCommand( string Message ), which also allows for scheduling cheat codes.
    • Additionally, there is now void QueueLogJournalEntryToSidebar( string UniqueID_ToUseIfGroupIDNotPresent, string OptionalGroupID ), which allows for writing the new-type journal entries.
  • Rather than having a journal entry importance (which has gone away), voice groups now have the potential to be linked to journal entries if you want to have them appear that way.
  • The old "InGameStatistics" object is no longer saved into savegames, as it was a waste of space and not really used like we thought it was going to be.
  • Holy cow! There was a huge and wasteful "Local Message Log" buried in the savegames, which was really old code that was saving every last message that ever appeared on the right-hand side of your campaign.
    • This was not ever showing those messages again, and had a lot of bloated metadata on the subject, and was in general just an awful thing to have hanging around because it made savegames way larger than need be.
    • We were being very cautious with how we saved chat messages, not saving too many, but all along we were saving a SECOND copy of EVERYTHING, which partly unravels the mystery of why some savegames were so large despite having relatively few raw ships.
    • This also was something that would cause processing slowdown to at least a minor degree, as the GUI for the right-hand sidebar had to iterate over every last message ever shown to decide if it should still be showing it or if it had expired.
    • Now it has a non-serialized version of this that it keeps for just the messages that should be showing RIGHT NOW. When it's time to no longer display them, they are removed.
    • Update: in the end it was not as inefficient as we had hoped. In an 8mb savegame, this only was half of a mb. Where the heck is that other 7.5mb of data?? We will be investigating that this week.

Journals

  • The journal sidebar is now fully functional, based off of the specifications you can read here: https://wiki.arcengames.com/index.php?title=AI_War_2:_Journal_Entries
    • There is even some text replacement capability in there, and a lot of other goodies.
    • Right now it is only possible to programmatically create and log journal entries, but we will soon be adding some triggers from when you encounter ships for the first time, destroy them for the first time, etc. Basically things that a modder or other designer could include via xml only, without having to touch code.

Chat Logging From Voice Lines

  • A whole bunch of data relating to the text and "is funny" status of voice commands, as well as how frequently they play individually or as a group, has been moved over to our core xml and is no longer part of the embedded resource packs.
    • This lets us make tweaks and changes far more easily, as well as allowing for modding of them.
  • As a part of this, a number of things the watch commander says which are important to not miss are now written out as well as having the voice clip play.
  • Also, even if you have audible voice stuff turned off, the watch commander and AI items vocal items which would normally log text messages will continue to do so.
    • These usually accompany something important, and it's nice to see in the chat log so that you don't miss something that is happening. A lot of what the watch commander says is not written to the log on purpose, though.

Cheats / Debugging Commands

  • The following debug menu buttons have been removed, as they are now cheat codes / commands you can type with more control:
    • give metal.
    • give hacking.
    • give science.
    • give wave and CPA points.
    • give energy
    • spawn wave
    • spawn player ships
    • kill enemies on planet
    • finish construction on planet
    • spawn relic
    • clear local achievements
    • give metal
    • increase or decrease AI difficulty
    • test local achievement
    • lose instantly
  • The following debug menu buttons have simply been removed with nothing added back:
    • grant exp to fleet.
      • EXP for fleets are going away.
  • In the debug menu, there's now a "Wiki: Cheats And Command List" button that links to the wiki for quick access if someone wants to discover cheat codes.
    • The buttons for exploring or watching all planets are still in there, as those were not cheats and are things that people use quite a lot as a lifestyle choice.
  • The new "scrub foes" cheat now works properly with stacks of units, which the old button in the debug menu did not.
  • The new cheat command "player potluck" is basically the old "spawn player ships" button from the debug menu, but improved to actually create a new fleet that has the ships in it. It gives the fleet the name "Potluck [Something]," and is a whole lot more useful and interesting this way.
    • It also randomly gives you AI golems in small numbers, too, with these.
  • There are a variety of "test case" journal entries included with the game now, which are used for testing individual calls to one journal entry infinitely, calls to a group that has three entries, and calls to a cascade of two individual entries. All of these use cases have been tested via the new journal debugging command, and do work.

Version 2.032 Savegame Hotfix

(Released April 28th, 2020)

  • When a savegame fails to deserialize, it now mentions what version it was serialized as, and what it's trying to deserialize into. This takes some guesswork out on our part.
  • Fixed a bug where savegames made in 2.026 could not be loaded in 2.031. A few weeks ago we had some internal confusion over version numbering that led to this. The fix will make all mainline 2.026 savegames function again, and anything saved in 2.025 or prior was already fine.
    • It's possible that a very few savegames from the beta branch that were saved in an "alternate timeline" sort of 2.026 will now fail to load, but there should be a handful of those at most, and mostly in the hands of our developers or most-core testers. And for most of them, their saves were already on 2.029, which again would not have been affected previously or now.
    • Thanks to Arc-3N-4B, Lystraeus, Aedris, Mada, and Wowzer for reporting.

Version 2.031 Faction Color Choice

(Released April 27th, 2020)

  • The rule that drones never cost energy is now more strictly enforced.
  • Previously ships that were not yet fully claimed could still produce and consume energy, both of which were wrong.
    • This led to things like them not being claimable without having double the energy they consume, and also the potentially that claiming something would cause a brownout.
    • They now work consistently with remains, not costing energy until they are fully built/rebuilt.
    • This is different from things that are self-constructing, where you need the energy at the time of construction. You can fully control when you place new structures, and it won't ever brown you out because you can't overspend your energy that way. But things that get claimed or auto-rebuilt are just a different category, really.
    • Do please note that if you don't have enough energy to finish claiming a unit, like the 50k you need for a hive golem, engineers and such still won't work on repairing it. But in the case of existing saves with an unclaimed golem that belonged to you, you now have 50k more energy compared to the prior build, so that works out just fine.
    • Thanks to NR-SirLimbo for reporting, and providing a save where the hive golem was consuming 50k energy too soon and thus causing these problems. That save now works as expected.

Viewing / Editing Factions Once The Game Has Started

  • Added a new should_not_be_shown_even_as_separate_line_items_in_game_factions_menu attribute for faction entries, which lets us control which ones should not even show up in the in-game editing of factions (which shows more factions than the lobby, so you can adjust their colors at minimum -- for things like outguard and zombies, etc).
    • All of the various faction entries in xml have comments on why they are or are not visible in-game, for purposes of us understanding this. We may make some changes in the future to which ones should be shown.
    • These ones now specifically show up in an "other factions" section of the in-game view/edit factions window, where it just lets you adjust their colors.
  • The view/edit factions window in the game now properly shows all the factions, including beacon factions, and gets at the root of their in-game data rather than just their more loose config data.
  • Added show_only_if_faction_with_this_name_is_present, so that the tamed and enraged macrophages will only appear in the factions edit window if there is actually a general macrophage infestation.
  • On the window where you see the colors for all the various other factions, it now shows their description in the tooltips for their colors.
  • A new gamecommand has been added, along with some numerous changes to allow for post-lobby editing of certain pieces of certain factions.
    • It will complain if you try to make changes that are not allowed, such as basically any non-color-info about factions that are already in the game (aka not beacons).
  • The game now allows you to change the colors of any faction in the game at any time after you've started. Any player can do this in multiplayer, and it will be multiplayer-safe synced for everyone.
  • For factions that are still in beacon form, you can now change any of their settings in that same window after the game has started (but before you hack the beacon), and the faction will then have those properties when they join the game, if they ever do.
    • This is really useful for late-addition factions, where you might want to have a stronger nanocaust or something along those lines but you were not originally thinking of having them in your game.
  • For all the fields that you are not allowed to edit once the game has already started, it just shows those in a textual format, but still with the various tooltips and so on.
  • The discoverable factions are no longer directly shown in the escape (system) menu, but instead are shown only in the view/edit factions window.
  • The formatting of the starting fleet display in the player tab in the lobby is now a lot nicer, using the actual display name rather than the underlying lookup key.
    • In the during-game display version of this, it now instead shows which player is controlling that faction, or if there are multiple or no players controlling it.
      • It's entirely possible to have a faction named "Adam" which is controlled by "Dave" and "Adam" if you wanted to do that. That could be because you are in multiplayer sharing control of a faction called "The Davadium Empire," perhaps, or because you've loaded someone else's savegame.
      • It's ALSO possible that in multiplayer, for whatever reason, Dave and Adam decided to switch which factions they were controlling, but not to rename what their factions were. We'll get to odd cases like that later, but for now it shows things properly so you can understand things. This will certainly get more complicated as multiplayer is built out, and we aim to make it a bit more flexible and simple than in the first game.

Beta 2.029 Journal And Faction Edit Framework

(Released April 21st, 2020)

  • Fixed a rather inexplicable "bug" (really a design choice in code that made no sense in retrospect but has been there since the fleet redesign well over a year ago) where if a unit was put into a different fleet than initially expected, it would wipe out all levels from EXP or science.
    • The main practical effect of this was that anytime a command station died, then any levels that you got from science upgrades to its fleet were reset to zero, which was a huge negative of course. This is now fixed.
      • This did lead to some ships or turrets being a higher level (based on the old science upgrade levels) compared to newer ones. Basically items that are a certain level won't level-down, so even though the science was taken away, they wound up still being at the higher level. But new items built would be at the lower level. This isn't something that we can fix in existing savegames (same thing with the lost levels from science in existing saves in general. But for all future upgrades, including in existing savegames if the upgrades happen in this or future versions, they will now be retained.
    • Thanks to DEMOCRACY_DEMOCRACY for reporting.
  • Fixed a bug from the last few weeks where if you changed your player color in the lobby, it would quickly reset to default. We couldn't duplicate this with any other factions at this time, so if you see any other factions getting set back to defaults please do let us know with steps for reproducing it.
    • Thanks to GreatYng for reporting.
  • The mugger frigates have zombification, making them extra powerful. Normally you only get one of them where you would get two of many other frigate types. However, the parasitic starting fleet was giving you FOUR, which is crazy powerful. It now gives you two.
    • Thanks to ParadoxSong for reporting.
  • Put in some rather substantial changes to things to now have a DamageSource Damage instead of a bool IsSelfDamage/WasFromSelfDamage.
    • This now lets us differentiate the following:
      • SomeSortOfEnemy: used for any sort of external hostile weapon, attrition, or other bad thing someone else does to this unit.
        • All the normal death effects should happen, and things like being able to be regenerated by regenerators to prevent death, etc. This was already working fine.
      • SelfDamageFromMyOwnWeapons: used for any sort of self-inflicted damage, such as attrition to myself over time, or using my own health to regenerate someone else or power an explosion (minefields).
        • Some death effects should happen, but very few. Basically if I die to remains, I should go ahead and still do that (aka minefields). But beyond that, regenerators can't save me, etc.
    • BeingScrapped: used for something that needs to die for some reason, and it really just needs to go. Often this is literally a player scrapping something, either directly or by swapping lines between fleets, or the AI scrapping one set of units to move them into a new stack, etc.
        • The absolute minimum case. We're supposed to DIE, so we don't even go to remains if we normally would. This last case was being used for minefields self-damaging themselves in the last few weeks for the game, and is why we had to make this a tri-state thing instead of a boolean self/other damage source. If you scrap a minefield it should not go to remains, but if it damages itself to death it should go to remains.
    • Basically minefields were never going to remains recently unless enemies were decloaking them and shooting them in the final shots, or some edge case like that.
    • Thanks to Valkyr, Strategic Sage, and Mischief Maker for reporting.
  • If the AI has too few planets they won't spawn Relic Trains anymore
    • Thanks to Scout1Treia, who clearly has too much time on their hands, for reporting
  • A new "Journal" sidebar tab has been added, although it is not really functional yet. But the framework is there.
    • We'll be filling this in this week before we come back out of beta, but meanwhile we wanted other fixes to get to you.
    • The hotkey "J" was amazingly available, and is now used for switching to this tab.
  • We also made both Intel and Journal show up higher than Outguard, with Outguard now being the bottommost tab.
  • In the system menu (hit escape), there is now a "View/Edit Factions" button that currently does nothing, but soon will let you pre-edit beacon factions, as well as see other details about existing factions and change faction colors. It will also let you see "hidden" factions like the zombies, to adjust their colors if you so desire.
  • If some UI element has an exception in its tooltip generation (or mouseover code in general), it now reports that instead of breaking the whole UI.
  • If a text element errors out while trying to init, it now gives you useful info rather than breaking the entire load process of the game, too.

Beta 2.028 Eat Bad Lobby Saves

(Released April 20th, 2020)

  • The fleet management sidebar popout now uses the display name for sidebar (which is shorter) instead of the full display name, to keep things from wrapping.
    • Thanks to -NR-SirLimbo for reporting.
  • If a savegame would be loading in and fails for some reason, then it now shows what the savegame name is rather than writing ???.
    • In the event that for some reason your game version's name can't be found, it now shows you what game version it was trying to find. Sometimes this can be as simple as an artifact of someone doing custom development.
    • Thanks to Badger and mofowe4644 for inspiring this change.
  • Previously if you tried to load a savegame that was broken for some reason, then it would give you a warning about that but then keep on trying to load stuff, cascading errors upon errors. Now it just stops and doesn't keep letting things get worse!
    • This also makes it so that loading a broken save doesn't mean you have to restart the entire program or else things are funky and broken until you do, too!
    • Thanks to ParadoxSong and Badger for reporting.
  • Additionally, previously if you had an exception while trying to load the "last settings" savegame for the lobby when you do a new custom start, it would just be all kinds of broken, making custom starts not possible. Now it instead notices the failure and just does a fresh "reset to defaults" type of start for you.
    • In this path, to keep things smooth it doesn't even bother warning you now.
    • Thanks to ParadoxSong and Badger for reporting.
  • Added three new settings to the Performance section of the personal settings:
    • Disable Tachyon Beam Visuals
      • If you have absolutely giant battles beyond the norm, and there are too many tachyon emitters in play, it can cause serious performance degradation. For the people who run into that, or are on lower-end hardware, this is a great way to get more performance at basically very litte drawback.
    • Disable Tractor Beam Visuals
      • If you have absolutely giant battles beyond the norm, and there are too many tractor beams grabbing ships, it can slow things down. This is a lot less likely to be a problem than tachyon beams, but can be helpful in some cases.
    • Disable Beam Weapon Visuals
      • If you have absolutely giant battles that we can't fathom, all with beam weapons, then the load of that is higher than that of other shots. This should basically never happen, but this lets you turn them off if it's ever a problem for you for some problem. This would be missing a lot of info during play, though.
    • Thanks to Emeritus Puffin for suggesting.

Bugs From The Beta

  • Fixed a bug where any scouting was scouting all planets in the prior beta version. This was one of those sorts of things that happens when you make widespread code changes and sometimes mangle a bit of code that doesn't directly translate.
    • Thanks to ParadoxSong for reporting.
  • For some reason, there was a version issue or something along those lines with certain lobby settings in the beta version for some (most?) players. The game now recovers from that either way, but we're not sure what was up with that. Possibly there was an intermediate version that was needed in the xml, and we added that, which will fix things either way. It wasn't hurting quick starts or savegames, just the custom start lobby, so the existing larger fixes above will prevent this beta issue from happening anyhow.

Beta 2.027 Planetary Mathematics

(Released April 16th, 2020)

To play this on Steam, please go under betas and choose current_beta from the drop-down list. We would really appreciate some testers on this so that we can get back out of beta status as quickly as possible! There is not currently a way to get the beta versions on GOG, but we won't be in that status for more than a few days, knock on wood.

  • Code has been added in (but is untested) to remove destroyed planets from the galaxy map.
  • Fixed an exception that could happen in RemoveIncomingShot when multiple threads were racing.
    • Thanks to ParadoxSong for reporting.
  • Techs that have already been fully unlocked now continue to show up on the tech sidebar, since having those disappear was freaking confusing.
    • They now show up with a line item saying "COMPLETE" instead of some sort of science cost.
  • When viewing the tooltip for a unit, it now shows how many upgrades have happened out of how many upgrades for each tech line that benefits the unit.
    • This way you can tell WHY it is the mark level it is, aside from things at the fleet itself that are leveling them up.

Dangerous Changes Useful For Future Features For Both Free Multiplayer And Paid DLC

  • The game used to allow for a list of galaxies (more than one at once), but we only ever used one at a time. We've now restructured it to just be a CurrentGalaxy object rather than a List<Galaxy>. This is very slightly more efficient for whenever we need to loop over planets, etc, since there's no array lookup that needs to happen to Galaxies[0] and instead we just call a direct object reference. This is a minor improvement, but we do it so very much that it's good to have every little bit of improvement.
  • There is a new DoForPlanets on the World_AIW2 and the Galaxy object that allows you to iterate over all the planets, with a boolean flag to let you skip destroyed planets if you want.
    • The existing Planets list on galaxies has been renamed to the long-and-discouraging name AllPlanetsIncludingDeadOnes_GenerallyDoNotReferenceDirectly, so hopefully people really only use that when there is a true need to do so.
    • There is also a version of DoForPlanets on World_AIW2 that lets you pass in a faction that must be controlling or influencing the planet. We can add other overloads as need be. In the case of this one we assume that the planet isn't destroyed, since it's hard to own something that doesn't exist.
    • It IS worth noting that for anything that is in mapgen, the galaxy object is being passed around and so using the methods on the world are NOT a good thing to be using.
      • With that in mind, AllPlanetsIncludingDeadOnes_GenerallyDoNotReferenceDirectly is still used quite a lot when we're talking about things that are in mapgen. Technically those could use the DoForPlanets on the galaxy they are passing around, but since there are never any dead planets during mapgen that does seem a bit pointless.
  • Also added in some new methods for things like ensuring all the planets are in a galaxy are linked, to specifically AVOID ones that are destroyed, since those should probably not be linked and we don't care.
    • In a bunch of semi-related methods, looking at things like neighbor planets and such, there is now a bool saying if you want to include destroyed ones, etc. Hopefully the destroyed ones are unlinked already, but in case not this lets us ignore them here.
  • Added in various other methods, like GetRandomPlanet() on the galaxy object to get a random planet that can be limited down to just the ones that are non-destroyed.
  • Fixed a bug that we found purely by accident in code review where threatToLeaveBehind was being calculated extremely incorrectly -- using the indexer i instead of the indexer pairIndex. This could have led to anything from stuff not staying behind properly to a hard-lock of the AI thread (where the AI stops responding at all). It would have been incredibly rare, and basically only happened when the AI was fighting on a non-king planet and wanted to leave some threat behind but take some away because they were over-running the planet.
  • It's worth noting that there are a TON of changes in here that may cause some other bugs that are unexpected, so we're going to go to the beta branch on this after all (which is funny because just yesterday Chris was talking about not doing that for a while).
    • There are also probably some further uses of AllPlanetsIncludingDeadOnes_GenerallyDoNotReferenceDirectly that we have right now that we can clean up, so we may go ahead and do that, too.
  • A day passes.
  • Added a funky new data structure called ArcenTwoDimensionalFlexibleLists<T>, which is basically a generic and flexible replacemenet for things like bool[][].
    • This lets us have things like two-dimensional arrays for pathfinding that get larger as the number of planets increase.
    • Previously if we added planets to the game late, without a save and load it was going to have some major issues with pathfinding in particular.
    • ProjectedMultiPathData has been updated to use this new data structure.
  • After some thinking, AllPlanetsIncludingDeadOnes_GenerallyDoNotReferenceDirectly has been made private to Galaxy, and there are instead nicer wrapper methods for getting at the data in that.
    • This reduces the duplication of code that we otherwise have, and most importantly helps to make the intent of how each method is used more clear by their names.
  • Wow this is a lot of changes, all throughout. We're totally doing a beta for a few days at least to see if things break or what happens. So far everything works perfectly, which always makes us suspicious.
    • But now we have a lot more flexibility for adding or removing planets during gameplay, which is a pretty neat new thing to be able to do in general, for a variety of reasons.
    • Adding extra planets for players who join late in multiplayer is an example of one thing that we want to be able to eventually do, so that if player 2 joins in 2 hours into a campaign they still get a homeworld of their own, but it's a new one. One thing at a time, but that's something for during the later beta stages of multiplayer implementation, probably.

Version 2.026 The Faction Duality Problem

(Released April 14th, 2020)

  • The linux version of the game now has code in place to not even try to launch anything GOG-related, since GOG Galaxy does not exist on linux.
    • For most people it was failing silently (as it should), and basically causing no harm. But for at least one person, it was causing a crash on startup. This should work around that. When GOG galaxy support is added on linux at some point, then we'll revisit.
    • Thanks to shampoocat for reporting.
  • Fixed a regression where if you were logged into GOG Galaxy and not Steam, it wasn't shown your username properly on the main menu.
  • Fixed a couple of expansion spire hybrids from getting invulnerability from thoraxian hybrids when they should not.
    • Thanks to DHR Valkyr and Puffin Emeritus for reporting.
  • Put in some fixes to planet tooltip generation in the event that the player faction is null for some reason.
    • Thanks to Valkyr for reporting.
  • Made the exports for data about factions in a game a lot more detailed.
  • Made it so that if you get a "no human king found" error, it also writes a report about what factions are there.
  • Fixed a bug during deserialization of savegames/quickstarts that made it so that you had duplicate copies of the WorldSetup used for the lobby and the long-term storage, and that in turn led to chaos like deleting players or other factions or creating many duplicate factions when starting a new quickstart.
    • This bug has been in place since April 1st (go figure), but it wasn't really fully rearing its head until yesterday when some unrelated changes made it suddenly more apparent.
    • In fact we even had a second copy of this error from the same day in a second spot for loading quickstarts, so it was really going crazy.
    • This is less a case of "how did we break this yesterday" and more of a case of "how has this been working at all prior to yesterday for the two weeks prior?"
    • Thanks to AreU4Cereal, esassaman, GalateanGemmate, Strategic Sage, and Mischief Maker for reporting.
  • If you have an old savegame with duplicate factions in them (multiple outguard or something), it will warn you about that when you load it, so that you know it's there, but it can't fix it. If you load that as a template for something else, that should fix it.
    • There is a vague possibility that you might be able to create a new game with duplicates again in the new version, simply by having old bad settings in your PlayerData/Save/_Internal/LastLobbySettings.save file.
      • Simply hitting "Reset To Defaults" in the lobby, or loading a quick start or savegame into the lobby would remove that problem. But even with a known-bad save in LastLobbySettings.save, we can't duplciate having a new custom game with the problem now, so maybe it's not possible. If you're able to make it happen we'd be grateful for having your LastLobbySettings.save if it's something that you can make happen over and over again.
    • None of this would affect any savegames except for those that were created in 2.025 (yesterday's build), or MAYBE via a LastLobbySettings.save from 2.025.
    • Thanks to Strategic Sage for reporting.

Version 2.025 The Twenty Million Problem

(Released April 13th, 2020)

  • Fix a potential bug with macrophage notifications after the player is dead
    • Thanks to Ovalcircle for reporting
  • Fixed a bug in the most recent two versions of the game where the various zombie factions and the outguard faction were not seeding UNLESS you happened to go into the lobby and hit Set to Defaults and then start the game. It's possible that quick starts were working properly, but not definite.
    • This won't affect existing savegames regarding outguard being summonable, but will affect any new ones created. For zombies, it will fix any problematic existing saves.
    • Thanks to Valkyr, Strategic Sage, Lord Of Nothing, DEMOCRACY_DEMOCRACY, Scout1Treia, and Poppy for reporting.
  • Fixed a bug where certain savegames could have not all the expansions in use actually noted as in use. This was going to be a problem for multiplayer, but we will probably have some further changes to make to that in the future.
    • In the short term, this could also cause some problems with detecting if relic trains were supposed to be enabled if you used certain quick starts or older savegames.
    • Thanks to Lord Of Nothing for reporting.
  • Somehow or other, Ovalcircle managed to get the game to remember his last settings as being those from the test chamber. That shouldn't have been possible, and we can't replicate it, but we've put in extra fixes to hopefully keep it from happening to anyone again.
    • Thanks to Ovalcircle for reporting.
  • Put in a fix that makes it so that if there are more factions than planet factions, it won't give an index out of range exception.
  • Put back in some code that will now add AI Reserves (and the zombies and outguard) to existing savegames that don't have them.
    • It won't actually seed any outguard beacons if those are missing, but it will make all the various sorts of zombies function properly if they were missing, which is a pretty big deal.
    • Previously we had taken this out, and only had it run when loading as a template of some fashion or from the lobby, because it caused a mismatch in factions and planet factions.
  • Put in some code that automatically fixes any missing planet factions for any galaxy-wide factions that are missing in a savegame that is loaded or other things that are created.
    • This fixes some serious issues in the test chamber, for one, but also makes it so that the other fixes above don't break the world.
  • Put in some more defensive code for a rare threading race condition exception that could happen in TryUpdatingTargetPoint of ShotVisualizer.
    • Thanks to Endovior for reporting.
  • Improved the wording in the quick start menu to say "no scenario selected" and similar, instead of "no save selected," so it's more clear what to do if you are having an error.
    • Thanks to UFO for reporting the confusion.
  • Fixed an issue in the quick start window and in the load savegame window where your old settings would be kept, but invisibly, when you exited the screen but went back in. You'd still have a scenario/save selected, but not visible.
    • Thanks to UFO for reporting.
  • Put in a fix that ignores an exception in GenerateCaret() for text mesh pro when we disabled a canvas. This has only been popping up recently for whatever reason, but should now just ignore the problem and keep moving when the canvas is next showed.
    • Thanks to Endovior and Badger for reporting.
  • Fixed an issue where, inexplicably, if we had a primary key for ships or shots that was more than 20 million it would start just giving them all the same primarykeyid which would then lead to all manner of problems.
    • This is not new, but it's only being encountered now, which is probably due to some particular factions in the specific savegame setup which cause a high ship PKID turnover. It still took 13 hours for this to come about.
    • The new cap is now properly a bit over 2 billion, which is 100x as high (and nearing the limit of 32bit integers). In the same sort of extreme scenario, with the same amount of churn, we can then assume it would take 1300 hours in one campaign to hit that new limit, so that's... certainly okay.
    • Huge thanks to choam and DarkWing for reporting and providing a save where we could reproduce this.
  • Because of the prior bug, when a savegame is loaded that has an entity with id 20000001, it now reassigns it on load. This will definitely cause some problems in those saves, but definitely fewer problems than them all sharing a primary key ID.
    • The PKIDs are supposed to be unique, but in the case of one particular savegame we had 9895 ships with all the ID 20000001, which meant all sorts of problems like ships not being selectable, not able to decollide, not able to get movement orders in general, and not able to get orders from the player or other factions. Instead, they could kind of sit in place and autotarget and that was it.
    • Reassigning PKIDs is itself one of those "never do this" things, so probably any save affected by this (very few, if any beyond the single one we have on hand) may find some inexplicable bugs like fire teams missing entries or pointing to the wrong thing, etc. Things seem to load and run fine, but if there are boogeymen in a save of this sort then you know it's probably related to this.
    • Huge thanks to choam and DarkWing for reporting and providing a save where we could reproduce this.

Version 2.024 UI Focus Hotfix

(Released April 10th, 2020)

  • Fixed a complicated bug where the game was not properly able to detect when an input field lost focus by virtue of its whole ui canvas (window) being disabled. This led to large parts of the ui being disabled at times after showing an input field in the prior version of the game.
    • Two logic inversions in semi-related code also made that even worse, although one of them made it "better" enough that the ui worked at all. Nonetheless, this was a fix that needed to happen quickly.
    • Thanks to Valkyr for reporting.
  • Fixed a rare bug that could happen in fire teams updating and getting an index out of range exception at debug code 3100.

Version 2.023 Chat Hotfix

(Released April 10th, 2020)

  • Allow non-scourge factions that use fireteams to stack when/where appropriate
    • Thanks to Swizzlewizzle for the bug report and save.
  • Fixed several nullref bugs relating to regenerator golems.
    • Thanks to Badger for reporting.
  • Added in new targeting logic for melee units that should allow them to better attack moving targets.
    • If issues crop up, or you prefer the old style, this can be enabled and disabled under the Units tab in Galaxy Settings.

UI / Chat Improvements

  • The hotkey for opening the chat window is now Return/Enter rather than C. This actually lets you do C-clicking still and C-hovering, etc, which has been impossible since adding the chat.
    • Thanks to UFO and Strategic Sage for reporting.
  • All of the various modifier keys for doing things like hiding tooltips no longer function while you are entering text into a textbox.
  • Simply having the chat window open no longer causes all other input to be blocked. Now you actually have to have the cursor in the chat textbox for that to be the case.
  • Hitting the escape key while you are in the chat window now properly closes that window, even if you are in text entry at the moment.
  • Hitting the escape key to close whatever window or popup no longer comes with a risk of opening the in-game escape/system menu. That has been annoying for a long time.
    • Thanks to a variety of people for reporting over the last few years.
  • When you first go into that chat window, or the modal textbox window, it now focuses the textbox there for immediate typing.
    • Additionally, after you send a chat message it immediately re-focuses the chat textbox.
  • The chat log now actually uses gametime timestamps, rather than "how many gametime seconds ago was it" to show things. This is a lot easier to read, since every second every line isn't changing width because of all the lines changing numbers every second.

Version 2.021 Hotfix

(Released April 8th, 2020)

  • Fix to a deserialization error with AI Reserves in the prior build which was affecting quick starts but not existing savegames. Sorry about that!

Version 2.019 Regenerator Sanity

(Released April 7th, 2020)

  • When the AI Reserves decide to attack, they now give you a Notification saying "AI Reserves arriving in X seconds" instead of just appearing instantly. This gives you the chance to scrap units, retreat, snipe the command station, etc...
    • Thanks to a number of people for requesting including Iocaine, swizzlewizzle, Lord of Nothing and his Inimitable Puffinness
  • Fix a null reference exception in in the Spire Debris notification; could only be hit if you were hovering the notification when the debris vanished
    • Thanks to Endovior for reporting
  • Alarm Posts now also free ships in Guard Posts
    • Thanks to GreatYng for reporting
  • Tidied up some names.
    • Extragalactic Thunderbird is now Extragalactic War Thunderchild.
    • Extragalactic Chimera is now Extragalactic War Chimera.
    • Extragalactic AI Hunter / Seeker is now Extragalactic War Hunter / Seeker.
    • Extragalactic AI Hunter / Annihilator is now Extragalactic War Hunter / Annihilator.
    • Extragalactic Jackalope is now Extragalactic War Jackalope.
    • Extragalactic Mothership is now Extragalactic War Mothership.
    • Extragalactic Planet Cracker is now Extragalactic War Planetcracker.
    • Thanks to Fluffiest for noting some of the inconsistencies.
  • For at least a month or so now, ever since we switched in the linked lists for storing entity lists instead of List<> and ArcenMob<>, and possibly slightly before that, if you were to do a swap between ship lines on a planet with a regenerator golem on it, you'd get a crash to desktop and a ton of extra ships in general.
    • In general, for some time now it has been allowing for various things to happen when you self-kill units (by scrapping or otherwise) that should not have been happening. This includes things like zombification copies being made, entities spawning on death in terms of things like hydra heads out of hydras, dying to remains, and regenerator golems spawning replacement ships. In this particular instance it could cause an infinite loop, but it was problematic in general.
    • There are still various other things that DO need to happen on-death even for scrapped units, like various loss conditions, AIP gains, and so on. And in the past, prior to us making some changes here that have led to this crash, we weren't running those things, which is problematic.
    • The game now does a much better job of telling all the sub-factions and so on what is happening and letting it react properly in the event of death from self-damage. So that solves the most recent problems, but keeps the longer-term benefits we've had for a while now.
    • Thanks to Bob for reporting.
  • Tweaked a couple of things in the "regenerator golem" code so that they should take the proper amount of damage now, rather than too much or too little. They also shouldn't be able to kill themselves anymore by taking too much damage.
    • Additionally, crippled regenerators stop helping at all.
  • Regenerators can't regenerate one another anymore (the AI could have multiple of them regenerating one another).
    • Thanks to Puffin for reporting.
  • The game now has 3 Pathing Modes to let ships figure out which planets to move through. Shortest (always use shortest path), Safest (always take the safest path) and Default (take the safest path unless it's significantly longer than the shortest path, in which case use the shortest path).
    • By default all player commands use the Default mode, but the player can hold a modifier key for the Safest or the Shortest path
    • Note to modders: FindPath() calls now take an extra argument.
    • Resolves pathing problems reported by a number of people, including UFO and Sigma7

Version 2.018 Hotfix

(Released April 6th, 2019)

  • Fix to a bug that was causing some-but-not-all savegames to fail to load in the previous version of the game. Mainly saves that were games started in 2.016 that were being loaded in 2.017. This was to do with fixing the AI reserves missing. Turns out those should not be added in mid-save. Now that no longer happens, but in the other cases where AI reserves were missing, it adds them properly.
    • Thanks to Badger for reporting.
  • Also added in a helpful method on the World_AIW2 singleton object which lets us just quickly write all the factions (invisible and otherwise) to the log.

Version 2.017 GOG Achievements

(Released April 7th, 2020)

  • The Scourge now have some power scalings based on the Overall Power Level of enemy factions. It maxes out at a 10% increase in Neophyte spawning rates if the scourge's enemy factions have an overall power level of >= 5.
    • Thanks to swizzlewizzle among others for requesting
  • Fixed a rare exception that can happen in the fallen spire code.
  • Fixed an issue that could have AI Reserves not appearing in the prior version of the game sometimes.

Achievement Fixes And Improvements

  • The Steam and GOG Galaxy client integrations have been moved out into their own sections of code, and a bunch more of GOG Galaxy integration has been included now.
    • As networking is added via Steam, its code will grow enough that it really needs to be on its own.
  • The GOG Galaxy client now logs you in (if you are logged into that program on your system), if you are on Windows or OSX.
    • This is a prerequisite for both GOG Achievements, as well as for networking through GOG.
  • GOG Achievements now log in the same manner that has worked for Steam -- it's about time we got this in!
    • It took us longer to get into their API than it really should have, but we need this sort of thing for multiplayer anyhow, as well as in general this being great for GOG players in the first place.
  • Steam and GOG now properly only get sent achievements that it doesn't think you've already unlocked.
  • Apparently we were saving the "all time statistics" but never actually loading them. Fixed to just not have them, now, as they contained very little aside from local achievements and that was not working.
  • Added local achievements tracking that actually remembers what the heck you have previously unlocked.
    • This also prevents your achievements from popping up every time you restart the game program and enter a savegame with the conditions for the achievements met.
    • Thanks to GreatYng for reporting.
  • The "resubmit offline achievements to Steam and GOG" code now actually does what you'd expect, since it now logs things offline.
    • We tightened this up a bit, anyway, to make it run a little more efficiently on the main menu.

Version 2.016 Thunderchild

(Released April 2nd, 2020)

  • HRF has received many buffs to their budget, and how they use it
    • Maximum budget increased by 500%
    • Budget per second increased by 450%
    • Minimum budget required to attack increased by 3000%
      • Thanks to the a large portion of the community for their notes on HRF
  • Make the "Enable HRF" hack cost fewer hacking points
    • From a discussion on discord

Extragalactic Surprises

  • The AI will spawn more extragalactic ships at AI difficulty >= 7
    • There's been a good amount of feedback that the spire is too easy.
  • Jackalope and Thunderchild extragalactic war units now make their debut. Expect to run into them when using the Fallen Spire, and potentially with other factions in the future. These are SCARY...

Lobby Fixes And Improvements

  • We're now using the ability to load savegames into the lobby to make it so that every time you open the lobby, it now has the selected options that you last used -- factions and otherwise.
    • This fixes several bugs with things showing values that were not a match to the underlying data, as well as making it a lot more convenient in general.
    • Thanks to ptarth, Histidine, NRSirLimbo, Fluffiest, Ecthelon, and deo for reporting.
  • Added a new Reset To Defaults button in the lobby, which lets you change the lobby back to the default settings and build up fresh again if you want to (now that it instead remembers your settings from last time).
  • The "this is experimental" warning on loading savegames and quickstarts into the lobby is now removed.
    • We're using this pipeline for very central things in a lot of places now, and have beat the heck out of it testing permutations.
    • If you find any problems with it, please let us know and we'll fix that as soon as we can, rather than treating it like an optional side feature.
  • When you load any old savegame or quickstart or whatever into the lobby, it now uses your profile's player color properly.
  • If you try to load an old savegame into the lobby and it has a fleet that is no longer valid (or was from a mod or something that you don't have), it now loads properly and just randomizes the fleet in question.
  • When loading a quick start in general, or a savegame/quickstart into the lobby, it was previously possible to have the underlying map seed be different from the one on the UI, which was confusing for sure.
  • When you are in the lobby and the map regenerates, it now refreshes all the faction data rather than potentially keeping some stale data in there. This solves several problems with it showing out of data info for starting fleets in particular.

Other Fixes And Improvements

  • Fix an exception with the Extragalactic War: Ignore Player-Allied Minor Factions option
    • Thanks to Greatmar2 for reporting
  • Fix a bug where the player overall power level was being miscalculated
  • Fix a bug where the Hacking Menu looked incorrect at game load time
    • Thanks to Arc-3N-4B for reporting
  • Fixed a bug with setting the game mode on background threads where it would crash the game because it was trying to instantiate some planet visual objects on those background threads; that's a main-thread-only thing, and was quite the cascade of things to chase down.
    • In general it now protects it against itself, and waits to do it later on the main thread as needed.
    • We also tidied up some code into separate methods to make it easier to find things that are crashing in this area if it ever happens again, but it should not.
    • Also made it so that it can center on a planet from a background thread if it has to.
  • The game had very old multiplayer sync code that has been partially running in place the entire time (even in single player), and which is very outdated compared to what we want to do in the near future. We've commented out the old in preparation for the new, which will be adaptive and scan some entities/planets at a time; the old method was about detecting wholesale problems as soon as possible and halting the simulation, which is not the approach we're taking with this game.
  • If the game is missing a surrogate table for some reason, it now gives an appropriate visible message rather than just hanging game load.
  • Fixed an exception that could happen when loading certain savegames or quick starts into the lobby for further editing. As part of this, was able to verify that all the custom settings are properly being loaded in properly, too, when loading highly-customized saves.
  • A bunch of added robustness and fixes to some strange edge cases when loading worlds either from disk or across the network, or from savegames or directly.
    • Also some things to robustness in the display of galaxies when things go wrong during this load and you get in afterward.
  • Fixed it so that if you are trying to generate a galaxy with a null map type (possibly by loading a quick start or savegame that is using a map type that no longer exists), then it will choose a random map type and use that instead, rather than erroring and dying.
  • Really fixed a ton of different things that would give funky errors that were hard to interpret if the data was messed up enough.
    • These were all cases where we never have had data that messed up "in the wild," but as we get into multiplayer's alpha we may run into that from time to time and we want to make sure that we are able to have it recover more gracefully.
  • The way that savegames and quick starts and the lobby are loaded under the hood has been streamlined and simplified a lot, and made much more clear.
    • This is good news for them functioning really well with the new ability to load savegames and quickstarts into the lobby, and also very relevant for loading multiplayer savegames and into multiplayer lobbies. This was quite a thing to untangle, but now it makes our lives much easier in the future as we get into multiplayer alpha soon.
  • Fixed a harmless but annoying bug that could randomly pop up when trying to load some savegames and would give the message "ArcenDynamicTable<MercenaryGroupData>.GetRowByName() called with null/empty name"
    • Thanks to Malformata for reporting.
  • Fixed a bug that could happen when trying to load a faction that was referencing a named color that is not installed on the local machine for whatever reason. Whether that's for an expansion or mod, or the color was removed for some reason. It now assigns a random color instead, rather than failing to generate the game.
    • This was interfering with loading the Helping Hands scenarios for some reason in the most recent version of the game if you didn't have the expansion installed.
    • Thanks to ArkTheSpark, minnow990, Vola, and Roadrunner for reporting.
  • Fixed a variety of issues where the game could not load quick starts that were created with expansions enabled if you didn't have those same expansions and there were beacon-enable-able factions in that quick start.
    • The game now is able to deserialize expansion content no matter what by moving the "external data pattern" definitions into the main game, and also by making it so that missing ship entities get a dummy stub created for purposes of deserialization (and then being tossed away).
    • Thanks to Thanks to ArkTheSpark, minnow990, Vola, and Roadrunner for reporting.

Version 2.012 Populous

(Released March 26th, 2020)

  • Fix a bug where allied nanocaust could be hostile for a second or two after loading a save game
    • Thanks to GreatYng for the bug report
  • Fix a bug where Marauder Outpost strength wasn't appearing in the galaxy map
    • Thanks to Parch for reporting
  • Fix a bug where Spire Debris intended for a recently killed AI faction could cause a null reference
    • Reported by Cadbury and Admiral
  • Quiet some dev-only debugging code visible in the Threat window
    • Thanks to the crew of the USS Defiant for the report
  • Fix a crash in the BuildingDronesInternally metal flow planning code
    • Thanks to LCEnzo for reporting
  • Fix a bug where Dyson Spheres antagonized by hacking weren't actually doing anything
    • Thanks to Ovalcircle for a nice bug report with a save game
  • AI Mines on a given planet now decloak once the AI command station on that planet is killed
    • Should be a nice little QoL improvement. Suggested by a number of people, including corfe83
  • Fixed centerpieces occasionally reporting being under self construction, thus breaking them entirely.
    • Thanks to Lord of Nothing and Mayheim for reporting.
  • Exogalactic Attacks are not eligible to come through the Exogalactic Wormhole from Wormhole Invasions until the first other ships have come through the wormhole. It's still very hard, but you can see it coming so there's less RNG.
    • This is primarily for the DLC (since there are a lot more Exos there), but applies to the base game as well
    • Suggestion from Lord of Nothing, with additional bug reports by Strategic Sage and The Puffinster
  • Risk Analyzers now show their intensity-analogue in the Escape menu
    • Suggested by Ovalcircle
  • Remove some deprecated settings
    • Thanks to Sombre and ovalcircle for reporting
  • Fix a bug where Exos could sometimes wind up idle after killing their target
    • Thanks to Lord Of Nothing for reporting
  • Fixed the issue with loading Quickstarts/saves into the lobby, but not playing at all
    • Thanks Fluffiest for reporting, Democracy for testing, and Puffin for helping figure out the issue
  • Fixed a few more achievements that weren't triggering correctly
    • Thanks Lord Of Nothing for reporting
  • Added menu to the debug menu that allows players to select the currently playing music track.
    • Thanks DEMOCRACY_DEMOCRACY for suggesting, as well as Steam user "Micah" and "NB_FlankStrike" for reporting similar requests.
  • Fix a bug where usurpers would sometimes leave planets instead of capturing them
    • Thanks to Ovalcircle for reporting
  • Fixed up the Montserrat-Thin font, which would get very distorted when shown in small pixel space on the game. Now it has enough data in there to render precisely even when very small.
    • This should help in a variety of parts of the interface, but most notably in the chat window when your screen resolution is very small.

Lobby Fixes / Improvements

  • The "can edit presets" debug setting has been removed, and the editing of savegames and presets into the lobby is now supported for everyone.
    • There may still be problems with this that we need to iron out, but we're getting there and everyone should at least be aware of the option.
  • When loading a savegame or quick start into the lobby, it no longer has any problems with "factions that must be discovered" showing up inappropriately.
    • Thanks to a lot of players for reporting.
  • Loading a quick start into the lobby no longer requires you have a campaign name first.
  • The factions that are discoverable in a game, but not yet discovered, are now shown at the bottom of the list of factions as (Discoverable) in the escape menu.
  • Fixed a bug that was allowing you to add more than one Zenith Trader or Devourer Golem or other "must only be one" factions.
    • This had then led to a variety of other bugs after that, but we're less concerned about those since the core thing can no longer happen.
    • Thanks to DEMOCRACY_DEMOCRACY and StarKeep for reporting.

Forward-Compatible Settings and Profiles

  • Made it so that settings files and input bindings files -- from this version onward -- are now forwards-compatible.
    • Aka, if you load a version 2.016 settings file in version 2.012, then it would let you do that. In the past, loading a version 2.012 file in 2.011 would cause it to show an error message and toss out all your settings.
  • The player profile is now stored in an xml format rather than the char field format that it was using before, which allows for hand-editing if we ever need to and is more flexible in general.
    • The player profile also now is forward-compatible from version 2.012 onwards, like the settings and player inputs.
    • Thanks to a variety of players, but including Shnatsel, for suggesting.

Changes for The Spire Rises DLC

  • Shifted the values for Fallen Spire exogalactic-strikes around, resulting in low AIP being stronger, and higher AIP not increasing as much.
    • Big thanks to Astilious for reporting and assisting in sorting out the problem.
  • Fix a bug with the hacking sidebar that was causing numbers not to display properly
    • Thanks to Dominus for doing some useful debugging. Thanks to ParadoxSong and Ranakastrasz for the bug reports
  • Fix a bug where mark 7 scourge would try to refuse to fight by constantly thinking they could upgrade
    • Thanks to Ecthelon for the bug report
  • Fix a bug where player or minor faction allied scourge wouldn't realize that the AI Overlord was a legit target
    • Thanks to ArnaudB for the bug report
  • Fix a bug where the Fallen Spire beacon was available even if the Fallen Spire faction was enabled in the game lobby
    • Thanks to Strategic Sage for the bug report
  • Fix a bug where relic trains could go to the AI overlord early
    • Thanks to Lord of Nothing for reporting
  • Fix a bug where the Imperial Spire Fleet was attacking an invulnerable Overlord instead of destroying the guard posts
    • Thanks to Oryutzen for reporting
  • Exos that kill a Spire City no longer get stuck afterwards
    • Thanks to Lord Of Nothing for reporting
  • The scourge was getting stuck if the only path to any target was extremely well defended
    • This was only happening in very late game scenarios with the fallen spire on for certain map types
    • Thanks to Lord of Nothing for reporting

Macrophage Phase 3 - Multi Phage Takeover

  • The Macrophage are now a credible threat. You can have as many of them as you want, and they are fully capable of eating entire chunks of the galaxy on higher intensities. Be warned.

Base Game Changes

  • You can now have multiple Macrophage per game, and they can have seperate allegiences set.
    • If Spores from different Macrophage factions meet; and there are enough unique Spores on the planet to spawn a Telium, one of the spores at random gets priority for deciding whom the new Telium belongs to.
      • Tamed still has absolute priority.
    • There is still only a single Tamed faction.
      • You are still unable to tame any Macrophage subfactions that are friendly to players.
    • There is still only a single Enraged faction.
      • They will still eat everything.
  • Added in two new spawn options for Macrophage: Lone Telium and Clustered Telia.
    • Lone Telium spawns a single Telium for the Subfaction.
      • This Lone Telium is always berserk, never produces spores, its harvesters are much more defensive, and its harvesters only enrage when it dies.
    • Clustered Telia spawns Telia on half as many planets, but spawns 2 Telia per planet.
      • Added in a new quickstart, the Buggalactic War, which makes use of all the spawning styles.
  • Spawn event costs now scale with the number of harvesters that a Telium owns.
    • Base event cost reduced to 125k Metal. (175k for hostile-to-player)
    • On Intensity 5, the cost is increased by 35% for each (non enraged) harvester owned.
      • This value scales with intensity, being 20% at Intensity 10, and 47% at Intensity 1.
      • Tamed is considered Intensity 10 for this purpose.
  • Spore event chance now decreases by 2% for every Telia in the galaxy.
  • Spore event chance is now clamped between 25% and 75%.
  • Higher Mark Macrophage break and snack for longer.
  • Enraged Macrophage snack on homeworlds for thrice as long as they do other planets.
  • Updated the Macrophage Attacking message to no longer spam the log when you kill a large Telium.
  • Tame Telium hack reduced to 25 HaP cost.
  • Chance for Enraged Harvesters to attack the ai starts at 50%, and increases as your Tamed Telia start to outnumber Wild, up until they reach 90%.
  • Gave a facelift to various descriptions such as hacking and entity appenders.

The Spire Rises DLC Changes

  • When a Macrophage faction gets debris, it will upgrade one of its Telia into a powerful Spire Infested Telia.
    • A Spire Infested Telia is equipped with a multitude of short ranged Reaper beams, and is capable of (slow) movement. Be wary.
      • If you manage to kill this Telia, the Macrophage that its part of will be unable to build new Spire Infested Harvesters until they acquire new Debris.
      • You can optionally attempt to hack it to steal the debris, gaining double the science you would from a normal debris.
        • Perhaps its not the best idea to enrage the already powerful bugs that are more powerful than normal.

Balance Tweaks

  • Halved durability of AI Tachyon Sentinels.
  • Black Hole Machines affect units of engine gx 20 and lower, rather than 14. Crippled units can now leave regardless, preventing possible softlocks. Flagship engine gx reduced slightly to be affected.
  • Black Hole Machine, Raid Engine and Magnifier now die with the Command Station.
  • AI Turrets are now at least 75% of the range of player ones.
  • Added numerous AI Ship Groups.
    • Some things of note:
    • There are 50ish Turret Groups, 37 Strikecraft/Frigate groups, and 14 Dire Guard Post groups all added.
    • Swarmer AI has more variety/difference in what it likes to bring.
    • Fortress Baron is the only AI type to have Mini Forts, as a unique thing for it.
    • Turtle AI has 6x the reinforcement group count as before.
      • These vary as to which AIs they are assigned. More specific AI types don't have all of them, while Full Ensemble has most.
      • Many Turret groups require the first DLC to ever show up, and some groups use both base game and DLC Turrets. If you don't have the DLC, those'll just look like normal mono-Turret groups.
  • Some range nerfs to some Extragalactic units. Range and speed nerf to AI Dragon.
  • Dire Plasma Guardian no longer has Overdrive effect, instead is just a larger Plasma Guardian.
    • Nasty interactions with Fallen Spire, particularly the Great Shield.
    • Thanks to Lord of Nothing for reporting.
  • Upgraded AI Fortress power. Large upgrade to AI Super Fortress power.
  • Increased Stingray damage and durability by 40%, metal cost by 60%.
  • Tripled Ion Disruptor damage.
  • Sentinel Gunboat damage increased 60%, metal cost doubled.
  • Ranger damage increased 60%, metal cost increased 50%.
  • Medic Gunboat now has vampirism, metal cost doubled.
  • Agravic Pod and Aggressor damage increased 30%.
  • Raider and Dagger damage increased 50%.
  • Grenade Launcher Corvette and Molotov reload time 12s -> 9s.
  • Guard Posts and Dire Guard Posts now use the same armour/albedo stats as their relevant Guardian, if they have one.
  • Put a small bit of Dire Guard Post shield into hull, going from a 1:5 ratio to a 1:3.

Balance Tweaks (The Spire Rises DLC)

  • Both Spy Cradles vision range increased by 1, both have very powerful planet wide tachyon systems.
  • Buttress has same durability as normal structures rather than less, requires MK4 city rather than 5, uses 2 sockets rather than 4, has the same effects as a Black Hole Machine, but the gravity part is planet wide.
    • Made the lower tier Extra-Galactic War units susceptible to this.
  • Small tweak to Relic chase force sizes as you progress through Fallen Spire.

Version 2.009 Plenty Of Tuning

(Released March 9th, 2020)

  • Fix several bugs related to forcefields not handling norris effect stuff properly
    • reported by Fluffiest, Xenorius, ussdefiant and gigastar
  • Centerpieces are now always visible even when crippled on both planets and the galaxy map, though still no longer grant vision of anything else when crippled
    • reported most recently by Chthon
  • Add some defensive code to the Overall Power Level code paths
    • Thanks to ArnaudB for reporting
  • When trying to find a random AI faction for things, try to pick a living faction
    • Thanks to GreatYng for reporting
  • Fix a bug with tooltips for units in Fireteams
    • Thanks to a number of people including ParadoxSong for reporting.
  • The icons in the bottom right corner, under the selected ships, no longer try to draw text. That was way too small and thus always hard to read and looked blurry. That happens in any text editor, too. Instead, it just relies on the icons, which are now larger and thus also themselves draw more clearly. There are tooltips for anyone forgetting what they do. The hotkeys for these functions are still shown via text, no problem, though.
  • Fix a bug in the Save Presets code
    • Thanks to ParadoxSong for the bug report and Dominus for the fix

Dyson

  • New Dyson Antagonizer rules
    • Dyson Antagonizers must spawn on Explored planets
    • Dyson Antagonizers are Always Visible, even if you have out of date information about the planet
      • Requested by a number of people
  • Fix the Dyson Antagonizer not respecting the Dyson Intensity for spawning, and spawning much more often than intended.

Marauders

  • Fix a bug where Marauders weren't spawning turrets for their outposts.
  • Hopefully fix a bug where hostile-to-all marauders weren't killing AI command stations
  • Fix a bug where marauder outposts were spawning much too quickly.
    • Net nerf to the marauders; they require much more time to scale up after capturing a planet. I've heard some complaints that the marauders are really getting out of control quickly, and that should no longer be possible.
    • Thanks to the crew of the USS Defiant for reminding me about this

Spire Rises changes

  • Further clarify the description text on the AI Spire Research Lab
    • Thanks to Lord Of Nothing for reporting
  • Spire Debris is no longer allowed to join fireteams
    • Thanks to Smaug for reporting
  • Prevent multiple Spire Cities from being built on the same planet.
    • Thanks to Ovalcircle for reporting
  • AI-allied scourge at intensity > 5 have a chance of building an additional guard post next to any spawner or armory they create. Should make trying to attack the scourge infrastructure a bit more challenging. This code is readily expandable to spawning other AI structures as well if desired
    • From a conversation with a particularly depraved Peltian sympathizer
  • Make doubly sure that spire relics can't spawn on AI homeworlds
    • pointed out by XTRMNTR2K on steam
  • Improve player-allied scourge target selection in the mid/late game
    • Thanks to Ecthelon for a useful save game for debugging
  • If the Imperial Spire Fleet detects your home planet is under attack, they will prioritize defending it
    • Thanks to ArnaudB for the bug report
  • Add additional debugging code to the Spire Sim code
    • Thanks to Admiral for the bug report

Version 2.008 Transport Loading Hotfix

(Released March 4th, 2020)

  • Fixed a bug where ships would unload properly from transports, but never load into them again, in the prior version.
    • This was a casualty of the many changes we made in order to facilitate the performance improvements, but was quick to fix once people reported it. Apologies for that and anything else that crops up!
    • Thanks to Strategic Sage and Daniexpert for reporting.
  • Imperial Spire vessels are now MK7.
  • There is now extra debugging information shown visibly if the fallen spire actually has an issue.
    • Before it would just silently spam the log.
  • When a unit is trying to transform and it is in an invalid state, it now gives a more clear error message.
  • When centerpieces die, they are now blanked out properly; previously it held onto them in a dead format but mostly-removed, and this could cause some funky errors in the fallen spire in particular, but possibly other places eventually.
    • This was something that the squad wrappers we used to use automatically filtered for, so that's why it pops up now but not previously. It's a lot more efficient the new way, but we needed this extra check for this strange edge case.
    • Thanks to Puffin for reporting.

Version 2.007 Speed Boost

(Released March 4th, 2020)

  • When hovering a tech line in the science sidebar, it now lists the ships lines to be upgraded first by mobile ships, then by turrets, instead of always in alphabetical order
  • If remains cannot be rebuilt for some reason, it now shows the reason in the hovertext for those remains. This fixes a lot of ambiguity!
    • It also includes the countdown timers for things that can't be rebuilt for a certain amount of time with/without enemies.
  • Improved the priorities of repairs and other metal expenditures so that it makes more sense. Command stations with next to no health will now be prioritized extra for repairs even if there's a big ship to complain.
    • In cases where there was a giant golem to expensively complain, it often would not let you even choose to override that and spend metal on repairing the command station. Now that works properly, and at least some engineers will break off to repair things even with a giant capturable there.
    • Thanks to Smaug for a savegame where the command station was just impossible to repair while the unclaimed golem was still present.
  • The 'cancel hack' popup now reminds the player that you still pay the full hacking points value

Bugfixes

  • Remove a debugging line related to Dyson Spheres that was left enabled by accident
    • Thanks to a number of people for reporting
  • Make it much harder for structures to start to rebuild themselves mid battle.
    • Thanks to Ubifan for reporting
  • Fix a very long-standing bug where the Threat Count in the resource bar was sometimes counting Warden or Praetorian units
  • Fixed Fleet Centerpieces vanishing from the galaxy map if they were crippled, then moved to a planet that was only Explored.
    • Thanks to Ubifan, Daniexpert and Histidine for reporting.
  • Fixed a bug where command stations still under construction could still help with claiming other ships.
  • Fixed a really longstanding bug where ships that were overkilled that were in a stack were not rolling over their damage properly.
    • They actually were winding up over-healing the health of the next ship in the stack, not causing over-damage.
  • It was somehow possible to have ships with zero health that did not die, seemingly only since the other performance improvements below but frankly the code was pretty unrelated to the area we can think of.
    • These now automatically re-check for dying within the next sim step, and do so properly. This is a nice safety net in general to have, we suppose.
  • Fixed an issue where it would usually return a spurious "." at the start of type names it could not find.
  • When PerFrame_CalculateEffectiveFleetData on fleets has an exception, it now gives more info on where that happened.
    • Fixed an exception that could happen due to centerpieces not fully deserializing into their fleet lines properly. That only seemed to matter for drone producers, but it was a thing.
      • This fix also fixed a common thing that could happen when exiting out of really large savegames to the main menu.

Performance Improvements

  • Improved performance slightly on player planetary fleets without a centerpiece (aka command station), to basically not do all the checking and counts for them. Every planet has a fleet like that for every human player, so doing some checking like that on all of them was a mild expense that was not worth it.
  • Put in some more debugging variables that let us turn off more parts of the simulation to find performance hotspots.
  • Moved some logic for entity removal to be slightly more centralized, which makes it less common and also thus something that doesn't ever accidentally add the same entity to a big list more than once. There is some performance gain from this, but it's not huge in the current scheme of things.
  • SquadCountsByType is now an int array rather than an ArcenSparseLookup, which makes it much much faster.
  • MetalIncomePerPlanet_ForUI and EnergyProducedPerPlanet_ForUIOnly have become simple integers on the actual planet, and are handled in a much more efficient fashion since they are local-player-UI-only.
  • Added a new ArcenLinkedList<> class, which is a new specialist collection that is thread-safe, multiplayer-safe, and extremely high performance to iterate over, add to, and remove from.
    • We're replacing all instances of ArcenMob<>, and the rollup uses of List<>, with this new class.
    • This sees a massive improvement in speed in a lot of savegames, and the removal of micro-stutters relating to entities being removed from lists in general. This also sees a big improvement in how quickly you can get back out to the main menu.
    • It's a lot of code changes, though, so it's always possible we made some sort of mistake in this and are causing a new bug somewhere. Fingers crossed that's not the case, but the places it would be a problem are usually central enough that it should be wildly obvious. So far we're not seeing that.
    • Thanks to zeusalmighty for the savegame that helped us pinpoint the fact that ship/shot removal was being the biggest performance drain at the moment. His savegame went from a choppy 45-55% performance to smooth 100% performance.
  • Revised the Fleets class to no longer use Squad Wrappers, but instead to directly use squads.
    • This causes a slight performance boost in general, and will allow us to use performance-boosting collections that don't work on structs like SquadWrapper.
    • There's also the possibility for some errant bugs here and there, but we think we caught all of those, as they followed a specific pattern.
  • The list of ships inside each fleet membership are now handled via the new linked lists rather than normal lists, extending the speed benefits to them.
    • Most of the "performance trouble" saves that we've collected over the last months now run at full speed, where some used to run at 5%. A couple still only run at about 80%, but those are by far the minority.
      • It is worth noting that just starting a new game at 300 planets will put you immediately at 70-80% sim speed right from the start. Apparently there is something we're doing that is still inescapably planet-bound in terms of calculation cost, even though the number of ships is 1/3 or less of that of much beefier later-game saves that now run at 100% speed. We may need to lower the max number of planets in any map to being more like 140 or so.

DLC changes

  • AI extragalactic response no longer counts its own scourge allies when deciding whether to spawn extragalactic war ships
    • Thanks to Strategic Sage for the bug report
  • Make the Scourge Beacon Hack more costly and harder
    • Thanks to Strategic Sage for the suggestion
  • Awakened Scourge allies should show up in the escape menu now
    • Thanks to vinco for the bug report
  • Fix a bug where the Imperial Spire wasn't pressing home its attacks
    • Thanks to Astillious
  • Fixed the new Arks being unable to rebuild remains.
    • Thanks to Ryulong for reporting.
  • The Objectives for killing the AI Spire Citadel/Research Lab only appear once you have Explored those planets
  • There is now a Spire Beacon, and hacking it activates the Spire Quest.
    • This is only available for new games, it's not retroactive
    • Thanks to SCUD on steam for reminding us about this.
  • The Scourge's Overall Power level can now go up to 1.5 if it has a Nemesis
    • Only relevant for player or minor faction allied scourge

Balance Tweaks (The Spire Rises DLC)

  • Increased durability of Scourge Spawners and Armouries by 50%. Added Forcefields to both.

Balance Tweaks (Base Game)

  • Raid Frigate, Bounty Hunter and Apparition mass 4 -> 5.
  • Raid Frigate damage 5,000 -> 3,500.
  • Dyson and Dark Spire units are immune to being captured.
    • This solves some nasty faction interactions, such as an AI Wendigo finding a nice tasty group of Dark Spire to eat, or the Nanocaust gaining enormous hordes of units.
    • Also fixes some possible player shenanigans using Hacks.
      • Thanks to ArnaudB for reporting a Dark Spire and Nanocaust incident, Histidine for reporting a Wendigo problem, and Fluffiest for suggesting (all separately).

Version 2.006 Hotfix

(Released February 29th, 2020)

  • Viral Shredders now inherit pursuit mode
    • Thanks to Ecthelon for the bug report
  • Quiet some text in the galaxy view hover-planet view. We don't want planets being suddenly Nomadic or anything...
    • Thanks to Fluffiest for reporting
  • Improve the hovertext for AI Spire Research Labs to clarify that they violate other city placement rules
    • As a result of some discussions on discord
  • Fix a bug where you couldn't build Spire structures if the Spire Flagship (but not the city) was crippled
    • Thanks to WolfWhiteFire for reporting
  • Tweaks to the Spire Debris; Debris can no longer be captured by another faction while you are hacking it. The Spire Debris spawn message now shows the correct time that the debris will last for the first debris.
    • Thanks to Vinco for reporting
  • Add some additional debugging code to PreFillFactionBasedData.
    • Thanks to Binary Blitz for the bug report
  • Fix a bug where Outguard hacks were causing the hacking history menu to crash. Add some defensive code there too
    • Thanks to Strategic Sage's thot bug reporting ways
  • Improve the 'ai stops doing anything once it's killed' code to make sure that Anti-MDC exos are no longer spawned after the Overlord is killed
    • Thanks to GreatYng for the bug report
  • You now know which faction will capture Spire Debris if you don't get to it in time. This lets you make informed decisions about which debris you want to prioritize.
    • You also get 3 debris per City instead of 2.
    • Suggested by Starkelp
  • Fixed Viral Shredder copies being swappable, allowing for infinite lines in a single Fleet.
    • Thanks to Lampshade for reporting.
  • Put in defensive coding against some rare nullref exceptions that could happen during some combination of scourge and fallen spire, but which we weren't able to directly duplicate.
    • Thanks to ArnaudB for reporting.
  • Removed the maximum Mark restriction set on Battlestations, Citadels, and Home Forcefields.
    • They now go to Mark 7 like normal.

Version 2.005 Hotfix

(Released February 28th, 2020)

  • Fixed an invalid cast exception that could happen in GetScourgeGlobalDataExt for unexpected reasons if the scourge had wrong metadata for some reason.
  • Definitely fixed the minor capturables exception in mapgen, so that even if it ever happens in the future (even mods could validly cause this), it will just silently log a note in case developers need it, but keep everything on the interface running smoothly. The actual error in this case was related to an expansion, but a mod could easily cause the same thing, and in neither case is it actually a bug or something to notify the user about.
    • Thanks to Jodan008 for letting us know this was still happening.
  • Fixed an issue in the most recent hotfix related to dyson antagonizers not being found.
    • Thanks to ArnaudB and Yog-Sothoth for reporting.

Version 2.004 Hotfix

(Released February 28th, 2020)

  • Fixed units with ShouldNeverBeCapturedByAnotherFaction set to true, such as Tesla Torpedo Frigates, from being loaded into Transports.
    • Thanks to Ubifan for reporting.
  • Clarify the Scourge Neinzul Fortress text to mention that it produces hostile to all zombies
    • Thanks to vinco for reporting
  • Fixed a mapgen error that could happen for people without the new expansion installed. Apologies for that!

Version 2.002 Turret Icons

(Released February 27th, 2020)

  • All 30 of the new turrets now have updated flair denoting what they are. Definitely important for seeing from a distance and in the sidebar what they are!

Version 2.001 Expansion 1: The Spire Rises!

(Released February 27th, 2020)

Prior Release Notes

AI War 2: The Grand New AI