Difference between revisions of "Mago"
From Roll20 Wiki
m (→Mago's guide on how to eliminate the XML whitespaces) |
(→rogue trader improved ideas) |
||
(25 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | '''[https://app.roll20.net/users/986445/mago Mago]''' is among things, author of [[Rogue trader improved]] sheet. | |
+ | |||
+ | If you like my work consider giving me a Tip on my paypal here: | ||
+ | https://www.paypal.com/paypalme/DesignWiz22 | ||
+ | |||
+ | helps me pay for the Pro subscription ;) | ||
[[Category:Sheet Author]] | [[Category:Sheet Author]] | ||
+ | =Deathwatch Improved Character Sheet= | ||
+ | Unfortunately due to Roll20's ever changing policies, they blocked my sheet from the public repository, for been a "duplicate sheet" | ||
+ | never mind that my version is both visually and code-wise very different, and overall much better | ||
+ | |||
+ | Anyway, i uploaded the code as txt. files on a repository of my own, if anybody is interested you can go in and copy the code | ||
+ | |||
+ | you will have to use the Custom sheet option in the sheet selection (PRO subscription feature only) | ||
+ | https://github.com/roguetradermago/Deathwatch-improved | ||
+ | |||
+ | Current Version Rev#1 Oct 2024 | ||
+ | |||
+ | *This sheet works just like Rogue Trader Improved but has unique features from the Deathwatch rules | ||
+ | *Potentially compatible with the Character Transfer options (untested) | ||
+ | *Game conversion compatible with Rogue Trader Improved games however be mindful that the following data will NOT carry over: | ||
+ | **Skills tab: skills removed, removed profit factor and acquisition tests | ||
+ | ***barter | ||
+ | ***blather | ||
+ | ***commerce | ||
+ | ***secret tongue | ||
+ | ***disguise | ||
+ | **Journal tab: fields removed: | ||
+ | ***origin path | ||
+ | ***misfortunes | ||
+ | ***acquisitions | ||
+ | ***endeavors | ||
+ | ***special notes | ||
+ | **Combat Tab: New Features | ||
+ | ***Power Armour Strength Enhancement (+20 to characteristic) | ||
+ | ***Hallucinogen effects macro removed and replaced with Haywire effects | ||
+ | **Ship Tab | ||
+ | ***No ship tab, all information lost | ||
+ | **Extras | ||
+ | ***No warp travel and related info | ||
+ | **NPC Tab | ||
+ | ***Info fields replaced with horde magnitude fields | ||
+ | ***1 skill removed (last one on the list) | ||
+ | ***1 talent/trait added | ||
+ | ***removed gear fields | ||
+ | ***removed 2 condition boxes (bottom 2) | ||
+ | ***further simplification | ||
+ | |||
+ | **CODE-WISE: | ||
+ | The Aaron sheet scripts were removed, several were replaced with repeating sum scripts, others were added for cohesion, and battle psyker psy rating calculations | ||
+ | |||
+ | i will Not continue the development of this sheet, thanks roll20 | ||
=Mago's guide on how to eliminate the XML whitespaces= | =Mago's guide on how to eliminate the XML whitespaces= | ||
Line 9: | Line 59: | ||
https://www.oracle.com/technical-resources/articles/wang-whitespace.html | https://www.oracle.com/technical-resources/articles/wang-whitespace.html | ||
− | *Problem: | + | *The Problem: |
The XML whitespaces will appear on character sheets when the lines of code are separated by line break such as this: | The XML whitespaces will appear on character sheets when the lines of code are separated by line break such as this: | ||
(Also this view is based on the Custom Character sheet viewer) | (Also this view is based on the Custom Character sheet viewer) | ||
Line 58: | Line 108: | ||
</pre> | </pre> | ||
− | This can be played around to just be the right margin that is negative, or it could be applied to the tags themselves like: | + | ''This can be played around to just be the right margin that is negative, or it could be applied to the tags themselves like:'' |
<pre> | <pre> | ||
/* CSS */ | /* CSS */ | ||
Line 66: | Line 116: | ||
</pre> | </pre> | ||
− | However this does come with its own | + | However this does come with its own complications: if you need to use certain tags in other sections of the sheet that use the whitespace or some tags will misalign because of the negative margin. Also you will have to write or copypaste more code. |
− | '''Solution 3''' Set the containing div font-size to 0px, this (for some reason) eliminates all whitespaces within. | + | *'''Solution 3''' Set the containing <nowiki><div></nowiki> font-size to 0px, this (for some reason) eliminates all whitespaces within. |
<pre> | <pre> | ||
/* CSS */ | /* CSS */ | ||
Line 76: | Line 126: | ||
</pre> | </pre> | ||
− | This is my preferred solution, its very clean, however it does come with | + | *This is my preferred solution, its very clean, however it does come with a caveat |
**Every tag inside those container divs must have a font-size specified, such as select, input, label, span ect..., with sufficient specificity, if not, the letters would just disappear | **Every tag inside those container divs must have a font-size specified, such as select, input, label, span ect..., with sufficient specificity, if not, the letters would just disappear | ||
− | **Another | + | **Another caveat is "ok but what if i want separation it between elements without relying on the whitespaces" |
− | * Either create a "spacing" div, or add left/right margins to the | + | * Either create a "spacing" div, or add left/right margins to the different tags |
+ | <pre> | ||
+ | 1- <div> | ||
+ | 2- <span>Title 1</span> | ||
+ | 3- <div class="spacing"></div> | ||
+ | 4- <input/> | ||
+ | 5- <div class="spacing"></div> | ||
+ | 6- <span>Title 2></span> | ||
+ | 7- </div> | ||
+ | </pre> | ||
<pre> | <pre> | ||
/* CSS */ | /* CSS */ | ||
Line 90: | Line 149: | ||
hope this helps | hope this helps | ||
+ | |||
+ | =rogue trader improved ideas= | ||
+ | *still trying to fix the sheet JSON so as to add line breaks correctly, so far i have tried: | ||
+ | **html <code><nowiki><br></nowiki></code> tag alone NOT WORKING | ||
+ | **html <code><nowiki><br></br></nowiki></code> with closing tag, NOT WORKING | ||
+ | **markdown <code>/n</code> termination NOT WORKING | ||
+ | **markdown <code>/r</code> termination NOT WORKING | ||
+ | **single empty whitespace NOT WORKING | ||
+ | **double empty whitespace NOT WORKING | ||
+ | **backslash termination <code>\</code> CAUSES JSON INVALID, DO NOT USE | ||
+ | **empty <code><nowiki><div></div></nowiki></code> UNTESTED | ||
+ | **html <code><nowiki><br/></nowiki></code> tag but with forward slash at the end UNTESTED | ||
+ | **html <code><nowiki></pre></nowiki></code> tag including forward slash at the end just in case, UNTESTED | ||
+ | **JSON escape sequence <code>\\n</code> UNTESTED | ||
+ | **html <code><nowiki><p></p></nowiki></code> tag for blocks (tested last time but cant remember) | ||
+ | |||
+ | *Fixing rolltemplate <code>{{#attack}}</code> property, currently broken |
Latest revision as of 10:40, 23 November 2024
Mago is among things, author of Rogue trader improved sheet.
If you like my work consider giving me a Tip on my paypal here: https://www.paypal.com/paypalme/DesignWiz22
helps me pay for the Pro subscription ;)
[edit] Deathwatch Improved Character Sheet
Unfortunately due to Roll20's ever changing policies, they blocked my sheet from the public repository, for been a "duplicate sheet" never mind that my version is both visually and code-wise very different, and overall much better
Anyway, i uploaded the code as txt. files on a repository of my own, if anybody is interested you can go in and copy the code
you will have to use the Custom sheet option in the sheet selection (PRO subscription feature only) https://github.com/roguetradermago/Deathwatch-improved
Current Version Rev#1 Oct 2024
- This sheet works just like Rogue Trader Improved but has unique features from the Deathwatch rules
- Potentially compatible with the Character Transfer options (untested)
- Game conversion compatible with Rogue Trader Improved games however be mindful that the following data will NOT carry over:
- Skills tab: skills removed, removed profit factor and acquisition tests
- barter
- blather
- commerce
- secret tongue
- disguise
- Journal tab: fields removed:
- origin path
- misfortunes
- acquisitions
- endeavors
- special notes
- Combat Tab: New Features
- Power Armour Strength Enhancement (+20 to characteristic)
- Hallucinogen effects macro removed and replaced with Haywire effects
- Ship Tab
- No ship tab, all information lost
- Extras
- No warp travel and related info
- NPC Tab
- Info fields replaced with horde magnitude fields
- 1 skill removed (last one on the list)
- 1 talent/trait added
- removed gear fields
- removed 2 condition boxes (bottom 2)
- further simplification
- Skills tab: skills removed, removed profit factor and acquisition tests
- CODE-WISE:
The Aaron sheet scripts were removed, several were replaced with repeating sum scripts, others were added for cohesion, and battle psyker psy rating calculations
i will Not continue the development of this sheet, thanks roll20
[edit] Mago's guide on how to eliminate the XML whitespaces
If you need a full explanation of what XML whitespaces are and why, read this article:
https://www.oracle.com/technical-resources/articles/wang-whitespace.html
- The Problem:
The XML whitespaces will appear on character sheets when the lines of code are separated by line break such as this: (Also this view is based on the Custom Character sheet viewer)
1- <div> 2- <span>Title 1</span> 3- <input/> 4- <span>Title 2></span> 5- </div>
Now you may expect to see something like Title1-Input-Title2 flush together with no space in between, however because tags are separated by a line break in the HTML viewer, these line breaks become empty whitespace: (also the only way i found to see the whitespace tag is with the Firefox browser inspect tool)
Title1(whitespace)Input(whitespace)Title2
Now this is not at all bad if you want space in between elements, however what if you need to flush them together? Worse yet this whitespace also takes part of the <div> width, so if you wanted to do 100% width for the tags inside, these tags will start to overlap or jump to the next line. completely undesirable.
I know of 3 workable solutions for this issue, each with their own complications:
- Solution 1 write everything that doesn't need whitespaces in a single line:
1- <div> 2- <span>Title 1</span><input/><span>Title 2></span> 3- </div>
this solution is effective, however this makes reading the HTML code a real headache, particularly if you have many tags per line.
- Solution 2 Encase every tag inside a <div> that has Negative right/left margins:
1- <div> 2- <div class="item"><span>Title 1</span></div> 3- <div class="item"><input/></div> 4- <div class="item"><span>Title 2></span></div> 5- </div>
/* CSS */ .item { margin-left: -2px; margin-right: -2px; }
This can be played around to just be the right margin that is negative, or it could be applied to the tags themselves like:
/* CSS */ input{ margin-right: -4px; }
However this does come with its own complications: if you need to use certain tags in other sections of the sheet that use the whitespace or some tags will misalign because of the negative margin. Also you will have to write or copypaste more code.
- Solution 3 Set the containing <div> font-size to 0px, this (for some reason) eliminates all whitespaces within.
/* CSS */ .container div{ font-size: 0px; }
- This is my preferred solution, its very clean, however it does come with a caveat
- Every tag inside those container divs must have a font-size specified, such as select, input, label, span ect..., with sufficient specificity, if not, the letters would just disappear
- Another caveat is "ok but what if i want separation it between elements without relying on the whitespaces"
- Either create a "spacing" div, or add left/right margins to the different tags
1- <div> 2- <span>Title 1</span> 3- <div class="spacing"></div> 4- <input/> 5- <div class="spacing"></div> 6- <span>Title 2></span> 7- </div>
/* CSS */ .spacing div{ display: inline-block; width: auto; }
hope this helps
[edit] rogue trader improved ideas
- still trying to fix the sheet JSON so as to add line breaks correctly, so far i have tried:
- html
<br>
tag alone NOT WORKING - html
<br></br>
with closing tag, NOT WORKING - markdown
/n
termination NOT WORKING - markdown
/r
termination NOT WORKING - single empty whitespace NOT WORKING
- double empty whitespace NOT WORKING
- backslash termination
\
CAUSES JSON INVALID, DO NOT USE - empty
<div></div>
UNTESTED - html
<br/>
tag but with forward slash at the end UNTESTED - html
</pre>
tag including forward slash at the end just in case, UNTESTED - JSON escape sequence
\\n
UNTESTED - html
<p></p>
tag for blocks (tested last time but cant remember)
- html
- Fixing rolltemplate
{{#attack}}
property, currently broken