AI for your party in ABS

● ARCHIVED · READ-ONLY
Started by Indsh 18 posts View original ↗
  1. How would you make something like "Kingdom Hearts" style party set and cooperation?
  2. can you describe in a few sentences what you want?


    A lot of people here won't bother with watching videos to learn what you're writing about...
  3. To be fair it's summed up in the first line. Kingdom Hearts style coop......does anyone have any ideas or has anyone made any examples?


    I feel like I'm the only person attempting this sort of thing at the moment so no response is fine but I'm just putting it out there for those who may be working on their own aswell!
  4. No, your first line says "something like <obscure unknown game XY>". You cannot expect people to have played the same games you have, so you have to describe the mechanic, not compare it to something the reader doesn't know - I never played a single of those games.


    Additionally, you should tell us which ABS script or Plugin you're using, because such a AI has to be made specifically for the ABS (which is NOT the default for any maker)
  5. I'm not using anyone else script or plugin to make my ABS...But I will add I'm using RPG Maker MV


    And on that note you can just take the game away.......if anyone as any ideas or any examples of  "AI for party cooperation in an Action Battle System" 
  6. There currently is no finished action battle plugin for MV that I know off - there are two in development, but as far as I know they're not yet stable and finished.


    And since the AI needs to give commands to followers that are compatible with the commands of the ABS, you can't really program it without an ABS.


    That said, it'll probably need a parallel process checking the situation to decide which commands to give, and that is not easy to write - and it needs specifications on the limits of the skills as well. For example your healing - does the healing skill work no matter where the follower and the target are, does the follower need to be adjacent to the target, does it have to be within a certain distance or what?


    The most basic AI would be checking the different HP values with control variable and conditional branches to decide to cast a healing spell, but that would only work if the skill works independent of map position.
  7. I making my own ABS so in that since there is freedom when it comes to the individual parts.


    So with the healing it is currently based on a set distance, (shown in the vid) when you set the healer "not" to follow you, if you go in range but do not need healing she will say "Come back in this range when you need healing" if she is folowing you, the follow range is the range of the spell but if she falls behind she will have to catch up to cast...she could easily learn stronger spells that increase range ending with one strong enough to cast anywhere. In terms of HP value I can set it to whatever and plan on letting the player set it to a degree as well...I currently think it will be more fun is its vague (high, med, low) but being able to set it to the digit is obviously more work but can be done with relative ease so may give the ABS more flare.


    I'm pretty confident with the healing as it relates to the follower and the player, any thought on event on event interaction as it relates to part Ai?
  8. To explain to Andar who (somehow) seems to never had heard of Kingdom Hearts...


    In Kingdom Hearts you usually have up to two AI partners. They usually are typical followers, but during a battle they can walk around in the battlefield, attacking and using skills. Goofy uses physical skills, Donald uses magic skills and (supposedly) healing skills when you are weak. You can also give them healing items that they (supposedly) use when you are in need.


    (But that is not how it works, is it, you item-wasting, heal when not needed and not when needed... I'm calm, I'm calm)


    They have their own life bar, but when it empties they instead of dying stay stunned for some time and come back with... full HP I think? Half? Not sure right now.


    So yeah, can't think of much to say besides "this is an ABS. This is an AI for the ABS". The differentials are mostly the ABS itself, that they can use items (but wise people won't give them to them) and that they respawn after a bit.


    Is there anything else in this system? Because I can't see videos right now, so saying "it is in the video" helps nothing.
  9. @Waterguy lol, you do make me remember even the AAA's didn't have it perfect!


    There is quite a'lot in the system but this thread is specifically about the party, I have the healing down but the 2nd player who attacks/defends(Goofy) is just really dumb to say the least, I'm open to ideas of different Ai mechanics which is why I put this topic in this part of the forum, but what would really help me personally is if someone had any ideas on event on event interaction.
  10. Waterguy said:
    To explain to Andar who (somehow) seems to never had heard of Kingdom Hearts...



    To be fair, I think @Andar was just trying to show that one person's "classic, everyone-must-play" is another person's "the heck is that?".


    Case in point: I've never touched a Kingdom Hearts game because I never had a Playstation. I've heard of it and know it's about an anime character that hangs out with Disney characters...and for some reason Final Fantasy crosses in(???)...but that's about it. 


    @Indsh


    If you are making your own ABS system, especially if MV does not already have a stable, non-Alpha one, you are going to need to give us some details to know how you plan for combat to be handled. A full Action Battle System should have events for the Player, Enemies, and I'm guessing the Allies are also separate events. So it sounds like all you need is for the Ally events to move with the Player, check the Player's health and perform an action if it's below a certain threshold, and possibly recognize nearby Enemy events to perform actions on them as well.


    I would imagine that you have a central system to handle Player and Enemy health and a system to handle skills the Player uses. Going from there, I can estimate that what you are asking us to help design is:


    1. A way for Ally events to move on the map


    2. A way for Ally events to be aware of the Player's current health


    3. A way for Ally events to be aware of nearby Enemy events


    4. A way for Ally events to use skills


    5. A way for skills cast by Allies to correctly target the Player and Enemy events


    I know we don't usually handle actual implementation in the Game Mechanics Design forum, but this seems kind of interesting so I'll throw my $0.02 in.


    1. I don't have MV so I'm not sure how different the options are from VX Ace, but if you have an event on the field there should be an option to have its move cycle be to follow the player. If you keep track of both the player's Map X and Map Y coordinates and the event's Map X and Map Y coordinates as variables set equal to their current X/Y coordinates in a parallel process event, then you can have 1 page where the Ally's position is within a certain range relative to the Player and switch to another page when they are farther away. The page for close up could have the event set to follow the Player at a speed slower than the Player. The page for farther away can be set to have the event stand still, then switch back if the Player goes back for them.


    2. I'm pretty sure that the Player's health needs to be tracked globally by an kind of ABS so you should just be able to call on that variable using Conditional Statements. So if the Ally is on their "close" page then if the Player's health falls below 25% you should be able to force the Ally to instantly use a skill. I think skills can be used on the map at any time for cut-scene purposes - all you really need is to player an animation file and then manually increase the Player's current health by however much you want through the event. If the Ally is on their "far" page then they won't have a Conditional Statement on that page and ignore the Player's health, or you can do something like pop up a text box telling to Player to run to them for healing.


    3. I'm also pretty sure that any ABS will be able to track the health of each instanced Enemy, so using that you should be able to call that info through the Ally event if they need to interact with Enemies. Not sure how many Enemies you want on-screen at once, but each Enemy event should also have its Map X and Map Y stored in global variables so you can call skill animations over their location. 


    4. I'm fairly sure you can call skills on the map by default, so as long as you can track where events are on the map you should be fine here. It'll be a lot easier if the Ally events are just doing healing and damage, but I think you might be able to manipulate stats through events if you need buffs/debuffs, and I think you can add States through Common Events.


    5. Targeting the Player should be easy, targeting Enemies will be tougher. It's annoying to do, but let's say each map that has combat has 2 Ally events. They start out invisible and out of the way, and a parallel process event can check if the Player has any party members (or just switches representing them) and enable 1 or both Ally events as needed, changing the sprite to whoever he brought along. Maybe create pages for each possible Ally if needed. These can be copy-pasted onto each map needed so as long as the Player is on a combat-enabled map there are Ally events to act as his backup and the basic behavior is taken care of. The Enemies are the tough part, but if each Enemy event is given a name then the Ally event on that particular map should be able to act on that targeted Enemy event as needed. As long as the Enemy events have their Map X and Map Y coordinates tracked then the Ally events should be able to identify when they get too close and use their event's name to target them. Obviously this is a ton on work depending on how long the game is, but luckily a lot of it should be able to be copy-pasted and then just make sure the right event names are being called/targeted.


    EDIT: If you want your heal bots to use items you can do that too. Just enable dialogue with the Player that lets them give the Ally a potion, then increment a "Has Potion" variable by 1. On the "close" page, have a Conditional Statement that if the Player falls below X% health and "Has Potion" is > 0 then heal X health on the Player and decrease "Has Potion" by 1. This lets you limit healing skills with a fake inventory for your Allies. The same thing can be used to set timers to give Ally skills a cooldown time to limit healing or attack spam.


    NOTE: I've never made an ABS so you may have useful features you're scripting that work better than the default eventing system. But if all you need is basic behaviors then the default eventing system may be all you need and can save you tons of time on scripting. 


    Hopefully this can help you at least get started.
  11. Firstly @Basileus thanks for your in-depth thoughts, this was the kind of conversation I was trying to inspire for those who are interested.


    Personally I have 1,2,4 and 5 covered (thats were the videos come in) but I am sure that as provoked some other people minds if they had not thought about it before.


    But 3 is really where I'm trying to make my upgrades. Annoyingly i'm trying to make it so each enemy doesn't have their own X and Y due to numbers but that may be where I have to go, if thats the case I will keep it for my next game and keep my "stupid" AI on that front as I am really happy with the healing side so will move forward on that.


    As Iv said what I'm really interested in is how events can be aware of events, can you think of any other ways this may work?
  12. @Indsh


    Good to know I was on the right track~


    I was thinking that 3 might be where scripting comes into play. I've seen some good scripts that can mark events by certain using specific names and apply traits to everything with the same name on the map or events with the same pattern of symbols within the name.


    I think there was a script called Edison Lighting for VX Ace that could apply lighting effects to any event by making the name something like #Fire, #Torch, etc. and set different rules for each tag. If you can find it you could probably just read through the script and piece together how to apply it to what you want to do.
  13. Well, as you can see through the rest of the text I wasn't 100% serious either... :p


    But anyways, if the only problem seems to be 3, I think you could use something combining an event distance sensor and a smartpath to find the closer enemy event and get the event near it to attack it.
  14. And in those last 2 comments you have hit what I was looking for @Waterguy I can't currently find and "event on event" distance sensor but that's what I want to do exactly!


    And @Basileus I was hoping something like that exists but just like the answer shows it was hidden under another keyword (im typing "event on event" etc and its under "lighting"), I thought it may revolve around a comment but names will work just fine. I think there is an MV version of that plugin now to.


    I shall return victorious thank you (if anyone finds that event on event sensor your my new deity of worship!)
  15. I found this event distance sensor, shouldn't be much work to adapt it to checking these events with an enemy tag since you are making an ABS.
  16. @Waterguy this kind sir is one of the "Event Player" sensors (that I am utilising)


    Now I'm looking for an "Event Event" sensor. So you could say "when event A is X distance from event bearing notetag "enemey" do this"


    Just like this





    (go down to proximity events) claims to do but does not work!
  17. Yes, but since you are already making your own plugins for your ABS, and is going to use a tag system for the enemy events, it should be easy to adapt to check a tagged event in the area instead of a player character. I mean, in the proximity event you linked yourself the difference between if using event_id and player is


    if(secondId) {
    x2 = $gameMap._events[second_id].x;
    y2 = $gameMap._events[second_id].y;
    } else {
    x2 = $gamePlayer.x;
    y2 = $gamePlayer.y;
    }


    So you check if any tagged event are in the range of the character, then check the closer one and use a smartpath plugin (Shaz made one, I remember, there may be more) to make it get near the tagged event then attack.
  18. In that last message is some assumptions on things I haven't actually said and at the same time I also think the answer lies in there also.


    So I'm going to dwell on that for a bit and hope emerge being able to say I solved the problem with both of your help. Thank you!