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

Find Artifact metadata to add Mythic Artifacts to the gallery #17

Open
Velorum6 opened this issue Mar 17, 2022 · 2 comments
Open

Find Artifact metadata to add Mythic Artifacts to the gallery #17

Velorum6 opened this issue Mar 17, 2022 · 2 comments
Labels
Paused Paused for now

Comments

@Velorum6
Copy link
Collaborator

there are some empty boxes in the gallery design, there was planned to have there some Mythic artifacts but we don't know how to get the metadata / media files of it

@Bulmenisaurus
Copy link
Contributor

Bulmenisaurus commented Mar 17, 2022

Here is how to get the image files (you can paste this into an empty tab or whatever)

const base = `https://d2wspbczt15cqu.cloudfront.net/v0.6.0-artifacts`;
const artifactImage = (
    artifactName, // one of  "Unknown", "Monolith", "Colossus", "Spaceship", "Pyramid", "Wormhole", "Planetary Shield", "Black Domain", "Photoid Cannon", "Bloom Filter",
    artifactRarity, // one of "Unknown", "Common", "Rare", "Epic", "Legendary", "Mythic"
    biome, // one of "Unknown", "Ocean", "Forest", "Grassland", "Tundra", "Swamp", "Desert", "Ice", "Wasteland", "Lava", "Corrupted";
    big = true,
    ancient = false
) => {
    const biomeLabels = [
        'Unknown',
        'Ocean',
        'Forest',
        'Grassland',
        'Tundra',
        'Swamp',
        'Desert',
        'Ice',
        'Wasteland',
        'Lava',
        'Corrupted',
    ];

    const size = big ? 64 : 16;
    const biomeText = ancient ? `ancient` : `${biomeLabels.indexOf(biome)}${biome}`;

    return `${base}/${size}-${artifactName}-${artifactRarity}-${biomeText}.webm`;
};

so for example if I wanted to get a rare forest monolith, I would do:

console.log(artifactImage('Monolith', 'Rare', 'Forest'))

source: @darkforest_eth/gamelogic

@Velorum6
Copy link
Collaborator Author

This is so helpful, we can add artifacts to the gallery with this

@Velorum6 Velorum6 added the Paused Paused for now label Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Paused Paused for now
Projects
None yet
Development

No branches or pull requests

2 participants