IPB

Welcome Guest ( Log In | Register )

4 Pages V  1 2 3 > »   
Reply to this topicStart new topic
> 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
naMelesS
post Jul 5 2009, 03:51 AM
Post #2


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



Is that cp_dustbowl code thingy is going to be work on rcbot 0.46 beta o.O?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Geralt
post Jul 5 2009, 04:11 AM
Post #3


RCBot Fan
****

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



The next release version will be 0.5, I believe.

And I'm assuming it will.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Jul 6 2009, 11:50 AM
Post #4


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



QUOTE(Geralt @ Jul 5 2009, 12:11 PM) *

The next release version will be 0.5, I believe.

And I'm assuming it will.


So when the next version going to be release???
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Geralt
post Jul 6 2009, 11:54 AM
Post #5


RCBot Fan
****

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



When I finish waypointing. smile.gif I'll be quick, don't worry! tongue.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Fillmore
post Jul 8 2009, 01:03 PM
Post #6


RCBot Guru
*****

Group: Waypointers
Posts: 447
Joined: 1-April 09
Member No.: 1,511



QUOTE(Geralt @ Jul 6 2009, 11:54 AM) *

When I finish waypointing. smile.gif I'll be quick, don't worry! tongue.gif

How near are you in finishing, if I can ask?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Geralt
post Jul 8 2009, 01:10 PM
Post #7


RCBot Fan
****

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



I still have a couple of maps left to waypoint - it does get very tedious, y'know. I'll try and finish by Friday - if not by then, then Monday.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
JohnnyAxe
post Jul 8 2009, 01:19 PM
Post #8


Member
**

Group: Members
Posts: 33
Joined: 7-July 09
From: Portugal
Member No.: 1,604



QUOTE(Geralt @ Jul 8 2009, 02:10 PM) *

I still have a couple of maps left to waypoint - it does get very tedious, y'know. I'll try and finish by Friday - if not by then, then Monday.


Sweet! Can't wait for it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Jul 12 2009, 08:21 AM
Post #9


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



QUOTE(Geralt @ Jul 8 2009, 09:10 PM) *

I still have a couple of maps left to waypoint - it does get very tedious, y'know. I'll try and finish by Friday - if not by then, then Monday.


Does it include cp_orange_x4 too D:?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Geralt
post Jul 12 2009, 09:24 AM
Post #10


RCBot Fan
****

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



No. The maps in the next version will be:

cp_dustbowl
cp_well
cp_badwater
pl_goldrush
pl_badwater
pl_hoodoo
plr_pipeline
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Fillmore
post Jul 12 2009, 10:04 AM
Post #11


RCBot Guru
*****

Group: Waypointers
Posts: 447
Joined: 1-April 09
Member No.: 1,511



QUOTE(naMelesS @ Jul 12 2009, 08:21 AM) *

Does it include cp_orange_x4 too D:?

Official version never have custom map waypoints.
With your comment, Geralt,does that mean you're finished?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Geralt
post Jul 12 2009, 10:13 AM
Post #12


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
Fillmore
post Jul 12 2009, 10:16 AM
Post #13


RCBot Guru
*****

Group: Waypointers
Posts: 447
Joined: 1-April 09
Member No.: 1,511



QUOTE(Geralt @ Jul 12 2009, 10:13 AM) *

Not yet, my friend.. not yet. tongue.gif

Been waiting since the Friday or Monday comment,rewaypointed Badwater, BUT I waypointed Gravelpit,Junction and Steel JUST for the excitement of the CP support finally coming out sad.gif
So,I can get a little impatient tongue.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Geralt
post Jul 12 2009, 10:35 AM
Post #14


RCBot Fan
****

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



Yeah I've been quite busy, really. I won't tell you how close I am to finishing. (Since I'm not close at all).
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Jul 13 2009, 07:44 AM
Post #15


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



QUOTE(Geralt @ Jul 12 2009, 05:24 PM) *

No. The maps in the next version will be:

cp_dustbowl
cp_well
cp_badwater
pl_goldrush
pl_badwater
pl_hoodoo
plr_pipeline


cp_badwater o.O?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Geralt
post Jul 13 2009, 08:05 AM
Post #16


RCBot Fan
****

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



cp_badlands*

Oops. biggrin.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Jul 13 2009, 11:51 AM
Post #17


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



Geralt, is there a scripts which i can make the bots auto join or something..?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Geralt
post Jul 13 2009, 12:29 PM
Post #18


RCBot Fan
****

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



Not that I know of... you can easily just bind 'rcbot addbot' to a key though.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Fillmore
post Jul 13 2009, 02:09 PM
Post #19


RCBot Guru
*****

Group: Waypointers
Posts: 447
Joined: 1-April 09
Member No.: 1,511



QUOTE(naMelesS @ Jul 13 2009, 11:51 AM) *

Geralt, is there a scripts which i can make the bots auto join or something..?

make a .cfg file in the tf/cfg folder.
add the bot stuff in it.
load it on tf2,and you get the bots.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
naMelesS
post Jul 14 2009, 10:46 AM
Post #20


Member
**

Group: Members
Posts: 46
Joined: 24-June 09
Member No.: 1,585



Thanks buddy, your cool biggrin.gif.

btw. Do you have the rcbot2 for the fortress forever version..?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

4 Pages V  1 2 3 > » 
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 - 12:35 PM