-
Notifications
You must be signed in to change notification settings - Fork 3
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
Error when generating metadata #2
Comments
Sorry I've made a lot of changes recently and haven't updated the example config to match it. You shouldn't need to use the "background": {
"blue.png": 0.04,
"brown.png": 0.04,
"flesh.png": 0.05,
"green.png": 0.02
}, (This requires the latest version of resin, so please make you install the latest from git ( The idea behind the "background": {
"blue.png": 0.04,
"brown.png": 0.04,
"flesh.png": 0.05,
"green.png": 0.02
},
"face": {
"cyan-face.png": 0.07,
"dark-green-face.png": 0.04
},
"eyes": {
"egg-eyes.png": 0.3,
"heart-eyes.png": 0.12,
"square-eyes.png": 0.02
},
"mouth": {
"block-mouth.png": 0.23,
"smile-mouth.png": 0.09
} I'm going to work on adding better examples and documentation soon, but please follow up if this was unclear or you have more questions! |
It was clear, but still failing! I figured out what was wrong though, the
This is quite useful! |
Oh that's a good catch, thank you! |
Found this repo after a search for generating artwork using Rust and it seems what I am looking for. But I can't get it to work after trying a quick test.
Could not create weighted index, are any odds less than 0?
I tried looking in the code to see what made it not work, but I don't understand what your goal is with the different sets of attributes using
"_"
and"_key"
as keys. It seems that when I run the code using the providedconfig.example.json
, that the so-called 'raw_keys' ("_"
) don't make it to the part where a WeightedIndex is made, for example:Then it crashes because it complains there are no values:
(I added some dbg! statements, the crash happens when WeightedIndex::new() is called)
Could you explain what the idea is behind your code? Why the use of
_
and_key
and_key:alchemist
?EDIT: I see that the underscores basically preclude the names from the eventual metadata that is generated for the NFT, but it doesn't make much sense in the code for me.
The text was updated successfully, but these errors were encountered: