Battletech: A Time of War - character sheet skills upgrade (#5491)

* BTATOW Fix sheet version attribute name in initial value set, add semicolons into JavaScript to conform to expected style, and move version-specific JavScript code into its own function.

* BTATOW Fix formatting of HTML for basic attributes.

* BTATOW Fix sheet version attribute name in initial value set, add semicolons into JavaScript to conform to expected style, and move version-specific JavScript code into its own function.

* BTATOW Fix formatting of HTML for basic attributes.

* BTATOW Major rework of skills to automate as much as possible.

* BTATOW Add display names for skills.

* BTATOW Initial implementation of skill roll values being set dynamically.

* BTATOW Include user-defined subskills and specialties when rolling skills.

* BTATOW Update skills when sheet is opened.

* BTATOW Start to implement data migration for skills.

* BTATOW Start to use custom font for character sheet.

* BTATOW Add warning about upcoming skills change.

* BTATOW Add custom font files and start to add in styling to look like official character sheet.

* BTATOW More tweaking and fiddling with CSS and styling.

* BTATOW More playing around with CSS and styling.

* BTATOW Add attribute names as title property to skill fields.

* BTATOW More CSS tweaking.

* BTATOW Fixed CSS and HTML to get all the skills displaying properly.

* BTATOW Remove custom fonts and font files.

* BTATOW Display linked attribute values on skills, set skills to update when attributes are updated, and hide arrows on skill XP number picker in Firefox.

* BTATOW Add first part of skills data migration.

* BTATOW Skills data migration code implemented.

* BTATOW Only update skills on sheet open when sheet version is 3 or higher, and added in code to set new skill values once migration is done. Code to update sheet version once migration is complete not working currently.

* BTATOW Add more debug statements to try and work out why migration isn't working, and fix typo in skill object.

* BTATOW Add attribute check roll buttons, and titles for attribute names.

* BTATOW Check that old skill values have a value before trying to use them to fix TypeError: t is undefined error when running skill migration script.

* BTATOW Add rollable button to skills.

* BTATOW Update skills warning to include a date for when the skills changes will be going live.

* BTATOW Add in breaks to warning message for skills update.
This commit is contained in:
Michael Smith
2019-09-30 13:53:52 -05:00
committed by Cassie Levett
parent 0f13a1aa91
commit ff9b65ab7e
3 changed files with 1214 additions and 307 deletions
@@ -1,15 +1,136 @@
div.sheet-tab-content { display: none; }
div.sheet-tab-content {
display: none;
}
* {
box-sizing: border-box;
}
input.sheet-tab1:checked ~ div.sheet-tab1,
input.sheet-tab2:checked ~ div.sheet-tab2,
input.sheet-tab3:checked ~ div.sheet-tab3,
input.sheet-tab4:checked ~ div.sheet-tab4
{
input.sheet-tab4:checked ~ div.sheet-tab4 {
display: block;
}
input.sheet-tab
{
.sheet-main {
color: black;
font-family: "Contrail One";
font-size: 10pt;
min-width: 800px;
}
.sheet-skills-headings {
font-weight: bold;
text-align: center;
}
.sheet-skills-headings.sheet-left {
text-align: left;
}
.sheet-skills-container {
align-items: flex-end;
display: flex;
flex-direction: row;
justify-content: flex-end;
height: 20px;
max-height: 20px;
}
.sheet-skills {
margin: 1px 2px;
padding: 0;
}
button[type=roll].sheet-skill-roll {
background: none;
border: none;
border-image: none;
border-radius: 0;
box-shadow: none;
color: black;
display: flex;
font-size: 10pt;
margin: 0;
padding: 0;
}
button[type=roll].sheet-skill-roll::before {
content: none;
}
button[type=roll].sheet-d6 {
font-family: dicefontd6;
font-size: large;
}
.sheet-skills.sheet-content {
border-color: #000000;
border-radius: 0;
border-style: none none solid;
border-width: thin;
color: black;
}
.sheet-skill {
flex-grow: 1;
}
.sheet-skills-skill-level {
width: 20px;
}
.sheet-skills-linked-attributes {
width: 100px;
}
.sheet-skills-modifier {
width: 22px;
}
.sheet-skills-tnc {
width: 32px;
}
.sheet-skills-xp, input[type=number].sheet-skills-xp {
width: 26px;
}
.sheet-skill-roll {
width: 20px;
}
select.sheet-skills::-ms-expand {
display: none;
}
select.sheet-skills {
height: auto;
-moz-appearance: none;
-webkit-appearance: none;
}
input[type=number].sheet-skills::-webkit-inner-spin-button,
input[type=number].sheet-skills::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number].sheet-skills {
-moz-appearance: textfield;
}
span.sheet-skills, input.sheet-skills, select.sheet-skills {
line-height: 1;
}
.sheet-skills-labels {
bottom: 0;
text-align: center;
}
input.sheet-tab {
width: 150px;
height: 20px;
position: relative;
@@ -20,30 +141,24 @@ input.sheet-tab
z-index: 1;
}
input.sheet-tab::before
{
input.sheet-tab::before {
content: attr(title);
border: solid 1px #a8a8a8;
border-bottom-color: black;
text-align: center;
display: inline-block;
background: #fff;
background: -moz-linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);
background: -webkit-linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);
background: -ms-linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);
background: -o-linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);
background: linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);
width: 150px;
height: 20px;
font-size: 18px;
}
input.sheet-tab:checked::before
{
input.sheet-tab:checked::before {
background: #dcdcdc;
background: -moz-linear-gradient(to top, #fcfcfc, #dcdcdc, #fcfcfc);
background: -webkit-linear-gradient(to top, #fcfcfc, #dcdcdc, #fcfcfc);
@@ -53,14 +168,11 @@ input.sheet-tab:checked::before
border-bottom-color: #fff;
}
input.sheet-tab:not(:first-child)::before
{
input.sheet-tab:not(:first-child)::before {
border-left: none;
}
div.sheet-tab-content
{
div.sheet-tab-content {
border: 1px solid #a8a8a8;
border-top-color: #000;
margin: 2px 0 0 5px;
@@ -97,64 +209,64 @@ button[type=roll].sheet-blank-roll-button {
font-size: medium;
}
.sheet-wrapper{
.sheet-wrapper {
overflow: auto;
border-style: solid;
background-color: White;
border-color: lightGray;
margin: 5px auto;
border-width: thin;
padding: 10px;
width:800px;
max-width: 90%;
background-color: White;
border-color: lightGray;
margin: 5px auto;
border-width: thin;
padding: 10px;
width: 800px;
max-width: 90%;
}
.sheet-section{
.sheet-section {
overflow: auto;
border-bottom: solid 1px #1E9EE3;
}
.sheet-col{
display:block;
float:left;
width:342px;
margin-right:5px;
margin-left:5px;
.sheet-col {
display: block;
float: left;
width: 342px;
margin-right: 5px;
margin-left: 5px;
}
.sheet-input-field{
.sheet-input-field {
background-color: #1E9EE3;
display:block;
display: block;
border-radius: 5px;
color: white;
padding:5px;
margin:5px;
padding: 5px;
margin: 5px;
float: left;
}
.sheet-input-field2{
.sheet-input-field2 {
background-color: #565F67;
display:block;
display: block;
border-radius: 5px;
color: white;
padding:5px;
margin:5px;
padding: 5px;
margin: 5px;
float: left;
}
.sheet-input-field input{
.sheet-input-field input {
font-family: Narkisim;
font-size: medium;
margin-left:5px;
margin-left: 5px;
}
.sheet-input-field2 input{
.sheet-input-field2 input {
font-family: Narkisim;
font-size: medium;
margin-left:5px;
margin-left: 5px;
}
.sheet-abilities-table{
.sheet-abilities-table {
margin-left: auto;
margin-right: auto;
margin-top: 5px;
@@ -163,29 +275,29 @@ button[type=roll].sheet-blank-roll-button {
border-collapse: separate;
}
.sheet-abilities-table th{
.sheet-abilities-table th {
background-color: #1E9EE3;
color:white;
color: white;
font-weight: normal;
border-radius: 5px;
padding:5px;
padding: 5px;
}
.sheet-abilities-table td{
padding:5px;
.sheet-abilities-table td {
padding: 5px;
background-color: #9DD6F5;
border-radius: 5px;
text-align: center;
}
.sheet-specialties{
.sheet-specialties {
width: 170px;
height: 38px;
margin-bottom: 0;
resize:none;
resize: none;
}
.sheet-section-table{
.sheet-section-table {
margin-left: auto;
margin-right: auto;
margin-top: 5px;
@@ -194,26 +306,26 @@ button[type=roll].sheet-blank-roll-button {
border-collapse: separate;
}
.sheet-section-table th{
width:150px;
.sheet-section-table th {
width: 150px;
background-color: #303030;
color:white;
color: white;
font-weight: normal;
border-radius: 5px;
padding:5px;
padding: 5px;
}
.sheet-section-table td{
.sheet-section-table td {
text-align: center;
width:150px;
width: 150px;
background-color: white;
color:#303030;
color: #303030;
font-weight: normal;
border-radius: 5px;
padding:5px;
padding: 5px;
}
.sheet-section-table2{
.sheet-section-table2 {
margin-left: auto;
margin-right: auto;
margin-top: 5px;
@@ -222,39 +334,38 @@ button[type=roll].sheet-blank-roll-button {
border-collapse: separate;
}
.sheet-section-table2 th{
.sheet-section-table2 th {
background-color: #303030;
color:white;
color: white;
font-weight: normal;
border-radius: 5px;
padding:5px;
padding: 5px;
}
.sheet-section-table2 td{
.sheet-section-table2 td {
text-align: center;
background-color: white;
color:#303030;
color: #303030;
font-weight: normal;
border-radius: 5px;
padding:5px;
padding: 5px;
}
.sheet-info{
.sheet-info {
text-align: center;
width:150px;
color:#303030;
width: 150px;
color: #303030;
font-weight: normal;
font-size: 70%;
border-radius: 5px;
padding:2px;
padding: 2px;
}
.sheet-info2{
.sheet-info2 {
text-align: center;
color:#303030;
color: #303030;
font-weight: normal;
font-size: 70%;
border-radius: 5px;
padding:2px;
}
padding: 2px;
}
File diff suppressed because it is too large Load Diff
-1
View File
@@ -6,4 +6,3 @@
"preview": "battletech.png",
"instructions": "This sheet is for the legendary universe of Mechwarrior. Core rulebook is BattleTech: A Time of War. If there is any problem or this sheet needs to improve feel free to use this and update."
}