THIS THREAD IS RETIRED

Status
Not open for further replies.
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

  • TTPlugins.zip
    41.6 KB · Views: 161
  • QuickFish.cs
    3.2 KB · Views: 185
  • QuickFish.zip
    2.3 KB · Views: 109
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
Update2: This mod is now broken for 1.4.1 due to weapon and prefix changes
 

Attachments

  • BestPrefix.cs
    18.4 KB · Views: 261
Last edited:
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.
 
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?
 
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.
 
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
 
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.
 
@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."
 
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
 
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?
 
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
 
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.
 
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.
Back
Top Bottom