# Preamble In this update we're introducing massive, massive changes to the asset loading system and the lua engine. We can't possibly test everything that could maybe go wrong, so please help us test and brace yourselves for more patches! Even though these patchnotes might not look like much, a lot has been going on in the engines roots. This update is probably the one that we spent the most work on in the last 12 months. # Mods "We believe that a sandbox game is only truly a sandbox when players have the ability to mod it. So we spared no expense and effort to bring you guys this update. We did our best to make it as easy as possible to use and create mods." * Implemented Workshop Mods * Workshop Mods can be subscribed to and configured in-game in Settings -> Mods * Achievements are disabled when using mods * When logging into a server, Workshop mods can be downloaded automatically (without subscription) # Creating Mods "Creating mods can be a complex process, so we spent weeks and wrote a lot of guides for all you modders:" * General Introduction: https://wiki.avorion.net/Modding * Modding Guide: https://wiki.avorion.net/Writing_your_own_Mod * Mod Examples: https://wiki.avorion.net/Mod_Examples * Avorion Internals Guide: https://wiki.avorion.net/Avorion_Internal_Architecture * Modding Pitfalls: https://wiki.avorion.net/Modding_Pitfalls * Debugging: https://wiki.avorion.net/Debugging_Scripts * Best Practices: https://wiki.avorion.net/Best_Practices * Multiple Mods can now easily modify multiple files, which is done by appending mods to the files ** Allows access to variables declared as "local" when extending files ** Many script files have been modified to support appending mods * Assets, such as Textures or SFX, are shadowed instead of extended * Modded files are loaded in a load order specified by mod dependencies * ALL lua files (including library files) and almost all asset files can be modded # Using Mods on Dedicated Servers * Dedicated servers download workshop mods configured in modconfig.lua file * Servers can specify mods that are allowed on clients connecting to the server ** More details: https://wiki.avorion.net/Using_Mods_on_Dedicated_Servers # Client * Client creates a moddata/ folder in settings folder for mods to save configs * Added windows to configure and upload mods * Added a window that warns when savegame altering mods are no longer enabled before loading a galaxy * Replaced Scrapyard tab strings with icons * Added particles quality setting * Improved RAM management of unused resources * Improved performance of ship preview UI elements ** Designs are now loaded on-click, no longer on-show # Server * Added a command line option "--init-folders-only" to only initialize folders * Improved error handling for saving of data to files # Misc * Logging now prints to different files to ensure no one file gets too large # Scripting API "Oh boy have we some patchnotes for you guys! We're only listing the most important changes, you can find the rest in the Scripting API." * Added a "include()" function in addition to "require()" which also loads all mod extensions instead of just a single file * Reworked a lot of files to be more easily moddable * Added a max depth variable to printTable() * Added a ScriptModManager API * Added a string.join() function * Implemented mod-specific scripts that run in global server environment * sendChatMessage() and broadcastChatMessage() now also accept an Entity as sender * Added UIGridSplitter, UIHorizontalLister, UIArbitraryHorizontalSplitter UI organizer classes * Unified pirateattackstarter.lua and traderattackedbypiratesstarter.lua in sectoreventstarter.lua * Added missing Descriptor getters for DockingPositions and TorpedoLauncher components * Added "craftFaction" property to Player * Added a table deepcopy() function * When adding scripts into the same VM, the first added script is used whenever possible * Client offers a "createDirectory" and "removeDirectory" function for inside "moddata/" folder * Server offers a "createDirectory" and "removeDirectory" function * Scripting API for scripts used by the game itself (Faction Map, Generators, etc.) now use Client/Server specific API * Creating an Entity() from an ID that doesn't exist no longer prints errors to the log * Creating a Faction() from an index that doesn't exist no longer prints errors to the log * Massively reduced cases in which scripts would be set to "invalid" after erroneous execution # Gameplay * Increased pause between 2 independent events to at least 10 minutes from 5 * Increased amount of money in traveler's stash * Scrapyards now offer dismantling of turrets into parts * Reduced the AI behavior where AI ships with high reach run from player ships indefinitely ** Reduced distance based on reach that the AI tries to keep between it and its target ** Increased time interval where the AI updates the waypoints around its target # Bugfixes * [UBR] Fixed an issue with "invalid fighter stats" in fighter factory * [UBR] Fixed several issues with faulty translations causing crashes * Fixed several issues with screenshots and textures placed in non-ASCII paths * Fixed several íssues with loading lua files or other assets from non-ASCII paths * [UBR] Map commands jump range visualisation now works correctly for ships that can pass rifts * Fixed some performance issues in flight AI # Known Issues "Sadly, some things cannot be modded yet, because they're too deeply rooted inside the game's core engine. We're working on making those things moddable in the future as well." * Some things like Materials, Rarities or Blocks cannot be modded yet