I would need help to understand the rpg maker MV api for my battle system

● ARCHIVED · READ-ONLY
Started by SeleDreams 6 posts View original ↗
  1. Hello, I'm posting this thread because I have some issues to understand the rpg maker MV api to be able to make the battle system I want

    I'm planning to make a battle system a bit similar to Pokémon where in battle both the enemy and the player are on screen and animated, where the camera behind our character
    (I think the best example of the kind of battle system I have in my head is this [embedded media] )
    and where we can recruit any enemy in our team

    I don't have issues with programming since I'm used to work in C++ and C#, I learned JavaScript and was able to make some plugins like a plugin fixing the resolution issues I had with 1080p

    however, because of how new I am to the rpg maker mv api, I have a lot of difficulties to imagine how to implement my battle system

    changing the UI and where the characters are placed wouldn't be a big deal, but having animated sprites for each character and making it so that the enemies use the same data as the characters would require me to understand properly the api (for instance if a character has a specific class, I want this character as enemy to have the same class, since I even plan in the future to add a peer to peer online mode to allow two players to fight, I'd want the system to really use a database that makes it easy to set the infos o the enemy like the moves the enemy has, its stats etc), unfortunately I didn't see a lot of informations on it, I saw info on modifying menus, making custom scenes etc, but I didn't see anything related to this kind of system that works completely differently from the base one

    Could someone help me to find a way I could implement this ?
  2. I believe a combination of Yanfly's plugins will allow your enemies to have a class and level up.. You can check his plugins to get some idea how he did it..

    You can also opt to make an external database and make your characters and enemies read the "pokemon" data from it, utilizing the notetag system to tell your character/enemy which database entry to take information from.

    Also, depending on how customized it will be, it might be easier for you to write a new battle system from the ground up rather than using the existing battle system as a base.
  3. Engr. Adiktuzmiko said:
    I believe a combination of Yanfly's plugins will allow your enemies to have a class and level up.. You can check his plugins to get some idea how he did it..

    You can also opt to make an external database and make your characters and enemies read the "pokemon" data from it, utilizing the notetag system to tell your character/enemy which database entry to take information from.

    Also, depending on how customized it will be, it might be easier for you to write a new battle system from the ground up rather than using the existing battle system as a base.

    I thought about making a new battle system from scratch, but at this point I thought that it would ruin a bit the whole point to use RPG Maker MV lol

    about making an external database, that's what I thought about, but I feel like it would add more fragmentation to the whole project which would make it harder to maintain

    I got a new idea though, I don't really know if it would be that good, but it would be to start battles using some special plugin commands I made that would add create at runtime enemies based on the id of a character and would set the stats and level to the enemies automatically, and would read the ally or enemy animation from a directory
    i'll still have to see if this system works though
  4. I've started to implement my system, but I have an issue

    var character = $dataActors[Number(args[2]) || 0];
    var level = Number(args[3] || 1);
    var charclass = $dataClasses[character.classId];
    var enemy = new Game_Enemy(enemies.length, 0, 0);
    enemy._hp = charclass.params[0,level];
    enemy._mp = charclass.params[1,level];
    enemy._speed = charclass.params[6,level];
    I can't find any variable in enemy that I can set for the defense, special attack, attack etc
  5. SeleDreams said:
    I can't find any variable in enemy that I can set for the defense, special attack, attack etc

    There are getters (accessors) for def, mat, atk, etc. for all classes that inherit from Game_BattlerBase. For example:
    https://kinoar.github.io/rmmv-doc-web/classes/game_battlerbase.html#atk

    There's also setters (mutators) methods defined on Game_BattlerBase and thus inherited by Game_Enemy, for example:
    https://kinoar.github.io/rmmv-doc-web/classes/game_battlerbase.html#addparam
  6. Aloe Guvner said:
    There are getters (accessors) for def, mat, atk, etc. for all classes that inherit from Game_BattlerBase. For example:
    https://kinoar.github.io/rmmv-doc-web/classes/game_battlerbase.html#atk

    There's also setters (mutators) methods defined on Game_BattlerBase and thus inherited by Game_Enemy, for example:
    https://kinoar.github.io/rmmv-doc-web/classes/game_battlerbase.html#addparam
    but can addparam set existing values ? or does it only work by adding new values ?