Republic Commando NPC commands -1 reply

  • 1
  • 2

Please wait...

DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#1 7 years ago

I've been toying with the idea of a Republic Commando sp mod recently, and I had an idea of how to recreate the way you command your team (take cover, sniper position, grenades, etc). I just tried to make an npc take cover behind a barrier and shoot at some stormtroopers. I basically made a script that sent the npc to a navgoal, made it crouch, and made it look for enemies. Here is that script:

Spoiler: Show

//Generated by BehavEd

rem ( "comment" );

affect ( "rebel", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", "dest" ); }

wait ( 100.000 ); use ( "stormtrooper_spawn" );

affect ( "rebel", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_CROUCHED", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_CHASE_ENEMIES", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_LOOK_FOR_ENEMIES", /*@BOOL_TYPES*/ "true" ); }

This is the first thing I need help with. I wasn't sure how to make the npc wait until it has reached the navgoal to crouch and start shooting. What happened was my npc walked to the navgoal, while crouched and shooting. Also, once he got there he remained crouched and shooting, but he didn't stay behind the barrier.

To go along with this, I made a simple script that (I had hoped) would cancel the npc's active commands from the last script, and have them return to their normal behavior. I wrote a .cfg file that bound a key to the script, so you could call it any time. I thought I could just do this with a flush command inside of an affect command, but it didn't seem to work.

Spoiler: Show

//Generated by BehavEd

rem ( "comment" );

affect ( "rebel", /*@AFFECT_TYPE*/ FLUSH ) { flush ( ); }

I figured this might be a lost cause, since JK3's bots are so stupid :rolleyes: But if anyone has any ideas, I'd love to hear them.




The One and Only

I R Scary Eyeball

50 XP

29th January 2004

0 Uploads

4,091 Posts

0 Threads

#2 7 years ago

Well, my (slightly unhelpful) answer would be to write new AI code for NPCs in MP. Having to script every position an NPC can move to, or every action it can perform isn't ideal, and being able to trigger a new behaviour state, based on the type of action or movement would probably be much more useful. This is something I've been putting off doing for a while, but at some point I'm going to have to write some code to allow you to send commands to NPCs.




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#3 7 years ago

Well I tried something else today. I was trying to make it so that when one of your team loses half of their health, they fall to the ground and can't get up until you heal them with the 'use' button. I gave the npc's a fleescript (script that's supposed to play when they loose half of their health).

Spoiler: Show

//Generated by BehavEd

rem ( "comment" );

affect ( "fixer", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_INVINCIBLE", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_HEALTH", 1 ); set ( /*@SET_TYPES*/ "SET_PLAYER_USABLE", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_DEATH_LYING_DN" ); set ( /*@SET_TYPES*/ "SET_ANIM_HOLDTIME_BOTH", -1 ); }

And then I gave them a usescript.

Spoiler: Show

//Generated by BehavEd

rem ( "comment" );

affect ( "fixer", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_INVINCIBLE", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_HEALTH", 150 ); set ( /*@SET_TYPES*/ "SET_PLAYER_USABLE", /*@BOOL_TYPES*/ "false" ); }

But when I tried it, the fleescript never activated, and my npc just died. Does anyone know if fleescripts and usescripts are even implemented in JK3?

EDIT: Still not working, but after trying it again I did notice a funny side effect. Now whenever one of my team dies, they fall down on their face looking like they're dead, but they still follow me around everywhere :lulz: Seriously, is there any way to get these guys to freaking stand still?




vonHohenheim

master jedi

50 XP

12th March 2011

0 Uploads

55 Posts

0 Threads

#4 7 years ago

DarthStevenus;5535183I've been toying with the idea of a Republic Commando sp mod recently, and I had an idea of how to recreate the way you command your team (take cover, sniper position, grenades, etc). I just tried to make an npc take cover behind a barrier and shoot at some stormtroopers. I basically made a script that sent the npc to a navgoal, made it crouch, and made it look for enemies. Here is that script:

Spoiler: Show

//Generated by BehavEd

rem ( "comment" );

affect ( "rebel", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", "dest" ); }

wait ( 100.000 ); use ( "stormtrooper_spawn" );

affect ( "rebel", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_CROUCHED", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_CHASE_ENEMIES", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_LOOK_FOR_ENEMIES", /*@BOOL_TYPES*/ "true" ); }

This is the first thing I need help with. I wasn't sure how to make the npc wait until it has reached the navgoal to crouch and start shooting. What happened was my npc walked to the navgoal, while crouched and shooting. Also, once he got there he remained crouched and shooting, but he didn't stay behind the barrier.

To go along with this, I made a simple script that (I had hoped) would cancel the npc's active commands from the last script, and have them return to their normal behavior. I wrote a .cfg file that bound a key to the script, so you could call it any time. I thought I could just do this with a flush command inside of an affect command, but it didn't seem to work.

Spoiler: Show

//Generated by BehavEd

rem ( "comment" );

affect ( "rebel", /*@AFFECT_TYPE*/ FLUSH ) { flush ( ); }

I figured this might be a lost cause, since JK3's bots are so stupid :rolleyes: But if anyone has any ideas, I'd love to hear them.

just off the top of my head, this may help it to run to the navgoal. i hope

Spoiler: Show

//Generated by BehavEd

rem ( "comment" );

affect ( "rebel", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", "dest" ); set ( /*@SET_TYPES*/ "SET_CROUCHED", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "true" ); }

wait ( 100.000 ); use ( "stormtrooper_spawn" );

affect ( "rebel", /*@AFFECT_TYPE*/ FLUSH ) { set ( /*@SET_TYPES*/ "SET_CROUCHED", /*@BOOL_TYPES*/ "true" ); set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_CHASE_ENEMIES", /*@BOOL_TYPES*/ "false" ); set ( /*@SET_TYPES*/ "SET_LOOK_FOR_ENEMIES", /*@BOOL_TYPES*/ "true" ); }

if you want it not to shoot while running, add a line to the first part(the navgoal part) that tells it not to attack anything or ignore everything. i think there´s a bool that makes him stay at that exact spot you sent him to. also i think you have to use a different bool than "look for enemies". one that just tells it to shoot or hold position or defend or something to that extent. or one that makes it shoot at a specific enemy. the aggression line in the npc file may also play a role in this.

you could also change or add the visrange line in the .npc file so it can shoot from further distances, also the distance values for the gun itself in weapons.dat. i forget if the weapons.dat overrides the .npc file or vice versa. and it may not hurt either to open up the horizontal(hfov) and vertical(vfov) field of vision values. that could make things easier for you so you wouldn´t be restricted as much.

there´s a list of all the behaved commands (bools, everything) somewhere in the jk editing tools pack. i´ll get back to you when i find that file.




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#5 7 years ago

Well, I'm working on a Commando Droid model at the moment, and I just figured I'd ask if anyone has any good references of those guys. I've been googling, but I can't seem to find many good shots of the back of the head or torso.




Jeff_Katarn

jediwannabe on

50 XP

1st January 2011

0 Uploads

218 Posts

0 Threads

#6 7 years ago

I don't think you need a new model, just a reskin of the Battledroid model.




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#7 7 years ago

Is there one already out there? I searched on jk3files but didn't find one.




Delta_135

Glitching All Games!

50 XP

19th March 2011

0 Uploads

212 Posts

0 Threads

#8 7 years ago

here: http://jediknight3.filefront.com/file/Battle_Droid_Model_JKO;34296

it' for jk2 but it should work in jka ;)




DarthStevenus

GF is my bext friend *hugs GF*

50 XP

18th December 2009

0 Uploads

909 Posts

0 Threads

#9 7 years ago

Thanks guys, I'll check that out.




rippah62

I don't spend enough time here

50 XP

29th August 2008

0 Uploads

26 Posts

0 Threads

#10 7 years ago

err i am sure commando droid is in MB2 models same as battle droids




  • 1
  • 2