Before the source code for the new patch was released someone posted complaining about how the NotificationTypes enums were having supposedly nonsense numbers in Lua. It turns out that this was intentional for some reason
This is one of the dumbest things I've seen in a while, why was the normal way of having them sequential not good? Anyways it seems that this is spread out through multiple parts of CvEnums
It seems that for ALL future enums we modders will add that they want to have hash values (instead of nice sequential enums). This is good to know (they are expecting us to add enums, so we don't need to worry too much about randomly breaking the engine doing so), but IMO a horrible design choice.
Code:
// !!!!!!!!!!!!!!!!!!!!!!!
// IMPORTANT - NotificationTypes enum contains hash values, not an index!
// It is not required to add a new enum for a new notification, you can just use the hash (FString::Hash) of the name
// as defined in the Notifications.xml or equivalent. The enum is just a helper so that the has generation is done
// at compile time. e.g. the enum NOTIFICATION_TECH is equivalent to FString::Hash("NOTIFICATION_TECH")
//
// MODDERS:
// If you add a new notification, you do NOT have to add it to this helper list, you can just make a define
// with the desired hash ID on the DLL side and just cast the value to a NotificationTypes value when passing it
// to the notification system.
// When adding Notifications, please remember to add an entry in the sound notifications file using the same name.
// !!!!!!!!!!!!!!!!!!!!!!!
enum NotificationTypes
This is one of the dumbest things I've seen in a while, why was the normal way of having them sequential not good? Anyways it seems that this is spread out through multiple parts of CvEnums
Code:
BUTTONPOPUP_CHOOSE_FAITH_GREAT_PERSON, // Do not add any more sequential enums! Use hash values!
// Do not add any more sequential enums! Use hash values!
Code:
PLAYEROPTION_MODDER_3,
NUM_PLAYEROPTION_TYPES, // Do not add anymore sequential enums!
Code:
// Do not add any more sequential enums, add explicit key values (hash of text key)
AUTOMATE_TRADE = 0x4bdc68d8, // FString::Hash("AUTOMATE_TRADE");
It seems that for ALL future enums we modders will add that they want to have hash values (instead of nice sequential enums). This is good to know (they are expecting us to add enums, so we don't need to worry too much about randomly breaking the engine doing so), but IMO a horrible design choice.