Coder Social home page Coder Social logo

wintersleepai / foundry-swnr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spice-king/foundry-swnr

27.0 27.0 18.0 2.71 MB

Stars Without Number: Revised for Foundry VTT

License: GNU Affero General Public License v3.0

JavaScript 0.67% TypeScript 52.74% HTML 44.94% CSS 1.01% Dockerfile 0.05% Python 0.59%

foundry-swnr's People

Contributors

bwebster4 avatar cup-of-coffee avatar droneenthusiast avatar matthewboyter avatar morops avatar spice-king avatar thebwt avatar wintersleepai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

foundry-swnr's Issues

The ship sheet need a general overhaul

This sheet covers some basics, but IMO has too much whitespace, Doesn't show enough detail, and needs much better inventory (cargo and ship stores) information. I'm attaching the ship sheet I made in Google Sheets as a reference for what I believe is needed.

Screenshot 2024-03-08 at 1 36 28 AM

Add the quantity value to Weapons and Armor

Currently the only way for a character sheet to hold several quantities of the same type of armor is to have multiple instances take up space.

Screenshot 2022-07-10 215527

In the example above, you have a character holding three chaincutters, 3 combat field uniforms and 7 biofuel tanks. Unlike the biofuel tanks, you can only show a character having multiple items of the same the weapons and armor is to have it take up a significant amount of sheet space.

ST and Attack rolls not working in foundry 9.255

