THIS THREAD IS RETIRED

Status
Not open for further replies.
How can I make the recovery potion have no cooling time and use it all the time, which function is it?
Potion sickness is BuffID.PotionSickness (21) You can use a prepatch to stop the potionsickness buff from ever being applied.

Something like this:
Code:
...
using Terraria.ID;
...
public override void PrePatch() {
    CreateHPatchOperation("Terraria.Player", "AddBuff", "BeforeAddBuff", HPatchLocation.Prefix);
}
...
public static bool BeforeAddBuff(int type) {
    if(type == BuffID.PotionSickness) return false;
    return true;
}
 
Potion sickness is BuffID.PotionSickness (21) You can use a prepatch to stop the potionsickness buff from ever being applied.

Something like this:
Code:
...
using Terraria.ID;
...
public override void PrePatch() {
    CreateHPatchOperation("Terraria.Player", "AddBuff", "BeforeAddBuff", HPatchLocation.Prefix);
}
...
public static bool BeforeAddBuff(int type) {
    if(type == BuffID.PotionSickness) return false;
    return true;
}
thanks
 
Bug report
TT2 version: 2.3.1411.0
Terraria version: 1.4.1.2 from Steam
TTApplicator version: 1.2.1411.0
Flavor: Official Release
TTIO version: 1.0.0.0
TTPlugins version: 1.1.0.0
Released: October 17, 2020

Problem: Catching a Frog leg in the dungeon used my Master Bait while having infinite ammo tweak on.

Expected result: No Master Bait used
 

Attachments

  • Tweaks.png
    Tweaks.png
    218.4 KB · Views: 110
I wonder If you will ever update or upload some "fixes" for the program? I wanted to give it another shot and after a short while only with the Happiness. Remove Pylon Restrictions. Screenwide Place and Pickup Range plugins I encountered a pretty annoying bug that stopped counting kills in my world for monsters. And now the Tweaker is unable to save my new list, probably need to re-install it completely, I don't know It's kinda sad that the updates of Terraria trouble that program so much since 2-3 Tweaks are so nice to have, specially the Pylon Restriction one

Edit: I removed Invincible Town NPC's since it is using the special patching method with the "H" tag and will now only use Screenwide Place/Pick and No Pylon Restrictions. Kill Count works again.

Edit 2: I have no idea what causes it. Sometimes with other Tweaks it works, and suddenly it stops. Maybe it has something to do with Journey Mode Power's or something. I have no idea.
 
Last edited:
I wonder If you will ever update or upload some "fixes" for the program? I wanted to give it another shot and after a short while only with the Happiness. Remove Pylon Restrictions. Screenwide Place and Pickup Range plugins I encountered a pretty annoying bug that stopped counting kills in my world for monsters. And now the Tweaker is unable to save my new list, probably need to re-install it completely, I don't know It's kinda sad that the updates of Terraria trouble that program so much since 2-3 Tweaks are so nice to have, specially the Pylon Restriction one

Edit: I removed Invincible Town NPC's since it is using the special patching method with the "H" tag and will now only use Screenwide Place/Pick and No Pylon Restrictions. Kill Count works again.

Edit 2: I have no idea what causes it. Sometimes with other Tweaks it works, and suddenly it stops. Maybe it has something to do with Journey Mode Power's or something. I have no idea.
Tiberium has mentioned it before. But since recent updates, Terraria has had a lot of voodoo RNG code that makes some functions of TT2 work less well than others. It's random whether this happens or not.
 
Is the crashing specifically a memory allocation failure or is there something else causing problems?
It may be possible to patch the loading process to be more deterministic.
The the game might be able to have a patch to treat AssetRequestMode.AsyncLoad as if it were AssetRequestMode.ImmediateLoad for all files during startup to make loading more consistent.
 
Weird, the game crashes if enabled hotkey tweaks, like instant teleport, void bag and magic mirror hotkeys, etc. I hope it will not last forever...

