mrkwnzl / cyphersystem-foundryvtt

The Cypher System for Foundry VTT
Other
21 stars 14 forks source link

[Feature Request] Button to roll skill / attack / recovery roll #39

Closed MithralDream closed 3 years ago

MithralDream commented 3 years ago

So far, the only way to roll a skill seems to be using the Macro that gets generated when drawing the skill into the hotbar. However, it is frustrating not being able to roll a skill directly on the page that it is listed on

Macros in Foundry convert into a clickable button then pasted in the right text box, such as the Description Box used with this character sheet. Doing it this way is still adds one unnecessary click per roll, not to mention having to set up the macro each time a new skill is created. image

The Macro that is generated is already good, so all that would be needed is a button to run it somewhere next to the Skill's / Attacks name. Alternatively, if opening the dropdown description would show the clickable macro, that would solve the problem as well. image

Similarly, all the info for recovery rolls is on one page, except for a button to actually make a recovery roll. The macro for this already exists as well, only a button that runs it is needed.

mrkwnzl commented 3 years ago

There are no roll buttons on the sheet by design. I want the system to be modular and customizable. A button on the sheet would be neither. My intention with the roll macros is that most of the time, the quick roll macro should be used (it’s actually 100% of the time in my games, as it’s the only macro we use). That one is always a single click (or press of the number button) away, regardless of whether you have your sheet open or whether you are in the right tab. Unless you use the effective difficulty option, the item macro is the quick macro anyway, just with the info of the skill added.

I’ll look into your suggestion of making the macro link clickable in the description. I don’t think that I can do that, though, as that part is handled by a handlebar, which uses the HTML in the description, but the macro link is not HTML, which is why it can’t be clicked. I’ll see if there’s a HTML workaround.

MithralDream commented 3 years ago

I'm unsure how a button reduces modularity and customizability, but then again I'm not a coder. The quickroll macro is good, but doesn't include adaptive difficulty, as you said. The All-in-one macro is great too, but too slow for tasks that get performed regularly. Just having the option to activate the macro in the same place its stored would be good for quality of life. If ctrl+click sends the description to the chat, perhaps Shift-click could activate the macro?

At any rate, thanks for your consideration, and the foundry module in general.

sharkbruhaha commented 3 years ago

As a note, @MithralDream , you can save/edit the "all in one" and name it even such that you have one on the bar for the common tasks and even your common expenditures for it if you want. (making copy of it and editing for each one you want to make)

mrkwnzl commented 3 years ago

I'm unsure how a button reduces modularity and customizability, but then again I'm not a coder.

I’d have to decide how the rolls with the buttons work. The whole idea with roll macros instead of functions on the sheet was that people can choose what kind of roll macros they prefer and customize and even create their own with relative ease. If I put a button there, there will be people who want them to work differently. I think it’s easier (for me and for GMs and players) to have all the roll macros in one place, with the same logic of customization for each one.

The quickroll macro is good, but doesn't include adaptive difficulty, as you said. The All-in-one macro is great too, but too slow for tasks that get performed regularly.

Maybe you could walk me through how you play the game. My default assumption is that you play RAW. That is, when it comes to a roll, the GM tells you the difficulty (or not, RAW is a bit ambiguous there), and you add together your skills, assets, Effort and all the rest. Then the difficulty gets adjusted accordingly, and lastly, you roll. No modification of the roll, as those have been accounted for when the difficulty was adjusted.

That’s why my assumption is that, I don’t know, about 95% of the time, the Quick Roll macro is used. The macros for Eased and Hindered Rolls is used when all players make a roll at the same time, each modifying the difficulty differently, so the info is send to the chat and the GM can see who succeeded.

The effective difficulty setting is intended to be used with the All-in-One Roll, mostly. Some people want a GUI for the modification of the difficulty instead of just doing it in their head and don’t want to adjust the difficulty beforehand.

The intention of the item macros is that you can put some rolls to the macro bar that you frequently use in similar circumstances, so that no considerations of assets or effort are needed. And if they are, you can modify the macro accordingly.

You seem to desire something in between, which I don’t seem to understand correctly. Could you elaborate on how your whole process of rolling would work, with examples for a roll which doesn’t need to be modified by assets, effort, and other factors, and one that does? And I don’t mean that in the way of where you click in Foundry, but what happens at your gaming table? How is the difficulty discussed before the roll in your games?

Just having the option to activate the macro in the same place its stored would be good for quality of life.

