Fritzbot ET waypointing tutorial
From Bots-United Wiki
This topic for FritzBot ET is Still under some construction.
To learn how to waypoint Denny has created a tutorial for the RTCW version of FritzBot. This wiki topic forms a lesson plan that makes use of that RTCW tutorial and corrects and expands on it for ET waypointers. With each lesson it is expected that you will do some practice on your own in a basic map you want to waypoint (or practice on a map somebody else has already waypointed).
Contents[hide] |
Getting to know the Basics
- Read the RTCW tutorial section 1 first [1] (right click and open in a new window or tab is best). (An ET version of the tutorial is currently under construction)
- Learn what is different in ET
- Take the test
What is different in ET
(If you read/used the RTCW tutorial)
- "Routes are triggers that tell the bots that they must take a certain path to the routes linked action (which usually is an objective action) we'll cover this more in the route section". In ET, routes can have more than one action defined per route which is especially useful to encourage other classes of bots to use the same path as the engineer to say, man some nearby protective camps. More on routes later.
- WolfMP.exe is the RTCW equivalent to ET.exe and the ET console will differ somewhat from the image in the tutorial.
- Besides the console command /timelimit, the referee menu can also change the match's timelimit (ESC:REFEREE:MISC:time limit, OK).
- The ESC menu also provides the FRITZBOT submenu. In this submenu you can run console commands for the editor (without opening the console). Replacing the need to remember /node_editor 1, /node_drawhud 1, /node_vis 1, /vid_restart.
Test your knowledge
- How do you open the console for typing commands ?
- How do you open the FritzBot submenu ?
- What is the color of the vertical spindle of an action ?
- What does the green number immediately above a vertical spindle refer to?
- Give 2 possible reasons why you can't see an action you just added ?
- What server (sv) setting must you use when waypointing ?
Basic Waypointing - Placing Nodes
- Read the RTCW tutorial section 2 first [2]#
- Learn what is different in ET
- Take the test
What is different in ET
- "\Program Files\Return to Castle Wolfenstein\fritzbot\bots\maps directory" is the typical RTCW directory that you save to. In ET the typical directory is \Program Files\Wolfenstein - Enemy Territory\fritzbot\bots\maps. If you installed your game in a different directory then look for the \fritzbot\bots\maps directory inside your installed directory.
Test your knowledge
- What does /node_connect 3 2 do?
- What does it mean if a line goes from the bottom of red spindle #4 to the top of red spindle #40 ?
- How far apart should directly connected nodes be placed?
- How do you write your waypoints to the hard drive?
- How many other nodes can one node directly connect to if using 2 way connections?
Advanced Waypointing
- Read the RTCW tutorial section 3 first [3]#
- Learn what is different in ET
- Take the test
- Extra credit
What is different in ET
- Typo alert: "/node_deafultradius 50 " should be /node_defaultradius 50.
- in Environmental waypoints
- The planned support for buttons was not implemented in FritzBot ET (I am not certain how much support there is in RTCW). In ET maps there are a number of different ways such player-operated-controls may have been implemented by the mapper. This makes supporting them more difficult since they won't be all the same type of entity object. Some maps use the same object that a door uses, some a specialized button object and others use a third type of object. For this reason button support in FritzBot ET involves special modification to the map script file. Modifying the map script file is an advanced topic beyond the scope of this article. (Advanced waypointer's topic FritzBot_Buttons_And_Levers).
- in Node Flags
- Node Flag Values in FritzBot ET use discrete integer values whereas FritzBot RTCW use values that are powers of 2. Consequently in FritzBot RTCW the value 4 indicates a flag node but in FritzBot ET value 3 is used. Also the use of the words jump and leap' are not consistent in the 2 versions so for a dangerous damage inflicting case values 16 and 6 are used in RTCW and ET respectively, while a simple gap needs flag values 32 and 5 respectively. FritzBot ET also supports the walk flag (value 9).
- in Miscellaneous Stuff:
- FritzBot ET does provide a couple of ways to remove barriers unlike the RTCW version (Advanced waypointer's topic Fritzbot_Map_Scripting#Barrier_Removal).
- FritzBot does provide support for one team using a script mover at any given moment. Currently Trams and trains remain a problem, but trucks and tanks work well.
- in Console Command Quick Lookup:
- The node_flag values in ET use discrete integer values while in the RTCW version the values are powers of 2 (like bit flags). So a node_flag value for a nearby flag action is 3 in FritzBot ET (but 4 in RTCW).
- The use of jump and leap are reversed with respect to node_flags. In FritzBot ET node_leap (6) means the jump will damage the bot while in RTCW node_flag value 16 refers to a dangerous damage inflicting jump.
Test your knowledge
- What is a common reason for a bot to backtrack a little when navigating a simple path?
- Which team (Axis or Allies) does /node_team 2 0 refer to?
- Name two of the commands that begin /node_... that do not need a node num (node ID) as a parameter.
- This pair of screenshots have some likely waypointing errors. Can you spot them all?
Extra Credit
More detailed examples of ladder waypointing can be found in the topic Waypointing_Ladders.
Adding FritzBot Actions
- Read the RTCW tutorial section 4 first [4]#
- Learn what is different in ET
- Take the test
- Extra credit
What is different in ET
- in Basic Info:
- ET maps are often larger or more complex so the number of actions will generally be more than 50, say closer to a hundred (256 is the limit). It is best to have some minimum actions (roam, camp...) available to both teams at all stages of the game.
- in Action HUD & Finding Action Info:
- in The Goal Tracker & Group ID's
- Actions in ET typically are activated by the aiscript rather than the goal_tracker (except initial goal 0 actions).
- Action groups in RTCW version of FritzBot are replaced essentially by the action_goal in FritzBot ET
- Action_group in FritzBot ET are NOT activated by the goal tracker.
- Read the wiki topic Fritzbot_Goal_Tracker for more on the goal tracker in FritzBot ET.
- in Setting Action Tasks
- Action types in ET use discrete integer values (like an enum), whereas FritzBot RTCW action types are defined by numbers that are powers of 2 (like a bit flag).
- in Other Camp Actions:
- FritzBot ET also support camps for the mobile mg42 soldier.
- FritzBot ET has 2 types of fixed mg42 actions.
- FritzBot ET has satchel and smoke can actions for coverts
- FritzBot has many more actions, see the main page FritzBot_ET_Creating_Waypoints#Action_Types
- The output of /viewents is slightly different in FritzBot ET.
- in Action Classes:
- FritzBot ET action_class value of 16 refers to CovertOps. (And for Lts read FieldOps).
- in Setting an Actions Nearest Node:
- Typically in FritzBot ET action_move will change the closenode value. However you are still advised to verify it.
- in Console Command Quick Lookup
- /action_axis 4 1 will work in FritzBot ET as an Axis MG42 action. This should not however be confused with an MG42 camp action that FritzBot also supports. (i.e. /action_axis 4 18)
- /action_allies 4 2048 becomes /action_allies 4 12 in FritzBot ET
Test your knowledge
- What is a suitable radius for a typical camp action?
- How do you find the next number for the command /action_add 4 5 30...?
- What actions should be set action goal zero?
- Why is action_closenode important?
- Advanced waypointer Questions:
- What is the difference between /action_info and /g_action_info?
- What is the difference between /action_class 1 0 and /action_class 1 31 ?
- Name two examples where /action_ent does not refer to map entities.
Extra Credit
More information on ET actions can be found in the main wiki topics;
- FritzBot_ET_Creating_Waypoints#Action_Basic_Concepts
- FritzBot_ET_Creating_Waypoints#Action_Groups and
- FritzBot_ET_Creating_Waypoints#Action_Classes.
Adding Routes
- Read the RTCW tutorial section 5 first [5]#
- Learn what is different in ET
- Take the test
- Extra credit
What is different in ET
- in Route HUD
- in Adding Routes
- You can add 64 route nodes to a FritzBot ET waypoint (instead of 12)
- in Setting a Routes Target Action
- Routes in ET can have up to 6 associated actions (compared to just 1 for RTCW)
- Routes are only followed when properly placed at the points where bots chose their next goal.
- in Route Radius
- Tip: To verify that the route radius covers all spawns you can view the spawn points for your team with /mal_showSpawns 1 and then set the waypoint editor to show the radii instead of the connects.
- in Alt Roam Actions
- /action_axis 44 9 becomes /action_axis 44 17 in FritzBot ET to reflect the different action numbering.
- A route can chain to a secondary route. This is discussed in The_Route_System.
- in Console Command Quick Lookup
- /route_action <route#> <action#> in FritzBot RTCW becomes /route_action <route#> <action1#> <action2#> <action3#> <action4#> <action5#> <action6#> in FritzBot ET since more actions per route node are possible.
Test your knowledge
Extra Credit
More information on ET routes can be found in the wiki topicThe_Route_System.
Writing the Aiscript
- Read the RTCW tutorial section 6 first [6]#
- Learn what is different in ET
- Take the test
- Extra credit
What is different in ET
- FritzBot ET aiscripts do not begin with the global keyword Maptype. Instead they begin with 5 global statements and if a vehicle is used 2 additional statements
- The first action test block in FritzBot ET (after the global parameters) is the default action block. Here anything always needed early in the map but not activated with/from a goal 0 setting is added. Mainly used for delayed or sequenced initial actions etc. If empty the block can be omitted.
- The path \Program Files\Return to Castle Wolfenstein\fritzbot\bots\scripts becomes \Program Files\Wolfenstein - Enemy Territory\fritzbot\bots\scripts (if that is where you installed your ET game).
- The limit of 64 Action tests in FritzBot RTCW (really?) becomes 16 currently in ET (expanded to 32 in the experimental beta).
- The limit of 128 keywords in FritzBot RTCW becomes a limit of 256 in FritzBot ET.
- bot_switchToWeap venom does not apply to FritzBot ET. FritzBot ET does not seem to support the command bot_switchToWeap at all (You should see an error in the console where the aiscript is loaded).
- Conditionals statements in FritzBot ET can have 2 conditions per line tied together using either AND and OR keywords
- Like FritzBot RTCW only a single statement follows each conditional line. However the wait keyword is considered a modifier and does not count towards that limit.
- The Aiscript in FritzBot ET is very much expanded. Please read the aiscript section in the main topic FritzBot_ET_Creating_Waypoints#AI_Scripts.
Test your knowledge
Extra Credit
More information on ET aiscripting can be found in the main wiki topic FritzBot_ET_Creating_Waypoints#AI_Scripts. Once you start testing your waypoints you may also want to read Debugging_Aiscripts.
Tools and Files
Rather than go through correcting the last 2 pages of Denny's tutorial I think it is best to refer you to the main FritzBot_ET_Creating_Waypoints topic and to Hobbit's ET Waypoint Tool web page. The waypointing tool is a very important tool for verification and for writing the aiscript. It can also help in mass edits of things like re-assigning action groups or goal nums. It has 3 useful tools for (1) making bots files (2) comparing 2 versions of a maps nav files, and (3) a map bsp reader for finding ent nums and other advanced info.
Finals
OK, no more tests just more homework. By now you will have read most of the main FritzBot_ET_Creating_Waypoints topic in pieces. Now is a good time to read it again from beginning to end and cover anything you may have missed. Next open up the FritzBot ET category index [7] and check out the number of topics available. There are many special advanced topics as well as some addendum type reference topics. These you can comeback to read when you are ready to learn more. But right now you should be practicing what you learned in your chosen map. And don't be afraid to ask for help from the older waypointers. So now go play, your bot buddies are waiting for you.
Answers to Test questions
Test1: Getting to know the Basics
- How do you open the console for typing commands ? The console can be opened with the tilde key (~) to one of 3 sizes. Tilde by itself opens the console to one half of the ET window. Alt-tilde opens the console to the full size of the ET window. Ctrl-tilde opens a minimal 4 line console at the top of the window. To close the console and return to the game just repeat the tilde command. (Note: Besides tilde the single quote found on the same PC-AT keyboard button also works.)
- How do you open the FritzBot submenu ? The menu system in FritzBot ET begins when you hit the escape key (ESC) while in the game or intermission. The menu appears in the upper left corner and the fourth option is the option to open the submenu specific to FritzBot. Note: this menu is only available if you have the FritzBot ET client DLL files installed. If you replace the FritzBot client with say Whaleclient then the FritzBot submenu will not be available.
- What is the color of the vertical spindle of an action ? Actions are shown in the in-game editor by a vertical Yellow line or spindle. The horizontal/diagonal white lines are radii spokes or connections respectively (when visible).
- What is the green number for immediately above a spindle ? The green numbers appear above the red vertical lines or spindles. Those are the regular navigation nodes, and the number is the node num. If the number was blue above a yellow spindle then the number would be the action num.
- Give 2 possible reasons why you can't see an action you just added ? When you just add an action, if you have not assigned it any team objectives it remains invisible. However the second reason could be that you have not set the editor to show actions in the map.
- What server (sv) setting must you use when waypointing ? You really must turn off the pure server option for effective waypointing and testing. You can do this in the console with the command /sv_pure 0.
Test2: Basic Waypointing - Placing Nodes
- What does /node_connect 3 2 do? The command adds a one way connection from navigation node num 3 to node num 2. That will allow a bot to navigate from node number 3 to node number 2 if it so choses.
- What does it mean if a line goes from the bottom of red spindle #4 to the top of red spindle #40 ? The diagonal line described is a connection. The high end is the start and the low end is the end. So the line could have been added by the command /node_connect 40 4 and as previously mentioned a bot could now navigate from node 40 to node 4 if it choses
- How far apart should directly connected nodes be placed? There is no exact answer but you should avoid making any connections that will take a bot more than3 - 3.5 seconds to traverse. This distance will vary depending on factors like is the bot walking, running, climbing or falling. Myself I use the /node_drawDist 256 as a guide. When the previous node just disappears I am between 256 and 512 grid points apart which is a safe distance.
- How do you write your waypoints to the hard drive? /node_save will save your current waypoints (nodes, connections, actions and routes) to the <mapname>.nav file in the correct directory. You can use this command while in the game or intermission. You can also bind a key to do a save quickly during the game. See the FritzBot submenu.
- How many other nodes can one node directly connect to if using 2 way connections? Any node can only store its connections to 4 other nodes. If as is recommended almost all connections are 2 way then only 4 other nodes will connect to this node. Yes it is possible that more than 4 nodes can have one way connections coming into this node, but we recommend avoiding such one-way waypointing where possible.
Test3: Advanced Waypointing
- What is a common reason for a bot to backtrack a little when navigating a simple path? If a bot turns, backtracks then turns again and continues forward, it is a pretty good guess that it missed touching one of the nodes in its chosen path. This can happen if the node radius is too small or when the bot's momentum carries it over the node. So watch the bots and then try repositioning and resizing the node then retest.
- Which team (Axis or Allies) does /node_team 2 0 refer to? Trick question. Both teams can use node 2 when its team is set to zero. (1=Axis only, 2=Allies only 0=both).
- Name two of the commands that begin /node_... that do not need a node num as a parameter. There are 5 /node_... commands currently that do not need a node num parameter. (1) /node_add assigns the next num automatically (2) /node_autoconnect has no parameters, automatically using the last 2 node nums. (3) /node_num and /node_clear need no parameters and (4) node_defaultradius sets a global editing value thay applies to all future added nodes.
- This pair of screenshots have some likely waypointing errors. Can you spot them all?
- On the right half of the images;
- The two ladder nodes on the right at the back have radii that match the ladder width but they are not centered on the ladder as they normally should be. They have a 2 way connection between them which in this case is not necessary (the jump down is not dangerous).
- Node 18 in front of the ladder is a real problem. It has 2 one way connections coming in from the right and the ladder bottom and a two way connection coming from above. A bot at 18 would have to try to jump up to the unseen node 17 which is impossible at normal gravity.
- Node 17 unseen but whose parameters are shown in the HUD indicates it is a flag type node (3) but has entnum 1023. One of these 2 values must be wrong.
- On the left side of the two images;
- The jump down from the second story ledge reached by the ladder is too steep. Bots have problems with edges if the angle is too steep. And the lower node should have a big radius to catch the bots where they land.
- There are two nodes about the stairs that have radii spokes that extend out too far. The Node 13 on the stairs could let a bot run off the edge of the stairs unable to jump directly back on. And node 23 under the stairs extend out from the rope net and could trap a bot against that netting in some circumstances.
- In General
- For such a open area most of the nodes have radii that are too small.
- The distance between node 7 (center at the back) and the unseen node 6 behind us looks suspiciously long and might be more than 3 seconds in some cases.
- The ladder top node and the second story jump down node connections look suspicious. But in this case this is just the effect of /node_drawDist 1024 not letting us see node 10 and the 2 connections originating from it. This is not an error.
Test4: Adding FritzBot Actions
- What is a suitable radius for a typical camp action? A radius of 30 or 40 is a good choice to avoid more than one bot camping in the same spot.
- How do you find the next number for the command /action_add 4 5 30...? The next number in the action_add is the entity number. since the objective values of 4 and 5 indicate a dynamite-defuse we need the trigger_objective-info for the map entity that gets blown up. Binding a key to /viewent looking at the object and hitting that key is the best way to find the toi number (open the console to see the result). If you have problems you may also be able to find the number either with the /configstrings command or With a bsp reader like that in Hobbits waypoint tool.
- What actions should be set action goal zero? The goal tracker begins the match at zero so any actions that need to active at the start can be set for goal zero. Also we specifically recommend that any action_altroam, action_aim, action_event_explode and action_event_expire actions be set for action_goal zero.
- Why is action_closenode important? The bots need to be able to navigate to the node specified by an actions closenode. If they chose that action but can't find a path the bots get confused and may zombie for a period of time.
- Advanced waypointer Questions:
- What is the difference between /action_info and /g_action_info? The /action_info command outputs to the console the static information for that action num found in the .nav file. On the other hand g_action_info gives the current dynamic information (including unsaved changes, or game driven temporary changes). The latter command is very useful in troubleshooting.
- What is the difference between /action_class 1 0 and /action_class 1 31 ? Trick question. An action that no class could use would be of no value so class zero is the default meaning all classes can use. Since ET has 5 classes, 31 is the value that a 5 bit flag variable uses to mean all true. There fore in this case 31 == 0 !
- Name two examples where /action_ent does not refer to map entities. Late changes to the FritzBot ET code for camps and mine plants re-used the ent property to provide needed options. Simple camps with ent of 1 force the bot to stand when camping, and mine plants may use an "ent" number of 1-3 to indicate the maximum number of mines to plant inside the action's radius.