async SootRollerPopup() {

    const maxDice = game.settings.get("foundryvtt-sootroller", "maxDiceCount");
    const defaultDice = game.settings.get("foundryvtt-sootroller", "defaultDiceCount") + 1;

    new Dialog({
      title: `${game.i18n.localize('SootRoller.RollTitle')}`,
      content: `
        <h2>${game.i18n.localize('SootRoller.Roll')}</h2>
        <form>
          <div class="form-group">
            <label>${game.i18n.localize('SootRoller.RollNumberOfDice')}:</label>
            <select id="dice" name="dice">
              ${Array(maxDice + 1).fill().map((item, i) => `<option value="${i}">${i}d</option>`).join('')}
            </select>
            <script>$('#dice option[value="' + game.settings.get("foundryvtt-sootroller", "defaultDiceCount") + '"]').prop("selected", "selected");</script>
          </div>
          <div class="form-group">
            <label>${game.i18n.localize('SootRoller.Difficulty')}:</label>
            <select id="diff" name="diff">
              <option value="1">${game.i18n.localize('SootRoller.Difficulty1')}</option>
              <option value="2">${game.i18n.localize('SootRoller.Difficulty2')}</option>
              <option value="3">${game.i18n.localize('SootRoller.Difficulty3')}</option>
              <option value="4">${game.i18n.localize('SootRoller.Difficulty4')}</option>
              <option value="5">${game.i18n.localize('SootRoller.Difficulty5')}</option>
              <option value="6">${game.i18n.localize('SootRoller.Difficulty6')}</option>
            </select>
            <script>$('#diff option[value="' + game.settings.get("foundryvtt-sootroller", "defaultDifficulty") + '"]').prop("selected", "selected");</script>
          </div>
          <div class="form-group">
            <label>${game.i18n.localize('SootRoller.Opposition')}:</label>
            <select id="opp" name="opp">
              <option value="0">${game.i18n.localize('SootRoller.None')}</option>
              <option value="1">1d</option>
              <option value="2">2d</option>
              <option value="3">3d</option>
              <option value="4">4d</option>
              <option value="5">5d</option>
              <option value="6">6d</option>
              <option value="7">7d</option>
              <option value="8">8d</option>
              <option value="9">9d</option>
              <option value="10">10d</option>
            </select>
            <script>$('#opp option[value="0"]').prop("selected", "selected");</script>
          </div>
        </form>
      `,
      buttons: {
        yes: {
          icon: "<i class='fas fa-check'></i>",
          label: game.i18n.localize('SootRoller.Roll'),
          callback: async (html) =>
          {
            const dice_amount = parseInt(html.find('[name="dice"]')[0].value);
            const difficulty = html.find('[name="diff"]')[0].value;
            const opposition = html.find('[name="opp"]')[0].value;
            await this.SootRoller("", dice_amount, difficulty, opposition);
          }
        },
        no: {
          icon: "<i class='fas fa-times'></i>",
          label: game.i18n.localize('SootRoller.Close'),
        },
      },
      default: "yes",
    }).render(true);
  }
/**
  * Create popup for roller
  * @return none
  */
