1. tModLoader
  2. News

tModLoader News

TML 2022 August Stable Update

August's Stable TML release is here with new API features & modernization, polishing, and a wagon of stability improvements.

API Backwards Compatibility


The TML Team has decided to make API changes back-compatible for at least one month following their merge where possible.
Old APIs will be marked with [Obsolete(msg, true)] producing a compile error to discourage their usage. However an effort will be made to make sure that mods which were compiled for the previous version of TML continue to load and run correctly for at least the next month.

Note that this is where possible. Sometimes there may be unavoidable incompatibilities in the new APIs, and some mod functionality may be lost during updates.

New Changes' Highlights


The following is a list of the most noteworthy pull requests and commits that have been pushed to 1.4-preview in July, and are now available on the default/stable branch.

[h3]New Workshop Menu Icons by Rijam[/h3]


Neat!

[h3]Grab Bag Loot Modernization by TheLuxure[/h3]
• 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

[h3]Modernize PlayerLoader, support custom ModPlayer hooks by Mirsario[/h3]
• 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

[h3]Modded Pylons: ModPylon & GlobalPylon by MutantWafflez[/h3]
• 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

[h3]Mod Pack Revamp Part 1 of 2 by Solxanich[/h3]
• 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

[h3]Add ModPlayer.ModifyFishingAttempt hook by direwolf420[/h3]
• 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.

[h3]Update FAudio and use WINSDK IAudio backend isntead of FFMPEG by Chicken-Bones[/h3]
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.

[h3]Merge Recipe Groups with the same Name by jopojelly[/h3]
• If two mods call RecipeGroup.RegisterGroup with the same name, they will be merged.

[h3]Fix players/NPCs falling through map in MP by Chicken-Bones[/h3]
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

[h3]Add consumed items list to Recipe.OnCraft and RecipeCreationContext by andro951[/h3]
RecipeCreationContext (passed to Mod/GlobalItem.OnCreate) now has a ConsumedItems field.
Recipe.OnCraftCallback now has List 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

[h3]Run SetupContent on all content from all mods before PostSetupContent by Chicken-Bones[/h3]
• 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.

[h3]Add cooldownCounter for PreHurt, Hurt and PostHurt (Player) by Crapsky233[/h3]
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

[h3]Add PlayerLoader.HoverSlot hook by Crapsky233[/h3]
• Allows mods to change the behavior of the shift-click slot event (e.g. to fast-transfer an item to a custom UI.)

[h3]Added a public 'in SoundStyle?' overload for SoundEngine.PlaySound by Mirsario[/h3]
• 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.

[h3]Publicize WorldGen local variables & private variables by MutantWafflez[/h3]
• 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


Localization Updates


lyc-Lacewing: Localization support for ModConfig

Brazilian Portuguese - Thanks to Pixelnando.
German - Thanks to CriddleZap.
Russian - Thanks to Ved-s.
Spanish - Thanks to Wolf-Igmc4.

Bug Fixes


[h3]Fix mod syncing on fast connections, poor errors on dropped packets by Chicken-Bones[/h3]
Sending mods from servers on join works again now. No more evil Bad Header errors.

[h3]Fix TileWallWireStateData/Tile.BlockType setter inverted IsHalfBlock by Chicken-Bones[/h3]
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


starspritechippy: Update steamcmd setup to use full paths turtletowerz: Fix modpacks not saving for duplicate configs Antirhinnum: Reset Projectile.ContinuouslyUpdateDamage jackbondpreston: Fix some UPNP issues ExterminatorX99: Prevent registering a recipe twice absoluteAquarian: Fixed color chat tags being ignored by ChatManager methods... absoluteAquarian: NPC Dialogue Fixes direwolf420: Various ExampleMod fixes direwolf420: Exclude missing NoSync mods from ModNetDiagnosticsUI, fixing exception Solxan: Add support for Linux x86 formally by adding libsteamapi.so Solxan: Fix a missing true in Directory.Delete for 9999 folders Solxan: Final Fix for #2660 jopojelly: Quick Fix for #2407 until someone works on controller support jopojelly: Fix an issue with modded chests having tiles corrupted jopojelly: Protect against bad mod name response from workshop jopojelly: Log OS version, catch more ControlledFolderAccess errors jopojelly: Fix orphan or incorrectly assigned recipe groups. Chicken-Bones: Better fix for docker in non-interactive mode Chicken-Bones: Fix TileWallWireStateData/Tile.BlockType setter inverted IsHalfBlock Chicken-Bones: Add error screen when server connection is lost during mod reload Chicken-Bones: Fix mod syncing on fast connections, poor errors on dropped packets... Chicken-Bones: Add more graceful handling & logging for corrupt worlds on servers (Fixes #2693) Chicken-Bones: Fix players/NPCs falling through map in MP Chicken-Bones: Make ModSystem.SetupContent call SetStaticDefaults by default Chicken-Bones: Use IAudio backend again, this time with speakermask fix Chicken-Bones: Fix crash on some clients due to broken output stream Chicken-Bones: Fix ExampleFoodItem using ConsumeItem rather than OnConsumeItem

Removed Hooks/Features


Note: Obsolete hooks have been left in for compatibility where possible, but they will be removed in following months, so please move away from these.
As always, tModPorter is available to help providing hints and refactors.

[h3]Mod.AddRecipes/AddRecipeGroups/PostAddRecipes[/h3]
• Use ModSystem.AddRecipes/AddRecipeGroups/PostAddRecipes instead.

[h3]Remove GlobalRecipe[/h3]
• 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.

[h3]Mod/GlobalItem.OpenVanillaBag/PreOpenVanillaBag [/h3]
• Replaced with a drop rule system similar to NPC drops. See ModifyItemLoot hooks.


