Jump to content

Jedi Outcast AI in Jedi Academy!


Go to solution Solved by GamingPrince83,

Recommended Posts

Is there a way to editi the Jedi Academy Saber wielders AI to match the AI in Jedi Outcast especially the Reborn and Tavion AI.

 

In JK2 each Reborn for grunt to Boss had a unique way of fighting, especially Tavion and the Reborn Acrobat, both used acrobats a 

lot which made the Battles very exciting and dangerous. Has anybody tried this before and if yes could you help me out?

 

 

 

 

 

Link to comment

I think it's quite possible. You'll need the JO .npc files for the characters you want, copy the behavior information (reflex, speed, force powers, saber styles) into the same .npc files in JA, and you should be good to go. At least, if I understood your question correctly. If not, then I guess coding and animations are involved. Those, I don't know how to edit.

GamingPrince83 likes this
Link to comment

I think it's quite possible. You'll need the JO .npc files for the characters you want, copy the behavior information (reflex, speed, force powers, saber styles) into the same .npc files in JA, and you should be good to go. At least, if I understood your question correctly. If not, then I guess coding and animations are involved. Those, I don't know how to edit.

I think the main issue however is that the .NPC files are different, the outcast NPCS have no Force Powers listed in their files cos it's hard coded (?) into them, so you'd have to manually readd all the powers you want them to use, plus all the outcast NPC's are listed in the same file called npcs.cfg. I'll post an example.

 

Jedi Outcast:

Kyle
{
    fullName    "Katarn, Kyle"
    playerModel    kyle
    saberColor    blue
    reactions    4
    aim        5
    move        3
    aggression    5
    evasion        5
    intelligence    5
    playerTeam    player
//    race        human
    class        kyle
    snd            kyle
    sndcombat    kyle
    sndjedi        kyle
    dismemberProbHead    1
    dismemberProbArms    1
    dismemberProbHands    20
    dismemberProbLegs    1
    dismemberProbWaist    1
}

Jedi Academy:

Kyle
{
    playerModel    kyle
    saber        kyle
    rank        commander
    health        1000
    weapon    WP_BRYAR_PISTOL
    weapon    WP_SABER
    saberStyle    1
    saberStyle    3
    saberStyle    2
    FP_HEAL            3
    FP_LEVITATION    3
    FP_SPEED        3
    FP_PUSH            3
    FP_PULL            3
    FP_TELEPATHY    3
    FP_GRIP            3
    FP_LIGHTNING    2
    FP_SABERTHROW    3
    FP_RAGE            0
    FP_PROTECT        3
    FP_ABSORB        3
    FP_DRAIN        0
    FP_SEE            3
    FP_SABER_DEFENSE 3
    FP_SABER_OFFENSE 3
    forcePowerMax    200
    reactions    4
    aim        5
    move        3
    aggression    5
    evasion        5
    intelligence    5
    playerTeam    TEAM_PLAYER
    class        CLASS_KYLE
    snd            kyle
    sndcombat    kyle
    sndjedi        kyle
    dismemberProbHead    0
    dismemberProbArms    0
    dismemberProbHands    0
    dismemberProbLegs    0
    dismemberProbWaist    0
}

The way they are coded is different so you can't just simply copy and paste, you'd have to add in what's missing otherwise they'll not work as intended.

 

As I said originally, Outcast uses .cfg for it's npcs where as the Academy version is .npc.

MB2 Beta Tester / MB2 FA Assistant Dev

Link to comment

I think the main issue however is that the .NPC files are different, the outcast NPCS have no Force Powers listed in their files cos it's hard coded (?) into them, so you'd have to manually readd all the powers you want them to use, plus all the outcast NPC's are listed in the same file called npcs.cfg. I'll post an example.

 

Jedi Outcast:

Kyle
{
    fullName    "Katarn, Kyle"
    playerModel    kyle
    saberColor    blue
    reactions    4
    aim        5
    move        3
    aggression    5
    evasion        5
    intelligence    5
    playerTeam    player
//    race        human
    class        kyle
    snd            kyle
    sndcombat    kyle
    sndjedi        kyle
    dismemberProbHead    1
    dismemberProbArms    1
    dismemberProbHands    20
    dismemberProbLegs    1
    dismemberProbWaist    1
}

Jedi Academy:

Kyle
{
    playerModel    kyle
    saber        kyle
    rank        commander
    health        1000
    weapon    WP_BRYAR_PISTOL
    weapon    WP_SABER
    saberStyle    1
    saberStyle    3
    saberStyle    2
    FP_HEAL            3
    FP_LEVITATION    3
    FP_SPEED        3
    FP_PUSH            3
    FP_PULL            3
    FP_TELEPATHY    3
    FP_GRIP            3
    FP_LIGHTNING    2
    FP_SABERTHROW    3
    FP_RAGE            0
    FP_PROTECT        3
    FP_ABSORB        3
    FP_DRAIN        0
    FP_SEE            3
    FP_SABER_DEFENSE 3
    FP_SABER_OFFENSE 3
    forcePowerMax    200
    reactions    4
    aim        5
    move        3
    aggression    5
    evasion        5
    intelligence    5
    playerTeam    TEAM_PLAYER
    class        CLASS_KYLE
    snd            kyle
    sndcombat    kyle
    sndjedi        kyle
    dismemberProbHead    0
    dismemberProbArms    0
    dismemberProbHands    0
    dismemberProbLegs    0
    dismemberProbWaist    0
}

The way they are coded is different so you can't just simply copy and paste, you'd have to add in what's missing otherwise they'll not work as intended.

 

As I said originally, Outcast uses .cfg for it's npcs where as the Academy version is .npc.

I suppose, but then, if you figured it out, there shouldn't be a problem, no?

Also, Kyle isn't the best example to use in this regard because he's the player character, and his force power gain is indeed coded. It's the same for the player.npc in JKA, though that one has even less info on the character. Eh, doesn't matter, I guess.

Link to comment

@@SaberBlade83 Soooo... How did you go about solving it? I'm interested :)

 

 

I just did some code editing to make the Jedi Npcs use some of the old JK2 moves more often, like Jump flip attack, Lunge and jump forward attack.

 

This is what i did in bg_panimate.cpp

//----------------------------------- Old JK2 Moves
if (enemyDist > !Q_irand(128, 200) && pm->gent && pm->gent->client 
		&& (pm->gent->NPC->rank == RANK_CREWMAN || pm->gent->NPC->rank == RANK_COMMANDER)
			&& !Q_irand(0, 2))
		{
			autoMove = PM_SaberFlipOverAttackMove();
		}
else if (enemyDist > !Q_irand(256, 300) && pm->gent && pm->gent->client 
		&& (pm->gent->NPC->rank == RANK_LT || pm->gent->NPC->rank == RANK_CAPTAIN)
		&& !Q_irand(0, 2))
		{
			autoMove = PM_SaberJumpForwardAttackMove();
		}
else if (enemyDist > !Q_irand(128, 200) && pm->gent && pm->gent->client
		&& (pm->gent->NPC->rank == RANK_LT_JG || pm->gent->NPC->rank == RANK_LT_COMM 
		|| pm->gent->NPC->rank == RANK_COMMANDER || pm->gent->NPC->rank == RANK_CAPTAIN)
			&& !Q_irand(0, 2))
		{
			autoMove = PM_SaberLungeAttackMove(qtrue);
		}

I'm still working on it, the game crashes sometimes when i use the player, but with npcs it's ok.

Link to comment

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...