Assorted changes and a couple of fixes to the fancy sheets - #147
Conversation
66e38c8 to
93c173c
Compare
Hi there, @PJBrs ! Regards, |
|
Hi @bw-mutley! Thanks! I think most of the more structural changes apply to the features pages, hardly any to MSavaga's style. I've tested both though. If you have any suggestions though for continuing this PR, please let me know. In the meantime, I've added one more substantial change that renders the monster blocks more in keeping with the RPGTex D&D style. Problem is, my repo now is one long list of assorted changes, including spelling fixes, small additions, small enhancements and substantial formatting changes that affect how everything looks... I'm force-updating the PR now, and then I'll see whether I can sort it better. In the meantime, any suggestion at all would be appreciated! |
|
So, I sorted all my patches. The first five patches are trivial spelling and whitespace fixes.
The "Fix" pdfbookmarks patch does not fully work, but as far as I can tell, it's less error-prone than the current behaviour. The next five patches all represent small enhancements:
All the remaining patches offer rather substantial changes that I personally like, and I hope for some feedback on them. These two patches sort spells by name and level and add headings for each spell level in the features pages:
These two patches sort feats by origin and level (character feats, class feats, background feats and racial feats) and add associated headers in the feature pages:
I tried to write these trying not to be invasive and ended up doing quite a lot of pattern matching in latex. Could have done them simpler. The final two patches all concern relatively minor aesthetic changes that I liked:
Basically, I'm looking for comments on all of these, regarding:
|
exactly how my local files are at the moment. I've made several additions and corrections too, but can't keep track of everything in commits like you did - seens like I have a lot to learn on how to keep with people here. To properly contribute again, I will - at some point - have to dowload the master branch again. I've seen many issues in my local files which were probably fixed. |
|
Hi, @PJBrs. Apologies for the slow response. My day job got unexpectedly chaotic. Thank you for all the hard work and for organizing these commit in a useful way. I will take a closer look when things calm down a little bit and I get my feet back underneath me. |
|
Hi @canismarko , take your time! By now it should be clear that I couldn't help myself anyway :-) I think, given all patches I now added, the majority should be sufficiently palatable, but others also represent design choices that you might disagree with, and then there's the matter of whether my implementations are agreeable, aside from their effects. I hope things will calm down soon! |
|
@canismarko I noticed you triggered some tests. The latex ones fail because of the changes I made. The below patch adapts the tests to my other patches (and makes them pass). I'll look into the other failing tests another time. |
|
I added the test I posted previously in the comments. Also, I reordered the new patches a bit to leave the DND-monster formatting at the end. I tested all monsters I could, made many formatting fixes as well, only remaining thing is to add bulleted lists. And I wrote one more patch to enable DND-tables throughout, after I conjured up a regex that translated docutil's supertabular table header to a dndtable header. Next step is probably to see if I can improve any table I find. |
697e974 to
0f3fedb
Compare
|
Rewrote the monster formatting patch. I think it now is on par with, or better than regular latex. I don't think I really have anything else to add anymore. I didn't test all tables, but, in any case, the dndtables are less wide than the regular ones, so any text overflow will have been present anyway, and might be prevented now. If necessary, I can upload some example character sheets... Would that help? I did notice some potential enhancements, such as putting lair actions of dragons in a separate heading, just like aboleth, as well as formatting the breath weapons a bit more (\emph{breath weapon}). All that would be rather easy. And one bug, perhaps, I can't seem to add certain monsters as companions, e.g.: EDIT Let's let this sit here for a while, while I test more... Just force-updated because I clobbered one of my previous fixes. ;'-) EDIT 2 - 13 feb Fixed a small bug in the dndtable header regex. |
28359ec to
85c9506
Compare
|
@canismarko @bw-mutley @canismarko How might I make this PR easier to review? I can, for instance, make separate PRs for different groups of patches, for instance as follows:
@bw-mutley Perhaps you'd be interested to take a look at the various patches that deal specifically with the MSavage style sheet? Finally, I tried to run the dungeonsheets tests, which complain about some missing html pages, but the latex tests complete fine: |
|
Hi there, @PJBrs , sorry for the late reply.
Thanks for the contribution. I will fork your branch and try to do it this week. |
|
@bw-mutley Great! Let me know if you need the MSavage style sheet changes in a separate branch... |
Hi there, PJ! Only now I could have some spare time to work on it. I've made a small comment about the sorcerer -> sorceror change, please take a look. About the MSavagesheet: I will need some more time since I've changed my PC and ended missing some tex files needed. |
|
Hi @bw-mutley I thought sorceror was the correct spelling, but indeed, not only the PHB but also standard dictionaries prefer sorcer_er_. I wonder whether we should revert or reverse that spelling patch ;) |
I suppose it is up to @canismarko to decide. But my suggestion is to push a PR fixing all 'sorceror' ocurrences into 'sorcerer'. |
Allow the player choices for Trick Shots of the Gunslinger Fighter subclass to be sorted as instances of AdeptMarksman, by aliasing AdeptMarksman as TrickShot and by making all Trick Shot features an instance of TrickShot
Make all Arcane Shot options a subclass of ArcaneShot, so that they all get sorted directly after the Arcane Shot feature text.
Allow Invocations to be sorted under the Eldritch Invocations feature by aliasing the EldritchInvocation class as Invocation.
This patch aliases Rites to CrimsonRites and BloodCurses to BloodMaledict, so that all rites can be sorted under the Crimson Rites feat, and all the blood curses under the Blood Maledict feat. Furthermore, it integrates the two Formulas classes.
Document the makesheets commandline option to sort features by type.
"do fungus" should be "to fungus" in line with TCE
This patch includes fixes, spelling fixes and formatting enhancements for spells. Fixes are limited to misplaced material components. Formatting consists of definition lists and tables and a few newlines here and there. Most relevant spelling change is: Green-flame blade --> Green flame blade , which will mean that existing characters with that spell need to change its name in their character file.
This patch includes fixes, spelling fixes and formatting enhancements for features. Formatting consists of definition lists and tables and a few newlines here and there.
The weight calculation omitted the weight of magic items. One would expect that this could be as simple as: weight += sum([m.weight for m in self.magic_items]). However, this doesn't work for magic items that are also added to self.weapons, since these would be counted twice in the weight calculation.
In recent changes, the calculation for carrying weight now better takes into account magic items and weapons. Add this to the tests, and also check the new weight_and_capacity_text code.
This allows a feature selected by a player (that is, non-class, non-race) to be a FeatureSelectore. This is necessary to implement, for instance, Resilient, which would be a FeatureSelector where the chosen Ability in which the character becomes resilient is then set in feature_choices.
Implement Resilient as a feature selector, add the various options for resilient as features.
This patch adds the MSavage latex template as a submodule to dungeonsheets, adds it to the TEXINPUTS environment and adds TTFONTS environment variable to find the kalam font. Furthermore, make the MSavage latex template part of the tests in the github workflow. Remove babel support from the MSavage latex template, otherwise latex will complain about missing languages (alternatively, we could add the languages directory from the dnd class to pyproject.toml). The latest version of the MSavage latex template adds automatic text scaling so that text fields no longer overflow with longer inputs. This fixes canismarko#92
The MSavage latex template was compiled using xelatex. To make this work, an additional setting had to be used for dvipdfmx.cfg (-dNOSAFER), which represents a (slight) security risk. Furthermore, xelatex is very slow. This patch switches to lualatex instead. It has different dependencies, the most important one being the presence of luapstrics.lua. As far as I can tell, by now luapstricks.lua should be present on your average system with TexLive. It is on mine, at least, on Slackware-15.0, which is moderately conservative in many respects.
Rename the MSavage latex template to the more generic latex_character_sheet_template.tex. I also renamed associated functions that still had the msavage name in them to more neutral alternatives. This on behalf of Mat Savage himself, who created the Latex 5e Character Sheet Template that we use in dungeonsheets.
This patch adds the makesheets commandline option to build the latex character sheet to the README.
Dungeonsheets now packages the dnd latex template and the dnd latex character sheet template packages as submodules. This greatly eases using the latex code, but it also takes away some opportunities for customisation. This patch checks whether dnd.sty and dndtemplate.sty are already installed in a local latex directory, and if so, adds them to the texinputs path used in the latex subprocess environment.
This is a squashed commit of various changes by Mat Savage to improve upon the github tests. First, this patch updates the Docker file so that it is compatible with lualatex. Furthermore, it adds a test building all dungeonsheets examples in the docker workflow file. And it refactors the python_ci workflow by only testing all examples in python-3.12, to prevent the test runs from taking so long. Finally, it pushes the resulting docker image to the registry after tagging it "latest".
The Bloodhunter features had three duplicate feature classes: - Blood Curse of Corrosion - Blood Curse of the Exorcist - Blood Curse of the Souleater This patch integrates these duplicates.
|
Decided to close this one. |
|
P.S. Would be nice to discuss on Discord though... |
Hi, I just found dungeon-sheets and I like it very much! I had been writing my character sheets by hand in latex using MSavage's style, but that isn't very automated.
I hope to contribute a little bit with a couple of ideas that are focused on the features pages. I think basically the patches speak for themselves, and for now I'd mainly like to get some reactions as to whether these patches are actually wanted, and perhaps what other / further directions to take with this.
I can also supply an example of the type of layout that I'm trying to achieve. I'm keeping a small wishlist of my own, with items like:
I should add that I can code only a little bit, but I tested the changes on all the example sheets.
Anyway, I really hope to hear whether this type of work is appreciated!