scripts icon indicating copy to clipboard operation
scripts copied to clipboard

Add modtool: dynamic-adv-reactions

Open Atkana opened this issue 4 years ago • 5 comments

The tool gives options to modders to restrict adventurers from using particular adventurer reactions (normally in vanilla, absolutely all reactions that are flagged as for adventure mode are available to the player). It's, uh, a pretty niche tool, but provides some options for modding possibilities (and it's what my dumb brain decided it wanted me to make :P).

In the future when the structures for the adventure mode actions menu are more mapped out, the script's method of altering the menu options should probably be updated to something less hacky.

Atkana avatar Dec 15 '20 13:12 Atkana

My nemesis the doc formatter strikes again. I've attempted to make the suggested changes, hopefully that fixes it.

It sucks that you have to compromise the readability of the help text so much for the docs. It makes me wonder if somebody using the -help command in game will even be able to work out how the commands are supposed to work (without the usage hints at the bottom). It's enough that in the future I might consider having 2 separate help sections in scripts, one for the docs and one for the in-console docs...

Atkana avatar Dec 16 '20 07:12 Atkana

RST is intended to be readable in source form - admittedly, the double backticks surrounding examples could be confusing if you haven't seen that before (but so could the colons you had earlier), and links to named anchors in other documents wouldn't be easy to follow in source form (although I don't see any here). I do think the extra newlines around code blocks improve readability in general.

One option RST provides is "custom directives", which would give us some more flexibility over how certain blocks are rendered. For instance, we would be able to start a usage block with .. usage::, or something similar, and the text nested under it could be written in a format that's slightly easier to write and read in source form (and also renders well in HTML form). Open to ideas, although I'm not sure if it'll take a lot of work to implement yet - are there any specific changes you made here that you think decrease readability, and could benefit from a different "usage" syntax?

lethosor avatar Dec 20 '20 06:12 lethosor

I couldn't comment on the doc building instructions, because I've not used them (the sole things I use for scripts + submitting is Notepad++ and the github website :P). I've never really intended to purposefully engage with the docs stuff, and have only really had to to get through the check fails whenever I submit a PR. Now that I know a bit about it, I know that I can just wrap everything in a code block in the future. That tip about how to see the info on how a check failed is very useful - up until now it's just been some esoteric process where I just have to guess why an X is showing :P I should've hopefully fixed everything using that information.

Atkana avatar Dec 21 '20 09:12 Atkana

Ah, yes, I suppose that should be mentioned in the docs - since I set up the system, I tend to not think as much about writing certain steps like that down. (You can also click on the X or checkmark, then click "Details" to get to the same place:) image

As a heads-up, I'm trying to get r4 out soon, so I might need to delay looking this over and merging it until after r4 is out.

lethosor avatar Dec 21 '20 20:12 lethosor

Wrote up a bit here: https://docs.dfhack.org/en/latest/docs/Documentation.html#github-actions Ideally this would be part of a larger explanation of our continuous integration setup (maybe under the Contributing page?) but we don't quite have that yet.

lethosor avatar Dec 21 '20 22:12 lethosor