As chosen by Update Poll, the second part of the Magic Update is up! Probably one of our largest yet, thanks also to amazing fan-contributions, this update is packed full of new stuff for our wizards to play with, and a whole lot of important fixes, so get it ASAP!
Changelog
4 new magical Tool Items!
Wands: Casts Spells with your own power, but at no Mana cost. Infuse with your favorites, and cast until the charges run out (based on the materials' levels), recharge with gems!
Staffs: Same as Wands, but using your own Mana to do so, but they have no charge limits! (Effectiveness of the Spell a function of item/spell level)
Orbs: Hold them in your hand to channel your Spells through them and boost them by 50%! At least until they shatter with your immense arcane power
Talismans: Same as Orbs, but instead of boosting Spells, they make them cost no Mana!
3 new Projectile options for Spells!
Weapon: Apply your Spell to your hands, and activate them on whoever you target! Stackable!!
Touch: Touch everyone near you and make them feel the magic!
Aura: Bring your Effect Area (aka AoE) whenever you go!
The Impact Effect now has an option for which direction the target will be flung to!
New Enchanting sound effect, used for not only Enchanting Equipment in Altars but also for the new Weapon Spell Projectile
Wizards and Mages now spawn with one of the 4 new magic Tools, instead of their (placeholder) Flute
Redefined the drop rates of each Item in the Magic and Rare Items pool, to include the new Magic Tools
Scrolls now save their Spell's effectiveness (multiplied by the writer's spellpower) separatedly, and thus Upgrading them works properly
Updated the description of Skills, especially Spellmaking and Enchanting, to inform their new uses for crafting and charging the new Magical Tools
Renamed the previously named melee two-handed Polearms Staffs/Quarterstaffs to Poles, to avoid confusion with the new magical Staffs
Fan-Contributions by Addison @addison.h:
Worldgen improvements:
Settlement name selection depended on timing. Now they are assigned in order
Roamer generations were merged based on thread timing
A ton of random draws were based on global RNG or time seeded RNG instead of based on per thread seeded RNG
IDs could have collisions because they came from an unsynchronized global generator
Global.pick_random had a nonuniform selection bias
Faction relationship calculations are about 10x faster
World heightmaps are now packed arrays
Terrain loops are much faster with fewer lookups
Thread scaling is much better now. On my 24 thread system, about 40% of the time was just spent in contention. The problem was how match blocks are handled in the GD Script VM weirdly enough. I changed those to a bunch of if statements. It looks gross but it's way faster
Better work sharing across threads with a shared chunk queue
History log was doing a lot of work on every line. That cost is now only once per frame
Chunk format improvements:
Chunks, the world file, and the faction file are now packed and compressed .dat files
Old saves can be converted and I added some functions to allow players to export binary files as json
Terrain heights and gather spots are packed differently now to save space
The fog of war png is re-encoded less often now. That was a pretty large time cost for saving
If a chunk file is corrupted or otherwise not able to be read, it is no longer overwritten
Factions relationships are now a single table of floats with symmetrical relationships. This probably needs a lot of review because it changes a lot of hostility interactions and trade prices and who knows what all else. Actually this whole patch probably just breaks stuff so beware
Entities now have replicable IDs. That doesn't sound big but it's actually the foundational piece for cloud saves. Now, a cloud save only needs the chunk files for the chunks a player has actually visited or modified. The game can identically regenerate all of the chunk files that haven't been modified.
This patch took my world file size from 1.7 GB to 114 MB
Chunk load pipelining:
A worker thread now loads chunks from a queue with a per frame budget. Not sure if the budget is totally necessary and also I just set it based on my system
Unloading chunks and props is budgeted too. The budgets do help quite a bit with worst case frame times so maybe the complexity is worth it.
Terrain is computed on the worker thread
Only modified chunks are saved
A full save takes a snapshot and writes files on worker threads. Before there was a race condition between the save thread and the main thread
Building on the last patch, generated chunks are saved in a separate location as to not be included in the cloud save. A new default size world ends up being about 2MB of data that needs to be cloud synced
The world generator has a version so that peoples generated saves don't get mangled by a generator change
The last big one! The terrain itself is left out of changed chunks! That saved like 40% of the chunk file size. I was worried about peoples' cloud saves getting really big if they explored the whole world. This alleviates that issue pretty well
Chunks load way faster when flying around. The worst case frames are much better, and now we can maybe have cloud saves!
Bugfixes:
There was a duplicate world save block in save_all(). That is removed now.
There was a case where set_steam_achievement was called every frame and iterated through all achievements and stats. Now that only happens once per game session.
The fairy equipment perk scaled by 0.5 every frame
RNG table was read outside of the mutex
Roamer generation list had a race condition
Sliding door script failed to load because a location changed
The aforementioned generation chunk type mismatch
I tried to fix the wizard tower name thing while I was in there. Not sure if I got the behavior how you meant
An unequipped item that shatters has no model when the shatter finishes, causing a queue_free on a null
While working on save speed, I realized that my game was slow to close because it was actually crashing and saving a massive crash dump. That was because the engine expected the theme object to have a path. It does now and the game doesn't crash on close anymore.
Mushroom patches leaked a node and also contributed to the crash on exit
The town leader sort oscillated between selecting a manager or a cleric and then the engine reported a bad comparison function. Now it sorts clerics first.
Changed the visuals, and collision, of the lower part of the outside of Nests and Caves, to prevent rare instances where they could block the entrance
Replaced the Nest icon in the map with a more appropriate one
Added a new Advanced Option: Criminal NPCs always Fight, so you don't have to ponder the morality of sparing Criminal Scum that surrender
Something extra now happens to resurrected NPCs
Changed the Levitation animation while inside to one more compatible with the character's hitbox
Slightly improved the Climbing/Crawling animation for Humanoids, specifically the roation-to-ground code
NPCs now run closer to you before switching to walking
Nests now have their lowest floors flooded with Insect acid juice
Villagers may now carry raw materials with them (ores, logs and plants)
Added unique Personality generation for Guardian-Job NPCs (Insectoids)
The King and Devil Spire Bosses now get their own music remix
Towers are now properly registered as Locations in worldgen, so you can Ask about them and they can be the target of Escort Quests (from Rescue ones)
Insectoids in Nests now spawn with Lamps (which will be replaced with primitive/nature-equivalents later)
Renamed the Hut Settlement type to House, to better show their general-use nature
The Warriors Guild now has a Stove instead of a common Table on the second floor
The Mages Guild now has an Enchanting Altar and an Orb Stand instead of a common Table on the second floor
Reduced the frequency that Guild managers ask for Recruit Quests from 25% of the time to 20%
You can now recruit people to Factions even if you're not a Superior, if you have a Quest to do it
Fixed broken collisions on some dungeons (invisible walls, impassable climb/crawl spaces, etc.)
Fixed characters under the Choke magical Effect being able to reset their oxygen by swapping equipment
Fixed endlessly stacking of Summon, Wall and Create-like Effects when used in an AoE, which often causes crashes and other issues like permanent summons
Fixed incorrect check for dodging magic AoEs
Fixed incorrect scaling of Forest Dungeon exists
Fixed incorrect texture colors for Dungeon props, like wall/doors (like non-Desert Pyramids and Snowy Temples)
Fixed incorrect texture replacements for Primitive (Insectoid) and Silk (Arachnid) Accessory Items
Fixed minimap "camera" being incorrect in some Dungeons, like Sewers and Forests
Fixed rare cases where generating Demolish Quests could cause freezes and crashes, especially for Insectoids NPCs in Nest Dungeons
Fixed the Punching Skill's Iron Fist Perk not checking properly when your unarmed attack gets blocked (for self-damage)
Fixed unbuildable props being chosen as Build Quest targets
Other misc fixes and improvements
Want to vote on what will come next? Join us on Discord (18+ years old only)!
Some of the content introduced in updates won't show up in your game world, or at least won't be readily available, if it was generated before the update. They should not corrupt world files, but if they do, please report it!
Thank you for your suggestions and bug reports! Please let me know what you think of this update and if you ran into any issues.