Ancient Warfare 2

Ancient Warfare 2

6M Downloads

[1.12] Editing and adding recipes to engineering table

SeriousCreeper opened this issue · 7 comments

commented

Heya,

was wondering if it's possible to edit and also add new recipes to the engineering table.
I read an older issue post here saying you could edit the CSV files (research_craft for example) to alter recipes. However it sounds like you would have to edit the jar files to accept those changes, which would be a problem for modpacks using curse launcher, as we can't ship an altered jar file (afaik).

Would this work through a texturepack or putting the changed files into the "resources" folder of the modpack? I tried both just now but maybe i didn't use the right structure and wanted to make sure first.

Also as an example, this is what i added to the "research_crafts.csv" (that i then put into both the resources/ancientwarfare/resources/" folder (to match the jar file) and also the resourcepacks/ancientwarfare/resources/" one:

engineering,minecraft:iron_sword,0,1, i , i , s ,i,iron_ingot,s,stick

Didn't seem to have worked though.

Cheers!
SC

commented

Thanks for the example!

I think config folder would definitely be better for modpacks. The stuff inside the world folder only really works if the pack comes with a premade map, or has a mod that loads default stuff into new worlds, or has the user copy it over (this one is never gonna happen hehe).

So yeah inside the config folder would be awesome!

commented

Actually I have changed how research recipes are stored. This is now very close to the recipe format used by minecraft - you can see examples here.

At the moment I don't have a way to override these outside of jar, but adding that shouldn't be too hard. However I am not sure what the best place would be for modpack makers. I could go with what vanilla is doing for loot tables and advancements (world/data/research_recipes/...) or put this in config folder (config/ancientwarfare/research_recipes/...). I am leaning towards config folder as that feels like easier thing to package in modpack.

commented

I have added this in the release that I just uploaded and that should hopefully be approved soon. Just when overriding these make sure that the folder structure (after config/research_recipes/) and the json name matches as these are used as a key for the recipes. If they don't that basically means you're adding another recipe to craft the same thing (which may be the case).

commented

Awesome thanks a lot! Will go test it :D

commented

Works like a charm! As a test i removed iron sword recipe using crafttweaker and added a new JSON file for it that requires the engineering table. Also modified existing AW2 recipes and all seems good.

Thanks a lot for this!

commented

Are the definitions in the .../research_recipes/_constants.json from the mod assets not available to recipes in config/ancientwarfare/research_recipes?

commented

No, they are not, you need to put that file in that folder in order to use it. Also, please join our discord as that’s easier to communicate through.