Luyren's AI and Combat Pack

Luyren

  • *
  • Posts: 2337
I'm hard at work on a new resource back, focused on combat and combat AI. It allows you to create your own attacks, as well as customize the actions the enemies in your game will take. It's compatible with all my previous resource packs, and work for both platformer and top-down games.

As with the Cutscene Resource Pack, I'll be posting weekly on this thread talking about all the features, leading up to the release whenever that may be. For more constant updates, you can follow me on twitter or join Stencyl's Discord server.

Basic Combat
This pack will come in two version:
  • Basic Combat: the free version, comes with Health, Energy, basic attack behaviors, aiming, 8 Way Movement, AI patrol and raycasting.
  • Full Version: the paid version comes with all that, plus the Command List behavior, with which you customize conditions, input and events for special attcks, the Action Manager behavior to manage an hierarchy of actions your AI actors can take, as well as several other AI behaviors.

The basic combat works by creating a damager, an actor that will inflict the damage, for both ranged and melee attacks. You also set an Identifier Friend or Foe for your actors, or IFF. Only actors with different IFFs can damage each other. This is used from simple player versus enemies to different factions battling each other. The attacks are compatible with my RPG Elements pack, so the inflicted damage can be based off of your actor's status and combat statistics.

Attacks also have priority numbers. The gist of it is that if you perform a sequence of attacks with increasing priority number, you can bypass the invincibility period after enemies are damaged.

You can configure the position of the damager based on the actor's facing and the direction the actor is aiming at. It also has support for mouse control, and for ranged attacks, you can fire projectiles towards the mouse.

For Health, you have several display options, you can customize invincibility effect and stun states upon taking damage and a sequence of events when an actor is defeated. You also have full control over damage calculation and can even create your own damage formulas. Energy works in a similar way, and you can have multiple energy types, each with their own current and maximum values and display settings. Both can also be tied to RPG Elements.

The 8 Way Movement behavior can be used both for basic movement in top-down games, for AI-controlled actors to set their animation depending on the direction they are moving, and for platformer actors to fly, with the option to set requirements and a time limit or energy cost. It also has an option to limit to 4 way movement.

And as with all my resources, everything is highly customizable: features that you don't have use for, such as aiming, damage invincibility or multiple energy types,can be ignored or configured out.


« Last Edit: July 28, 2020, 08:04:50 pm by Luyren »
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter


Luyren

  • *
  • Posts: 2337
Basic Combat #2 and Behaviors List
I've posted this on my twitter and completely forgot about it last week, so here it is: the behavior list for both the free Basic Combat Pack and the full AI and Combat Pack.


Also mentioned in the previous post about attack priority, so here it is in action:

One thing I added recently is animated icons option for the health and energy displays.

Now for something new: while the Basic Combat version doesn't include the AI features, it has a patrol AI behavior, which can be used in both top-down and platforming games. You can randomize the patrol, determine what happens when it reaches a tile ledge or a wall, and it works with semi-solid platforms.

Right now I'm working on more display options for health, to emulate the styles of Super Metroid (SNES) and Alundra (PSX). I'm also working on more mouse options for the basic attacks and skills.

Next week I'll go more in-depth about the full version's exclusive features, starting with the behavior that lets you fully customize attacks and skills.

« Last Edit: August 05, 2020, 12:38:30 pm by Luyren »
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

tabletop

  • Posts: 365
Im really excited for this. As a girl I want to make a game.

tabletop

  • Posts: 365
any updates on the release date?

Luyren

  • *
  • Posts: 2337
any updates on the release date?
Should be released in a couple of weeks, depending on the weather.

Command List
While basic attacks are simple and common enough that they deserve their own behavior, there's no way I can predict all the kinds of attacks I or anyone might need in their games. So I made a behavior that lets you script as many attacks as you want, each with their own conditions and key input sequences. Held keys are also possible to use as inputs.

This is the Command List behavior. You create a script for your attacks using the available commands, and configure them in this attribute. The priority, conditions and input sequence is configured in the Input list attribute. Priority is used in case several attacks have conflicting input or conditions. The actual attack script is written in the Action Events map.

You have special events for collision and your attacks hitting enemies. You can also setup combos: when activated, the behavior will read new action inputs, so you can create a sequence of attacks. In this gif for example, the Fire Breath attack has a combo if you keep the button held down, so you can keep the attack going for as long as you hold it. The Explosion has a combo wherein if you press the jump key, the actor performs a super jump.

And as you can see, the same behavior is used for AI controlled actors. You can use the provided custom block to call specific actions configured in this behavior.

Something I started working on this week was adapting all the behaviors for mouse controls, specifically for top-down games where the player constantly faces the mouse. Top-down action games are already supported, and I'm working on creating sample content for that, so the mouse-facing options were a bit of extra work on top of that, but definitely worth it. I'm planning on working on an quick equipment swap behavior, which should pair pretty well with this. The mouse control stuff will be in the free version as well.

Next week I'll showcase a bit more of the AI behaviors.

