Both
root templates and
local templates/instances have a GUID.
A GM can place many instances of a root template, the GUID of the root template of all of those instances will be the same. The Osiris script above checks whether someone used an item whose root template is BAN_Banners_Citz_SidewalkSign_Chalk_B_8f088290-03ef-43b9-84cd-ed90df213f22, so it will work for all local instances/objects of that type. It will not work for signs based on other root templates though.
You're right it then requests the display name of a specific item, but that can be easily solved because the third parameter CharacterUsedItemTemplate() is the individual item (= root template instance) that was used.
There is nevertheless no out-of-the-box generic solution for this. To make it work for all signs that come with DOS2, you can put their root template GUIDs all in an
Osiris database in the
INIT section of a goal and then generalise the code as follows:
INIT
DB_MYPRE_SignRootTemplates("BAN_Banners_Citz_SidewalkSign_Chalk_B_8f088290-03ef-43b9-84cd-ed90df213f22");
DB_MYPRE_SignRootTemplates("..");
..
KB
IF
CharacterUsedItemTemplate(_Player,_ItemTemplate,_Item)
AND
DB_MYPRE_SignRootTemplates(_ItemTemplate)
AND
ItemTemplateGetDisplayString(_Item, _signHandle, _signDisplayText)
THEN
DisplayText(_Item,_signDisplayText);