Description

This improves crafting system A LOT (e.g. no components/tools or multiple random notes required for unlocking etc.) but is mostly framework for modders. Also improves note reading UI and PDA encyclopedia for players.

Preview
[1.5.1/1.5.2] Banjaji's Crafting system improvements v4.4
Post comment Comments  (0 - 50 of 95)
Banjaji Author
Banjaji - - 389 comments

[Notice board]

As of July 2022 I will be away from modding. I estimate the order of magnitude of my leave to be 6 months. In the mean time if something breaks then anyone proficient enough can take over/ make patch-mods.

Updated to v3.0. This is a full remake/improvement of the mod with my experience from the past 4 months. Now the mod seems actually useful. Read the mod description because a lot changed in v3.0!

Original section numbers are -500, -400, -300, -200, -100 and 0 (eg. [craft_-500]). By the way you can scroll the different recipe tabs with mouse wheel.

Known mods that use this system and their section numbers:
* -7617...-7621: Moddb.com
* 69...71 reserved by me for my potential crafting mod

Reply Good karma+4 votes
Banjaji Author
Banjaji - - 389 comments

[Notice board cont.]
Can't edit old comments. Please don't reply under here to keep it tidy!

Updated to v4.0. This is a HUGE update and requires a clean install. Also make sure to read everything again. Also recipe format is changed again and new format isn't compatible with v3.x recipes.

Reply Good karma+3 votes
Torch90
Torch90 - - 22 comments

Hi. Great idea.
Can you post an image to a working ltx file? Because i"m not a modder and i tried to make a test file but for some reason it fails.No CTD but no new recipe.

I tried craft_teszt.ltx and craftteszt.ltx filenames.

Here's what i tried:

[100]
title = TesztCraft
x_wpn_axe = 1, recipe_basic_0, prt_i_scrap,4,prt_i_wood,1

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Note: as of v3.0 this example won't work! See the mod description!

Hmm... I can get it working just the way you tried (filename has to be craft_teszt.ltx). I added a test folder to the download. My guess is that you refreshed the game in debug mode. Sometimes (actually lately all the time - might be because my mod is using separate files) the changes in the recipe book only apply if I restart the game (the whole program). By the way it was my first mod and it started from the same thing you're doing.

Reply Good karma+2 votes
Torch90
Torch90 - - 22 comments

With the new file system solution, there was no recipe.

I use MO2 but now I copied everything into place by hand. And it doesn't work that way too.

I think the problem is with my isntalled game. My gamedata direcrory is empty and no file conflicts. I blocked files that overwrite yours. (In MO2)

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Note: as of v3.0 this example won't work!

I debugged your situation by installing MO2. For reference MO2 is "Mod Organizer 2". I used this tutorial: Lazystalker.blogspot.com. I renamed my "gamedata" folder in Anomaly main folder, effectively uninstalling all (manually) installed mods.

With a little tweaking I got my mod working with MO2. The only thing I mustn't do was to install new mod manually (lower "manual" option of this: Drive.google.com). Otherwise MO2 detected my folder structure correctly and installed the mod.

So:
* Install my mod and the test like this: Drive.google.com.
* If it installed incorrectly the filetree (double click on the mod) will look like this: Drive.google.com.
* If it is installed correctly the filetree will look like this: Drive.google.com.
* In the end MO2 should look like this: Drive.google.com. Here I installed base mod and test separately so you can remove the test recipes afterwards easily. In order for mods to work you have to start the game by clicking on the "run" button in MO2.
* Now the test recipes are showing in the game like this: Drive.google.com.

Reply Good karma+2 votes
volkermord
volkermord - - 84 comments

Very nice idea.

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Mod "DLTX - Differential LTX Loading" might actually fix or alleviate the problem of overwriting existing recipes in the "craft_original.ltx" without modifying the file itself. I'll look into it someday (not soon). Also note to self: item_recipe.script contains similar code to ui_workshop.script, why does my mod work?

Reply Good karma+2 votes
Banjaji Author
Banjaji - - 389 comments

It looks like item_recipe.script isn't called anywhere. I deleted its contents and nothing happened. I think that script was written to look at recipes when not using a vice but it didn't get implemented.

Reply Good karma+2 votes
Banjaji Author
Banjaji - - 389 comments

