On my tabs, I've got a button for each step.
For example:
Step 1 is 1d4-2, and it's called by entering ED(4)-2
Step 10 is ED(10):ED(6)
Step 20, ED(20):ED(8):ED(6)
The function will re-roll max die rolls and add them together. Natural 1's will show up in red, and rolls that hit multiples show up in green.
If anyone can explain how to import saved tab(xml) files, that'd be great.
Here's my functions.js:
function registerFunctions() {
var map = new java.util.HashMap();
map.put("ED", step01);
return map;
}
function step01(a) {
row.label="ED("+a+")";
var roll = Math.floor(Math.random()*a)+1;
var result = roll;
if (roll == 1) {
row.setForegroundColor(255,0,0);
}
while (roll == a) {
roll = Math.floor(Math.random()*a)+1;
result = result + roll;
row.setForegroundColor(0, 255, 0);
row.label="ED("+a+")+";
}
return result;
}
EarthDawn Die Rolling Function
Thoughts, Help, Feature Requests
Moderators: dorpond, Azhrei, giliath
-
- Kobold
- Posts: 3
- Joined: Tue Oct 27, 2009 3:04 pm
Jump to
- General
- ↳ Announcements
- ↳ Ideas for New Applications
- ↳ General Discussion
- ↳ Developer Notes
- ↳ Java Programming Info
- ↳ User Creations
- ↳ Requests for HELLLLP!
- ↳ Tilesets, Token Libraries, and Complete Maps
- ↳ Token Libraries
- ↳ Tilesets/Graphics for Map-making
- ↳ Complete Maps
- ↳ Campaign Frameworks
- ↳ D&D 5e Frameworks
- ↳ D&D 4e Frameworks
- ↳ D&D 3.5/Pathfinder 1e Campaign Macros
- ↳ D&D 3.5 & PF1e Framework
- ↳ Shadowrun 4e Frameworks
- ↳ Savage Worlds Frameworks
- ↳ Published Module Support
- ↳ Tutorials
- ↳ Graphics, Images, Tokens, Maps
- ↳ Drop-In Macros and Scripts
- ↳ Campaign Frameworks
- ↳ Drop-In Macro Resources
- ↳ Links & External Resources
- ↳ Looking For Group
- ↳ "Living" Campaigns
- ↳ Dungeons and Dragons
- ↳ Savage Worlds
- ↳ WoD
- ↳ Wargaming
- ↳ Documentation Requests/Discussion
- ↳ Session Report-Back
- Tools
- ↳ MapTool
- ↳ How To
- ↳ Macros
- ↳ Feature Requests
- ↳ Resolved
- ↳ Bug Reports
- ↳ Resolved
- ↳ WIP - User FAQ
- ↳ Testing
- ↳ MapTool 1.4
- ↳ TokenTool
- ↳ DiceTool
- ↳ InitiativeTool
- ↳ CharacterTool
- ↳ Support: d20 D&D
- ↳ Support: D&D 4e
- ↳ Support: Hero System
- ↳ Support: Savage Worlds
- ↳ Support: GURPS
- Other
- ↳ RPTools Sightings
- ↳ Running Campaigns
- ↳ Thiera's College of Adventurers
- ↳ Age of Might
- ↳ Scales of War
- ↳ Renwold
- ↳ Dead Men Walking
- ↳ Dark Sun - 4th Edition
- ↳ Warhammer Fantasy Roleplay
- ↳ Return of Uchly Namen
- ↳ Insert Campaign Here
- ↳ Antium
- ↳ The Mystic Moon
- ↳ World of Lagal
- ↳ GangerRun
- ↳ FB Scales of War
- ↳ Sellswords of Eberron
- ↳ Archive
- ↳ Orbs of Chaos
- ↳ World of Omegus
- ↳ Keep on the Shadowfell - 4E
- ↳ Rise of the Runelords
- ↳ Aurith In The Age Of Steam
- ↳ Widdershins
- ↳ Nos's Pathfinder Campaign
- ↳ Falcons Hollow
- ↳ Verwirrte Welten
- ↳ With it or on it
- ↳ Starter Set - Jeff