Don't Pause the Game during Inventory/Menu/Status Access

metronome

Veteran
Veteran
Joined
Aug 21, 2014
Messages
338
Reaction score
144
First Language
English (Sure!)
Primarily Uses
I am pretty new here so I am not sure if this kind of question has been answered already in this forum.

I did some search, and came out nothing, so here is the question:

"How do you make it so the game doesn't pause at all when you access your inventory/menu/status?"

If you have ever played MMORPG before, then you know what I am talking about. Basically, you press "i", and then the inventory comes out, if you press "s", the status panel comes out, and so on. Now here what happens next: If there is countdown timer, the timer is still counting down during inventory access. If there is this stupidly strong enemy attacking you right now, you can't pause the game by pressing the "s" button (status panel access button).

I know it is doable, and I don't think it is hard to do this. But hey, I can be wrong.

Thanks for at least reading my question.~~
 

Evgenij

Veteran
Veteran
Joined
Aug 28, 2013
Messages
349
Reaction score
100
First Language
German
Primarily Uses
N/A
Its a little bit difficult, cause all are different scenes. You would need a custom script, which would let the menu run during the map scene. I dont know if there are any scripts of this kind.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,235
Reaction score
7,617
First Language
German
Primarily Uses
RMMV
you need scripts to do this, and it isn't as easy as you think - depending on what you want to happen on the map during the screens.


However, you've mixed up a few things - for example, the default battle has its own screen, and you simply cannot enter the other screens while on battlescreen - and with all screens, the map is stopped during battlescreen.


There are scripts that allow for on-map battles in real-time, but those scripts make a lot of changes to the engine. So if you want an enemy to continue attacking on the map while you are in inventory, then you first have to decide which of the ABS (action battle system) scripts you want to use to create map battles, then you have to check what that system uses as inventory - and then you can ask if someone could modify that script for parallel timed inventories.


If the attacking enemy was only an example, then you need to state what you want to happen while the player is in inventory, and then we can tell you what you need for that.


I also suggest you follow the link in my signature to learn what is possible by default before adding functions by scripts - that will help you in the long run...
 
Last edited by a moderator:

metronome

Veteran
Veteran
Joined
Aug 21, 2014
Messages
338
Reaction score
144
First Language
English (Sure!)
Primarily Uses
Guess I am not being here, my bad.

I guess I will start from something very simple to show my questions:

Do you remember Final Fantasy 8? Did you play it? If yes, then you should know that spider robot chase scene. It has countdown timer, when the timer reaches zero, you loose. That's it. Entering RPG style battle doesn't stop the countdown timer. I have never tried accessing the game menu (settings, inventory, junction, status, etc) during that times, but I heard that even if you go into game menu, the countdown timer is still going down. I think the countdown timer in Final Fantasy 7 works that way too, can't remember.

