• Tutorials

  • Home
  • PartyArrangement

    Called at the start of combat to determine the position of the party members on the playing field.

    Parameters

    Parameter [5] = first character will be either 'I' or 'O' depending on whether the combat is taking place indoors or outdoors.

    Context

    None


    If the script exists and returns a string of exactly the right length then that string is used to determine the position of the party members on the field of play. Here is how it works; step-by-step.

    Numbers are represented by letters. A = 0; a = 0; B = 1; b = -1; C = 2; c = -2; Etc.

    The position of the party is determined. I don't know how.....I think perhaps the center of the playing field.

    There is a string of characters for the case that the party is facing north Within that “North” string there is a string of characters for the case where the party has one member: The string consists of exactly two characters which define the x- and y-coordinate of the first party member with respect to the party's position. For example, he might be at x = -2, y= 1. The string would be “cB”. There is also a string for the case when there are two members in the party. The first two characters are for the first party member and the second two characters are for the second party member. For example “cBdC”. There is another string for three party members, four party members, so on up to eight party members. They might look like this:

    1. "AA"
    2. "AABA"
    3. "AABABC"
    4. "AABABCCC"
    5. "AABACABCCC"
    6. "AABACABCCCDC"
    7. "AABACABCCCDCDA"
    8. "AABACABCCCDCDAEC"

    Put them all together in one big string and you have defined how the party members should be arranged for the case that the party is facing North:

    "AAAABAAABABCAABABCCCAABACABCCCAABACABCCCDCAABACABCCCDCDAAABACABCCCDCDAEC"

    Now you repeat the exercise for the the case where the party faces East, South, and West, in that order. Then glue all four strings together in a mighty whole. You are done.