FOUND IT HELP!!! Warking Bots for TDM Stock or Custom maps

Please use this forum to ask all your MoHAA Bots questions / discussions

Moderator: Moderators

Locked
WarTech
Colour Sergeant
Posts: 88
Joined: Mon May 05, 2003 3:15 am

FOUND IT HELP!!! Warking Bots for TDM Stock or Custom maps

Post by WarTech »

Hello everyone, here is a working 99% Server Side Mod for bots that can be add it to stock or custom maps in a TDM game. It needs some work so for any guru please fix whats need it and repost so we all can use it.

Here is why the 99% server side mod. The script will spawn bots in your maps and they will just stand around and not attack anyone unless you get to close then they will bash you. Now to enable them to go off shooting, nading, bashing and moving around without path nodes (which can be add it if need it to) all you need to do is rem out this line >>includes test utils traf holodeck<< from the >>new_generic_human.tik<< and the bots come to life. ONE DRAW BACK when you do this. By editing this file for the server side pk3 you will have to create a small PK3 with the all of the human TIK file in that directory and provide it to the client side otherwise the will see the bots but they will be flashing like no tomorrow. Once the add the pk3 file with the human TIK files the bots become solid again for the client side.

I am currently using this in Spearhead version 2.15 and it works fine. So of course the files will need to be dropped in your MAINTA directory. If some one can figure out how to get around the editing of the >>new_generic_human.tik<< file the it will be a 100% server side mod. Can some one any of you all GURUS help with this!!!!

AT THE BOTTOM YOU ALL CAN SEE THE TEST FINDINGS!!!!

Here is the working script for mohdm1


// SOUTHERN FRANCE
// ARCHITECTURE: SENN
// SCRIPTING: POWZER

main:
exec global/ai.scr
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Southern France"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Modified by"
setcvar "g_obj_axistext2" "<TWZ>WarTech"
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "mohdm1"




// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread

level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr

thread soldier1



level.script = maps/dm/mohdm1.scr
exec global/ambient.scr mohdm1

//exec global/ambient.scr mohdm2

//$world farplane 5000
//$world farplane_color (.333 .333 .329)


level waittill spawn
$world farclipoverride -1

end


//-----------------------------------------------------------------------------


soldier1:
local.soldiercount1 = 1
spawn human/german_winter_type2 "targetname" "soldier1"
thread soldier $soldier1 local.soldiercount1
while (isalive $soldier1)
{
wait 3
}
//remove $soldier1
wait 3
goto soldier2
end

//-----------------------------------------------------------------------------

soldier2:
local.soldiercount2 = 2
spawn human/german_elite_sentry "targetname" "soldier2"
thread soldier $soldier2 local.soldiercount2
while (isalive $soldier2)
{
wait 3
}
//remove $soldier2
wait 3
goto soldier3
end

//-----------------------------------------------------------------------------

soldier3:
local.soldiercount3 = 3
spawn human/german_hund_hundpatrol "targetname" "soldier3"
thread soldier $soldier3 local.soldiercount3
while (isalive $soldier3)
{
wait 3
}
//remove $soldier3
wait 3
goto soldier4
end

//-----------------------------------------------------------------------------

soldier4:
local.soldiercount4 = 4
spawn human/german_panzer_grenadier "targetname" "soldier4"
thread soldier $soldier4 local.soldiercount4
while (isalive $soldier4)
{
wait 3
}
//remove $soldier4
wait 3
goto soldier5
end

//-----------------------------------------------------------------------------

soldier5:
local.soldiercount5 = 5
spawn human/german_misc_worker "targetname" "soldier5"
thread soldier $soldier5 local.soldiercount5
while (isalive $soldier5)
{
wait 3
}
//remove $soldier5
wait 3
goto soldier6
end

//-----------------------------------------------------------------------------

soldier6:
local.soldiercount6 = 6
spawn human/german_kreigsmarine "targetname" "soldier6"
thread soldier $soldier6 local.soldiercount6
while (isalive $soldier6)
{
wait 3
}
//remove $soldier6
wait 3
goto soldier7
end

//-----------------------------------------------------------------------------

soldier7:
local.soldiercount7 = 7
spawn human/german_afrika_NCO "targetname" "soldier7"
thread soldier $soldier7 local.soldiercount7
while (isalive $soldier7)
{
wait 3
}
//remove $soldier7
wait 3
goto soldier8
end

//-----------------------------------------------------------------------------

soldier8:
local.soldiercount8 = 8
spawn human/german_elite_gestapo "targetname" "soldier8"
thread soldier $soldier8 local.soldiercount8
while (isalive $soldier8)
{
wait 3
}
//remove $soldier8
wait 3
goto soldier1
end

//-----------------------------------------------------------------------------

soldier local.crazysoldier local.soldiercount:

