Giter VIP home page Giter VIP logo

foundryvtt-level-up-official's People

Contributors

jffrli avatar joshatron121 avatar jpmeehan avatar julaberry avatar kagejittai avatar matneyx avatar nchezrony avatar nekrodarkmoon avatar pjb518 avatar sharkbruhaha avatar theik 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  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

foundryvtt-level-up-official's Issues

BUG: data loss on simultaneous edit of different world objects

If two people are editing different Items at the same time, one person will lose their work, while the other will retain their work. It has been observed with the following conditions:

  • User 1 is the host and working within the Foundry application, User 2 was accessing Foundry via web browser from another machine
  • In cases where User 2 would be renaming an Item attached to an Actor, and User 1 began editing a separate Item, User 2's Item would revert to the default name
    • this applies to cases where User 1 was editing Items attached to the same Actor, and when User 1 was editing Items in the Item Directory
    • this applies when User 1 is doing any editing to their Item (renaming, adding description text, changing details)

I didn't test if this issue also applies to Actors (Actor & Item, Item & Actor, Actor & Actor cases).

[Feat] implement an ActionManager

Add a getter on the Item Document get actions () that returns an ActionManager class. This should be the default interface for interacting with actions on an item.

  • Add a proxy to the ActionManager that allows for direct access to actions. actionManager.itemId
  • Move all the action helpers from the base item class to the action manager.
  • Allow for the ActionManager instance to be iterable. Object.entries(actionManager) or actionManager.
  • #59

Future improvements include sub managers for each action to easily get prompt data, Target data, roll data, and Consumers.

[Refactor]: Add a generic roll and prompt create button

Refactor the existing interface for adding roll and prompt buttons to be less crowded.
This includes the following:

  • Create a generic TJSMenu selector for creating different rolls and prompts.
  • Refactor the interface to use the new TJSMenu.
  • Hide any sections that do not have any rolls or prompts of that type.

Fix: Use max hp if no hp roll formula is provided when randomising token hp

The current implementation of the token hp randomisation feature assumes that there is a valid hp formula to use. If a token's hit dice haven't been configured (decently likely if this is a user-created Actor), then the token's hp will end up being 0.

In cases where there are no hit dice configured, we should fall back to using the base Actor's max hp value instead.

[Feat]: Implement Item rolling

Re-implement item rolling for our new actions system. This issue includes the following tasks.

  • Create the new Roll Configuration Dialog for the actions system.
  • Hook up the ItemWrapper to be able to trigger the roll config dialog. #55
  • Refactor the activate function in Item.js to use the new actions config.
  • Generate the proper chat card for rolled actions. #52

BUG: issue with data storage and display for Saving Throw Configuration of Item

Currently, the data value for the Saving Throw Type is being saved in the Rarity field of the Item:

image
image

Additionally, "Effect of Successful Save" is not displaying in the collapsed view even when the field is populated:
image
image

Steps to reproduce Saving Throw Type issue:

  1. create new Item
  2. Expand Saving Throw Configuration
  3. Select one of the Saving Throw Types
  4. Check Object Property -> Rarity in collapsed view
    This applies in cases where Rarity has been set and where it was never set before.

Steps to reproduce Effect of Successful Save display error:

  1. create new Item
  2. Expand Saving Throw Configuration
  3. Populate "Effect of Successful Save" text box
  4. Collapse Saving Throw Configuration, review "Effect of Successful Save" section

BUG: block text editor issue

The new text editor in use for Biography/Journal/Notes/etc. does not function properly in Firefox 97.0.1 (64-bit), but functions properly within the Foundry application and in Chrome 99.0.4844.51 (Official Build) (64-bit). This seems to apply for all text fields that previously used Tiny, both for PC and NPC sheets.

Details:

  • navigation through text does not function: cannot click to move editor position, cannot use arrow keys to navigate off of the first line (up and down keys take the cursor to the start and end of the line, respectively, and left/right cannot be used to move off the current line)
  • double-click to select text only functions if done past the end of the line of text
  • if word wrap is supposed to be present, it's not working either; instead, the text box just grows horizontally
  • styling otherwise functions properly via the buttons above the text field

[Request] Actors --> Features ---> Information

I'd like to see on the features tab of an actor, on each individual ability "Source", "Requirements" and that sort of things. Makes telling what each feature is from easier.