Updated to v2. Now you can add recipes that don't require any toolkits. Simply write the toolkit number as 0 in the recipe.

Note: as of v3.0 it's better to just leave the field empty instead of writing 0.

Reply Good karma+2 votes
Banjaji Author
Banjaji - - 389 comments

Okay I looked DLTX up and found out that this mod is still diferent. Basically only thing that is redundant in my mod if you use DLTX is splitting original recipes into multiple files. That part doesn't apply anymore in v3.0.

Reply Good karma+2 votes
Darkenneko
Darkenneko - - 206 comments

Hey!
I really enjoy what your mod brings to the table and the possibilities it will provide. I've downloaded it myself and played around for a bit and it's awesome. I'll be working on recipes and it really makes it easy to just input into the game.

That being said, did you have any plans to recreate something similar for Cooking?

Thank you for your time and contributions!

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Thanks! I'm glad you like it.

I haven't seen a need for it since I haven't touched cooking much. Also file and section conflicts can be avoided (or eased) with DLTX ( Moddb.com ). Since cooking is built differently (no tabs in a book) then there's only one section to work with anyways. And there's only few recipes in vanilla so again DLTX eases conflicts and makes adding new stuff easy. If you want an example of it then my recent mod has also a DLTX version so you can study the syntax ( Moddb.com ).

In case you want to add recipes then simply modify the first 2 symbols "x_". Eg. "y_" will make it possible to have 2 recipes for the same item.

The problem currently is with being able to use only 2 ingredients but it might be hardcoded with the UI (might or might not). Or is there something more you think that would be awesome to have?

Reply Good karma+2 votes
Darkenneko
Darkenneko - - 206 comments

Honestly,
If we could add more sections and maybe change the UI so we could include more ingredients (maybe just use the same UI menu for crafting) that way we could include more cooking and variations.

I'm going to try looking into DLTX, I'm sort of an old-school stalker modder, so we'll see, normally WinMerge doesn't do me wrong.

Also, I just noticed this, but with your mod, reading any of the recipes doesn't actually show the recipes on the page or in the PDA, just blank.

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Changing UI is uncomfortable and I don't have experience in it. I don't really want to touch it and would rather leave it for Anomaly developers. I might look at more sections amount part but that will be after a long time since I have other priorities now.

One way to have more variety is to use crafting menu with cooking items. There you can have up to 4 items and I have made new intermediate items (eg. forge and lit forge) that help to fit even more items into the recipe. The only problem is with crafting consuming the item (problem with multi-fuel stove). This can actually be alleviated with a script that spawns a new stove in your inventory after crafting.

What do you mean by reading recipes? Do you mean like reading "Mechanics manual" and therefore unlocking new crafting options? I tested just now with all different recipes and I didn't see any issues. The notes also appeared in the PDA. I did test it with just my mod and nothing else. Maybe you can pinpoint what other mod causes the problem in combination with my mod? Then I could debug it further.

Reply Good karma+2 votes
Banjaji Author
Banjaji - - 389 comments

As of v3.0 you can use any item as a tool. That means you could use fieldcooker instead of a tool kit and it won't get deleted on crafting. This means you can have up to 4 components in the cooking recipe if you use workshop crafting menu.

I advise you to read the mod description again since I made major changes in v3.0.

Reply Good karma+2 votes
unwary
unwary - - 54 comments

Nice, I'll definitely use this when I go back to stalker and change up my survival crafting mod for it.

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Well would you look at that! I made this mod because I was trying to merge some of my own recipes with your mod.

Reply Good karma+2 votes
unwary
unwary - - 54 comments

I tried updating and noticed I have a ui_workshop.script compatibility issue with Weapon/Outfit Parts overhaul. It's beyond my potato winmerge skills :(

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

You can look at the problem again. I updated to v3.0 in which I added a monkeypatch that modifies ui_workshop.script's crafting part. It might be that this mod is enough for yours to work but if not then you can learn monkeypatching from my script and do it yourself. The good thing about monkeypatching is that if WPO doesn't modify crafting functions then the 2 mods don't conflict. But if you do it that way then please read this: Moddb.com.

However, I advise you to read the mod description again since I made major changes in v3.0.

Reply Good karma+2 votes
Banjaji Author
Banjaji - - 389 comments

