# Alerts system ported from TNO by TheGeneral # # How to use: # 1. Set up a token ID in common/ideas/zzz_Alerts.txt henceforth refered to as # - Add an on_add to assign a sound effect to your alert as it gets added # 2. Set up the GFX in interface/md_alerts.gfx as GFX_ # - Place the GFX file under gfx/interface/md_alerts/ # - Template is available in that folder, named blank.dds # 3. Set up any effects that clicking your alert does in common/scripted_effects/md_alerts_scripted_effect.txt # - Do this under the md_alert_click effect # 4. Localize the alert in localisation//md_alerts_l_.yml # - The loc key as and description as _Desc (it is important that the D is capitalized) # - If you would like to do custom scripted localisation here, use common/scripted_localisations/md_alerts_scripted_localisation.txt # 5. In order to show an alert, do the following: # # set_temp_variable = { alert_id = token: } # set_temp_variable = { alert_color = (1/2) } # 1 is for a yellow glow while 2 is for a red glow # set_temp_variable = { alert_data = <...> } # (Optional) This can be used to store any sort of data that corresponds to the alert # add_md_alert = yes # alternatively, add_md_alert_unless_exists # # 6. In order to remove an alert, do the following: # # set_temp_variable = { alert_id = token: } # remove_md_alert = yes # Scripted triggers for custom alert system # Checks if `alert_id` is currently an active alert has_md_alert = { is_in_array = { md_alerts = alert_id } }