Image provided to show what I mean if I was not clear on my description of feature request.
dd
[

Feat: Create Radial Menu for Spells

Create a radial menu for spells that allows for upcasting of spells. The menu pops up on when the roll icon for a spell is clicked. The menu displays numbers from spell level up to 9. Click hold and dragging to a number casts the spell at that level.

This can possibly be created with the use of TJSMenu

Requests - Several resources

An overview tab of your character sheet like the module tidy5esheet does would be need!

That would also give us the resources part where we can track things such as sorcery points or other stuff.

Another feature I'd like to see is an "always prepared" version of preparing spells for classes that just learn the spells and are not prepared casters.

[Request] Ability to Rearrange / Reorganise Inventory

At the moment Inventory can get quite messy when a lot of items are added, so it'd be great to have either sections such as weapons, equipment, and consumables (similar to Foundry's built in 5e system) or the ability to move inventory within the sheet so that it may be organized as desired.

[Chore] Required migrations for 0.9.0

The following are the required migrations needed for 0.9.0:

  • Actions config.
  • Conversion of item weight field to numeric.
  • Move 5ft. range in other to use new CONFIG option.

BUG: NPC sheet not rendering changes to underlying Actor data

Multiple issues observed when adding making modifications to an NPC Actor (both via the Foundry application and via web browser):

  • NPC sheet does not update when first adding an Item (via "+Add X" buttons and via drag-and-drop from the Item Directory). In cases where the Item was added via an on-sheet button, changing the name of the Item will update the sheet. Closing and reopening the NPC sheet shows the new Item in both cases.
  • NPC sheet does not update when deleting an Item from any section of the sheet (the Item appears to remain in the lists). Attempting to delete the Item again throws an error. Closing and reopening the sheet properly shows the Item as having been removed. Stack trace from the console:
    Uncaught (in promise) Error: The key nCCZclGQbM2TZ3ZF does not exist in the EmbeddedCollection Collection
    [Detected 1 package: system:a5e]
    get collection.mjs:106
    _preDeleteDocumentArray foundry.js:10294
    _deleteEmbeddedDocuments foundry.js:10267
    delete backend.mjs:214
    deleteDocuments document.mjs:410
    deleteEmbeddedDocuments document.mjs:558
    onDeleteItem ItemActionButtons.vue:52
    _sfc_render$E/_cache[3]< ItemActionButtons.vue:37
    withModifiers runtime-dom.esm-bundler.js:1466
    callWithErrorHandling runtime-core.esm-bundler.js:155
    callWithAsyncErrorHandling runtime-core.esm-bundler.js:164
    invoker runtime-dom.esm-bundler.js:366
  • Changes to Skill Proficiency, Special Senses, Damage Resistances, Damage Immunities, Damage Vulnerabilities, Condition Immunities, Languages do not render until sheet is closed and reopened.
  • Changes to HP via the Sheet (modifying current HP) do not update HP bar graphic until sheet is closed and reopened.
  • Changes to Max HP via the config dialogue requires closing and reopening sheet to render.
  • Cannot change Current HP via the config dialogue.
  • Edit Toggle does nothing until sheet is closed and reopened.

I'm seeing a lot of unregistered callbacks for hooks in the console, as well. Not sure if those are related, but hopefully it's helpful.

[Feat] Implement sorting of items on actor sheet.

Implement sorting for item reducers.

  • Create helpers for sorting items alphabetically either in ascending or descending order.
  • Hook up UI to helpers.

Future improvement included custom sort when TJS DynMapReducers add support for sorting.

Feat: Add Broken Condition to Item

Add the broken condition to item data.

This includes the following:

  • Add configuration in the item template to signify the broken condition.
  • Add a user interface in the properties tab to change this information.
  • Add a small indicator to Item Wrapper for the actor sheet to easily apply the condition.

[Feat] Implement Chat Cards for actions

Implement very basic chat cards for rolling actions. These are basically the same as our previous chat cards for items just in svelte. Additional functionality can be added in future versions of 0.9.x

Refactor: System settings enchancement

Rework the system settings to use the TRL Library's provided API to get a svelte-based settings UI. This would allow us to provide a good an easy to create an interface for #29 and further complex system settings.

Feat: Allow for limited custom config additions

Add settings to allow GMs to add custom data to the world CONFIG.

