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

destinyHiveNames.js (2025B)


      1 var nm1 = ["b", "cr", "d", "g", "gr", "k", "kr", "m", "n", "r", "s", "tr", "z"];
      2 var nm2 = ["a", "e", "o", "u", "a", "e", "o", "u", "a", "e", "o", "u", "oo"];
      3 var nm3 = ["c", "cr", "gr", "k", "kr", "m", "n", "nd", "r", "rd", "rg", "rn", "rv", "rz", "t", "tr", "v", "z"];
      4 var nm4 = ["", "c", "k", "k", "n", "r", "x"];
      5 var nm5 = ["c", "ch", "h", "m", "n", "ph", "s", "sh", "th", "v", "z", "zh"];
      6 var nm6 = ["a", "e", "i", "e", "i", "o"];
      7 var nm7 = ["g", "lk", "lm", "ln", "m", "mn", "n", "nl", "nr", "rm", "sh", "sm", "sn", "sr", "st", "th", "tr", "v", "vn", "vr", "z", "zd", "zl", "zn"];
      8 var nm8 = ["", "", "", "", "h", "l", "s", "th"];
      9 var br = "";
     10 
     11 function nameGen(type) {
     12     $('#placeholder').css('textTransform', 'capitalize');
     13     var tp = type;
     14     var element = document.createElement("div");
     15     element.setAttribute("id", "result");
     16     for (i = 0; i < 10; i++) {
     17         if (tp === 1) {
     18             rnd = Math.floor(Math.random() * nm5.length);
     19             rnd2 = Math.floor(Math.random() * nm6.length);
     20             rnd3 = Math.floor(Math.random() * nm7.length);
     21             rnd4 = Math.floor(Math.random() * nm6.length);
     22             rnd5 = Math.floor(Math.random() * nm8.length);
     23             names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd5];
     24         } else {
     25             rnd = Math.floor(Math.random() * nm1.length);
     26             rnd2 = Math.floor(Math.random() * nm2.length);
     27             rnd3 = Math.floor(Math.random() * nm3.length);
     28             rnd4 = Math.floor(Math.random() * nm2.length);
     29             rnd5 = Math.floor(Math.random() * nm4.length);
     30             names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5];
     31         }
     32         br = document.createElement('br');
     33         element.appendChild(document.createTextNode(names));
     34         element.appendChild(br);
     35     }
     36     if (document.getElementById("result")) {
     37         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     38     }
     39     document.getElementById("placeholder").appendChild(element);
     40 }