I added limb targeting and improved the combat AI

Questions specific to OpenMW-CS can be asked, and content development related topics can be discussed here
Post Reply
User avatar
halbe
Posts: 58
Joined: 14 Feb 2017, 03:55

I added limb targeting and improved the combat AI

Post by halbe » 19 Mar 2018, 04:11

I've been working on a large overhaul for OpenMW and have made quite a bit of progress on the combat in the last week, which I know a lot of people might be interested in. Here's a video of the combat stuff I've been doing in action. The plane of shallow water is just my test cell, which I thought would look cool as a setting for an epic duel.

The good:
- I've made a script that goes on enemies which works with a script on the player to find out which limb you are targeting, and reduces damage to that limb based on its own armor.
- The hit sound that plays is based on which type of armor you hit, the pitch of it decreases as damage increases. As you can hear in the video though, it doesn't sound very good so let me know if anyone has a better idea.
- Attacking the legs will cripple them first damaging speed, then forcing enemies to crouch. If they take enough damage they cannot move.
- Attacking the torso damages fatigue regen
- Attacking the arms damages agility
- Attacking the head will first damage intelligence, then blind enemies, and eventually knock them unconscious for a couple minutes
- The amount of damage imparted onto limbs is based on your accuracy. Your attacks always hit, but the more accuracy you have the better you hit weak spots.
- Sneak attacks add your sneak bonus as accuracy.
- Everything costs a lot more stamina (fatigue), but it also regenerates much faster.
- The AI will attack extremely aggressively when it has enough stamina and is close, but will back up when out.
- Once it backs up it will slowly circle around you until one of you makes the first move
- It will perform jump attacks if its acrobatics is high (these are useful because momentum is factored into damage)
- Actors start bleeding below 75% health but very slowly regenerate health above it (replacing the health gain on rest)

The bad:
- The enemy script must be put onto that specific NPC in the editor. There is a way around this involving using startscript in a combat voice line, but this isn't as consistent as I'd like it to be. I could theoretically use tes3cmd to add this script to the 95% of NPCs that have no script (and even modify the ones that do to merge the scripts), but this seems like a bad idea.
- Because of a bug in how OpenMW handles the playgroup function, the AI must be toggled off at times during combat so I can make them move around and not attack the player when they're out of stamina. Otherwise they will interrupt these animations and keep trying to fight. I attempted to use stopcombat and aiwander 0 0 0 as an alternative to this, but then they put away their weapons and I have not figured out how to stop this from happening.

The ugly
- Since OpenMW has not yet been dehardcoded, I have done all sorts of terrible hacky workarounds to make this work, such as using "GetSoundPlaying" as a shitty event system or the aforementioned AI toggling and starting the scripts on voice lines. There is one bug in the AI that I can't figure out, and the limb targeting isn't always as accurate as I'd like it to be, but other than that what works, works.

Also I swear I have nothing to do with that guy who made a kickstarter. People keep confusing me with him when I go around asking for permissions. I don't have all of them yet so I can't release it (even if it was done), but I am only missing a handful out of over a hundred fifty modders so I'm not too worried about dropping whatever mods I need to when I'm ready to release it.

What do ya'll think? Any suggestions or ideas?

User avatar
Thunderforge
Posts: 436
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Re: I added limb targeting and improved the combat AI

Post by Thunderforge » 22 Mar 2018, 04:12

That’s pretty neat! I could definitely see a lot of players preferring this. My suggestions:
  • I am interested in limb targeting, but not birthsign editing and other modifications, so having an übermod with a whole bunch of stuff is less appealing to me. Would it be possible to isolate the changes unrelated to limb targeting into separate mods?
  • I would be interested in this for single player, rather than multiplayer.
  • Your design document says you Fatigue has been renamed to Stamina, but then refers to Fatigue throughout. Personally, I’d prefer to just keep the Fatigue name.
  • I don’t really care for Destruction being tied to Strength and such. It feels wrong for Studdy McBeefcake to be both the greatest swordsman and fireball thrower in the land.
Overall, I would suggest focusing on the core feature: limb targeting and the AI/balance changes to support it. If you want all the other stuff like alchemy and birthsign mods, separate those into other mods that people can choose to include or ignore as they please.

User avatar
halbe
Posts: 58
Joined: 14 Feb 2017, 03:55

Re: I added limb targeting and improved the combat AI

Post by halbe » 22 Mar 2018, 17:35

Thunderforge wrote:
22 Mar 2018, 04:12
That’s pretty neat! I could definitely see a lot of players preferring this. My suggestions:
  • I am interested in limb targeting, but not birthsign editing and other modifications, so having an übermod with a whole bunch of stuff is less appealing to me. Would it be possible to isolate the changes unrelated to limb targeting into separate mods?
  • I would be interested in this for single player, rather than multiplayer.
  • Your design document says you Fatigue has been renamed to Stamina, but then refers to Fatigue throughout. Personally, I’d prefer to just keep the Fatigue name.
  • I don’t really care for Destruction being tied to Strength and such. It feels wrong for Studdy McBeefcake to be both the greatest swordsman and fireball thrower in the land.