Create popup for roller
@return none
Create popup for roller @return none
async SootRollerPopup() {
    const maxDice = game.settings.get("foundryvtt-sootroller", "maxDiceCount");
    const defaultDice = game.settings.get("foundryvtt-sootroller", "defaultDiceCount") + 1;
    new Dialog({
      title: `${game.i18n.localize('SootRoller.RollTitle')}`,
      content: `
        <h2>${game.i18n.localize('SootRoller.Roll')}</h2>
        <form>
          <div class="form-group">
            <label>${game.i18n.localize('SootRoller.RollNumberOfDice')}:</label>
            <select id="dice" name="dice">
              ${Array(maxDice + 1).fill().map((item, i) => `<option value="${i}">${i}d</option>`).join('')}
            </select>
            <script>$('#dice option[value="' + game.settings.get("foundryvtt-sootroller", "defaultDiceCount") + '"]').prop("selected", "selected");</script>
          </div>
          <div class="form-group">
            <label>${game.i18n.localize('SootRoller.Difficulty')}:</label>
            <select id="diff" name="diff">
              <option value="1">${game.i18n.localize('SootRoller.Difficulty1')}</option>
              <option value="2">${game.i18n.localize('SootRoller.Difficulty2')}</option>
              <option value="3">${game.i18n.localize('SootRoller.Difficulty3')}</option>
              <option value="4">${game.i18n.localize('SootRoller.Difficulty4')}</option>
              <option value="5">${game.i18n.localize('SootRoller.Difficulty5')}</option>
              <option value="6">${game.i18n.localize('SootRoller.Difficulty6')}</option>
            </select>
            <script>$('#diff option[value="' + game.settings.get("foundryvtt-sootroller", "defaultDifficulty") + '"]').prop("selected", "selected");</script>
          </div>
          <div class="form-group">
            <label>${game.i18n.localize('SootRoller.Opposition')}:</label>
            <select id="opp" name="opp">
              <option value="0">${game.i18n.localize('SootRoller.None')}</option>
              <option value="1">1d</option>
              <option value="2">2d</option>
              <option value="3">3d</option>
              <option value="4">4d</option>
              <option value="5">5d</option>
              <option value="6">6d</option>
              <option value="7">7d</option>
              <option value="8">8d</option>
              <option value="9">9d</option>
              <option value="10">10d</option>
            </select>
            <script>$('#opp option[value="0"]').prop("selected", "selected");</script>
          </div>
        </form>
      `,
      buttons: {
        yes: {
          icon: "<i class='fas fa-check'></i>",
          label: game.i18n.localize('SootRoller.Roll'),
          callback: async (html) =>
          {
            const dice_amount = parseInt(html.find('[name="dice"]')[0].value);
            const difficulty = html.find('[name="diff"]')[0].value;
            const opposition = html.find('[name="opp"]')[0].value;
            await this.SootRoller("", dice_amount, difficulty, opposition);
          }
        },
        no: {
          icon: "<i class='fas fa-times'></i>",
          label: game.i18n.localize('SootRoller.Close'),
        },
      },
      default: "yes",
    }).render(true);
  }
async SootRollerPopup ( ) { const maxDice = game . settings . get ( "foundryvtt-sootroller" , "maxDiceCount" ) ; const defaultDice = game . settings . get ( "foundryvtt-sootroller" , "defaultDiceCount" ) + 1 ; new Dialog ( { title : ` ${ game . i18n . localize ( 'SootRoller.RollTitle' ) } ` , content : ` ${ game . i18n . localize ( 'SootRoller.Roll' ) } ${ game . i18n . localize ( 'SootRoller.RollNumberOfDice' ) } ${ Array ( maxDice + 1 ) . fill ( ) . map ( ( item , i ) => ` ${ i } ${ i } ` ) . join ( '' ) } ${ game . i18n . localize ( 'SootRoller.Difficulty' ) } ${ game . i18n . localize ( 'SootRoller.Difficulty1' ) } ${ game . i18n . localize ( 'SootRoller.Difficulty2' ) } ${ game . i18n . localize ( 'SootRoller.Difficulty3' ) } ${ game . i18n . localize ( 'SootRoller.Difficulty4' ) } ${ game . i18n . localize ( 'SootRoller.Difficulty5' ) } ${ game . i18n . localize ( 'SootRoller.Difficulty6' ) } ${ game . i18n . localize ( 'SootRoller.Opposition' ) } ${ game . i18n . localize ( 'SootRoller.None' ) } ` , buttons : { yes : { icon : "<i class='fas fa-check'></i>" , label : game . i18n . localize ( 'SootRoller.Roll' ) , callback : async ( html ) => { const dice_amount = parseInt ( html . find ( '[name="dice"]' ) [ 0 ] . value ) ; const difficulty = html . find ( '[name="diff"]' ) [ 0 ] . value ; const opposition = html . find ( '[name="opp"]' ) [ 0 ] . value ; await this . SootRoller ( "" , dice_amount , difficulty , opposition ) ; } } , no : { icon : "<i class='fas fa-times'></i>" , label : game . i18n . localize ( 'SootRoller.Close' ) , } , } , default : "yes" , } ) . render ( true ) ; }
Create popup for roller
 @return none
Create popup for roller @return none