• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Begin your search for Journey's End information here and here. Please report bugs and issues for Journey's End here.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

Tool [Patcher] Terraria Tweaker 2 | SUPERCHARGE YOUR TERRARIA! (1.4 compatible!)

Gaelyte

Terrarian
Ok, some news for my plugins :
AsI needed the Transpiler for RecipeHelper to be a bit cleaner, I made a new version of TTPlugins.
In the new version, there are :
  • A new HPatchLocation, Transpiler
  • A weakening in this security plugin, because Harmony is needed if you want some Transpiler things, it is now allowed in levels 1, 2 and 3
  • Few new HHelper functions : ReplaceLines, RemoveLines and InsertLines
Also, note that with this version, Harmony is available in security levels 1, 2 and 3. If you don't want to allow it, security level 4 should prevent it, but I don't guarantee as much security as Tiberium
For the modders, if you use the Transpiler, you must precompile your project and set the security to at most 3
The code of this version is on GitHub here : Ishigh1/TTPlugins and the precompiled version is attached to this message

Also, because I wanted to test it, here's an other plugin to reduce the time needed to fish. It should 8 seconds at most to fish, with 1 fishing power or 666. (the .cs is here is you want to verify, but only the dll worked for me)

(The TTPlugins.dll should be put in your Terraria Tweaker 2 in order to work and the QuickFish.dll in your usual Plugins folder)
 

Attachments

TiberiumFusion

Official Terrarian
There's anyway for me to use this patcher with Tmod? I only want to use the "Don't Pause on lost window focus" Feature.... If so.. can you guys write me a 5 years old tutorial on how to do it?
Terraria Tweaker 2 only supports the official Stream release of Terraria. You can try to patch different versions of Terraria (such as tModLoader), but any compatibility is purely coincidental and there are no guarantees of performance. Go ahead and experiment, however, if you want to check if something is compatible. You'll never know if it works unless you give it a try.

is there a plugin or tweak that can make loot spawn with the best modifier?
for example looting a chest underground and it spawning with a godly melee weapon
Not currently, but you could create your own. Alternatively, you could use TEdit to change the contents of chests in your world, or simply use an item spawner or inventory editor if you're just trying to get good items.
 

TiberiumFusion

Official Terrarian
Also Tiberium, do you want me to do a pull request of my TTPlugins version or not ?
No thank you. For complex contributions, I may have the time to test and clean up the code, but that's too much managerial overhead for smaller contributions that I already have staged to produce myself. I will be adding Harmony transpilers to the plugin interface in a future release. I appreciate the gesture, though.
 

Mail

Terrarian
is there a plugin or tweak that can make loot spawn with the best modifier?

for example looting a chest underground and it spawning with a godly melee weapon
I made a plugin that is not exactly what you asked for, but close.

I disabled each modifier that was strictly worse than another modifier. I tweaked the odds of getting the overall "best" modifier to be 50% for all weapons, modifiers that offer tradeoffs take the remaining 50%. Accessories get their modifier upgraded if a better mod is available.

Melee weapons: Massive, Light, Ruthless or Legendary.
Drill, Chainsaw, Spear, Mace, misc: Ruthless or Godly.
Ranged weapons: Rapid, Hasty, Ruthless or Unreal.
Magic Weapons: Masterful, Ruthless or Mythical.
Yoyos, Boomerangs: Ruthless or Godly.
The Terrarian: Ruthless or Legendary (exclusive).

This mod does not take into account how knockback or crits don't work for certain weapons. It also does not consider how whips are bugged and might want a negative modifier. This mod will break on versions other than 1.4.0.x, since it individually lists every weapon in the game. This also means it will not work with plugins that add or change weapons.

Update: Updated to 1.0.0.1 with possible bugfix
 

Attachments

Last edited:

Trinx

Terrarian
shield.png



Is this a typo? The paladin shield's damage sharing is activated at all times when ABOVE 25%. If you, as the wearer, went below 25%, it's disabled.
It got me confused at first because I wanted to test and try to die by tanking full damage from another player, and the text made me unsure whether I was modifying the right option or not.
 

TiberiumFusion

Official Terrarian
View attachment 291120


Is this a typo? The paladin shield's damage sharing is activated at all times when ABOVE 25%. If you, as the wearer, went below 25%, it's disabled.
It got me confused at first because I wanted to test and try to die by tanking full damage from another player, and the text made me unsure whether I was modifying the right option or not.
Yeah, that's a typo. It will be fixed in the next update. Thanks for spotting that.
 

a2207680626

Terrarian
I made a plugin that is not exactly what you asked for, but close.

I disabled each modifier that was strictly worse than another modifier. I tweaked the odds of getting the overall "best" modifier to be 50% for all weapons, modifiers that offer tradeoffs take the remaining 50%. Accessories get their modifier upgraded if a better mod is available.

Melee weapons: Massive, Light, Ruthless or Legendary.
Drill, Chainsaw, Spear, Mace, misc: Ruthless or Godly.
Ranged weapons: Rapid, Hasty, Ruthless or Unreal.
Magic Weapons: Masterful, Ruthless or Mythical.
Yoyos, Boomerangs: Ruthless or Godly.
The Terrarian: Ruthless or Legendary (exclusive).

This mod does not take into account how knockback or crits don't work for certain weapons. It also does not consider how whips are bugged and might want a negative modifier. This mod will break on versions other than 1.4.0.x, since it individually lists every weapon in the game. This also means it will not work with plugins that add or change weapons.
I have to say that this plug-in works, but why has the weapon's damage changed? Such as bonus percentage?
 

Blitztein

