Hi, I've been trying to make an NPC ally that can attack enemies alongside the main player in my game. So far no luck, is there a way to make this work? I created a fight scene where I can battle a clone of the main actor and everything works fine attacks, skills, weapons etc. but can you turn NPC into an ally that attacks enemies alongside the main Actor?
Moghunter Chrono ABS Engine - NPC that attacks enemies
Javascript/Plugin SupportI've moved this thread to Plugin Support. Thank you.
I don't believe moghunter's Chrono ABS for MV had a "teams" functionality where you could create battlers that fought enemies as well. (assuming MV)
At least, I didn't see anything in the code for that functionality when I was rooting through it trying to understand how it worked while I was building JABS.
At least, I didn't see anything in the code for that functionality when I was rooting through it trying to understand how it worked while I was building JABS.
Thanks for reply, seems as though you should be able to use the same script commands the actor uses to attack events but instead use the same command script to make events damage other events?
Hmm, you're not wrong with that. I believe he has "traps" or some such thing in his demo that demonstrate that (events shooting fireballs or something through script calls in the move route).
You may be able to make that work with some clever move route manipulation and/or other plugins that let you direct events to move towards other events.
My apologies, I thought you meant like, full-fledged AI battlers or something that acted like a city guard protecting a specific group of events from random monsters that appear type of thing (but maybe even that is possible if you're crafty enough with eventing). The only reason I thought about "teams" is because that is what I have on my agenda to build into JABS 😅.
Thanks again. Yes thats what i'm trying to do, if I can just get them to damage each other it will work.
I'll play around with it some more to see! BTW Your JABS systems sounds very interesting!! 🙂
I'll play around with it some more to see! BTW Your JABS systems sounds very interesting!! 🙂
Hey, how is it going? Im interested in the same thing 🙂
I believe you can just put
into the bullet's moveroute, and it will now belong to the player
Code:
this._tool.user=$gamePlayer
Thanks Restart it works!!!! 🙂The Ally NPC event can damage enemy events! 1 more thing; Can Ally NPC receive damage from the enemy Event? I don't really need it to take away health from the ally, just the illusion that it's receiving damage.
Sorry, where should i write this? In event's route? Or what Bullet means?😀
Hi, Ryuka! I placed it into the tool maps move route event and it worked. It may be a way to place somewhere else like character NPC but couldn't get it working yet.
Mog puts all the 'tools' onto their own secret hidden 'tool map', and whenever someone uses a skill they get copied onto the current map. For example, there's an original fireball tool on the tool map, and all fireballs created in the game are copies of it. If you change that original fireball (making it faster, or changing the direction it moves, or changing the sprite), all fireballs in the game will change as well.
When you put
Code:
this._tool.user=$gamePlayer
The player's own bullets damage enemies and not harm the player. I believe it will also use the player's stats for damage calculations instead of whatever fired it.
Restart, thanks for the answer.( I only started working with Abs today ) I think i start to understand how this system works, but as i know i must add a skill or item ID. So now i know how to add skills, items, weapons into this mode. But how should i add which nps i want to fight on my side with this code? Could you show me an example please? Need to write this in "comment" also? ( Im really sorry im new in it) 🙂
(This is my tool map) Need to make a separate event as moveroute?
Basically you add that code to the tool event. Since it now always belongs to the player (regardless of who shot it), make sure it's an attack only used by 'friendly' NPCs.
IIRC making the NPCs act 'friendly' is going to be fairly difficult without modding chrono engine.
If you don't do anything, they'll be impossible to hurt by enemies and take friendly fire from the player.
You can use the
note tag to make NPCs react to getting hit by specific attacks (have them invoke a self-damage skill when they collide with enemy bullets).
I believe putting
into the NPC's move route will make it impossible to damage conventionally. Combined with the note tag to run custom scripts when hit by a specific tool, and you can make the npcs behave mostly like they're actually on the player's side. (Have not tested that).
As for making a friendly AI, that's really something you have to do yourself depending on how you set up the battlefield.
IIRC making the NPCs act 'friendly' is going to be fairly difficult without modding chrono engine.
If you don't do anything, they'll be impossible to hurt by enemies and take friendly fire from the player.
You can use the
Code:
collision_id : attackNumber
I believe putting
Code:
this.collision(false)
As for making a friendly AI, that's really something you have to do yourself depending on how you set up the battlefield.
Thanks restart for your help, I'm still working with the code to make sure I'm doing it correctly over the weekend. I'll update if successful or not! lol FYI: I'm using Galv's Move Route Extras
To get Ally NPC's to track enemy Events so far so good just missing the return damage.
i kinda get it using collision id for the enemy to attack friendly but its not working for some reason. I may be doing something wrong. which code do i use after attacknumber and this.collision?
the 'collision_id: attackNumber' is the same thing used to cut down grass in mog's tutorial. It makes the event page run in response to getting hit by a particular tool.
My suggestion was to do the same thing with your friendly NPCs. Put in the tool id you're using for the enemies, and either just kill the friendlies in one hit (like cutting grass), or have the triggered event call inflict damage on the NPC (so instead of instantly dying, the event getting called is one that damages them for 5 hp or whatever).
You could also have them do this.act() on a tool skill that damages the user (maybe temporarily flicker the no-collision off? Not sure if necessary offhand).
My suggestion was to do the same thing with your friendly NPCs. Put in the tool id you're using for the enemies, and either just kill the friendlies in one hit (like cutting grass), or have the triggered event call inflict damage on the NPC (so instead of instantly dying, the event getting called is one that damages them for 5 hp or whatever).
You could also have them do this.act() on a tool skill that damages the user (maybe temporarily flicker the no-collision off? Not sure if necessary offhand).
Original thread: https://forums.rpgmakerweb.com/threads/moghunter-chrono-abs-engine-npc-that-attacks-enemies.134503/