In my case, I (thought) I can put somekind of time-triggered event (eg. after setting up a bomb in a building, you have 10 minutes to exit the building, or may be....if you can't defeat a guy in specified time, you loose, and so on), and then make it so that the time will still run even if you are accessing the inventory/status/setting/etc menu.

@evgenij

Thanks for fast response~~

@Andar

I will read that link for sure. Took a peek and I deeply regret that I didn't take a peek sooner. If I only I see this  "5) Do not make your first project your "dream game" " 2-3 years ago, I would have saved a lot of my grievances and times over failed "dream game" project.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,603
Reaction score
5,067
First Language
English
Primarily Uses
RMVXA
It definitely seems to be possible.  But I imagine it would involve changing all of the menu scenes into elements of the Scene_Map class, which is no trivial task.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,035
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
(in the voice of Maxwell Smart): Ah, the old "if I can say it in 10 words or less, it must be easy" assumption.


Yes, it's doable. No, it's not easy.


Wavelength is spot on. It would require converting all of the menu scenes into elements of the Scene_Map class.


I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,516
Reaction score
14,244
First Language
English
Primarily Uses
RMVXA
Do you remember Final Fantasy 8? Did you play it? If yes, then you should know that spider robot chase scene. It has countdown timer, when the timer reaches zero, you loose. That's it. Entering RPG style battle doesn't stop the countdown timer. I have never tried accessing the game menu (settings, inventory, junction, status, etc) during that times, but I heard that even if you go into game menu, the countdown timer is still going down. I think the countdown timer in Final Fantasy 7 works that way too, can't remember.
I think something like that would only require you to edit the update code for the menu scene to update the timer too. Though, I would suggest a pause button of some sorts too if you are going to go that route! I think FF7 and FF8 could pause the entire game by hitting start if I recall correctly.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,035
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
Someone else recently asked how to make the timer continue when in a menu, and was given several answers. Search for that.


That won't allow other events on the map to still happen though, so that's still an extra.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I think something like that would only require you to edit the update code for the menu scene to update the timer too. Though, I would suggest a pause button of some sorts too if you are going to go that route! I think FF7 and FF8 could pause the entire game by hitting start if I recall correctly.
Fortunately, someone was able to do what you want:

http://infinitytears.wordpress.com/2014/06/14/rgss3-global-timer-ex/

Its a script that allows you to continue the timer even when you're pausing a.k.a. in the menu.
 

metronome

Veteran
Veteran
Joined
Aug 21, 2014
Messages
338
Reaction score
144
First Language
English (Sure!)
Primarily Uses

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,035
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
And that would be because that script updates the timer in Scene_Base but has not removed the original update from Scene_Map's update method. So when you're on the map, the timer is being told to update once from Scene_Map and once from Scene_Base.


Just go to Scene_Map, find the update method, and comment out the line that says $game_timer.update
 

metronome

Veteran
Veteran
Joined
Aug 21, 2014
Messages
338
Reaction score
144
First Language
English (Sure!)
Primarily Uses
@shaz

thanks for fast response!

comment out the $game_timer.update?

you mean delete these whole "$game_time.update" text from my Scene_Map?

(Never mind. I deleted the said text, and the script works perfectly! Thanks for all of you here!)
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,035
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
I would have recommended just commenting it out rather than deleting it ... if you ever decide to get rid of that script, you'd need to re-enable it.
 

Garrek

Warper
Member
Joined
Sep 10, 2015
Messages
3
Reaction score
0
First Language
german
Primarily Uses
I really hate to necrobump with my first post on this forum, but I actually think it's more productive than starting a new thread, so I hope it's okay.

I jumped right into RMVX Ace about 48 hours ago, explored it a bit, and while testing, the same  thing the op asked for came to my mind. I tried to solve the problem by myself, but that's easier said than done as a Ruby-Firsttimer, so it did cause me quiet some flinching, (I tried it anyway since I'm not a complete noob at scripting, but still failed horribly) but luckily I ran over this post while researching.

But now, it seems, I'm not even smart enough to implement that script :|

Generally speaking the recommended place to insert scripts seems to be the "Materials" section, but only inserting the script there didn't do anything at all (which hasn't been that much of a surprise since the script implements classes that already exist, but I tested it anyway, just in case). I also tried changing the methods of the classes which are implementet in the script, and inserted the module-part in a seperate folder in the "Module"-section, which caused a NameError(uninitialized constant). Apparently the module stuff couldn't be compiled because it hasn't been initialized (since Scene_Load and so on are initialized later in the process). Next I tried to place the modulepart alone in the Materials section, but that also didn't work. By now I think it has to be implemented before Scene_Base, otherwise it causes an error, since the updated Scene_Base already uses the constant (which again relys on the Scene classes).

I'm kinda out of ideas. It feels like it will throw an error, no matter which one I insert first, and just inserting the whole script unchanged didn't seem to work properly either. I'm probably missing some pretty essential stuff at this point, but the script didn't come with a lot  of instructions.

I would really appreciate any kind of help with this :|
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
I am not sure what you are trying to do there, the script should work simply by pasting it somewhere under Material and above Main.

And what Shaz pointed out is a fix for the double update on the timer making it twice as fast.

goto the last part of the script, look for def update and look for this line

$game_timer.update

comment it out by adding # infront of it. 

#$game_timer.update

That's all to get the script to work.

To get the timer to show, you still need your eventing skills to call it up, setting it and have it running etc etc. This script only allows it to run in menu and not pausing it which the game default engine does.

Edit:

Oh, apparently you are not following what came later in the discussion.

What you are asking for is do-able, but not an easy task for any developer skilled or not, because the game have the engine separated into "Scenes". The one we use most will be Scene_Map where the player moves around and interact with events. Then there's Scene_Menu, Scene_Battle, and Scene_blah blah blah... The game screen can only hold ONE scene at any one time. So to have the menus, items, skills and such to work in Scene_Map, we will need to migrate the methods of how the windows are called from the other scenes into Scene_Map, and probably ended up rewriting all scene classes. And to modify all command handlers in a single class can be super confusing and a hell lot of work.

The problem that comes with that is, with heavy modifications, the likely of you to find a compatible custom scripts become low since most scripts that require scenes will return a 0 hit and bounce an error or simply don't work, because you have everything on scene_map and the custom scripts tries to modify something you are not using any more, thus, you will end up saying those scripts doesn't work.

