Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapon Qualities are doubled and incorrect. #408

Open
1 task done
lonpalmer opened this issue Apr 22, 2023 · 3 comments
Open
1 task done

Weapon Qualities are doubled and incorrect. #408

lonpalmer opened this issue Apr 22, 2023 · 3 comments
Assignees
Labels
bug Something isn't working data-migration-needed Changes that require a data migration
Milestone

Comments

@lonpalmer
Copy link

What happened?

The weapons qualities icons in the inventory pane are doubled for the first two qualities and don't show any qualities after that.

See Screen Shot.
Screenshot 2023-04-22 at 8 45 04 AM
Screenshot 2023-04-22 at 8 41 12 AM

What is the expected behaviour?

The weapon quality icons should correctly match the weapon qualities.

Relevant Errors and Warnings

No response

Additional Support Details

Foundry V 10.291
OSE v 1.8.2
OSE SRD 0.5.3
OSE Helper 0.4.6

Foundry VTT Core Version

V10

Old-School Essentials Core Version

1.8.2

Please update your browser regularly. Which (updated) browsers are you seeing the problem on?

Chrome

Code of Conduct

  • I agree to follow this project's Code of Conduct
@lonpalmer lonpalmer added bug Something isn't working triage This bug still needs to be validated and weighted labels Apr 22, 2023
@wyrmisis
Copy link
Collaborator

The melee, missile, and slow qualities are assigned through the toggle buttons and checkbox on the item sheet. They're doubled up because items have extra qualities assigned to them from before we changed item.system.autoTags to generate tags for those checkboxes without having the tags in the tag list.

So... functionality's correct, data isn't. 😅

@lonpalmer
Copy link
Author

So should this defect be on a different project?

@anthonyronda anthonyronda added data-migration-needed Changes that require a data migration and removed triage This bug still needs to be validated and weighted labels Apr 24, 2023
@anthonyronda
Copy link
Member

We will indeed treat this as a bug.

After making this change in tag behavior, we neglected to add migrations that removed the unnecessary tags from all worlds and compendiums. We will do that here, in response to this ticket.

If you'd like to fix this now rather than wait for the migration patch, here's a useful script macro. It will have to be modified to work with your items in the world, and your items in all actors in your world

async function main(){

    const pack = await game.packs.get("");//Place your pack's name between the quotes
    for(let i of pack){
            let item = await pack.getDocument(i._id);
            if(item.type === 'weapon' && item.system.tags.length){
                let arr= [];
                for(let tag of item.system.tags){
                    if(tag.value !== 'Melee' && tag.value !== 'Missile' && tag.value !== 'Slow'){
                        arr.push(tag);
                        console.log(item.name + ": " + tag.value);
                    }
                }
                await item.update({
                    "system.tags": arr
                });
            }
        }
        
    }
main()

@anthonyronda anthonyronda added this to the 1.8.4 milestone Apr 24, 2023
@anthonyronda anthonyronda modified the milestones: 1.8.4, 1.8.5 May 3, 2023
@anthonyronda anthonyronda modified the milestones: 1.8.5, 1.9.4 Jun 12, 2023
@anthonyronda anthonyronda modified the milestones: 1.9.4, 1.10.0 Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data-migration-needed Changes that require a data migration
Projects
None yet
Development

No branches or pull requests

3 participants