I know for my players that it wouldn’t. If your players are anything like mine, it would endlessly confuse them to have some rolls in the macro bar and others on the sheet, especially if some of those rolls then work differently.

At any rate, thanks for your consideration, and the foundry module in general.

Sure thing! Thanks for the suggestion!

MithralDream commented 3 years ago

Difficulty is discussed beforehand as you've said, but I see now that effective difficulty has caused some confusion as to not apply training as both a bonus to the roll and to lower task difficulty. However, since both effective difficulty and all-in-one-dialogue are optional settings, I guess letting players roll from the sheet directly wouldn't do anything without those options checked. Convenient yes, but not inherently more useful than the macro.

I still can't see how this applies to the recovery roll macro though, which simply rolls whatever is in the recovery roll box on the sheet, so most modifications could take place there, I would imagine. And if not, the separate macro can still exist for those who need to make more substantial changes. The focus on customisation is good, but it can make the system feel a bit disjointed. Then again, that could very well be a Me-Problem, having ADD and all.

Perhaps this is merely a matter of experience. Coming from other game systems on both Roll20 and Foundry, I was confused that a core function of the game wasn't done on the sheet itself, but found in the Compendium. Foundry doesn't exactly do a good job at letting designers explain their work other than linking to their githubs.

mrkwnzl commented 3 years ago

Foundry doesn't exactly do a good job at letting designers explain their work other than linking to their githubs.

That is true. I’m working on a wiki here on GitHub, where I try to describe all the parts and the reasons why I did that in more detail.

I still can't see how this applies to the recovery roll macro though, which simply rolls whatever is in the recovery roll box on the sheet, so most modifications could take place there, I would imagine. And if not, the separate macro can still exist for those who need to make more substantial changes. The focus on customisation is good, but it can make the system feel a bit disjointed. Then again, that could very well be a Me-Problem, having ADD and all.

I did that for one simple reason: All rolls are made from the macro bar. That’s me trying to make the experience as consistent as possible. The above mentioned difficulty of explaining how it works in Foundry gives reason to that. It’s relatively easy to explain that there are dice macros included, which you can add to the macro bar. It’s harder to explain that there are dice macros included, which you can add to the macro bar, and that the macros work differently depending on some user settings and the combination of said settings. It’s hardest to explain that there are dice macros included, which you can add to the macro bar, and that the macros work differently depending on some user settings and the combination of said settings, except for the Recovery roll, which is located on the character sheet.

Perhaps this is merely a matter of experience. Coming from other game systems on both Roll20 and Foundry, I was confused that a core function of the game wasn't done on the sheet itself, but found in the Compendium.

That’s actually one of the design principles. There is another game system, Numenera done by SolarBear, which gives an experience more similar to Roll20 and to other systems on Foundry. But I find that approach to online gaming not working very well for my group and Cypher. Other games, such as Shadow of the Demon Lord, absolutely benefit from a fully interactive sheet. I found that Cypher suffers from it. We tried Roll20, but my players didn’t learn the rules. They learned how to operate the character sheet. So what I tried was to re-create what can be done at the physical table. At the physical table, we discussed the difficulty, which was part of the creative process. The players got more creative when they saw that the difficulty was still 4. Difficulty 7 and they being trained, having an asset and using one level of Effort gave them the feeling of having enough bonus to make the roll. We then religiously lowered the difficulty after that, and knowing the result before the roll (still having to roll against difficulty 4, instead of rolling against difficulty 7 with three steps bonus) was psychologically different, and they started to try to get creative. Maybe they can get another Asset for something. They started to use XP for short-term benefits. So my approach with Foundry changed as well. I try to make my system in a way that you can do anything you can do at the table, but not much more. On the one hand, that allows for much flexibility (e.g. you can use spells as abilities, have two foci or descriptors, have two levels of Effort for damage and to lower the difficulty cost 6 instead of 5 points, as is a house rule for some), but on the other hand results in having some less convenient features. Having the rolls as macros is a compromise for that. I didn’t get that from SolarBear’s game system, which is why I made my own. Maybe SolarBear’s system is more to your liking. There isn’t really anything that my system can that SolarBear’s can’t. Have you tried that?

MithralDream commented 3 years ago

There is another game system, Numenera done by SolarBear, which gives an experience more similar to Roll20 and to other systems on Foundry. Maybe SolarBear’s system is more to your liking. There isn’t really anything that my system can that SolarBear’s can’t. Have you tried that?

