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

Character sheet programming problem.

Hi I'm about to launch a game of a French indi game called Sens. It's not known well enough to have its own character sheet on roll20 yet and I've hit a roadblock on the programmation. There are 6 stats in this game: Life, Death, Cosmos, Chaos, Creation and void. You calculate the values of each stat by writting your backstory. Each sentence of your backstory is worth a certain number of points and each sentence is associated with one of the stats. All of these points add up to form the character's stats. The problem is this: I am pretty bad at programmming. I've created a repeating section for each sentence of the backstory. It looks like this: <h4>Facts</h4> <fieldset> <input type="text" name="Fact" /> <select name="attr_Rune"> <option value="Life">Life</option> <option value="Death">Death</option> <option value="Cosmos">Cosmos</option> <option value="Chaos">Chaos</option> <option value="Creation">Creation</option> <option value="Void">Void</option> <input type="number" name="attr_Value"value="0" /> The thing i'd like to do is for the values of each stat to auto calculate based by adding the values of each sentence that corresponds to this stat. For example, the rune of life should be at 6 in this example: "I'm a doctor in the base" Life 2 "I grow plants on my spare time" Life 1 "I'm the father of two twins" Life 3 But I have no idea how to do this in a repeating section and I couldn't find how to programm this on the "Building character sheets" wiki. Could anyone point me in the right direction?
1504033657
Natha
KS Backer
Sheet Author
API Scripter
Salut (pour jouer et faire une fiche pour Sens, j'imagine que tu es français ;) ). Le plus "simple" pour faire une somme de section répétable est d'utiliser un "sheet worker", des fonctions javascripts que tu écris, inclues dans la fiche, et qui se déclenchent sur un événement (ajouter une ligne, modifier un champ, supprimer une ligne etc.). Dans ces fonctions, tu peux mettre à jour d'autres champs. De l'aide là-dessus :&nbsp; <a href="https://wiki.roll20.net/Sheet_Worker_Scripts" rel="nofollow">https://wiki.roll20.net/Sheet_Worker_Scripts</a>
1504038983

Edited 1504039031
Ouais mais leur page manque enormement d'explications. J'ai aucune idee de comment programmer ca a partir de leur 5 lignes d'explications en language technique. Merci du conseil en tout cas. Je devrais apprendre le Javascript pour coder ma feuille?
1504087264
Natha
KS Backer
Sheet Author
API Scripter
Un peu de javascript, oui. Je vais essayer de te fournir un exemple, faut que je gratte un peu dans mes archives.