danMiller

joined 1 month ago
[–] [email protected] 1 points 4 days ago (1 children)

If I understand this correctly, I think I lose having a consumable list as the final output. But it got me on the right track I think. THANKYOU!

I’m working with this now, which seems to produce a functional consumable list derived from a slice of the original list.

thanks again, I hadn’t stumbled across the createPerchanceTree command in the tutorials.

OriginalList
  d
  c
  x
  y
  z

//calls consumableList here just to prevent duplication
a = \{  [OriginalList.consumableList.selectMany(2).joinItems("|")]  \}

output
  //converts the selectmany product to a consumableList
  [newList = createPerchanceTree("slicedList =" + a ).slicedList.consumableList] [newList] [newList]  




 

Is there a simple way to to make a consumableList of a subset of the larger list?

I’d like something like the following

originalList
  A
  B
  C
  D

[a = originalList.selectmany(2).consumableList]

in my dream, [a] should be a consumable list of two random elements from originalList.

Thanks!

[–] [email protected] 1 points 1 month ago

This worked for me. thank you so much

[–] [email protected] 0 points 1 month ago* (last edited 1 month ago)

Look at an example on (https://perchance.org/t2i-framework-plugin-v2). when you review the code, look for the numImages variable under settings > userInputs this shows how you can prompt the user to select differing quantities of images

 

----If I have a list of text options in my script that includes:

myList here, there be apples second, a plum third, a pear.

---and I have a place in the t2i-framework that specifies user input options

settings userInputs foo label = foo type = select remember = true options = {import:myList} //i know this isn’t correct, but gives a sense of what I’m trying to do

Is there a way to have settings.userInputs.foo.options. reference the complete set of options in myList? One item of note is that the myList options are full sentences, and thus contain punctuation such as commas. So joinItems statements would not work with a comma delimiter.

thank you!

[–] [email protected] 1 points 1 month ago

That works perfectly. Thanks so much for the explanation.

 

if I have a list:

Fruit apple text = a red fruit pear text = a green fruit

What’s an effective way to join the ‘text’ properties to create something like “a red fruit, a green fruit”.

Does this require a custom function or can the perchance list methods handle this?

thanks