Foundry VTT | Retrieved and compiled template systems/swnr/templates/items/armor-sheet.html
handlebar-helpers.ts:36 {skillID: '', skillItem: undefined}
handlebar-helpers.ts:36 {skillID: '', skillItem: undefined}
handlebar-helpers.ts:36 {skillID: '', skillItem: undefined}
handlebar-helpers.ts:36 {skillID: '', skillItem: undefined}
foundry.js:3055 Foundry VTT | Rendering BaseSheet
character-sheet.ts:461 S.Event {originalEvent: PointerEvent, type: 'click', target: i.fas.fa-dice-d20, currentTarget: div.item.skill.skillRoll.w-32.flex-grow.space-y-1, isDefaultPrevented: ƒ, …}
skill.ts:9 Skill roll SWNRSkill {apps: {…}, _sheet: null, parent: SWNRCharacterActor, pack: null, data: ItemData}
foundry.js:4662 Foundry VTT | Retrieved and compiled template systems/swnr/templates/dialogs/roll-skill.html
foundry.js:3055 Foundry VTT | Rendering ValidatedDialog
skill.ts:30 S.fn.init [div#app-51.app.window-app.swnr]
foundry.js:6771

   Roll#evaluate is becoming asynchronous. In the short term you may pass async=true or async=false to evaluation options to nominate your preferred behavior.

evaluate @ foundry.js:6771
roll @ foundry.js:6874
_doRoll @ skill.ts:47
submit @ foundry.js:44072
submit @ ValidatedDialog.ts:46
_onClickButton @ foundry.js:44035
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
backend.mjs:306 Foundry VTT | Created ChatMessage with id [vrXEZikEZwATU6U4]
character-sheet.ts:200 S.Event {originalEvent: PointerEvent, type: 'click', target: div.save.sheet-button.gap-2, currentTarget: div.save.sheet-button.gap-2, isDefaultPrevented: ƒ, …}
foundry.js:4662 Foundry VTT | Retrieved and compiled template systems/swnr/templates/dialogs/roll-save.html
foundry.js:3055 Foundry VTT | Rendering ValidatedDialog
foundry.js:6771

   Roll#evaluate is becoming asynchronous. In the short term you may pass async=true or async=false to evaluation options to nominate your preferred behavior.

evaluate @ foundry.js:6771
roll @ foundry.js:6874
_doRoll @ character-sheet.ts:221
submit @ foundry.js:44072
submit @ ValidatedDialog.ts:46
_onClickButton @ foundry.js:44035
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
foundry.js:44076

   Uncaught Error: TypeError: Cannot read properties of undefined (reading 'total')
at ValidatedDialog.submit (foundry.js:44076:13)
at ValidatedDialog.submit (ValidatedDialog.ts:46:20)
at ValidatedDialog._onClickButton (foundry.js:44035:10)
at HTMLButtonElement.dispatch (jquery.min.js:2:43064)
at HTMLButtonElement.v.handle (jquery.min.js:2:41048)

submit @ foundry.js:44076
submit @ ValidatedDialog.ts:46
_onClickButton @ foundry.js:44035
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
foundry.js:6771

   Roll#evaluate is becoming asynchronous. In the short term you may pass async=true or async=false to evaluation options to nominate your preferred behavior.

evaluate @ foundry.js:6771
roll @ foundry.js:6874
_doRoll @ character-sheet.ts:221
submit @ foundry.js:44072
submit @ ValidatedDialog.ts:46
_onClickButton @ foundry.js:44035
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
foundry.js:44076

   Uncaught Error: TypeError: Cannot read properties of undefined (reading 'total')
at ValidatedDialog.submit (foundry.js:44076:13)
at ValidatedDialog.submit (ValidatedDialog.ts:46:20)
at ValidatedDialog._onClickButton (foundry.js:44035:10)
at HTMLButtonElement.dispatch (jquery.min.js:2:43064)
at HTMLButtonElement.v.handle (jquery.min.js:2:41048)

submit @ foundry.js:44076
submit @ ValidatedDialog.ts:46
_onClickButton @ foundry.js:44035
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
character-sheet.ts:200 S.Event {originalEvent: PointerEvent, type: 'click', target: i.fas.fa-dice-d20, currentTarget: div.save.sheet-button.gap-2, isDefaultPrevented: ƒ, …}
foundry.js:3055 Foundry VTT | Rendering ValidatedDialog
foundry.js:6771

   Roll#evaluate is becoming asynchronous. In the short term you may pass async=true or async=false to evaluation options to nominate your preferred behavior.

evaluate @ foundry.js:6771
roll @ foundry.js:6874
_doRoll @ character-sheet.ts:221
submit @ foundry.js:44072
submit @ ValidatedDialog.ts:46
_onClickButton @ foundry.js:44035
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
foundry.js:44076

   Uncaught Error: TypeError: Cannot read properties of undefined (reading 'total')
at ValidatedDialog.submit (foundry.js:44076:13)
at ValidatedDialog.submit (ValidatedDialog.ts:46:20)
at ValidatedDialog._onClickButton (foundry.js:44035:10)
at HTMLButtonElement.dispatch (jquery.min.js:2:43064)
at HTMLButtonElement.v.handle (jquery.min.js:2:41048)

Unable to Add Characters to Starships

The GM and Player is unable to add their character actor to the Starship Sheet. A error being given instead when they try.

Screenshot 2022-10-08 083555

This is on Foundry VTT version 10.287.

No supressive fire for Heavy Machineguns on Vehicles?

Hello everybody.

Is there currently no way to add a working supressive fire weapon to a vehicle? I've tried to add the machinegun from the heavy weapons compendium but it is not possible, and vehicle weapons do not have the capability.

Cheers, I love your system!

NPC sheet lacks the "profile-img" class on the avatar IMG tag

Problem statement: the "character" sheet (character-sheet.html) has the class property of "profile-img" on the IMG tag of the character avatar:

      <img
        class="profile-img w-24 h-24 object-contain"
        src="{{actor.img}}"
        title="{{actor.name}}"
        data-edit="img"
      />

the NPC sheet (npc-sheet.html) lacks this property, and as such the Tokenizer module can't be used to create and assign tokens.

As a game master, I want to be able to use the Tokenizer module ( https://github.com/mrprimate/vtta-tokenizer/) to automatically create tokens for NPC sheets in the same way I can use the plugin on PC sheets.

Acceptance criteria:

  • Users with permissions to edit character sheets can activate the Tokenizer module by clicking the avatar of a specific character sheet

"Clickable Stats" option doesn't change mouse cursor on mouse over

Via Ramirez in Discord

Bug: Cursor does not change shape when hovering over clickable stat (after making it clickable in system settings). Cool that we can do it, though! Was missing that.
confirmed via
https://user-images.githubusercontent.com/578441/210602509-0c2f2838-b7f7-4268-b65c-c2f9ec646ffe.mp4

Wintersleep response:

A link / hand has to be on or off for simplicity -- regardless of the system setting. I opted for off with it still being clickable. If folks feel strongly, I could make it on

Ship Crew Issue

When you add crew members to the ship, if you change current crew number afterwards to a smaller one, one of the characters disappears from the crew list
Adding that character back by drag and drop does not do anything except increase the current crew number

[Enhancement] Temp HP field

In some places, the rules in all three *WN systems grant characters/vehicles/ships temporary HP boost (Biopsionic technique the name I forgot of, Juggernaut Stims, Star Captain in SWN, armours in CWN, Courage Elixir in WWN are the ones that come to mind). Would be nice to have a way to display it other than just adding HP over maximum HP as I (and probably others) do at the moment.

Unspent skill points

via reddit:
In the skill tab on the character sheet, it would be nice to have a Unspent Non-Combat Skill Points, the Expert Class gain +1 Skill point when Leveling Up that can only be applied to non combat skill progression. That way it could be saved for later lvl ups and don't mix with the regular unspent skill points.

Bestiary Attack Roll errors

All NPCs in the Bestiary Compendium throw this error when an attack is made. Morale checks and other rolls work ok but not attack rolls. This is the same when rolled from locked compendium or imported to actors. Other compendium items appear to function normally, attacks with vehicles and ships roll normally.

Foundry VTT v10 b291 SWN v1.0.0 Active modules 0

\\Uncaught (in promise) Error: Unresolved StringTerm none requested for evaluation
at StringTerm.evaluate (foundry.js:11730)
at Roll._evaluate (foundry.js:9292)
at Roll.evaluate (foundry.js:9256)
at Roll.roll (foundry.js:9362)
at SWNRWeapon.rollAttack (weapon.ts:115)
evaluate @ foundry.js:11730
_evaluate @ foundry.js:9292
evaluate @ foundry.js:9256
roll @ foundry.js:9362
rollAttack @ weapon.ts:115

Adjust ammo rules?

Love the sheet but looking at potentially adding multiple fire mods for ammo use and hit modifiers.

Any idea how I would implement some custom fire rate or ammo use a round?

Token HP isn't tied to Actor HP for PCs, and default token isn't very usable

Originally reported in discord:

Suggestion: Player Token HP and char sheet HP are not connected by default. Lost HP is not shown correctly when char sheet is opened. This is ok for npc, but can it be different by default for player chars?

@wintersleepAI followed up with

If I am understanding you correctly this is a foundry behavior. By default tokens are not linked to the prototype actor, but requires that someone checks the box manually to link (see the diagram above). This means all tokens are about the same actor vs creating a new one when dragged. I think I do have the code to link by default for an actor type (eg characters could come linked by default) -- this is what factions do. I hesitated doing this on actors as it changes a core behavior and might go against what someone expects.

IMO, there are a few things to take from this:

  • PC tokens should be tied to the actor directly
    • So if we have a token on multiple scenes tied to a PC actor this stat changes carry over. This is how most tables I've ever used work and is pretty intuitive.
  • Default Tokens should have Health as a bar
    • PC tokens should have effort too.
  • NPC tokens shouldn't have their health affect the Actor they are generated from.

Drones don't have weapon or defense fittings

Well mostly...

If a drone has a weaponry fitting it can be equiped with a small arm. As it stands now, we can equip ship weapons onto drones which... while entertaining, isn't the intent.

image

Solution?

I think the solution is to hide the defense category on drones, and somehow change the filters being passed to the weapons stuff to just pull up a list of small arms items.

We don't need to do validation that there are enough weapon fittings to fit the chosen number of weapons, but that may be neat too. Bonus points, have it hide the weapons section if there are no such fittings.

Mitigations

Because the "+" lets us load a freeform fitting, we can actually just stat out whatever weapon we want it to have. So this isn't a huge deal.

Item issue

Item descriptions for the item type disappear after update in v10.

Error: You are accessing SWNRBaseItem#data which has been migrated to SWNRBaseItem#system

Error: You are accessing SWNRBaseItem#data which has been migrated to SWNRBaseItem#system Deprecated since Version 10 Backwards-compatible support will be removed in Version 12 at logCompatibilityWarning (commons.js:1993:19) at SWNRBaseItem._logDataFieldMigration (commons.js:8429:14) at Object.get (commons.js:8393:18) at character.ts:173:39 at EmbeddedCollection.filter (commons.js:4103:14) at SWNRCharacterActor.prepareDerivedData (character.ts:173:18) at SWNRCharacterActor.prepareData (foundry.js:14126:12) at SWNRCharacterActor._safePrepareData (foundry.js:14101:14) at SWNRCharacterActor._initialize (foundry.js:13929:19) at new DataModel (commons.js:6817:12)

This warning floods my console every time I launch the world using this system. I'm concerned with updating to the next update, as it says this backwards compat will be removed in v12, I don't wanna run the risk of borking my world file again with an update.

Dragging a weapons or skills onto Hotbar creates Display macro, rather than attack/skill check macro.

Running Foundry v11 build 315 and SWNR 1.1.0. With 65 active modules.

When dragging a weapon from player character sheet inventory tab onto hotbar, it creates a Display macro rather than an Attack macro:

await Hotbar.toggleDocumentSheet("Actor.XSf4e3sD4m6H2d0V.Item.yIx0xpehvdv19gZw");

Same for skills from player character sheet skills tab:

await Hotbar.toggleDocumentSheet("Actor.XSf4e3sD4m6H2d0V.Item.spERkKi3nIHHm0jk");

I get the same behaviour if I drag a weapon from an NPC sheet onto the hotbar.

Thank you for the amazing work!

Item description HTML fields no longer editable on v10

The structure changes in v10 appear to have broken the description fields on all items. Existing descriptions display fine however making changes to the field result in the below error
Uncaught (in promise) Error: undefined. data.description is not an active editor name! [No packages detected] at BaseSheet.saveEditor (foundry.js:6060:46) at jR.save_onsavecallback (foundry.js:6102:39) at plugin.min.js:4:1197 at jR.<anonymous> (plugin.min.js:4:1412) at commands.exec.<computed> (tinymce.min.js:4:358670) at iR.execCommand (tinymce.min.js:4:358116) at jR.execCommand (tinymce.min.js:4:383782) at Object.onAction (plugin.min.js:4:842)

This prevents updating the description field on any item. The biography field seems to work fine even though the code for the two appears to be the same. As far as I can tell there are no other issues with the system in v10, just lots of deprecation warnings due to the data structure change.

Limited Permission hides the character sheet from users with GM role

What it says in the title, I have a person helping me with my game and if I set permission on any character sheet to Limited, they only see the picture and the name when they open the actor. This only happens if you set permission in the "All Players" field. If you set the individual permissions for player accounts, GM accounts have no problem accessing the sheet.

Old Manifest Json links aren't updated with new updates.

It seems like to update this system one has to reinstall the system with the new json link provided in each new release.

Could a consistend, self updating json link be created so that the update button in foundry itself can be used?

Rolltables Already included?

Hello,

more of a general feature request or question.
The Spice-King version recently included auto rolltables from the book, which was a long requested feature.
Is this already present within the newest release of this branch? Or will it come someday?

Thank you for your great work here!

Add damage modifier to weapon rolls

There are often situational bonuses, so the weapon attack roll should have a misc damage modifier (like it already has for the attack roll)

Drone and Ship Fittings intermingled (dev-1.0)

Howdy!

When we go to search for fittings to add to a drone sheet, we see the starship fittings as well.
image

The inverse is true when adding them to ships
image

It's certainly not game-breaking by any means, but figured I'd file it away.

Weapons stop working when dragged from sheet to sheet

When dragging a weapon from one sheet to another, they can no longer be used to make an attack, until the item is edited so that the skill choice menu resets.

Supposedly the chosen skill is tied to the previous character.

NPC item issue

If I click "skill adds to damage" on an item assigned to a NPC, it doesn't roll. No error, it just does nothing. It does work on PCs. I'm thinking since NPCs do not have skills, that would be why it doesn't work. But they do have a trained skill attribute. Shouldn't that work in place of a typical PC skill?

Error: "Actors is not a valid embedded Document within the Token Document"

Hey guys,

Thanks for making this system for Foundry. It's been my primary focus to get my roll20 campaign fully realised in Foundry due to this System :)

All in all, it works great but with the latest v11 Foundry version I have noticed an uptick in an error that I was getting far less frequently in the latest v10 patch.

Error: Error: "Actors is not a valid embedded Document within the Token Document."

freebootersofnewbendigo.forge-vtt.com-1686889833371.log

Full disclosure: I have been building this campaign in Foundry for almost a year on and off so there has been a lot updates and changes to Foundry since then. Lately with v11 this error is happening all the time for tokens that are not explicitly linked to Actor data. This is a big problem for NPCs in battle situations. The main trigger in my use case is when I roll an attack with damage and try to apply the damage to the selected NPC token from within the damage roll. (The little +, - buttons under the damage number) Trying to do this will always display the error UNLESS I connect the NPC token to the NPC actor sheet.

I'm not much of a JSON person, so a lot of how Foundry works under the hood is lost on me, so apologies if this is more towards the App and not the System.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.