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

npm run rarity #2

Open
2 tasks done
Efthymios-Papakostopoulos opened this issue Apr 18, 2022 · 17 comments
Open
2 tasks done

npm run rarity #2

Efthymios-Papakostopoulos opened this issue Apr 18, 2022 · 17 comments
Labels
bug Something isn't working

Comments

@Efthymios-Papakostopoulos

Checklist

Description

I'm trying to run the command npm run rarity but it doesn't work. I don't get an error in return but my PC becomes so slow and there is no output in the terminal.

What could cause that issue?

Steps to reproduce

No response

Expected result

No response

Actual result

No response

Environment

No response

@Efthymios-Papakostopoulos Efthymios-Papakostopoulos added the bug Something isn't working label Apr 18, 2022
@bolshoytoster
Copy link
Owner

@Efthymios-Papakostopoulos
How big is your collection?

If you have a large collection it will take a while to calculate rarity.


You could try adding some console.logs to make sure it's doing something.

You could add console.log(config) here:

layerConfigurations.forEach((config) => {
let layers = config.layersOrder;

console.log(element) here:

data.forEach((element) => {
let attributes = element.attributes;

console.log(layer) here:

for (var layer in rarityData) {
for (var attribute in rarityData[layer]) {

@Efthymios-Papakostopoulos
Copy link
Author

It's about 7k images.

I did add the console.log

The first log gave me the Layers order output but nothing else - now we just wait 😂

image

@Efthymios-Papakostopoulos
Copy link
Author

Efthymios-Papakostopoulos commented Apr 18, 2022

Can we also save that output somewhere?

It looks like it doesn't work as indeed since it gave 0% outputs on all attributes

image

@bolshoytoster
Copy link
Owner

@Efthymios-Papakostopoulos could you try adding console.log(rarityDataTrait.trait, value, rarityDataTrait.trait == value) here:

rarityDataTraits.forEach((rarityDataTrait) => {
if (rarityDataTrait.trait == value) {

Then paste some of the output (~20 lines).

It should look like trait otherTrait false.


I think this can be caused if you change src/config.js after generating.

@Efthymios-Papakostopoulos
Copy link
Author

I did add the first part but I can't understand what I should add after

Then paste some of the output (~20 lines).

It should look like trait otherTrait false.

Apologies

@bolshoytoster
Copy link
Owner

@Efthymios-Papakostopoulos you just needed to add that console.log.

@Efthymios-Papakostopoulos
Copy link
Author

I run it again, but it gave me the same output @bolshoytoster

image

@bolshoytoster
Copy link
Owner

@Efthymios-Papakostopoulos it should be before that.

@Efthymios-Papakostopoulos
Copy link
Author

Efthymios-Papakostopoulos commented Apr 18, 2022

Ahm issue is that i can't scroll that far up because there are too many lines of such data. Can w save the whole output somewhere?

@bolshoytoster
Copy link
Owner

@Efthymios-Papakostopoulos I have no clue how you do it in powershell, you can probably stop the output by commenting out

console.log(rarityData[layer][trait]);

by addinng // to the start of the line.

@Efthymios-Papakostopoulos
Copy link
Author

IF this is what you mean, thats the output

image

@bolshoytoster
Copy link
Owner

@Efthymios-Papakostopoulos no, it's before that, the lines should end with true/false.

PS: it's a lot easier/quicker for both of us if you copy/paste thte text instead of screenshotting.

@Efthymios-Papakostopoulos
Copy link
Author

Probably its this then

Pink Pink true
Lvl 25 Soft Orange 14 Lvl 25 Soft Orange 14 true
Smirk Face Blue Eyes Smirk Face Blue Eyes true
None None true
None None true
None None true
Bunny Ears 8 Bunny Ears 8 true
None None true
None None true
None None true
21 21 true
Prontera Prontera true
Knight Knight true
{
  name: 'Rune Midgard Citizen #7000',
  description: ' Rune Midgard Beach Club is a team of girls in bikini that casually visiting the beaches of Solana in the search of men with shorts. Will you be their choice?.',
  dna: '5f12dea8e575fffce1bab3bcaefb960cd2cd995e',
  edition: 7000,
  date: 1650226644962,
  attributes: [
    { trait_type: 'Background', value: 'Green' },
    { trait_type: 'Lvl and Hair Color', value: 'Lvl 50 Orange 14' },
    { trait_type: 'Face', value: 'Happy Face Blue Heart Eyes' },
    { trait_type: 'Ear', value: 'None' },
    { trait_type: 'Headgear', value: 'Chick' },
    { trait_type: 'Mouth', value: 'Romantic Flower' },
    { trait_type: 'Age', value: '21' },
    { trait_type: 'Birth Place', value: 'Alberta' },
    { trait_type: 'Job', value: 'Dancer' }
  ]

@bolshoytoster
Copy link
Owner

@Efthymios-Papakostopoulos that's it, what if you change the

console.log(rarityDataTrait.trait, value, rarityDataTrait.trait == value)

to

console.log(attribute, rarityDataTrait.trait, value, rarityDataTrait.trait == value)

@Efthymios-Papakostopoulos
Copy link
Author

Here it is
@bolshoytoster

{ trait_type: 'Background', value: 'Pink' } Pink Pink true
{ trait_type: 'Lvl and Hair Color', value: 'Lvl 25 Soft Orange 14' } Lvl 25 Soft Orange 14 Lvl 25 Soft Orange 14 true
{ trait_type: 'Face', value: 'Smirk Face Blue Eyes' } Smirk Face Blue Eyes Smirk Face Blue Eyes true
{ trait_type: 'Ear', value: 'None' } None None true
{ trait_type: 'Ear', value: 'None' } None None true
{ trait_type: 'Ear', value: 'None' } None None true
{ trait_type: 'Headgear', value: 'Bunny Ears 8' } Bunny Ears 8 Bunny Ears 8 true
{ trait_type: 'Mouth', value: 'None' } None None true
{ trait_type: 'Mouth', value: 'None' } None None true
{ trait_type: 'Mouth', value: 'None' } None None true
{ trait_type: 'Age', value: '21' } 21 21 true
{ trait_type: 'Birth Place', value: 'Prontera' } Prontera Prontera true
{ trait_type: 'Job', value: 'Knight' } Knight Knight true
{
  name: 'Rune Midgard Citizen #7000',
  description: ' Rune Midgard Beach Club is a team of girls in bikini that casually visiting the beaches of Solana in the search of men with shorts. Will you be their choice?.',
  dna: '5f12dea8e575fffce1bab3bcaefb960cd2cd995e',
  edition: 7000,
  date: 1650226644962,
  attributes: [
    { trait_type: 'Background', value: 'Green' },
    { trait_type: 'Lvl and Hair Color', value: 'Lvl 50 Orange 14' },
    { trait_type: 'Face', value: 'Happy Face Blue Heart Eyes' },
    { trait_type: 'Ear', value: 'None' },
    { trait_type: 'Headgear', value: 'Chick' },
    { trait_type: 'Mouth', value: 'Romantic Flower' },
    { trait_type: 'Age', value: '21' },
{ trait_type: 'Job', value: 'Dancer' } Dancer Dancer true

@bolshoytoster
Copy link
Owner

@Efthymios-Papakostopoulos I think your metadata might be buggered, could you check the build/json/_metadata.json file for value: 'None' (you can ctrl + f for None).

If so, did you generate the metadata with this repo so I can try to figure out what causes it

@Efthymios-Papakostopoulos
Copy link
Author

"None" is basically a value we defined for empty (blank) images that we wanted to show as an extra field of trait.

And yes I did generate everything from this repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants