Display pictures ON MAP (not on screen) based on variables?

dm604

Veteran
Veteran
Joined
Sep 18, 2021
Messages
52
Reaction score
17
First Language
English
Primarily Uses
RMMZ
Dear fellow makers:

How do I display pictures ON MAP (not on screen) based on variables?

Situation:

Different characters will appear at different parts of the map based on the time of the day (variables).

I've tried to do it using different methods but the results are not good.

Method 1:
- I set up an event with the picture of the character on the map.

Say there are schools and town.

When Char1Location = 1, the picture appears at the school (location1).
When Char1Location = 2, the picture appears at the town (location2).

But this creates other issues, since the condition on the event page is always GREATER THAN or EQUAL TO, this means that if I set Char1Location = 2, the picture will show up at both school (location1) and town (location2).

Is there any way to restrict the event to only showing when Char1Location = 1, not >= 1?

Method 2:
- I tried to do it using switches, but this turns into a nightmare because there are 5 characters and 5 locations.
It's a hassle to maintain.

For example, if Character 1 is at school (location 1), I will have to turn off all other switches for Character 1.
I tried it and it wasn't working well.

Method 3:
- Show pictures.
If I use show pictures, the pictures stay ON THE SCREEN, instead of being fixed on the map.
Is there any way to show pictures on map, not on the screen?

Method 4 (my current method):
- I used balloons instead of events.

Everything works out nicely and if two characters are present at the same location, the balloon will alternate between the two characters, which is very nice.

The only drawback is that the balloon sizes are very very small, making it difficult for players to see.
Is there any way to increase the number of balloons and the size of balloons?

What would be an ideal way of addressing this situation?
I'm open to any suggestions and/or ideas.

Thank you all.
 

Attachments

  • Annotation 2021-10-14 220133.jpg
    Annotation 2021-10-14 220133.jpg
    233.6 KB · Views: 11

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,942
Reaction score
10,523
First Language
German
Primarily Uses
RMMV
your approach is wrong, and you're missing one of the most basic features of events - the event pages.

only one event page on any event will ever be active, and that is also the reason why the greater than is sufficient.

in your first example, the event should have two pages. First page with location >=1 and the sprite you want to display, second page with location >=2 and no sprite at all.

If the location is one the sprite of the first page is displayed there, when location becomes two the second page becomes active and there will no longer be a sprite to display.

I strongly suggest that you work yourself through the tutorials (the integrated ones in the editor as well as some of the event tutorial games here on the forum) to learn how the events are supposed to be used instead of guessing the wrong ways to do things.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,479
Reaction score
16,397
First Language
English
Primarily Uses
RMMV
You don't use pictures to represent events, and pictures aren't tied to a map position.

Andar's explanation above is what you should follow. One event page for the desired condition, and one event page for the "next" stage with no sprite.
 

dm604

Veteran
Veteran
Joined
Sep 18, 2021
Messages
52
Reaction score
17
First Language
English
Primarily Uses
RMMZ
Thank you, Andar & Shaz.
Appreciate your feedback and responses as always.

I actually tried this approach before posting, but I think there are a few issues.

1) Because of the way event pages work, if more than 1 character are at location 1 (school), only the character with the higher numbered event page will be shown.

Whereas if I use balloons and when two conditions are met, BOTH balloons will be shown.

2) Using this method, say I have 4 characters, does it mean that I have to set up 2 event pages per character per location?

Location 1:
Char1 Location = 1 (sprite) pg.1
Char1 Location >= 1 (no sprite) pg.2

Char2 Location = 1 (sprite) pg.3
Char2 Location >= 1 (no sprite) pg.4

Char3 Location = 1 (sprite) pg.5
Char3 Location >= 1 (no sprite) pg.6

Char4 Location = 1 (sprite) pg.7
Char4 Location >= 1 (no sprite) pg.8

And repeat this for all locations.

And to address the fact that there might be more than one character at the same location, perhaps the best way it to create different tiles for them?

Say Tile 1 will only respond to character1,
Tile 2 will only respond to character2,
and so on...?

The reason why I asked in the first place was because I tried it using balloons, and the code was much much simpler. The only disadvantage is that balloon sizes are very small.

Here's the screenshot of me doing the same thing but with balloons.

your approach is wrong, and you're missing one of the most basic features of events - the event pages.

only one event page on any event will ever be active, and that is also the reason why the greater than is sufficient.

in your first example, the event should have two pages. First page with location >=1 and the sprite you want to display, second page with location >=2 and no sprite at all.

