Premium jking 320 Posted November 21, 2024 Premium Share Posted November 21, 2024 Hello, Today, I would like to share my in-game notification system with you. This system can be used for various purposes. For example, in the implementation below, I receive notifications about: A new Biologist mission. An equipped EXP ring that has expired. The package includes functionality for tracking the expiration of special items (e.g., EXP rings, drop gloves, etc.). The system is easily extendable. To add new notifications, simply: Add the new item to the ENotification enum (on both the server and client sides). Update the corresponding map on the Python side. Use the SendNotification() method in the appropriate location in your code. Notifications are queued, so if you get several at once, they will display one by one. Preview: Download Center This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up Cheers. 76 1 7 1 25 Link to comment Share on other sites More sharing options...
Management ɛʟ Ǥʟɑçѳи 🧊 7991 Posted November 21, 2024 Management Share Posted November 21, 2024 For hidden ads, just put the link WITHOUT code tag ^^ Link, like this : https://metin2.dev/topic/33237-in-game-notifications/ All external link are auto-hidden 1 I don't respond to any private messages, except for messages regarding ad system issues... For everything else, please join the Discord server and open a ticket... Link to comment Share on other sites More sharing options...
SNIPER3BOD 26 Posted November 22, 2024 Share Posted November 22, 2024 Good Job jking !! This is really great work 1 Link to comment Share on other sites More sharing options...
Typical 0 Posted November 23, 2024 Share Posted November 23, 2024 @ jking Where should I add notifications that should appear at a given lvl? I added in void CHARACTER::SetLevel if (level == 100) { SendNotification(ENotification::NOTIFICATION_CATEGORY_UNLOCK_NEW_MAP1, 0); SendNotification(ENotification::NOTIFICATION_CATEGORY_UNLOCK_NEW_DUNG1, 0); } if (level == 200) { SendNotification(ENotification::NOTIFICATION_CATEGORY_UNLOCK_NEW_MAP2, 0); SendNotification(ENotification::NOTIFICATION_CATEGORY_UNLOCK_NEW_DUNG2, 0); } But it doesn't work. Sysser: 1123 16:16:21198 :: invalid idx 0 1123 16:17:22742 :: Phase Select does not handle this header (header: 189, last: 32, 189) Thanks in advance for your help. Link to comment Share on other sites More sharing options...
Premium jking 320 Posted November 23, 2024 Author Premium Share Posted November 23, 2024 (edited) You can add this in SetLevel function like you did, or: CHARACTER::PointChange() case POINT_LEVEL: But the syserr talks about packet header error, check if you implemented the system correctly. EDIT: You should avoid using this in SetLevel() function, because it is used also when creating player object. As I can understand you want to use this only when player level up, so PointChange is the correct place. Edited November 23, 2024 by jking 1 Link to comment Share on other sites More sharing options...
Pseudabo 32 Posted November 23, 2024 Share Posted November 23, 2024 Great idea, but update your repo for begginers (you forgot add packet.h for client + some example text for locale_game.txt) Btw. 10s timer is rlly long xd I used 5s but I think 3s is fit already Link to comment Share on other sites More sharing options...
Premium jking 320 Posted November 24, 2024 Author Premium Share Posted November 24, 2024 19 hours ago, Pseudabo said: Great idea, but update your repo for begginers (you forgot add packet.h for client + some example text for locale_game.txt) Btw. 10s timer is rlly long xd I used 5s but I think 3s is fit already Thanks for info. I updated repo & download link. Link to comment Share on other sites More sharing options...
Management ɛʟ Ǥʟɑçѳи 🧊 7991 Posted November 24, 2024 Management Share Posted November 24, 2024 36 minutes ago, jking said: Thanks for info. I updated repo & download link. Hi, m2dl has an update system for files. No need to create a new file every time ahah, to add an update to a file, simply edit it and click "Update File Archive". I did it and restored the original M2DL link, the new link is being deleted I don't respond to any private messages, except for messages regarding ad system issues... For everything else, please join the Discord server and open a ticket... Link to comment Share on other sites More sharing options...
Premium jking 320 Posted November 24, 2024 Author Premium Share Posted November 24, 2024 6 minutes ago, ɛʟ Ǥʟɑçѳи said: Hi, m2dl has an update system for files. No need to create a new file every time ahah, to add an update to a file, simply edit it and click "Update File Archive". I did it and restored the original M2DL link, the new link is being deleted Ye, I know, but there is an error when trying to update file archive: Link to comment Share on other sites More sharing options...
Management ɛʟ Ǥʟɑçѳи 🧊 7991 Posted November 24, 2024 Management Share Posted November 24, 2024 2 hours ago, jking said: Ye, I know, but there is an error when trying to update file archive: Fixed, i forgot to remove this... xD I don't respond to any private messages, except for messages regarding ad system issues... For everything else, please join the Discord server and open a ticket... Link to comment Share on other sites More sharing options...
X E N O N 11 Posted November 25, 2024 Share Posted November 25, 2024 I love these cute things! And then with a little customization they go with everything. Link to comment Share on other sites More sharing options...
Ciofolino 0 Posted November 28, 2024 Share Posted November 28, 2024 Thanks, i tested it and i saw the icons are not properly align so : def LoadInfo(self, notification): self.UI["title"].SetText(notification.GetTitle()) item.SelectItem(notification.value) width, height = item.GetItemSize() iconY = 18 - (height - 1) * 15 self.UI["icon"] = ui.MakeImageBox(self.UI["bg"], notification.GetIcon(), 0, iconY) self.UI["icon"].SetWindowHorizontalAlignCenter() lines = SplitDescription(notification.GetDescription(), 35) stepY = 102 if len(lines) > 1 else 110 self.UI["description"] = [] for count, line in enumerate(lines): description = ui.MakeText(self.UI["bg"], line, 0, stepY, None) description.SetWindowHorizontalAlignCenter() description.SetHorizontalAlignCenter() self.UI["description"].append(description) stepY += 15 Link to comment Share on other sites More sharing options...
Premium jking 320 Posted November 30, 2024 Author Premium Share Posted November 30, 2024 Ye, by default it align properly only icons with 32x32 size 1 Link to comment Share on other sites More sharing options...
Active Member Heathcliff 193 Posted January 6 Active Member Share Posted January 6 Hi! First of all, thank you for sharing it with us, I really appreciate it! I noticed a small issue with the animation itself. If a new notification has been added to the queue when current notification is sliding out, the animation will freeze on your screen. You can test it easily if you lower the animation speed. We should prevent another sliding animation starting to play when the current one is not finished yet. Spoiler def SlideIn(self): if self.isActiveSlideOut: # Prevent starting a new slide if another slide-out is in progress return self.LoadInfo(self.queue[0]) self.SetTop() self.Show() self.isActiveSlide = True self.endTime = app.GetGlobalTimeStamp() + 10 Link to comment Share on other sites More sharing options...
Recommended Posts