Party Register Author: Skyle - clarkj@oit.edu Used in: The Return - not released Updated: 30 October 1998, version 1.01 Use: A way to have the party composition be reflected in SDF values. Thus what monsters do in encounters, town/dungeons, or rooms in town/dungeons can be based on party composition. For example, a Slith town may be hostile to a party with 2 or fewer Sliths, a human trainer may be eliminated if a party of 2 or fewer humans enter town (thus no training), a Nephilim altar may curse a mostly human party, etc. Setup: SDFs 0:1, 0:2 for the party count (at entry and exit runes), 0:3 for number of Humans, 0:4 for Nephil, 0:5 for Sliths, and 0:6 is a temporary count (so one step per race rune). X,Y is the space just outside of the entry rune. Place the runes and a friendly version of a Townsman, Nephil, and Slith within a room so the party members have to pass over the entry rune then a race rune then the exit rune. Sequence 1 - entry rune: 1 Town Block - 1A= 1 no enter Stuff Done Compare? - 0:1, 1A= 0, 1B= 2, if 2nd flag is lower goto 4, else jump to 3 3 Stuff Done Compare? - 0:2, 1A= 0, 1B= 1, if 2nd flag is lower goto 4, else jump to 5 4 Can't Enter - (msg below), 1A= 1 no enter, -1 One at a time, step only once on a race rune 5 Increment Flag - 0:1, 1A= 1, 1B= 0 increase Stuff Done Equal? - 0:2, is value 1A= 0 goto 7, else jump to 8 7 Display Message - instructions, jump to 9 Tells which rune a member should step on 8 Display Small Message - instructions, jump to 9 Smaller version of rune message 9 Swap Terrain - 1A= X, 1B= Y, 2A= floor, 2B= wall/window/portcullis, -1 Sequence 2 (on the 3 runes near the friendly monsters): Townsman Increment Flag - 0:3, 1A= 1, 1B= 0 increase, jump to 2 Nephil Increment Flag - 0:4, 1A= 1, 1B= 0 increase, jump to 2 Slith Increment Flag - 0:5, 1A= 1, 1B= 0 increase, jump to 2 2 Increment Flag - 0:6, 1A= 1, 1B= 0 increase Stuff Done Compare? - 0:6, 1A= 0, 1B= 1, if 2nd flag is lower goto 4, -1 4 Set Many Flags - 0:0-9, to 1A= 0 Change Terrain - 1A= X, 1B= Y, 2A= floor Move Party - 1A= X, 1B= Y, 1 teleport, -1 Tell party to repeat the process Sequence 3 - Exit rune: 1 Stuff Done Compare? - 0:1, 1A= 0, 1B= 6, if 2nd flag is lower goto 3, else jump to 2 2 Stuff Done Compare? - 0:6, 1A= 0, 1B= 1, if 2nd flag is lower goto 3, else jump to 4 3 Can't Enter - 1A= 1 no enter, -1 Note: can also use the Can't Enter in Sequence 1 4 Stuff Done Compare? - 0:1, 1A= 0, 1B= 2, if 2nd flag is lower goto 5, -1 5 Increment Flag - 0:2, (msg below), 1A= 1, 1B= 0 increase Continue forward, next party member can go through Swap Terrain - 1A= X, 1B= Y, 2A= floor, 2B= wall/window/portcullis, -1 What it does: The party is forced into Combat mode. One by one they go through (a swapped wall blocks a member from going backwards), first the entry rune (SDF 0:1 increases by 1), a race rune (SDF 0:3/4/5 increases by 1), then the exit rune (SDF 0:2 increases by 1), entry wall is swapped for a floor. The error checks are Can't Enters if a PC hasn't stepped on the exit rune (thus SDF 0:2 <> SDF 0:1) and not stepping on a race rune (or stepping multiple times on one) (thus SDF 0:6 <> SDF 0:1). If SDF 0:1 is less than SDF 0:6 (multiple steppings on the race runes), the flags are cleared, a floor is placed before the entry rune, and the party (in Town mode) is moved near the entry rune. Then the process must be repeated. v 1.01 Fixed bug of a PC backing off from the entry rune by swapping a wall behind the PC. Thanks to Stareye for finding this.