Updated to v3.0. This is a full remake/improvement of the mod to the extent that I renamed it. I didn't add a DLTX version since the mod changes original recipe tab sections and I want the old ones deleted in a foolproof way.

Now you can have custom amount of output item, can have any item as a tool and don't need tool kit, recipe note and/or no components (this example would be a free spawner).

Since this version reworks many aspects including how to add new recipe tab sections and new recipes under the sections. I advise you to read all of the mod description again. Also the "Test - example recipes" folder has a file to use as an example. I commented stuff there so you can study the recipe format there.

Reply Good karma+2 votes
hiipandanaserver
hiipandanaserver - - 60 comments

Used the new system to cook multiple low tier mutant meats.

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Glad it's useful!

Reply Good karma+2 votes
unwary
unwary - - 54 comments

Nice work, finally went back to updated my mod with your overhaul. Only odd bug is recipe books not properly showing learned recipes on the ui, a tiny annoying bug but you still learn recipes just fine.

Reply Good karma Bad karma+3 votes
SniperHellscream
SniperHellscream - - 981 comments

Hello friend, how can I add item combination recipes in this plugin, it is to make this compatible with EFT Modular Helmets Moddb.com

Reply Good karma Bad karma+2 votes
Banjaji Author
Banjaji - - 389 comments

If you want to add item combination recipes you can either directly copy-paste and then edit craft.ltx file which comes with this mod or you can create a DLTX file and overwrite craft.ltx with that through DLTX. The section in question is "item_combination" which is in the end of craft.ltx.

Reply Good karma+3 votes
unwary
unwary - - 54 comments

Say, how hard would it be to add a secondary toolkit requirement for some recipes? Like you need both an basic toolkit and a hunter's knife to construct a hide. I could add the knife as a part of the recipe but then it gets consumed in the process.

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

It would be a pain to script it in the ui_workshop.script since it would need a change in GUI itself. I don't have experience with xml files and actually adding new elements from scratch. Otherwise from gameplay perspective you'd need to add an if check and modify the recipe format (probably making vanilla recipes incompatible).

I suggest that you add an intermediate recipe. Eg you use the knife to make an item "hide strips" from a hide that has no other purpose than act as a crafting component. And then craft the final hide with the tool kit from the hide strips and a second hide.

Reply Good karma+2 votes
Banjaji Author
Banjaji - - 389 comments

As of July 2022 I will be away from modding. I estimate the order of magnitude of my leave to be 6 months. In the mean time if something breaks then anyone proficient enough can take over/ make patch-mods.

Reply Good karma+2 votes
SniperHellscream
SniperHellscream - - 981 comments

Hello friend, I get a spam of this message in the console sometimes when I make ammo or some other item

~ ------------------------------------------------------------------------
~ STACK TRACEBACK:

... _g.script (line: 2189) in function 'alife_release_id'
... ui_workshop_monkeypatch_banjaji_crafting.script (line: 558) in function <... ui_workshop_monkeypatch_banjaji_crafting.script:548>
~ ------------------------------------------------------------------------
!ERROR: alife_release | no server object!
~ ------------------------------------------------------------------------

Reply Good karma Bad karma+3 votes
unwary
unwary - - 54 comments

What exact item are you using? I've never had that issue. I've been working on compatibility patches for Hideout Furniture, GAMMA's Ammo Maker, and a custom Flaregun for the Flares DLTX addon. So far Banjaji's code has been solid.

Reply Good karma Bad karma+2 votes
Banjaji Author
Banjaji - - 389 comments

This seems to be vanilla code which throws the error. My guess is that you have another mod conflicting or there's a crafting recipe error. If you can reproduce the error with specific steps then let me know!

Reply Good karma+2 votes
SniperHellscream
SniperHellscream - - 981 comments

It just happens when you quickly create items any item. something else that happens, and excuse my ignorance, maybe this is intentional. but it is that I cannot use more than 4 articles to create an object for example. If I make a recipe to create Vodka and in the file I write 1 bottle of mineral water and 5 psy protection pills for the creation recipe. In the game it tells me that I need 4 pills, not 5 and this happens with all the objects, even if I write 10, it always requires 4 in the game

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

