Making NPCs jump

Post » Sat Dec 10, 2011 12:17 am

I am looking for mods that let the NPCs jump when nesecary (so they can jump over rocks and logs instead of running all the way around when chasing an enemy) or at will (like maybe they will jump around town to level up acrobatics). Can anyone advise me of any mods that do this? I cannot find any anywhere?
User avatar
Mason Nevitt
 
Posts: 3346
Joined: Fri May 11, 2007 8:49 pm

Post » Sat Dec 10, 2011 1:42 pm

They don't exist on that level of sophistication. Making actors jump is very simple, but the larger problem is the actor detecting their environment and reacting appropriately (outside of just following a path grid). Now, it could easily be scripted to map coordinates in AI for specific areas but not for the entire game world.

Of course MWSE may offer some function to help solve the problem but I'm not familiar with the program.
User avatar
Heather beauchamp
 
Posts: 3456
Joined: Mon Aug 13, 2007 6:05 pm

Post » Sat Dec 10, 2011 7:33 am

A "best guess" script might be possible by taking a coordinate snapshot of when a player jumps, and where they land (triggered by a sound-check for the landing SFX), thereby giving the NPC a Point A->Point B reference for jumping. But even this would be flawed beyond use for long leaps, slowfall, terrain slides, or anything else that would cause a significant delay in registering the endpoint - conversely, as long as they're in follow mode, you could just do the first part (take a snapshot when jump is pressed), and force them to jump when they reach the coordinates (with a certain margin of error, say 4-8 units). I'm no scripter and I have zero experience with MWSE, but theoretically as long as you can tell when/where the player presses Jump, you could at least have NPCs follow suit.
User avatar
jessica sonny
 
Posts: 3531
Joined: Thu Nov 02, 2006 6:27 pm

Post » Sat Dec 10, 2011 12:07 am

A "best guess" script might be possible by taking a coordinate snapshot of when a player jumps, and where they land (triggered by a sound-check for the landing SFX), thereby giving the NPC a Point A->Point B reference for jumping. But even this would be flawed beyond use for long leaps, slowfall, terrain slides, or anything else that would cause a significant delay in registering the endpoint - conversely, as long as they're in follow mode, you could just do the first part (take a snapshot when jump is pressed), and force them to jump when they reach the coordinates (with a certain margin of error, say 4-8 units). I'm no scripter and I have zero experience with MWSE, but theoretically as long as you can tell when/where the player presses Jump, you could at least have NPCs follow suit.


This is very doable without extensions for actors following the player (detecting player jump or sneak is commonly used with companion mods). But I think this may beg the question of the OP. I think he/she is looking for some "global solution" to actor AI with environmental obstructions independent of the player's actions. I think... :confused:
User avatar
Romy Welsch
 
Posts: 3329
Joined: Wed Apr 25, 2007 10:36 pm

Post » Sat Dec 10, 2011 12:17 am

A "best guess" script might be possible by taking a coordinate snapshot of when a player jumps, and where they land (triggered by a sound-check for the landing SFX),


Landing detection is possible with a coordinates check - I tried something like a "within +0.1/-0.1 Z" during 3 frames and it always properly detected landing. Might be heavier but I heard SFX checks don't work on all systems.
User avatar
Misty lt
 
Posts: 3400
Joined: Mon Dec 25, 2006 10:06 am

Post » Fri Dec 09, 2011 11:30 pm

Well I am not an expert at MW scripting or the AI.
When the AI is chasing something, it plots a path around all the statics(or their bounding boxes) usually I think. Perhaps this can be modified to where it plots the most direct path around statics which have the very top of their bounding boxes(or whatever part is higher) at a height taller than the coord for the NPC(or creature), essentially meaning it will go around tall statics like trees(perhaps it could even cross check acrobatics to see the max jump height here). For all other statics, it would plot a route directly through those. When an NPC runs into a static, the AI would detect that it wasnt moving in the direction it wants to go and would try a jump. If this jump fails to make the NPC progress forward, a path would be plotted around it as normal. I am sure its not hard to see what I am thinking if this is at all possible.(interesting thought here, run across something with the AI chasing you and right before it gets to where it would try to jump over, cast a large jump spell or something on it, it goes flying into the air and gravity takes care of your problem for you, haha)
User avatar
Blaine
 
Posts: 3456
Joined: Wed May 16, 2007 4:24 pm

Post » Sat Dec 10, 2011 10:59 am

Well I am not an expert at MW scripting or the AI.
When the AI is chasing something, it plots a path around all the statics(or their bounding boxes) usually I think. Perhaps this can be modified to where it plots the most direct path around statics which have the very top of their bounding boxes(or whatever part is higher) at a height taller than the coord for the NPC(or creature), essentially meaning it will go around tall statics like trees(perhaps it could even cross check acrobatics to see the max jump height here). For all other statics, it would plot a route directly through those. When an NPC runs into a static, the AI would detect that it wasnt moving in the direction it wants to go and would try a jump. If this jump fails to make the NPC progress forward, a path would be plotted around it as normal. I am sure its not hard to see what I am thinking if this is at all possible.(interesting thought here, run across something with the AI chasing you and right before it gets to where it would try to jump over, cast a large jump spell or something on it, it goes flying into the air and gravity takes care of your problem for you, haha)

i think you may be on to something. i do not know how well it would work as I have very minimal scripting experience but maybe a more expert scritper can comment on it.
User avatar
Tracy Byworth
 
Posts: 3403
Joined: Sun Jul 02, 2006 10:09 pm

Post » Sat Dec 10, 2011 1:57 pm

Well I am not an expert at MW scripting or the AI.
When the AI is chasing something, it plots a path around all the statics


You sure about that? They seem to run into walls before figuring out they need to take a turn all the time, so I don't really think they know whats around them :P
User avatar
Kate Murrell
 
Posts: 3537
Joined: Mon Oct 16, 2006 4:02 am

Post » Fri Dec 09, 2011 10:05 pm

You sure about that? They seem to run into walls before figuring out they need to take a turn all the time, so I don't really think they know whats around them :P

Thats why I said I wasnt sure.

Anyway, I am good at thinking on the logic of different things.
User avatar
Amber Ably
 
Posts: 3372
Joined: Wed Aug 29, 2007 4:39 pm

Post » Sat Dec 10, 2011 2:04 am

Thats why I said I wasnt sure.

Anyway, I am good at thinking on the logic of different things.


Haha don't take me on the word, I know basically nothing about how almost anything in this game works. :)
User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am


Return to III - Morrowind