Creating a notification system

Hey everyone!
I’m back with yet another question(go figure)! I got a lot of help on my last question and I super appreciate it. Really hoping I can get some help or at the very least a few ideas on where to start. I tried using the forum search function and couldn’t seem to come up with anything. Sorry if this has already been asked/covered.

so I’m sort of looking to create a cell phone notification system. When the player gets a new email, when a npc invites them out, and ‘event’ notifications. It would be real groovy if I could even setup in a almost scroll style(like real email and such works) so you can see chat history etc but I think that’s pretty lofty lol. I would like the player be able to ignore the notifications outright and it have possible consquences.

I have a feeling gosub is going to be the quickest and easiest way to make and alter on the fly. I just have been stumped the last day or two on how to figure it out.

Examples:
-Player will get a notification that X wants to hang out. They can answer, leave them on read, or ignore,
-‘News’ notification that can be used to push more world building an info as the game goes on. Some actions the player makes may effect the news.

Any help would be super appreciated. Thank you in advance!

2 Likes

That sounds like a really cool idea, and I wish it was possible. However I am not a tech priest, so I don’t know for sure.

However maybe you could put a picture of what it would look like. Not perfect but still, maybe you could find a way to check what platform it’s on (Apple, Android, PC etc.) Then have different pictures for each, so Android emails look like Android emails. If you need someone to take screenshots on Android I’m cool with that.

I might be able to come up with something. I would need to know more about how you want the notification system to work. You could have a notification while your playing the game, then check the messages in the stat menu on a separate page.
Otherwise, the way you described it should be fine as well.

Right on, right on.

@Fredrick-No-E
I don’t know if I would go as far as individual IOS. More or less I just want something to pop up informing them that they have a new message. The original idea was for them to view it from a cellphone like menu. Hope that clears things up.

@Phantmwolf
Hey Phantm, back to save my butt once again eh? :stuck_out_tongue: Yeah it would pop up while you were playing. Either by text or ideally a *image icon.
I was hoping to check the message through *gosub just so I could copy/pasta things a whole lot easier and make it…clean I guess? However checking it through the stat menu would make for a cleaner interface and easier access by player. Not to mention it would probably save me a lot on coding. So if you can think of a way via stat menu I would totally be game for that my friend! Thanks for helping me out once again.

1 Like

Do you want the notifications to appear while your playing the game via bold text? Also, do you want the messages to appear like a phone conversation as well, where the text messages are still on the screen even after you reply? If it’s done like this, each conversation will be deleted so you don’t have an endless amount of text messages since the game starts from the top rather than the bottom.

A list of characters will help for the contact list in the phone menu as well.

Ideally I would like either bold text or a *image (I made an icon). I’m not going to be picky either way to be completely honest.

Honestly I would prefer it that way. Is it possible that when you select the message it can take you to a scene where the messages are all stored for the sake of organization? If not it’s not that big of a deal

That makes sense. I would like it to show chat history. I doubt I’ll get lucky enough for like a chat avatar or anything like that. Being able to see all the chat history would be nice, but not required to be honest. Worse case scenario I just make entries in the player’s journal for important messages etc.

Once again thanks for the help in advance. I attached some very crappy concept art I put together when I was first thinking of this game. Please don’t judge xD
https://ibb.co/vvgmqqp

https://ibb.co/fNZpqM1

A chat history can be done. But you don’t want the player to have to scroll to the bottom of a long conversation everytime.

Ahhhh!
Now I see what you’re saying. Yeah, then I def don’t want a chat history. I’ll just note important convo bits in the player journal. That’ll make it easier for the player anyways.

Use achievements. Activate a hidden achievement that pops up to the effect that you have a new txt message from person x and then have the choice to answer it or not as a regular choice down the bottom of the page as usual.

Don’t use the achievement box to contain the message though as it disappears after a few seconds. You’ll need normal text choices for that or you can insert an image.