Terrarian
I have to say that this plug-in works, but why has the weapon's damage changed? Such as bonus percentage?
The given plugin tweaks the weapon's ability to get more modifiers than the vanilla version. Because of this, weapons with 0 knockback (ie. Life Drain) can now get knockback modifiers (However, since it's based on percentage, the given weapon will still receive 0 knockback), when before, weapons like that aren't eligible to get the modifier. It was also mentioned that there are some weapons (whips) that are more favorable with negative modifiers (apparently slower speed = longer whip range), and this plugin reduces the chance of getting negative modifiers.
 

a2207680626

Terrarian
The given plugin tweaks the weapon's ability to get more modifiers than the vanilla version. Because of this, weapons with 0 knockback (ie. Life Drain) can now get knockback modifiers (However, since it's based on percentage, the given weapon will still receive 0 knockback), when before, weapons like that aren't eligible to get the modifier. It was also mentioned that there are some weapons (whips) that are more favorable with negative modifiers (apparently slower speed = longer whip range), and this plugin reduces the chance of getting negative modifiers.
It would be great if only the prefix of tinker was modified. Not too much
 

Mail

Terrarian
The given plugin tweaks the weapon's ability to get more modifiers than the vanilla version. Because of this, weapons with 0 knockback (ie. Life Drain) can now get knockback modifiers (However, since it's based on percentage, the given weapon will still receive 0 knockback), when before, weapons like that aren't eligible to get the modifier. It was also mentioned that there are some weapons (whips) that are more favorable with negative modifiers (apparently slower speed = longer whip range), and this plugin reduces the chance of getting negative modifiers.
I'm pretty sure my plugin does not allow modifiers that you could not normally get, or adjust the stats the modifiers give in any way.
My plugin was based on an exact copy of the decompiled the code that generates a random modifier for a weapon. I only removed bad modifiers from the code, then gave Legendary/Godly/Unreal/Mythical a few extra "rolls" in each category to ensure they are not rare in categories of weapon that have more modifiers.

I substituted in ItemIDs and PrefixIDs in place of numbers so that the plugin can be more easily understood and modified.

It would be great if only the prefix of tinker was modified. Not too much
The plugin code currently runs for any negative number, which is anytime a modifier is being generated.
The prefix function gets called with -1 to generate a random modifier, but with -2 when you use the goblin tinkerer.

If pre == -1, it is generating modifiers for found and crafted items.
If pre == -2, it is generating modifiers for the goblin tinkerer.
If pre == -3, it is checking to see if modifiers are valid on the item and tinker should be allowed. (I should have excluded this case from the plugin. Fixed in 1.0.0.1)
If pre == 0, it either trying to generate an item with no modifier, or loading an item with no modifier from your savefile.
If pre > 0, it is loading an item with an existing modifier from your savefile, or trying to generate an item with a specific modifier.

You can modify the conditions that the plugin code runs to:

Change modifiers for any item loaded by the game, including:
  • Detect specific bad modifiers on existing items loaded by the game and re-roll or reassign them.
  • Change specific weapons to specific modifiers each time the game loads them.
Change modifiers from the tinkerer:
  • Make a plugin that changes random modifiers but leaves the tinkerer unchanged.
  • Make a plugin that only changes modifiers when tinkering.
 

Mail

Terrarian
@TiberiumFusion , no idea of how to do ?
If you can't make it work with a prefix or postfix patch, the next step would be to try the Transpiler, but it is not currently supported in TTPlugins. "TTPlugins only uses a subset of Harmony's features which includes prefix patches, postfix patches, and all variable injection options. Transpilers, finalizers, and prepare methods are currently not available in TTPlugins."
 

Gaelyte

Terrarian
If you can't make it work with a prefix or postfix patch, the next step would be to try the Transpiler, but it is not currently supported in TTPlugins. "TTPlugins only uses a subset of Harmony's features which includes prefix patches, postfix patches, and all variable injection options. Transpilers, finalizers, and prepare methods are currently not available in TTPlugins."
Yeah, I included the transpiler in my TTplugins version but even that needs to treat the anonymous method, not the method calling the anonymous method
 

TiberiumFusion

Official Terrarian
Is there a way to patch anonymous methods ?
Of course. Find the method you want and pass a MethodInfo for it to CreateHPatchOperation(). There is no such thing as an "anonymous method" in IL. They are not much more than convenient C# language features.

I found where it was in ILspy, but <>c isn't recognized as a valid type
Different reflectors (and Cecil) may assign different human-readable names to the same IL types/methods/etc that are not the actual name of the object itself. Use Reflection itself to identify the class's qualified IL name.
 

illuminotit

Terrarian
Every time I attempt to launch terraria from the Terraria Tweaker program Mcafee prevents the launch claiming that it is a virus, is there a way I can rectify this?
 

TiberiumFusion

Official Terrarian
Every time I attempt to launch terraria from the Terraria Tweaker program Mcafee prevents the launch claiming that it is a virus, is there a way I can rectify this?
Add an exclusion for both Terraria Tweaker and Terraria to your McAfee settings. You can add an exclusion for Terraria.exe and each file in the Terraria Tweaker 2 install directory, or you could add an exclusion to the folder containing Terraria Tweaker and the folder containing Terraria. You'll have to consult the manual for your verison of McAfee to see which is possible/will work better.
 

Pixelnando

Steampunker
Hello, I recently tried out Gaelyte's Random Gen plugin, and discovered that custom seeds (even vanilla ones, like "not the bees") crash terraria, even when an empty tweak list is active. It works perfectly fine on vanilla. Here's the crash message I get:
1600175328731.png
 
Top Bottom