Turn counter in battle. (RPG Maker VX Ace)

I have been searching for a script that can help display a window that says
Turn: x
Where x is the number of turns processed during battle, I made some bosses to have scripted skills used on specific turn but without a turn counter display, players will encounter difficult time to track whenever the boss will use the skills.
Well, first of all I'd like to say that such a script is not very difficult. Anyway you could do something like that using events and script calls too. Another way of doing it without using scripts is to display a message every turn to tell the player which turn it is.

How to do it is up to you. Based on the few informations you gave us I cannot really help you more than this. Once you decide HOW you want it to be displayed, how long it has to stay there and other details - they look like minor things but they are important - we can explain how to do it.
So it's like this.
During the battle, I want to know how many turns the battle processed already so I know what to expect from the bosses.
And it should be displayed for the whole battle, keep counting and counting the turn processed during the battle.

The turn counter should be closed whenever there is an event during battle or the battle is over.
If you want it to stay there then a message is not the right choice. You should create a window and write the current turn there.

That text should be refreshed at the end of each turn and you should get rid of the window once the battle ends.

Is this what you want? If this is the case you can probably do it without using a script.

It is a different story if you want that turn counter to appear in every battle.
Yes, how can I do that?
Oh and I want the turn counter to appear every battle
Well, if you want it for every battle I'd say a script is much better. It can be either Yanfly's script to copy 1st troop event in every other troop or it can be a script that creates that window for every battle.

I have made a tutorial that explains how to create popup windows for doors, it can apply to your situation as well. The main difference would be having your window displayed in a troop event instead of a normal event.

Remember that you also need a page in your troop event to refresh that written text every turn (as well as a variable to act as turn counter). Then you need a parallel process event to dispose your window when going back to your game map. If the switch used to tell the game that your window is there is turned on then your event activates and gets rid of that window. Plain and simple.

The code to get rid of your window is:
Code:
anything_you_used_to_store_your_window.dispose
Change "anything_you_used_to_store_your_window" to the variable you used for your window.

Do not forget that parallel process or your window will stay there for a very long time (forever).

If you want to do it with a script then it is a different story and it depends a lot on how you want to handle every little detail.
Turn Window for Battle script by prico

Nice to know that there's a tutorial that covers about creating popup window without a script. Thank you for sharing, Heirukichi.

Original thread: https://forums.rpgmakerweb.com/threads/turn-counter-in-battle-rpg-maker-vx-ace.96505/