I have, and I've found the character sheet to not be very organised. Each entry is so large that pages become cluttered very quickly. Keeping track of Abilities, Equipment, Cyphers, Artifacts, Iotum, etc is a pain. Textboxes have no formatting and are either unnecessarily resizable to a degree where it breaks the sheet, or fit less than a sentence. Creating a new attack or ability always creates a new skill linked to it, which is not needed for enablers or any ability that doesn't involve a die roll. Not that text-based abilities work anyway, since here is no paste-to-chat function.

It's basically the exact opposite of your sheet. It has all game functions baked into it, but it fails at keeping track of anything properly. Where as your sheet is compact, readable and organised, but has no actual game functions tied to it.

mrkwnzl commented 3 years ago

All right. So, here’s one thing as a workaround that might fit your needs better than what have I prepared with the Quick Roll macro. This also illustrates what I mean by customization (and is basically what @sharkbruhaha suggested).

In the macro compendium, there is the Quick Roll (All-in-One Template). I don’t know if you have ever opened that to edit it, but this is in there:

// Create your own All-in-One quick roll macro.
// Change the values after the equal sign.
// Keep the quotation marks where there are any.

// Add the title of the macro. What is it for?
let title = "Title";

// Give some info about what this macro does.
// Ex: "Skill. Level: Trained"
// Ex: "Skill. Level: Specialized. Power Shifts: 2"
// Ex: "Ability. Cost: 2 Intellect points"
let info = "Type. More info";

// What is the total Pool point cost for this macro?
let cost = 0;

// What Pool is used to pay the cost? Might, Speed, or Intellect?
let pool = "Might";

// By how many steps is the roll eased or hindered?
// Eased: positive value. Hindered: negative value.
let modifier = 0;

// Do not change anything below

game.cyphersystem.allInOneRollMacro(actor, title, info, cost, pool, modifier);

You can now create your own roll macros with that. For example, this:

// Create your own All-in-One quick roll macro.
// Change the values after the equal sign.
// Keep the quotation marks where there are any.

// Add the title of the macro. What is it for?
let title = "Skill Roll";

// Give some info about what this macro does.
// Ex: "Skill. Level: Trained"
// Ex: "Skill. Level: Specialized. Power Shifts: 2"
// Ex: "Ability. Cost: 2 Intellect points"
let info = "Skill Rating: Trained";

// What is the total Pool point cost for this macro?
let cost = 0;

// What Pool is used to pay the cost? Might, Speed, or Intellect?
let pool = "Might";

// By how many steps is the roll eased or hindered?
// Eased: positive value. Hindered: negative value.
let modifier = 1;

// Do not change anything below

game.cyphersystem.allInOneRollMacro(actor, title, info, cost, pool, modifier);

This would be the output:

Bildschirmfoto 2021-01-25 um 15 58 58

Now you can create 4 of those, one each for inability, practiced, trained, and specialized. You can put those at positions 1–4 of the macro bar. That’s basically what the item macro does, but now you have constant access to them, by simply hitting 1–4 on the keyboard or by clicking on the macro bar. You don’t even have to open the character sheet.

The same thing would be done with the All-in-One Roll macro, if you prefer to have the All-in-One dialog opened:

// Change the defaults for the macro dialog.
// Change the values after the equal sign.
// Keep the quotation marks where there are any.

// What Pool is used to pay the cost? 
// Might, Speed, or Intellect?
let pool = "Might";

// What is the skill level? 
// Inability, Practiced, Trained, or Specialized?
let skill = "Trained";

// How many assets do you have? 
// 0, 1, or 2?
let assets = 0;

// How many levels of Effort to ease the task?
// 0, 1, 2, 3, 4, 5, or 6?
let effortTask = 0;

// How many levels of Effort for other uses?
// 0, 1, 2, 3, 4, 5, or 6?
let effortOther = 0;

// How many steps is the roll eased or hindered (excl. Effort)?
// Eased: positive value. Hindered: negative value.
let modifier = 0;

// How many additional Pool points does it cost (excl. Effort)?
let poolPointCost = 0;

// How much damage?
let damage = 0;

// How many levels of Effort for extra damage?
// 0, 1, 2, 3, 4, 5, or 6?
let effortDamage = 0;

// How much extra damage per level of Effort?
// Generally, this is 3.
// Area attacks usually only deal 2 points of damage per level.
let damagePerLevel = 3;

// Do not change anything below

let stepModifier = "eased";
if (modifier < 0) stepModifier = "hindered";
modifier = Math.abs(modifier);

