I definitely agree with a community DLL approach that provides XML/Lua with more powerful functionality, rather than doing new things 'out of the box'.
Jumping back a few pages...
Possible Tools (I just need to make sure they can't be done in lua, and can be done in the dll):
Create ability to open any popup from a notification
Create the ability to add new end turn blocking notifications
(Just keeping track so I don't forget)
With regards to this, given that whoward already created a
Lua-based solution, do we want to do something like this in the DLL? I'm definitely very tempted to use whoward's implementation for my own mod, but there's still significant overhead to adding new notifications with this Lua-based system. It's a question of if we'd want to basically rewrite the way Civ handles notifications, particularly the way it saves them, which would break compatibility between versions if it isn't 'fixed and done' all at once. (Which nothing ever is, unfortunately.)
When imagining the rewrite for my mod (before I knew about whoward's implementation), I was picturing a DB table something like this: (If replacing the notifications system, we could modify the default Notifications table instead of adding a new one, but again that's optional. It could be that portions of the old code are preserved to deal with the existing notifications (less work and probably more stable, despite the ugliness of how existing notifications are handled) and a new table is created/added to for new notifications.)
Code:
<Table name="NotificationsCustom">
<Column name="ID" type="integer" primarykey="true" autoincrement="true"/>
<Column name="Type" type="text" unique="true" notnull="true"/>
<Column name="Welcomeness" type="integer" default="0"/>
<Column name="Message" type="text" reference="Language_en_US(Tag)"/>
<Column name="Summary" type="text" reference="Language_en_US(Tag)"/>
<Column name="IconIndex" type="integer" default="-1"/>
<Column name="IconAtlas" type="text" default="null" reference="IconTextureAtlases(Atlas)"/>
<Column name="BlocksEndTurn" type="boolean" default="false"/>
<Column name="BlockMessage" type="text" default="null"/>
<Column name="MiniCivIcon" type="boolean" default="false"/>
<Column name="ChecksKnown" type="boolean" default="false"/>
<Column name="DisplaysUnitIcon" type="boolean" default="false"/>
<Column name="DoubleCivNotification" type="boolean" default="false"/>
<Column name="UIContext" type="text" default="null"/>
</Table>
With the columns doing sort of what you'd expect them to. I was planning to have a few base instances specified in XML for certain notification types. (Eg. one instance for notifications that have a single normal circular image, and optionally a small civ icon in the corner, a second for 'dual-civ' icons, like the declare war notification.) Instead of needing a separate XML declaration for each notification type, but I had yet to work out if this was 100% possible. But any changes would presumably require updating NotificationPanel.lua, which makes the community DLL require that file, which isn't a good thing.
Having talked this through, it seems like sort of a bad idea to change notifications, but let me know what you guys all think.