THIS THREAD IS RETIRED

Status
Not open for further replies.
New version of Recipe Helper (new function AddReverse() that allows to make a reverse recipe quickly) and also made a documentation (I didn't do it first because I never read docs)
 

Attachments

  • RecipeHelper.cs
    7.6 KB · Views: 92
  • RecipeHelperDoc.txt
    3 KB · Views: 102
Oh, no, I wasn't saying they were bad or anything, I was just commenting on the fact that it was harder than I am used to. It is a great application, it works very well.
now if only i could find the individual item stats in Terraria and i would be satisfied
 
I may have forgotten a pesky ";" and made a confusion between an iron hammer and some wood, but here's the patched version of RecipeHelper (thanks @pigman065)
 

Attachments

  • RecipeHelper.cs
    7.6 KB · Views: 106
No problem
I had made a Slime Staff recipe needing 20 wood, 5 fallen stars and 30 gel and I started terraria.
Then I looked through the Wood recipes using the guide and it wasn't there.
And then I decided to check the Gel recipes, and lo and behold, there was the Slime Staff in its gooey glory, requiring 5 fallen stars, 30 gel and...

twenty iron hammers...
 
now if only i could find the individual item stats in Terraria and i would be satisfied
The way I do it (using ILSpy), I look for the internal item names in SetDefault1() to SetDefault5() (for some weird reason, it's not in one whole method), then manipulate some fields, if there are some special uses (like parrying), I just select analyze (right-click on a variable) to check what other methods utilize that variable that contains the extra stats.

If you only want to see the stats, I recommend looking at the Terraria wiki for a list of items/weapons.

It was the Slime Staff in its gooey glory, requiring 5 fallen stars, 30 gel and...

twenty iron hammers...

That's pretty much a bug in Terraria (assuming that you did nothing wrong). I experience stuff like that when I do something the game doesn't expects (changing aiStyles to something obscure, entirely skipping some mechanics, etc.).

You could fix it by adding an if statement to search and destroy anything that isn't in the recipe
 
Last edited:
It's pretty much a bug in Terraria (assuming that you did nothing wrong). I experience stuff like that when I do something the game doesn't expects (changing aiStyles to something obscure, entirely skipping some mechanics, etc.).

You could fix it by adding an if statement to search and destroy anything that isn't in the recipe
I did the thing wrong, they were using my Recipe Helper but due to a little mistake, AddAnyWood added Iron Hammers instead of Wood
 
I did the thing wrong, they were using my Recipe Helper but due to a little mistake, AddAnyWood added Iron Hammers instead of Wood
Ah, ok. For my case though it was iron pickaxes and broadswords, looked kind of similar to that so I've linked it.



@TiberiumFusion

I have some suggestions regarding the plugin:
- Adding a checkbox to include stuff like unneeded comments would be helpful so we don't have to remove those while cleaning up our code

- Is it possible to convert the Maximum Security Level Common Denominator into a code for debug (and probably also have a checkbox to include it as an option) so that the security feature could be utilized even with other text editors when compiling? If you're on with the idea, you probably should consider only adding the security compliances without the details as to not make the code clunky.

Also, this may have been brought to your attention, but the compilation process with the "Test Tweak" doesn't work, at least it doesn't consistently work though. When the bug does occur, the compiler fails the result, with the error of "the file is used by another process" or somewhere along those lines . . .
Will be further examining the bug, but due to its inconsistent nature, I have not been able to repeatedly reproduce the error using the same code. I'm also not sure what's in the code that may have been a factor to cause the error for me and other people, but it seems like this is a compiler bug.
 
Last edited:
New version of Recipe Helper (new function AddReverse() that allows to make a reverse recipe quickly) and also made a documentation (I didn't do it first because I never read docs)
Just a quick suggestion, could you add a feature/function that would be able to remove an existing recipe (it would probably go like RemoveRecipe(int itemId);)? I hope I could make this myself, but I'm not-so-good at removing or replacing the existing bodies of a class.
 
Just a quick suggestion, could you add a feature/function that would be able to remove an existing recipe (it would probably go like RemoveRecipe(int itemId);)? I hope I could make this myself, but I'm not-so-good at removing or replacing the existing bodies of a class.
I'll do this and even more : also add an editRecipe
*notices that he also forgot to really make the AddReverse function*
 
Last edited:
I'll do this and even more : also add an editRecipe
*notices that he also forgot to really make the AddReverse function*
Now I'm starting to see this plugin as feature-worthy on the upcoming unofficial plugin hub.

Also, I don't quite understand the AddReverse function even with the doc's explanation. Can someone elaborate?
 
Now I'm starting to see this plugin as feature-worthy on the upcoming unofficial plugin hub.

Also, I don't quite understand the AddReverse function even with the doc's explanation. Can someone elaborate?
I think what addReverse does is add another recipe that is the 'reverse' of the original so:
Say you added a recipe for 1 Bee Wax that needs 5 hive blocks.
Calling addReverse on the recipe adds a second recipe that creates 5 hive blocks using 1 bee wax.

EDIT: Also, I thought of a way to use annihilate removeRecipe. Simplifying the Queen Bee summon (really who even crafts that) but for now I'll settle with adding another recipe for it and just ignore the old one.
 
I think what addReverse does is add another recipe that is the 'reverse' of the original so:
Say you added a recipe for 1 Bee Wax that needs 5 hive blocks.
Calling addReverse on the recipe adds a second recipe that creates 5 hive blocks using 1 bee wax.

EDIT: Also, I thought of a way to use annihilate removeRecipe. Simplifying the Queen Bee summon (really who even crafts that) but for now I'll settle with adding another recipe for it and just ignore the old one.
Well you could also modify it with the new fonction (and you're right for the addReverse (even if it won't work before the 1.1 (at least)))
 
New version of Recipe Helper (new function AddReverse() that allows to make a reverse recipe quickly) and also made a documentation (I didn't do it first because I never read docs)
Sorry, only AFTER i asked that it ocurred to me to check the code of the mod and find about the AnyIron and the others, also, i was needing the reverse recipee option as well so now i'm doubting if you read my mind, lol
Edit: compiling them in TT2 returns an error in the new AddReverse function (192,26), saying that "not all code paths return a value", is this safe to ignore?
 
Last edited:
Sorry, only AFTER i asked that it ocurred to me to check the code of the mod and find about the AnyIron and the others, also, i was needing the reverse recipee option as well so now i'm doubting if you read my mind, lol
Edit: compiling them in TT2 returns an error in the new AddReverse function (192,26), saying that "not all code paths return a value", is this safe to ignore?
I think the code for AddReverse() isn't yet complete; the current one will cause an error, and will be skipped by the patcher. If you still want to use it, you could remove the function itself, if you're not using it that is
 
I solved all the issues, added the body of AddReverse, added a way to edit and delete recipe, I only have one thing to do before sending the file here... Make it work...
But at least, I don't have any error :p
 
You guys need to do something about bigger stacks tweak, all instruments, accessories, and money can now stack up to 9999, so money don't become bigger itself, only with craft, and accessories are losing their prefix when stacked, instruments and weapons too... But i need it for other materials.
 
It seems to finally work, so I added the recipe.AddReverse(), ExistingRecipe.DeleteRecipe(itemId).
You can also select an existing (plugin or not) recipe with new ExistingRecipe(resultItemId), reselect the result, add some ingredients and crafting stations with the usual SetResult, AddIngredient and AddCraftingStations, modify the amount needed and/or change it with EditIngredient(originalIngredient,(optional) newIngredient, (optional) new quantity), remove one with RemoveIngredient(itemId) and finally be more acurate with your selected recipe with AddIngredientCondition(itemId) (because ExistingRecipe will modify every recipe that respects the given conditions)
(My plugin also nearly doubled of size)
 

Attachments

  • RecipeHelper.cs
    13.6 KB · Views: 104
Last edited:
I'm only going to elaborate for the first suggestion (the comment-thing) since I think it's a lot more probable than the others. To summarize, there's going to be an option in the plugin setup/wizard to optionally include comments upon the plugin's creation, so that plugin authors won't have to manually remove them once the plugin code is made.

I appreciate your feedback on my suggestions; I may sometimes think of something to be simple, yet don't know what would make it complicated, or unclear. You pretty much know of of what's ahead due to your extensive knowledge, in comparison to me.
 
Last edited:
Status
Not open for further replies.
Back
Top Bottom