game.cyphersystem.allInOneRollDialog(actor, pool, skill, assets, effortTask, effortOther, poolPointCost, modifier, stepModifier, "", damage, effortDamage, damagePerLevel);

This macro will open the All-in-One dialog, but the skill rating defaults to trained, so that you can start the macro and hit enter to just apply it. If you want both the Quick Roll macro for some situations and the All-in-One dialog for other situations, you can populate your macro bar with 8 macros. 1–4 quick rolls, 5–8 dialog.

Would that be viable solution to you?

MithralDream commented 3 years ago

After some testing, I've come to the conclusion that the simple roll is the more optimal solution. Turns out it was a me-problem after all. I still think it's awkward that the macro bar is mandatory, but modules like Token Actions can give it the more central placement i desire. The notes section of the sheet also makes pasted macros clickable, so I've put what I need in there for now. I would have suggested giving the option to make at least attacks roll-able from the sheet for things that both have a roll and an important description, but since I can just put macros in the description that can be CTRL-click pasted to the chat, that's not really necessary either.

I hope I didn't come off as demanding or as telling you how to design your sheet. I was a bit confused since I've never encountered a system entirely relying on macros, and I had leftover frustration from trying to work with SolarBear's disorganised sheet. Thank you for the module in general, and your time indulging me specifically.

mrkwnzl commented 3 years ago

[…] modules like Token Actions can give it the more central placement i desire.

I was under the impression that Token Actions needs explicit support for the game system to work. Does it work with the Cypher system?

The notes section of the sheet also makes pasted macros clickable, so I've put what I need in there for now. I would have suggested giving the option to make at least attacks roll-able from the sheet for things that both have a roll and an important description, but since I can just put macros in the description that can be CTRL-click pasted to the chat, that's not really necessary either.

To be honest, that’s exactly how I would imagine the Cypher system to be used. I’ll investigate if I can make the links clickable in the item descriptions, as that would directly support a way to customize the sheet for your own needs. That would be awesome. I’m a bit skeptical that the handlebar I use for the description can handle that, but I’ll try.

I hope I didn't come off as demanding or as telling you how to design your sheet. I was a bit confused since I've never encountered a system entirely relying on macros […].

No worries! I’m aware that my approach is neither particularly intuitive (given how the more popular game systems work), nor particularly popular. It’s kind of the Linux of game systems. You need to put a little work into it to make it your own. I’m working on the wiki to make that part a bit easier.

mrkwnzl commented 3 years ago

Workaround for having links in the description. I’m not sure that I can actually automate this. I’d have to re-rewrite the handler and I’m not sure that’s worth the effort. But you can create your own links:

Bildschirmfoto 2021-01-30 um 09 35 48

Works like this:

  1. Create a macro by dragging the item in question unto the macro bar.
  2. Edit the item.
  3. Open the editor of the item and drag the macro unto the editor. The automatic link has been created.
  4. Open the HTML-mode of the editor with the <> button.
  5. Write this HTML: <a class="entity-link" data-entity="Macro" data-id="MACRO ID">TITLE</a>
  6. Replace “MACRO ID” and “TITLE” with the macro id from the automatically created link and whatever title you like. Note: Keep the quotation marks around the macro id!
  7. Optional: Remove the automatically created link.
  8. Optional: Remove the macro from the macro bar, but do not delete the macro from the macro directory!
  9. Done.

This is what the HTML editor looks like:

Bildschirmfoto 2021-01-30 um 09 40 59

The first line is the automatically created link, second one is the HTML link. With that, you can create your own macros for all kinds of stuff and put the buttons unto the sheet. Create a button to spend Pool points and put the button into the description of an ability. Create a skill roll macro which also includes easements from power shifts and create one button for the skill alone and one for its use including the power shift. Use the All-in-One template to create multiple defaults for different situations and put multiple of those into abilities, skills, attacks, or equipment. Actually a pretty powerful tool. Thanks for making me look into this!

MithralDream commented 3 years ago

This is huge. It's actually exactly what I needed. The macro buttons created this way also look a lot nicer, without the >_ in front of the name very time. Still a bit tedious to do, but the steps are really easy. With how useful this can be, documentation of it should probably be kept somewhere where new players & GMs will find it without knowing what they're looking for. Perhaps a "How to customise this Sheet" Journal Compendium. I'm guessing that since it's default HTML & Foundry stuff, it's already explained somewhere, but not everyone will go looking for it online or even look here on the GitHub.

Really glad I found this place though. With this and click-to-increment pools, I can't think of anything that I would need to smooth out the game experience. Thanks a lot!