<%* // load dataview and statblock APIs const dv = this.app.plugins.plugins["dataview"].api; const bestiary = FantasyStatblocks.getBestiary(); // convert array of creatures to dataview array const creaturesAsDvArray = dv.array(Array.from(bestiary.values())); // replace array objects with creature name property let creaturesArray = creaturesAsDvArray.name; // present array as suggester (esc to cancel) let creature = await tp.system.suggester((name) => name, creaturesArray, true, "", 10); let name = await tp.system.prompt("Name:", "Unnamed", false); let imageUrl = await tp.system.prompt("URL:", "", false); -%>
dice: true
columns: 2
forceColumns: true
creature: <% creature %>
name: <% name %>
image: <% imageUrl %>