The way I do it (using ILSpy), I look for the internal item names innow if only i could find the individual item stats in Terraria and i would be satisfied
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.It was the Slime Staff in its gooey glory, requiring 5 fallen stars, 30 gel and...
twenty iron hammers...
I did the thing wrong, they were using my Recipe Helper but due to a little mistake, AddAnyWood added Iron Hammers instead of WoodIt'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
Ah, ok. For my case though it was iron pickaxes and broadswords, looked kind of similar to that so I've linked it.I did the thing wrong, they were using my Recipe Helper but due to a little mistake, AddAnyWood added Iron Hammers instead of Wood
Just a quick suggestion, could you add a feature/function that would be able to remove an existing recipe (it would probably go likeNew 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)
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 editRecipeJust a quick suggestion, could you add a feature/function that would be able to remove an existing recipe (it would probably go likeRemoveRecipe(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.
yes yes YESI'll do this and even more : also add an editRecipe
Now I'm starting to see this plugin as feature-worthy on the upcoming unofficial plugin hub.I'll do this and even more : also add an editRecipe
*notices that he also forgot to really make the AddReverse function*
I think what addReverse does is add another recipe that is the 'reverse' of the original so: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?
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)))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 useannihilateremoveRecipe. 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.
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, lolNew 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)
I think the code forSorry, 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?
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