NPC Debugging: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
Line 123: | Line 123: | ||
=== npc_select === | === npc_select === | ||
* {{ | * {{sv cheat}} | ||
* Selects or deselects the given NPC(s) for later manipulation. Selected NPC's are shown surrounded by a red translucent box | * Selects or deselects the given NPC(s) for later manipulation. Selected NPC's are shown surrounded by a red translucent box | ||
* Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at. | * Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at. | ||
=== npc_ammo_deplete === | === npc_ammo_deplete === | ||
* {{sv_cheat}} | * {{sv_cheat}} {{todo|untested}} | ||
* Subtracts half of the target's ammo. | * Subtracts half of the target's ammo. | ||
=== npc_create === | === npc_create === | ||
* {{sv_cheat}} | * {{sv_cheat}} | ||
* Arguments : <npc_class_name>. | * Arguments : <npc_class_name>. | ||
* Creates an NPC of the specified type where the player is looking (if the given NPC can actually stand at that location). Note that this only works for npc classes that are already in the world. You can not create an entity that doesn't have an instance in the level. | |||
=== npc_create_aimed === | === npc_create_aimed === | ||
* {{ | * {{todo|Unknown command ...}} | ||
* Creates an NPC aimed away from the player of the | * Creates an NPC aimed away from the player of the specified type where the player is looking (if the given NPC can actually stand at that location). Note that this only works for npc classes that are already in the world. You can not create an entity that doesn't have an instance in the level. | ||
* Arguments : <npc_class_name>. | * Arguments : <npc_class_name>. | ||
=== npc_create_equipment === | === npc_create_equipment === | ||
* {{sv_cheat}} | * {{sv_cheat}} | ||
* <1> {{todo|arguments}} | * <1> {{todo|arguments?}} | ||
=== npc_destroy === | === npc_destroy === | ||
* {{ | * {{-dev}} | ||
* Removes the | * Removes the specified NPC(s) from the universe | ||
* Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at. | * Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at. | ||
=== npc_destroy_unselected === | === npc_destroy_unselected === | ||
* {{ | * {{-dev}} | ||
* Removes all NPCs from the universe | * Removes all currently ''not-'''''selected''' NPCs from the universe. | ||
=== npc_freeze === | === npc_freeze === | ||
* {{sv_cheat}} | * {{sv_cheat}} | ||
* Selected NPC(s) will freeze in place (or unfreeze). | * '''Selected''' NPC(s) will freeze in place (or unfreeze). If there are no selected NPCs, it freezes the NPC under the crosshair. | ||
* {{todo|verify test: unable to unfreeze selected NPC, unable to freeze without selecting NPC. --[[User:Beeswax|Beeswax]] 11:00, 8 Mar 2008 (PST)}} | |||
=== npc_go === | === npc_go === | ||
* {{sv_cheat}} | * {{sv_cheat}} | ||
* Selected NPC(s) will go to the location that the player is looking (shown with a purple box). | * '''Selected''' NPC(s) will go to the location that the player is looking (shown with a purple box). | ||
=== npc_go_do_run === | === npc_go_do_run === | ||
* <1> | * <1> NPC should ''run'' on npc_go. | ||
* <0> NPC should ''walk'' on npc_go. | |||
=== npc_go_random === | === npc_go_random === | ||
* {{sv_cheat}} | * {{sv_cheat}} | ||
* Sends all selected NPC(s) to a random node. | * Sends all '''selected''' NPC(s) to a random node. | ||
=== npc_heal === | === npc_heal === | ||
* {{sv_cheat}} | * {{sv_cheat}} | ||
* Heals the | * Heals the '''selected''' NPC back to full health. If there are no selected NPCs, it heals the NPC under the crosshair. | ||
* Dead NPCs cannot be healed/resurrected. | |||
=== npc_kill === | === npc_kill === | ||
* {{ | * {{-dev}} | ||
* Kills the given NPC(s) | * Kills the given NPC(s) | ||
* Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at. | * Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at. | ||
= NPC class specific = | = NPC class specific = |
Revision as of 12:00, 8 March 2008
misc
npc_height_adjust
- This command requires
sv_cheats
set to1
. - <1> Enable test mode for ik height adjustment.
npc_vphysics
- <1>
NPC AI
npc_route
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
- Displays the current route of the given NPC as a line on the screen.
- Waypoints along the route are drawn as small cyan rectangles. Line is color coded in the following manner:
|
npc_bipass
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
- Displays the local movement attempts by the given NPC(s) (triangulation detours).
- Failed bipass routes are displayed in red, successful bipasses are shown in green.
npc_nearest
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
- Draw's a white box around the NPC(s) nearest node.
npc_steering
- This command requires
sv_cheats
set to1
. - Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
- Displays the steering obstructions of the NPC (used to perform local avoidance)
npc_steering_all
- This command requires
sv_cheats
set to1
. - Displays the steering obstructions of all NPCs (used to perform local avoidance).
AI think
npc_focus
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
- Displays red line to NPC's enemy (if has one) and blue line to NPC's target entity (if has one)
npc_conditions
- This command requires
sv_cheats
set to1
.Todo: how to activate ? - Displays all the current AI conditions that an NPC has in the overlay text.
- Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
npc_reset
- This command requires
sv_cheats
set to1
.Todo: how to activate ? - Reloads schedules for all NPC's from their script files.
npc_task_text
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
- Outputs text debugging information to the console about the all the tasks and break conditions of the selected NPC current schedule.
- This will let you see what that and why your AI schedule/task failed.
npc_tasks
- This command requires
sv_cheats
set to1
.Todo: how to activate ? - Displays detailed text debugging information about the all the tasks of the selected NPC current schedule (See Overlay Text)
- Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
npc_thinknow
- This command requires
sv_cheats
set to1
.Todo: how to activate ? - Trigger NPC to think.
npc_viewcone
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Displays the viewcone of the NPC (where they are currently looking and what the extents of there vision is)
- Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
AI enemies & allies
npc_squads
- Obsolete. Replaced by npc_combat.
npc_combat
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
- Displays the NPC's current Health, Squad, Enemy and Slot in a HUD overlay.
npc_enemies
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
- Shows entities in the NPC's memory by drawing a colour-coded X over the entity and adding a HUD label:
Blue | Eluded entities (don't know where it went) |
Green | Unreachable entities (can't get to it) |
Red | Current enemy |
Magenta | Current target entity |
Pink | All other entities drawn |
AI responses
npc_sentences
- <1> Logs each NPC sentence in console as it is spoken.
npc_speakall
- Force the NPC to try and speak all their responses.
edit NPC
npc_select
- This command requires
sv_cheats
set to1
. - Selects or deselects the given NPC(s) for later manipulation. Selected NPC's are shown surrounded by a red translucent box
- Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
npc_ammo_deplete
- This command requires
sv_cheats
set to1
.Todo: untested - Subtracts half of the target's ammo.
npc_create
- This command requires
sv_cheats
set to1
. - Arguments : <npc_class_name>.
- Creates an NPC of the specified type where the player is looking (if the given NPC can actually stand at that location). Note that this only works for npc classes that are already in the world. You can not create an entity that doesn't have an instance in the level.
npc_create_aimed
- Todo: Unknown command ...
- Creates an NPC aimed away from the player of the specified type where the player is looking (if the given NPC can actually stand at that location). Note that this only works for npc classes that are already in the world. You can not create an entity that doesn't have an instance in the level.
- Arguments : <npc_class_name>.
npc_create_equipment
- This command requires
sv_cheats
set to1
. - <1> Todo: arguments?
npc_destroy
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Removes the specified NPC(s) from the universe
- Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
npc_destroy_unselected
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Removes all currently not-selected NPCs from the universe.
npc_freeze
- This command requires
sv_cheats
set to1
. - Selected NPC(s) will freeze in place (or unfreeze). If there are no selected NPCs, it freezes the NPC under the crosshair.
- Todo: verify test: unable to unfreeze selected NPC, unable to freeze without selecting NPC. --Beeswax 11:00, 8 Mar 2008 (PST)
npc_go
- This command requires
sv_cheats
set to1
. - Selected NPC(s) will go to the location that the player is looking (shown with a purple box).
npc_go_do_run
- <1> NPC should run on npc_go.
- <0> NPC should walk on npc_go.
npc_go_random
- This command requires
sv_cheats
set to1
. - Sends all selected NPC(s) to a random node.
npc_heal
- This command requires
sv_cheats
set to1
. - Heals the selected NPC back to full health. If there are no selected NPCs, it heals the NPC under the crosshair.
- Dead NPCs cannot be healed/resurrected.
npc_kill
- This Console command requires sv_cheats set to
1
and then developer set to1
. - Kills the given NPC(s)
- Arguments : <npc_name> / <npc_class_name> / no argument picks what player is looking at.
NPC class specific
Todo: It's probably better to document these ConComs on the relevant npc_class_name entity page? Although the squad-related ones might be better in NPC AI ?
npc_citizen_auto_player_squad
- <1>
npc_citizen_auto_player_squad_allow_use
- <0>
npc_citizen_squad_marker
- <0>
npc_citizen_explosive_resist
- <0>
npc_citizen_insignia
- <0>
npc_barnacle_swallow
- Todo: <0> or <1>= Use prototype swallow code.
npc_strider_height_adj
- <0>
npc_strider_shake_ropes_magnitude
- <150>
npc_strider_shake_ropes_radius
- <1200>