Known Issues


[h3]My game doesn't launch, and I'm on Windows![/h3]
  • If you're on Windows 7 or 8.X, or an older Windows OS, installing .NET pre-requisites listed in Microsoft's website might very much help. Especially the KB3063858 update.
  • If the above doesn't apply or didn't help, try deleting the dotnet folder in the install directory, and try running TML again. There seems to be a bug with extracting needed libraries on some Windows devices, where it may take two attempts. We are actively investigating improvements to remedy this.


Frequently Asked Questions


[h3]How do I switch to the 1.4-preview or 1.3-legacy branches of TML?[/h3]
To switch to anoter branch in steam, just do the following: 1. Right click on tModLoader in Steam and select 'Properties...', then 'BETAS';
2. Select the branch you want in the drop-down menu on top;
3. Close the window. You don't need to enter any passwords.
Please note: 1.4-preview versions of TML are intended to only be used by mod developers and testers who know what they're doing. Some popular mods' authors do not intend for their mods to always work with it.

[h3]When will tModLoader be 64-bit???[/h3]
It's already 64-bit!
TML runs in AnyCPU mode with x86_64 natives on .NET 6.0+, using the FNA framework under a singular universal cross-platform release.

[h3]I have a 32-bit OS, will it be supported?[/h3]
Plenty of work has now been done towards improving our handling of native libraries, to then add 32-bit Windows support after that. If everything goes well in testing, this will be pushed to the stable branch mid-month, with an announcement in our Discord.

Our Lovely Supporters


Special thanks to the following people who have supported us on Patreon in the last month:
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




See you in Autumn, tomorrow!

TML 2022 July Stable Update

July's Stable TML release is here with more polishing, new API features, and many improvements made to the tModPorter utility.

Earlier Mid-month Changes


The following changes & fixes have been merged into stable in June, but were not mentioned anywhere on Steam yet:

[h3]Restore vanilla melee speed balance by ThomasThePencil[/h3]
• Melee speed interactions have been restored for vanilla weapons.
(Yes, projectile fire rate is now unaffected again.)
• Modders can turn this off for vanilla hybrid (shoot and melee) weapons by setting Item.attackSpeedOnlyAffectsWeaponAnimation = false.
• Adds tooltips about melee speed effects.
• Adds a tooltip for modders to indicate they have modified the stats of an item (from vanilla, or another mod.)

Porting Notes: #preview-update-log in Discord

[h3]Make Workshop Image Separate by Solxanich[/h3]
• Introduces icon_workshop.png as the default Workshop Icon as opposed to using icon.png.
• You can still select to use icon.png during publishing.
workshop_icon.png is recommended to be 512x512.

[h3]Make Workshop Description Separate by Solxanich[/h3]
• Introduces description_workshop.txt as the default Workshop description as opposed to using description.txt.
• It will still use description.txt IF a description_workshop.txt isn't provided.
• Workshop description's should be known as having separate syntax to what was used historically. Click here to see Steam Formatting Help.
• Updated Workshop Image to fall back on icon.png if icon_workshop.png isn't provided.


New Changes' Highlights

The following is a list of the most noteworthy pull requests and commits that have been pushed to 1.4-preview in June, and are now available on the default/stable branch.

[h3]Save & load for NPCs by Ishigh[/h3]
• Adds the ability to save custom data on NPCs (even non-town NPCs.)
• An NPC which needs to save won't despawn naturally.
• override Mod/GlobalNPC.NeedSaving() to make non-townNPCs save.

[h3]WhipSettings & ExampleWhip by JohnSnail[/h3]
• You can now easily make modded whips.
GlobalProjectile can also now modify the settings for modded and vanilla whips.

Porting Notes, Examples: #preview-update-log in Discord