This includes but is not limited to the following:

  • Skills
  • Object Types
  • Combat Traditions
  • Primary & Secondary Spell Schools

This can be accomplished by pulling the settings data while setting up the world and appending the settings data to the built-in config.

Currently, the skills config can't handle the addition of new skills but will do so in the future.

[Feat]: Implement helpers for actions system

Implement helpers to make it easier to work with our new actions system data.

This includes but is not limited to the following:

  • get actions()
  • get activationTypes()
  • get prompts...

Feat: Jack of all Trades implementation

Implement jack of all trades for actors.

This task includes the following:

  • Create a setting to enable jack of all trades in actor settings. Alternatively, this can be applied via active effects but the former approach is preferred over the latter.
  • Update prepare skills to account for jack of all trades by checking the settings flag.
  • Update the skill page on the actor sheet to provide an indication of half proficiency.

Object.values(actorData.skills).forEach((skill) => {
skill.mod = skill.proficient ? actorData.attributes.prof : 0;
});

[Feat] Update ItemWrapper

Update the placeholder item wrapper to show information about the item and it's actions.

This includes the following:

  • Include a description for items and actions.
  • Include a mechanical summary for items and actions.
  • Generate an action summary and buttons If only one action is present.
  • Generate sub wrappers for actions if multiple actions exist.

[Feat] Internally track configuration dialog windows so that we can prevent duplicates opening

Only a single instance of a character sheet can be opened at a time. Attempting to open an open sheet simply brings that sheet to the top of the pile. This currently isn't the case for our configuration dialogs. Clicking a given config button over and over again will repeatedly generate new dialog windows. This is undesirable behaviour.

The way that Foundry handles this is by storing a specific sheet instance internally on the actor or item when the sheet is first opened. On subsequent renders, the stored sheet is reused, and Foundry sheets (including dialogs) internally store their own rendered state. This prevents multiple instances of the same sheet being created and rendered.

I propose that we do something similar for our config dialogs.

[Feat] Add a delete confirmation dialog

When clicking the delete button for items on an actor sheet, we should provide an optional dialog to confirm the deletion. This will help prevent accidental deletions.

Chore: Update on:click events

The new svelte version introduces a new handler for on:press, we should replace all uses of on:click with on:press events. This helps us get rid of all the <!-- svelte-ignore a11y-click-events-have-key-events --> comments and increases accessibility.

[Feat] Add the ability to configure "hover" capabilities for a creature's fly speed

Add a new checkbox to the movement configuration dialog where users can mark whether a creature is able to hover.

There are a few ways that we can go about storing the data for this new piece of configuration.

Option 1

"movement": {
  "burrow": 0,
  "climb": 0,
  "fly": 0,
  "swim": 0,
  "walk": 30,
  "hover": false
}

Option 2

"movement": {
  "burrow": 0,
  "climb": 0,
  "fly": {
    "distance": 0,
    "hover": false
  }
  "swim": 0,
  "walk": 30
}

Option 3

"movement": {
  "burrow": 0,
  "climb": 0,
  "fly": 0,
  "swim": 0,
  "walk": 30
  "traits": {
    "hover": false
  }
}

Open to other suggestions as well.

Inompatibility with PopOut!

The sheets provided by this module are marked as incompatible with the PopOut! module for FoundryVTT. I removed the _disable_popout_module property from the sheets and could not find any incompatibility when testing it. Is there a reason these incompatibility flags have been added?

[Feat] Replace the default initiative click handlers in the main Foundry interface

In 0.9.x, the click handlers on actor sheets allow for fast-forwarding initiative rolls by holding down alt while clicking the initiative button. This skips the roll dialog and rolls initiative using Dexterity as the default ability (like in 5e).

We need to add our own handlers for the initiative roll buttons in the main Foundry interface to match the sheet behaviour.

Feat: Add a Spell Modifier Shortcut

Provide a "spell modifier" shortcut in rollData for users to reference. This can be in the form of @spellMod.

References:
RollData can be made available in the actor.getRollData() method.