I can't replicate your bug. I created the recipe as follows:
"
x_vodka = 2,,, mineral_water, 1, drug_psy_blockade, 5
"
That means you get 2 bottles of vodka (6 sips) without tools, without recipe, for 1 sip of mineral water (1/3 of the item) and 5 uses of psy pills (one item). Everything worked as expected. I clicked through crafting fast (you mentioned quickly creating item) and I still didn't get any bug.

As for having more than 4 different components, that's a thing because of the UI. I would need to modify the UI and add scrolling capability to allow more different components. I might do it one day.

Reply Good karma+2 votes
Alone__Stranger
Alone__Stranger - - 110 comments

This mod have very annoying issue. When you give tools to a technician and use his workbench, tools are still not available, that is, you can not craft things for which they are needed, although it says that the technician has them. Tools must be in your inventory to use them. I'm not a scripter and do not know how to fix it. I opened the file, but did not understand anything) Could someone fix it, please?

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Thanks for reporting! I fixed the bug in v3.1. I couldn't see it before because debug mode automatically enabled all toolkits.

Reply Good karma+2 votes
StronGV
StronGV - - 588 comments

It's strange, I was fine with the technicians on the previous version. I mean on version 3.1 of the mod for Anomaly 1.5.1.

Reply Good karma Bad karma+2 votes
Redroycemac
Redroycemac - - 87 comments

legends return, thanks for the update

Reply Good karma Bad karma+2 votes
real_leaper
real_leaper - - 240 comments

Same as with other crafting replacements, this addon is incompatible with workshop_autoinject.script. Any addon that uses workshop_autoinject.script can't be used with Banjaji's Crafting system improvements.
This is not necessarily bad, since the purpose of autoinject is to give addon authors the ability to add and remove recipes easily, and BCSI also does that. But it does mean that any autoinjected addon will have to be converted to use BCSI for people who want to use BCSI.

Also somewhat incompatible with Crafting Info In Tooltips. CIIT craft.ltx parser is dumb enough to work with the new recpie format in Banjaji's Craft System Improvements - but only as long as no one uses ingredient sections in place of catalysts or recipe items.

Reply Good karma Bad karma+4 votes
Banjaji Author
Banjaji - - 389 comments

Thanks for the info. I might look into it some day.

Reply Good karma+2 votes
Banjaji Author
Banjaji - - 389 comments

v4.1 has functions in aa_load_recipes_Banjaji_CSI.script that help adding recipes through scripts. I also used those for Arti's Ballistics patch, but didn't have time to actually install the mod and test it out. So, I'd say Workshop_autoinject.script is now redundant because it's easy to add/modify recipes both in LTX and in scripts.

Also I added a patch for CIIT.

Reply Good karma+2 votes
real_leaper
real_leaper - - 240 comments

BCSI also breaks recipes in encyclopedia (encyclopedia still uses old-style recipe reading code, with sections [1] to [6]) and recipe reading UI, when activating recipe item in your inventory (again, UI-filling code uses old recipe reading code).

Here's an addon to fix that - Moddb.com

Though this really should be just integrated into BCSI.

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

At the moment that would make managing this mod more complicated because that's a totally new system I haven't touched before (plus currently I don't have much time for modding). But I added the link into CSI's description. And this way you get downloads and statistics to your own mod for increased motivation.

Reply Good karma+2 votes
real_leaper
real_leaper - - 240 comments

The reason why integration is advised is because BCSI + my addon have 3 copies of recipe-loading code in total. This has got to stop. There should be just one function for loading recipes, and it should be used in all three places (workshop, encyclopedia, reading recipe items).

Reply Good karma Bad karma+3 votes
real_leaper
real_leaper - - 240 comments

I don't get the new DLTX version. For example, it does:

!![1]
!title
!x_detector_simple
!x_detector_geiger
...

This makes no sense. "!![1]" already deletes the whole [1] section, there's no need to remove recipes in that section.

I don't get why you're trying to use DLTX here at all. BCSI allows to split craft.ltx into multiple files via #include. Any BCSI-based addons can (and will) just provide their own files, you don't need DLTX to keep compatibility with them.

BCSI also replaces the semantics for sections. Meaning that changes to vanilla craft.ltx do not matter. If any addon changes something in vanilla craft.ltx, BCSI will just nuke these changes by removing vanilla recipe sections [1]-[6]. Even with DLTX you won't get compatibility with these addons.

And if some BCSI-based addon provides its own craft.ltx with changed BCSI basic recipes, DLTX won't help either - BCSI will just override any craft.ltx changes with its own DLTX file.

Finally, two DLTX addons that both change craft.ltx (BCSI and some other BCSI-based addon) will likely clash, with the addon with the highest filename winning. So this doesn't help either.

The best, most honest way is to just ship normal craft.ltx, i.e. use the non-DLTX version. This is compatible with BCSI-based addons that add new recipes, it's compatible with BCSI-based addons that change basic BCSI recipes via DLTX (BCSI-based addon wins, because it uses DLTX and BCSI doesn't), and it's incompatible with any addon that ships its own copy of craft.ltx, but at least that conflict is obvious (ModOrganizer will show it).

