For those interested, I have written a little function to get the ADV_NAME of each interaction that a unit can do (both via creature/caste interactions, and those granted through syndromes). It will be going in my new unitViewer script, but I seem to remember someone asking for something like this in the past
function getTargetInteractions(tar)
ints = {}
t_ints = {}
for i,x in pairs(df.global.world.raws.creatures.all[tonumber(tar.race)].caste[tonumber(tar.caste)].body_info.interactions) do
s = -1
check = false
name = false
for j,y in pairs(df.global.world.raws.creatures.all[tonumber(tar.race)].raws) do
if split(y.value,':')[1] == '[CAN_DO_INTERACTION' then
s = s + 1
if s == i then
check = true
elseif s > i then
break
end
end
if check then
if split(y.value,':')[2] == 'ADV_NAME' then
ints[i+1] = split(split(y.value,':')[3],']')[1]
name = true
end
end
end
if not name then
ints[i+1] = 'Unknown'
end
end
if #ints == 0 then
ints[1] = {'NONE'}
end
for i,x in pairs(tar.syndromes.active) do
for j,y in pairs(df.global.world.raws.syndromes.all[tonumber(x.type)].ce) do
if y._type == df['creature_interaction_effect_can_do_interactionst'] then
t_ints[i+1] == y.name
end
end
end
return ints, t_ints
end