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

Add two conditional rules of constructing layers to DNA #1053

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

FinanceApeClub
Copy link

Two conditional rules of constructing layers to DNA are implemented to adapt the situations as follows:

  1. A layer folder has its sub-folders, each sub-folder contains image files which only apply to a certain trait (image file) of another specified layer, e.g. "Hair" layer has 'White', 'Yellow,' 'Golden' sub-folders, the files for hair-styles inside the 'White' sub-folder can only apply to White fur trait (White.png) of "Fur" layer.
  2. Some of image files for traits in a layer only apply/reveal when the trait of a specified layer is None (None.png blank image file), and the rest apply when the trait of the specified layer is not None.

The src/main.js code was modified together with more 'options' added to layerConfigurations.layersOrder in src/config.js.

This modification does not affect any of the original functions of the main release, hopefully will be merged to the main release.

Finance Ape Club added 2 commits April 7, 2022 14:08
for adding two conditional rules of constructing layers to DNA
for adding two conditional rules of constructing layers to DNA
@AwwDit
Copy link

AwwDit commented Apr 11, 2022

Running the rarity command doesn't work when creating a collection that uses the subfolder layout.

@FinanceApeClub
Copy link
Author

Running the rarity command doesn't work when creating a collection that uses the subfolder layout.

Pease check if your config.js file configured the layer with subfolder layout in the following way,
...
{ name: "Fur" }, // This so-called 'linkLayer' has image files corresponding to the subfolders under layer "Hair"
{ name: "Hair", // Layer "Hair" has subfolders
options: {
subGroup: true, // true indicates existence of sub folders
linkLayer: 7, // the number 7 in this line indicates that the linked layer "Fur" is in 7th layer
},
},
...

Meanwhile, the following conventions must be complied:

  1. all the subfolders must have their corresponding image files in the their linkLayer, and vice versa;
  2. each subfolder name must be exactly the same as its image file name without its extension.

e.g. if "Fur" layer has three image files: 'White.png', 'Yellow.png' and 'Golden.png', "Hair" layer must have and can only have three subfolders of 'White', 'Yellow' and 'Golden'. More explanations can be found in my comment in the PULL REQUEST.

Your any further comments will be very welcomed.

@simira911
Copy link

Running the rarity command doesn't work when creating a collection that uses the subfolder layout.

Pease check if your config.js file configured the layer with subfolder layout in the following way, ... { name: "Fur" }, // This so-called 'linkLayer' has image files corresponding to the subfolders under layer "Hair" { name: "Hair", // Layer "Hair" has subfolders options: { subGroup: true, // true indicates existence of sub folders linkLayer: 7, // the number 7 in this line indicates that the linked layer "Fur" is in 7th layer }, }, ...

Meanwhile, the following conventions must be complied:

  1. all the subfolders must have their corresponding image files in the their linkLayer, and vice versa;
  2. each subfolder name must be exactly the same as its image file name without its extension.

e.g. if "Fur" layer has three image files: 'White.png', 'Yellow.png' and 'Golden.png', "Hair" layer must have and can only have three subfolders of 'White', 'Yellow' and 'Golden'. More explanations can be found in my comment in the PULL REQUEST.

Your any further comments will be very welcomed.

hi, can you make a quick how-to video , so this may help poor souls like me :) and thank you so much for your great contribution.

@arnoldy200
Copy link

What does “7th layer" mean? Which is the 1st layer?

Finance Ape Club added 3 commits May 26, 2022 11:19
* create add_rarities

* add None.png for set_rarities use

* add set_rarities to scripts object

* add content to Usage and Utils

* add rarities to options object

* modify for set_rarities
@FinanceApeClub
Copy link
Author

What does “7th layer" mean? Which is the 1st layer?

The layer index starts from 0. See README.md in Pull reqest #1024 for more detailed explanation.

@FinanceApeClub
Copy link
Author

Running the rarity command doesn't work when creating a collection that uses the subfolder layout.

Pease check if your config.js file configured the layer with subfolder layout in the following way, ... { name: "Fur" }, // This so-called 'linkLayer' has image files corresponding to the subfolders under layer "Hair" { name: "Hair", // Layer "Hair" has subfolders options: { subGroup: true, // true indicates existence of sub folders linkLayer: 7, // the number 7 in this line indicates that the linked layer "Fur" is in 7th layer }, }, ...
Meanwhile, the following conventions must be complied:

  1. all the subfolders must have their corresponding image files in the their linkLayer, and vice versa;
  2. each subfolder name must be exactly the same as its image file name without its extension.

e.g. if "Fur" layer has three image files: 'White.png', 'Yellow.png' and 'Golden.png', "Hair" layer must have and can only have three subfolders of 'White', 'Yellow' and 'Golden'. More explanations can be found in my comment in the PULL REQUEST.
Your any further comments will be very welcomed.

hi, can you make a quick how-to video , so this may help poor souls like me :) and thank you so much for your great contribution.

A new Pull request #1024 was created, where a full explanation of how-to-use the above two conditional rules of constructing layers to DNA is added to README.md. Hope it will help to understand the usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants