Capture Enemies

Discussion in 'JS Plugin Releases (RMMV)' started by DreamX, Mar 1, 2016.

    Tags:
  1. orcywoo6

    orcywoo6 Villager Member

    Messages:
    11
    Likes Received:
    0
    First Language:
    English
    There's nothing in particular that I have done, I've not set anything that actually does anything with the conflicting script, its just activated.


    With your script I've just set everything up as normal, so I'm unfortunately not sure where the conflict is, sorry.
     
    #41
  2. Goldschuss

    Goldschuss The creator of Lye Bastion Veteran

    Messages:
    179
    Likes Received:
    62
    Location:
    Switzerland
    First Language:
    German
    Hello Dream


    I'm getting a "Cannot read property "name" error".


    Did I forget something?

    Cannot.PNG
     
    #42
  3. DreamX

    DreamX Veteran Veteran

    Messages:
    816
    Likes Received:
    817
    First Language:
    English
    Try the latest version that I uploaded and make sure that the capture_actor_id notetag value is an id of an actor that exists in the database.
     
    #43
  4. Goldschuss

    Goldschuss The creator of Lye Bastion Veteran

    Messages:
    179
    Likes Received:
    62
    Location:
    Switzerland
    First Language:
    German
  5. DreamX

    DreamX Veteran Veteran

    Messages:
    816
    Likes Received:
    817
    First Language:
    English
    1. When does this error occur?


    2. Try to disable all other plugins until you find which one is incompatible. Then let me know which one it is and post the error you get again.
     
    #45
  6. Goldschuss

    Goldschuss The creator of Lye Bastion Veteran

    Messages:
    179
    Likes Received:
    62
    Location:
    Switzerland
    First Language:
    German
    @DreamX Sorry for my late response, I wasn't notified of it.



    Anway, I have 2 kind of error messages, both occur with @Yanfly's CTB Battle system plugin.


    The first error (As seen above) shows, if I hit an enemy with a catch skill.


    Here's the "other" error I mentionend and this error occurs when the battle starts.


    CTB Error.PNG
     
    Last edited by a moderator: May 10, 2016
    #46
  7. DreamX

    DreamX Veteran Veteran

    Messages:
    816
    Likes Received:
    817
    First Language:
    English
    Make sure that my plugin is under Yanfly plugins, as stated in the first post.


    Edit: Nevermind. It seems it still occurs when it is under. I'll fix this problem.


    Edit 2:


    @Goldschuss v1.8 - Compatible with Yanfly CTB.
     
    Last edited by a moderator: May 10, 2016
    #47
    Goldschuss likes this.
  8. Goldschuss

    Goldschuss The creator of Lye Bastion Veteran

    Messages:
    179
    Likes Received:
    62
    Location:
    Switzerland
    First Language:
    German
    Thank you, I'll test it this evening
     
    #48
  9. ditsky

    ditsky Warper Member

    Messages:
    3
    Likes Received:
    0
    Hi Dreamx


    Using your plugin and I can get it to work, however when i capture a monster its as if the actor isnt there?


    They appear in my party but i cant directly give them EXP, or in the case of using the 'level up events' plugin it ignores the level up event.


    If i add the actor to my party manually it works fine. Any ideas?
     
    #49
  10. DreamX

    DreamX Veteran Veteran

    Messages:
    816
    Likes Received:
    817
    First Language:
    English
    This is because the actor you are capturing is technically a copy. I did this to allow for capturing multiple kinds of the same actor. Just adding the original actor from the database almost defeats the purpose because you can already do that via normal event commands. So I must ask about the capture system in your game, can you capture more than one of the same actor? If so, you'll need to use javascript to do things like add xp to them, and I can help you with that. Let me know.
     
    #50
  11. ditsky

    ditsky Warper Member

    Messages:
    3
    Likes Received:
    0


    Ah ok, yeah capturing multiples is kind of key to what im planning. There's 2 issues i've come across, one being that i cant apply XP direct to actor and the other being i cant then apply events to captured actors (example being when captured actor is level X then do Y.
     
    #51
  12. DreamX

    DreamX Veteran Veteran

    Messages:
    816
    Likes Received:
    817
    First Language:
    English
    Here's an example function of how to find all of the party members that have a base actor id (the id of the actor they are copied from):


    searchBaseId = function () {
    // id you're searching for
    var baseId = 7;

    // array of party members that have this base actor id
    var partyMembers = $gameParty.members().filter(function (member) {
    return parseInt(member.baseActorId()) === parseInt(baseId);
    });
    };


    From there you can start doing things like assigning ids to variables.


    Example:


    searchBaseId = function () {
    // id you're searching for
    var baseId = 7;

    // array of party members that have this base actor id
    var partyMembers = $gameParty.members().filter(function (member) {
    return parseInt(member.baseActorId()) === parseInt(baseId);
    });

    // check if we found any actor first
    if (partyMembers[0]) {
    // set the id of the first actor from the array to variable 5
    $gameVariables.setValue(5, partyMembers[0].actorId());
    }

    // check if there is a second actor we found
    if (partyMembers[1]) {
    // set the id of the second actor from the array to variable 6
    $gameVariables.setValue(6, partyMembers[1].actorId());
    }

    };


    You can use this function if you put it into a plugin file and call it with a script call, like


    searchBaseId()


    If you need additional assistance you can ask here or the javascript help section on the forum. If you have the id of the actor in a variable you can use normal event commands with them. Just use that variable.
     
    #52
  13. Goldschuss

    Goldschuss The creator of Lye Bastion Veteran

    Messages:
    179
    Likes Received:
    62
    Location:
    Switzerland
    First Language:
    German
    @DreamX I wanted to request something for this Plugin.


    I want to make it so, that it is possible to "capture" (in my game, it's called "recruitment") the enemy after the battle.


    So basically, you have to defeat them first in order to earn their respect, and then they may join your team after, much like Pokemon mystery dungeon or Tales of Symphonia 2.


    The capture rate can then be increased by using further items or by other factors (such as, how many monsters are already in my party, how strong are they etc...)


    Regards


    Goldschuss
     
    #53
  14. DreamX

    DreamX Veteran Veteran

    Messages:
    816
    Likes Received:
    817
    First Language:
    English
    Are these battles evented or random?
     
    #54
  15. Goldschuss

    Goldschuss The creator of Lye Bastion Veteran

    Messages:
    179
    Likes Received:
    62
    Location:
    Switzerland
    First Language:
    German
    I probably have to use random encounters, due to the lack of walking sprites.


    Why does it matter?
     
    #55
  16. DreamX

    DreamX Veteran Veteran

    Messages:
    816
    Likes Received:
    817
    First Language:
    English
    You could event the capture stuff if it wasn't random battles.


    Let's see, so if I understand you correctly what you want is basically the same thing but you need to defeat the enemies in the normal way, then they have a chance to join after the battle. The chance is done the same way it already is, but with extra factors. Is that correct?
     
    #56
  17. Goldschuss

    Goldschuss The creator of Lye Bastion Veteran

    Messages:
    179
    Likes Received:
    62
    Location:
    Switzerland
    First Language:
    German
    I see, yeah that'd make sense. But with eventing, you couldn't clone actors I guess.


    And yes, you got that right :)
     
    #57
  18. DreamX

    DreamX Veteran Veteran

    Messages:
    816
    Likes Received:
    817
    First Language:
    English
    You actually can clone actors with events. You can use a plugin command provided my plugin.


    Anyway, I'll work on your request.
     
    #58
  19. Goldschuss

    Goldschuss The creator of Lye Bastion Veteran

    Messages:
    179
    Likes Received:
    62
    Location:
    Switzerland
    First Language:
    German
    thank you. Before you start, i'd like to add something optional (not a must, just nice-to-have)


    It would be great if the recruitment process could happen after the battle ends but still inside the battle screen before going back to the map.


    Maybe before or after the victory aftermath.


    Regards
     
    #59
  20. GoodSelf

    GoodSelf Zhu Li! Do the thing! Veteran

    Messages:
    504
    Likes Received:
    897
    Location:
    Orlando
    First Language:
    English
    Primarily Uses:
    RMMV
    Can't wait to try out this system for myself!
    Great work here!


    EDIT 1: Hey, so I'm trying out your Plugin, and it's just great!
    I'm able to capture monsters with ease - you've really out done yourself here!
    I did notice that my captured monsters are Level 1, even though the Actor's initial level that it corresponds with is set at 5.]


    Is there any way to fix this?


    Once again, great plugin DreamX!
     
    Last edited by a moderator: Jul 26, 2016
    #60
    ALTERED STATE ? and DreamX like this.

Share This Page