Been looking into why the workshop syndromes are not always that reliable even though autosyndrome is being used. Found a few issues.
A) dfhack issue. Autosyndrome does not fire for jobs that are on repeat!
-- User work around: dont repeat any jobs producing syndrome stones, otherwise relying on the vanilla infectious gas chance to apply.
B) Many of the raw entries are incorrectly using [SYN_CLASS:/ where they should be using [SYN_CLASS:\ this means that most of the sutosyndrome special flags (like WORKER_ONLY) are being ignored. (note seems to need a world regen for this to take affect).
B2) In V3a the guild transform stones specify WORKER_ONLY, but the need to have COMMAND first or the flag is ignored
Edit: Ignore this, i'm being an idiot. Edit2: truely, because this is an issue.
From looking a the code, here are the rules on autosyndrome flag usage. Any flags not used in this way/order will be ignored.
Required if any of the other tokens are used (autosyndrome will still run without it using defaults)
[SYN_CLASS:\COMMAND]
Zero or more of:
[SYN_CLASS:\WORKER_ONLY] or [SYN_CLASS:\ALLOW_MULTIPLE_TARGETS]
[SYN_CLASS:\PRESERVE_ROCK]
[SYN_CLASS:\IMMUNE_IF_ALREADY_AFFECTED] or [SYN_CLASS:\RESET_DURATION_IF_ALREADY_AFFECTED] or [SYN_CLASS:\RESET_DURATION_IF_ALREADY_AFFECTED:<toTicksNumber>]
Zero or one of:
[SYN_CLASS:anCommandToPerform]
Only if [SYN_CLASS:anCommandToPerform] specified thenone or more of these (ignored otherwise).
Required tags and order depends on the specific command, see its documenation:
E.g. [SYN_CLASS:\COMMAND] [SYN_CLASS:\PRESERVE_ROCK] [SYN_CLASS:action] [SYN_CLASS:\WORKER_ID]
[SYN_CLASS:\LOCATION]
[SYN_CLASS:\WORKER_ID]
[SYN_CLASS:\REACTION_INDEX]
----
Note: must use [\ not [/
Note: Don't specify [SYN_INHALED] [SYN_CONTACT] etc. if you are using autosyndrome to apply a syndrome it is not required, and speculating that this is why sometimes units are affected twice (once by autosyndrome applying the effect, and sometimes a second application from the vanilla syndrome gas.)
C) [SYN_INHALED] [SYN_CONTACT] are not needed on syndromes that are applied with autosyndrome. Im speculating that autosyndrome+vanilla infection is why appects are sometimes produced twice on a dwarf.
I've tested A & B by adding various debug logging to the autosyndrome plugin, C i've not yet tested.
Log output from two seperate jobs one useing \ one using /
==========================
plugins\autoSyndrome.cpp line 252: processing job: JOIN_GUILD_MASON.
plugins\autoSyndrome.cpp line 332: got building.
plugins\autoSyndrome.cpp line 338: Testing reaction: Join the masons guild.
plugins\autoSyndrome.cpp line 368: checking syndrome.
Testing: '\COMMAND'
autoSyndrome.cpp line 448: Start of \COMMAND . (Successfully found flag)
Testing: '\WORKER_ONLY'
Processing command options
Still blank command
Worker only (Successfully found flag)
Testing: '\IMMUNE_IF_ALREADY_AFFECTED'
Processing command options
Still blank command
Immune if affected already (Successfully found flag)
Consider applying, checking immunities, affected castes etc
autoSyndrome.cpp line 531: Applying syndrome to unit 4515.
plugins\autoSyndrome.cpp line 338: Testing reaction: Join the masons guild.
plugins\autoSyndrome.cpp line 368: checking syndrome.
==========================
plugins\autoSyndrome.cpp line 252: processing job: JOIN_GUILD_MERCHANT.
plugins\autoSyndrome.cpp line 332: got building.
plugins\autoSyndrome.cpp line 338: Testing reaction: Join the merchants guild.
plugins\autoSyndrome.cpp line 368: checking syndrome.
Testing: '/COMMAND'
Skipping, prior to \COMMAND
Testing: '/WORKER_ONLY'
Skipping, prior to \COMMAND
Testing: '/IMMUNE_IF_ALREADY_AFFECTED'
Skipping, prior to \COMMAND (This time no flags found)
Consider applying, checking immunities, affected castes etc
autoSyndrome.cpp line 338: Testing reaction: Join the merchants guild.
autoSyndrome.cpp line 368: checking syndrome.
Consider applying, checking immunities, affected castes etc
autoSyndrome.cpp line 531: Applying syndrome to unit 4516.