If you want them to be accessable later, just have them your “phone” accessable via the stat’s menu. (Or get the player to go to the phone in the stats menu when they see the achievement come up and unlock the new message with a variable triggered at that point. Can have a second variable to track if they open the message as well.)

5 Likes

Sorry, thought you meant give the phone actual alerts, sorry.

The only issue I see with that is they have a limitation on achievement numbers I believe? I believe you can only have 100 achievements? I’ll run a test and see if I can fit it to what I need. Thank you for the suggestion!

The other option I have been thinking of, is splitting active chat and log. I believe KOTOR and Penumbra games use to use a similar setup. That way I can keep the two independent but allow the player to look at the logs if they need be.

1 Like

If you don’t plan on publishing through CoG you can use the *script command. Legend has it that CoG won’t publish any games with *script in them. Though, for all the talk I’ve never seen a confirmation of this.

Anyway, this should do the trick:

*script alertify.log("Your message here.");

You can set the message programmatically from inside ChoiceScript:

*temp msg "Hey, sup!"

*script alertify.log(this.stats.msg);
  1. Use the achievement system as Jacic mentioned to get a popup for the “you’ve got a message” bit. This will only need to use 1 achievement as described below (or one per person if you want to). You can gain it as many times as you want and it will pop every time.

  2. At the same time in the scene where it pops up, have an option to reply to the message, or ignore it, and whatever answer options you want. At the end of these choices that have you send a message (and appropriate tags).

  3. On the stat screen, have an additional page accessed by pressing “phone” or something similar. You can have many pages on the stat screen. This phone screen can have a list of people who you have texted, and if you click on them, you can go to each of their pages where you can see all the old messages (or an option for the last two or three).

  4. For every message sent/received, have a tag created. Then for every tag set to true, you can show that message on the screen.

  5. If you want to, you can have the game check if a message tag is still active at the end of a day, and use that to remind the player to answer the message, or ignore it forever, and set the tags accordingly for reactions.

2 Likes

Pretty sure donor needed a rewrite due to scripts.

Pretty sure COG also won’t publish anything containing the colour mod or the save mod that also had changes made to the source files to work.

That’s sad, but what to do? 🤷

Not much, just have to try and work around it. I just thought I’d give you the heads up that it’s quite likely if scripts are used that it won’t be publishable via HG. I think Donor had some scripts for games within the game that needed to be redone without scripts before publishing.

(BTW I love the colour mod wish I could use it. I can see why they don’t want colours changes being spammed all over the place, but I made one where you had an option to make the colour of the background be affected by the ambient lighting level in the story section you were in which I found very cool (although I am sometimes easily amused :grinning_face_with_smiling_eyes: )

1 Like

I would like to keep all my options open, to be honest. I haven’t really looked into which route I plan on going with quite yet. With the dollar value I have wrapped up into the art and audio assets I’m kind of on the fence on what to do. So far I’ve been able to make Choicescript do everything I want it to. So, we’ll see when it’s done. Don’t want to put the cart in front of the horse so to speak. I’ve been working on the general project for nearly two years, so I’m willing to be patient and play the long game. I just really, really like Choicescript and the Choice games so if I can support them in some way I will.

Though to be completely honest, I’ll probably give it a try just to see how it works/looks like. Thank you a bunch for offering advice. I appreciate you!

Ah! Now I see where I was messing up. Okay, okay, good looking my friend! That’s actually super useful! Thank you so much for the detailed explanation. I’m going to start putting it together tonight and see how it turns out. I’ve never used *achievement so this should be fun~

Thanks everyone! I appreciate all of your help!

2 Likes

That is good to know. I haven’t really messed with anything to do with layout or design. I’ve had to alter some of my art a bit to not look so harsh against the background. I can understand the appeal of wanting to make the background a different color.
Ideally being a cyberpunk game, a dark background with a different font group would be cool but I’ll take what I can get xD.

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.