mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 03:40:32 +00:00
Revert "New Character Sheet - Turn Shapeshifter Slice of Life"
This reverts commit ef5431aa64.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 3.5 MiB |
@@ -0,0 +1,510 @@
|
||||
/* ===== TURN BRAND THEME ===== */
|
||||
.charsheet.sheet-turn {
|
||||
--accent: #46b34d;
|
||||
--ink: #214f24;
|
||||
--muted: #383636;
|
||||
--paper: #fafafa;
|
||||
--card: #b2b2b2;
|
||||
--line: #440202;
|
||||
--copy-size: 12px;
|
||||
--copy-line: 1.10;
|
||||
font-family: Arial, Fantasy, sans-serif;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
/* ===== HIDDEN TOGGLE RADIOS ===== */
|
||||
.sheet-tab,
|
||||
.sheet-toggle {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ===== Banner ===== */
|
||||
.sheet-banner {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
gap: 5px;
|
||||
padding: 5px 6px;
|
||||
border: 2px solid var(--accent);
|
||||
border-radius: 7px;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(70,179,77,0.12), rgba(70,179,77,0.00)),
|
||||
var(--paper);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.sheet-title { font-size: 22px; font-weight: 800; }
|
||||
.sheet-credits { display: flex; flex-direction: column; gap: 2px; justify-content: center; }
|
||||
.sheet-credit-line { font-size: 10px; color: var(--muted); line-height: 1.3; }
|
||||
|
||||
/* ===== Cards ===== */
|
||||
.sheet-card {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--line);
|
||||
border-left: 4px solid var(--accent);
|
||||
border-radius: 10px;
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.sheet-card-h {
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
/* ===== MAIN GRID (3 COLUMN) ===== */
|
||||
.sheet-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
.sheet-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.sheet-span-3 {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
/* ===== Inputs ===== */
|
||||
input[type="text"],
|
||||
input[type="number"],
|
||||
select,
|
||||
textarea {
|
||||
width: 100%;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
padding: 4px 6px;
|
||||
font-size: var(--copy-size);
|
||||
}
|
||||
|
||||
/* ===== Compact grids ===== */
|
||||
.sheet-mini-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 6px 8px;
|
||||
}
|
||||
|
||||
/* ===== Checkbox lines ===== */
|
||||
.sheet-checkline {
|
||||
display: grid;
|
||||
grid-template-columns: 14px 1fr;
|
||||
gap: 8px;
|
||||
margin: 6px 0;
|
||||
}
|
||||
.sheet-power-block {
|
||||
margin: 6px 0;
|
||||
}
|
||||
.sheet-power-check {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-right: 6px;
|
||||
vertical-align: middle;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.sheet-power-block .sheet-hi {
|
||||
display: none;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
font-size: var(--copy-size);
|
||||
line-height: var(--copy-line);
|
||||
}
|
||||
/* Override the global .sheet-hi display:none for power blocks —
|
||||
visibility is still controlled by the archetype toggle selectors */
|
||||
|
||||
/* ===== TOPBAR ===== */
|
||||
.sheet-topbar {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.sheet-topbar-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr auto;
|
||||
gap: 8px;
|
||||
align-items: start;
|
||||
}
|
||||
.sheet-topbar-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
.sheet-track-label {
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink);
|
||||
}
|
||||
.sheet-boxes {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
/* ===== TURN DIE ===== */
|
||||
.sheet-turn-die-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.sheet-turn-die-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.sheet-turn-die-btn:hover .sheet-turn-die-face {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 3px 3px 0 var(--ink);
|
||||
}
|
||||
.sheet-turn-die-btn:active .sheet-turn-die-face {
|
||||
transform: translateY(1px);
|
||||
box-shadow: none;
|
||||
}
|
||||
.sheet-turn-die-face {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr 1fr 1fr;
|
||||
gap: 5px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
background: var(--accent);
|
||||
border: 2px solid var(--ink);
|
||||
border-radius: 10px;
|
||||
padding: 7px;
|
||||
box-shadow: 2px 2px 0 var(--ink);
|
||||
transition: transform 0.08s, box-shadow 0.08s;
|
||||
}
|
||||
.sheet-pip {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
background: #ffffff;
|
||||
border-radius: 50%;
|
||||
justify-self: center;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
/* ===== TABS ===== */
|
||||
.sheet-page { display: none; }
|
||||
.sheet-tab-human:checked ~ .sheet-page-human { display: block; }
|
||||
.sheet-tab-beast:checked ~ .sheet-page-beast { display: block; }
|
||||
|
||||
.sheet-tabs {
|
||||
display: flex;
|
||||
gap: 0;
|
||||
border-bottom: 3px solid var(--accent);
|
||||
margin-bottom: 8px;
|
||||
padding: 0;
|
||||
background: none;
|
||||
border-left: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
.sheet-tab-btn {
|
||||
flex: 1;
|
||||
display: block;
|
||||
padding: 7px 0;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--line);
|
||||
border-bottom: none;
|
||||
border-radius: 8px 8px 0 0;
|
||||
background: var(--card);
|
||||
color: var(--muted);
|
||||
transition: background 0.1s, color 0.1s;
|
||||
}
|
||||
.sheet-tab-btn-human {
|
||||
background: #d6ead7;
|
||||
color: var(--ink);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
.sheet-tab-btn-beast {
|
||||
background: #e8d0d0;
|
||||
color: var(--line);
|
||||
border-color: var(--line);
|
||||
}
|
||||
.sheet-tab-human:checked ~ .sheet-tabs .sheet-tab-btn-human {
|
||||
background: var(--accent);
|
||||
color: var(--paper);
|
||||
border-color: var(--accent);
|
||||
border-bottom: 3px solid var(--accent);
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
.sheet-tab-beast:checked ~ .sheet-tabs .sheet-tab-btn-beast {
|
||||
background: var(--line);
|
||||
color: var(--paper);
|
||||
border-color: var(--line);
|
||||
border-bottom: 3px solid var(--line);
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
|
||||
/* ===== STAT BLOCKS (habits + instincts) ===== */
|
||||
.sheet-stat-block { margin: 0; }
|
||||
.sheet-stat-grid-3col {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto auto;
|
||||
gap: 4px 6px;
|
||||
align-items: center;
|
||||
}
|
||||
.sheet-stat-grid-3col label {
|
||||
font-size: var(--copy-size);
|
||||
font-weight: 600;
|
||||
color: var(--ink);
|
||||
cursor: help;
|
||||
text-decoration: underline dotted var(--muted);
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Shared editable inputs */
|
||||
.sheet-stat-shared-inputs {
|
||||
margin-top: 6px;
|
||||
padding-top: 6px;
|
||||
border-top: 1px dashed var(--ink);
|
||||
}
|
||||
.sheet-stat-shared-inputs .sheet-habits-note {
|
||||
font-size: 10px;
|
||||
color: var(--muted);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.sheet-stat-shared-inputs input[type="text"] {
|
||||
width: 38px;
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
padding: 3px 4px;
|
||||
}
|
||||
.sheet-stat-shared-inputs .sheet-mini-grid label {
|
||||
cursor: help;
|
||||
text-decoration: underline dotted var(--muted);
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
/* ===== ROLL / ACTION BUTTONS ===== */
|
||||
/* Reset Roll20's default action button styling, then apply our design */
|
||||
button[type="action"].sheet-roll-btn,
|
||||
button[type="roll"].sheet-roll-btn {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: auto;
|
||||
min-width: 32px;
|
||||
height: 22px;
|
||||
padding: 0 5px;
|
||||
background: var(--accent);
|
||||
color: #ffffff;
|
||||
border: 2px solid var(--ink);
|
||||
border-radius: 6px;
|
||||
font-size: 9px;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
box-shadow: 1px 1px 0 var(--ink);
|
||||
transition: transform 0.08s, box-shadow 0.08s;
|
||||
}
|
||||
button[type="action"].sheet-roll-btn:hover,
|
||||
button[type="roll"].sheet-roll-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 2px 2px 0 var(--ink);
|
||||
}
|
||||
button[type="action"].sheet-roll-btn:active,
|
||||
button[type="roll"].sheet-roll-btn:active {
|
||||
transform: translateY(1px);
|
||||
box-shadow: none;
|
||||
}
|
||||
button[type="roll"].sheet-roll-struggles {
|
||||
background: var(--line);
|
||||
border-color: var(--ink);
|
||||
}
|
||||
|
||||
/* ===== ARCHETYPE VISIBILITY ===== */
|
||||
.sheet-hi,
|
||||
.sheet-hb { display: none; }
|
||||
|
||||
/* Larger text for background, human ability, beast form goals content */
|
||||
.sheet-page-human .sheet-hb,
|
||||
.sheet-page-beast .sheet-hb,
|
||||
.sheet-page-human .sheet-hi,
|
||||
.sheet-power-block .sheet-hi {
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* --- HUMAN ARCHETYPES --- */
|
||||
.sheet-toggle-human[value="a1"]:checked ~ .sheet-page-human .sheet-hi-a1 { display: inline; }
|
||||
.sheet-toggle-human[value="a1"]:checked ~ .sheet-page-human .sheet-hb-a1 { display: block; }
|
||||
|
||||
.sheet-toggle-human[value="a2"]:checked ~ .sheet-page-human .sheet-hi-a2 { display: inline; }
|
||||
.sheet-toggle-human[value="a2"]:checked ~ .sheet-page-human .sheet-hb-a2 { display: block; }
|
||||
|
||||
.sheet-toggle-human[value="a3"]:checked ~ .sheet-page-human .sheet-hi-a3 { display: inline; }
|
||||
.sheet-toggle-human[value="a3"]:checked ~ .sheet-page-human .sheet-hb-a3 { display: block; }
|
||||
|
||||
.sheet-toggle-human[value="a4"]:checked ~ .sheet-page-human .sheet-hi-a4 { display: inline; }
|
||||
.sheet-toggle-human[value="a4"]:checked ~ .sheet-page-human .sheet-hb-a4 { display: block; }
|
||||
|
||||
.sheet-toggle-human[value="a5"]:checked ~ .sheet-page-human .sheet-hi-a5 { display: inline; }
|
||||
.sheet-toggle-human[value="a5"]:checked ~ .sheet-page-human .sheet-hb-a5 { display: block; }
|
||||
|
||||
.sheet-toggle-human[value="a6"]:checked ~ .sheet-page-human .sheet-hi-a6 { display: inline; }
|
||||
.sheet-toggle-human[value="a6"]:checked ~ .sheet-page-human .sheet-hb-a6 { display: block; }
|
||||
|
||||
.sheet-toggle-human[value="a7"]:checked ~ .sheet-page-human .sheet-hi-a7 { display: inline; }
|
||||
.sheet-toggle-human[value="a7"]:checked ~ .sheet-page-human .sheet-hb-a7 { display: block; }
|
||||
|
||||
.sheet-toggle-human[value="a8"]:checked ~ .sheet-page-human .sheet-hi-a8 { display: inline; }
|
||||
.sheet-toggle-human[value="a8"]:checked ~ .sheet-page-human .sheet-hb-a8 { display: block; }
|
||||
|
||||
.sheet-toggle-human[value="a9"]:checked ~ .sheet-page-human .sheet-hi-a9 { display: inline; }
|
||||
.sheet-toggle-human[value="a9"]:checked ~ .sheet-page-human .sheet-hb-a9 { display: block; }
|
||||
|
||||
/* --- BEAST ARCHETYPES --- */
|
||||
.sheet-toggle-beast[value="a1"]:checked ~ .sheet-page-beast .sheet-hi-a1 { display: inline; }
|
||||
.sheet-toggle-beast[value="a1"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a1 { display: flex; }
|
||||
.sheet-toggle-beast[value="a1"]:checked ~ .sheet-page-beast .sheet-hb-a1 { display: block; }
|
||||
|
||||
.sheet-toggle-beast[value="a2"]:checked ~ .sheet-page-beast .sheet-hi-a2 { display: inline; }
|
||||
.sheet-toggle-beast[value="a2"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a2 { display: flex; }
|
||||
.sheet-toggle-beast[value="a2"]:checked ~ .sheet-page-beast .sheet-hb-a2 { display: block; }
|
||||
|
||||
.sheet-toggle-beast[value="a3"]:checked ~ .sheet-page-beast .sheet-hi-a3 { display: inline; }
|
||||
.sheet-toggle-beast[value="a3"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a3 { display: flex; }
|
||||
.sheet-toggle-beast[value="a3"]:checked ~ .sheet-page-beast .sheet-hb-a3 { display: block; }
|
||||
|
||||
.sheet-toggle-beast[value="a4"]:checked ~ .sheet-page-beast .sheet-hi-a4 { display: inline; }
|
||||
.sheet-toggle-beast[value="a4"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a4 { display: flex; }
|
||||
.sheet-toggle-beast[value="a4"]:checked ~ .sheet-page-beast .sheet-hb-a4 { display: block; }
|
||||
|
||||
.sheet-toggle-beast[value="a5"]:checked ~ .sheet-page-beast .sheet-hi-a5 { display: inline; }
|
||||
.sheet-toggle-beast[value="a5"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a5 { display: flex; }
|
||||
.sheet-toggle-beast[value="a5"]:checked ~ .sheet-page-beast .sheet-hb-a5 { display: block; }
|
||||
|
||||
.sheet-toggle-beast[value="a6"]:checked ~ .sheet-page-beast .sheet-hi-a6 { display: inline; }
|
||||
.sheet-toggle-beast[value="a6"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a6 { display: flex; }
|
||||
.sheet-toggle-beast[value="a6"]:checked ~ .sheet-page-beast .sheet-hb-a6 { display: block; }
|
||||
|
||||
.sheet-toggle-beast[value="a7"]:checked ~ .sheet-page-beast .sheet-hi-a7 { display: inline; }
|
||||
.sheet-toggle-beast[value="a7"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a7 { display: flex; }
|
||||
.sheet-toggle-beast[value="a7"]:checked ~ .sheet-page-beast .sheet-hb-a7 { display: block; }
|
||||
|
||||
.sheet-toggle-beast[value="a8"]:checked ~ .sheet-page-beast .sheet-hi-a8 { display: inline; }
|
||||
.sheet-toggle-beast[value="a8"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a8 { display: flex; }
|
||||
.sheet-toggle-beast[value="a8"]:checked ~ .sheet-page-beast .sheet-hb-a8 { display: block; }
|
||||
|
||||
.sheet-toggle-beast[value="a9"]:checked ~ .sheet-page-beast .sheet-hi-a9 { display: inline; }
|
||||
.sheet-toggle-beast[value="a9"]:checked ~ .sheet-page-beast .sheet-power-block .sheet-hi-a9 { display: flex; }
|
||||
.sheet-toggle-beast[value="a9"]:checked ~ .sheet-page-beast .sheet-hb-a9 { display: block; }
|
||||
|
||||
/* ===== EXTRA STRESS BOXES ===== */
|
||||
.sheet-h-extra,
|
||||
.sheet-b-extra { display: none; }
|
||||
|
||||
.sheet-toggle-human[value="a3"]:checked ~ .sheet-topbar .sheet-h-extra { display: inline; }
|
||||
.sheet-toggle-human[value="a1"]:checked ~ .sheet-topbar .sheet-b-extra { display: inline; }
|
||||
|
||||
/* ===== UPON EXPOSURE GOALS — only visible for group archetypes ===== */
|
||||
.sheet-exposure-goals { display: none; }
|
||||
.sheet-toggle-beast[value="a2"]:checked ~ .sheet-page-beast .sheet-exposure-goals { display: block; }
|
||||
.sheet-toggle-beast[value="a4"]:checked ~ .sheet-page-beast .sheet-exposure-goals { display: block; }
|
||||
.sheet-toggle-beast[value="a6"]:checked ~ .sheet-page-beast .sheet-exposure-goals { display: block; }
|
||||
.sheet-toggle-beast[value="a8"]:checked ~ .sheet-page-beast .sheet-exposure-goals { display: block; }
|
||||
|
||||
/* ===== INLINE NAME FILL BLANKS ===== */
|
||||
.sheet-fillblank {
|
||||
width: 120px;
|
||||
display: inline-block;
|
||||
padding: 1px 4px;
|
||||
font-size: var(--copy-size);
|
||||
border-radius: 4px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/* ===== EXPOSURE TRACK — radio pair slots ===== */
|
||||
.sheet-exp-track {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 3px;
|
||||
align-items: center;
|
||||
}
|
||||
.sheet-exp-slot {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 1px;
|
||||
}
|
||||
.sheet-exp-neg,
|
||||
.sheet-exp-pos {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.sheet-exp-neg input[type="radio"],
|
||||
.sheet-exp-pos input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
.sheet-exp-mark {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 1px solid var(--muted);
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
font-weight: 900;
|
||||
line-height: 1;
|
||||
background: #fff;
|
||||
color: transparent;
|
||||
transition: background 0.1s, color 0.1s;
|
||||
}
|
||||
/* Unselected state — show symbol faintly */
|
||||
.sheet-exp-neg-mark { border-color: #aa3333; }
|
||||
.sheet-exp-pos-mark { border-color: #2a7a2a; border-left: none; border-radius: 0 3px 3px 0; }
|
||||
.sheet-exp-neg-mark { border-radius: 3px 0 0 3px; }
|
||||
|
||||
/* Selected states */
|
||||
.sheet-exp-neg input[type="radio"]:checked ~ .sheet-exp-neg-mark {
|
||||
background: #cc3333;
|
||||
color: #fff;
|
||||
}
|
||||
.sheet-exp-pos input[type="radio"]:checked ~ .sheet-exp-pos-mark {
|
||||
background: #2a7a2a;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Clear button for exposure slots */
|
||||
.sheet-exp-clr {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.sheet-exp-clr input[type="radio"] { display: none; }
|
||||
.sheet-exp-clr-mark {
|
||||
border: 1px solid var(--muted);
|
||||
border-left: none;
|
||||
border-radius: 0 3px 3px 0;
|
||||
background: #fff;
|
||||
color: var(--muted);
|
||||
font-size: 10px;
|
||||
}
|
||||
.sheet-exp-clr input[type="radio"]:checked ~ .sheet-exp-clr-mark {
|
||||
background: #e0e0e0;
|
||||
color: var(--muted);
|
||||
}
|
||||
/* Fix border radius now that there are 3 parts */
|
||||
.sheet-exp-neg-mark { border-radius: 3px 0 0 3px; }
|
||||
.sheet-exp-pos-mark { border-radius: 0; border-left: none; }
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,144 @@
|
||||
// TURN RPG — Roll Banner API Script v10
|
||||
|
||||
var TURN_BANNERS = {
|
||||
1: 'https://files.d20.io/images/486058023/gKbwiBmDlQmbHjlPuMjMHg/max.png?1778112004',
|
||||
2: 'https://files.d20.io/images/486058024/MHv5K9XnIccGXva_AhdB9w/max.png?1778112004',
|
||||
3: 'https://files.d20.io/images/486058025/4YmcHs7G6HuOmBO5ccr2RQ/max.png?1778112004',
|
||||
4: 'https://files.d20.io/images/486058031/olGlF3dUAlvBrB1QrPuIkQ/max.png?1778112005',
|
||||
5: 'https://files.d20.io/images/486057979/Lk37RS9O_jFoXz2CM7OYNA/max.png?1778111998',
|
||||
6: 'https://files.d20.io/images/486057980/0R_F8YGsKRLs5uetIr_zjg/max.png?1778111998',
|
||||
7: 'https://files.d20.io/images/486057982/SExufyTOQWoFesmiexo8Xw/max.png?1778111999',
|
||||
8: 'https://files.d20.io/images/486057981/z4bJhLJ9zlrXQh0vfG-hzQ/max.png?1778111999',
|
||||
9: 'https://files.d20.io/images/486057983/oMv42rzYJbLCWYGfvEQcPg/max.png?1778111999',
|
||||
10: 'https://files.d20.io/images/486058000/dIZvoYkB7X_f60izQmfHaA/max.png?1778112001',
|
||||
11: 'https://files.d20.io/images/486057999/APXrwJVstGB_N7OSFxXZUA/max.png?1778112001',
|
||||
12: 'https://files.d20.io/images/486058001/lITWH7nHlclgVJXyX2oL7w/max.png?1778112001',
|
||||
13: 'https://files.d20.io/images/486058017/QLY0EUg72V3LmAdm1r33cg/max.png?1778112003',
|
||||
14: 'https://files.d20.io/images/486058012/e4yvJmkAZQr9xSO7iQMalA/max.png?1778112002',
|
||||
15: 'https://files.d20.io/images/486058013/DtHvE6_nzkudG6kndor2pg/max.png?1778112002',
|
||||
16: 'https://files.d20.io/images/486058014/HSwHUJBQB9etZJ_VLoK41Q/max.png?1778112002',
|
||||
};
|
||||
|
||||
var TURN_DIE_BANNERS = {
|
||||
1: 'https://files.d20.io/images/486388213/WRvGftNR4FU0OD7M9LCvkg/max.png?1778358228',
|
||||
2: 'https://files.d20.io/images/486388203/1UcMlBr7KkrjM4JwGrNLTg/max.png?1778358226',
|
||||
3: 'https://files.d20.io/images/486388204/g-GJWDNQVdNReh8uxdsN7A/max.png?1778358226',
|
||||
4: 'https://files.d20.io/images/486388205/_e7JCX51nc_Xd-wHBDgXDA/max.png?1778358226',
|
||||
5: 'https://files.d20.io/images/486388206/WKv4-RMkerJOB6mxvDq9Sw/max.png?1778358226',
|
||||
6: 'https://files.d20.io/images/486388207/dCh4uENBm-RtN55uoaxplw/max.png?1778358226',
|
||||
};
|
||||
|
||||
function getTier(total) {
|
||||
if (total >= 10) return { label: 'Full Success (10+)', color: '#46b34d' };
|
||||
if (total >= 7) return { label: 'Partial Success (7-9)', color: '#b38a1a' };
|
||||
return { label: 'Miss / Complication (6-)', color: '#440202' };
|
||||
}
|
||||
|
||||
function getBanner(total) {
|
||||
return TURN_BANNERS[Math.min(Math.max(total, 1), 16)];
|
||||
}
|
||||
|
||||
function buildTurnDieCard(charName, dieFace, bannerUrl) {
|
||||
return '<div style="border-radius:8px;overflow:hidden;border:2px solid #214f24;' +
|
||||
'background:#1a1a1a;font-family:Arial,sans-serif;">' +
|
||||
'<img src="' + bannerUrl + '" style="display:block;width:100%;height:auto;margin:0;padding:0;">' +
|
||||
'<div style="padding:8px 10px;text-align:center;">' +
|
||||
'<p style="margin:2px 0;font-size:13px;font-weight:bold;color:#fff;text-transform:uppercase;' +
|
||||
'letter-spacing:1px;">Turn Die</p>' +
|
||||
'<p style="margin:2px 0;font-size:10px;color:#aaaaaa;">' + charName + '</p>' +
|
||||
'<p style="margin:4px 0;font-size:32px;font-weight:900;color:#fff;line-height:1;">' + dieFace + '</p>' +
|
||||
'<p style="margin:6px 0 2px;font-size:12px;font-weight:bold;color:#46b34d;' +
|
||||
'text-transform:uppercase;letter-spacing:1px;">Mark Stress!</p>' +
|
||||
'</div></div>';
|
||||
}
|
||||
|
||||
function buildCard(charName, statLabel, rollType, dieResult, statVal, total, tier, bannerUrl) {
|
||||
var typeLabel = rollType ? ('<p style="margin:2px 0;font-size:10px;font-weight:bold;color:#cccccc;' +
|
||||
'text-transform:uppercase;letter-spacing:1px;">' + rollType + '</p>') : '';
|
||||
var operator = (rollType === 'Struggles') ? ' - ' : ' + ';
|
||||
var breakdown = '<p style="margin:2px 0;font-size:11px;color:#aaaaaa;">2d6: ' +
|
||||
dieResult + operator + statVal + ' (' + statLabel + ')</p>';
|
||||
|
||||
return '<div style="border-radius:8px;overflow:hidden;border:2px solid #214f24;' +
|
||||
'background:#1a1a1a;font-family:Arial,sans-serif;">' +
|
||||
'<img src="' + bannerUrl + '" style="display:block;width:100%;height:auto;margin:0;padding:0;">' +
|
||||
'<div style="background:' + tier.color + ';color:#fff;font-size:10px;font-weight:bold;' +
|
||||
'text-transform:uppercase;letter-spacing:1px;text-align:center;padding:3px 8px;">' +
|
||||
tier.label + '</div>' +
|
||||
'<div style="padding:8px 10px;text-align:center;">' +
|
||||
'<p style="margin:2px 0;font-size:13px;font-weight:bold;color:#fff;text-transform:uppercase;' +
|
||||
'letter-spacing:1px;">' + statLabel + '</p>' +
|
||||
typeLabel +
|
||||
'<p style="margin:2px 0;font-size:10px;color:#aaaaaa;">' + charName + '</p>' +
|
||||
'<p style="margin:4px 0;font-size:32px;font-weight:900;color:#fff;line-height:1;">' + total + '</p>' +
|
||||
breakdown +
|
||||
'</div></div>';
|
||||
}
|
||||
|
||||
on('chat:message', function(msg) {
|
||||
|
||||
// Health check
|
||||
if (msg.type === 'api' && msg.content.trim() === '!turn-test') {
|
||||
sendChat('Turn API', '/w gm Turn API v10 is running.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Only handle Turn roll results
|
||||
if (msg.type !== 'rollresult') return;
|
||||
|
||||
var origRoll = msg.origRoll || '';
|
||||
var labelMatch = origRoll.match(/\[Turn:([^\]|]+)(?:\|([^\]]+))?\]/);
|
||||
if (!labelMatch) return;
|
||||
|
||||
var statLabel = labelMatch[1].trim();
|
||||
var rollType = labelMatch[2] ? labelMatch[2].trim() : '';
|
||||
|
||||
// Parse roll data
|
||||
var rollData;
|
||||
try {
|
||||
rollData = JSON.parse(msg.content);
|
||||
} catch(e) {
|
||||
log('TURN: JSON parse failed — ' + e);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get total
|
||||
var total = 0;
|
||||
if (typeof rollData.total === 'number') {
|
||||
total = rollData.total;
|
||||
} else {
|
||||
rollData.rolls.forEach(function(r) {
|
||||
if (r.type === 'R') {
|
||||
r.results.forEach(function(res) { total += res.v; });
|
||||
} else if (r.type === 'M') {
|
||||
total += parseInt(r.expr, 10) || 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Extract individual die results and stat modifier
|
||||
var diceResults = [];
|
||||
var statVal = 0;
|
||||
rollData.rolls.forEach(function(r) {
|
||||
if (r.type === 'R') {
|
||||
r.results.forEach(function(res) { diceResults.push(res.v); });
|
||||
} else if (r.type === 'M') {
|
||||
statVal = parseInt(r.expr.replace('+', ''), 10) || 0;
|
||||
}
|
||||
});
|
||||
var dieResult = diceResults.join(', ');
|
||||
|
||||
var charName = msg.who ? msg.who.replace(' (GM)', '') : 'Unknown';
|
||||
|
||||
// Route Turn Die rolls to their own card
|
||||
if (statLabel === 'Turn Die') {
|
||||
var dieFace = diceResults[0] || total;
|
||||
var bannerUrl = TURN_DIE_BANNERS[Math.min(Math.max(dieFace, 1), 6)];
|
||||
sendChat(charName, buildTurnDieCard(charName, dieFace, bannerUrl), null, {noarchive: false});
|
||||
return;
|
||||
}
|
||||
|
||||
var tier = getTier(total);
|
||||
var card = buildCard(charName, statLabel, rollType, dieResult, statVal, total, tier, getBanner(total));
|
||||
sendChat(charName, card, null, {noarchive: false});
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"html": "TurnShifterSliceOfLife.html",
|
||||
"css": "TurnShifterSliceOfLife.css",
|
||||
"authors": "Bluebird",
|
||||
"roll20userid": "2628480",
|
||||
"preview": "ScreenshotTurnShifterSliceofLifeCharsheet.png",
|
||||
"instructions": "Compatible for use with Turn: A Slice of Life, Supernatural Roleplaying Game of Shapeshifters in Small Towns, by Beau Jágr Sheldon/Thoughty. Turn is a game about shapeshifters living quietly in a small town, navigating the push and pull between their human and beast natures. The rules are available at https://thoughty.itch.io/turn\n\nRoll20 Character Sheet\n\n• Human and Beast archetype tabs with separate abilities, background text, and goals for 9 human and 9 beast archetypes\n• Each sheet self-populates once an archetype is selected from a drop-down menu\n• Habit and Instinct stat blocks with Powers and Struggles roll buttons\n• Dedicated Turn Die button with result cards and a stress reminder\n• Human Stress and Beast Stress tracks\n• Town Exposure and Animal Group Exposure tracks with positive and negative radial buttons\n\nHow to Use\nSelect your Human and Beast archetypes from the dropdown menus on each page. Your stat values will populate automatically. Enter your character information, then use the Roll buttons next to each Habit or Instinct to make Powers or Struggles rolls — results appear as plain roll results in the chat window.\n\nOptional Enhancement (requires Roll20 Pro)\nAn optional API script is available to enhance roll output with illustrated result banner cards, tier labels (Full Success, Partial Success, Miss/Complication), and a dedicated Turn Die card with a stress reminder. Without the API script, all rolls function normally and display standard dice results in chat — no errors or missing functionality.\n\nCopyright © 2019 by Beau Jágr Sheldon/Thoughty — Art Direction and Layout by John W. Sheldon — Beast Art by Cecilia Ferri"
|
||||
}
|
||||
Reference in New Issue
Block a user