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 :
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)
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
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
Also Tiberium, do you want me to do a pull request of my TTPlugins version or not ?
Official Terrarian
I made a plugin that is not exactly what you asked for, but close.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 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
Update2: This mod is now broken for 1.4.1 due to weapon and prefix changes
Attachments
Last edited:
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.
a2207680626
Terrarian
I have to say that this plug-in works, but why has the weapon's damage changed? Such as bonus percentage?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.
Blitztein
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 have to say that this plug-in works, but why has the weapon's damage changed? Such as bonus percentage?
a2207680626
Terrarian
It would be great if only the prefix of tinker was modified. Not too muchThe 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.
Official 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.
- Make a plugin that changes random modifiers but leaves the tinkerer unchanged.
- Make a plugin that only changes modifiers when tinkering.
Is there a way to patch anonymous methods ?
I found where it was in ILspy, but <>c isn't recognized as a valid type
I found where it was in ILspy, but <>c isn't recognized as a valid type
@TiberiumFusion , no idea of how to do ?Is there a way to patch anonymous methods ?
I found where it was in ILspy, but <>c isn't recognized as a valid type
Official 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."@TiberiumFusion , no idea of how to do ?
Yeah, I included the transpiler in my TTplugins version but even that needs to treat the anonymous method, not the method calling the anonymous methodIf 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."
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?
Pixelnando
Skeletron Prime
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:
Rocketjay
Terrarian
Hello! Can Terraria Tweaker 2 be used with Tmodloader? I mean the Tmodloader application that you download from steam.
Pigman Δ
Retinazer
No, it cannot.
Well, technically, it will in some scenarios, but it is not officially compatible, so anything could happen if you tried it.
I'd recommend not trying it in the first place.
Well, technically, it will in some scenarios, but it is not officially compatible, so anything could happen if you tried it.
I'd recommend not trying it in the first place.
Pixelnando
Skeletron Prime
it works fine now. weird.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:View attachment 291987
Official Terrarian
I noticed that if I use the include statement: "using ReLogic.Graphics;" or "using ReLogic.Threading;" the mod will compile, but the Security Level Compliance will not compile. When this happens, it treats security level compliance as level 4. I think it should have a bright red warning instead of being grayed out on a failed security test compile. It took me a while to notice this was happening.
- Status
- Not open for further replies.
Similar threads
- Locked
- Replies
- 1
- Views
- 404
- Replies
- 4
- Views
- 432
- Replies
- 0
- Views
- 160
- Replies
- 170
- Views
- 22K
- Replies
- 110
- Views
- 8K
-
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.