Balance RPG Maker battles and edit the database with AI
Balancing an RPG means changing numbers in the database and playing the fight again, many times. RPGM MCP Pro does both: the database tools read and write every entry type, and the test play tools let the AI start the battle in your real game, with your battle plugins, and report what happened.
Why let the AI fight
A spreadsheet cannot account for VisuStella action sequences, Yanfly damage formulas or your own plugins. The real engine does. The AI reads the live battle state, picks actions, runs the turns, and tells you how many turns it took, how much HP was left and which skills mattered. Then it changes the numbers and fights again.
1. Read the data
List the enemies and troops. Show db_get for enemy 12 (the boss) with
fields name, params, actions, traits, and the troop that uses it.
db_list browses a type, db_get returns one entry (or chosen fields), and db_search searches names, notes and descriptions across all types. Types: actors, classes, skills, items, weapons, armors, enemies, troops, states, common_events, tilesets, animations and system.
2. Edit entries
db_set merges top-level fields into an entry; nested values such as params, traits, effects and damage are passed whole. db_create adds an entry with the same defaults the editor uses, or clones one with copyFrom.
Create a skill "Frost Lance" by cloning skill 52, change the element to
Ice, damage formula "a.mat * 3 - b.mdf * 1.5", MP cost 14, and give it
to the Mage class at level 18.
The AI checks db_reference for trait and effect codes, the params order and type IDs, so the data it writes matches what the editor would write.
3. Batch edits
db_batch applies one operation to a list of IDs, an ID range or every entry:
| Operation | Example |
|---|---|
scale_param | Enemies 20–35: max HP x1.3 (paramIndex 0, factor 1.3), or any numeric field such as gold or exp |
set_field | Every potion-type item: price 60 |
add_trait / remove_trait | All undead enemies: weak to Holy |
add_effect | Antidote items: remove Poison |
find_replace_note | Rename a notetag across all skills |
The second dungeon is too easy. Scale HP and ATK of enemies 20-35 by 1.25,
leave the boss (enemy 36) alone, and show me a before/after table.
4. Notetags and plugins
Plugins like VisuStella read settings from notes. plugin_info parses a plugin's @param, @command and @arg blocks (Japanese locale too) together with your current settings from plugins.js, and plugin_search searches the help text of all plugins. So the AI can look up the notetag you need instead of guessing:
Which notetag does VisuMZ_1_BattleCore use for a custom action sequence?
Add it to skill 140 and show me the note field.
5. Fight the battle in the real game
With test play running (see setup):
- Prepare the party:
game_set_level,game_add_party_member,game_add_item,game_heal_party, orsave_loada save from that point of the game. game_encounter_battlewith the troop ID.- Each turn:
game_get_battle_state(party HP/MP/TP, enemy HP, states, usable skills with costs), decide, thengame_evalto set the actions and start the turn. game_screenshotat any point;game_speedto fast-forward animations.
Load save slot 3, then fight troop 18 three times: once playing well, once
using only basic attacks, once with the healer at half MP. Report turns,
HP left and the most useful skills for each run.
The English demo video shows this loop: the AI reads the Treant's stats, chooses Strong Attack, Tiger Dance, Fire III and Saint II, and wins in three turns.
6. Tune and repeat
Ask for a target, not just "make it harder": "the boss should take 6–8 turns for a level 20 party, and the healer should need to heal at least twice". The AI adjusts with db_set or db_batch, reloads the game (MV: testplay_restart; MZ: restart test play from the editor), and fights again. journal_diff shows exactly which numbers changed, and journal_undo reverts a step that went too far.
Reference: params and codes
| paramIndex | Param |
|---|---|
| 0 / 1 | Max HP / Max MP |
| 2 / 3 | Attack / Defense |
| 4 / 5 | M.Attack / M.Defense |
| 6 / 7 | Agility / Luck |
Trait codes, effect codes, element and type IDs, damage types and scopes: ask for db_reference with a topic (traits, effects, type_ids, damage, scope_occasion or all).
Get RPGM MCP Pro
$5 once on itch.io, free updates.