[Inform 6] Triggering a "Take All"

I’m in the process of making a new I6 extension in French, and I’d like to add synonyms for “take all”, “take all from noun”, “drop all” and “insert all in noun”. However, just by looking at the grammar or even at how the parser handles ‘all’, I’m really confused on how to do this. Out of desperation I tried <>, and my interpreter crashed, which is fair enough. I could try to do a custom-made routine that uses ChooseObject and a loop on all objects in the room, essentially replicating the parser’s behavior, but that sounds like I’m going to mess it up, and it’d be cleaner to just leave the parser do its thing. Is there just a way to “call” such actions in my code ?


No, the <> statement only handles single-object actions. Writing a loop is the simplest way to make it happen.

Do you really want to limit “all” to those four commands? The normal translation plan is to define ALL1__WD, ALL2__WD, ALL3__WD to the words that need to be treated this way. If you need a multi-word token to act as “all”, life gets harder.

Ok, thanks zarf !

I’m not really sure what you mean by limiting all to those four commands? Do you mean that there are more verbs for which you can use “all”, and whether I’m planning on recognizing those? If so, I don’t really know, I guess I’ll have to think about it. I don’t know how often people use “buy all” or “unlock all” (although “disrobe all” is a good one), but it shouldn’t be too hard to include those.
Anyway, it’s not really a translation, it’s adding a variant to those ones. (The “verb + noun” form is “prendre tout”, but you can also say “tout prendre”. And the “tout” has to be “tout”, not another variant, so I don’t really need to check with ALL2__WD and ALL3__WD: I can just define the verb “tout” and put “prendre” or “déposer” as tokens. If that makes sense?)

For completion’s sake: someone on the French forum suggested instead that I rewrite the command on-the-fly and ask the parser to do it all again. That works perfectly ! (and I got to learn about tokens and GPR_REPARSE)