I noticed the same thing. But hadn't reported it yet because I hadn't tried to re-enable one at a time the one's I use. I have the crafting guide one working (left ctrl-G) but void bag, money trough ones and one other that I had set up were crashing the game.
 
I see where you said the game suddenly starts working if you launch it often enough.

This doesn't seem to be the case for me. The game crashes prior to starting when the hotkey tweaks are enabled and launches fine when those tweaks alone are disabled. It's reproducible, at least on my end.
 
it will crash if you enable anything with H or HH

(note, some may work but i feel its safe to say H or HH tweaks have a 75% chance to crash, i have most of the non-H/HH tweaks and it works)
 
I think that most of the asset loading can be made deterministic with just a few changes. The function ReLogic.AssetRepository.Request takes a mode argument that determines if assets are loaded asynchronously. I would suggest patching this function to always replace AssetRequestMode.AsyncLoad with AssetRequestMode.ImmediateLoad during startup. AsyncLoad might need to be allowed during gameplay to avoid stutters when loading achievement popups, etc.

I've included the suggested changes as a plugin.

I'm not sure exactly how the music memory usage compares before and after the changes, but largest memory allocation size made by the game is no longer ~200MiB due to audio streaming being enabled. Memory fragmentation was preventing very large allocations from succeeding. Severe memory fragmentation and high peak memory usage are probably still present during loading, but without mods it seems to be below the threshold of breaking the game, even for people on low end hardware. A 64-bit build of the game would solve any memory fragmentation issues.

I haven't seen that crash. I'll have to try some more aggressive patching to see if I can reproduce it.

I'd like to know if anyone with random crashing issues notices any improvement with this plugin.
 

Attachments

  • LoadNoAsync.cs
    1.9 KB · Views: 180
Heyo, I just wanted to let you guys know that potion sickness tweak doesn't work in TT2 ver. 2.3.1411.0 for Terraria ver. 1.4.1.2. Not sure about mana sickness but health potion sickness doesn't work 100% sure. I know that current version of TT2 isn't 100% compatible with 1.4.1.2 but I think you'd like to know so you could fix that for the next version. Cheers!
 
on a side note... i kinda... wanna know if someone can make a plugin that adds veinminer, i know its possible because there is a really old version called "Recursive Pick" and i kinda want to ask for someone to update/make a new plugin for this.
 
ive been playing for a while and decided to use terraria tweaker. my friend tried to set it up but now i have this error message-
please help if you can :)))
 
Are you able to update the inventory enhancements plugin found here?
There might be an already partially updated version from Terraria Patcher here

The feature I'm most interested in is the custom sorting that's significantly cleaner than Terraria's default sorting.

Thank you in advance if you attempt this!
 
I tried to use it, and it says "Could Not Write patched Terraria.exe to disk. (Destination) is either locked by another process or is inaccessible.

(also, Tweak ID 1102, 1107, 1105, 1100, 2133, 2103, 2120, 3300, and 3304 won't work)
 
I tried putting it together myself, but I lack the coding experience to convert even just the sorting into a working multiplayer plugin.

Even though you specified "I will not replicate it on the principle of 'updating' things", does that extend to making your own version of this singular feature?

Edit: Also, I don't get much of a chance to continue working on it because TT2 will continuously give me the following error:
1607462636942.png

This error only shows up after I start typing at all, and even extends to other plugins somehow.
For example, I could be working on my plugin, test and see the error there, leave to test one of the example plugins, and the error will show up again.
The error will only disappear after I restart the entire program, which is pretty time consuming since I need to test often from my lack of experience.

I've reinstalled .NET and even installed the version of .NET that you suggested trying in earlier replies, but for one reason or another it just won't work.

If you decide not to make the sorting function for me, please consider putting it on your list of things to do any time in the future.
 
Last edited:
Status
Not open for further replies.
Back
Top Bottom