Jump to content

How would I go about converting a non playable character into a bot ?


Recommended Posts

Posted

ive done all i can think to do with the original files but cant seem to get r2's skins to load when I bring the bot into a game.. but the npc command works just fine Player Model r2/model_default ..  npc spawn command is r2

 

Here are the codes and file names -

 

 model_default.skin -

 

hips,models/players/r2/body_r2d2.jpg
l_leg,models/players/r2/legs_r2d2.jpg
l_leg_cylindera,models/players/r2/legs_r2d2.jpg
l_leg_cylinderb,models/players/r2/legs_r2d2.jpg
l_leg_foot,models/players/r2/legs_r2d2.jpg
torso,models/players/r2/body_r2d2.jpg
head,models/players/r2/body_r2d2.jpg
head_eye,models/players/r2/body_r2d2.jpg
l_arm,models/players/r2/legs_r2d2.jpg
l_hand,models/players/r2/legs_r2d2.jpg
r_arm,models/players/r2/legs_r2d2.jpg
r_hand,models/players/r2/legs_r2d2.jpg
torso_r_joint,models/players/r2/legs_r2d2.jpg
torso_l_joint,models/players/r2/legs_r2d2.jpg
torso_cap,models/players/r2/body_r2d2.jpg

 

r2.jkb -

 

//r2 personality

//Do not let this file exceed 131072 bytes.

//Do not let any group exceed 8192 bytes.

//Do not let the chat section exceed 8192 bytes.

//Some values are base values and changed by the in-game skill. The formula for reflex and accuracy
//is basevalue/skill. So if you give a base reflex of 500ms, a nightmare bot will have a reaction time of
//100ms. Other values, like turnspeed_combat (higher == faster), are multiplied by the skill number.

//Note also that depending on if the bot and the enemy are moving at the same time, the degrees the bot
//aims off by can be greater than the maximum accuracy value. So if the bot and its enemy are both flying
//through the air and accuracy is at 20, the bot could easily aim off by 25 degrees instead. That is,
//unless perfectaim is 1. In this case the bot will aim perfectly at all times (as the name indicates).

GeneralBotInfo
{
    reflex            500
                //base reflex value, time in ms it takes the bot to react
    accuracy        10
                //base accuracy, number of degrees bot can aim off by. Lower value == better aim.
    turnspeed        0.01
    turnspeed_combat    0.05
    maxturn            360
    perfectaim        0
    chatability        1
    chatfrequency        3
    hatelevel        3
    camper            1
    saberspecialist        1
                //if 1, bot will not run just because it's forced to use a saber

    //don't exceed 20 force points total
    forceinfo        7-1-332212000220001333
    //                 hlspptglrpattdssss
    //                 eepuueriarbeereaaa
    //                 aveslliggosaaaebbb
    //                 l ehlephetommi eee
    //                   d    t erhfn rrr
    //                        n cbeo  adt
    //                        i t ar  teh
    //                        n   lc  tfr
    //                        g    e  aeo
    //                                cnw
    //                                kd

    //rank-side-heal.lev.speed.push.pull.tele.grip.lightning.rage.protect.absorb.teamheal.teamforce.drain.see.saberattack.saberdefend.saberthrow
    //1==light side 2==dark side
}

//Weapons with a weight of 0 will be used in special cases outside of combat

BotWeaponWeights
{
    WP_STUN_BATON        1
    WP_SABER        16
    WP_BRYAR_PISTOL        10
    WP_BLASTER        11
    WP_DISRUPTOR        12
    WP_BOWCASTER        13
    WP_REPEATER        14
    WP_DEMP2        15
    WP_FLECHETTE        17
    WP_ROCKET_LAUNCHER    18
    WP_THERMAL        9
    WP_TRIP_MINE        0
    WP_DET_PACK        0
}

// r2 is friendly to many people.

EmotionalAttachment
{
    Lando            2
    Jedi            2
    jedi_Trainer        2
}
    


//all groups below here will be read in as chat sections
BEGIN_CHAT_GROUPS

Died
{
    The Force is strong in you, %s.
    Don't give in to your anger.
    It’s not my fault!
    No, no!!!  That's not true!  That's impossible!!!!
}

Killed
{
    The Jedi code requires that one may only take a life in self defense.
    If you continue to attack me, you will continue to lose.
    The Force is my guide.
}

Beloved Killed
{
    I sense a great disturbance in the Force.
}

Hatred
{
    I do not hate you.  Hate leads to the Dark Side.
}

LovedOneKilledLovedOne
{
    %s, %a is a friend!
}

GeneralGreetings
{
    Hello, may I join?
}

ResponseGreetings
{
    Well met!
}

OrderAccepted
{
    I shall do my best!
}
 

r2.bot -

 

{
name        "R2-D2"
model        r2
color1        4
tck_saberred     75        //red value
tck_sabergreen     75           //green value
tck_saberblue     255        //blue value
personality    /botfiles/r2.jkb
}
 

r2.npc -

 

r2
{
    playermodel        r2
    health        300
    weapon        WP_NONE
    headYawRangeLeft    180
    headYawRangeRight    180
    headPitchRangeUp    0
    headPitchRangeDown    0
    torsoYawRangeLeft    0
    torsoYawRangeRight    0
    torsoPitchRangeUp    10
    torsoPitchRangeDown    10
    reactions        3
    aim            1
    move            3
    aggression        3
    evasion            1
    intelligence        5
    playerTeam    TEAM_NEUTRAL
    enemyTeam    TEAM_NEUTRAL
//    race            bot
    class            CLASS_R2D2
    yawSpeed        120
    runSpeed        150
    walkSpeed        50
    height            40
    width            12
    hFOV            120
    vfov            45
    snd            r2
}

Posted

I believe bots in MP are treated the same as a real person, they must reference the _humanoid.gla to be a MP character and the R2 model uses it's own .gla which of course doesn't have any of the same bones as the _humanoid.gla.

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