![]() |
![]() |
Cheeseh |
![]() ![]()
Post
#1
|
![]() Admin ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 ![]() |
Note: This is going to be a way of getting bots to work with custom/changeable TF2 CP/PL/PLR maps,
This is an example of a working CP Script with the latest SVN for CP_Dustbowl CODE # # RCBot2 Script DUSTBOWL CP # # :setup_time:60 :on_reset: blue_attack:1 blue_defend:0 red_attack:0 red_defend:1 areas:1,2,8 # # STAGE ONE # CAP ONE :on_blue_cap:#Dustbowl_cap_1_A red_attack:0 red_defend:2 blue_attack:2 blue_defend:0 areas:1,2,9 :on_blue_cap:#Dustbowl_cap_1_B red_attack:0 red_defend:3 blue_attack:3 blue_defend:0 areas:3,4,10 # # STAGE TWO # :on_blue_cap:#Dustbowl_cap_2_A red_attack:0 red_defend:4 blue_attack:4 blue_defend:0 areas:3,4,11 :on_blue_cap:#Dustbowl_cap_2_B red_attack:0 red_defend:5 blue_attack:5 blue_defend:0 areas:5,6,7 # # STAGE THREE # :on_blue_cap:#Dustbowl_cap_3_A red_attack:0 red_defend:6 blue_attack:6 blue_defend:0 areas:5,6 The numbers represent the "Waypoint areas", The most important are the red_attack/blue_attack/blue_defend/red_Defend as these denote the capture point waypoint areas, there should be waypoints with "capture point" type and area number related to the number in this script. :setup_time:<time> is the GLOBAL setup time in seconds at the moment, this may be changed to per point. :on_reset: is a global flag state which happens when a round completely restarts (.e.g first dustbowl cap/new cp_badlands round) :on_blue_cap:<Cap name> is what happens when BLUE captures the point with <cap name> (look at these later) :on_red_cap:<Cap name> is what happens when RED captures the point with <cap name> (look at these later) To define what happens when a point is captured I use these red_attack:<waypoint area> blue_attack<waypoint area> red_defend:<waypoint area> blue_defend:<waypoint area> The bots will go to these waypoint capture areas with the appropriate Defend/Attack style depending on which team they are, the names are self explanatory Cap names You can get these by putting "rcbot debug gameevent 1" on and playing on a team, go to a capture point and capture it. Eventually the "point captured" event will happen and it will have a "cpname", this is the capture point name. For example: On well there are #Well_cap_blue_two = 0 #Well_cap_blue_rocket = 1 #Well_cap_center = 2 #Well_cap_red_two = 3 #Well_cap_red_rocket = 4 Perhaps someone could make up a script for this ![]() areas is used to determine what waypoints are valid when a point is captured, for example some waypoints may be unreachable after CP_dustbowl stage 1, 2 etc . . . All flagged waypoints should have an area related to the " reachability " of it . . . e.g. If I want a sentry waypoint on CP_Dustbowl on stage 1 I will give it an area of 1 or 2. If I want it on stage 2 I will give it area 3 or 4, (See the script above) Area 0 Waypoints with area of "0" are generally accessible, or ignored. for example: blue_attack:0 (or red_attack:0) , will mean the team has no attack areas at this time. |
![]() ![]() |
mehdichallenger |
![]()
Post
#2
|
![]() Member ![]() ![]() Group: Members Posts: 27 Joined: 16-April 09 From: iran Member No.: 1,523 ![]() |
i am using this cod for cp_steel:
# # RCBot2 Script STEEL CP # # :setup_time:60 :on_reset: blue_attack:1 blue_defend:0 red_attack:0 red_defend:1 :on_blue_cap:Cap A, The front door dock red_attack:0 red_defend:2 blue_attack:2 blue_defend:0 :on_blue_cap:Cap B, the Red Shed spawn red_attack:0 red_defend:3 blue_attack:3 blue_defend:0 :on_blue_cap:Cap C, The bridge controls red_attack:0 red_defend:4 blue_attack:4 blue_defend:0 :on_blue_cap:Cap D, Red spawn door to E red_attack:0 red_defend:5 blue_attack:5 blue_defend:0 :on_blue_cap:Cap E, The main point red_attack:0 red_defend:6 blue_attack:6 blue_defend:0 ---------------------------------------------------------- i don't know its true or false, but when i test it blue team go to "Cap B, the Red Shed spawn" without getting in "Cap A, The front door dock" whats problem. |
Cheeseh |
![]()
Post
#3
|
![]() Admin ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 ![]() |
i am using this cod for cp_steel: # # RCBot2 Script STEEL CP # # :setup_time:60 :on_reset: blue_attack:1 blue_defend:0 red_attack:0 red_defend:1 :on_blue_cap:Cap A, The front door dock red_attack:0 red_defend:2 blue_attack:2 blue_defend:0 :on_blue_cap:Cap B, the Red Shed spawn red_attack:0 red_defend:3 blue_attack:3 blue_defend:0 :on_blue_cap:Cap C, The bridge controls red_attack:0 red_defend:4 blue_attack:4 blue_defend:0 :on_blue_cap:Cap D, Red spawn door to E red_attack:0 red_defend:5 blue_attack:5 blue_defend:0 :on_blue_cap:Cap E, The main point red_attack:0 red_defend:6 blue_attack:6 blue_defend:0 ---------------------------------------------------------- i don't know its true or false, but when i test it blue team go to "Cap B, the Red Shed spawn" without getting in "Cap A, The front door dock" whats problem. make sure that the capture point at point A is "Area 1" and B "Area 2", I think maybe that might be the problem, just might need to move all the areas up by 1, because 0 is ignored, even though u don't have it in the script, there still might be a CP Waypoint with area 0 which will cause problems. |
mehdichallenger |
![]()
Post
#4
|
![]() Member ![]() ![]() Group: Members Posts: 27 Joined: 16-April 09 From: iran Member No.: 1,523 ![]() |
make sure that the capture point at point A is "Area 1" and B "Area 2", I think maybe that might be the problem, just might need to move all the areas up by 1, because 0 is ignored, even though u don't have it in the script, there still might be a CP Waypoint with area 0 which will cause problems. yes the capture point A is "area 0"and B is"area 1" so when you fix this problem? |
Cheeseh |
![]()
Post
#5
|
![]() Admin ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 3,066 Joined: 11-September 03 From: uk Member No.: 1 ![]() |
|
Fillmore |
![]()
Post
#6
|
![]() RCBot Guru ![]() ![]() ![]() ![]() ![]() Group: Waypointers Posts: 447 Joined: 1-April 09 Member No.: 1,511 ![]() |
|
naMelesS |
![]()
Post
#7
|
![]() Member ![]() ![]() Group: Members Posts: 46 Joined: 24-June 09 Member No.: 1,585 ![]() |
This is my cp_orange_x3 code, i dont know if its right or wrong. Please help me to correct
# # RCBot2 Script ORANGE_X3 CP # # :setup_time:0 :on_reset:0 blue_attack:3 blue_defend:0 red_attack:3 red_defend:0 areas:0,3 # # # :on_blue_cap:#Control Point 4! red_attack:3 red_defend:4 blue_attack:4 blue_defend:3 areas:0,1,2 :on_red_cap;#Control Point 4! red_attack:2 red_defend:3 blue_attack:3 blue_defend:2 areas:0,3,4 # # # :on_blue_cap:#Control Point 3! red_attack:3 red_defend:4 blue_attack:4 blue_defend:3 areas:0,3,4 :on_red_cap:#Control Point 3! red_attack:2 red_defend:3 blue_attack:3 blue_defend:2 areas:0,2,3 # # # :on_blue_cap:#Control Point 2! red_attack:4 red_defend:5 blue_attack:5 blue_defend:4 areas:0,4,5 :on_red_cap:#Control Point 2! red_attack:3 red_defend:4 blue_attack:4 blue_defend:3 areas:0,3,4 # # # :on_blue_cap:#Control Point 4! red_attack:2 red_defend:3 blue_attack:3 blue_defend:2 areas:0,2,3 :on_red_cap:#Control Point 4! red_attack:1 red_defend:2 blue_attack:2 blue_defend:1 areas:0,1,2 The red bots seems to be running to the 2nd capture point at the blu area. |
Fillmore |
![]()
Post
#8
|
![]() RCBot Guru ![]() ![]() ![]() ![]() ![]() Group: Waypointers Posts: 447 Joined: 1-April 09 Member No.: 1,511 ![]() |
This is my cp_orange_x3 code, i dont know if its right or wrong. Please help me to correct # # RCBot2 Script ORANGE_X3 CP # # :setup_time:0 :on_reset:0 blue_attack:3 blue_defend:0 red_attack:3 red_defend:0 areas:0,3 # # # :on_blue_cap:#Control Point 4! red_attack:3 red_defend:4 blue_attack:4 blue_defend:3 areas:0,1,2 :on_red_cap;#Control Point 4! red_attack:2 red_defend:3 blue_attack:3 blue_defend:2 areas:0,3,4 # # # :on_blue_cap:#Control Point 3! red_attack:3 red_defend:4 blue_attack:4 blue_defend:3 areas:0,3,4 :on_red_cap:#Control Point 3! red_attack:2 red_defend:3 blue_attack:3 blue_defend:2 areas:0,2,3 # # # :on_blue_cap:#Control Point 2! red_attack:4 red_defend:5 blue_attack:5 blue_defend:4 areas:0,4,5 :on_red_cap:#Control Point 2! red_attack:3 red_defend:4 blue_attack:4 blue_defend:3 areas:0,3,4 # # # :on_blue_cap:#Control Point 4! red_attack:2 red_defend:3 blue_attack:3 blue_defend:2 areas:0,2,3 :on_red_cap:#Control Point 4! red_attack:1 red_defend:2 blue_attack:2 blue_defend:1 areas:0,1,2 The red bots seems to be running to the 2nd capture point at the blu area. if the map doesn't have setup,you dont need the setup time mark. on_reset should not have any marks after it. Why's Control Point 4 twice on the script? |
naMelesS |
![]()
Post
#9
|
![]() Member ![]() ![]() Group: Members Posts: 46 Joined: 24-June 09 Member No.: 1,585 ![]() |
|
Fillmore |
![]()
Post
#10
|
![]() RCBot Guru ![]() ![]() ![]() ![]() ![]() Group: Waypointers Posts: 447 Joined: 1-April 09 Member No.: 1,511 ![]() |
Sorry, I don't know much about bot scriptings, could you help me with that.? ok,I just need to get the map,peak at the map and then lend a hand. I'll edit this message when I'm done. EDIT: The map apparently works like Granary,but both teams have 1 control point. At the rounds start,both teams attack capture point with the area "3". According to your script, Capture point with area "3" IS BLU's 2nd point. Just mod the script so the RED bots will cap their second point,and your script will function. |
naMelesS |
![]()
Post
#11
|
![]() Member ![]() ![]() Group: Members Posts: 46 Joined: 24-June 09 Member No.: 1,585 ![]() |
ok,I just need to get the map,peak at the map and then lend a hand. I'll edit this message when I'm done. EDIT: The map apparently works like Granary,but both teams have 1 control point. At the rounds start,both teams attack capture point with the area "3". According to your script, Capture point with area "3" IS BLU's 2nd point. Just mod the script so the RED bots will cap their second point,and your script will function. Umm, its my scripts done..?? just checking. |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 25th June 2025 - 02:28 PM |