I make generators on Perchance.org and do a bunch of other cool things.

Links:

  • 62 Posts
  • 183 Comments
Joined 3 months ago
cake
Cake day: March 24th, 2024

help-circle












  • <br>Death Chance: <select oninput="aListName.Death_Chance = this.value">
      <option value="Moral Blow">Moral Blow</option>
      <option value="Tragedy">Tragedy</option>
      <option value="Destruction">Destruction</option>
      <option value="Devastation">Devastation</option>
      <option value="Calamaty">Calamaty</option>
      <option value="Plague">Plague</option>
      <option value="Eradication">Eradiction</option>
      <option value="Extinction">Extinction (WARNING: DON'T) </option>
    </select>
    <p id="out1">[warningList]</p>
    <button onclick="update(out1)">Show</button>
    <br>Illness type: <select oninput="aListName.Illness_type = this.value">
      <option value="Whitecough">Whitecough</option>
      <option value="Carrionplace Disease">Carrionplace Disease</option>
      <option value="Tainted prey">Tainted prey</option>
    </select>
    

    Here is a modified code for the dropdown menus so that they assign the values to the variables properly (since Death_Chance and Illness_type are apparently stored into some sort of parent list, so you can rename aListName to the name of that list). Also, if the dropdown menu doesn’t work, try changing oninput to onchange.

    You’ll also need to associate the variables written in dynamic odd notations in lists to reference the parent list as well (e.g., [Death_Chance == "Moral Blow"] to [aListName.Death_Chance == "Moral Blow"]).



  • Okay, so first you add the quotes between these curly brackets wrapped syntaxes (and remove the quotes around the none part) so they’ll be evaluated properly:

    And then change the rarity picking mechanism (evaluateItem first, create a matchable version, and then display the evaluated version instead of just selectOne and then display) so it’ll be matched properly when picking a gimmick and an ability, to this:

    [ra1 = rarity.evaluateItem, ra = ra1.match(/[A-Z]+/g)[0], ra1]