[h3]More ModTrees code by Ved-s[/h3]
• Added (ModTree|ModPalmTree).Shake hooks, which allow control over on-tree-shake item and leave drops, as well as a place for custom logic.
• Added (ModTree|ModPalmTree).CountsAsTreeType overridable getter property, which allows control over what vanilla on-shake drops the tree should (or shouldn't) have. Defaults to TreeTypes.Forest for ModTrees and TreeTypes.Palm for ModPalmTrees.
• Mod trees will now create leaves in more vanilla scenarios, like during windy days, or when shaken.

Porting Notes: #preview-update-log in Discord

[h3]Move Mod's CreateRecipe and CloneRecipe to Recipe by ExterminatorX99[/h3]
• Now means you don't need a Mod instance to create recipes, and that you can't assign them to other mods accidentally.
• You can even call ModItem.CreateRecipe on a ModItem from another mod and the recipe will be attributed to your mod.
• tModPorter will do the CreateRecipe refactor for you.
• Methods have been marked as [Obsolete] so that not every mod needs to recompile immediately.

Porting Notes: #preview-update-log in Discord

[h3]Add CanBeSloped for non solid tiles by Ved_s[/h3]
• Adds TileID.Sets.CanBeSloped set which will override the simple Main.tileSolid check in Player.ItemCheckUseMiningToolsTryPoundingTile.
• Usage: TileID.Sets.CanBeSloped[Type] = true;

[h3]Easier continuous projectile damage updates by Chicken-Bones[/h3]
• Adds Projectile.ContinuouslyUpdateDamage to mimic the continual damage updates that minions and sentries get, but for all damage classes.
• Automatically sets Projectile.originalDamage during SetDefaults via EntitySource_ItemUse.

Porting Notes: #preview-update-log in Discord

[h3]Bestiary Fixes by Jopojelly[/h3]
• Restores ExampleSurfaceBiome map background display.
• Fixes PartyZombie to show ExampleSurfaceBiome background.
• Fixes ModBiome.SetStaticDefaults being unable to properly assign DisplayName.
• Changes Special Visuals to be called every frame and receive isActive bool instead.

Porting Notes: #preview-update-log in Discord

[h3]Add ModItem support to ItemTags by jopojelly[/h3]
• You can now use modded items in chat tags, like [i:ExampleMod/ExampleItem]. Useful for translation keys and in-game chatting.

[h3]NPC Dialogue Fixes by absoluteAquarian[/h3]
• Fixes NPC Chat Tags to work correctly for mods.

Porting Notes: #preview-update-log in Discord

[h3]Prevent SDL2 loading on servers by Mirsario[/h3]
FNAPlatform functions for accessing graphics, audio and input, will no longer be initialized on servers.
• Fixes TML not being able to be ran on headless systems (systems without graphics cards, drivers, or desktop environments.)
• Fixes illegal usage of FNA APIs related to the aforementioned functions on servers not being properly reported.

Porting Notes: #preview-update-log in Discord

[h3]Make Mods able to Opt-out of being detectable on Preview by Solxan[/h3]
• At the request of modders, they now have the capability to push builds to Preview on Steam Workshop without making them user-playable until the stable release of that TML version.
• This was introduced specifically so that modders can stage their mod ahead of the monthly updates on Workshop, without creating a divide in the user base.
• This does not affect the capability to develop mods, and only affects the availability of your mod to be loaded from Steam Workshop while on preview.

(The feature is obviously only usable on Preview right now.)

[h3]Also - Lots of localization updates[/h3]
• For Brazilian Portuguese, by Pixelnando.
• For Chinese, by Sgkoishi and Crapsky233.
• For Polish, by NothyariS0.
• For Russian, by Ved-s.
• For Spanish, by Wolf-Igmc4.

[h3]Also - tModPorter Improvements[/h3]
We've done many improvements to tModPorter to flesh out its features and address gaps.
Check out our GitHub for more info.

A lot of popular 1.3 Terraria era mod authors have now used tModPorter to speed up their mods' porting process by many many times. We're very excited to soon see some of the biggest remaining ones arrive for modern TModLoader.

[h3]And these Bug Fixes:[/h3]

LordOfOtakus: Fix Mac Steam Overlay not loading Crapsky233: Fix for a Gamepad Overlapping UI issue absoluteAquarian: Some Sound Bug Fixes Ved_s: Further generalization of ModTree/ModPalmTree code in the backend of tModLoader ThomasThePencil: Fix Santa the Santa town npc bug Exterminator: Fix Player.ZonePurity always false on servers Exterminator: Fix ModSystem.ModifySunLightColor Exterminator: Fix an issue with Recipe Ordering Exterminator: Fixed music loading issues Solxan: Fix Steam not unsubscribing players from Mods on deletion Solxan: Update Steamworks.NET to a better library to fix issues with Max and Linux Mod Publishing Mirsario: Fixed #2544 (Cannot open links with Firefox) Jopojelly: Make Open Folder button in Mods also open folder location for Steam installed mods Jopojelly: Stop spamming the 'Freeze has Begun' message on Preview Jopojelly: Fix error when entering just a space in chat Chicken-Bones: Decrease frequency of random lighting game freezes Chicken-Bones: Fix crash when loading a persistent mod npc with no global data Chicken-Bones: Fix a misleading exception with regards to TerrariaSteamClient feature Chicken-Bones: Disable QuickEdit in Windows Console to fix startup issues when clicking in console Chicken-Bones: Increase the speed of Instantiating Globals Chicken-Bones: Fix MusicLoader fatal crash when mod loading fails

[h3]With the following Day One Bug Fixes:[/h3]
  • Linux Steamworks change:
    WARNING: Linux Users, it was identified after release that the Steamworks lib change was not deployed correctly by Steam due to a case-sensitive name change bug in Valve's updates. The recommended user-side fix is to delete the Libraries folder and then 'verify file integrity' in Steam. An attempted fix was pushed under 2022.06.96.4, however the issue is more complex than a script can fix. Please apply the recommended fix accordingly.
  • Avoid unnecessary Error Throwing on 'FolderShortcutSupport' exceptions:
    We deployed a day one patch under 2022.06.96.2 as a large amount of users reported issues with this feature. We are investigating potential improvements for those impacted.


Known Issues
  • I'm getting the "built for 2022.5" warning with "JIT" errors on a mod that should've been updated!
    If you are sure that the mod should now be working on newest TML, yet are still having problems, first verify if the mod is showing as purple in the mods menu - if it is purple, delete it, and than redownload as required. If it is not purple, either unsubscribe and resubscribe OR use the 'Verify Files' function in Steam to force the update to be delivered to you. Sometimes the Steam auto-update fails to deliver for a prolonged period of time.
  • I'm getting bombarded with a bunch of 'FNA -> 22.6' looking errors on startup
    As an extension of the Linux auto update bug from Steam, Windows is also seeing issues with FNA. The recommended fix is to delete all files in your install folder, and re-install.
  • My game doesn't launch, and I'm on Windows!
    Delete the dotnet folder in the install folder, and try again. There seems to be a bug with extracting needed libraries on some windows devices where it takes two attempts. We are actively investigating improvements to remedy this.
  • Some of my mods aren't updated and I want to downgrade!
    As always, mods retain copies for the current month, last month, and pending copies for next month. It is thus fully possible to downgrade and play last month's tModLoader version following the manual instructions here: Link.


Frequently Asked Questions


[h3]How do I switch to the 1.4-preview or 1.3-legacy branches of TML?[/h3]
To switch to another branch in steam, just do the following: 1. Right click on tModLoader in Steam and select 'Properties...', then 'BETAS';
2. Select the branch you want in the drop-down menu on top;
3. Close the window. You don't need to enter any passwords.
Please note: 1.4-preview versions of TML are intended to only be used by mod developers and testers who know what they're doing. Some popular mods' authors do not intend for their mods to always work with it.

[h3]When will tModLoader be 64-bit???[/h3]
It's already 64-bit!
TML runs in AnyCPU mode with x86_64 natives on .NET 6.0+, using the FNA framework, under a singular universal cross-platform release. Is good.

[h3]I have a 32-bit OS, will it be supported?[/h3]
32-bit Windows system support (natives) might be pushed to stable soon™️, we've already done the work that was needed for that.
But be aware that the only somewhat valid reason to still be on a 32-bit OS in 2022 is having 2 gigabytes of RAM or less.

[h3]Why are you guys so slow with these update posts?[/h3]


Our Lovely Supporters
Special thanks to the following people who have supported us on Patreon in the last month:
orian34, dinidini, Andrew Nelson, SheepishShepherd, Neuron, Nike62, Jeremy Weeks, Hunter Amelink, Patcheresu, Toni Stache, Hao Wu, Soft Scratch, Steptimus Heap, absoluteZero, Chris Book, Hana Mizuno, Marco, John Gabriel Wilson, Chris Cheeseman.




See you all next month!

tModLoader for Terraria 1.4+ Launch

Today we are changing the default tModLoader on Steam to the Terraria 1.4+ version. As you might know, we have had 1.4 tModLoader as an option on the Betas menu for quite some time as we've worked on new features to make modding and playing on 1.4 tModLoader a pleasant experience.

The current 1.3 version will still be available on Steam, you'll just need to select 1.3-legacy in the steam betas menu. We expect many of you will want to use this option until you finish your current playthrough of the game.

Please do not expect to be able to switch to 1.4 and continue using all the same mods you are currently using on 1.3. Many mods have unfortunately been retired, or otherwise have not yet been updated to 1.4. However, our workshop is already blooming with mods, and many relatively small & popular missing mods have already had alternatives created for them.

Click here to browse tModLoader's Steam Workshop right now.

[h3]1.4 tModLoader is still in active development[/h3]
Although 1.4 tModLoader is now leaving the Alpha stage, we'd like to reiterate that it still remains in active development, with a continuous release cycle bringing new breaking changes on the 1st of each month. We have a system in place for actively maintained mods to continue working seamlessly as each month's update arrives, but that requires the modders to stay on top of updating their mod if required within the designated time period at the end of each month. More information on the modder maintenance workflow can be found in the following announcement:
https://store.steampowered.com/news/app/1281930/view/3189118991325681723

[h2]Beta Branches[/h2]
To summarize, here are the available options:
default - This is the 1.4 version that we expect players to use
1.3-legacy - This is the latest 1.3 version. We expect many will want to use this if they are currently playing through the game.
1.4-preview - This branch contains upcoming changes. This is where we test new features. This is also where modders need to publish their mods during the last 10 days of the month if needed.

[h2]Twitter[/h2]
Feel free to follow tModLoader on Twitter, there will be occasional announcements and posts to showcase the amazing mods which are being worked on:
twitter.com/tModLoader

[h2]Our Lovely Contributors[/h2]
As any open-source project, the majority of 1.4 tModLoader was made possible thanks to volunteers.
Our sincere gratitude and appreciation go to the following people, who have contributed to tModLoader since Terraria: Journey's End's release day:
direwolf420, Chik3r, ExterminatorX99, ThomasThePencil, Itorius, Steviegt6, Rartrin, Agrair, Ishigh1, DarkLight66, DarioDaF, kittenchilly, Dual-Iron, MrSlimeDude, sgkoishi, OliHeamon, RighteousRyan1, Igmc, NotLe0n, Pixelnando, daim03, fakelag, andrewlord607, pollen00, einarmo, Setnour6, MutantWafflez, Ozzatron, Antirhinnum, CriddleZap, jackbondpreston, Pbone3, ModernMAK, Crapsky233, absoluteAquarian, rjmarzec, ubnt-intrepid, ScalarVector1, Pacnysam, Falcon-05, staticfox, JPANv2, Nyrest, Naginif, D1plex, georgewoodall82, Tyfyter, zzp198, SpencerDawg, RunningDroid, Trivaxy, SadOnion, miarodri, sdegueldre, JamzOhJamz, Ved-s, BarteQ778177, Lumelore, RuneZhevitz, Dinoxel, jjohnsnaill, xKirtle, MikhailMCraft, terrynmuse, hannest03, Fatiz, Valjean42, TomaszOleszko, Rijam, IbanPlay, Fragstiller, S-Pladison


[h2]Our Lovely Supporters[/h2]
We haven't said this enough, and today seems like the perfect opportunity:
Thank you to the following people who have supported us on Patreon in the last 5+ years, allowing us to dedicate more time to tModLoader's development & maintainment.
You're all truly wonderful!
Andrew Spinks, orian34, dinidini, Glorpy, Elfinlocks, Andrew Nelson, POCKETS, Tantamount, SheepishShepherd, Neuron, BlackHackedGhost, Jeremy Weeks, Amanda Oczkowski, Anay Patel, jjgaming2006, Hunter Amelink, Andreas Østergaard Nielsen, Voiceline, Ray Gibbs, Nike62, Vamist, Patcheresu, Barbara Stone, Meadow, Invelios, AetherBreaker, xbit, Jim Harrington, Toni Stache, Peanutbutta187, Crepe, Panini, Linus, Raphael, englishmuffins10, Hao Wu, Soft Scratch, Steptimus Heap, - Neo -, Corniflex, Ranarrr, Rictor86, Cybernetic, TreeZenDE, Waasephi, Brachiaraidos, Clayton Dorsey, Joesph Dasilva, Jared, Ryan, Neels, AlejandroAkbal, ItsFrosty, tooSlyk, Rdforzer, Andrey, MyTea, absoluteZero, Geog, Zephy, Dog toi Boi, Coolmike5000, qwerty123, Robert Lowe, Rose Malone, Eddiero, xAqult, Wertfuzzy77, Damon Schopen, An IRL Rabbit, Chris Book, Mujtba Alsuwaii, Cidericus, Jeff Butterworth, OmniObserver, Austin Paxton, Alexander, Kirby26, Max McKinney, Samanosuke Akechi, bill, Malte Bjuggfält, Drew, Mello, Scott Reismanis, Justin Mercer, Paper Luigi, Steven Stitz, Josh Nadolski, Tsuniyono Zets, Aviatorskylark, Rebecca Brown, Leonardo Vidal, Kirtle, Syrinx Harmodios, Jacob Roper, Tomat (Stevie), Captain Meliodas, Darcy Owens, Chris Cheeseman, eltaro, Derp Duck, Rogierd, Joe Day, VolcanicMG, Randal Bradakis, Florian, HasteReapr, 追魂祥云


Frequently Asked Questions


[h3]How do I switch to back to 1.3 tModLoader?[/h3]
1. Right click on tModLoader in Steam and select 'Properties...', then 'BETAS';
2. Select '1.3-legacy' in the drop-down menu on top;
3. Close the window. You don't need to type any passwords!

[h3]How do I switch to 1.4-preview versions?[/h3]
You might've already guessed.
Follow the steps listed above, but select '1.4-preview' on the second step instead.

[h3]I'm a GOG user! Where do I download TML?[/h3]
Hello GOG user!
See our Github Releases for manual TML downloads.
And if you want a preview build - see our Github Actions instead, and download 'Release Build's at the bottom of the latest artifact's page.
Note: Downloading preview Github Actions builds will require logging into Github.

[h3]When will TML be 64-bit?[/h3]
It's already 64-bit!
Specifically, it's what's called AnyCPU, but we currently only ship x86_64 natives. In addition to TML being made 64-bit-capable, it has been made to run on a ten years newer runtime (.NET 6+), far newer versions of a better game framework (FNA instead of XNA), and we've even unified what would've been 6 Windows/Linux/Mac Client/Server builds into just one portable release that can be run on every Desktop OS. Together, all of this yells: performance, consistency, stability, possibilities, and comfort.

[h3]I have a 32-bit OS, will it be supported?[/h3]
Sorry, but not yet. We've had plans to re-add support for 32-bit Windows systems in June's stable update, but didn't make it in time, so it'll arrive later either this month, or in July.

[h3]Why was this delayed?[/h3]
It happens.
Here's a chicken.
:SBchicken:

TML 2022 June Stable Update

We've done tons of TML work in May, and June's Stable release is now here to bring that to you.

Changes' Highlights

The following is a list of the most noteworthy pull requests and commits that have been pushed to 1.4-preview in May, and are now available on the 1.4-stable branch.

[h3]tModPorter by Chik3r and Chicken-Bones[/h3]
Summary:
tModPorter has now been added to tModLoader as an official module on 1.4 preview. It will see more updates over the next while, but it is now at a reasonable release point.

tModPorter itself is a custom software that helps mod developers transition away from 1.3 by automatically handling several of the breaking changes that we’ve introduced.
However, it is not perfect - some work will still be needed, but it is hoped it will carry the brunt of the manual labor.

Associated launcher files are included in the tModPorter folder in the Install Folder for tModLoader, as well as a button in-game to shortcut to that.

Note that this is tModLoader’s first update with it - so if you encounter bugs, please let us know.

Additionally, please note that many more automatic ports will be added to tModPorter in the next few days. You can help Chicken-Bones prioritize by posting things you'd most like to see automatically ported in the tModPorter Discord thread.


[h3]The Grand Sound Playback Reimplementation by Mirsario[/h3]
Porting Notes: #preview-update-log in Discord Summary:
After 9 years in development, hopefully it will be worth the wait.
ModSound and SoundLoader have both been removed. As well as the Mod.SoundAutoloadingEnabled property.
LegacySoundStyle and CustomSoundStyle were removed. SoundStyle is now a struct (record), which contains everything a sound playing enthusiast would need: AssetRepository-based paths; Volume, pitch and looping control; Numbered suffix variants with even weighted random supported; Sound instance limits and their behavior; And etc., etc.
• All sound playback is now done through one method - SlotId SoundEngine.PlaySound(SoundStyle style, Vector2? position = null).
All legacy (int type, int style) overloads have been removed from the API.
• I went through the pains of entirety converting all SoundID entries to the new SoundStyles, which means that you can now not only replicate vanilla sound playbacks, but also modify their copies with ease. I suggest getting familiar with the x with { A = B } syntax, it’s great here.
• A few improvements may follow later, but they’re unlikely to be breaking changes.


[h3]'Item Use Rework' - Proper Implementation by Chicken-Bones, DarioDaf, ThomasThePencil, einarmo, rjmarzec, and Mirsario[/h3]
Porting Notes: #preview-update-log in Discord Summary:
Basically, this cleans up a long standing set of TML bugs resulting from an attempted fix for a vanilla issue (#1437) with unpredictable item usage frames relative to their animations that was preventing modders from implementing their ideas.


[h3]Add Mod/GlobalType NewInstance, IsCloneable, Clone and CloneNewInstances and Add CloneByReference attribute, improve IsCloneable logic by Chicken-Bones[/h3]
Summary:
• By demand of mod developers, a design change that was part of the OnSpawn Pull Request has been reverted, and CloneNewInstances from 1.3 is back, again set to false by default, like in 1.3. This revert may be temporary in case the team comes up with superior designs in the later months.
• TML tries to make sure that all ModItem and instanced GlobalItem derivatives return true from IsCloneable, logging warnings otherwise.
• If the default IsCloneable implementation returns false, but your item is cloneable via MemberwiseClone (because you have reference fields which don't change once the item is spawned/loaded) - you can do 'override IsCloneable => true'.
• Added [CloneByReference] attribute for fields that are safe to share between clones (because they’re shared, or not modified after Load/SetDefaults)


[h3]Restoration of Mod Trees Part 1: Re-Forestation by Solxan[/h3]
Porting Notes: #preview-update-log in Discord Summary:
• This re-adds the ModTrees, ModPalmTrees, ModCactus support from 1.3 as they were. Consider this a bug fix PR, not a feature rework/API cleanup
• This does not add 1.4 content unless it was specifically required for these to work
• This is NOT the final PR, and we do expect future breaking changes as outlined in / in support of Issue #1347.


[h3]JIT mods on load and allow extending from types in weak-refs by Chicken-Bones and jopojelly[/h3]
Porting Notes: #preview-update-log in Discord Summary:
All mods will now be Just-In-Time compiled on load. This will detect mods that silently break as tModLoader changes and disable them instead of allowing them to silently cause errors. A side effect of this is that weak referenced Types will cause the mod to fail to load, so mod developers weakly referencing other mods will need to utilize the [JitWhenModsEnabled] attribute to annotate classes, methods, or properties using those Types to bypass this checking. See the details in the Pull Request for more information on this and more advanced situations.

Additionally, we now support inheriting from base classes in weakly referenced mods. Such classes need to be annotated with the [ExtendsFromMod] attribute to inform tModLoader not to attempt to autoload the class. A side effect of this capability is that mods should no longer call Assembly.GetTypes() on other mod assemblies, as this could fail now. They should now use AssemblyManager.GetLoadableTypes(Assembly) to retrieve all Types that should be considered from other mods.


[h3]Re-implemented internal names for AddEquipTexture() and ported the equip methods from Mod to EquipLoader by IbanPlay[/h3]
Porting Notes: #preview-update-log in Discord Summary:
Mod.AddEquipTexture(...) got turned into EquipLoader.AddEquipTexture(...), and it can now be used to register equipment textures through an internal name instead of being locked into using the name of their associated item as an internal name. This also allows mods to register equip textures without needing an item reference, and most importantly, allows them to register multiple equip textures of the same type for the same item.


[h3]Accept dots in HJSON by Ishigh1[/h3]
Summary:
HJSON localization improvements:
• Periods can now be used in keys;
It's now possible to write Mods.YourMod: { } in place of Mods: { YourMod: { } }.
• Arrays item paths are now properly handled as well;
Every array item will now have a period-separated key: AnArray.42.SomethingInsideArrayItem.


[h3]PickAmmo Rework + better Shoot mechanics by ThomasThePencil and Chicken-Bones[/h3]
Porting Notes: #preview-update-log in Discord Summary:
• Ammo damage modifiers are selected based on the DamageClass of the ammo
• Added Mod/GlobalItem.CanChooseAmmo hooks.
• PickAmmo hook now has a StatModifier damage parameter.
• Added AmmoID.Sets IsArrow, IsBullet and IsRocket.


[h3]Allow Guns to shoot with no ammo by DarkLight66[/h3]
Summary:
Adds bool Global/ModItem.NeedsAmmo() hook, allowing for weapons which can shoot their default projectile without ammo under certain conditions (like if you had a free ammo buff.)


[h3]New NPC hover-with-mouse hooks by ThomasThePencil[/h3]
Summary:
• Adds NPC.ShowNameOnHover defaulting to true. Can be changed in SetDefaults or AI to hide the hover mouse text
• Adds Mod/GlobalNPC.ModifyHoverBoundingBox(ref Rectangle boundingBox) for custom hover text rect control.


[h3]NPC Capture-related hook expansion by ThomasThePencil[/h3]
Porting Notes: #preview-update-log in Discord Summary:
• Adds CatchingTool and LavaproofCatchingTool Item Sets for creating new bug net type items
• Greatly enhances the hooks for CatchNPC
• A few changes to existing Catch related hooks to be wary of
• Read more in the PR.


[h3]Add GlobalProjectile Send/ReceiveExtraAI by terrynmuse[/h3]
Summary:
void SendExtraAI(Projectile projectile, BitWriter bitWriter, BinaryWriter binaryWriter)
void ReceiveExtraAI(Projectile projectile, BitReader bitReader, BinaryReader binaryReader)


[h3]Recipe Ordering by Ishigh[/h3]
Porting Notes: #preview-update-log in Discord Summary:
• Added methods to allow control of ordering for recipes, for example keeping modded wood with vanilla wood.
• All mods that call Recipe.Register() or RemoveRecipes will need to be updated and/or rebuilt.


[h3]Fix Item/NPC/Projectile.CloneDefaults duplicating globals by Chicken-Bones[/h3]
Summary:
• Does what it says on the can.
CloneDefaults will fully now initialize the item/npc/projectile as another type, and then restore the mod-x and global-x from the original item type.
• You’re only really meant to call this from ModX.SetDefaults.


[h3]MonoMod-related Fixes[/h3]
Summary:
Fellow code injection abusers and users of mods from them will love to hear this:
We've updated to a dev build of MonoMod (the code injection library we use to allow mod developers to more freely modify the game) to get a fix for a process freeze that could super rarely occur during injections, and discovered that specifically that same fix (tied to an unforeseen change the .NET 6 runtime) has also sped up code injections by over ten times.
Thanks and much love to 0x0ade for making MonoMod and collaborating with us!


[h3]Show New and Updated mods on launch in an info box by direwolf420[/h3]
Summary:
We've added a notification window when you launch to see which subscribed mods have updated since the last time you played. This will help you track when your favorite mods update so you can check them out for new features. This will also help you if a mod is broken and you want to remember to re-enable it when it updates.


[h3]Reload Mods button changes by jackbondpreston[/h3]
Summary:
Mods will now automatically reload when exiting the Mods menu. This has caused some confusion in the past as users did not know they needed to reload mods. This change will help simplify the new user experience.


As well as these pull requests which didn't need large descriptions:

Chicken-Bones: Aggregate loading exceptions across content instances. ThomasThePencil: Dynamic Item Scaling Hook Setnour6: The Grand French Localization Update Solxan: Make ModPacks Compatible with 1.4 and Steam Workshop changes Ishigh: TagCompound TryGet Ved-s: Added this[Point] Tilemap indexer

And the following self-explanatory fixes:

Solxan: Windows high DPI detection fix - Part 2 Solxan: Cleanup Feature for Accidental Uploaded of Mod Source Files Solxan: Fixed a worldgen crash Solxan: Mitigated issues with downloading deleted items in Mod Browser MutanWafflez: Fix AnimationType Bug with ActsLikeTownNPC & ExtraFramesCount ThomasThePencil: Fixed a bug from the damage class rework where ammo knockback was being ignored.

Frequently Asked Questions


[h3]When will 1.4-stable become the default branch?[/h3]
In an hour? In a minute? Maybe it already happened?
The announcement post for that will follow shortly after this one, you won't be able to miss it.

Worry not, 1.3 players - If you wish to stay on TML for Terraria 1.3.5.3 - just select the '1.3-legacy' branch in Steam, using instructions from the answer below.

[h3]How do I switch to the preview versions of TML?[/h3]
To switch to one of the new branches, just do the following: 1. Right click on tModLoader in Steam and select 'Properties...', then 'BETAS';
2. Select '1.4-preview' in the drop-down menu on top;
3. Close the window. As before, no passwords are required.

[h3]When will 1.4 TML be 64-bit???[/h3]
It's already 64-bit!
Specifically, it's what's called AnyCPU, but we currently only ship x86_64 natives. In addition to TML being made 64-bit-capable, it has been made to run on a ten years newer runtime (.NET 6+), far newer versions of a better game framework (FNA instead of XNA), and we've even unified what would've been 6 Windows/Linux/Mac Client/Server builds into just one portable release that can be run on every Desktop OS.
Together, all of this yells: performance, consistency, stability, possibilities, and comfort.

[h3]I have a 32-bit OS, will it be supported?[/h3]
We planned to re-add support for 32-bit Windows systems for this update, but didn't make it in time, so it'll arrive later in June or July.

TML 1.4 Alpha 2022 May Stable Update

May's 1.4-stable Alpha release is here, bringing in many essential improvements from April.

Changes' Highlights


The following is a list of the most noteworthy pull requests and commits that have been pushed to 1.4-preview in April, and are now available on the 1.4-stable branch.

[h3]OnSpawn hooks by Mirsario & Itorius[/h3]
Porting Notes: #alpha-update-log in Discord Summary:
(Mod developers will likely want to read the details in the Pull Request, linked above.)

OnSpawn Hooks:
Added the OnSpawn hooks for items, NPCs and projectiles (called when X.NewX gets called). Aside from being usable for basic initialization of these entity types, the hooks provide access to IEntitySource arguments that have been inaccessible for quite too much time.

Modernization:
ModGore and ModDust have been tweaked to streamline the API;
NPCs and Projectiles now only use (improved) cloning for instantiation, CloneNewInstances properties have been removed.

Gore Sources: IEntitySources are now used for instantiation of gores too. Previously there had been an attempt to make them be used for dusts, but collaborators found this to be way too tiresome to deal with.

Entity Source Contexts, Helpers, and Reorganizations ItemSourceID and ProjectileSourceID static classes were removed in favor of new string? Context { get; } properties, which are available on every IEntitySource implementation.

The vanilla helper methods for Players, NPCs, Projectiles, Items have been redone to remove entity-type ties as much as possible.
Most of the renames go like .Get*Source_* -> .GetSource_*.

Changes to entity source classes and helpers can be seen in the full pull request, linked above.


[h3]DamageClass overhaul pt2 by ThomasThePencil[/h3]
Porting Notes: #alpha-update-log in Discord Summary:
• Stat Modifier now has Flat and Base fields
• Added attack speed and armor pen as 'stats' in the damage class system
• Hybrid items which benefit from combinations of stats from other classes are now incorporated into damage class (like whips)
• Crit chance and armor pen are copied onto projectiles on spawn, to fix crit-swapping
• Items can now have armor pen. Item armor pen is added to projectile armor-pen on projectile spawn.
• Attack speed is now an 'item use speed' modifier in the same vein as the other use speed hooks. It affects itemTime, animationTime and reuseDelay equally. This is a deviation from vanilla meleeSpeed which only affected animationTime, causing weird inconsistencies with weapons which had secondary effects under melee speed buffs. See the PR for more details on the vanilla differences. Some (modded) melee weapons could've been slightly buffed.


[h3]Tile "smart interact" fixes/additions, sitting by direwolf420[/h3]
Porting Notes: #alpha-update-log in Discord Summary:
ModTile.HasSmartInteract is now properly called again.
• Added new parameters to HasSmartInteract which are used for conditional checks like vanilla, showcased in ExampleToilet.
• Added new ModTile.ModifySmartInteractCoords hook which is showcased for ExampleBed, ExampleChair, and ExampleToilet, and should also be showcased whenever ExampleDresser gets ported.
• Added new ModTile.ModifySittingTargetInfo hook which is showcased for ExampleChair and ExampleToilet.
• Added new ModTile.ModifySleepingTargetInfo hook which is showcased for ExampleBed.
• Changed the NPC sitting code to account for modded chairs.
• Added NPCID.Sets.CannotSitOnFurniture.
ExampleMod: Updated ExampleChair & ExampleBed examples based on 1.4 changes, added ExampleToilet (both almost the same functionality).
ExampleMod: ExampleChair & ExampleBed now have a highlight texture.


[h3]Buff draw hooks (take 2) by direwolf420[/h3]
Summary:
• Added ModBuff and GlobalBuff hooks: PreDraw, PostDraw, RightClick
• Added summaries to some vanilla methods: Main.TryGetBuffTime, Main.TryRemovingBuff, Main.DrawBuffIcon
• ExampleMod: Added ExampleGlobalBuff.cs, AnimatedBuff.cs; Expanded ExampleDefenseBuff.cs, ExampleBuffPotion.cs, PartyZombie.cs


[h3]Add CanFallThroughPlatforms NPC hook + example, and misc EM localization fixes by direwolf420[/h3]
Examples: ExampleCustomAISlimeNPC.cs Summary:
• Adds a CanFallThroughPlatforms ModNPC & GlobalNPC hook.
• ExampleCustomAISlime: Added CanFallThroughPlatforms examples, fixed localization for the NPC.


[h3]Add NPC Profile System Extension + example by ThomasThePencil[/h3]
Summary:
• Replaces TownNPCName hook with SetNPCNameList and adds global equivalent
• Adds SetTownNPCProfile hook


[h3]Initialization of Workshop Tag code by Solxan[/h3]
Summary:
• Allows TML to add future Workshop Tags
• Adds a handful of preliminary tags to start with, and get feedback from


[h3]Major refactoring, field/property naming & conversions. by Mirsario[/h3]
Commits: #1, #2 Summary:
TML's personal naming conventions were slightly altered again to be closer to the common C# conventions from Microsoft, which are used in XNA and newer parts of Terraria. All non-private fields now use `PascalCase`, leaving `camelCase` only to local variables, method parameters, and private fields.
I went through many (mostly old) TML files and modernized as many as I could.


[h3]Make mods menu aware of outdated mods from the Alpha period by Solxan[/h3]
Summary:
• Players will now see 'Alpha: This Mod is Old, Enable at own risk' in the mods menu for mods built during Alpha period of August 2021 to March 2022
• Players will now see 'Stable: this mod is old, enable at your own risk' for mods that haven't been updated in over a month and could be broken


[h3]Miscellaneous Fixes[/h3]

Ishigh1: Fix #1881 (boulder issue) einarmo: Fix tile placing wands draining inventory Solxan: Fix #2280 (Dressers won't interact properly without a hook)

Earlier Mid-month Fixes


The following fixes have been merged into stable in April, but were not mentioned anywhere on Steam yet:

ExterminatorX99: Fixed held item animations ExterminatorX99: Remove upper bound check on tails direwolf420: Fix credit roll crashing at the end when trying to draw player direwolf420: Fix right clicking unloaded items in dye slots, missing CanStack direwolf420: Fix water lighting in color mode, clarify hook defaults jopojelly: Version-based preprocessor symbols - jopojelly: Fixed mod deletion issues Mirsario: Fixed a vanilla bug with RGB settings resetting on early quits/crashes JamzOhJamz: Fixed a vanilla bug with OGG audio track loop points

Frequently Asked Questions


[h3]How do I switch to the 1.4 Alpha versions?[/h3]
To switch to one of the new branches, just do the following: 1. Right click on tModLoader in Steam and select 'Properties...', then 'BETAS';
2. Select either '1.4-stable' or '1.4-preview' in the drop-down menu on top;
3. Close the window. As before, no passwords are required.

[h3]Help! My character can't move![/h3]
Usually, anything like this means that you have an outdated mod, the developer(s) of which have most likely not yet gotten used to our preview systems, which allow them to prepare mod updates in advance before the stable branch is updated.
Disable all your mods, and re-add them one by one to figure out which one is causing the issues.
We're working on adding checks that would prevent enabling mods that use outdated/removed API features. This might be pushed to the stable branch later in the month, in a non-breaking way.

[h3]When will 1.4-stable become the default branch?[/h3]
We're hoping to do that in June, after some changes planned for later in May!
If nothing goes wrong, then that should be the date.
Worry not, 1.3 players - whenever this happens, the 1.3 TML versions will become available through a (new) 1.3-stable Steam Beta branch themselves.

[h3]When will 1.4 TML be 64-bit???[/h3]
It's already 64-bit!
For nerds' eyes only: Specifically, it's what's called AnyCPU, but we currently only ship x86_64 natives. In addition to TML being made 64-bit-capable, it has been made to run on a ten years newer runtime (.NET 6+), far newer versions of a better game framework (FNA instead of XNA), and we've even unified what would've been 6 Windows/Linux/Mac Client/Server builds into just one portable release that can be run on every Desktop OS.
Together, all of this yells: performance, consistency, stability, possibilities, and comfort. ːkag_flexː

[h3]Where can I find out more about the 1.4 Alpha?[/h3]
Be sure to join our Discord server to:
- Find out more info about the Alpha in #alpha-readme and [🤠TML 1.4 ALPHA] channels.
- Be notified about current and future noteworthy changes in 'preview' before they arrive on 'stable', via #alpha-update-log and #collaborators channels.
- Get help with TML issues and TML mod development in #alpha-support and #alpha-modding-help respectively.



This Steam post sure is late, we're still getting used to our new release schedules. ːSBchickenː