klaas1979 / tablesmith-like

Use Tablesmith-like tables in FoundryVTT and create complex nested tables.
MIT License
3 stars 5 forks source link

Non repeatable group #11

Closed IrmatDen closed 2 years ago

IrmatDen commented 2 years ago

Is your feature request related to a problem? Please describe. I'm working on implementing an NPC generator based on UNE (from Conjecture games). In there, there's a table from which we can't pull twice from the same column ("NPC Motivation", contains 5 columns of 20 elements). Three pulls are recommended.

I was planning on having a group for each column ("Motivation1to20", "Motivation21to40", etc...), and a non repeating group "Motivation" to pull from at the root of my script. Unfortunately, it seems that I can't get the '!' group tag to work in this module. Is it implemented? Or is it planned?

In the Functions list of your module (here: https://github.com/klaas1979/tablesmith-like/blob/v1.12.1/FUNCTIONS.md#loop), I can see this function under "Not implemented" "Used (Used already)" Is this the technical term for the '!' group tag?

Describe the solution you'd like To keep consistent with the description, here's what would be required:

:Start
1,{Loop~3,[MotivationNouns]}{Reset~MotivationNouns}

;!MotivationNouns
1,[MotivationNouns1to20]
1,[MotivationNouns21to40]
1,[MotivationNouns41to60]
1,[MotivationNouns61to80]
1,[MotivationNouns81to100]

;MotivationNouns1to20
1,wealth
2,hardship

;MotivationNouns21to40
1,the wealthy
2,the populous

;MotivationNouns41to60
1,dreams
2,discretion

;MotivationNouns61to80
1,gluttony
2,lust

;MotivationNouns81to100
1,advice
2,propaganda

Describe alternatives you've considered Not sure if there are alternatives to this. Maybe a ton of scripting to handle lockouts, and that assumes that a variable can be a sequence compatible with a Lockout call; quite a longshot.

Additional context Sources I've found when searching if this feature exists:

klaas1979 commented 2 years ago

Back from holiday will lock into it in the next days/weeks

IrmatDen commented 2 years ago

Thank you :)

klaas1979 commented 2 years ago

There was an error in handling non repeating groups from group calls. It should be fixed now and work as expected.

IrmatDen commented 2 years ago

It works as expected, but only as long as the non-repeataing group is in the same journal entry. I'll create a separate ticket.