Full Lich Crafting Script - Ready for Beta-Testing#7309
Full Lich Crafting Script - Ready for Beta-Testing#7309MikeLC-hub wants to merge 2 commits intoelanthia-online:mainfrom
Conversation
Crafting Script to run off only a "recipe_name". Handles the determination and collective of the needed Crafting Components, then assembles the need script arguments for the other lich discipline crafting scripts, and passes on and executes said discipline crafting scripts. The option to perform enhancements have not yet been integrated, but the script should support all known recipes from all known disciplines, assuming they can be made with storebought or on_hand materials.
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 7d85b88 in 14 seconds. Click for details.
- Reviewed
2314lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_0zBI6ffygxhv6mYp
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
|
I think it's a great idea. Seems potentially very helpful with one-off non-training crafting tasks. Two minor issues I encountered:
|
1.1 Notes - Added a filter to tighten material determination, which fixed the knitting issue.
- Renamed file to crafting_project.lic
- Full execution command is now, for example ;crafting_project PRODUCE "a knit hat"
- Added a filter for default yarn to correctly pull the 'yarn' stock, not the 'wool'
- Cleaned up the help notes a little in LichCraftingProject
Okay, so I fixed the knitted items issue in this new version 1.1. And I like the idea of moving to the designated crafting rooms, so I'll implement that in the next set of updates. |
|
tried ;crafting_project produce "a simple wood burin" balsa didn't work. got hung up at the engineering depot trying to order 14 when there are only 13 items that can be ordered. log included below.
[crafting_project]>rummage /C sigil-scroll in my gearbag [crafting_project]>rummage /C glue in my gearbag [crafting_project]>rummage /C stain in my gearbag *** Crafting Project Report #1: Planning Stage *** Project Ready? false --- Lich: go2 active. [go2]>south [go2]>south You shamble south. [go2]>south [go2]>southeast You shamble southeast. [go2]>southwest [go2]>go bridge [go2]>north [go2]>north [go2]>west [go2]>northwest [go2]>west [go2]>go well-used road [go2]>north [go2: travel time: 0:00:03.103] --- Lich: go2 active. [go2: travel time: 0:00:00.113] [crafting_project]>order 11 [crafting_project]>put my balsa lumber in my gearbag You put your lumber in your patched gearbag. [crafting_project]>rummage /C lumber in my gearbag You rummage through a worn and patched gearbag with thickly padded shoulder straps looking for something similar to "lumber" and see some balsa lumber. [crafting_project]>count first balsa lumber in my gearbag [crafting_project]>wealth kronars [crafting_project]>order 14 DRC: No match was found after 15 seconds for command 'order 14' You feel fully attuned to the mana streams again. DRC: No match was found after 15 seconds for command 'order 14' --- Lich: go2 active. [go2: travel time: 0:00:00.215] [crafting_project]>order 13 [crafting_project]>put my wood glue in my gearbag [crafting_project]>wealth kronars [crafting_project]>order 14 [crafting_project]>order 14 [crafting_project]>put my wood stain in my gearbag You put your stain in your patched gearbag. [crafting_project]>rummage /C sigil-scroll in my gearbag [crafting_project]>rummage /C glue in my gearbag [crafting_project]>rummage /C stain in my gearbag @crafting_inventory.resolve_all! unsuccessful...*** Crafting Project Report #2: Preparation Stage *** Project Ready? false ...Done. |
MahtraDR
left a comment
There was a problem hiding this comment.
Review: Several bugs need fixing before this can merge
Thanks for the ambitious script -- the concept of automating full crafting projects from a recipe name is great. However, there are several runtime bugs that need to be addressed:
1. Missing .lic extension (blocks loading)
The file is committed as crafting_project but Lich requires the .lic extension to load scripts. The internal comments say it was "renamed to crafting_project.lic" but the actual filename in the commit doesn't have the extension.
2. @disipline_components typo (line ~1757, runtime crash)
@disipline_components.each { |disc_comp| disc_comp.resolve! } if @discipline_components.any? && ...The guard checks @discipline_components (correct spelling) so it passes, but the iterator uses @disipline_components (misspelled, nil) -- this will crash with NoMethodError.
3. Assignment instead of comparison in 5 predicate methods
These methods all use = (assignment) instead of == (comparison):
is_basic_info?--info_hash[:info_type] = 'basic'is_stock_info?--info_hash[:info_type] = 'base_stock'is_part_info?--info_hash[:info_type] = 'base_part'is_crafting_material_info?--info_hash[:info_type] = 'crafting_material'is_material_component_info?--info_hash[:info_type] = 'material_component'
These silently mutate the info hash and always return truthy. Three of these (is_basic_info?, is_crafting_material_info?, is_material_component_info?) are actively called; the other two appear to be dead code.
4. Assignment in ForgingProduct.set_config conditional
DRCC.find_anvil(@@hometown) if @script_name = LICH_SCRIPTS[0]This assigns 'forge' to @script_name instead of comparing. It accidentally "works" because the assignment result is truthy, but it masks the intended logic.
5. Mixed indentation
The file mixes tabs and spaces throughout. The rest of dr-scripts uses spaces consistently.








Crafting Script to run off only a "recipe_name". Handles the determination and collection of the needed Crafting Components, then assembles the required script arguments for the other lich discipline crafting scripts, and then passes on and executes said discipline crafting scripts.
The option to perform enhancements has not yet been integrated, but the script should support all known recipes from all known disciplines, assuming they can be made with storebought or on_hand materials.
Important
Introduces a Lich crafting script to automate crafting projects using a recipe name, managing components, materials, and inventory, with support for querying crafting databases.
Crafting.licscript to automate crafting projects using arecipe_name.CraftingComponent,CraftingMaterial, andCraftingInventoryclasses for managing crafting components and materials.BaseRecipe,BaseDiscipline,BaseStock, andBaseRecipePartclasses for handling recipe and discipline data.CraftingMethodmodule with subclasses for different crafting types:ForgingProduct,OutfittingProduct,EngineeringProduct,AlchemyProduct, andEnchantingProduct.CraftingProjectclass to manage crafting projects, including planning, preparing, and crafting.CraftingLibraryfor querying crafting databases.LichCraftingclass to parse arguments and execute commands likePROJECT,PLAN,PREPARE, andLIST.This description was created by
for 7d85b88. You can customize this summary. It will automatically update as commits are pushed.