Giter Club home page Giter Club logo

Comments (5)

adotor avatar adotor commented on June 15, 2024 1

Looks great. Thank you very much for your efforts.

missile-launcher-fixed

from battlescribe-stylesheets.

DaeronAlagos avatar DaeronAlagos commented on June 15, 2024

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&quot;</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&quot;</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.

DaeronAlagos avatar DaeronAlagos commented on June 15, 2024

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.

adotor avatar adotor commented on June 15, 2024

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.

DaeronAlagos avatar DaeronAlagos commented on June 15, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.