The only thing I can think of where DLTX might be useful is when an addon ships its own changed vanilla craft.ltx, and BCSI just adds its own sections via DLTX, keeping changes to vanilla sections intact. But for that you need to change the DLTX file to NOT delete these sections, and NOT delete the vanilla recipes (otherwise you'll erase any changes to vanilla recipes that other addons do)...which will result in duplicated recipes (no idea why you didn't use vanilla section numbers for vanilla recipes).

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Thanks for pointing out the stuff. Right now I've used only non-DLTX version and simply added DLTX version for those who want to tinker with it and know what they are doing (also pointed it out in installation in the description). I haven't tried mod integration in case there are two DLTX versions clashing but will test it eventually. If it indeed causes headache then I'll just delete the DLTX version.

As for deleting every single line and the section: I just used dltxify.exe to automatically convert the file. If the result is the same then it's not a problem.

As for why I wanted to rename the vanilla sections was to also give modders possibility to have their recipe tab between vanilla ones. It is a small feature which might cause incompatibilities with existing mods changing vanilla recipes. But then again, I do want to keep vanilla recipes and CSI addon recipes separate because of the different recipe structure (or at least point out the potential problem). Right now CSI converts vanilla recipe format into the new one but I can't guarantee that it's foolproof and therefore it's recommended to keep to the new format.

Reply Good karma+2 votes
real_leaper
real_leaper - - 240 comments

Honestly, the new craft.ltx feels like a half-measure. It would have been better to do something like this:

[recipe_sections]
recipes_foo
my_cool_recipes
recipes_for_my_addon

[recipes_foo]
output1 = recipestring,...
output2 = recipestring...

[my_cool_recipes]
output3 = recipestring...
output4 = recipestring...

[recipes_for_my_addon]
...

That is to say, let addons use any section name (as long as it's unique), and find them by keeping a master-section ([recipe_sections]) with the names of these sections as its fields. Sure, DLTX would be required to add fields to [recipe_sections], but I don't see why anyone wouldn't want to use DLTX. This is the use-case where DLTX performs perfectly. And you'd need to change the recipe-loading script, but you're already doing that, so there's no disadvantage here.

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

Interesting idea. If I get the time then I'll test it (might be multiple months until then). However, I'm not sure whether you can have recipe tabs appear in certain order with this method.

Reply Good karma+2 votes
real_leaper
real_leaper - - 240 comments

Easy.

[recipe_sections]
recipes_foo = -500
my_cool_recipes = 200
recipes_for_my_addon = 1000

Sort the tabs with these numbers. If some addons happen to add recipe sections with the same number, sort also by recipe section name.

Reply Good karma Bad karma+3 votes
Banjaji Author
Banjaji - - 389 comments

I thought about master recipe_sections and I decided to dismiss that idea. The reason being that I want to make adding new recipes as simple as possible. I remember the time when I started modding and DLTX was waaay over my head (started from zero). So I skipped everything to do with DLTX for some time. With this mod I want to achieve the opposite, that people would try out modding due to its simplicity.

Other things I considered are the following. Using craft_X sections has very-very small conflict chance if users indeed use random number like I asked. Using master recipe_sections will still have small chance of conflicts, although even smaller than using craft_X. Also, since I want to have specific tab order then craft_X and master recipe_sections methods are identical in that sense. In the end craft_X conflicts are very easy to solve once found. And I think not having to use DLTX is bigger positive than having even less conflicts.

Otherwise you gave good feedback and I took that into account when making v4.0.

Reply Good karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: