Tech optimisation and some bug fixes

Technical optimisations of some sheet workers with the new eventinfo.newvalue, and somes bug fixes for Antika, Cahiers du Vastemonde, Cypher System (english and french), Dungeon World (french), Mordiou, Portes Montres Trésors, Savage Worlds (french), SIG the city between, Swords & Wizardry and White Lies.
This commit is contained in:
NathaTerrien
2017-09-26 22:08:13 +02:00
parent 151015917b
commit 74277f8b3c
32 changed files with 1305 additions and 1367 deletions
+45 -50
View File
@@ -1,3 +1,45 @@
<!-- ******* SHEET WORKERS **************** -->
<script type="text/worker">
on("change:sheetusebonus", function(eventinfo) {
if(eventinfo.newValue == "1"){
setAttrs({
rollQstBonus: "?{Bonus|0|1|2|-1|-2}",
rollVarBonus: 0
});
} else {
setAttrs({
rollQstBonus: 0,
rollVarBonus: 0
});
};
});
on("change:sheetusecost", function(eventinfo) {
if(eventinfo.newValue == "1"){
setAttrs({
rollQstCost: "?{Cost|0}",
rollVarCost: 0
});
} else {
setAttrs({
rollQstCost: 0,
rollVarCost: 0
});
};
});
on("change:sheetuseasset", function(eventinfo) {
if(eventinfo.newValue == "1"){
setAttrs({
rollQstAsset: "?{Asset|0|1|2}",
rollVarAsset: 0
});
} else {
setAttrs({
rollQstAsset: 0,
rollVarAsset: 0
});
};
});
</script>
<!-- ******* PC **************** -->
<div style="display:inline-block;font-size:11px;color: #888888;text-align:left;font-weight: bold;">Style:</div>
<input type="radio" name="attr_sheetStyle" value="0" class="sheet-styleCypher" checked="checked" title="Cypher System" /><span>Cypher System</span>
@@ -9,56 +51,9 @@
<input type="radio" name="attr_sheetRolls" value="1" class="sheet-macroRoll" title="Roll using roll queries for parameters" /><span>Roll Queries</span>
<div style="display:inline-block;font-size:11px;color: #888888;text-align:left;font-weight: bold;margin-left:0px;">- Use:</div>
<input type="checkbox" name="attr_sheetUseAsset" value="1" class="sheet-chkUseAsset" title="Ask for/Use assets in attributes, skills and attacks rolls" /><span>Assets</span>
<input type="checkbox" name="attr_sheetUseBonus" value="1" class="sheet-chkUseBonus" title="Ask for/Use roll bonus in attributes, skills and attacks rolls" /><span>bonus</span>
<input type="checkbox" name="attr_sheetUseBonus" value="1" class="sheet-chkUseBonus" title="Ask for/Use roll bonus in attributes, skills and attacks rolls" /><span>Bonus</span>
<input type="checkbox" name="attr_sheetUseCost" value="1" class="sheet-chkUseCost" title="Ask for/Use cost in attributes and skills rolls" /><span>Costs</span>
<div style="display:inline-block;font-size:11px;color: #888888;text-align:left;margin-left:0px;">- v1.6 (2016-02-21)</div>
<script type="text/worker">
on("change:sheetusebonus", function() {
getAttrs(["sheetUseBonus"], function(values) {
if(values.sheetUseBonus == "1"){
setAttrs({
rollQstBonus: "?{Bonus|0|1|2|-1|-2}",
rollVarBonus: 0
});
} else {
setAttrs({
rollQstBonus: 0,
rollVarBonus: 0
});
};
});
});
on("change:sheetusecost", function() {
getAttrs(["sheetUseCost"], function(values) {
if(values.sheetUseCost == "1"){
setAttrs({
rollQstCost: "?{Cost|0}",
rollVarCost: 0
});
} else {
setAttrs({
rollQstCost: 0,
rollVarCost: 0
});
};
});
});
on("change:sheetuseasset", function() {
getAttrs(["sheetUseAsset"], function(values) {
if(values.sheetUseAsset == "1"){
setAttrs({
rollQstAsset: "?{Asset|0|1|2}",
rollVarAsset: 0
});
} else {
setAttrs({
rollQstAsset: 0,
rollVarAsset: 0
});
};
});
});
</script>
<div style="display:inline-block;font-size:11px;color: #888888;text-align:left;margin-left:0px;">- v1.7 (2017-09-17)</div>
<div class="sheet-main">
<div style="display: none;"> <!-- HIDDEN Rolls and Calculations -->
<!-- Using the Action Section -->
@@ -621,7 +616,7 @@
value="&{template:cyphBasicRoll} {{charid=@{character_id}}} {{stat=intellect}} {{diceRoll=[[1d20cs>17cf1]]}} {{attribute=@{atkintelname}}} {{attrEdge=@{intellectedge}}} {{difficulty=[[@{rollQstDiff}]]}} {{effortRoll=[[@{rollQstRollEff}]]}} {{assets=[[@{rollQstAsset}]]}} {{bonusToRoll=[[@{rollQstBonus}]]}} {{statExpense=[[@{atkintelcost}]]}} {{effortDmg=[[@{rollQstRollDmg}]]}} {{targNum=[[@{targNumQst}]]}} {{finalDiff=[[@{rollQstDiff}-(1*@{rollQstAsset})-(1*@{rollQstRollEff})-(1*@{atkintellvl})-(1*@{atkintelmod})]]}} {{targNumRoll=[[(3*@{rollQstDiff})-(3*@{rollQstAsset})-(3*@{rollQstRollEff})-(3*@{atkintellvl})-(3*@{atkintelmod})-(1*@{rollQstBonus})]]}} {{totalCost=[[@{effortCostQst}+@{atkintelcost}-@{intellectedge}]]}} {{effortCost=[[@{effortCostQst}]]}} {{bonusDmg=[[@{atkinteldmg}+@{rollQstRollDmg}*3]]}} {{skilled=[[@{atkintellvl}]]}} {{atkmod=[[@{atkintelmod}]]}}"
name="roll_macroIntelAttack"></button>
<input type="text" style="width: 305px;font-weight: bold;" name="attr_atkintelname" title="Attack: weapon or power/ability name" placeholder="Attack" />
</div>
</div>
<div class="sheet-text2" style="text-align: right;margin-bottom: 2px;">
<button type="roll" name="ShowIntelAttack" class="sheet-btDesc" title="Show in chat" value="&{template:cyphDesc} {{name=@{atkintelname}}} {{type=Attack}} {{description=Mod:@{atkintelmod}, Damage:@{atkinteldmg}, Skilled:@{atkintellvl}, Cost:@{atkintelcost}}}"><img src="https://s3.amazonaws.com/files.d20.io/images/13924213/_SbpEpVjj9V7Dow_GKKYhQ/med.png?1448153028" style="width: 16px;height:16px;"/></button>
Mod:
+4 -1
View File
@@ -3,7 +3,7 @@ Character sheet, with integrated rolls and optional API script, for the Cypher S
It can look like and be used as a sheet for _Numen&eacute;ra_ (except the armor stat cost, as per the CSR rule) or _The Strange_ (except the armor stat cost thing also, and the recursion management which requires several characters/sheets, one per recursion).
# Current version:
Version 1.6 (February 21st, 2016).
Version 1.7 (September 17th, 2017).
* Screenshot [Generic Cypher System style](CypherSystem.png)
* Screenshot [Numenera style](CypherSystem_style_Numenera.png)
@@ -42,6 +42,9 @@ Set up the API script:
# Release Notes
## Release 1.7 (September 17th, 2017)
Technical optimisation.
## Release 1.6 (February 21st, 2016)
Cosmetic changes, to ease access to the delete button on repeatable sections, and diminish repeatable sections line height.
+1 -1
View File
@@ -4,6 +4,6 @@
"authors": "Natha",
"roll20userid": "75857",
"preview": "CypherSystem.png",
"instructions": "v1.6 (2015-02-21) To set up a token that's linked to the character sheet, and optionally for API scripts to enhance rolls, check the [README](https://github.com/Roll20/roll20-character-sheets/blob/master/CypherSystem/ReadMe.md)."
"instructions": "v1.7 (2017-09-17) To set up a token that's linked to the character sheet, and optionally for API scripts to enhance rolls, check the [README](https://github.com/Roll20/roll20-character-sheets/blob/master/CypherSystem/ReadMe.md)."
,"tipeee":"https://www.tipeee.com/natharoll20"
}