IPB

Welcome Guest ( Log In | Register )

> Scripting, how scripting for CP maps will be done
Cheeseh
post Jul 4 2009, 10:37 PM
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 biggrin.gif and the rest . . . As I'm going to scrap the old method.

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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Geralt
post Jul 12 2009, 10:13 AM
Post #2


RCBot Fan
****

Group: Waypointers
Posts: 198
Joined: 6-February 09
From: Australia
Member No.: 1,465



Not yet, my friend.. not yet. tongue.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic
Cheeseh   Scripting   Jul 4 2009, 10:37 PM
naMelesS   Is that cp_dustbowl code thingy is going to be wor...   Jul 5 2009, 03:51 AM
Geralt   The next release version will be 0.5, I believe. ...   Jul 5 2009, 04:11 AM
naMelesS   The next release version will be 0.5, I believe. ...   Jul 6 2009, 11:50 AM
Geralt   When I finish waypointing. :) I'll be quick, d...   Jul 6 2009, 11:54 AM
Fillmore   When I finish waypointing. :) I'll be quick, ...   Jul 8 2009, 01:03 PM
Geralt   I still have a couple of maps left to waypoint - i...   Jul 8 2009, 01:10 PM
JohnnyAxe   I still have a couple of maps left to waypoint - ...   Jul 8 2009, 01:19 PM
naMelesS   I still have a couple of maps left to waypoint - ...   Jul 12 2009, 08:21 AM
Fillmore   Does it include cp_orange_x4 too D:? Official ve...   Jul 12 2009, 10:04 AM
Geralt   No. The maps in the next version will be: cp_dust...   Jul 12 2009, 09:24 AM
naMelesS   No. The maps in the next version will be: cp_dus...   Jul 13 2009, 07:44 AM
Geralt   Not yet, my friend.. not yet. :P   Jul 12 2009, 10:13 AM
Fillmore   Not yet, my friend.. not yet. :P Been waiting si...   Jul 12 2009, 10:16 AM
Geralt   Yeah I've been quite busy, really. I won't...   Jul 12 2009, 10:35 AM
Geralt   cp_badlands* Oops. :D   Jul 13 2009, 08:05 AM
naMelesS   Geralt, is there a scripts which i can make the bo...   Jul 13 2009, 11:51 AM
Fillmore   Geralt, is there a scripts which i can make the b...   Jul 13 2009, 02:09 PM
naMelesS   Thanks buddy, your cool :D. btw. Do you have the ...   Jul 14 2009, 10:46 AM
Fillmore   Thanks buddy, your cool :D. btw. Do you have the...   Jul 14 2009, 12:11 PM
Geralt   Not that I know of... you can easily just bind ...   Jul 13 2009, 12:29 PM
KeReMiD4O   Are there any bots for the FF version? And when is...   Jul 15 2009, 09:47 AM
Fillmore   Are there any bots for the FF version? And when i...   Jul 15 2009, 12:28 PM
Cheeseh   There isn't Rcbot2,but Omnibot exists on it. ...   Jul 15 2009, 02:47 PM
Fillmore   Can you give us information about what maps still ...   Jul 16 2009, 01:11 PM
Geralt   Just be patient - the longer you wait, the better ...   Jul 16 2009, 01:15 PM
JohnnyAxe   Just be patient - the longer you wait, the better...   Jul 16 2009, 09:29 PM
mehdichallenger   i am using this cod for cp_steel: # # RCBot2 Scr...   Jul 28 2009, 02:50 PM
Cheeseh   i am using this cod for cp_steel: # # RCBot2 Scri...   Jul 28 2009, 05:52 PM
mehdichallenger   make sure that the capture point at point A is ...   Jul 28 2009, 06:33 PM
Cheeseh   yes the capture point A is "area 0"and ...   Jul 28 2009, 07:58 PM
Fillmore   its a waypoint issue for the moment just type in...   Jul 29 2009, 01:35 AM
naMelesS   This is my cp_orange_x3 code, i dont know if its r...   Aug 1 2009, 01:30 PM
Fillmore   This is my cp_orange_x3 code, i dont know if its ...   Aug 1 2009, 04:33 PM
naMelesS   if the map doesn't have setup,you dont need t...   Aug 1 2009, 04:41 PM
Fillmore   Sorry, I don't know much about bot scriptings...   Aug 1 2009, 09:35 PM
naMelesS   Sure thanks.   Aug 4 2009, 12:32 PM
naMelesS   ok,I just need to get the map,peak at the map and...   Aug 7 2009, 12:45 PM
Fillmore   Umm, its my scripts done..?? just checking. # # R...   Aug 7 2009, 01:58 PM
naMelesS   # # RCBot2 Script ORANGE_X3 CP # # :on_reset: blu...   Aug 7 2009, 02:40 PM
Fillmore   The bots still seems to have a problem, the red b...   Aug 7 2009, 11:03 PM
naMelesS   You could give me your CP areas (From RED to BLU)...   Aug 8 2009, 01:20 AM
Fillmore   Umm, CP areas? sorry 'bout that. meant to sa...   Aug 8 2009, 02:16 AM
naMelesS   sorry 'bout that. meant to say that what are ...   Aug 8 2009, 07:37 AM
Cheeseh   From Blu Starting point - Control Point 5! Ar...   Aug 8 2009, 09:54 AM
Fillmore   From Blu Starting point - Control Point 5! Ar...   Aug 8 2009, 02:36 PM
Cheeseh   use rcbot waypoint shitfareas. doesn't that a...   Aug 9 2009, 01:33 AM
naMelesS   Adds 1 to all . But also the script itself needs ...   Aug 9 2009, 04:39 AM
wyn10   ok,I just need to get the map,peak at the map and...   Aug 5 2009, 12:21 AM
Fillmore   Here's the link for the map: http://www.media...   Aug 5 2009, 01:43 AM
wyn10   what are the areas for the capture points? From R...   Aug 7 2009, 12:20 AM
Fillmore   You mean the name for each cp? the areas you gav...   Aug 7 2009, 01:04 PM
MarD   Heyyo, So Cheeseh.. I've been working on pl_g...   Aug 29 2009, 03:02 AM
Geralt   Yeah - I've been extremely busy recently, not ...   Aug 29 2009, 06:09 AM
MarD   Heyyo, Yeah - I've been extremely busy recen...   Aug 30 2009, 03:52 AM
Cheeseh   Heyyo, Cool beans, I'll do it for the maps si...   Aug 30 2009, 11:28 AM
MarD   Heyyo, Hi mard, its good to see you around, sorr...   Sep 1 2009, 03:53 AM
wyn10   Could that orange x3 script be fixed, or can someo...   Sep 2 2009, 11:30 PM
Cheeseh   Could that orange x3 script be fixed, or can some...   Sep 3 2009, 07:04 PM
DrPuffinKind   just move the areas up by one, [code] # # RCBot2...   Sep 5 2009, 01:58 AM
MarD   Heyyo, One thing I realized is atm the script mig...   Sep 10 2009, 12:20 AM
Cheeseh   Heyyo, One thing I realized is atm the script mi...   Sep 10 2009, 11:40 AM
Fillmore   Yeah I know of this problem, it will require a ch...   Sep 10 2009, 12:01 PM
MarD   Heyyo, Does PL scripting work/will it be added i...   Oct 1 2009, 07:24 AM
Sjru   Hello there, i've realised that rcbot now has ...   Oct 13 2009, 12:28 AM
Fillmore   Hello there, i've realised that rcbot now has...   Oct 13 2009, 12:27 PM
Fillmore   I'm having some problems with my payload scrip...   Oct 20 2009, 05:14 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th June 2025 - 11:45 AM