Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

How do I roll attack with a weapon. #15

Closed
mrbwhitby opened this issue Feb 2, 2021 · 4 comments
Closed

How do I roll attack with a weapon. #15

mrbwhitby opened this issue Feb 2, 2021 · 4 comments

Comments

@mrbwhitby
Copy link

I love that you are developing this system module for Foundry.

Our group is trying out Stars Without Number. We have tried it out on Roll20 but Foundry is soooo much better.

But I am unable to figure out how to roll attacks with the weapons. An actor, once equiped with one of the weapons in the compendium, has a weapon on which a player can click on. It asks the pertinent questions.....but then no dice roll results from the click.
Are we doing something wrong.

and apologies for logging the question here in the "Issues" section. I wasn't sure where else to contact you through regarding your module.

Thanks so much for your module and your help.

@jwmccowan
Copy link

I was trying out the system this evening and found the same issue. Throws an undefined error in the console.

Looks like line 156 (104 in the source map) in the character sheet is throwing an error, probably because the query selector on line 135 (91 in the source map) is returning undefined.

@Spice-King Do you accept pull requests?

@jwmccowan
Copy link

Ah I see what's going on here. @mrbwhitby you can set the skill to use by editing the weapon itself from the weapons tab. If you select shoot or whatever, it will use that value and roll correctly.

If you don't select a skill, the roll errors out. There needs to be a check if skill exists before checking its value on line 156, something like:

effectiveSkillRank:
          !skill || skill.data.data.rank < 0 ? -2 : skill.data.data.rank,

@mrbwhitby
Copy link
Author

mrbwhitby commented Feb 4, 2021

Thanks so much! I will try that out. This is much appreciated.

Edit:
That did it! Thanks so much for the fix

@Spice-King
Copy link
Owner

Ah sorry, missed the email yesterday. I'll look into why the prompt for what skill to use in the dialog is not there. I probably messed up the logic when I anded NPCs.

thebwt pushed a commit to thebwt/foundry-swnr that referenced this issue Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants