Skip to content

Commit

Permalink
Merge pull request #13319 from LilLiteralist/master
Browse files Browse the repository at this point in the history
[Star Wars Saga Edition] Small CSS changes and refactoring
  • Loading branch information
NorWhal authored Sep 17, 2024
2 parents 1ea379d + 584a174 commit 615ea30
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 9 deletions.
45 changes: 42 additions & 3 deletions Star Wars Saga Edition/StarWarsSagaEdition.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ input.tab::before,
--header-bg-highlight: #333;
--col1-bg:#a7a8aa;
--col1-bg-2:#c6c7ca;
--col1-bg-2-highlight:#d7d8db;
--header-text: #fff;
--header-text-highlight: #b9b9b9;
--clickable-highlight: #0004;
Expand Down Expand Up @@ -182,6 +183,30 @@ input[type="number"]:hover {
margin-top:4px;
}

/* Bonuses and Penalties Grid */
.bonuses-grid {
display:grid;
grid-template-columns: 1fr 1fr 3fr 2fr 5fr;
column-gap: 4px;
row-gap: 3px;
}

.bonuses-header-grid {
grid-column-start: span 8;
display:flex;
grid-template-columns: 1fr 9fr 2fr;
column-gap: 4px;
row-gap: 3px;
}

.bonuses-name {
grid-column:2/6;
}

.bonuses-grid select {
width: auto;
}

