Back: Starting Steps | The Designer's Forum | Next: Variable Town Entry: A Tutorial

Additional NPC Info

By Stareye


This is an addition to Alcritas’ article on NPCs. It basically provides a method for solving the problem of having a limited number of NPCs due to a limited number of Town Encounters.

Here’s how it works:
First, set all your NPCs to be the SAME encounter. We will just use the convenient encounter 1 for this example. We’ll suppose that you have four NPCs, which should be sufficient to illustrate the point. You can use more, of course.

Flags
100,0 NPC 1 status
100,1 NPC 2 status
100,2 NPC 3 status
100,3 NPC 4 status

If value:
0 Not in party
1 In party
2 Dead

0 One Time Place Town Enc (1)
1 If SDF 100,0 = 1 THEN GOTO 3, ELSE GOTO 2
2 Destroy Monster (NPC 1)
3 If SDF 100,1 = 1 THEN GOTO 5, ELSE GOTO 4
4 Destroy Monster (NPC 2)
5 If SDF 100,2 = 1 THEN GOTO 7, ELSE GOTO 6
6 Destroy Monster (NPC 3)
7 If SDF 100,3 = 1 THEN GOTO 8, ELSE END
8 Destroy Monster

This sequence destroys any NPC whose flag does not have a value of 1 (has either not joined or is dead) immediately after being placed effectively having them not be there. This eliminates the problem stated in the original article by Alcritas. Note you can extend this sequence to as many (or as few) NPCs as you have. It is best to place this in your scenario nodes if you plan to use NPCs in battles often.

Back: Starting Steps | The Designer's Forum | Next: Variable Town Entry: A Tutorial