If the location is one the sprite of the first page is displayed there, when location becomes two the second page becomes active and there will no longer be a sprite to display.

I strongly suggest that you work yourself through the tutorials (the integrated ones in the editor as well as some of the event tutorial games here on the forum) to learn how the events are supposed to be used instead of guessing the wrong ways to do things.

You don't use pictures to represent events, and pictures aren't tied to a map position.

Andar's explanation above is what you should follow. One event page for the desired condition, and one event page for the "next" stage with no sprite.
 

Attachments

  • Annotation 2021-10-15 152025.png
    Annotation 2021-10-15 152025.png
    183.4 KB · Views: 3

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,942
Reaction score
10,523
First Language
German
Primarily Uses
RMMV
Please take three steps back and explain to us what you want ingame for the player to see.

We cannot read your mind, and our answers are only based on what you told us - and nothing in the original post was about multiple characters.
Additionally your post was extremely confusing in that it mixes words that have specific meanings in the engine with functions that have nothing to do with how you used those words in the description - that is an additional reason why you need to describe what result you want, not how to get to that result.
 

dm604

Veteran
Veteran
Joined
Sep 18, 2021
Messages
52
Reaction score
17
First Language
English
Primarily Uses
RMMZ
Please take three steps back and explain to us what you want ingame for the player to see.

We cannot read your mind, and our answers are only based on what you told us - and nothing in the original post was about multiple characters.
Additionally your post was extremely confusing in that it mixes words that have specific meanings in the engine with functions that have nothing to do with how you used those words in the description - that is an additional reason why you need to describe what result you want, not how to get to that result.

I did mention "Different characters will appear at different parts of the map based on the time of the day (variables)." but just to clarify, I meant multiple characters.

1) Multiple characters will be present at different locations on the map.

2) Sometimes multiple characters will be present at the SAME location, and when that happens, I would prefer to have the images shown at the same spot on the map and alternates between images (but if not, that's ok too).

I was able to achieve what I want using balloon icons, but I would like them to be bigger than 48X48.


Hope this is clear. Thanks again! :)
 

Attachments

  • Scars of Summer v1.03 9_20_2021 11_02_13 PM.png
    Scars of Summer v1.03 9_20_2021 11_02_13 PM.png
    313.1 KB · Views: 5

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,942
Reaction score
10,523
First Language
German
Primarily Uses
RMMV
And that post is as confusing as the first, because you never say what purpose those characters have, why they should appear there and what the player should do with them.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,479
Reaction score
16,397
First Language
English
Primarily Uses
RMMV
Sometimes multiple characters will be present at the SAME location
Does this simply mean on the same map, or are they occupying the same tile on the same map?

Because of the way event pages work, if more than 1 character are at location 1 (school), only the character with the higher numbered event page will be shown.
Not sure I follow this ... unless you are saying you have one event with multiple pages, and each page is a different character? If two characters could be on the same map at the same time, then you should have one event for each of them, not just a single event with one page for each.


Perhaps you can show us some screenshots of one of these events, so we can see how you've got it set up? Include all pages.
 

dm604

Veteran
Veteran
Joined
Sep 18, 2021
Messages
52
Reaction score
17
First Language
English
Primarily Uses
RMMZ
And that post is as confusing as the first, because you never say what purpose those characters have, why they should appear there and what the player should do with them.

Didn't want to bore you guys with all the details, but since you asked... :p

So here's the structure:

World map (Overworld). Underneath there are individual maps.
-----> School (location 1)
-----> Town (location 2)
-----> Downtown (location 3, and etc)

The player can move freely either on the world map or on individual maps.

Other than the player, NPCs will appear at different individual maps.

Many games have a system where you don't know where other NPCs are and you have to roam aimlessly.

Instead, I want to have a system where the player can see where these NPCs are on the world map, hence my original post.

So if the player sees NPC 1 (Character 1)'s icon flashing at school, the player will know if he goes to school, he will be able to meet NPC 1 (Character 1).

Does this simply mean on the same map, or are they occupying the same tile on the same map?


Not sure I follow this ... unless you are saying you have one event with multiple pages, and each page is a different character? If two characters could be on the same map at the same time, then you should have one event for each of them, not just a single event with one page for each.


Perhaps you can show us some screenshots of one of these events, so we can see how you've got it set up? Include all pages.

Please refer to the screenshots.
Thank you, Shaz. I feel bad for bugging you guys.
I hope this is all clear now. If not, don't worry about it, because I kind of figured it out.
I'll either stick with balloons (just one tile, but the image is smaller) or use events (and place the events on different tiles).

