Junior Member
Join Date: Jun 2011
Posts: 3
|
Yup, I really didn't bring up my point well (=at all), I meant to say, that if there was a working javascript engine somewhere there, maybe exposing it (as an experimental/advanced feature) could solve these kind of problems.
Last edited by Cursed; February 14th, 2017 at 06:14 AM. |
#11 |
Senior Member
Join Date: Oct 2014
Location: Chicago, IL
Posts: 1,690
|
I see. Yes, it would solve many problems if there was an exposed scripting engine and RW had an appropriate document interface.
my Realm Works videos https://www.youtube.com/channel/UCZU...4DwXXkvmBXQ9Yw |
#12 |
Senior Member
Join Date: Oct 2011
Posts: 118
|
This video (and the series) is very helpful! Thankyou Daplunk.
Early on I was playing with a suggestion someone else made to add a HTML page, with java script, in to RW to add random tables that could be opened and generated within RW itself. Not sure if this is common knowledge or something that has since been superseded, but the original thread is here. The result of this method will display in RW and have clickable buttons to generate random details for anything you like. Once you attach the complete webpage in RW you no longer have to have internet access to use the generator. Now I am not a programmer, so cant answer any questions on that side of things, but I was able to do some copy-paste programming (i.e. cheating) to create random encounter tables for Kingmaker. The results look like this: Not sure if this is useful or not, but thought it was maybe worth sharing this? I can take no credit for this idea - smarter people than I were using it and helped me to create the generators. Last edited by Jaynay27; March 3rd, 2017 at 07:39 PM. Reason: Spelling and formatting |
#13 |
Senior Member
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,293
|
Oh hell yes this is exactly the type of thing I've been wondering if possible.
Realm Works - Community Links Realm Work and Hero Lab Videos Ream Works Facebook User Group CC3+ Facebook User Group D&D 5e Community Pack - Contributor General Hero Lab Support & Community Resources D&D 5e Community Pack - Install Instructions / D&D 5e Community Pack - Log Fault / D&D 5e Community Pack - Editor Knowledge Base Obsidian Obsidian TTRPG Tutorials |
#14 |
Senior Member
Join Date: Oct 2011
Posts: 118
|
|
#15 |
Senior Member
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,293
|
This means it's possible to make dice rollers inside realm works.
Realm Works - Community Links Realm Work and Hero Lab Videos Ream Works Facebook User Group CC3+ Facebook User Group D&D 5e Community Pack - Contributor General Hero Lab Support & Community Resources D&D 5e Community Pack - Install Instructions / D&D 5e Community Pack - Log Fault / D&D 5e Community Pack - Editor Knowledge Base Obsidian Obsidian TTRPG Tutorials |
#16 |
Senior Member
Join Date: Oct 2011
Posts: 118
|
Quote:
Now that could be VERY useful indeed. Also - Happy to share the webpages I have if that would be useful (kingmaker encounter tables for all 6 books). Like I said before though, I am not a programmer, so some of the more complex stuff s beyond me. The code for the pages looks something like this: Code:
<HTML> <HEAD> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <TITLE>Kingmaker - Stolen Land</TITLE> </HEAD> <BODY> <script language="JavaScript"> // Some Arrays function rand(x) { return Math.floor(Math.random() * x) + 1; } function tableResults(argument) { var hexencounterArray = []; var DayornightArray = []; var aquaticArray = []; var forestArray = []; var hillsArray = []; var mountainsArray = []; var tundraArray = []; hexencounterArray.push({"max": 5, "content": "Random Encounter"}); hexencounterArray.push({"max": 100, "content": "No Encounter"}); DayornightArray.push({"max": 15, "content": "Random Encounter"}); DayornightArray.push({"max": 100, "content": "No Encounter"}); aquaticArray.push({"max": 5, "content": rand(6) + " bandits; CR 1"}); aquaticArray.push({"max": 11, "content": rand(4) + " boars; CR 3"}); aquaticArray.push({"max": 17, "content": rand(4) + " boggards; CR 3"}); aquaticArray.push({"max": 21, "content": "1 brush thylacine; CR 2"}); aquaticArray.push({"max": 28, "content": rand(6) + " elk; CR 5"}); aquaticArray.push({"max": 32, "content": "1 faerie dragon; CR 2"}); aquaticArray.push({"max": 35, "content": rand(4) + " grigs; CR 2"}); aquaticArray.push({"max": 41, "content": "1 grizzly bear; CR 4"}); aquaticArray.push({"max": 49, "content": "1 hunter; CR 1/3"}); aquaticArray.push({"max": 57, "content": "1 nixie; CR 1"}); aquaticArray.push({"max": 62, "content": "1 owlbear; CR 4"}); aquaticArray.push({"max": 69, "content": "1 shambling mound; CR 6"}); aquaticArray.push({"max": 75, "content": "1 slurk; CR 2"}); aquaticArray.push({"max": 79, "content": "1 tatzlwyrm; CR 2"}); aquaticArray.push({"max": 83, "content": rand(4) + " trolls; CR 7"}); aquaticArray.push({"max": 90, "content": "1 will o wisp; CR 6"}); aquaticArray.push({"max": 96, "content": rand(6) + " wolves; CR 4"}); aquaticArray.push({"max": 100, "content": "1 worg; CR 2"}); forestArray.push({"max": 4, "content": rand (6) + " bandits; CR 1"}); forestArray.push({"max": 11, "content": rand(4) + " Boars; CR 3"}); forestArray.push({"max": 14, "content": rand(4) + " boggards; CR 3"}); forestArray.push({"max": 20, "content": "1 brush thylacine; CR 2"}); forestArray.push({"max": 29, "content": rand(6) + " elk; CR 5"}); forestArray.push({"max": 35, "content": "1 faerie dragon; CR 2"}); forestArray.push({"max": 42, "content": rand(4) + " grigs; CR 2"}); forestArray.push({"max": 47, "content": "1 grizzly bear; CR 4"}); forestArray.push({"max": 54, "content": "1 hunter; CR 1/3"}); forestArray.push({"max": 57, "content": rand(8) + " mites; CR 1"}); forestArray.push({"max": 63, "content": "1 owlbear; CR 4"}); forestArray.push({"max": 68, "content": "1 shambling mound; CR 6"}); forestArray.push({"max": 71, "content": "1 slurk; CR 2"}); forestArray.push({"max": 75, "content": "1 tatzlwyrm; CR 2"}); forestArray.push({"max": 79, "content": rand(4) + " trolls; CR 7"}); forestArray.push({"max": 82, "content": "1 werewolf; CR 2"}); forestArray.push({"max": 85, "content": "1 giant whiptail centipede; CR 3"}); forestArray.push({"max": 90, "content": "1 will o wisp; CR 6"}); forestArray.push({"max": 97, "content": rand(6) + " wolves; CR 4"}); forestArray.push({"max": 100, "content": "1 worg; CR 2"}); hillsArray.push({"max": 8, "content": rand(6) + " bandits; CR 1"}); hillsArray.push({"max": 14, "content": rand(4) + " Boars; CR 3"}); hillsArray.push({"max": 19, "content": "1 brush thylacine; CR 2"}); hillsArray.push({"max": 27, "content": rand(6) + " elk; CR 5"}); hillsArray.push({"max": 30, "content": "1 faerie dragon; CR 2"}); hillsArray.push({"max": 35, "content": rand(4) + " grigs; CR 2"}); hillsArray.push({"max": 45, "content": "1 hunter; CR 1/3"}); hillsArray.push({"max": 51, "content": rand(8) + " Kobolds; CR 1"}); hillsArray.push({"max": 55, "content": rand(8) + " mites; CR 1"}); hillsArray.push({"max": 59, "content": "1 owlbear; CR 4"}); hillsArray.push({"max": 62, "content": "1 shambling mound; CR 6"}); hillsArray.push({"max": 67, "content": "1 tatzlwyrm; CR 2"}); hillsArray.push({"max": 70, "content": rand(4) + " trolls; CR 7"}); hillsArray.push({"max": 74, "content": "1 werewolf; CR 2"}); hillsArray.push({"max": 81, "content": "1 giant whiptail centipede; CR 3"}); hillsArray.push({"max": 86, "content": "1 will o wisp; CR 6"}); hillsArray.push({"max": 95, "content": rand(6) + " wolves; CR 4"}); hillsArray.push({"max": 100, "content": "1 worg; CR 2"}); mountainsArray.push({"max": 7, "content": "1 hoarfrost spirit; CR 3; Pathfinder #51 pg 14"}); mountainsArray.push({"max": 14, "content": "1 ice troll; CR 4; Bestiary 2 pg 271"}); mountainsArray.push({"max": 43, "content": "1 yeti; CR 4; Bestiary pg 287"}); mountainsArray.push({"max": 56, "content": "1 frost drake; CR 7 Bestiary 2 pg 108"}); mountainsArray.push({"max": 69, "content": "1 frost giant; CR 9 Bestiary pg 149"}); mountainsArray.push({"max": 75, "content": "1 witchfire; CR 9; Bestiary 2 pg 284"}); mountainsArray.push({"max": 84, "content": "1 frostfallen mammoth; CR 10; Pathfinder #51 pg 84"}); mountainsArray.push({"max": 92, "content": "1 saumen kar; CR 10; Pathfinder #51 pg 90"}); mountainsArray.push({"max": 100, "content": "1 frost worm; CR 12; Bestiary 2 pg 126"}); tundraArray.push({"max": 6, "content": rand(6) + " bandits; CR 1"}); tundraArray.push({"max": 15, "content": rand(4) + " Boars; CR 3"}); tundraArray.push({"max": 20, "content": "1 brush thylacine; CR 2"}); tundraArray.push({"max": 28, "content": rand(6) + " elk; CR 5"}); tundraArray.push({"max": 32, "content": "1 faerie dragon; CR 2"}); tundraArray.push({"max": 38, "content": rand(4) + " grigs; CR 2"}); tundraArray.push({"max": 40, "content": "1 grizzly bear; CR 4"}); tundraArray.push({"max": 51, "content": "1 hunter; CR 1/3"}); tundraArray.push({"max": 55, "content": rand(8) + " Kobolds; CR 1"}); tundraArray.push({"max": 57, "content": rand(8) + " mites; CR 1"}); tundraArray.push({"max": 59, "content": "1 owlbear; CR 4"}); tundraArray.push({"max": 63, "content": "1 shambling mound; CR 6"}); tundraArray.push({"max": 66, "content": "1 tatzlwyrm; CR 2"}); tundraArray.push({"max": 71, "content": rand(4) + " trolls; CR 7"}); tundraArray.push({"max": 75, "content": "1 werewolf; CR 2"}); tundraArray.push({"max": 80, "content": "1 giant whiptail centipede; CR 3"}); tundraArray.push({"max": 86, "content": "1 will o wisp; CR 6"}); tundraArray.push({"max": 95, "content": rand(6) + " wolves; CR 4"}); tundraArray.push({"max": 100, "content": "1 worg; CR 2"}); var allArrays = { "Hex": hexencounterArray, "DayNight": DayornightArray, "aquatic": aquaticArray, "forest": forestArray, "hills": hillsArray, "mountains": mountainsArray, "tundra": tundraArray }; var randomNum = rand(100) + 1; var arrayOfChoices = allArrays[argument]; if (!arrayOfChoices) { return "no such set: " + argument; } var chosenString = ""; for (var itemIndex in arrayOfChoices) { var item = arrayOfChoices[itemIndex]; if (randomNum <= item.max) { chosenString = item.content; break; } } return chosenString; } </script> As the PCs enter a hex, hit the button to see if there is an encounter (5% chance) <form> <input type="button" name="Button1" value="Hex Encounter" onClick="this.form.textField1.value = tableResults('Hex')" size="" /> <textarea name="textField1" cols="40" rows="1" wrap="soft"></textarea> </form> For each day or night cycle spent exploring, hit the button to see if there is an encounter (15% chance) <form> <input type="button" name="Button2" value="Day or night encounter" onClick="this.form.textField1.value = tableResults('DayNight')" size="" /> <textarea name="textField1" cols="40" rows="1" wrap="soft"></textarea> </form> If there is a random encounter, hit the button of the corresponding terrain to generate an encounter. <form> <input type="button" name="Button3" value="Forest" onClick="this.form.textField1.value = tableResults('forest')" size="" /> <textarea name="textField1" cols="40" rows="1" wrap="soft"></textarea> </form> <form> <input type="button" name="Button4" value="Lake/River" onClick="this.form.textField1.value = tableResults('aquatic')" size="" /> <textarea name="textField1" cols="40" rows="1" wrap="soft"></textarea> </form> <form> <input type="button" name="Button5" value="Plains" onClick="this.form.textField1.value = tableResults('tundra')" size="" /> <textarea name="textField1" cols="40" rows="1" wrap="soft"></textarea> </form> <form> <input type="button" name="Button6" value="Hills" onClick="this.form.textField1.value = tableResults('hills')" size="" /> <textarea name="textField1" cols="40" rows="1" wrap="soft"></textarea> </form> </BODY> </HTML> Last edited by Jaynay27; March 3rd, 2017 at 07:57 PM. |
|
#17 |
Senior Member
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,293
|
Go further. Create the content in realm works. Add in a roller for each dice type. Export it and let the world rejoice.
Realm Works - Community Links Realm Work and Hero Lab Videos Ream Works Facebook User Group CC3+ Facebook User Group D&D 5e Community Pack - Contributor General Hero Lab Support & Community Resources D&D 5e Community Pack - Install Instructions / D&D 5e Community Pack - Log Fault / D&D 5e Community Pack - Editor Knowledge Base Obsidian Obsidian TTRPG Tutorials |
#18 |
Senior Member
Join Date: Oct 2011
Posts: 118
|
Quote:
Be really keen to see an example of what you are thinking about |
|
#19 |
Senior Member
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,293
|
Check out my sticky at the top of this sub thread. There's a video on the topic
Realm Works - Community Links Realm Work and Hero Lab Videos Ream Works Facebook User Group CC3+ Facebook User Group D&D 5e Community Pack - Contributor General Hero Lab Support & Community Resources D&D 5e Community Pack - Install Instructions / D&D 5e Community Pack - Log Fault / D&D 5e Community Pack - Editor Knowledge Base Obsidian Obsidian TTRPG Tutorials |
#20 |
|
|