offline-fantasy-name-generators

Offline version of www.fantasynamegenerators.com
git clone https://git.neptards.moe/neptards/offline-fantasy-name-generators.git
Log | Files | Refs | README

pathfinderGnome.js (7849B)


      1 var nm1 = ["", "", "", "", "b", "br", "c", "ch", "d", "dr", "f", "g", "gr", "h", "k", "kr", "n", "p", "q", "r", "shm", "t", "tr", "v", "vr", "z"];
      2 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ie", "iu", "ou", "ee", "uo", "ua"];
      3 var nm3 = ["b", "b", "b", "br", "bn", "ck", "cr", "cd", "dp", "dq", "dw", "k", "k", "k", "kq", "kr", "kw", "l", "l", "l", "ll", "ll", "lm", "lz", "lb", "ld", "m", "m", "m", "mb", "mz", "n", "n", "n", "nn", "nd", "ndr", "ng", "nt", "nz", "nq", "p", "p", "p", "pq", "pr", "r", "r", "r", "rgr", "rn", "rw", "rz", "shm", "sht", "sn", "st", "t", "t", "t", "th", "tq", "tr", "v", "v", "v", "z", "z", "z", "zz", "zn"];
      4 var nm4 = ["", "", "", "ck", "d", "m", "n", "nt", "r", "rd", "s", "st", "t", "tt", "x"];
      5 var nm5 = ["", "", "", "", "b", "d", "f", "g", "h", "l", "m", "n", "p", "q", "r", "s", "sn", "t", "tr", "y", "v", "w", "z"];
      6 var nm6 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ue", "io", "ie", "ia", "ai"];
      7 var nm7 = ["b", "b", "b", "b", "bl", "c", "c", "c", "c", "d", "d", "d", "f", "f", "f", "ff", "ff", "fl", "fn", "fr", "fl", "g", "g", "g", "g", "gn", "gg", "h", "h", "h", "hh", "hh", "j", "j", "j", "k", "k", "k", "k", "kn", "kz", "l", "l", "l", "l", "l", "lm", "ln", "lz", "lb", "lf", "m", "m", "m", "m", "mm", "mm", "mz", "ml", "mb", "mp", "n", "n", "n", "n", "nn", "nk", "np", "nz", "nl", "ns", "nk", "p", "p", "p", "p", "ph", "pr", "pn", "r", "r", "r", "r", "rz", "rl", "rs", "rr", "s", "s", "s", "s", "sh", "sl", "sn", "sm", "t", "t", "t", "th", "thr", "tr", "v", "v", "v", "vr", "vl", "vn", "x", "x", "x", "z", "z", "z", "z", "zz", "zn", "zl"];
      8 var nm8 = ["ck", "g", "m", "n", "s", "sh", "t", "th"];
      9 var nm9 = ["", "", "", "", "", "b", "bl", "ch", "d", "f", "fr", "g", "gl", "gr", "h", "j", "k", "kl", "kr", "m", "n", "p", "q", "qr", "r", "s", "sh", "t", "th", "v", "w", "z"];
     10 var nm10 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "aa", "ee", "ae", "oo", "ie", "ua", "uo", "io", "ia"];
     11 var nm11 = ["b", "bbl", "bl", "br", "c", "cl", "cn", "d", "ddl", "dl", "dn", "dr", "df", "gn", "g", "gl", "ggl", "gw", "l", "lp", "lf", "lb", "ld", "ldr", "lm", "ln", "ll", "m", "mb", "nd", "n", "nc", "ngn", "ns", "nt", "nz", "p", "pl", "pp", "ppl", "pr", "pn", "psw", "r", "rl", "rnd", "rnf", "sn", "tr", "th", "tl", "ttl", "v", "vr", "w", "wl", "z", "zb", "zl"];
     12 var nm12 = ["", "", "", "", "", "b", "bs", "d", "ck", "cks", "g", "h", "m", "ms", "n", "ng", "r", "sp", "ss", "st", "th"];
     13 var br = "";
     14 
     15 function nameGen(type) {
     16     $('#placeholder').css('textTransform', 'capitalize');
     17     var tp = type;
     18     var element = document.createElement("div");
     19     element.setAttribute("id", "result");
     20     for (i = 0; i < 10; i++) {
     21         nameLst();
     22         while (nMs === "") {
     23             nameLst();
     24         }
     25         if (tp === 1) {
     26             nameFem();
     27             while (nMs === "") {
     28                 nameFem();
     29             }
     30         } else {
     31             nameMas();
     32             while (nMs === "") {
     33                 nameMas();
     34             }
     35         }
     36         nMs = nMs + " " + nameLast;
     37         br = document.createElement('br');
     38         element.appendChild(document.createTextNode(nMs));
     39         element.appendChild(br);
     40     }
     41     if (document.getElementById("result")) {
     42         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     43     }
     44     document.getElementById("placeholder").appendChild(element);
     45 }
     46 
     47 function nameMas() {
     48     rnd = Math.floor(Math.random() * nm1.length);
     49     rnd2 = Math.floor(Math.random() * nm2.length);
     50     rnd5 = Math.floor(Math.random() * nm4.length);
     51     if (i < 3) {
     52         while (rnd < 4) {
     53             rnd = Math.floor(Math.random() * nm1.length);
     54         }
     55         while (rnd5 < 3) {
     56             rnd5 = Math.floor(Math.random() * nm4.length);
     57         }
     58         nMs = nm1[rnd] + nm2[rnd2] + nm4[rnd5];
     59     } else if (i < 7) {
     60         rnd3 = Math.floor(Math.random() * nm3.length);
     61         rnd4 = Math.floor(Math.random() * nm2.length);
     62         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5];
     63     } else if (i < 9) {
     64         rnd3 = Math.floor(Math.random() * nm3.length);
     65         rnd4 = Math.floor(Math.random() * nm2.length);
     66         rnd6 = Math.floor(Math.random() * nm3.length);
     67         rnd7 = Math.floor(Math.random() * nm2.length);
     68         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm4[rnd5];
     69     } else {
     70         rnd3 = Math.floor(Math.random() * nm3.length);
     71         rnd4 = Math.floor(Math.random() * nm2.length);
     72         rnd6 = Math.floor(Math.random() * nm3.length);
     73         rnd7 = Math.floor(Math.random() * nm2.length);
     74         rnd8 = Math.floor(Math.random() * nm3.length);
     75         rnd9 = Math.floor(Math.random() * nm2.length);
     76         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm3[rnd8] + nm2[rnd9] + nm4[rnd5];
     77     }
     78     testSwear(nMs);
     79 }
     80 
     81 function nameFem() {
     82     rnd = Math.floor(Math.random() * nm5.length);
     83     rnd2 = Math.floor(Math.random() * nm6.length);
     84     rnd5 = Math.floor(Math.random() * nm8.length);
     85     if (i < 4) {
     86         while (rnd < 4) {
     87             rnd = Math.floor(Math.random() * nm5.length);
     88         }
     89         nMs = nm5[rnd] + nm6[rnd2] + nm8[rnd5];
     90     } else if (i < 7) {
     91         rnd3 = Math.floor(Math.random() * nm7.length);
     92         rnd4 = Math.floor(Math.random() * nm6.length);
     93         nMs = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd5];
     94     } else if (i < 9) {
     95         rnd3 = Math.floor(Math.random() * nm7.length);
     96         rnd4 = Math.floor(Math.random() * nm6.length);
     97         rnd6 = Math.floor(Math.random() * nm7.length);
     98         rnd7 = Math.floor(Math.random() * nm6.length);
     99         nMs = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd6] + nm6[rnd7] + nm8[rnd5];
    100     } else {
    101         rnd3 = Math.floor(Math.random() * nm7.length);
    102         rnd4 = Math.floor(Math.random() * nm6.length);
    103         rnd6 = Math.floor(Math.random() * nm7.length);
    104         rnd7 = Math.floor(Math.random() * nm6.length);
    105         rnd8 = Math.floor(Math.random() * nm7.length);
    106         rnd9 = Math.floor(Math.random() * nm6.length);
    107         nMs = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd6] + nm6[rnd7] + nm7[rnd8] + nm6[rnd9] + nm8[rnd5];
    108     }
    109     testSwear(nMs);
    110 }
    111 
    112 function nameLst() {
    113     rnd10 = Math.floor(Math.random() * nm9.length);
    114     rnd11 = Math.floor(Math.random() * nm10.length);
    115     rnd12 = Math.floor(Math.random() * nm12.length);
    116     if (i % 3 === 0 && i % 2 != 0) {
    117         rnd13 = Math.floor(Math.random() * nm11.length);
    118         rnd14 = Math.floor(Math.random() * nm10.length);
    119         nameLast = nm9[rnd10] + nm10[rnd11] + nm11[rnd13] + nm10[rnd14] + nm12[rnd12];
    120         nMs = nameLast;
    121     } else if (i % 2 === 0) {
    122         rnd13 = Math.floor(Math.random() * nm11.length);
    123         rnd14 = Math.floor(Math.random() * nm10.length);
    124         rnd15 = Math.floor(Math.random() * nm11.length);
    125         rnd16 = Math.floor(Math.random() * nm10.length);
    126         nameLast = nm9[rnd10] + nm10[rnd11] + nm11[rnd13] + nm10[rnd14] + nm11[rnd15] + nm10[rnd16] + nm12[rnd12];
    127         nMs = nameLast;
    128     } else {
    129         while (rnd10 < 5) {
    130             rnd10 = Math.floor(Math.random() * nm9.length);
    131         }
    132         while (rnd12 < 5) {
    133             rnd12 = Math.floor(Math.random() * nm12.length);
    134         }
    135         nameLast = nm9[rnd10] + nm10[rnd11] + nm12[rnd12];
    136         nMs = nameLast;
    137     }
    138     testSwear(nMs);
    139 }