Overall, I would suggest focusing on the core feature: limb targeting and the AI/balance changes to support it. If you want all the other stuff like alchemy and birthsign mods, separate those into other mods that people can choose to include or ignore as they please.
Here are all the distinct components of the mod that can be used by themselves:
- Core gameplay features: limb targeting, AI, relevant GMSTs, racial abilities, revised derived attribute equations, and much faster fatigue regen + consumption
- TES3MP build mechanics: skill system, NPC mantling, and replacing armor skills with new persuasion skills (this is the only TES3MP exclusive part)
- Singleplayer build mechanics: birthsigns and small leveling system changes
- Alchemy and potions
- Stealth
- Weapon/armor rebalance
- Spells and enchantments

I'd like to split up the core features into smaller components, but it's difficult because of how much each feature depends on others. Also for the other mods in the compilation, every one has its own data directory, so if you don't like something you can just delete the folder. To justify the destruction strength bonus, know that the best warrior with 100 strength will only have 25 destruction if he's untrained in it, so it's not about warriors being good at destruction, it's that destruction mages need strength. It won't matter for you since you aren't using TES3MP though, all the skill stuff is handled through the NPC mantling system.

jonimacarroni
Posts: 24
Joined: 26 Sep 2017, 23:43

Re: I added limb targeting and improved the combat AI

Post by jonimacarroni » 08 Apr 2018, 11:04

As I already said on the 0.44 thread, this is amazing.
However, I do agree with everything Thunderforge mentioned.

Do the NPCs have exactly the same system in place when fighting you? Or can they miss, and are actually just using the "old rules"? That would make or break this mod for me. If I hit 100% of the time, then I would hate for NPCs to miss.
You would also have to take into account monsters and creatures. They don't have the same mesh structure, so I figure it would be overkill to make a script for each one of them. How would you make the combat consistent?

On another note: is the graphics section in your mod just a compilation of other mods?

User avatar
halbe
Posts: 58
Joined: 14 Feb 2017, 03:55

Re: I added limb targeting and improved the combat AI

Post by halbe » 22 Apr 2018, 01:19

jonimacarroni wrote:
08 Apr 2018, 11:04
As I already said on the 0.44 thread, this is amazing.
However, I do agree with everything Thunderforge mentioned.

Do the NPCs have exactly the same system in place when fighting you? Or can they miss, and are actually just using the "old rules"? That would make or break this mod for me. If I hit 100% of the time, then I would hate for NPCs to miss.
You would also have to take into account monsters and creatures. They don't have the same mesh structure, so I figure it would be overkill to make a script for each one of them. How would you make the combat consistent?

On another note: is the graphics section in your mod just a compilation of other mods?
NPCs don't have exactly the same system but it's pretty close, the main difference is that limb damage on your end is toned down. I might make a version where the limb damage is random for things that don't fit the humanoid physique like cliff racers or at least a greatly simplified one (removing the orientation factor would make the script half the size).

Yes, the graphics mod is just a compilation.

User avatar
halbe
Posts: 58
Joined: 14 Feb 2017, 03:55

Re: I added limb targeting and improved the combat AI

Post by halbe » 22 Apr 2018, 01:21

I added some parkour mechanics like sprinting, charged jumps, climbing, and paragliding (the staff near the end). https://streamable.com/5b2fz

If anyone wants to help test it please let me know!

User avatar
Thunderforge
Posts: 436
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Re: I added limb targeting and improved the combat AI

Post by Thunderforge » 23 Apr 2018, 06:20

halbe wrote:
22 Apr 2018, 01:21
I added some parkour mechanics like sprinting, charged jumps, climbing, and paragliding (the staff near the end). https://streamable.com/5b2fz
That's awesome! Although I have the same feedback: I'd want this in a separate mod instead of an uber-mod with limb damage, graphics, and parkour.

jonimacarroni
Posts: 24
Joined: 26 Sep 2017, 23:43

Re: I added limb targeting and improved the combat AI

Post by jonimacarroni » 23 Apr 2018, 23:34

halbe wrote:
22 Apr 2018, 01:21
I added some parkour mechanics like sprinting, charged jumps, climbing, and paragliding (the staff near the end). https://streamable.com/5b2fz

If anyone wants to help test it please let me know!
This looks sincerely brilliant! I want to roleplay a MW universe analogue of spiderman.
I'm going to be reinstalling OpenMW when 0.44 hits (I am busy with work at the moment). If you still need testers by that time I will gladly offer myself.

User avatar
halbe
Posts: 58
Joined: 14 Feb 2017, 03:55

Re: I added limb targeting and improved the combat AI

Post by halbe » 24 Apr 2018, 02:30

Thunderforge wrote:
23 Apr 2018, 06:20
halbe wrote:
22 Apr 2018, 01:21
I added some parkour mechanics like sprinting, charged jumps, climbing, and paragliding (the staff near the end). https://streamable.com/5b2fz
That's awesome! Although I have the same feedback: I'd want this in a separate mod instead of an uber-mod with limb damage, graphics, and parkour.
As stated earlier, everything that can be separated is separate so don't worry about that.
jonimacarroni wrote:
23 Apr 2018, 23:34
halbe wrote:
22 Apr 2018, 01:21
I added some parkour mechanics like sprinting, charged jumps, climbing, and paragliding (the staff near the end). https://streamable.com/5b2fz

If anyone wants to help test it please let me know!
This looks sincerely brilliant! I want to roleplay a MW universe analogue of spiderman.
I'm going to be reinstalling OpenMW when 0.44 hits (I am busy with work at the moment). If you still need testers by that time I will gladly offer myself.
Great! Just pm me or post in this thread to let me know, thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest