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.
Features
- Full remake/improvement of v3.x. You need to do clean install (fully uninstall everything from v3.x and install v4.x). v3.x recipe format is incompatible with the new format, so other mods need to catch up. Meanwhile you can use v3.2.
For players:
- Framework for more complex crafting mods
- Drag-drop recipes take only one use from multi-use items and bullets
- Crafting statistic increases with drag-drop crafting
- Crafting window stays open after crafting (inspiration from TheMrDemonized but implemented differently).
- New UI related to crafting:
- New workshop crafting window UI. This is redesigned to accommodate infinite components, tools and results. Window tip says which notes need to be read to unlock a recipe.
-
- New note reading UI. You can read note text on old paper UI immediately after reading the note. The note has all unlocked recipes listed under the text and these are clickable (grey items require more notes). Clicking on recipe shows its recipe like in workshop. Escape key closes the UI, right mouse button goes back/closes the UI.
-
- PDA encyclopedia (guide) shows unlocked recipes under the note that unlocked them. Added page numbers to note article recipes.
- PDA encyclopedia (guide) has new article "Known recipes" that lists all at least partially unlocked recipes and draws a table of contents and page numbers for finding a certain recipe category. If at least one required note is read then the recipe shows.
- MCM options for minimum crafting item condition and whether to delete note after reading (default is no).
For modders:
- A lot of freedom with crafting recipes.
- New recipe format (again!) that allows any (0 to infinity) number of different items. That is any number of different components and tools and resulting items and notes required to unlock the recipe. This way you can e.g. make a recipe that doesn't require anything (free spawner) or you can have cooking in crafting window since field cooker is used as tool kit.
- Each item can also have any number required/output. Minimum input is 1 use (multiuse items), 1 bullet (bullet box) or 1 normal item. Previously you couldn't deal in individual bullets, but only in bullet boxes.
- Items can be output with below 100% condition.
- Any note can be used for unlocking recipes. That is e.g. monolith prayer note can be used as a note that's required for some recipes.
- Tool kit can be any item in the game. Smash scrap metal into roubles with your rpk or cook stuff with a field cooker, scrap and boar tusks.
- Any item can be shown as recipe icon, name and description. If you create a new item then you can have custom icon, name and description.
- One function to rule them all! Made a centralized script aa_load_recipes_Banjaji.script that reads recipes and prepares them. Everything else should access that one, so no more duplicate code. The script is written with other scripts accessing it in mind.
- Code is less hardcoded and more forgiving to sloppy crafting recipe format in LTX.
- You can make quick recipes like "a_detector_geiger = detector_geiger" (won't need anything to craft).
- craft.ltx includes all associated files "craft_*.ltx" similarly to new item files. This means every modder can have his own file and his own recipe sections.
- A new recipe section (square brackets) can have any number from -10 000 to 10 000 (-500, -400, ..., 0 are original recipes now) instead of just next number from last one. Now we aren't competing for the 7th section (original sections were 1-6).
Conflicts
- Ahuyn's Workshop Autoinject ( Github.com ). My mod makes it easy to add new recipes and to modify them through scripts, so Workshop Autoinject is redundant.
Goes well with
- Banjaji's Disassembler's dream ( Moddb.com ) - possibility to disassemble everything
Some addons
- For v3.2:
- Real_reaper's Readable recipes for Banjaji's Crafting system improvements ( Moddb.com )
- Real_reaper's Banjaji's Crafting system improvements + artifex's addons compatibility v1.1.0 ( Moddb.com )
- Unwary's Hunter Survival Crafting 0.7d ( Moddb.com )
- Hiipandanaserver's {1.5.1} Multi-Cook Low Tier Meat with BANJAJI'S CSI v2 ( Moddb.com )
Instructions for making recipes
- Specific instructions are in craft.ltx. In short you can still use vanilla format but with its limitations. Otherwise there are 4 categories (and identificator on left side of the equation): results, notes, tools and components, spearated by "\".
- To modify original recipes modify craft_vanilla.ltx directly or use DLTX. DLTX is in modded exes: Github.com
- You can make a new file that defines your new recipe sections and is named "craft_*.ltx" where "*" can be anything without "_" character ("craft_mine.ltx" is okay but "craft_mine_craft.ltx" will crash the game).
- It will be automatically included and won't be overwritten by other mods that add recipes (unless they do it by scripts on purpose).
- Under each section add a variable for the tab name eg. like in the original "title = st_ui_craft_device". If no such variable exists in xml files then the variable name itself gets written.
- You can create a new recipe tab by creating a new section in any craft_*.ltx file. the section name needs to be craft_x, where x is a number between -10000 and 10000. Original sections are now -500, -400, ..., 0. The tabs are ordered in the ascending number order.
- When creating a new section USE A RANDOM NUMBER GENERATOR!! That minimizes the chance that your number is the same as in some other mod. You can't have 2 sections with the same name or xray crashes.
- Note that in debug mode you need to reload ini and reload the game for the effects to apply. Otherwise you need to restart the game (the whole program). Mod Organizer 2 doesn't register new files after it has been launched. So, you might have to restart MO2 too when adding new files.
- After creating a new file, section and/or recipes, the new recipes will appear under the tabs in the recipe book. If there are no new recipes then you probably did something wrong in the previous steps.
How did I do it?
I rewrote almost the entire ui_workshop.script's crafting part. I also almost fully rewrote ui_pda_encyclopedia_tab.script's part where it shows unlocked recipes. I also almost fully rewrote item_recipe.script. I added aa_load_recipes_Banjaji_CSI.script as the central recipe loading script. I messed around for weeks with the UI elements. (UICellContainer and CUIScrollView classes can go fuck themselves!) If you want to know what and how then read my comments in the monkeypatch script. Also I wrote "#include "craft_*.ltx"" into the original LTX file so that new recipes can be added easily from new files and I moved vanilla recipes to craft_vanilla.ltx.
Installation
Use mod manager or drop and merge gamedata folder to Anomaly main folder. Delete the files to revert back to vanilla. Or simply disable the mod in Mod Organizer 2.
- Uninstall everything from this mod you had previously.
- Install dependencies. Install MCM ( Moddb.com ) and Modded EXEs ( Github.com ). Without those the mod won't crash and recipe system keeps working but you will lose some decorative features and gain some bugs.
- Install main mod. Drop the gamedata folder from mod's main folder into Anomaly's main folder or enable it from the Mod Organizer 2. Give it low priority, so that other mods overwrite CSI.
- Install patches. After installing the parent mods drop the gamedata folder from mod's patch folder into Anomaly's main folder or enable it from the Mod Organizer 2.
- Check the test/example. Drop the gamedata folder from test folder into Anomaly's main folder or enable it from the Mod Organizer 2. If all went well then two recipe tabs show up in the recipe book just like in the preview image. Uninstall the test.
- Check the test/example drag-drop. Drop the gamedata folder from test folder into Anomaly's main folder or enable it from the Mod Organizer 2. If all went well then you can drag-drop Mil-spec textiles onto Nemiroff vodka and vice versa to craft bandages.
- Uninstall. Delete the files to revert it back to vanilla. Or simply disable the mod in Mod Organizer 2.
Final words
You can modify my changes or ideas in any way you want. However if your work is based largely on my ideas then please give credit! In case you find bugs please let me know! This was a massive project and I already tested this for weeks but certainly some slipped through.
Changelog
v1.1
- More freedom in defining recipe sections (numbers 1 to 1000)
- Recipes take at least 1 component instead of at least 2.
- Changed "craft.ltx" file so that original contents are now in 8 files (6 recipe sections, basic item combinations and itself). "craft.ltx" includes contents from all "craft_*.ltx" files in that folder.
v2.0
- Added option to craft without toolkits
- Added Thisisntmysteamid's mod "Fixed Crafting With Multi-Use Items v2.5" main file
v3.2
- Full remake/improvement of the mod to the extent that I renamed it. Introduced monkeypatches and craft.ltx modified for the new system.
- Updated for Anomaly v1.5.2.
- Changed ui_workshop.script into vanilla file to indicate this mod changes something there and added a monkeypatch in a separate script. This is for different mod compatibility.
- Crafting tab index ranges now from -10 000 to 10 000. Vanilla sections are now -500, -400, ..., 0.
- Changed crafting section names from eg. [1] into more specific [craft_1].
- Crafting window stays open after crafting. I got inspiration from TheMrDemonized's Keep Crafting Windows Opened but in the end implemented it differently.
- Made the vanilla code less hardcoded and more forgiving to sloppy format of crafting recipes in LTX.
- For the crafting recipe layout in LTX see the test file. I commented everything there.
- Added a possibility to craft multiple items in one crafting.
- Added a possibility to craft items without resulting amount, tool kits, recipe books and/or components.
- Any item can be used instead of a tool kit. That item won't get used up when crafting. You can cook with 4 components now.
- You can have infinite amount of components for future updates of Anomaly/this mod but only the first 4 are considered. Adding more requires tinkering with GUI elements (little did he know, when he was writing this, that in the future update GUIs would become his biggest enemies).
v4.0
- HUGE update
- Changes crafting recipe format (again!). You need to uninstall previous version and then install this one. v3.x crafting format is incompatible with v4.x crafting format.
- New workshop crafting window UI. This is redesigned to acommodate infinite components, tools and results. Window tip says which notes need to be read to unlock a recipe.
- New note reading UI. The note has all unlocked recipes listed under the text and these are clickable (grey items require more notes). Clicking on recipe shows its recipe like in workshop.
- PDA encyclopedia (guide) shows unlocked recipes under the note that unlocked them. Added page numbers to note article recipes.
- PDA encyclopedia (guide) has new article "Known recipes" that lists all at least partially unlocked recipes and draws a table of contents and page numbers for finding a certain recipe category.
- MCM options for minimum crafting item condition and whether to delete note after reading.
- New recipe format allows any (0 to infinity) number of different items. That is any number of different components and tools and resulting items and notes required to unlock the recipe.
- Possibility to require/give partial uses (not full uses item) and single bullets (not bullet boxes).
- Possibility to give item with below 100% condition.
- Any note can be used for unlocking recipes. That is e.g. monolith prayer note can be used as a note that's required for some recipes.
- Any item can be shown as recipe icon, name and description. If you create a new item then you can have custom icon, name and description.
- New patch: Utjan's Crafting Info in Tooltips: ( Moddb.com )
- Removed patch for HarukaSai's Fillable canteens. v2.0 doesn't need it anymore ( Moddb.com ).
- Changed patch for TheMrDemonized's Keep Crafting Windows Opened (need to do clean update including patches).
- Removed Thisisntmysteamid from credits because I rewrote the whole script and didn't include his edits anymore.
- One function to rule them all! Made a centralized script aa_load_recipes_Banjaji.script that reads recipes and prepares them. Everything else should access that one, so no more duplicate code. The script is written with other scripts accessing it in mind.
- Took recipe sections from craft.ltx and put them into craft_vanilla.ltx.
- Removed DLTX version. It simply didn't have a good reason to exist. Shoutout to Real_leaper for discussing these things in the comments (Jun 9 2023).
- Removed unmodified vanilla scripts from the mod files. In the end there weren't enough plusses for keeping them.
- Wrote code, so that it could be monkeypatched in the future.
- UICellContainer and CUIScrollView classes can go fuck themselves!
v4.1
- Wrote code more monkeypatchable (more functions), sent more callbacks. Monkeypatched only the ui_workshop functions I had to, lobotomized others.
- Lowest condtition items are used first in crafting (inspiration from Utjan's QoL mod)
- Patch for Orleon's Experience Framework Moddb.com
- Patch for Arti's Anomaly Ballistics: Github.com
v4.2
- Fixed lobotomized function calls and some potential crashes. Fixed a bug in Arti's Ballistics patch.
- Added some checks to prevent crashes regarding recipes. Otherwise users blame me for bad recipes from other addons.
v4.3
- Updated patch for Experience Framework v2.1
v4.4
- Drag-drop recipes take only one use from multi-use items and bullets
- Crafting statistic increases with drag-drop crafting
- Modders can define (or modify through scripts) whether recipe gives one use or full item and whether recipe takes one use or full item
- Callbacks for drag-drop start and end
[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
[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.
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
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.
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)
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.
Very nice idea.
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?
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.
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.
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.
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!
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?
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.
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.
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.
Nice, I'll definitely use this when I go back to stalker and change up my survival crafting mod for it.
Well would you look at that! I made this mod because I was trying to merge some of my own recipes with your mod.
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 :(
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.
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.
Used the new system to cook multiple low tier mutant meats.
Glad it's useful!
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.
Hello friend, how can I add item combination recipes in this plugin, it is to make this compatible with EFT Modular Helmets Moddb.com
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.
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.
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.
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.
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!
~ ------------------------------------------------------------------------
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.
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!
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
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.
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?
Thanks for reporting! I fixed the bug in v3.1. I couldn't see it before because debug mode automatically enabled all toolkits.
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.
legends return, thanks for the update
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.
Thanks for the info. I might look into it some day.
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.
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.
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.
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).
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).
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.
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.
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.
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.
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.