customizing formation effects

Hi, everyone, got a couple noob question here. I'm interested in learning how to use scripts to customize the game, but I don't know where to put the scripts or how to write the code. Do all scripts go in Tools>Script Editor's main "folder" or do specific types of scripts have to be put into the relevant subcategory "folder" within Script Editor?

Specifically, I want to code a script that will make the characters in the 3rd and 4th positions 50% less likely to be targeted but also have them do 50% less melee damage (which will require me to code all weapons as melee or ranged). But I don't know what coding commands I need to use to do that. I know RPG Maker VX Ace uses Ruby, but I imagine some things require game-specific code commands to change them. Anyway, any help is greatly appreciated. Thanks!
There aren't any folders for RPG Maker VX Ace scripts. Everything goes in the script editor. It doesn't matter what order you have them in, but if you want to overwrite a method or alias them in a particular order it will sometimes be relevant.
But I don't know what coding commands I need to use to do that.
You can follow the links in my signature block to read some tutorials for beginners.
Welcome, good to have you join the team. Understanding the editor is the first step then you can add in scripts to improve the game.

I would say the scripts do matter where you put them. Especially if you use a lot.
Scripts added in *should go below the section called materials and above the part called main.
You can place the scripts anywhere but you will likely run into issues as most scripts are built with the intent of using the previous code (the default code). If you place a script before one of the default scripts, then you could have the code you need overwritten or get errors.

You could look for a row formation script, there are a few that have been written which may work for your intended purposes. Or you could write your own.
Thanks for the quick reply! There's a lot of material in the links that you provided, so I'll work my way through it over the coming week.

Just so I know, where should I look for formation-related scripts? Does this site have some? I tried googling "rpg maker vx ace formation scripts" and the few truly relevant results had scripts that didn't run properly.
Moved to: RGSS3 Script Requests

Check out the Script Master List (which is pinned at the top of the forum) to see if you can find anything suitable there.
Check out the Script Master List (which is pinned at the top of the forum) to see if you can find anything suitable there.
There was only one script relating to formations, and unfortunately it had nothing to do with changing a character's damage output or likelihood of being targeted based on what formation position they're in. I could probably write my own script if I could just figure out what code I need to query what formation position (i.e., 1, 2, 3, or 4) a character is in and what code the game uses for a given character's damage output (so I can multiply it by the appropriate modifier).

I suspect that $game_party.positions may answer the first question, but I guess I'll have to experiment with it and find out.
There was only one script relating to formations
That script list in not all inclusive.
Which script was on the list?
Vlue Formations
Dekita row formation
Hime free formation
Mt trivel simple battle rows <- changes damage
crystal engine rows
That script list in not all inclusive.
Which script was on the list?
Vlue Formations
Dekita row formation
Hime free formation
Mt trivel simple battle rows <- changes damage
crystal engine rows
The only one I saw was Free Formation by Hime Works.

By the way, I figured out how to use an event to increase the likelihood of someone being targeted. There is an in-game variable called TRG that is easy to change. However, I still haven't figured out how to get the game to classify weapons as melee vs missile and change their damage output based on that (depending on which row, front or back, they user is in). So what I'm doing for the moment is basing all melee weapons on ATK and all missile weapons on AGI and nerfing ATK for back row characters while nerfing AGI for front row characters. It isn't exactly what I intended, but it's fairly close.

Original thread: https://forums.rpgmakerweb.com/threads/customizing-formation-effects.134750/