• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Instant Messages

Resource Instant Messages 1.1.2

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
wrigty12 submitted a new resource:

Instant Messages - Have NPCs send your player instant messages!

In the modern day, we heavily utilize texting and instant messaging to have conversations with other people. This plugin allows you to bring a similar system to your own games!

Using pbReceiveIM, you can send the player an instant message you defined.

You can review old messages you received, along side new ones, using pbInstantMessages.

Demo Video of viewing an Instant Messages...

Read more about this resource...
 

Krahssen

Novice
Member
Joined
May 31, 2018
Posts
33
This script is amazing!

By the way, I noticed that it uses "on__step_taken" instead of "on_player_step_taken" for calculating steps. Doesn't this cause the steps from movement events around to be counted instead of the player's steps?
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
This script is amazing!

By the way, I noticed that it uses "on__step_taken" instead of "on_player_step_taken" for calculating steps. Doesn't this cause the steps from movement events around to be counted instead of the player's steps?
Huh. Yep. Totally did that. I'll change it on the next update!
 

ardicoozer

Cooltrainer
Member
Joined
Sep 29, 2020
Posts
180
Just my suggestion,
Maybe, player can access the message via items like a Xtransceiver do ( BW features ).
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
Just my suggestion,
Maybe, player can access the message via items like a Xtransceiver do ( BW features ).
You can easily set that up on your own. Just use the pbInstantMessages script call in the item handler. I do call out that you will need to set up a way for the player to access the app in the Basic Setup instructions. Since people have different ways their menus/items are set up, it's easier to have them do it themselves to fit their own game than me try to support every menu/item/etc. out of the box.

"To access the Instant Messages app, you need to call pbInstantMessages. You can create a Pause Menu or Pokegear option to do this, depending on what your game setup looks like. Review the definitions of these for your game, duplicate one, and create one for Instant Messages using this function."
 

ardicoozer

Cooltrainer
Member
Joined
Sep 29, 2020
Posts
180
You can easily set that up on your own. Just use the pbInstantMessages script call in the item handler. I do call out that you will need to set up a way for the player to access the app in the Basic Setup instructions. Since people have different ways their menus/items are set up, it's easier to have them do it themselves to fit their own game than me try to support every menu/item/etc. out of the box.

"To access the Instant Messages app, you need to call pbInstantMessages. You can create a Pause Menu or Pokegear option to do this, depending on what your game setup looks like. Review the definitions of these for your game, duplicate one, and create one for Instant Messages using this function."
Understood
Thank you
 

Krahssen

Novice
Member
Joined
May 31, 2018
Posts
33
Huh. Yep. Totally did that. I'll change it on the next update!
That's great to hear! There is also a small issue related to Essentials 21.1. Essentials 21.1 uses the monitor's Hz to determine the framerate. This means that, when calculating the message speed using frames, if you have a 144hz screen, the messages will go very fast. I think this could be resolved by calculating time in seconds rather than frames.
I noticed it when I moved the screen from my 144hz monitor to the 60hz monitor.

Thank you very much for the script
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
That's great to hear! There is also a small issue related to Essentials 21.1. Essentials 21.1 uses the monitor's Hz to determine the framerate. This means that, when calculating the message speed using frames, if you have a 144hz screen, the messages will go very fast. I think this could be resolved by calculating time in seconds rather than frames.
I noticed it when I moved the screen from my 144hz monitor to the 60hz monitor.

Thank you very much for the script
Oh right. I always work with v20, so I forgot about the frame => seconds shift for v21. I'll have to play with that.
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
wrigty12 updated Instant Messages with a new update entry:

1.1 - New Features and Bug Fixes

BEFORE UPDATING ANY FILES: If you have made any edits the Settings or Configurations for the plugin, make sure to make a backup of those files before updating the plugin. If you copy over files to update, it will overwrite your changes. I recommend you duplicate your Configuration files and rename them, so they won't be overwritten when you update.

Change Log
  • ⭐New feature: Sorting Conversations. Using the SPECIAL key, you...

Read the rest of this update entry...
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
That's great to hear! There is also a small issue related to Essentials 21.1. Essentials 21.1 uses the monitor's Hz to determine the framerate. This means that, when calculating the message speed using frames, if you have a 144hz screen, the messages will go very fast. I think this could be resolved by calculating time in seconds rather than frames.
I noticed it when I moved the screen from my 144hz monitor to the 60hz monitor.