Plus, you will need a brand new battle system to have the battle work in scene_map and not scene_battle.

And that's probably a full project by its own.

Try look for the action rpg scripts available out there, some might already covers what you want.
 
Last edited by a moderator:

Garrek

Warper
Member
Joined
Sep 10, 2015
Messages
3
Reaction score
0
First Language
german
Primarily Uses
Oh, apparently you are not following what came later in the discussion.
True words, I really did miss the important part, I've been too impatient, I guess :D

Plus, you will need a brand new battle system to have the battle work in scene_map and not scene_battle.

And that's probably a full project by its own.
That's exactly what I'm aiming at, and how I came up with this issue in the first place ;)

Thanks for your reply and for the advice, I think I have to come up with another solution then, or do it the hard way and grind the necessary changes out.
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
or do it the hard way and grind the necessary changes out.If you are trying to grind it up on your own, here's some advice with another approach:

Since Scene_Menu and such do a snapshot of Scene_Map and post it up as their background, you won't be seeing any graphic update while in those scenes. But it's still possible to update the map when they are in without a huge modification i think.

$game_map.update(true) <= if i am not mistaken, this line updates the map, so adding this to def update of any scenes will allow the map to update if the game_map class gets a chance to run.

But even if you did update the map, the scene you are in will not show anything until you return to scene_map. That "still picture" you see in scene backgrounds are just a snapshot before scene change. if you remove that line, all you get is a black background. ;)

And i am not sure if updating the map while in another scene is a good idea or not, because in case of battle/triggers it might (or might not) crash the game when the game tries to call another scene that requires informations from scene_map/game_temp.
 

Garrek

Warper
Member
Joined
Sep 10, 2015
Messages
3
Reaction score
0
First Language
german
Primarily Uses
If you are trying to grind it up on your own, here's some advice with another approach:
Thanks yet again, I'm happy about any input I can get on this.

