Jump to content

(Jedi Academy) How do you assign Boss Kyle's abilities to other NPCs?


Recommended Posts

Posted

And by his abilities, I mean his ability to grab and throw people around, and to his ability to grab and punch people. I also want to assign the other melee abilities to NPCs too.

Posted

OpenJK is not for modding, it's for playing. I referenced its source code because it works the same as the original Jedi Academy. Here's what I learned from reading the source code:

For an NPC to be able to grab, it needs to

  • have class CLASS_KYLE in the .npc file (only Kyle-class NPCs are allowed to grab)
  • use weapon WP_SABER (you have to be a Jedi to be able to grab, and the only way for a Kyle-class NPC to become a Jedi is to wield a lightsaber)
  • have spawnflags 1 enabled (on NPC_Kyle, that is the "Boss" flag. Only the boss version is allowed to grab.)
  • have an animation for BOTH_KYLE_GRAB, and optionally for BOTH_KYLE_PA_1BOTH_KYLE_PA_3 & BOTH_KYLE_MISS (to be able to successfully grab someone, you need to be in the BOTH_KYLE_GRAB animation. The rest is played during the grab or when it misses, and are technically not required). Note that the player will always play the same reaction animation.) All player models using the _humanoid skeleton have such animations.

So you need to write a custom .npc file with the correct class and weapon, use an npc_spawner with spawnflags 1 to spawn it in a map, and it needs to use a model with a grab animation. Spawning it using the console is impossible, as you cannot set spawnflags 1.

Posted
On 4/30/2024 at 8:16 PM, mrwonko said:

OpenJK is not for modding, it's for playing. I referenced its source code because it works the same as the original Jedi Academy. Here's what I learned from reading the source code:

For an NPC to be able to grab, it needs to

  • have class CLASS_KYLE in the .npc file (only Kyle-class NPCs are allowed to grab)
  • use weapon WP_SABER (you have to be a Jedi to be able to grab, and the only way for a Kyle-class NPC to become a Jedi is to wield a lightsaber)
  • have spawnflags 1 enabled (on NPC_Kyle, that is the "Boss" flag. Only the boss version is allowed to grab.)
  • have an animation for BOTH_KYLE_GRAB, and optionally for BOTH_KYLE_PA_1BOTH_KYLE_PA_3 & BOTH_KYLE_MISS (to be able to successfully grab someone, you need to be in the BOTH_KYLE_GRAB animation. The rest is played during the grab or when it misses, and are technically not required). Note that the player will always play the same reaction animation.) All player models using the _humanoid skeleton have such animations.

So you need to write a custom .npc file with the correct class and weapon, use an npc_spawner with spawnflags 1 to spawn it in a map, and it needs to use a model with a grab animation. Spawning it using the console is impossible, as you cannot set spawnflags 1.

Any chance it's possible to get the grab to work in MP? (JA+ ideally but if not, what about base)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...