Help with centering text on-demand

I'm working on the credits of my game as I go, and would like that particular scrolling text to be centered, but can't figure out an easy way to make it happen.

I found one formatting script in the script list (modern algebra's ATS: Formatting) that supports changing text alignment, but the script produces an error, even when added to a fresh project

I'd get support for it at the forum where it's posted, but it doesn't allow new registrations, so not sure how to get author support.

My knowledge of the RGSS3 scripting language is overly basic, and any help would be appreciated.

Current scripts installed:
Yanfly's Ace Core Engine
Yanfly's Ace Battle Engine
Modified BattleStatus (Modifies the battlestatus from YEA Battle Engine, so enemies are still selectable via their name in the status window)
Yanfly's Visual Battlers
Yanfly's System Options
Lone Wolf's Gamepad Extender
Zeus81's Fullscreen++
Heal on Lvl-up (tiny script added by me to recover HP/MP on level up)
RK5's Custom Scrolling Text Speed
Where did you get the script from? Unless you didn't copy it properly or it is corrupted, then there should be no problems.
Maybe you should do credits in a video editor? That way you can make some cool efects, and you can sync the music with the credits, cuz if you make the credits in game, and people minimize the window the music will keep playing but the credits won't move (as far as I know).
@Roninator2 In the master script list for VXAce, there's a link for "Advanced Text System Series" That link led to another list, one of which was ATS Formatting HERE

@Mattsuharu I did think about this, but my video editing skills leave MUCH to be desired, and I'm sure I'd find a way to screw it up.
the script produces an error, even when added to a fresh project
So tell us the error? I asked about it being a bad copy because it should work fine in a blank project. Which leads me to believe you did something wrong.
Where is the script placed in the project? At the end of all the ones you posted?
The error is in the screenshot shown below. It was taken on a fresh project, and is the same on my working project. In my working project, it is placed below all other custom scripts.

The only thing changed in either case is changing the two variables in the "editable area" from true to false, since I only need the text codes mentioned for alignment.

Screenshot (41).png
draw_text(rect, string, 1)

where rect is the target rectangle, string is your line, and 1 sets it to center.
set the rectangle to the whole screen, and it should center itself.

if you want to go for this style:
Code:
         Cast
Character    Name_Lastname
Character    Name_Lastname
...

that's a bit more complex, but it can be done.
My knowledge of scripting for this engine is next to none. the one script I did was just a tiny override. I've really no idea what to do with what you provided, for centering scrolling text.

How would I target the whole screen? (what's the value for that variable?)
Is there a way to make this apply to the entire scrolling text, or would that be for each line?
I'd like to make it into something like a short command code, if possible.
that's the instruction to center a line.
if you put that 1 at the end, the text will show up centered to whatever boundary you define... usually the whole screen.

if you don't know scripting, you're probably better off with a purpose-built plugin, but anything too complex would be overkill.
and judging by the size of that script, this seems to be the case.

I'd be willing to send you a custom plugin via PM, under oath to not tamper with it or release it for public use.
it's the one I made for myself, it works, it's lightweight, and requires little to no maintenance, but it's not fool-proof, and does little more than just show text.
it's not something I intended to release to the public.
The error is in the screenshot shown below. It was taken on a fresh project, and is the same on my working project. In my working project, it is placed below all other custom scripts.
Line 191 in the script is a blank space. Send me a PM with the code you have.
1669477042439.png
Thanks. This problem is resolved. Apparently an addon in my browser altered/corrupted the script on the page i copied it from.
Curious to know what the addon was, in case it happens to someone else.
Only two things I can think of are "AdBlocker Ultimate" or "Dark Reader" in Firefox. I can't tell you for sure at this point.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-centering-text-on-demand.152877/