Bots and NPCs: Difference between revisions
Jump to navigation
Jump to search
VulcanStorm (talk | contribs) |
VulcanStorm (talk | contribs) No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
* NPCs shoot at valid targets 2000 units away and in line of sight | * NPCs shoot at valid targets 2000 units away and in line of sight | ||
===== Bots ==== | ===== Bots ===== | ||
This refers to fake clients, that are simulated server side. | This refers to fake clients, that are simulated server side. | ||
<hr> | <hr> | ||
==== Adding NPCs to maps ==== | ==== Adding NPCs to maps ==== | ||
Added to hammer are 2 test NPC entities, these should work on any map however their functionality is limited. To ensure correct operation with your map, i have created a checklist of things that need to be done. | Added to hammer are 2 test NPC entities, these should work on any map however their functionality is limited. To ensure correct operation with your map, i have created a checklist of things that need to be done. | ||
Line 39: | Line 40: | ||
== Blocking Navigation == | == Blocking Navigation == | ||
[[Image:Nav blocker setup 1.png|thumb|'''Step 1:''' The ''func_nav_blocker'' is textured here with '''tools/toolstrigger''', and covers the extent of the area I want to block]] | |||
[[Image:Nav blocker setup 2.png|thumb|'''Step 2:''' The ''func_nav_blocker'' is configured with the team to block for, and a name so that it can be activated by other entities]] | |||
[[Image:Logic auto setup 1.png|thumb|'''Step 3:''' A ''logic_auto'' is created so that we can trigger our ''func_nav_blocker'' to start blocking]] | |||
[[Image:Logic auto setup 2.png|thumb|'''Step 4:''' The ''logic_auto'' is configured to fire when the game is runing on a PC, at game start time]] | |||
[[Image:Logic auto setup 3.png|thumb|'''Step 5:''' The ''logic_auto'' has it's output set so that it triggers the ''BlockNav'' input on our previous ''func_nav_blocker'' entity]] | |||
# First you need to create a ''func_nav_blocker'' entity covering the extent of the area you wish to block. | [[Image:Nav blocker setup 3.png|thumb|'''Step 6:''' Finally, checking that the ''func_nav_blocker'' has detected the input correctly coming from the ''logic_auto'']] | ||
# First you need to create a ''func_nav_blocker'' entity covering the extent of the area you wish to block, and textured with '''tools/toolstrigger'''. | |||
# Configure the ''func_nav_blocker'' settings, and choose whch team(s) you wish to block for and give it a name so that it can be activataed by another entity. | # Configure the ''func_nav_blocker'' settings, and choose whch team(s) you wish to block for and give it a name so that it can be activataed by another entity. | ||
# Create an entity to use to activate the ''func_nav_blocker'', here we use ''logic_auto'' but any entity can be used here | # Create an entity to use to activate the ''func_nav_blocker'', here we use ''logic_auto'' but any entity can be used here | ||
# Configure the ''logic_auto'' so that it triggers on game start | |||
# Set the ''logic_auto'''s output to fire the '''BlockNav''' input on the ''func_nav_blocker'' | # Set the ''logic_auto'''s output to fire the '''BlockNav''' input on the ''func_nav_blocker'' | ||
# Finally, check that the ''func_nav_blocker'' has the correct input coming in | # Finally, check that the ''func_nav_blocker'' has the correct input coming in | ||
''' The images to the side of the page show what it should look like'''. | |||
= Common NPC FAQs = | = Common NPC FAQs = |
Latest revision as of 23:35, 9 August 2020
Empires Mapping Documentation |
Mapping Overiew | Hammer Configuration | Entity Index | Basic Mapping | Setup Resources | Tutorials | Useful FGD Modifications | Bots and NPCs | Dimensions | Skyboxes |
This will be periodically updated with information about NPCs and Bots (fake players).
NPC
This refers to non-player AI controlled entities.
NPC Notes:
- NPCs will automatically go to and attempt capture available control points
- NPCs shoot at valid targets 2000 units away and in line of sight
Bots
This refers to fake clients, that are simulated server side.
Adding NPCs to maps
Added to hammer are 2 test NPC entities, these should work on any map however their functionality is limited. To ensure correct operation with your map, i have created a checklist of things that need to be done.
NPC checklist:
- Your map needs to be compiled with a version of empires later than 2.15.3.
- Your map needs a navigation mesh created, see https://developer.valvesoftware.com/wiki/Navigation_Meshes
- Your capture points need to be numbered correctly, capture point number 0 will not work with NPCs.
NPC Entity List:
Debugging NPCs
Console Commands
- ai_debug_emp_paths : shows the actual paths the bots are currently following, blue for BE, red for NF
- ai_debug_emp_cap_points : bots print which capture point they are trying to go to
- First you need to create a func_nav_blocker entity covering the extent of the area you wish to block, and textured with tools/toolstrigger.
- Configure the func_nav_blocker settings, and choose whch team(s) you wish to block for and give it a name so that it can be activataed by another entity.
- Create an entity to use to activate the func_nav_blocker, here we use logic_auto but any entity can be used here
- Configure the logic_auto so that it triggers on game start
- Set the logic_auto's output to fire the BlockNav input on the func_nav_blocker
- Finally, check that the func_nav_blocker has the correct input coming in
The images to the side of the page show what it should look like.
Common NPC FAQs
- The NPCs aren't moving anywhere, only occasionally shuffling forwards or standing there.
- This is most likely because there is no navigation mesh, or capturable flags available.