getRollData() {
const data = super.getRollData();
const { abilities } = this.system;
data.prof = this.system.attributes.prof || 0;
// Add a shortcut for abilities.<ability>.check.mod.
data.abilities = Object.entries(abilities).reduce((acc, [key, ability]) => {
acc[key] = { ...ability, mod: ability.check.mod };
return acc;
}, {});
// Add a shortcut for ability scores.
Object.entries(abilities).reduce((acc, [key, ability]) => {
acc[key] = { ...ability, mod: ability.check.mod };
return acc;
}, data);
data.level = this.system.details.level;
data.spellDC = calculateSpellDC(this.system);
data.maneuverDC = calculateManeuverDC(this.system);
return data;
}

An example of how to get the spellcasting ability modifier can be found here.

export default function calculateSpellDC(actorData) {
const { abilities, attributes, bonuses } = actorData;
const spellcastingAbility = attributes.spellcasting || 'int';
return getDeterministicBonus(
8
+ attributes.prof
+ (parseInt(bonuses?.spell?.dc, 10) || 0)
+ abilities[spellcastingAbility].check.mod
);
}

Incompatability with 5e modules

Since this is an entirely new system instead of building on top of 5e, it is incompatible with 5e compendiums as well as pre-created 5e adventures or other community shared content.

Is this intended? It seems very odd for a system that promises "backwards compatibility"...

Edit: I just saw the note in the readme.
For anyone else that cannot read like me: Compatibility Note: Level Up is not based on the 5e system implementation in Foundry and 5e-specific modules should not be expected to work.
Bummer as I depend on too much 5e specific content to switch to this. I guess I will attempt to whip something up that works for my own needs. Cheers.

[Request(s)] - Dark Mode and Roadmap

Loving the work so far, and I know it's super early days, but I was hoping for two things.

  1. Dark Mode version of the character sheets.
    And:
  2. Some sort of roadmap. This doesn't need to be completely accurate, or explain what is being worked on next (as nice as that would be), but just a list of all features planned.

Thanks for your hard work, and looking forward to whatever comes of this.

Chat card background css overwrites whisper distinction

A line in the chat-card style sheet overwrites the backgrounds for all chat cards. While a minor change, and better for legibility, it's currently overwriting Foundry's default ability to visually distinguish between types of chat messages. In my game's use particular use case, it is impossible to tell when an incoming message is a single-target whisper. (A multi-target whisper includes a To: line indicating all recipients). There may be other scenarios this affects; for instance, different role types are also visually distinguished by the chat-card's background color.

Would you consider removing this change, or implementing other classes to maintain a visible difference between chat types?

Link To Relevant Code

Screenshots

Expected: Captured by using the development tools to nullify the background attribute in the #chat-log .message class. The lower card is a whisper, the top is not.
Cropped screenshot of two chat cards, where the lower chat card is significantly lighter in color

Current: Same cards, no modifications. The lower card is a whisper, the top is not.
Cropped screenshot of two chat cards, where the backgrounds are identical in color

Feat: Improve Item Configuration

More config is needed to store additional information, such as prerequisites, crafting components, secret information, and so on.

Currently, the following information is required as part of 0.9.0.

  • Prerequisites
  • Crafting Components
  • Secret Text Block for GM

Feat: Add a setting to disable the resource section on the actor sheet core page

Actor sheets include a row of generic resources that users can use to track arbitrary numeric values (see below):

image

This section sits right above the favourites section and takes up about 77px once you include the spacing above and below. This is about the same as the space taken up by two features. Some users may not have any need for this resource bar, and would prefer to prioritise favourite features instead, so we should offer a setting to hide this piece of the interface.

Tasks are as follows:

  • Add a setting to the actor sheet settings page. We're open to suggestions the name of the setting, but there should be a line of hint text which elaborates on the setting's purpose.
  • When a user toggles this setting, a flag called showResourceInterface should change to true or false as appropriate.
  • If an actor doesn't have this flag already, then NPCs should default to false and PCs should default to true. Make sure the checkbox is checked as appropriate for these default.
  • On the core page, there should be a conditional added around the resource interface which references this new flag. This conditional should respect the defaults stated above.

A PR for this issue should target development as this is a 0.9.x feature. It won't be back-ported to 0.8.x.

[Feat] Provide warnings in roll dialogs when incorrect configuration is provided

We should test whether a roll formula is valid in the roll dialog and prevent form submission if submitting will result in an error.

  • Add a helper function to test a roll formula
  • Prevent roll dialog form submission when the roll formula is invalid
  • Provide a warning within the dialog indicating that the roll formula is invalid

This could be improved further by highlighting the specific roll terms which are problematic.

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.