Thank you very much for the script
I think I solved it with the latest update. I only have 60 hz monitors, so I can't check the 144 situation. Let me know if it feels right now.
 

Krahssen

Novice
Member
Joined
May 31, 2018
Posts
33
I think I solved it with the latest update. I only have 60 hz monitors, so I can't check the 144 situation. Let me know if it feels right now.
I've been testing it for a while (144Hz and 60HZ) and it seems to be working perfectly now. I'll keep using it over the next few days, so I'll let you know here if any other issues come up.

That said, I'm not sure if this is a bug or not, but I'll explain it anyway:

If I receive a message from a group (not mandatory, meaning it doesn't show up until I open it) and then, a few seconds later, I receive another one from the same group, when I open the group, it shows me both messages (one after the other) step by step.

This isn't much of a problem with a few messages, but if the player hasn't checked, say, 10 group messages and suddenly does, they'll have to sit through a VERY, very long conversation.

Maybe it could be made so that only the most recent message shows the animation, or perhaps that you can skip all of them automatically, so the player can exit the menu more easily than with the message fast-forward option. I’m not sure if you can think of any other way to avoid this.

Thank you so much, once again, amazing resource!

Edit: By the way, if I check the group after receiving more than one message, the timestamp won’t appear (even though it will show up if I exit the menu and go back in).
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
I've been testing it for a while (144Hz and 60HZ) and it seems to be working perfectly now. I'll keep using it over the next few days, so I'll let you know here if any other issues come up.

That said, I'm not sure if this is a bug or not, but I'll explain it anyway:

If I receive a message from a group (not mandatory, meaning it doesn't show up until I open it) and then, a few seconds later, I receive another one from the same group, when I open the group, it shows me both messages (one after the other) step by step.

This isn't much of a problem with a few messages, but if the player hasn't checked, say, 10 group messages and suddenly does, they'll have to sit through a VERY, very long conversation.

Maybe it could be made so that only the most recent message shows the animation, or perhaps that you can skip all of them automatically, so the player can exit the menu more easily than with the message fast-forward option. I’m not sure if you can think of any other way to avoid this.

Thank you so much, once again, amazing resource!

Edit: By the way, if I check the group after receiving more than one message, the timestamp won’t appear (even though it will show up if I exit the menu and go back in).
Yeah, the default is designed that way (both the timestamp thing and the "all at once").

To make messages not go through the animation, you can mark the conversation with the Instant parameter set to true. That setting will make the message(s) appear instantly once the player opens it. It should also respect the timestamps for each individual instant conversation that way, too. This shouldn't be used for a conversation that the player will need to reply to, though.

On the flip side, if you have longer conversations being sent to the player, and you really want them to see them, consider marking them with the Important parameter set to true. This will force the player to read that individual conversation as soon as they receive them.

I made the time stamp thing work the way it does for the following reason:
The timestamps for any subsequent non-instant conversations won't appear because it would be weird in the moment. That situation is supposed to emulate a live conversation going on. So it'd be weird if messages are coming in as though the person was actively messaging you at 3:30pm, then all of a sudden a message appears that also seems seemingly in the live conversation at 7:30pm. Did three messages take 4 hours to send? That would feel weird.

tl;dr utilize the Instant and Important parameters to make the timing more like how you want. My recommendation is that every conversation should either be Instant or Important.

Let me know if it's still weird after playing with it.
 

Ryuushedo

Developer of Pokemon Lost World
Member
Joined
Jun 13, 2023
Posts
20
I got this error

Exception NoMethodError' at Section082:1106 - undefined method each' for "Good Grief":String

Exception EventScriptError' at Section033:177 - EventScriptError


GameData::InstantMessageConversation.register({

:id => :TEAM1,

:group => :TEAM,

:important => true,

:messages => [

[0, :Text, _INTL("It's urgent! there’s a bomb in Chroma City. Long story short, it’s kind of a situation. Can anyone help?")],

[1, :Text, _INTL("Wait, hold up! what? A bomb? In Chroma City? Did I miss something important?")],

[2, :Text, _INTL("Did he just casually say there’s a bomb like it’s nothing? Who’s planting bombs now?")],

[0, :Text, _INTL("Good Grief")],

[0, :Text, _INTL("I met a guy named Nero, one of the cultists")],

[0, :Text, _INTL("He attacked me, and afterward, he told Master Leaf that there’s an explosive set to go off in Chroma City")],

[3, :Text, _INTL("Is there any other lead? Lumina and I are still far away from Chroma City")],

[1, :Text, _INTL("I’m actually in Chroma City right now. Should I alert everyone?")],

[0, :Text, _INTL("No, don’t do that. That could cause a panic, and if they find out... they might detonate the bomb immediately")],

[1, :Text, _INTL("Got it. I’ll wait for you then")],

[3, :Text, _INTL("We’ll get there as soon as we can. Just don’t do anything reckless")],

[2, :Text, _INTL("Yeah, and call us right away if you find the bomb!")],

[0, :Text, _INTL("Got it!")],

]

})
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
I got this error

Exception NoMethodError' at Section082:1106 - undefined method each' for "Good Grief":String

Exception EventScriptError' at Section033:177 - EventScriptError


GameData::InstantMessageConversation.register({

:id => :TEAM1,

:group => :TEAM,

:important => true,

:messages => [

[0, :Text, _INTL("It's urgent! there’s a bomb in Chroma City. Long story short, it’s kind of a situation. Can anyone help?")],

[1, :Text, _INTL("Wait, hold up! what? A bomb? In Chroma City? Did I miss something important?")],

[2, :Text, _INTL("Did he just casually say there’s a bomb like it’s nothing? Who’s planting bombs now?")],

[0, :Text, _INTL("Good Grief")],

[0, :Text, _INTL("I met a guy named Nero, one of the cultists")],

[0, :Text, _INTL("He attacked me, and afterward, he told Master Leaf that there’s an explosive set to go off in Chroma City")],

[3, :Text, _INTL("Is there any other lead? Lumina and I are still far away from Chroma City")],

[1, :Text, _INTL("I’m actually in Chroma City right now. Should I alert everyone?")],

[0, :Text, _INTL("No, don’t do that. That could cause a panic, and if they find out... they might detonate the bomb immediately")],

[1, :Text, _INTL("Got it. I’ll wait for you then")],

[3, :Text, _INTL("We’ll get there as soon as we can. Just don’t do anything reckless")],

[2, :Text, _INTL("Yeah, and call us right away if you find the bomb!")],

[0, :Text, _INTL("Got it!")],

]

})
It's because in your definitions for the player (0's) it requires an array of strings, not just a single string. The plugin was designed so the player has to choose from a list of replies. It didn't support a reply that isn't from a choice.

My next update should allow this to work.
 
Last edited:

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550

Youiten

Rookie
Member
Joined
Oct 5, 2023
Posts
3
Very good plugin, but is there any way to make the message less instant?
What I mean is that after sending multiple messages that do not require immediate viewing, even if viewed later, it still looks like an instant conversation.
I think if the accumulated messages can be directly displayed on the screen for forging chat records, the effect may be very good.
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
550
Very good plugin, but is there any way to make the message less instant?
What I mean is that after sending multiple messages that do not require immediate viewing, even if viewed later, it still looks like an instant conversation.
I think if the accumulated messages can be directly displayed on the screen for forging chat records, the effect may be very good.
Are you asking them to appear with some time inbetween? That isn't realistic to how an actual phone/IM works so I did not implement it that way.

Imagine, over the course of an hour, you receive a message at 10 am, another at 10:34am, and a third at 10:48am. You view your messages at 11:00am. The three messages are all visible at once. They don't come in one at a time, as you already received them. They aren't actively being typed.

Otherwise I'm misunderstanding what you're asking?
 

Youiten

Rookie
Member
Joined
Oct 5, 2023
Posts
3
Are you asking them to appear with some time inbetween? That isn't realistic to how an actual phone/IM works so I did not implement it that way.

Imagine, over the course of an hour, you receive a message at 10 am, another at 10:34am, and a third at 10:48am. You view your messages at 11:00am. The three messages are all visible at once. They don't come in one at a time, as you already received them. They aren't actively being typed.

Otherwise I'm misunderstanding what you're asking?
What I want is exactly as you described: when you open the accumulated unread messages, they will be displayed simultaneously instead of simulating the effect of real-time input appearing one by one. In fact, the visual effect of viewing read messages from the app works very well, so I thought it could be achieved. I hope this effect can also be applied to non-mandatory messages, such as silent sending. Even if not, this is still a great plugin, and I will try to utilize its existing effects. Thank you for your work!
 
Back
Top