Even
{{{ [<roll>] +[match[1]then[red]] +[match[2]then[red]] +[match[3]then[blue]]
}}}
Regards
Tony
On Sunday, April 19, 2020 at 9:36:15 AM UTC+10, TonyM wrote:
>
> So Here is a quick partial experiment
>
> \define roll() 3
> {{{ [<roll>match[1]then[red]] [<roll>match[2]then[red]] [<roll>match[3]
> then[blue]] }}}
>
> But there is a new compare operator in the latest release that could do
> this even more elegantly.
>
> Regards
> Tony
>
> On Sunday, April 19, 2020 at 3:42:19 AM UTC+10, Jalen MichalsLevy wrote:
>>
>> Thanks for the reply.
>>
>> I would love more details if you got them! I have MK Lauber's shuffle
>> plugin which adds a "Shuffle" filter operator which gives a number of
>> random items in a list and is close to what you describe. Unfortunately I
>> do not know how to make some of those titles weighted, such that they are
>> more likely to be selected, without just repeating their title in the list.
>> The original plugin can take something like this,
>>
>> 1-2. Red
>>
>> 3-5. Blue
>>
>> 6. Green
>>
>> 7-10. White
>>
>>
>> and interpret it properly so that it returns the value based on its
>> weight. I'd rather not do something like: Red Red Blue Blue Blue Green
>> White White White. This is the feature I am most interested in, though I
>> will admit, the input versatility is also very useful to me.
>>
>> Thanks!
>>
>> On Friday, April 17, 2020 at 11:14:37 PM UTC-4, TonyM wrote:
>>>
>>> Jalen
>>>
>>> I'm sure its possible if not already available. Althought it may take a
>>> bit of effort to make the input as versatile. Moving the list of possible
>>> titles into a list field or seperat tiddlers with a shared tag or field
>>> then returning a random title should be easy and have other advantages.
>>> Evans formulae plugin should have the random primatives as do some others.
>>>
>>> Try searching for random selection etc but you could extract
>>> milliseconds from the now macro then divide it by the items in the list
>>> found using count.
>>>
>>> These are quick tips from my mobile so do ask if you want more details.
>>>
>>> Regards
>>> Tony
>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/21496157-550f-4b01-957d-150e93b61f3d%40googlegroups.com.