Replies: 5 comments
-
@nftchef might be worth checking out, but of course up to you if you wish to include it :) |
Beta Was this translation helpful? Give feedback.
-
@yreuvekamp your code is generating images with layers missing |
Beta Was this translation helpful? Give feedback.
-
@cryptofannatic I think this happens when there are no compatible combinations for a layer. If that's not it, I'm gonna need more info to see what's going on. |
Beta Was this translation helpful? Give feedback.
-
@yreuvekamp can you check this? #232 |
Beta Was this translation helpful? Give feedback.
-
Thank you for the detailed suggestion. Without testing I'm not sure what issues there are. This is a valid approach, but as it's more of an edge case I won't include it at this time. 🙇♂️ I generally try to write functions in the config.js to build the incompatible list for all cases before main.js is run. But that may be tricky in the example situation. I'm open to exploring it more if it's needed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've noticed that incompatibles and forced combinations can be... incompatible.
Let's say we have the following:
Now, when the
Moon background
is picked, we know that in the future, theSpace helmet
will be forced. However, the result is that aShark suit
should not be picked afterMoon background
, becauseShark suit
is in turn incompatible withSpace helmet
. The current code does not take this situation into account. Instead, it will pick theShark suit
(which as far as it's concerned is a valid combination) and it will later force theSpace helmet
, which results in an incompatible combination.I've added some code to check for future incompatibilities. I'm not sure how to do a pull request, so I'm actually hoping to help people with this issue through here 😄 The below might not be the most efficient way of doing this (my JS is a bit rusty), but it seems to do its job 👍
Basically, it checks if the current layer has forced combinations, looks up those forced combinations in the incompatible combinations and finds the layers with which the forced combination would be incompatible. It then simply adds those to the
incompatibleDNA
array.Add this function in
main.js
:Add this:
... in the
pickRandomElement
function after the part where incompatibilities are checked (which ends somewhere around line 565):Beta Was this translation helpful? Give feedback.
All reactions