THIS THREAD IS RETIRED

Status
Not open for further replies.
Hey @deltaone , could you help me in adding recipes in my plugin? I tried intercepting SetupRecipes(), but I'm jist confused to how it got to add them in the first place (it's just some arrays then a function call).

I would say that I'm not an advanced programmer so there may be stuff I may be blind to, like standard libraries and such. Would be nice if you would help.
I not so deep in, but you could look into tModLoader sources ...

MaxStack Plugin update
30=>99 / 99=>999 / 999=>9999

Fixed TEdit - don't truncate stacks to 999
 

Attachments

  • MaxStack.cs
    1.5 KB · Views: 135
  • TEdit.zip
    2.3 MB · Views: 78
Last edited:
I not so deep in, but you could look into tModLoader sources ...
Yeah i checked, they have their own method only within TmodLoader to simplify the whole thing, so that took me into a hunt to find out a new way for myself. As of this post, there is no current information that highlights the inner-workings of tmodLoader's recipe system.
 
For the Plugin list, what about a github repo where everyone could add their Plugins with pull requests with some python program using a .json in each plugin folder to sort them in different categories ?

For the recipes, you should look at the last function so you can add a recipe this way :

C#:
//First, you should increment Recipes.maxRecipes by the number of the recipes added to be sure that you won't reach the 3000 limit
Recipe.currentRecipe.createItem.SetDefaults(itemId); //Set the result of the recipe
Recipe.currentRecipe.createItem.stack = quantity; //Set the number of results, optional
Recipe.SetIngredients(itemId1, nItems1, itemId2, nItems2...); //Set the ingredients, you can add as many ingredients as you want, following the pattern item_id, number of item needed
Recipe.SetCraftingStation(tileId1, tileId2...); //Set the tileId of the crafting station(s)
Recipe.AddRecipe();

And there you have your new recipe
 
does this work with GOG version? Because when i launch tweak's it just opens steam and does nothing else all of the checks say good except no GOG support?

Edit: NVM i found it, it was below in the tools section
 
The programming is probably beyond me, I don't have much patience with code, but if anyone is itching to make some plug ins to test the system but doesn't have any ideas I think a couple popular ones (if the system allows for it) would be one that allows world creation with both evils and a separate one (so people who want one but not the other) to generate worlds with both ore types. Sure, you could just use seed 05162020 but that comes with other changes to the game not everyone wants. Like the weird dungeon and the snow biome and jungle biome being on the same side of the map.

MaxStack Plugin
99 => 999 / 999 => 9999

P.S. 2 TiberiumFusion - please, make catalog of user plugins (with links to post) on first page, thx ...

I'm not sure if I have something configured incorrectly or if this just isn't working but I've got this installed and my torches are limited to 999.

Edit: Disregard, I accidentally skipped a step and didn't enable the plugin.
 
Pull requests have to be validated by repo owner or (specifically chosen) collaborators so it shouldn't be a problem, I'm sure that 1 or 2, maybe 3 people could easily verify each plugin made.
This would also make non experimented people less vulnerable to plugins.
I could make the first version of what I thought if this idea interest you, I think I could make a prototype in about one hour.
 
Sound alert plugin on rare mobs detected ...
Thanks! This is something i've always wanted.
I plan to eventually sit down and learn how to make plugins because I have several that I want, mostly involving adding hotkeys for new functions. I just haven't gotten around to reading all the tutorial material the author posted.
 
Whenevr i try to laucnh terarria with my tweaks my PC turns off anyone knows why?
Edit: Fixed the issue but my game crashes whenever i ty to spawn an item or NPC
 
Last edited:
Whenevr i try to laucnh terarria with my tweaks my PC turns off anyone knows why?
Edit: Fixed the issue but my game crashes whenever i ty to spawn an item or NPC
Make sure that you're doing the command correctly, since it automatically crashes on "dirty inputs". I don't understand what happened to your pc though, but I'm glad to hear that it's ok now.
 
Regarding the tweak, "Show Chest Names on Chests", the additional hotkey feature to be able to toggle between enabled and disabled; is that only for the when "Show all chest names" is checked? Or is it by chance also meant to toggle even while only 1 or both of the 2 options above is checked ("Show names near player" & "Show names near mouse") ?
 
Make sure that you're doing the command correctly, since it automatically crashes on "dirty inputs". I don't understand what happened to your pc though, but I'm glad to hear that it's ok now.
not sure how the command is done properly
can you tell me how to type them? as well the NPC spawner and event one
because i write /item Dirt Block 1 and it crashes maybe im doing something wrong
 
