how to add bots with fritzbots


(TomTom7777) #21

roam actions are used to ensure bots will patrol over to the node closest to a roam action. When the one action is set as a roam action for both teams then it can ensure that that area will be fought over. But roam actions do have other uses. I recommend at least 2 roams be active in waypoints at any time (in addition to any camp actions). Every class of bot needs an available action or it will stay where it is and complain about goals

Most actions that are objectives must be associated with the related map entity. The action_ent number identifies which map entity (existing in the bsp file or create-d in the map script) the action will listen to. For example; a construct command post action (22) must be set to the entity of the trigger_objective_info of the command post. That way the build final and death events of the command post are listened to by the bots and the aiscript. The console command /viewent (view nearest entity in fritzbot menu) is the easiest way to find the ent number to use. But beware the wrong number may crash ET when the bots join, so save often


(-SSF-Sage) #22

[QUOTE=viktwaar;185881]it works! thanks.

but is raom action just an action to meet eachother and to fight? (sorry for my bad english)
do you need to have these in your map or isn’t it necessary?

when i put in an dynamite action it says i have to give it an entity, what’s that, has it something to do whith GTKradiant?[/QUOTE]

Perhaps you should tell it the targetname of the func_explosive/func_constructible.


(viktwaar) #23

ok, i have given the console the command /viewent, the entity of my wall that must be blown up is 74.
when i give this command /action_ent 0 74 (0 is the number of the action) it means that the action is linked to my wall right? i have placed a roam action behind the wall.

but my bots just want to go to that roam action! they do not blow up the wall, they’re just running against the wall!

this is exactly what i’ve done:

/action_add
add action 0
/action_allies 0 4 (4 means dynamite, blow up the wall in this case, right?)
/viewent

found entity: trigger_objective_info EntNum: 74
/action_ent 0 74

what am i doing wrong?
my bots just want to go to that roam action. maybe i can delete the roam action so that the bots should more “focus” on the dynamite action?


(TomTom7777) #24

Ok the copy of desert7 that I have agrees with your viewent of 74.

an action must be active (available) for the bot to attempt it. There are 3 ways to make an action active at the start of the match.

1- set goaltracker 0
/action_goal 0 0

  • or -
    2- set active by the aiscript
    default
    {
    activateAction 0
    }

  • or -
    3- group the action with other actions /action_group 0 1 and activate the group in the aiscript

    default
    {
    activateAction_group 1
    }

You will also want to set the defuse action too
/action_axis 0 5
And make the action remain active until complete
/action_active 0 1
(action_active does not activate, it prevents deactivation by other objective actions)

and maybe restrict the radius if the plant needs to be closer to the wall (ex. /action_radius 0 40)

BTW the action parameters can be combined when you first add the action
/action_add <action_axis#> <action_allies#> <action_radius#> <action_ent#> <action_active#> <action_group#> <action_goal#>
So the main door /view_ent of 84, means you can add a dynamite-defuse action there by
/action_add 5 4 40 84 1 2 0
Or if you want to delay its activation until after the wall
/action_add 5 4 40 84 1 2 -1
then activate in the aiscript
action 0 //triggered when wall is dynamited
{
activateAction_group 2 //move on to the main door
}


(viktwaar) #25

ok, thanks. my bots works.
but there’s another thing. i have focused more on scripting and this is my aiscript:

MAPTYPE 0

bot_SightDist 1700 //how far the highest skill bot can see on this map

spawnflag_is_priority 0 //should bots focus on spawnflags?

cmdpost_is_priority 0 //are cmdposts critical on this map?

construct_is_priority 1 //should engs focus more on constructibles

map_has_vehicle 0 //does this map have a tank or a train?

action 0
{
node_connect 87 88 true
node_connect 88 87 true
deactivateAction 0
}

action 1
{
node_connect 92 93 true
node_connect 93 92 true
deactivateAction 1
}

#EOF

everything goes fine when i start up my map and wait for the 60 warmup seconds.
but after the warmup ET crashes, i get this error “ET.exe is not working anymore.”
i guess it has something to do with the aiscript, but i don’t know what it is.

thank in advance, viktwaar


(viktwaar) #26

i found out it has nothing to do with my script.
i think it has something to do with the nav.file.
but the Waypoint’s tool says everything is fine.
is there a limit of action in your map?


(TomTom7777) #27

MAPTYPE # is not used in FritzBot ET. It is only used in RTCW FritzBots. Also note that FritzBot for RTCW uses different numbers for action types.

The most likely cause of ET crashing is a bad Ent number. All red nodes should be 1023 (default) except for check/spawn flag nodes (none that I saw in desert7). All yellow nodes should match the map entity they are associated with (i.e. the correct trigger_objective_info entity number for dynamite, defuse, command post, and construct actions ). Actions not needing ent numbers should be 1023 (default)

BTW dynamite actions on normal dynamite objectives do not need things like your deactivateAction 0. Because they are connected to func_explosives, they are one time only. If you see your engineers planting dynamite at an already blown objective then the Action_ent number is likely incorrect.

In rare cases a mapper uses a func_construct with a one-time dynamite objective (probably having changed it from a construction objective). Using a action_plant_construct generally fixes those cases. On desert7 all the dynamite objectives I saw were regular style func_explosive connected so you don’t need this fix.

An alternate way to detect the dynamite going off is to monitor the associated func_explosive with a event_explode action. For instance at the wall on the copy of desert7 that I have, I can add the following (above the dynamite action previously added)

/action_add 34 34 10 75 1 0 0

I like to monitor the func_explosive for the aiscript for a couple of reasons. It avoids a rarely seen bug in dynamite actions that are set to goal -1, and it does not have to be activated by the aiscript.


(twt_thunder) #28

why fritzbots and not omni-bots?