Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion

Notices

Reply
 
Thread Tools Display Modes
mirtos
Senior Member
 
Join Date: Oct 2011
Posts: 865

Old September 3rd, 2014, 12:11 PM
FYI: I have moved the repository (needed to keep it separate from my work account)

Your commits are still there, and the URL is now:

https://github.com/mirtos1/RWPages
mirtos is offline   #71 Reply With Quote
Jaynay27
Senior Member
 
Join Date: Oct 2011
Posts: 116

Old September 15th, 2014, 05:35 AM
New version for book 3 uploaded to github
Jaynay27 is offline   #72 Reply With Quote
Jaynay27
Senior Member
 
Join Date: Oct 2011
Posts: 116

Old September 22nd, 2014, 05:54 AM
Sorry to keep bumping this, but book 4 has now been uploaded to github.
Jaynay27 is offline   #73 Reply With Quote
Jaynay27
Senior Member
 
Join Date: Oct 2011
Posts: 116

Old September 29th, 2014, 04:20 AM
OK - last time

Books 5 & 6 have been added, plus a chart for another encounter in book 6 (very basic).

I have modified the layout for the book 5 encounter chart and would appreciate feedback on this file.

I also had to set one of the encounter frequencies to 1% (1 out of 100) for 'chexencounter' but setting the line as
Code:
chexencounterArray.push({"max": 1, "content": "Random Encounter"});
seemed to return only a 'no encounter' response, so I worked backwards and on a '2' it will return an encounter result (infrequently). I must have clicked 500-600 times with the max value of 1, with no encounter result returned!

Currently the code is
Code:
chexencounterArray.push({"max": 2, "content": "Random Encounter"});
but I am not sure this is right for generating a 1% encounter chance, however it does return an encounter result fairly rarely.

Thanks again for everyone's help - couldn't have done it without you

Files uploaded to github.

Will try to make some time to update the previous pages to the 'nicer' format if you guys like it.

Last edited by Jaynay27; September 29th, 2014 at 04:26 AM.
Jaynay27 is offline   #74 Reply With Quote
Acenoid
Senior Member
 
Join Date: Dec 2013
Posts: 660

Old September 29th, 2014, 04:31 PM
Hi there!

Iam did not lookat all at the previous pages, but it should be possible do print the used random seed number on screen as well. This way you can control if everything is working.
Acenoid is offline   #75 Reply With Quote
Gord
Senior Member
 
Join Date: Aug 2010
Location: Calgary, Alberta
Posts: 351

Old April 26th, 2015, 09:39 AM
Thanks for the effort that went into this. After never being able to get the html to work before, I worked through this and managed it. It turned out that my big stumbling block was merely figuring out that I needed something like Notepad ++ to be able to save the source code as a file rather than cutting and pasting it into a snippet.

Blindingly obvious to most of you, I'm sure but it's been a long time since I tried to learn Fortran using punch cards at university.
Gord is offline   #76 Reply With Quote
r-Kelleg
Junior Member
 
Join Date: Nov 2012
Posts: 25

Old April 12th, 2016, 01:47 AM
hi there !
thank you for the inspiration and the code.

Using the first script of this thread and a table created by http://theaussiegm.tumblr.com/ I made a quick and dirty NPC generator

it generates descriptions like these:

"Brifley is a impatient tall and wide sized venerable female monster with a religious symbol, who thinks that the most important is knowledge first "

or

"Elith is a cheerful short and thin sized very young male human with a big scar, who thinks that the most important is good and law"

the page is attached to this post

enjoy
Attached Files
File Type: zip NPCgen.zip (1.7 KB, 4 views)
r-Kelleg is offline   #77 Reply With Quote
Merion
Senior Member
 
Join Date: Mar 2014
Location: Germany, so please bear with my English
Posts: 277

Old April 16th, 2016, 06:36 AM
Hi there,

great stuff! Even if it would be way better, if RW had this onboard itself, especially with topics as input ("give me a random magic item out of my magic trinkets category").

I tried to adapt what I've seen here into a simple script to generate the results of criticals hits and misses. Unfortunately having no JS experience lead to me failing There's obviously something I missed as it's not working.

Here's what I produced, maybe one of you guys can spot the error:
Code:
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>Critical Hits and Misses</TITLE>
</HEAD>
<BODY>