Several attempts later (also several blackscreens, gamefreezes and sudden shutdowns, but I guess you can also learn from mistakes, so it doesn't feel like a complete waste of time) I realized one thing or another.

1. Scene_MenuBase (or any subclass of it) isn't needed to actually enter a menu since everything necessary for that is part of Scene_Base.

2. Thus I assumed it should be totally simple to open up a menu (using the class Window_Command) while being in Scene_Map (or any subclass of it) and it turns out it is. There we go, we can use a menu while the map is still "active" and the sprites on it keep moving (if we told them to).

3. The big problem with this is, that a menu created by Window_Command in Scene_MenuBase would normally use the command "return_scene" to jump back to the previous scene (which would normally be a jump from Scene_MenuBase or a subclass of it to Scene_Map). But Using this command while being in Scene_Map (also while being in any subclass of Scene_Map, took me some time to figure this out) actually causes a shutdown.

4. So we can't snap out of our scene with the menu on the active map that easily, but we still can choose an option displayed in the menu. Switching between the options causes the character to move also (since both react to the arrowkeys at this point), but this is not a problem for the specific use I want to get out of this, I just wanted to mention it. After we chose the option, the handlermethod actually kicks in and does whatever we want it to do.

5. Since we didn't use the return_scene command we still have to get rid of the commandwindow, but this can be done by using the SceneManager (SceneManager.call(Scene_Map)). This will cause the scene to refresh all windows. It probably can be done in a smarter way than just recreating the whole map, but I didn't have the patience to search for it at this point.

At first glance it seems I got a step closer to the goal, but I'm still not able, to put this to a good use in a script.

If we do it this way, the commandwindow with the options is displayed and serves it's purpose, but whatever part of the script comes after that doesn't kick in. Even if it doesn't look like it, since we managed to get rid of the commandwindow, we are still trapped in the handlermethod. We can't return from here by using "return_scene", and a simple "return" won't do it. Thus, it seems to be impossible to use this as part of a bigger arrangement, or even a simple loop. Of course this still could be done by using an event and "Show Choices" (which actually seems to do what I have been trying since the beginning), but since I'm going to reuse this over and over again it would be an unmanagable amount of work setting up an event for this every single time.

That leads me to another question: Is it possible to make a good use of "Show Choices" in a script?

I found this old thread by Archeia: http://forums.rpgmakerweb.com/index.php?/topic/25759-script-call-collection-for-vxace/.

This indicates, that there is a way of displaying a choice by script (which wouldn't seem any different from a menu, in both cases you have options displayed in front of you, and you choose one), but it's not recommanded to make use of it, since it's complicated.

Does anyone know how to make use of that, and would it actually be a valid way to approach our goal here?
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
I am pretty sure your "shut down" and "black screen" problem is caused by memory leak and bad disposal sequence of bitmaps, windows and viewports.

The freeze indicates a bad loop in your code, there's plenty of windows tutorials out there, both text and videos. Give all those a good reading/watching before you continue. Make sure you know what the handlers and commands does in Window_Base. Oh, before you try the tutorials, press F1 in RMVA and read everything in it about windows.

If you want to return to a previous scene, SceneManager.return should work. And it depends on how you call a scene, (goto, call), return works differently.
 

JadeKrieger

Warper
Member
Joined
Jan 19, 2016
Messages
3
Reaction score
0
First Language
German
Primarily Uses
Hi guys, :thumbsup-left:
I just signed into this Forum and I already have "a" question. ;_;


I have already been looking for a while to solve my problem and this forum and the topic are the closest ive come to solve my problem.


A little about myself


180h rpgmaker expierience (useing events, variables, common events, switches, if else cases, useing already exsisting scripts)
I dont know how to script so i can only use excisting scripts or step by step solutions so i can change it with your help (this does not mean you have to do any of it its just an information about me so you dont waste your time trying to teach me scripting)


First what ive done:


I created a clock with events which displays the clock (slefmade pictures) on the screen. However, every time i open the menu by pressing the ESC button the clock pauses ( the events and common events.stop).


When I exit the Menu (pressing ESC again) the clock continues.


Now My question


My question is if it is possible to let the clock keep running even while i am in the Menu (by pressing ESC) possibly without any scripting.


Sorry if this was already answered but eventhough ive red throug all these comments i couldnt find a definitive answer since my english is bad. I hope you will still help me.


From what ive read and understood it is not possible without using a script? but it is possible to achieve my goal if i use only this command " $game_map.update(true) " if so could you please tell me where i need to insert it.


Did I read correctly that if I press ESC that in the background is only a picture of the game from the moment i pressed ESC. which means i cant just change the script so that it continues even in Menu mode.
Furthermore if I use the command " $game_map.update(true) " in an area where i have monsters they could run into me while im in the Menu screen what would happen in such a case?


I would happily use this " $game_map.update(true) " - Method a scenario like the following two would occour.


The scenarios (I am in the Menu screen checking my equipment and a monster runs into me and activates a battle)

  • First scenario: At first I dont realise that the battle has been triggerd and i keep looking trhough my stuff. After im done i exit the menu and the battle is still waiting for me to select an attack or a skill or defend or ...
  • Second scenario: As soon as the monster activates the battle the menu screen gets automatically closed and i have to do the battle

Both of the above would be fine.
or any other scenarios where the player still has a chance and not just die. (but for now nothing comes to my mind)

  • A bad example which made it not useful to me would be if the battle starts and the while i still can click through my stuff the game takes those keyboard entries and uses them for the battle in the background (which would most certainly end up with the player being dead).......

I would still use it if i could hear the battle music from the fight so i can quit the menu myself and manage the fight. (since its a zombiesurvival game it would add to the atmosphere. (open a bag and if you r not wary enough a zombie gets you from behind ^^) )


Ps can some one tell me how i can make a Wait command global? so that i can start it in one map and it still runs when i go to another map (a second quest from an NPC(ralph) that only is available after a certain time from when the player has done the first quest of the same NPC(ralph))


I also higly appriciate any other solution (preferably without scripting) where i can have my clock be displayed and running in the ESC menu and cope with a fight if it gets triggered while im in the Menu.


I hope you could follow my thoughts because i dont really know if word order or anything is the way its supposed to be


Sorry for the inconveniences and thank you all for your time and effort to try to help me. I very much appreciate it. :thumbsup-left:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Pootscooter wrote on Pharonix's profile.
Hey @Pharonix, just wondering what you're up to lately and if you've had an opportunity to check out the LTBS thread in the past few days...(a couple of us could really use your expertise). Hope you are well and Happy Thanksgiving!
Anyone know the best size image to put in signature?
Well, the local collections agency is hiring... bleh. I'm not rude enough for them to hire me. Even the people they collect FOR don't like dealing with them. >.>
EA: "Kids are buying currency, not using money to gamble. It shouldn't be illegal!"
Me: "So... kids should be allowed into casinos to buy poker chips and not spend them at the blackjack table? Pretty sure, even buying currency used to gamble is illegal for children."
Been hard at work in photoshop working with MOG scripts for main menu & victory result screens, might do all my maps and Npc chatter this week too!

Forum statistics

Threads
105,499
Messages
1,014,205
Members
137,154
Latest member
Kurtkakes
Top