« Last Edit: August 12, 2020, 07:05:38 pm by Luyren »
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

Luyren

  • *
  • Posts: 2337
Combat AI #1
There are a few behaviors for basic movement towards the enemy, distance to attack and even getting suspicious of a point on the scene before detecting an enemy. You can also set your actors to have a "noise radius" based on its frame of animation, to simulate the noise its making and the enemies hearing it. Damagers and bullets can also make noise, so you could use it to "distract" enemies.


The Approach behavior determines how your actors approach its enemies. You can set a minimum and maximum distance, you can include variation within that distance so your actors can play "footsies" like in a fighting game. It stores several approach settings, and they can be switching automatically based on the equipment and the enemy faced, or through a custom block.

The Attack behavior sets up the frequency of attacks when an enemy is found. You can determine the attack type through a trigger or as an action from the Command List behavior I posted about last week, you can automatically change the attack type based on the equipment and enemy faced, and you can have the actor attack regardless of enemy presence.

The Get Enemy Actor behavior holds the enemy detection range and the sequence of events when an enemy is found, lost or when something is considered suspicious, all fully customizeable through a script of events. The actor can create and position its own detection range based on its facing, or use a fixed region from the scene.

"Suspicion" is determined by either range and by the "noise" the actor is making, which is determined by the "Noise Range" behavior. A noise is only considered suspicious if the IFFs are different. And you can also see that raycasting is used, so the line of sight can be blocked by tiles.

By combining and customizing these and other behaviors, you have a wide range of actions and movement your AI controlled actors can take. But most importantly, there is one behavior that fully lets you customize a script of AI actions, with conditions, sequences, priorities and several other settings. You can see a small taste of it in the gif above, with the spear soldier. Next week I'll go more in detail about this AI behavior.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

tabletop

  • Posts: 365
Will you have plenty of example enemies and attacks in this kit?


tabletop

  • Posts: 365
What I meant was, are you including the sample actors in the clips.

At least in the paid version.

Luyren

  • *
  • Posts: 2337
For the past two weeks we found out some memory leaks (sort of) that created the need to revise every piece of code I have on my own and made public. I'm hoping that will prevent possible issues in the future. Combine that with my abysmal time management skills and that's the reason for the lack of update/showcase last week and this week. Hopefully I'll have the relevant part of this revision done this week and can get back to it.

What I meant was, are you including the sample actors in the clips.

At least in the paid version.
This is a resource pack, not a kit. The sample games will have the bare minimum to showcase some of what you can do with it. The idea with this, as well as with any of my other resource packs, is for the user to learn from the documentation and sample material and build their own stuff with it. If you expect a million of pre-made actors to repurpose, I'm afraid I won't be able to help you.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

tabletop

  • Posts: 365
Is there a release window yet?

tabletop

  • Posts: 365
I want to make something with this.

Luyren

  • *
  • Posts: 2337
No release date yet. It will be done when it's done.

I'll need some extra time to make the second part of the AI show case, so meanwhile, here's a new thing:
Charge
This was previously part of the Cutscene Pack, but I removed it from that pack and it will part of this one, as it makes more sense to be here. It's based on Mega Man X, Super Metroid and Secret of Mana, whereas you can have upgradable charge levels, and can have different charge types, based on weapons for example. You customize events based on the current charge type, the current charge level, and if the event happens on charge progress, charge release or charge at max level. You can use this in combination with the Command List behavior I talked about previously, to execute special attacks when you release a charge. Particles, after images and auras can be integrated with it if you use my other resource packs. You can also setup a list of values that prevent the charge from starting, to fully control when the player can charge. This can also be used for AI controlled actors.

In this gif you can see that you have the option to automatically charge, without holding any key. In that case, the charge is released when you press the button. It is also mouse compatible. You can also see that attacks can have piercing properties: you can select if it pierces everything, or only pierce enemies that are defeated.

Here you can see the charge by holding a control. It's the same control used for the regular attacks, and if you properly configure the charge events with triggers, you can have special attacks interrupting regular attacks when a charge is released.

I'll try to get the second part of the AI showcase next week.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

tabletop

  • Posts: 365
I just realized I was following your kit for 14 years, can you just upload what you have so I can buy that and start my platformer RPG for real.

This is better than Megaman/Metroid, you're doing an Ocarina of time styled gameplay in sidescroller format, simply amazing.

14 years. let that sink in. And nothing out there on the web can do what this can do where it feels like Zelda Wind Waker/Twilight Princess Side scrolling with damage numbers, a step up from the physics of say maplestory or a Tales game from rpg maker's action battle system.

Im So excited for this advanced battle system you have. I always found action RPG's like Tales games boring in combat compared to adventure games. It is perfect to have adventure/action game gameplay WITH the damage numbers/rpg stats.

Other action rpg kits are total crap for casual makers with no programming knowledge.

I just don't want a lifetime to go by me and my best friend were in 6th grade when you first made the thread on this.

« Last Edit: Today at 05:36:33 am by tabletop »