<script language="JavaScript">
rnd.today=new Date();
rnd.seed=rnd.today.getTime();

crit = new makeArray(20);
crit[0] = "​Double damage​";
crit[1] = "​Double damage​";
crit[2] = "​Double damage​";
crit[3] = "​Double damage​";
crit[4] = "​Double damage​";
crit[5] = "​Double damage​";
crit[6] = "​Double damage​";
crit[7] = "​Double damage​";
crit[8] = "​Double damage​";
crit[9] = "​Double damage​";
crit[10] = "​Double damage and foe drops weapons (5-30 feet away)​";
crit[11] = "​Double damage and foe is knocked down.​";
crit[12] = "​Double damage and foe's weapon or attacking appendage is broken/destroyed.​";
crit[13] = "​Double damage and foe is -1 to hit until healed​";
crit[14] = "​Double damage and loses one round of action (STUNNED, No DEX Modifier on AC).​";
crit[15] = "​Double damage and foe is -2 to hit until healed.​";
crit[16] = "​Double damage and loses two rounds of action (STUNNED, No DEX Modifier on AC).​";
crit[17] = "​Triple damage, foe loses their weapon arm (or attacking appendage).​";
crit[18] = "​Foe is dropped to 0 hp.* You may choose to coup de grâce or knock them unconscious.​";
crit[19] = "​Foe is decapitated.​";

fail = new makeArray(20);
fail[0] = "​You have killed yourself (0 HP, bleeding out).​";
fail[1] = "​Double damage and you knock yourself unconscious for 1d4 rounds​";
fail[2] = "​Maximum single damage to yourself and you break your weapon.​";
fail[3] = "​Maximum single damage to yourself and you are stunned for one round (STUNNED, No DEX Modifier on AC).​";
fail[4] = "​Maximum single damage to yourself and you are stunned for one round (STUNNED, No DEX Modifier on AC) and you are -1 to hit until healed.​";
fail[5] = "​You accidentally knock out your closest ally for 1d4 rounds.​";
fail[6] = "​You accidentally break the weapon of your nearest ally.​";
fail[7] = "​You accidentally strike your nearest ally for maximum single damage.​";
fail[8] = "​You accidentally knock the weapon out of the hand of your closest ally.​";
fail[9] = "​You accidentally knock down your closest ally down.​";
fail[10] = "​You fall down, break your weapon and sustain normal damage.​";
fail[11] = "​You fall down, lose your weapon (5-30 feet away) and sustain normal damage.​";
fail[12] = "​You break your weapon and sustain normal damage.​";
fail[13] = "​You fall down (No DEX Modifier on AC next round) and sustain normal damage.​";
fail[14] = "​You lose your weapon (5-30 feet away) and sustain normal damage.​";
fail[15] = "​You break your weapon.​";
fail[16] = "​You fall down (No DEX Modifier on AC next round).​";
fail[17] = "​You lose your weapon (5-30 feet away).​";
fail[18] = "​You sustain normal damage on yourself.​";
fail[19] = "​Your failed attack leaves you exposed, +2 to hit on you next round.​";

function rnd() {
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
rnd.seed = (rnd.seed*9301+49297) % 233280;
return rnd.seed/(233280.0);
};

function rand(number) {
return Math.ceil(rnd()*number)-1;
};

function makeArray(n) {
this.length = n;
for(var i = 1; i <= n; i++)
this[i] = "";
return this;
} ;// End of function makeArray

function f_crit() { // crits
return crit_value[rand(20)];
};

function f_fail() { // fails
return fail_value[rand(20)];
};

</script>

<form>
<input type="button" name="Crits" value="Generate Crit" onClick="this.form.textField1.value = f_crit()" size="" />
<textarea name="textField1" cols="60" rows="1" wrap="soft"></textarea>
</form>
<form>
<input type="button" name="Fails" value="Generate Fail" onClick="this.form.textField1.value = f_fail()" size="" />
<textarea name="textField1" cols="60" rows="1 wrap="soft"></textarea>
</form>

</BODY>
</HTML>
Merion is offline   #78 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:38 AM.


Powered by vBulletin® - Copyright ©2000 - 2018, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.