| Register Now | |
| My Points | |
| My Games | |
I was trying to figure out on my own how to make a character sheet that not only was form fillable (with stat calculation), but also displayed the dice pools as you changed the values of characteristics and skills… no luck. I think there might be some javascript (ie Magic) way to do this, but I am not a code monkey, ape, or gorilla. Anyone have an idea? I think if we can get together the artistic people of the boards (for the layout) and the analytical (for the code) among us, this might become a rather cool project. Any takers?
| Page 1 of 2 (22 messages) | 1 2 ...Last page » |
I don't have the artistic skills to help, but I wanted to refer the excellent example of character sheets created for WFRP3 (similar dice pool system), available on: http://gitzmansgallery.com/WFRP3_Resources/index.html. The top link is the non-fillable, just under is the fillable.
It is tougher to do for EotE since the dice pool will shift depending on your char or profiency being higher (vs. WFRP3 where they just add to each other), but I'd love indeed if someone could design a character sheet fillable that ressemble the Beginner Box.
Cheers
Ceodryn
Wow, those are nice. thanks for the link.
As for the dice pool calculation, the calculation is simple in idea if not in execution. Two input variables, one defines the size of the pool and the other defines the number of proficiency symbols that replace the ability dice. I tried using google to find some examples like this, but apparently my search-fu is weak.
The code you're looking for is simple:
max(characteristic, skill) - min(characteristic, skill) number of green dice and min(characteristic, skill) number of yellow dice.
or as a JavaScript function:
function dicePool(characteristic, skill) {
var minValue = Math.min(characteristic, skill);
alert(Math.max(characteristic, skill) - minValue + "G" + minValue + "Y");
}
Of course, that doesn't contain any range checking or error handling as professional code should, and you probably want it to return something meaningful rather than just display an alert box, but that should give you the right idea.
Edge of the Empire play aids
Gribble,
You are a scholar and a gentleman. Thank you. I will tinker with this and see what falls out.
Darian Ocana said:
Gribble,
You are a scholar and a gentleman. Thank you. I will tinker with this and see what falls out.
No probs - let me know if you need any other help. This is something I'd like to see happen, just don't have the time to do it all myself.
:)
Edge of the Empire play aids
Ok, here's my first bit of JS for the character sheet. Its a dropdown selection to populate basic stats for each species. Unfortunately, there is an error somewhere in the code which is driving me nuts. If anyone sees the issue I'd appreciate a helping hand. I'm beginning to think I may have bitten off more than I can chew :P
var SpeciesName = { Bothan:{ Brawn: "1",
Agility: "2",
Intellect: "2",
Cunning: "3",
Willpower: "2",
Presence: "2",
Wounds: "10",
Strain: "11" },
Droid:{ Brawn: "1",
Agility: "1",
Intellect: "1",
Cunning: "1",
Willpower: "1",
Presence: "1",
Wounds: "10",
Strain: "10" },
Gand:{ Brawn: "2",
Agility: "2",
Intellect: "2",
Cunning: "2",
Willpower: "3",
Presence: "1",
Wounds: "10",
Strain: "10" },
Human:{ Brawn: "2",
Agility: "2",
Intellect: "2",
Cunning: "2",
Willpower: "2",
Presence: "2",
Wounds: "10",
Strain: "10" },
Rodian:{ Brawn: "2",
Agility: "3",
Intellect: "2",
Cunning: "2",
Willpower: "1",
Presence: "2",
Wounds: "10",
Strain: "10" },
Trandoshan:{ Brawn: "3",
Agility: "1",
Intellect: "2",
Cunning: "2",
Willpower: "2",
Presence: "2",
Wounds: "12",
Strain: "9" },
Twi'lek:{ Brawn: "1",
Agility: "2",
Intellect: "2",
Cunning: "2",
Willpower: "2",
Presence: "3",
Wounds: "11",
Strain: "11" },
Wookie:{ Brawn: "3",
Agility: "2",
Intellect: "2",
Cunning: "2",
Willpower: "1",
Presence: "2",
Wounds: "14",
Strain: "8" }},
function SetFieldValues(cSpeciesName)
{
this.getField("Brawn").value = SpeciesName[cSpeciesName].Brawn;
this.getField("Agility").value = SpeciesName[cSpeciesName].Agility;
this.getField("Intellect").value = SpeciesName[cSpeciesName].Intellect;
this.getField("Cunning").value = SpeciesName[cSpeciesName].Cunning;
this.getField("Willpower").value = SpeciesName[cSpeciesName].Willpower;
this.getField("Presence").value = SpeciesName[cSpeciesName].Presence;
this.getField("Wounds").value = SpeciesName[cSpeciesName].Wounds;
this.getField("Strain").value = SpeciesName[cSpeciesName].Strain;
}
Darian Ocana said:
Ok, here's my first bit of JS for the character sheet. Its a dropdown selection to populate basic stats for each species. Unfortunately, there is an error somewhere in the code which is driving me nuts. If anyone sees the issue I'd appreciate a helping hand. I'm beginning to think I may have bitten off more than I can chew :P
Two issues:
Fix those and it should work.
Edge of the Empire play aids
Actually, in JavaScript, you can have a quote in the key for "Twi'lek". Just wrap the keys in quotes. Either single-quotes, and 'escape' the inner quote (i.e: 'Twi'lek'), or just use double-quotes, and you don't have to escape the inner single-quote.
Well, here's the newest code. Thanks for the advice guys. I appreciate it. Only issue I'm having now is a "SpecData[Characteristics] is undefined" error in the debugger. I'm about to pull a Han and shoot the damn computer than deal with this anymore ;)
var SpecData = { Bothan:{ brawn: "1", agility: "2", intellect: "2", cunning: "3", willpower: "2", presence: "2", wounds: "10", strain: "11" },
Droid:{ brawn: "1", agility: "1", intellect: "1", cunning: "1", willpower: "1", presence: "1", wounds: "10", strain: "10" },
Gand:{ brawn: "2", agility: "2", intellect: "2", cunning: "2", willpower: "3", presence: "1", wounds: "10", strain: "10" },
Human:{ brawn: "2", agility: "2", intellect: "2", cunning: "2", willpower: "2", presence: "2", wounds: "10", strain: "10" },
Rodian:{ brawn: "2", agility: "3", intellect: "2", cunning: "2", willpower: "1", presence: "2", wounds: "10", strain: "10" },
Trandoshan:{ brawn: "3", agility: "1", intellect: "2", cunning: "2", willpower: "2", presence: "2", wounds: "12", strain: "9" },
"Twi'lek":{ brawn: "1", agility: "2", intellect: "2", cunning: "2", willpower: "2", presence: "3", wounds: "11", strain: "11" },
Wookie:{ brawn: "3", agility: "2", intellect: "2", cunning: "2", willpower: "1", presence: "2", wounds: "14", strain: "8" }}
function SetFieldValues(Characteristics)
{
this.getField("cBrawn").value = SpecData[Characteristics].brawn;
this.getField("cAgility").value = SpecData[Characteristics].agility;
this.getField("cIntellect").value = SpecData[Characteristics].intellect;
this.getField("cCunning").value = SpecData[Characteristics].cunning;
this.getField("cWillpower").value = SpecData[Characteristics].willpower;
this.getField("cPresence").value = SpecData[Characteristics].presence;
this.getField("cWounds").value = SpecData[Characteristics].wounds;
this.getField("cStrain").value = SpecData[Characteristics].strain;
}
Darian Ocana said:
Well, here's the newest code. Thanks for the advice guys. I appreciate it. Only issue I'm having now is a "SpecData[Characteristics] is undefined" error in the debugger. I'm about to pull a Han and shoot the damn computer than deal with this anymore ;)
Looks ok at first glance - how are you attempting to use the code above when you get the error?
Edge of the Empire play aids
Its used via a dropdown list for the species line. Select a specific species and the code is supposed to populate the individual characteristic bubbles as well as the add to the wound and strain areas. I have some minor code that erases the bubbles when the blank area of the dropdown is selected, and that works fine. My wish is make this a fully customizable character sheet, but these little code gremlins are really pissing me off. I've included the sheet with the code in the link below.
https://dl.dropbox.com/u/45811452/EotE%20Form%20Fillable%20CS%20v2.pdf
Darian Ocana said:
Its used via a dropdown list for the species line. Select a specific species and the code is supposed to populate the individual characteristic bubbles as well as the add to the wound and strain areas. I have some minor code that erases the bubbles when the blank area of the dropdown is selected, and that works fine. My wish is make this a fully customizable character sheet, but these little code gremlins are really pissing me off. I've included the sheet with the code in the link below.
Sorry man, code embedded in PDFs is starting to get outside my territory… however I suspect that what is happening is that the SpecData array is out of scope when it's being referenced - hence my question. Are you sure that the error is coming from the function, or are you referencing the the SpecData array elsewhere that may be the source of the error?
Can you provide the full debugging trace? That might help…
:)
Edge of the Empire play aids
Darian Ocana said:
Its used via a dropdown list for the species line. Select a specific species and the code is supposed to populate the individual characteristic bubbles as well as the add to the wound and strain areas. I have some minor code that erases the bubbles when the blank area of the dropdown is selected, and that works fine. My wish is make this a fully customizable character sheet, but these little code gremlins are really pissing me off. I've included the sheet with the code in the link below.
https://dl.dropbox.com/u/45811452/EotE%20Form%20Fillable%20CS%20v2.pdf
I don't get anything when trying out the sheet… :(
Without Signature
aljovin said:
Darian Ocana said:
Its used via a dropdown list for the species line. Select a specific species and the code is supposed to populate the individual characteristic bubbles as well as the add to the wound and strain areas. I have some minor code that erases the bubbles when the blank area of the dropdown is selected, and that works fine. My wish is make this a fully customizable character sheet, but these little code gremlins are really pissing me off. I've included the sheet with the code in the link below.
https://dl.dropbox.com/u/45811452/EotE%20Form%20Fillable%20CS%20v2.pdf
I don't get anything when trying out the sheet… :(
OK, I've managed… I have found your error!
The dropdown have all the names in lowercase, but the index for your SpecData are capitalized.
In Javascript bothan != Bothan
Hope this helps!
Without Signature
Wow, that did it. Thank you! On to more newbie coding :)
Here's the pdf with the corrected code.
https://dl.dropbox.com/u/45811452/EotE%20Form%20Fillable%20CS%20v2.pdf
| Page 1 of 2 (22 messages) | 1 2 ...Last page » |