Forum › Forums › Grids and Presets › Crafting [Scenario Generator]
This topic contains 216 replies, has 69 voices, and was last updated by Lyfox 2 years, 8 months ago.
-
AuthorPosts
-
May 26, 2018 at 12:44 pm #6969
All right here it is.
Garlandtools makes a reliable crafting order indeed. Still had to sort recipes by level but thats easy. Step by step instructions:1. Go to website: http://garlandtools.org/db/ . Use search on the left to make a list of items.
2. In each item open Crafting tab, click Add to crafting list. This will summon a new Crafting List box.
3. Go through sections #1 and #2 in the Crafting List box, upload mats into your inventory.
4. Open web console (Ctrl-Shift-J in most browsers).
5. Run this script:var rJob = function(val){ var imgJob = $(val).find("span.right img.job-icon"); return (imgJob.length ? imgJob.attr("src").replace("../files/icons/job/", "").replace("images/", "").replace(".png", "") : ""); }; var rLevel = function(val){ return $(val).find("span.right span.text").text().replace("Lv. ", ""); }; var rRecipe = function(val){ return $(val).find("div[data-id] span.text span.highlight, span[data-id] span.text span.highlight").text(); }; var rNeeded = function(val){ var match1 = $(val).find("div[data-id] span.text").text().match(/^[0-9]+/g); var match2 = $(val).find("span.amounts span.text:contains(/ +)").text().match(/[0-9]+/g); return (match1 ? match1[0] : match2 ? match2[0] : 0); }; var rYields = function(val){ var match = $(val).find("div[data-id] span.text, span[data-id] span.text").text().match(/\([0-9]+\)/g); return (match ? match[0].replace(/[()]/g, "") : 1); }; var rCount = function(val){ return Math.ceil(rNeeded(val)/rYields(val)); }; var chapter = function(tableId){ var reagents = $("div[data-id='Crafting List'] div[data-headername='"+tableId+"']").children("div[data-stepid]").not(".finished"); reagents.each(function(idx){ $(this).data("order", idx); }); reagents.sort(function(a, b){ var lvlA = rLevel(a); var lvlB = rLevel(b); var idxA = $(a).data("order"); var idxB = $(b).data("order"); return (parseInt(lvlA) < parseInt(lvlB)) ? -1 : (parseInt(lvlA) > parseInt(lvlB)) ? 1 : (lvlA < lvlB) ? -1 : (lvlA > lvlB) ? 1 : (idxA - idxB); }); for(var i=0; i<reagents.length; i++){ var craftsLater = []; var from = -1; var to = -1 //console.log(reagents.get().map(rRecipe)); $(reagents.get().reverse()).each(function(index){ var itemId = $(this).attr("data-stepid"); var item = gt.item.ingredients[itemId] || gt.item.index[itemId]; var requires = item ? item.craft[0].ingredients.map(function(val){ return ""+val.id; }) : []; var isCraftable = requires.reduce(function(isCraftable, requireId){ if(!isCraftable) return false; if(craftsLater.indexOf(requireId)>=0){ from = index; to = craftsLater.indexOf(requireId); return false; } return true; }, true); //console.log(rRecipe(this)+":"+(isCraftable?1:0)); if(!isCraftable) return false; craftsLater.push(itemId); }); if(from < 0 || to < 0) break; from = reagents.length-1 - from; to = reagents.length-1 - to; reagents.splice(to, 0, reagents.splice(from, 1)[0]); } var miqo = ""; reagents.each(function(){ if(!rJob(this)){ miqo += "//no job: "+rRecipe(this)+"\r\n"; return; } miqo += "job("+rJob(this)+")\r\n"; miqo += "recipe("+rRecipe(this)+")\r\n"; miqo += "craft("+rCount(this)+")\r\n"; }); miqo += "//--Section crafts: "+reagents.get().reduce(function(allCount, val){ return allCount+rCount(val); },0)+"\r\n"; return miqo; }; var antiDuplicate = function(miqo){ var dupList = [ ["Kite Shield", 3], ["Goatskin Wristbands", 2], ["Hempen Breeches", 2], ["Copper Ring", 2], ["Lapis Lazuli", 2], ["Brass Ring", 2], ["Silver Ring", 2], ["Garnet", 2], ["Mythril Ring", 3], ["Horn Staff", 8], ["Electrum Ring", 2], ["Honey", 9], ["Horn Fishing Rod", 2], ["Ether", 8], ["Poisoning Potion", 2], ["Paralyzing Potion", 2], ["Blinding Potion", 2], ["Sleeping Potion", 2], ["Silencing Potion", 2], ["Elixir", 7], ["Obelisk", 2], ["Mailbreaker", 2], ["Rampager", 2], ["Boarskin Ring", 2], ["Pearl", 7], ["Astrolabe", 2], ["Rose Gold Earrings", 2], ["Sarnga", 2], ["Mortar", 22], ["Campfire", 2], ["Oasis Partition", 2], ["Manor Fireplace", 2], ["Cloche", 3], ["Smithing Bench", 2], ["Manor Harp", 2], ["Wall Lantern", 2], ["Holy Rainbow Hat", 2], ["Reading Glasses", 2], ["Archaeoskin Boots", 3], ["Gaganaskin Gloves", 2], ["Gazelleskin Ring", 4], ["Hedge Partition", 2], ["Wolfram Cuirass", 2], ["Wolfram Gauntlets", 2], ["Wolfram Sabatons", 2], ["Gold Ingot", 2], ["Serpentskin Gloves", 3], ["Orchestrion", 4], ["Camphor", 14], ["Cordial", 2], ["Survival Hat", 2], ["Survival Shirt", 3], ["Survival Halfslops", 2], ["Survival Boots", 2], ["Luminous Fiber", 2], ["Teahouse Bench", 2], ["Oden", 10], ["Carpeting", 2], ["Near Eastern Antique", 2], ["Coerthan Souvenir", 2], ["Maelstrom Materiel", 2], ["Heartfelt Gift", 2], ["Orphanage Donation", 2], ["Gyr Abanian Souvenir", 2], ["Far Eastern Antique", 2], ["Gold Saucer Consolation Prize", 2], ["Resistance Materiel", 2], ["Sui-no-Sato Special", 2], ["Cloud Pearl", 2], ["Signature Buuz Cookware", 2], ["Platinum Ingot", 2], ["Griffin Leather", 2], ["Wall Chronometer", 2], ]; dupList.forEach(function(row){ miqo = miqo.replace(new RegExp("recipe\\("+row[0]+"\\)", "g"), "recipe("+row[0]+", "+row[1]+")"); }); return miqo; }; var scenario = function(){ var miqo = ""; miqo += "//Craft\r\n"; miqo += "solverPreset(recommended)\r\n"; miqo += "nqhq(balanced)\r\n"; miqo += "reclaimOff()\r\n\r\n"; miqo += chapter("Craft")+"\r\n"; miqo += "//Goal\r\n"; miqo += "solverPreset(recommended)\r\n"; miqo += "nqhq(balanced)\r\n"; miqo += "reclaimHQ(50)\r\n\r\n"; miqo += chapter("goal")+"\r\n"; miqo += "//Repair\r\n"; miqo += "reclaimOff()\r\n"; miqo += "repair()\r\n"; miqo = antiDuplicate(miqo); window.prompt("Copy to clipboard: Ctrl+C, Enter", miqo); return miqo; }; console.log(scenario());
6. Press Enter. Copy and paste the scenario into Miqobot.
7. Start.Let me know if there are any bugs. Ill ask Miqo to merge it with the first post later.
- This reply was modified 6 years, 5 months ago by Lyfox.
May 26, 2018 at 2:24 pm #6971A visual example of how it works. Onishi 70*** left side.
1. Link to quickly fill the crafting list:
garlandtools.org – Onishi 70***
2. Ctrl-Shift-J, copypaste the script above. See attached picture.Attachments:
You must be logged in to view attached files.May 26, 2018 at 2:37 pm #6973May 26, 2018 at 9:29 pm #6977June 1, 2018 at 2:25 pm #7086June 1, 2018 at 2:48 pm #7087June 1, 2018 at 4:03 pm #7090June 4, 2018 at 6:50 am #7127Ok its fixed. Now Garlandtools generator functions exactly the same way as the original one. Merged the fix into the post above so just grab the new script and use it.
Example image attached.Attachments:
You must be logged in to view attached files.June 12, 2018 at 12:29 am #7266Using the ffxiv crafting site and while leveling armorsmith it can’t figure out what to do for things like bronze ingots that can be made by multiple classes, instead it switches to arm then keeps trying to synth the blacksmith version. Am i doing something wrong or is this just a limitation of the system.
June 12, 2018 at 2:09 am #7267July 16, 2018 at 11:14 pm #7538July 21, 2018 at 3:46 pm #7565Is there a way to tell Miqobot to use food every x amount of minutes? Or to make sure its food’d up before attempting a craft?
BTW thanks for the script, works great!
- This reply was modified 6 years, 3 months ago by LutBot.
July 21, 2018 at 4:06 pm #7568Yea just use sendIcon() function. Heres an example: https://miqobot.com/forum/forums/topic/food-buff/
July 21, 2018 at 4:25 pm #7569July 26, 2018 at 2:16 pm #7597 -
AuthorPosts
You must be logged in to reply to this topic.