Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Developing a bare bones Star Frontiers 1st Edition Character sheet

I am trying to come up with a very barebones character sheet for Star Frontiers—the original boxset rules. I do not have much experience with this, but after reading the wiki entries and looking over the basic sheets available, I have come up with an elementary sheet. I am trying to figure out how to have a roll for entered text. I understand how to roll if the die does not change: <label>STRENGTH </label><input type="text" name='attr_char_strength' class='sheet-short'>  <button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}} {{Strength=[[1d100<@{char_strength}]]}}'>STR</button> But how would I do it if the value is being entered like below: <fieldset class="repeating_weapons"> <input type="text" name="attr_weapon"/> Damage <input type="text" name="attr_dmg"/> Basic # to Hit <input type="text" name="attr_hit"/> </fieldset> Any suggestions are appreciated. tegeus.
1764979495
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Is your button in the fieldset as well? or is it outside of the fieldset?
I tried this: <fieldset class="repeating_weapons"> <input type="text" name="attr_weapon"/> Damage <input type="text" name="attr_dmg"/> Basic # to Hit <input type="text" name="attr_hit"/> <button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}}{Attack=[[1d100]]}'></button> </fieldset> That put a button on the sheet. But the button did nothing. I wanted to be able to make a 1d100 roll and compare it to a value.
1764983005
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You've got a small typo in the macro value; only a single curly bracket around the attack field should be: <fieldset class="repeating_weapons"> <input type="text" name="attr_weapon"/> Damage <input type="text" name="attr_dmg"/> Basic # to Hit <input type="text" name="attr_hit"/> <button type='roll' name='roll_testattack' value='&{template:default} {{name=@{character_name}}}{{Attack=[[1d100]]}}'></button> </fieldset> So, you were probably getting just the name field displaying. The roll was still happening, but since the field wasn't formatted correctly it wasn't displaying.
Thanks. How would I write the code so that a player could enter a value (say 1d10) and then the button would roll that value?
1764994373
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You'd use a roll query. See the wiki for full information on the chat syntax.