if (local.soldiercount == 1)
{
local.crazysoldier.origin = ( -435 1170 466 )
local.crazysoldier.angles = (0 -45 0)
}
else
{
if (local.soldiercount == 2)
{
local.crazysoldier.origin = ( 1585 831 1610 )
local.crazysoldier.angles = (0 0 0)
}
else
{
if (local.soldiercount == 3)
{
local.crazysoldier.origin = ( 880 2838 466 )
local.crazysoldier.angles = (0 -127 0)
}
else
{
if (local.soldiercount == 4)
{
local.crazysoldier.origin = ( -821 2352 466 )
local.crazysoldier.angles = (0 -2 0)
}
else
{
if (local.soldiercount == 5)
{
local.crazysoldier.origin = ( 235 1937 689 )
local.crazysoldier.angles = (0 174 0)
}
else
{
if (local.soldiercount == 6)
{
local.crazysoldier.origin = ( -494 380 467 )
local.crazysoldier.angles = (0 -29 0)
}
else
{
if (local.soldiercount == 7)
{
local.crazysoldier.origin = ( -918 -298 130 )
local.crazysoldier.angles = (0 -8 0)
}
else
{
if (local.soldiercount == 8)
{
local.crazysoldier.origin = ( -176 -643 98 )
local.crazysoldier.angles = (0 34 0)
} // end soldiercount 8
} // end soldiercount7
} // end soldiercount 6
} // end soldiercount 5
} // end soldiercount 4
} // end soldiercount 3
} // end soldiercount 2
} // end soldiercount 1


local.crazysoldier.testanim = idle
local.crazysoldier.mindist = 128
local.crazysoldier.maxdist = 2000
local.crazysoldier.leash = 10000
local.crazysoldier forceactivate
local.crazysoldier.health = 100
local.crazysoldier.sound_awareness = 100
local.crazysoldier.noticescale = 50
local.crazysoldier.fov = 180
local.crazysoldier.hearing = 1600
local.crazysoldier.accuracy = 100f
local.crazysoldier.sight = 4000
local.crazysoldier.weaponnum = 6
if (level.crazysoldier == 1)
local.crazysoldier.health += 25


while (isalive local.crazysoldier)
{
if (local.crazysoldier.enemy == NULL)
{
wait 1
}
else
{
local.crazysoldier exec anim/attack.scr
if (vector_length (local.crazysoldier.origin - local.crazysoldier.enemy.origin) < 100)
{
local.crazysoldier exec anim/default_inithandler.scr local.crazysoldier.enemy
}
wait 1
}
}

end

roundbasedthread:

// Can specify different scoreboard messages for round based games here.

level waitTill prespawn

level waittill spawn

// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw

level waittill roundstart

end


Now go to work GURUS This one is ready for testing on a dedicated server.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
WELL AFTER TESTING HERE IS WHATS CAUSING THE FLAHING DESCRIBED ABOVE. CAN ANYONE TELL ME HOW TO GET AROUND THIS. SO THIS CAN BECAME A FULL FLESH SERVER SIDE MOD.


Hitch warning: 4217 msec frame time
^~^~^ Add the following line to the *_precache.scr map script:
cache models/vehicles/vehiclesoundentity.tik
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_idle_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch2_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Animation 'newanim/models/human/animation/scripted/level_m1l1/truck_twitch_guy01.skc' has duplicate channel 'Base head01 pos'
^~^~^ Add the following line to the *_precache.scr map script:
cache models/human/german_kreigsmarine.tik
Hitch warning: 7910 msec frame time
^~^~^ Add the following line to the *_precache.scr map script:
cache models/items/binoculars.tik
Hitch warning: 1410 msec frame time
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

I dont know about that, but if you wanted them to shoot, all you had to do was go in each ai tik you want, just edit the new_generic_human file, and drag all the npc weapon animations from "include test utils" and place it above that line. and where it says $include models/human/new_generic_human.tik, just change the name of that to the new "generic_human" script you edited.
WarTech
Colour Sergeant
Posts: 88
Joined: Mon May 05, 2003 3:15 am

Da Bots,,Da Bots LOL

Post by WarTech »

Alcoholic wrote:I dont know about that, but if you wanted them to shoot, all you had to do was go in each ai tik you want, just edit the new_generic_human file, and drag all the npc weapon animations from "include test utils" and place it above that line. and where it says $include models/human/new_generic_human.tik, just change the name of that to the new "generic_human" script you edited.
Thanks I will try it.

Yeah all I need is for them to shoot. They already do everything else. If this works it will be 100% server side mod.

BTW. I found a piece of code that will tell the bot or dogs not to attact same team but go after enemy team. Can use it in combination with this script to use bots to keep spawn campers out of the area and make game much more. Once more Thanks.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Please no more than one thread per topic :wink:

/forum/viewtopic.php?t=4283
Image
Locked