Chapter 5 - NPCs

NPCs are non-player characters. They can be used for shopskeepers, enemies, and more! In the OHR, you can use them to say dialogue, trigger scripts, trigger battles and more.
In the map editor, you will see that you can create NPCs. There are two types of NPCs. Local NPCs and global NPCs. Local NPCs can only be used on one map, but global NPCs can be used anywhere.
When editing an NPC, you will see you can edit the apperance, movement, the activation and when it appears.
Apperance[edit]
To change the apperance, click on picture. This will open up a menu where you can see all the walkabout sprites in your game. If you want to see how to make a walkabout sprite, check out the section about walkabouts.
You can also change what palette the NPC is using for its walkabout texture.
Movement[edit]
All NPCs have movement settings that allow them to walk around.
Movement Speed[edit]
Movement speed changes how fast an NPC moves. The NPC speed must be divisible by the tile size, which is 20 by 20 pixels. 4 is the default speed, and 0 will cause the NPC to not move at all, regardless of it's movement type.
Movement Types[edit]
- Stand Still – The NPC stands there and does not move or play any animations.
- Wander – The NPC occasionally takes steps in a random direction. The NPC will not make any large movements.
- Pace – The NPC walks straight until it runs into something, and then it turns around and walks back the opposite way.
- Right/Left turns – The NPC moves in a straight line until it hits an obstacle, where it will turn left or right.
- Random turns – The NPC moves in a straight line until it hits an obstacle, where it will turn randomly left or right.
- Chase/Avoid you (Meandering) – The NPC attempts to move towards/away from the player in various ways. They will work correctly across wrapping map edges.
- Walk in place – The NPC does not move in any direction, but will play it's walking animation.
- Chase/Avoid you (Direct) – The NPC attempts a stright line of movement towards/away from Hero, doesn't make any random decisions, stay still when stuck behind obstacle, and will often get stuck.
- Follow walls (Right/Left) – This is the method for finding your way out of a maze by following a wall with your left/right hand. NPCs and heroes will also be treated as walls.
- Stop for others will wait for NPCs and heroes to move instead of treating them as walls.
- Chase you (Pathfinding) – Finds the shortest path to the Hero, or nearest possible tile, and navigates around obstacles, but does struggle with very large mazes. Wll repect zone restrictions. The path is recomputed with every step.
- Pathfinding rules will either have the NPC ignore other NPCs or treat them as obstacles.
Movement and Avoidance zones[edit]
Using the zone editor in the map builder, you can create restrictions on where an NPC can move.
- Movement Zone restricts the NPC to be able to only move in the given zone.
- Avoidance Zone makes the NPC treat the given zone as an obstacle. This overides the movement zone.
Other[edit]
- Ignore Passmap allows the NPC to walk through any walls you have created using the wallmap editor.
- Pushability allows the hero to be able to push the NPC in the direction they walk in.
Activation by player[edit]
Appearance[edit]
Placing NPCs[edit]
Introduction | Getting Started | Artwork | Map Construction | NPCs | Tags | Making a Hero | Attacks | Items | Battles | Vehicle Use | Sound and Music | Text Boxes | Custom Menus | Slices | Plotscripting | Distributing a Game
Appendices: Keyboard Conventions | Sample Scripts

