Neat!
• All 'right click to open' items (bags, crates, can of worms, etc.) now have a loot table like NPC drops.
• Use Mod/GlobalItem.ModifyItemLoot just like you'd use ModifyNPCLoot for NPCs.
• Currently, the loot table will be rolled on every right-click of an item (doing nothing if there is no table.)
• Vanilla bags/crates have been translated. There may be bugs in translation.
• A bunch of new ItemDropRule classes have been added for 'bag style' rolling.
Porting Notes: #preview-update-log in Discord
• Allows mods to create custom interface hooks for ModPlayer instances, in line with support on GlobalItem, GlobalNPC, and GlobalProjectile.
• PlayerLoader backends modernized and streamlined. You may get whooping 0.01% more performance!
• Player.ModPlayers getter property added. Don't go crazy.
Examples: #preview-update-log in Discord
• Introduces ModPylon for adding your own pylons, and GlobalPylon for altering vanilla and modded pylons.
• ModPylon extends from ModTile and works in hand with a subclass of TEModdedPylon.
• Definitely check out the ExamplePylon if you're implementing a pylon of your own.
• Provides a range of hooks relating to teleporting conditions, placement restrictions and map drawing.
Porting Notes: #preview-update-log in Discord
• Completes the first major step in the Mod Pack Overhaul development that begun two months ago.
• Adds a new feature: Freezing a copy of all mods inside of a mod pack.
• Adds a new feature: Export all mods from the Mod Pack to a folder for usage on a server OR setting up an older tml instance.
Porting Notes: #preview-update-log in Discord
• Introduces the new ModPlayer.ModifyFishingAttempt hook.
• Allows mod developers to change information about the ongoing fishing attempts before caught items/NPCs are decided, but after all vanilla information has been gathered.
Sample Usages:
• "Enhanced Crate Potion" that quadruples crate chance.
• "Fishing License" accessory that increases the chance to get higher quality fish.
• Catching lava/honey fish in water.
A number of audio issues on Windows have been fixed, for example:
• Audio stuttering -- something we've previously fixed, but had to rollback the fix until now.
• Audio devices sometimes not being detected by the game, requiring dances with a tambourine.
• If two mods call RecipeGroup.RegisterGroup with the same name, they will be merged.
• Main.sectionManager.SectionLoaded can be used to determine if a tile section (200x150 tiles) has been sent from the server to the client or if the tiles are all air because the data hasn't yet been synced.
• There is also sectionManager.TileLoaded and TilesLoaded which does the tile -> section conversion for you.
Porting Notes: #preview-update-log in Discord
• RecipeCreationContext (passed to Mod/GlobalItem.OnCreate) now has a ConsumedItems field.
• Recipe.OnCraftCallback now has List<Item> consumedItems as the last parameter.
• Items taken from multiple stacks will appear multiple times in the list, with the partial amounts that were consumed.
Porting Notes: #preview-update-log in Discord
• Changes Mod.PostSetupContent to run after SetuPContent has been called on all mod content, not just the one mod.
• Makes PostSetupContent more useful for cross mod content. As an example, it should be safe to create item instances and lookup tables. A lot of mods end up using AddRecipes for stuff that should/could really go in PostSetupContent.
• ModPlayer PreHurt/Hurt/PostHurt now have an additional cooldownCounter parameter at the end indicating which immunity counter this strike is meant to trigger.
• Can be used to implement accessories that add extra immunity time properly (see ExampleImmunityAccessory)
• Remember to use ImmunityCooldownID.Bosses for damage done to players by your boss enemies! (see Example Minion Boss and the MinionBossEye projectile)
Porting Notes: #preview-update-log in Discord
• Allows mods to change the behavior of the shift-click slot event (e.g. to fast-transfer an item to a custom UI.)
• You can now just write SoundEngine.PlaySound(in item.UseSound, ...) instead of having to wrap calls like that in a null check block.
• That is all.
• Makes the local variables in WorldGen.GenerateWorld public static instead, e.g. WorldGen.dungeonLocation.
• Makes many private static worldgen variables public, so you don't need to use reflection anymore.
Porting Notes: #preview-update-log in Discord
Sending mods from servers on join works again now. No more evil Bad Header errors.
• Tile.BlockType = ... had a bug where it set IsHalfBlock to true for slopes and solid and false for BlockType.HalfBlock
• Guess no-one used it until now?
Porting Notes: #preview-update-log in Discord
• Use ModSystem.AddRecipes/AddRecipeGroups/PostAddRecipes instead.
• See the PR discussion for alternatives. The standard approach is to add callbacks to or modify recipes directly (e.g. like in PostAddRecipes.)
• No backwards compatibility for this feature.
• Replaced with a drop rule system similar to NPC drops. See ModifyItemLoot hooks.
Andrew Spinks, Marco, John Gabriel Wilson, Andrew Nelson, orian34, dinidini, Peter Doucette, Neuron, SheepishShepherd, Chris Cheeseman, Chris Book, absoluteZero, Steptimus Heap, Hao Wu, Toni Stache, Patcheresu, Hunter Amelink, Jeremy Weeks