Crafting [Scenario Generator]

Forum Forums Grids and Presets Crafting [Scenario Generator]

This topic contains 216 replies, has 69 voices, and was last updated by Lyfox Lyfox 2 years, 10 months ago.

Viewing 15 posts - 121 through 135 (of 217 total)
  • Author
    Posts
  • #10190
    kontu
    kontu
    Participant
    0

    Suddenly not seeming to work for me tonight.
    Using a list I’ve used in the past, and Chrome , It just outputs nothing to craft

    //Craft
    solverPreset(recommended)
    nqhq(balanced)
    reclaimOff()
    
    //--Section crafts: 0
    
    //Goal
    solverPreset(recommended)
    nqhq(balanced)
    reclaimHQ(50)
    
    //--Section crafts: 0
    
    //Repair
    reclaimOff()
    repair()
    

    And now after repeated attempts (making new lists / etc), I don’t even get the popup window to copy, just the output in the browser console 🙁

    Edit – Using firefox all I could get is

    //CraftsolverPreset(recommended)nqhq(balanced)reclaimOff()job(../files/icons/job/ALC)recipe(Natron)craft(4)job(../files/icons/job/GSM)recipe(Gold Ingot, 2)craft(4)job(../files/icons/job/ALC)recipe(Astral Oil)craft(1)job(../files/icons/job/BSM)recipe(High Steel Nugget)craft(9)job(../files/icons/job/GSM)recipe(Koppranickel Nugget)craft(2)job(../files/icons/job/BSM)recipe(High Steel Ingot)craft(9)job(../files/icons/job/ALC)recipe(Persimmon Tannin)craft(1)job(../files/icons/job/GSM)recipe(Azurite)craft(1)job(../files/icons/job/WVR)recipe(Worsted Yarn)craft(4)job(../files/icons/job/GSM)recipe(Palladium Nugget)craft(3)job(../files/icons/job/WVR)recipe(Twinthread)craft(10)job(../files/icons/job/ALC)recipe(Hawk's Eye Sand)craft(17)job(../files/icons/job/ALC)recipe(Veteran Tree Sap)craft(13)job(../files/icons/job/BSM)recipe(Nightsteel Ingot)craft(9)job(../files/icons/job/CRP)recipe(Black Willow Lumber)craft(7)job(../files/icons/job/GSM)recipe(Silvergrace Ingot)craft(2)job(../files/icons/job/LTW)recipe(Ground Sloth Leather)craft(12)job(../files/icons/job/WVR)recipe(True Linen)craft(10)//--Section crafts: 118//GoalsolverPreset(recommended)nqhq(balanced)reclaimHQ(50)job(../files/icons/job/BSM)recipe(Nightsteel Hatchet)craft(1)job(../files/icons/job/BSM)recipe(Nightsteel Pickaxe)craft(1)job(../files/icons/job/BSM)recipe(Nightsteel Scythe)craft(1)job(../files/icons/job/BSM)recipe(Nightsteel Sledgehammer)craft(1)job(../files/icons/job/CRP)recipe(Yamashi Kasa)craft(1)job(../files/icons/job/GSM)recipe(Silvergrace Earrings of Gathering)craft(1)job(../files/icons/job/LTW)recipe(Slothskin Armillae of Gathering)craft(1)job(../files/icons/job/LTW)recipe(Slothskin Necklace of Gathering)craft(1)job(../files/icons/job/LTW)recipe(Slothskin Ring of Gathering)craft(2)job(../files/icons/job/LTW)recipe(Yamashi Tekko)craft(1)job(../files/icons/job/LTW)recipe(Yamashi Zori)craft(1)job(../files/icons/job/WVR)recipe(Yamashi Dogi)craft(1)job(../files/icons/job/WVR)recipe(Yamashi Momohiki)craft(1)job(../files/icons/job/WVR)recipe(Yamashi Obi)craft(1)//--Section crafts: 15//RepairreclaimOff()repair()

    • This reply was modified 5 years, 11 months ago by kontu kontu.
    #10192
    Lyfox
    Lyfox
    Participant
    0

    Seems like garland tools changed something in file structure. Ill take a look on the weekend.

    EDIT: Hmm everything works fine for me except job names. Its an easy fix should be done in a few minutes.
    But ive no idea why you get empty lists. Care to give me a link to your list?

    • This reply was modified 5 years, 11 months ago by Lyfox Lyfox.
    #10194
    Lyfox
    Lyfox
    Participant
    0

    Job names fixed. Change from this:

    var rJob = function(val){
       return $(val).find("span.right img.job-icon").attr("src").replace("images/", "").replace(".png", "");
    };

    To this:

    var rJob = function(val){
       return $(val).find("span.right img.job-icon").attr("src").replace("../files/icons/job/", "").replace(".png", "");
    };

    Lemme know if theres anything else i can do.

    #10199
    kontu
    kontu
    Participant
    0

    Neither of these kick out anything for me, which is weird because like I said, I’ve used them before
    https://www.garlandtools.org/db/#list/6IWJn33lRi
    https://www.garlandtools.org/db/#list/sy0QJvARUS

    edit – more info –
    Chrome Version 71.0.3578.98 (Official Build) (64-bit)
    Tried restarting the entire computer to see if it’d change anything, no dice.
    Incognito mode made no difference as well

    This is what I have copied on my clipboard, as evidence I’m not pasting wrong hah

    var rJob = function(val){
       return $(val).find("span.right img.job-icon").attr("src").replace("images/", "").replace(".png", "");
    };
    
    var rRecipe = function(val){
       return $(val).children("td:eq(0)").children("a:eq(1)").children("span").text();
    };
    var rNeeded = function(val){
       var txt = $(val).children("td:eq(1)").children("span").text();
       var val = $(val).children("td:eq(1)").children("input").val();
       return val > 0 ? val : txt;
    };
    var rYields = function(val){
       return $(val).attr("data-yields");
    };
    var rCount = function(val){
       return Math.ceil(rNeeded(val)/rYields(val));
    };
    var chapter = function(tableId){
       var reagents = $("tbody#"+tableId).children("tr.reagent").not(".success");
       reagents.sort(function(a, b){
          var lvlA = parseInt( $(a).attr("data-ilvl") );
          var lvlB = parseInt( $(b).attr("data-ilvl") );
          return (lvlA < lvlB) ? -1 : (lvlA > lvlB) ? 1 : 0;
       });
       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-item-id");
             var requires = $(this).attr("data-requires").split("&").map(function(value){ return value.split("x")[1]; });
             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(){
          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", 8],
          ["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],
          ["Wall Chronometer", 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", 5],
          ["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],
          ["Platinum Ingot", 2],
          ["Griffin Leather", 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 += "//Pre-Requisite Crafting\r\n";
       miqo += "solverPreset(recommended)\r\n";
       miqo += "nqhq(balanced)\r\n";
       miqo += "reclaimOff()\r\n\r\n";
       miqo += chapter("PreRequisiteCrafting-section")+"\r\n";
       
       miqo += "//Crafting List\r\n";
       miqo += "solverPreset(recommended)\r\n";
       miqo += "nqhq(balanced)\r\n";
       miqo += "reclaimHQ(50)\r\n\r\n";
       miqo += chapter("CraftingList-section")+"\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());
    
    • This reply was modified 5 years, 11 months ago by kontu kontu.
    • This reply was modified 5 years, 11 months ago by kontu kontu.
    #10202
    Lyfox
    Lyfox
    Participant
    0

    Ooh i see you renamed the crafting list. I had no idea it was even possible so obviously i couldnt support that. It has to be named ‘Crafting List’. Cant name it ‘Yamashi’ or anything else sorry.

    #10203
    kontu
    kontu
    Participant
    0

    Only on one of them though, and neither list works 🙁

    Even this one spits out nothing for me and it’s not renamed
    https://www.garlandtools.org/db/#list/YPRmVwsA69

    #10204
    Lyfox
    Lyfox
    Participant
    0

    Oh and ive looked at the script you posted. Its for Ffxivcrafting.com and it doesnt work on garland tools. Version for Garland tools is on page 5.
    What i mentioned about renaming still applies.

    #10205
    kontu
    kontu
    Participant
    0

    Oh god I feel like an idiot 🙁 Forgot the garland one was separate! Sorry for wasting your time hah…..

    #10206
    Lyfox
    Lyfox
    Participant
    0

    No worries mate. The bug with job names was real so thanks for pointing that out.

    #10246
    jae
    jae
    Participant
    1+

    I think you may’ve swapped the correction for the garlandtools script, unless there’s another location, other than page 5, I missed.
    Anyway, after changing .replace("../files/icons/job/", "") to .replace("images/", "") in rJob variable, it worked as intended. Thanks for the great script, saves me a lot of time.

    #10247
    Lyfox
    Lyfox
    Participant
    0

    Hmm weird ive checked garland tools just now and it should be “../files/icons/job/”. But no matter its a chaining function and it can have both. Maybe there are different versions or some cdn.

    .replace("../files/icons/job/", "").replace("images/", "").replace(".png", "");
    

    Ill put it on page 5. Thanks!

    #10319
    kontu
    kontu
    Participant
    0

    Having issues using this (using the correct script for Garland tools this time) with pre-crafting all the stuff for Airship/Submersible parts. Guessing it just never considered them being a target before

    List : https://www.garlandtools.org/db/#list/GZNTHkBZJN

    Error from console

    Uncaught TypeError: Cannot read property 'replace' of undefined
        at rJob (<anonymous>:2:61)
        at HTMLDivElement.<anonymous> (<anonymous>:66:22)
        at Function.each (jquery-3.1.1.min.js:2)
        at r.fn.init.each (jquery-3.1.1.min.js:2)
        at chapter (<anonymous>:65:13)
        at scenario (<anonymous>:164:12)
        at <anonymous>:173:13
    rJob	@	VM338:2
    (anonymous)	@	VM338:66
    each	@	jquery-3.1.1.min.js:2
    each	@	jquery-3.1.1.min.js:2
    chapter	@	VM338:65
    scenario	@	VM338:164
    (anonymous)	@	VM338:173
    #10325
    Lyfox
    Lyfox
    Participant
    0

    Ooh yea i havent tried airships. They dont have a crafting job. Ill see what i can do.

    #10332
    kontu
    kontu
    Participant
    0

    All I want are the pre-airship stuff heh. So just ignore the goal section for them essentially if possible. Even if there’s a variable in the script to set to true or false for airships

    #10333
    Lyfox
    Lyfox
    Participant
    0

    Ok fixed. Makes a line with //no job comment on airships now so we can see its not a bug. Updated script on page 5.

Viewing 15 posts - 121 through 135 (of 217 total)

You must be logged in to reply to this topic.