/* Vitals Grid (HP, Threshold, Condition Track, Second Wind) */
.vitals-grid {
display: grid;
Expand Down Expand Up @@ -254,6 +279,7 @@ input[type="number"]:hover {
grid-template-rows:auto;
justify-content: center;
grid-row-gap: 1px;
grid-column-gap: 2px;
}

.attacks-grid-attack-title.col1,
Expand All @@ -263,15 +289,17 @@ input[type="number"]:hover {
font-size: 13px;
background-color:var(--col1-bg-2);
cursor: pointer;
margin-right:2px;
}

.sectAttack-show:checked ~ label.col1:hover {
background-color: var(--col1-bg-2-highlight);
}

.attacks-grid-weapon-name {
grid-column:2/9;
color:#333;
font-weight:bold;
width:calc(100% - 2px);
margin-right:2px;
width:100%;
}

.attacks-grid-damage-type {
Expand Down Expand Up @@ -755,6 +783,11 @@ h4 {
margin-bottom: 15px;
}

.repcontainer[data-groupname="repeating_bonuses"] > .repitem {
display:inline-block;
width:33.33%;
}

.repcontainer[data-groupname="repeating_organization"] > .repitem {
display: inline-block;
}
Expand Down Expand Up @@ -1033,6 +1066,7 @@ input:checked + .toggle-knob::after {
.immuneShow:not(:checked) ~ .immuneBody,
.statusBody:not(:checked) ~ .statusBody,
.pilotSkillShow:not(:checked) ~ .pilotBody,
.commanderSkillShow:not(:checked) ~ .commanderBody,
.sectAttack-show:not(:checked) ~ .sectAttack,
.sectCon-show:checked ~ .sectCon,
.sect-show:not(:checked) ~ .sect,
Expand Down Expand Up @@ -1283,6 +1317,7 @@ input:not(:checked) + label.clickable.textHead2Col {
--dm-scrollbar2-thumb: #1e1e44;
--dm-scrollbar2-shaft: #60608c;
--dm-col1: #55555a;
--dm-col1-highlight: #727275;
--dm-input-border: #707099;
--dm-input-border-top: #44445c;
--dm-input-disabled-bg: #334;
Expand Down Expand Up @@ -1358,6 +1393,10 @@ input:not(:checked) + label.clickable.textHead2Col {
color: var(--dark-primarytext);
}

.sheet-darkmode .charsheet .sectAttack-show:checked ~ label.col1:hover {
background-color: var(--dm-col1-highlight);
}

.sheet-darkmode .charsheet hr {
opacity: 0.3;
}
Expand Down
57 changes: 52 additions & 5 deletions Star Wars Saga Edition/StarWarsSagaEdition.html
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,13 @@ <h4 data-i18n="immune">Immune</h4>
<input type="checkbox" value="1" name="attr_QuerySkillModifier" checked class="hidden other-mod-toggle"/>
<button type="roll" name="roll_InitiativeTurn" class="other-mod-on" value="&{template:skill} {{name=Rolling for Turn Order}} {{skill=[[1d20+@{Initiative}+@{InitiativeDecimal}[Initiative Decimal]+?{Other Modifiers|0}[Other] &{tracker}]]}} {{notes=@{Initiative|max}}}" title="Roll Initiative to Turn Order window %{InitiativeTurn}" ></button>
<button type="roll" name="roll_InitiativeTurn" class="other-mod-off" value="&{template:skill} {{name=Rolling for Turn Order}} {{skill=[[1d20+@{Initiative}+@{InitiativeDecimal}[Initiative Decimal] &{tracker}]]}} {{notes=@{Initiative|max}}}" title="Roll Initiative to Turn Order window %{InitiativeTurn}" ></button>
<h4 data-i18n="initiative">Initiative</h4>
<label class="clickable" title="Show/Hide Initiative Notes">
<span data-i18n="init_turn_order">Initiative (Turn Order)</span>
<input type="checkbox" class="hidden" value="1" name="attr_Initiative-Show" />
</label>
<br />
<input type="checkbox" class="sect-show hidden" value="1" name="attr_Initiative-Show" />
<input class="sect" style="margin-left:50px" type="text" name="attr_Initiative_max" placeholder="Initiative Notes" title="Initiative Notes @{Initiative|max}" />
</span>
</div>
<div class="sheet-table-row">
Expand Down Expand Up @@ -3186,7 +3192,13 @@ <h4 data-i18n="immune">Immune</h4>
<input type="checkbox" value="1" name="attr_QuerySkillModifier" checked class="hidden other-mod-toggle"/>
<button type="roll" name="roll_InitiativeTurn" class="other-mod-on" value="&{template:skill} {{name=Rolling for Turn Order}} {{skill=[[1d20+@{Initiative}+@{InitiativeDecimal}[Initiative Decimal]+?{Other Modifiers|0}[Other] &{tracker}]]}} {{notes=@{Initiative|max}}}" title="Roll Initiative to Turn Order window %{InitiativeTurn}" ></button>
<button type="roll" name="roll_InitiativeTurn" class="other-mod-off" value="&{template:skill} {{name=Rolling for Turn Order}} {{skill=[[1d20+@{Initiative}+@{InitiativeDecimal}[Initiative Decimal] &{tracker}]]}} {{notes=@{Initiative|max}}}" title="Roll Initiative to Turn Order window %{InitiativeTurn}" ></button>
<h4 data-i18n="initiative">Initiative</h4>
<label class="clickable" title="Show/Hide Initiative Notes">
<span data-i18n="init_turn_order">Initiative (Turn Order)</span>
<input type="checkbox" class="hidden" value="1" name="attr_Initiative-Show" />
</label>
<br />
<input type="checkbox" class="sect-show hidden" value="1" name="attr_Initiative-Show" />
<input class="sect" style="margin-left:50px" type="text" name="attr_Initiative_max" placeholder="Initiative Notes" title="Initiative Notes @{Initiative|max}" />
</span>
</div>
</div>
Expand Down Expand Up @@ -5510,8 +5522,9 @@ <h4>Grapple</h4></td>
</span>

<div class="crew-skills-grid">
<!-- First row of grid (headers) -->
<input type="checkbox" class="pilotSkillShow hidden" checked value="Pilot" name="attr_vehicle-CrewStation" />
<input type="checkbox" class="commanderSkillShow hidden" value="Commander" name="attr_vehicle-CrewStation" />
<!-- First row of grid (headers) -->
<div class="grid-title skillsCrewCol1 vertical-center2" style="text-align:center;">
<button type="roll" name="roll_VehicleInitiativeTurn" class="other-mod-on small-roll-button" style="line-height: 8px; font-size: 11px; margin-bottom: 6px;" value="&{template:skill} {{name=Rolling for Turn Order}} {{crewname=@{vehicle-CrewName} in @{character_name}}} {{skill=[[ 1d20+@{vehicle-Initiative}[Initiative]+@{vehicle-CT}[CT]+[[@{vehicle-Initiative}*0.01]][Initiative Decimal]+?{Other Modifiers|0}[Other]&{tracker}]]}}" title="Roll Initiative/Pilot to Turn Order window %{VehicleInitiativeTurn}">Turn Order</button>
<button type="roll" name="roll_VehicleInitiativeTurn" class="other-mod-off small-roll-button" style="line-height: 8px; font-size: 11px; margin-bottom: 6px;" value="&{template:skill} {{name=Rolling for Turn Order}} {{crewname=@{vehicle-CrewName} in @{character_name}}} {{skill=[[ 1d20+@{vehicle-Initiative}[Initiative]+@{vehicle-CT}[CT]+[[@{vehicle-Initiative}*0.01]][Initiative Decimal]+0[Other]&{tracker}]]}}" title="Roll Initiative/Pilot to Turn Order window %{VehicleInitiativeTurn}">Turn Order</button>
Expand Down Expand Up @@ -5580,7 +5593,7 @@ <h4>Grapple</h4></td>
<div class="pilotBody">
<input type="number" name="attr_vehicle-DeceptionAppearanceMisc" title="Deception (Deceptive Appearance) Miscellaneous Modifier" value="0" />
</div>
<!-- Deceptive Apperance notes -->
<!-- Deceptive Appearance notes -->
<div class="pilotBody" style="grid-column:span 7">
<input type="checkbox" class="sect-show hidden" value="1" name="attr_Skill-DeceptionAppearance-Show" />
<span class="sect" style="min-width:50px"></span>
Expand Down Expand Up @@ -5619,6 +5632,39 @@ <h4>Grapple</h4></td>
<input class="skillsNotes" type="text" name="attr_Initiative_max" placeholder="Initiative Notes" title="Initiative Notes" />
</span>
</div>
<!-- KNOWLEDGE (TACTICS) -->
<div class="skillsCrewCol1 commanderBody" style="padding-top:4px;">
<label class="clickable" title="Show/Hide Knowledge (Tactics) Notes">
<span data-i18n="tactics">Tactics</span>
<br/>
<span class="smallSkills" data-i18n="knowledge">Knowledge</span>
<input type="checkbox" class="hidden" value="1" name="attr_Skill-KnowledgeTactics-Show" />
</label>
</div>
<div class="commanderBody">
<button type="roll" name="roll_vehicle-KnowledgeTacticsCheck" class="other-mod-on" value="&{template:skill} {{crewname=@{vehicle-CrewName} in @{character_name}}} {{name=Knowledge (Tactics)}} {{skill=[[ 1d20+@{vehicle-KnowledgeTactics}[Knowledge (Tactics)]+@{vehicle-CT}[CT]+?{Other Modifiers|0}[Other]]]}} {{notes=@{KnowledgeTactics|max}}}" title="Roll Knowledge(Tactics)"></button>
<button type="roll" name="roll_vehicle-KnowledgeTacticsCheck" class="other-mod-off" value="&{template:skill} {{crewname=@{vehicle-CrewName} in @{character_name}}} {{name=Knowledge (Tactics)}} {{skill=[[ 1d20+@{vehicle-KnowledgeTactics}[Knowledge (Tactics)]+@{vehicle-CT}[CT]+0[Other]]]}} {{notes=@{KnowledgeTactics|max}}}" title="Roll Knowledge (Tactics)"></button>
</div>
<div class="commanderBody">
<input type="number" name="attr_vehicle-KnowledgeTactics" value="@{vehicle-KnowledgeTacticsMod}[KnowledgeTactics]+@{vehicle-KnowledgeTacticsMisc}[Misc]" disabled="true" title="Knowledge (Tactics) Total" />
</div>
<div class="commanderBody">=</div>
<div class="commanderBody">
<input type="checkbox" class="defaultCrew hidden" checked value="CustomCrew" name="attr_CrewQuality" />
<input type="number" name="attr_vehicle-KnowledgeTacticsMod" value="0" title="Crew Member's Knowledge (Tactics) Mod" class="defaultCrewLock" />
</div>
<div class="commanderBody">+</div>
<div class="commanderBody">
<input type="number" name="attr_vehicle-KnowledgeTacticsMisc" title="Knowledge (Tactics) Miscellaneous Modifier" value="0" />
</div>
<!-- Knowledge-tactics notes-->
<div class="commanderBody" style="grid-column:span 7">
<input type="checkbox" class="sect-show hidden" value="1" name="attr_Skill-KnowledgeTactics-Show" />
<span class="sect" style="min-width:50px"></span>
<span class="sect">
<input class="skillsNotes" type="text" name="attr_KnowledgeTactics_max" placeholder="Knowledge (Tactics) Notes" title="Knowledge (Tactics) Notes" />
</span>
</div>
<!-- MECHANICS -->
<div class="skillsCrewCol1" style="padding-top:4px;">
<label class="clickable" title="Show/Hide Mechanics Notes">
Expand Down Expand Up @@ -6022,7 +6068,7 @@ <h4>Available Emplacement Points</h4>
<input type="text" disabled="true" name="wiki_URL" style="width:30em" title="Wiki URL" value="https://wiki.roll20.net/Star_Wars_Saga_Edition_Character_Sheet"/>
<button type="roll" class="wiki-url" value="https://wiki.roll20.net/Star_Wars_Saga_Edition_Character_Sheet">Send to chat</button>
<br/>
<b><span data-i18n="last_updated">Last updated</span>:</b> 10 July 2024
<b><span data-i18n="last_updated">Last updated</span>:</b> 14 September 2024
</div>
</div>

Expand Down Expand Up @@ -7928,6 +7974,7 @@ <h4>Available Emplacement Points</h4>
setAttrs({
"repeating_CrewAssn_vehicle-DeceptionDiversionMod": v["repeating_CrewAssn_CrewQuality"],
"repeating_CrewAssn_vehicle-InitiativeMod": v["repeating_CrewAssn_CrewQuality"],
"repeating_CrewAssn_vehicle-KnowledgeTacticsMod": v["repeating_CrewAssn_CrewQuality"],
"repeating_CrewAssn_vehicle-MechanicsMod": v["repeating_CrewAssn_CrewQuality"],
"repeating_CrewAssn_vehicle-PerceptionMod": v["repeating_CrewAssn_CrewQuality"],
"repeating_CrewAssn_vehicle-PilotMod": v["repeating_CrewAssn_CrewQuality"],
Expand Down
2 changes: 1 addition & 1 deletion Star Wars Saga Edition/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"authors": "Alicia G (original author), Stephen C (maintainer), Iain J (contributor)",
"roll20userid": "2889,436906,2196054",
"preview": "StarWarsSagaEditionpreview.png",
"instructions": "# Character Sheet\r Inspired by the Saga Edition sheet by Mad Irishman Productions. This sheet calculates statistics using the rules as written. Not all supplement rules may have been taken into account. If you find a mistake or wish to request a feature, please contact the authors. \r\r\r **Last Updated** 10 July, 2024\r\r\r View the wiki for the change log and more information on the sheet, including complete list of attributes and rolls: https://wiki.roll20.net/Star_Wars_Saga_Edition_Character_Sheet",
"instructions": "# Character Sheet\r Inspired by the Saga Edition sheet by Mad Irishman Productions. This sheet calculates statistics using the rules as written. Not all supplement rules may have been taken into account. If you find a mistake or wish to request a feature, please contact the authors. \r\r\r **Last Updated** 14 September, 2024\r\r\r View the wiki for the change log and more information on the sheet, including complete list of attributes and rolls: https://wiki.roll20.net/Star_Wars_Saga_Edition_Character_Sheet",
"useroptions": [
{
"attribute": "yellow-logo",
Expand Down
1 change: 1 addition & 0 deletions Star Wars Saga Edition/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"dark_side_pts":"Dark Side Pts",
"dark_side":"Dark Side",
"other_speeds":"Other Speeds",
"init_turn_order":"Initiative (Turn Order)",
"init_decimal":"Initiative as Decimal",
"grapple":"Grapple",
"status":"Status",
Expand Down

0 comments on commit 615ea30

Please sign in to comment.