Comments (5)
Looks great. Thank you very much for your efforts.
from battlescribe-stylesheets.
Hi @adotor thanks for the feedback. I'm not sure how to solve this one as from the data point of view the'Missile Launcher' entry is considered 'Wargear' whereas the other 2 are 'Weapon'. It is clear in this case that the 'Missile Launcher' doesn't need to be displayed, but in other units it may make sense to have both the weapon and wargear profiles showing.
I'd prefer not to have an exception rule just for Missile Launcher as that can quickly become unmanageable once more items get added to the list. I'm not sure if this could be solved by changing the structure of the data file, but that would have to be discussed with the BSData team. In that instance I can update the template in a generic way to show Frag/Crack as sub items of Missile Launcher.
<profile id="611c-0011-9d57-1914::5b91-a027-e9db-aa3d::cee9-991c-ed0b-b786" name="Frag missile" hidden="false" typeId="c067-7929-f4dc-7825" typeName="Weapon">
<characteristics>
<characteristic name="Range" typeId="5410-0b42-87cc-bbc6">48"</characteristic>
<characteristic name="Type" typeId="38ea-c4e0-d3bb-d1e9">Heavy D6</characteristic>
<characteristic name="S" typeId="fcc6-35ea-38b6-f4ca">4</characteristic>
<characteristic name="AP" typeId="fc0e-2874-184d-9f64">0</characteristic>
<characteristic name="D" typeId="cc1f-e463-c014-2251">1</characteristic>
<characteristic name="Abilities" typeId="72cf-5b8f-5b71-79b2">-</characteristic>
</characteristics>
</profile>
<profile id="611c-0011-9d57-1914::5b91-a027-e9db-aa3d::e738-ce3f-ebb1-9388" name="Krak missile" hidden="false" typeId="c067-7929-f4dc-7825" typeName="Weapon">
<characteristics>
<characteristic name="Range" typeId="5410-0b42-87cc-bbc6">48"</characteristic>
<characteristic name="Type" typeId="38ea-c4e0-d3bb-d1e9">Heavy 1</characteristic>
<characteristic name="S" typeId="fcc6-35ea-38b6-f4ca">8</characteristic>
<characteristic name="AP" typeId="fc0e-2874-184d-9f64">-2</characteristic>
<characteristic name="D" typeId="cc1f-e463-c014-2251">D6</characteristic>
<characteristic name="Abilities" typeId="72cf-5b8f-5b71-79b2">-</characteristic>
</characteristics>
</profile>
<profile id="611c-0011-9d57-1914::5b91-a027-e9db-aa3d::2e81-1bb2-11fc-b54b" name="Missile launcher" hidden="false" typeId="0883-432d-b2ca-f11a" typeName="Wargear">
<characteristics>
<characteristic name="Ability" typeId="8b56-49a8-40e5-242a">When attacking with this weapon, choose one of its profiles below.</characteristic>
</characteristics>
</profile>
</profiles>
from battlescribe-stylesheets.
Had another think about this and instead of looping all weapons then looping all wargear, I'll try looping the selections then looping wargear first, then weapons within each selection. You'll still have the Missile Launcher line, but the frag/crak will be directly below it
from battlescribe-stylesheets.
Iโm not that familiar with the data model, but if you have a parent node grouping the wargear and weapons (is this the selection?) then it should work. Nice idea.
I looked how the same information is transformed to HTML by Battlescribe (presuming their translation to HTML work with the same mechanism): all wargear is rendered in its own section but before all weapons, i.e. the text of the missile launcher wargear using โbelowโ makes more sense.
But if your way works as expected it is even better.
from battlescribe-stylesheets.
@adotor I've refactored the way wargear and weapons are rendered. Can you try out the new dist file when you get chance and leave feedback here please.
from battlescribe-stylesheets.
Related Issues (14)
- Campaign - Materiel value number is out of alignment with the other numbers
- Demo pdfs are out of date
- Add screenshot to readme
- Campaign should have faction already filled in
- Asuryani Ranger - Wargear Missing HOT 5
- Points cost incorrect for Scout gunner in ghd-adeptus-astartes data file
- Weapon header row missing if first item is wargear
- Tau markerlight
- Command Roster only outputs the first fire team HOT 2
- Pagebreaks in middle of datacards when printed HOT 5
- Model Names don't appear in the 'Name' box of the Command Roster
- Developer instructions missing from Readme
- Specialism abilities have an extra (empty) cell on data cards
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from battlescribe-stylesheets.