not sure how the command is done properly
can you tell me how to type them? as well the NPC spawner and event one
because i write /item Dirt Block 1 and it crashes maybe im doing something wrong
Ah I see. For reference, you are supposed to type the command like this (/item <item id> <amount(optional>)) If you don't know where are the instructions located for the command-oriented tweaks, they can be found right next to the tweak when you click on the "view" button, it's highlighted in blue, you can't miss it. What you were doing was to put the item name instead of the item id, which are 2 different things (Example: "Life Crystal" is the item name, but the corresponding item id is "29"). You can look online for a list of item id's for reference.

By typing in something that the tweak is not made to understand (Item id's that doesn't exist, or anything else that doesn't look like an item id), you are doing what the tweak calls as a "dirty input", and thus as the warning says, crashes the game (I hope @TiberiumFusion makes something like a catch statement to mitigate this once he starts making tweaks again).

(Fellow Tweaker Here)
 
Ah I see. For reference, you are supposed to type the command like this (/item <item id> <amount(optional>)) If you don't know where are the instructions located for the command-oriented tweaks, they can be found right next to the tweak when you click on the "view" button, it's highlighted in blue, you can't miss it. What you were doing was to put the item name instead of the item id, which are 2 different things (Example: "Life Crystal" is the item name, but the corresponding item id is "29"). You can look online for a list of item id's for reference.

By typing in something that the tweak is not made to understand (Item id's that doesn't exist, or anything else that doesn't look like an item id), you are doing what the tweak calls as a "dirty input", and thus as the warning says, crashes the game (I hope @TiberiumFusion makes something like a catch statement to mitigate this once he starts making tweaks again).

(Fellow Tweaker Here)
i see then, thanks for telling me this now i can abuse my power and probably corrupt my world : D
 
Tiberium, could it be possible to also patch TerrariaServer while patching Terraria ? It's nearly the same assemblies
 
The problem I see for now and the "pastebin" solution is that you spend hours, maybe days for complex ones to make a plugin and you don't know if someone will notice it, this doesn't encourage anyone to make plugins

I know it's a client patcher, I was just asking if it was possible to make it so it could also tweak the server (with an update)
(I'm making a plugin that allows the nurse to kill you but it's buggy in multiplayer because the server doesn't handle the special death)
 
Before posting an issue/bug, you advise to do a reinstall if the issue hasn't already been documented. I'm assuming the tweak lists won't be removed, as they're stored in AppData but just wanted to confirm? Also, if for whatever reason the tweak list files were deleted from AppData, would a backup only need to be dropped back into the folder and would then be read properly by TT2? Or do they have to be built with the program? Thanks

EDIT:
@ TiberiumFusion

Thanks for the reply, and yeah i figured it was highly unlikely a reinstall would affect situation (possible bug) i'm experiencing. It is regarding the tweak "Show Chest Names on Chests". Problem is that i cannot get the hotkey setting to work.

I've disabled the 2 upper settings ("Show names near player" & "Show names near mouse"), though not sure that even matters, and also made sure the bottom setting "Show all chest names" was checked. And ofc, the Hotkey Toggle set to "Enable".
I've tried changing the activating hotkey (always without a modifier) and also tried having none of the above settings checked (only the hotkey toggle set to enable). In game, pressing the hotkey never removes the names from all the chests.
 
Last edited:
Before posting an issue/bug, you advise to do a reinstall if the issue hasn't already been documented. I'm assuming the tweak lists won't be removed, as they're stored in AppData but just wanted to confirm? Also, if for whatever reason the tweak list files were deleted from AppData, would a backup only need to be dropped back into the folder and would then be read properly by TT2? Or do they have to be built with the program? Thanks
Plugins are built in the program, so you don't have to worry about the roaming folder
 
Flashlight plugin:
Left Alt (hold) - flare on cursor
Left Alt + Num pad 0 - toggle torch on player


LoadoutSwap plugin:
Left Alt + W - exchange social slots with armor slots
 

Attachments

  • Flashlight.cs
    2.1 KB · Views: 102
  • LoadoutSwap.cs
    1.5 KB · Views: 146
Last edited:
Flashlight plugin:
Left Alt (hold) - flare on cursor
Left Alt + Num pad 0 - toggle torch on player
Left Alt + Num pad 1 - toggle flare on cursor
 

Attachments

  • Flashlight.cs
    2.2 KB · Views: 231
Status
Not open for further replies.
Back
Top Bottom