Thank you all.
 

Attachments

  • 1.png
    1.png
    828.6 KB · Views: 4
  • 2.png
    2.png
    465.8 KB · Views: 3
  • 3.png
    3.png
    458.4 KB · Views: 1
  • 4.png
    4.png
    297.6 KB · Views: 3

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,942
Reaction score
10,523
First Language
German
Primarily Uses
RMMV
NPCs will appear at different individual maps.
That is the key sentence, the rest of what you wrote has almost nothing to do with the problem.
Your entire sum of texts can be shortened to "I want to show the player the changing locations of certain NPCs on the worldmap".

And now we are back to my original post.
Please take three steps back
There is a reason why I said three steps, because you still have not gotten far enough back.

What determines where the NPCs are? How does your game decide on that?

Because it would help to find a better structure than just assigning a location variable to each NPC and hoping that there will not be too many collisions and concerns about that.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
45,479
Reaction score
16,397
First Language
English
Primarily Uses
RMMV
Okay, I see what you're trying to do.

One way of doing this with events is to set up a character sheet so that all the possible NPCs that could be in the same location at the same time are shown in the same column. Set an auto move route on the event (beside where the sprite is) that makes it turn down, left, right, up, with a wait in between - similar to a door auto event - of course, only using the directions that have a character allocated. This would let you have up to 4 by default, and if you included a Change Graphic command you could have many more. Then you'd just have multiple pages for each event, with each page covering a different combination of NPCs.
 

dm604

Veteran
Veteran
Joined
Sep 18, 2021
Messages
52
Reaction score
17
First Language
English
Primarily Uses
RMMZ
Hi, Andar:

I believe I already mentioned in the my first post:
"Different characters will appear at different parts of the map based on the time of the day (variables)."


>>What determines where the NPCs are? How does your game decide on that?
I have a script on who will appear at where at different time periods.

Thank you for your help. I guess each of us is exposed to different types of games, as this kind of mechanic is popular in JRPG games made with RPG Maker (although they usually leave something to be desired, which was why I wanted to create a game similar on my own). :)

That is the key sentence, the rest of what you wrote has almost nothing to do with the problem.
Your entire sum of texts can be shortened to "I want to show the player the changing locations of certain NPCs on the worldmap".

And now we are back to my original post.

There is a reason why I said three steps, because you still have not gotten far enough back.

What determines where the NPCs are? How does your game decide on that?

Because it would help to find a better structure than just assigning a location variable to each NPC and hoping that there will not be too many collisions and concerns about tha

Okay, I see what you're trying to do.

One way of doing this with events is to set up a character sheet so that all the possible NPCs that could be in the same location at the same time are shown in the same column. Set an auto move route on the event (beside where the sprite is) that makes it turn down, left, right, up, with a wait in between - similar to a door auto event - of course, only using the directions that have a character allocated. This would let you have up to 4 by default, and if you included a Change Graphic command you could have many more. Then you'd just have multiple pages for each event, with each page covering a different combination of NPCs.

Thank you, Shaz!
This is a genius way to do it!

I kept on thinking I should have done it differently cuz it's on the world map and it's an "indicator" instead of a character.

Like you said, if I treat the event as if it's a character or a combination of characters, then using a spritesheet to do it seems to be the reasonable solution. Not only is the spritesheet bigger than balloons, but with the proper plugins (such as Galv's 8-frame sprite), I can fit a lot more in plus some room for transition.

Thank you everyone for your ideas and feedbacks. Have a wonderful weekend!
 

Latest Threads

Latest Profile Posts

Someday, I hope they make a game where 95% of the animation budget went to turning valves and opening door animations, leaving every other animation looking like a CDI zelda cutscene.
programming at 12 years old: "I love how it works!"
programming at 18: "I love that it works."
programming at 25: "I love why it works."
programming at 30: "I love when it works."
programming at 50: "How did this work?"
Why can't I insert picture in this profile post? Only insert image -> by URL. No option to upload from my pc?
Trying out a new Battle Ui.
BattleUI.png
And.... I couldn't help myself. I linked my card game Lore and Concepts back to my RPG Maker game and made them take place in the same universe. I think that means I need to get back to work on my RPG Maker Game. There's obviously a story here my brain wants to tell.

Forum statistics

Threads
129,758
Messages
1,204,888
Members
170,847
Latest member
Reddyfrog
Top