-
-
Compétences Sociales
+
+
+
+
+
+
Sociales
-
+
-
-
+
+
For
Agi
Per
@@ -1326,13 +1619,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1343,13 +1636,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1360,13 +1653,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1377,13 +1670,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1394,13 +1687,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1411,13 +1704,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1428,13 +1721,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1445,13 +1738,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1462,13 +1755,13 @@
Psy
Chn
-
+
-
+
-
-
+
+
For
Agi
Per
@@ -1479,13 +1772,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1496,13 +1789,13 @@
Psy
Chn
-
+
-
+
-
-
+
+
For
Agi
Per
@@ -1513,13 +1806,13 @@
Psy
Chn
-
+
-
+
-
-
+
+
For
Agi
Per
@@ -1530,13 +1823,13 @@
Psy
Chn
-
+
-
+
-
-
+
+
For
Agi
Per
@@ -1547,17 +1840,17 @@
Psy
Chn
-
+
-
-
-
Competences Clandestines
+
+
+
Clandestines
-
+
-
-
+
+
For
Agi
Per
@@ -1568,13 +1861,13 @@
Psy
Chn
-
+
-
+
-
-
+
+
For
Agi
Per
@@ -1585,13 +1878,13 @@
Psy
Chn
-
+
-
+
-
-
+
+
For
Agi
Per
@@ -1602,13 +1895,13 @@
Psy
Chn
-
+
-
+
-
-
+
+
For
Agi
Per
@@ -1619,13 +1912,13 @@
Psy
Chn
-
+
-
+
-
-
+
+
For
Agi
Per
@@ -1636,13 +1929,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1653,13 +1946,13 @@
Psy
Chn
-
+
-
-
+
+
-
-
+
+
For
Agi
Per
@@ -1670,11 +1963,80 @@
Psy
Chn
-
+
-
+
+
+
+
+ {{name}} — {{roll_name}}
+ Test au d{{dice_name}} seuil {{threshold}}
+
+ {{#rollWasCrit() result}}
+ Critique ! {{result}}x2 degrés de réussite
+ {{/rollWasCrit() result}}
+ {{#^rollWasCrit() result}}
+ {{#rollWasFumble() result}}
+ {{#rollGreater() result 1}}
+ Échec critique ! {{result}}/2 degrés de réussite
+ {{/rollGreater() result 1}}
+ {{#rollBetween() result 0 1}}
+ Échec critique ! {{result}}/2 degré de réussite
+ {{/rollBetween() result 0 1}}
+ {{#rollLess() result 0}}
+ Échec critique ! {{result}}x2 degrés d'échec
+ {{/rollLess() result 0}}
+ {{/rollWasFumble() result}}
+ {{#^rollWasFumble() result}}
+ {{#rollGreater() result 1}}
+ {{result}} degrés de réussite
+ {{/rollGreater() result 1}}
+ {{#rollBetween() result 0 1}}
+ {{result}} degré de réussite
+ {{/rollBetween() result 0 1}}
+ {{#rollLess() result 0}}
+ {{result}} degrés d'échec
+ {{/rollLess() result 0}}
+ {{/^rollWasFumble() result}}
+ {{/^rollWasCrit() result}}
+
+
+
+
+
+ {{name}} — {{roll_name}}
+ 1d10+{{value}} = {{result}}
+ {{#rollWasCrit() result}}
+ +{{base}}
+ {{/rollWasCrit() result}}
+ {{#rollWasFumble() result}}
+ {{result}}-{{base}}
+ {{/rollWasFumble() result}}
+
+
+
diff --git a/helpers/gencss.css b/helpers/gencss.css
index 5d67c3a..a3d3b99 100644
--- a/helpers/gencss.css
+++ b/helpers/gencss.css
@@ -2,20 +2,276 @@ div.sheet-tab-content { display: none; }
input.sheet-tab1:checked ~ div.sheet-tab1,
input.sheet-tab2:checked ~ div.sheet-tab2,
input.sheet-tab3:checked ~ div.sheet-tab3
-{display: block;}
-
-input.sheet-physique1:checked ~ div.sheet-physique1,
-input.sheet-physique2:checked ~ div.sheet-physique2,
-input.sheet-physique3:checked ~ div.sheet-physique3,
-input.sheet-physique4:checked ~ div.sheet-physique4
-{display: block;}
-
-input.sheet-intelectuelles1:checked ~ div.sheet-intelectuelles1,
-input.sheet-intelectuelles2:checked ~ div.sheet-intelectuelles2,
-input.sheet-intelectuelles3:checked ~ div.sheet-intelectuelles3
-{display: block;}
-
-input.sheet-social1:checked ~ div.sheet-social1,
-input.sheet-social2:checked ~ div.sheet-social2,
-input.sheet-social3:checked ~ div.sheet-social3
-{display: block;}
+{
+ display: block;
+}
+input.sheet-secondary_physique_tab1:checked ~ div.sheet-secondary_physique_tab1,
+input.sheet-secondary_physique_tab2:checked ~ div.sheet-secondary_physique_tab2,
+input.sheet-secondary_physique_tab3:checked ~ div.sheet-secondary_physique_tab3,
+input.sheet-secondary_physique_tab4:checked ~ div.sheet-secondary_physique_tab4
+{
+ display: block;
+}
+input.sheet-secondary_intelectuelles_tab1:checked ~ div.sheet-secondary_intelectuelles_tab1,
+input.sheet-secondary_intelectuelles_tab2:checked ~ div.sheet-secondary_intelectuelles_tab2,
+input.sheet-secondary_intelectuelles_tab3:checked ~ div.sheet-secondary_intelectuelles_tab3
+{
+ display: block;
+}
+input.sheet-secondary_social_tab1:checked ~ div.sheet-secondary_social_tab1,
+input.sheet-secondary_social_tab2:checked ~ div.sheet-secondary_social_tab2,
+input.sheet-secondary_social_tab3:checked ~ div.sheet-secondary_social_tab3
+{
+ display: block;
+}input.sheet-tab{
+ -moz-appearance: none;
+ width:150px;
+ height: 20px;
+ top: 5px;
+ left: 6px;
+ margin: 5px;
+ cursor: pointer;
+ z-index: 1;
+ content: attr(title);
+}
+input.sheet-tab::before{
+ -moz-appearance: none;
+ content: attr(title);
+ border-radius:.5em;
+ border:2px solid black;
+ text-align: center;
+ display: inline-block;
+ background: black;
+ color:white;
+ width: 150px;
+ height: 20px;
+ font-size: 18px;
+}
+input.sheet-tab:checked::before{
+ -moz-appearance: none;
+ background:#CCCCCC;
+ color:black;
+ border-radius:.5em;
+ border:2px solid black;
+}
+
+input.sheet-small_tab{
+ -moz-appearance: none;
+ width:120px;
+ height: 20px;
+ cursor: pointer;
+ z-index: 1;
+ margin:5px;
+}
+input.sheet-small_tab::before{
+ -moz-appearance: none;
+ content: attr(title);
+ border-radius:.5em;
+ text-align: center;
+ display: inline-block;
+ color:white;
+ background:black;
+ border:2px solid black;
+ width: 120px;
+ height:20px;
+ font-size: 14px;
+}
+input.sheet-small_tab:checked::before{
+ -moz-appearance: none;
+ border:2px solid black;
+ background:#CCCCCC;
+ color:black;
+ border-radius:.5em;
+}
+
+input.sheet-skill_name{
+ -moz-appearance: none;
+ width:400px;
+}
+input.sheet-skill_hidden{
+ visibility: hidden;
+}
+div.sheet-tab-content{
+ border-top-color: #000;
+ margin: 2px 0 0 0;
+}
+select.sheet-skill_select{
+ width:55px;
+ margin-bottom:-1px;
+}
+select.sheet-dice_select{
+ width:85px;
+ margin-bottom:-1px;
+}
+.sheet-trait{
+ width: 30px;
+}
+.sheet-numberbox {
+ width: 50px;
+}
+
+.sheet-rolltemplate-d10init table,
+.sheet-rolltemplate-d10skillcheck table {
+ border-radius: 6px;
+ width:100%;
+ padding:0px;
+ margin:0px;
+ padding: 2px;
+ border: 1px solid;
+ background-color: #ffffff;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #000;
+ border-image-source: none;
+}
+.sheet-rolltemplate-d10init .sheet-roll-title,
+.sheet-rolltemplate-d10init th,
+.sheet-rolltemplate-d10skillcheck .sheet-roll-title,
+.sheet-rolltemplate-d10skillcheck th {
+ color: rgb(42, 42, 42);
+ padding:0px;
+ margin:0px;
+ padding-left: 5px;
+ font-size: 1.2em;
+ text-align: left;
+ font-family: "Times New Roman", Times, serif;
+ font-variant: small-caps;
+ text-transform: capitalize;
+ border-width: 0px;
+}
+.sheet-rolltemplate-d10init .sheet-roll-attr,
+.sheet-rolltemplate-d10skillcheck .sheet-roll-attr{
+ color: #555555;
+ font-size: 1em;
+ font-style: italic;
+ padding:0px;
+ margin:0px;
+ padding-left: 9px;
+ border-width: 0px;
+ margin-top: -10px;
+}
+.sheet-rolltemplate-d10init .sheet-roll-sucess,
+.sheet-rolltemplate-d10skillcheck .sheet-roll-sucess ,
+.sheet-rolltemplate-d10skillcheck .sheet-roll-fail {
+ padding:0px;
+ margin:0px;
+ border-width: 0px;
+ padding-left: 5px;
+}
+.sheet-rolltemplate-d10skillcheck .sheet-roll-crit {
+ padding:0px;
+ margin:0px;
+ border-width: 0px;
+ padding-left: 5px;
+ background-color:#b0d6ad;
+}
+.sheet-rolltemplate-d10skillcheck .sheet-roll-fumble {
+ padding-left: 5px;
+ border-width: 0px;
+ background-color:#d6adad;
+}
+.sheet-rolltemplate-d10init .sheet-inline,
+.sheet-rolltemplate-d10init .inlinerollresult,
+.sheet-rolltemplate-d10skillcheck .sheet-inline,
+.sheet-rolltemplate-d10skillcheck .inlinerollresult {
+ background-color: transparent;
+ border: none;
+ font-weight: bold;
+ padding:0px;
+ font-family: "Times New Roman", Times, serif;
+}
+.sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullcrit,
+.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullcrit {
+ color: #3FB315;
+ border: none;
+}
+.sheet-rolltemplate-d10skillcheck .sheet-inline.sheet-fullfail,
+.sheet-rolltemplate-d10skillcheck .inlinerollresult.fullfail {
+ color: #B31515;
+ border: none;
+}
+.sheet-rolltemplate-d10skillcheck .inlinerollresult.importantroll {
+ color: #4A57ED;
+ border: none;
+}
+
+.sheet-rolltemplate-d10fight-blob{
+ border-radius: 6px;
+ border: 1px solid #898989;
+ z-index: 1;
+}
+.sheet-rolltemplate-d10fight table{
+ padding:0px;
+ margin:0px;
+ text-align: left;
+ width:100%;
+ border:none;
+ cellpadding:3px;
+ cellspacing:0px;
+}
+.sheet-rolltemplate-d10fight .sheet-sum{
+ padding:0px;
+ margin:0px;
+ border:none;
+ text-align: right;
+ padding-right:10px;
+}
+.sheet-rolltemplate-d10fight .sheet-sucess,
+.sheet-rolltemplate-d10fight .sheet-line{
+ padding:0px;
+ margin:0px;
+ padding-left: 3px;
+ border:none;
+}
+.sheet-rolltemplate-d10fight .sheet-critical{
+ padding:0px;
+ margin:0px;
+ border:none;
+ padding-left: 3px;
+ border-radius: 4px;
+ background-color:#b0d6ad;
+}
+.sheet-rolltemplate-d10fight .sheet-hit{
+ padding:0px;
+ margin:0px;
+ padding-left: 3px;
+ border-radius: 4px;
+ background-color:#b0d6ad;
+ border:none;
+}
+.sheet-rolltemplate-d10fight .sheet-miss{
+ padding:0px;
+ margin:0px;
+ padding-left: 3px;
+ border:none;
+ border-radius: 4px;
+ background-color:#d6adad;
+}
+.sheet-rolltemplate-d10fight .sheet-name{
+ padding:0px;
+ padding-left: 3px;
+ margin:0px;
+ border:none;
+ border-radius: 4px;
+ border-bottom-left-radius: 2px;
+ border-bottom-right-radius: 2px;
+ background-color: #999999;
+}
+.sheet-rolltemplate-d10fight .sheet-additional{
+ padding:0px;
+ margin:0px;
+ border:none;
+ padding-left:10px;
+}
+.sheet-rolltemplate-d10fight-grey{
+ color: #999999;
+}
+.sheet-rolltemplate-d10fight-green{
+ color: #009900;
+}
+.sheet-rolltemplate-d10fight a,
+.sheet-rolltemplate-d10fight a[href^="!"],
+.sheet-rolltemplate-d10fight a[href^="~"]{
+ text-align:right;
+ background-color: #999999; !important
+}
diff --git a/helpers/generator.py b/helpers/generator.py
index fdfffdb..e290ac2 100644
--- a/helpers/generator.py
+++ b/helpers/generator.py
@@ -4,11 +4,13 @@
# content skills sections and others from a file, on the long run, it should be able to content the whole sheet
import argparse, sys, os
-from unidecode import unidecode
+import string
+# from unidecode import unidecode
# import unicode
def remove_non_ascii(text):
- return unidecode(text)
+ return "".join([c for c in text if c in string.ascii_letters]).strip(" ")
+ # return unidecode(text)
class Node(object):
"""Generic Node."""
@@ -59,14 +61,13 @@ class Root(Node):
for child in self.children:
ret+="\ninput.sheet-tab{node.number}:checked ~ div.sheet-tab{node.number},".format(node=child)
ret=ret[:-1]
- ret+="\n{display: block;}\n"
+ ret+="\n{\n display: block;\n}"
for child in self.children:
ret+=child.css()
return ret
class Tab(Node):
"""Tab node, contains"""
-
def __init__(self, name,nb):
super(Tab, self).__init__(name,nb)
@@ -74,29 +75,30 @@ class Tab(Node):
return '
\n'.format(self=self)
def content(self):
- ret='
\n
\n'.format(self=self) # And add all content
+ ret='\n
\n'.format(self=self) # And add all content
for child in self.children:
ret+=child.header()
- ret+="
\n"
for child in self.children:
ret+=child.content()
return ret
+
def css(self):
ret=" "
for child in self.children:
- ret+="\ninput.sheet-{node.pname}{child.number}:checked ~ div.sheet-{node.pname}{child.number},".format(child=child,node=self)
+ ret+="\ninput.sheet-secondary_{node.pname}_tab{child.number}:checked ~ div.sheet-secondary_{node.pname}_tab{child.number},".format(child=child,node=self)
ret=ret[:-1]
- ret+="\n{display: block;}\n"
+ ret+="\n{\n display: block;\n}"
return ret
+
class SubTab(Node):
def __init__(self,name,nb):
super(SubTab,self).__init__(name,nb)
def header(self):
- return """
\n""".format(self=self)
+ return """
\n""".format(self=self)
def content(self):
- ret= '
\n'.format(self=self)
+ ret= '
\n'.format(self=self)
ret+=" \n
{self.name} \n".format(self=self)
for child in self.children:
ret+=child.content()
@@ -130,28 +132,35 @@ class Skill(Node):
\n""".format(self=self)
return ret
-#
- #
- # Compétences Intellectuelles
- #
- #
- #
- #
- #
- # For
- # Agi
- # Per
- # Cha
- # Int
- # Per
- # Vol
- # Psy
- # Chn
- #
- #
- #
- #
+class Repeating(Node):
+ """Repeating section"""
+ def __init__(self, name,nb):
+ super(Repeating, self).__init__(name,nb)
+
+ def content(self):
+ ret="""
+
+
+
+
+
+ For
+ Agi
+ Per
+ Cha
+ Int
+ Per
+ Vol
+ Psy
+ Chn
+
+
+
+
\n""".format(node=self)
+ return ret
if __name__ == '__main__':
# filen=sys.argv[1]
@@ -162,7 +171,7 @@ if __name__ == '__main__':
def parse(filen):
root=Root()
active_tab,active_subtab=None,None
- tab_nb,subtab_nb,skill_nb=1,1,1
+ tab_nb,subtab_nb,skill_nb,repeating_nb=1,1,1,1
try:
with open(filen,encoding="utf-8") as f:
for line in f.readlines():
@@ -180,11 +189,21 @@ if __name__ == '__main__':
tech_content=Skill(line[1:-1],skill_nb)
active_subtab.addchild(tech_content)
skill_nb+=1
+ elif line[0]==".":
+ tech_content=Repeating(line[1:-1],repeating_nb)
+ active_subtab.addchild(tech_content)
+ repeating_nb+=1
except FileNotFoundError:
print(filen,"was not found")
return root
root=parse(filen)
+ import base
with open(output,"w",encoding="utf-8") as f:
+ f.write(base.head)
+ f.write(base.script)
+ f.write(base.header)
f.write(root.content())
+ f.write(base.footer)
with open(outcss,"w",encoding="utf-8") as f:
f.write(root.css())
+ f.write(base.css_footer)
diff --git a/helpers/light.txt b/helpers/light.txt
index 9c069a3..16e7aae 100644
--- a/helpers/light.txt
+++ b/helpers/light.txt
@@ -1,3 +1,5 @@
@ Physique
-+ Compétences de combat
-- : Armes à feu
++ Combat
+- Armes à feu
++ Soc
+- Charisme
diff --git a/style.css b/style.css
index 79f3e10..98e55df 100644
--- a/style.css
+++ b/style.css
@@ -3,29 +3,26 @@ input.sheet-tab1:checked ~ div.sheet-tab1,
input.sheet-tab2:checked ~ div.sheet-tab2,
input.sheet-tab3:checked ~ div.sheet-tab3
{
- display: block;
+ display: block;
}
-input.sheet-secondary_tab1:checked ~ div.sheet-secondary_tab1,
-input.sheet-secondary_tab2:checked ~ div.sheet-secondary_tab2,
-input.sheet-secondary_tab3:checked ~ div.sheet-secondary_tab3,
-input.sheet-secondary_tab4:checked ~ div.sheet-secondary_tab4,
-input.sheet-secondary_tab5:checked ~ div.sheet-secondary_tab5
+input.sheet-secondary_physique_tab1:checked ~ div.sheet-secondary_physique_tab1,
+input.sheet-secondary_physique_tab2:checked ~ div.sheet-secondary_physique_tab2,
+input.sheet-secondary_physique_tab3:checked ~ div.sheet-secondary_physique_tab3,
+input.sheet-secondary_physique_tab4:checked ~ div.sheet-secondary_physique_tab4
{
- display:block;
+ display: block;
}
-input.sheet-secondary_magic_tab1:checked ~ div.sheet-secondary_magic_tab1,
-input.sheet-secondary_magic_tab2:checked ~ div.sheet-secondary_magic_tab2,
-input.sheet-secondary_magic_tab3:checked ~ div.sheet-secondary_magic_tab3,
-input.sheet-secondary_magic_tab4:checked ~ div.sheet-secondary_magic_tab4,
-input.sheet-secondary_magic_tab5:checked ~ div.sheet-secondary_magic_tab5
+input.sheet-secondary_intelectuelles_tab1:checked ~ div.sheet-secondary_intelectuelles_tab1,
+input.sheet-secondary_intelectuelles_tab2:checked ~ div.sheet-secondary_intelectuelles_tab2,
+input.sheet-secondary_intelectuelles_tab3:checked ~ div.sheet-secondary_intelectuelles_tab3
{
- display:block;
+ display: block;
}
-input.sheet-secondary_skills_tab1:checked ~ div.sheet-secondary_skills_tab1,
-input.sheet-secondary_skills_tab2:checked ~ div.sheet-secondary_skills_tab2,
-input.sheet-secondary_skills_tab3:checked ~ div.sheet-secondary_skills_tab3
+input.sheet-secondary_social_tab1:checked ~ div.sheet-secondary_social_tab1,
+input.sheet-secondary_social_tab2:checked ~ div.sheet-secondary_social_tab2,
+input.sheet-secondary_social_tab3:checked ~ div.sheet-secondary_social_tab3
{
- display:block;
+ display: block;
}
input.sheet-tab{