Expanding Policies

Expanding policies are a type of object policy that determines the behavior of an object as it expands in the parcel.

There are four types of expanding policy:

  • Simple Expanding Policy
  • Rectangular Filler Expanding Policy
  • Select Expanding Policy
  • Sequence Expanding Policy

Simple Expanding Policy

The Simple Expanding policy is the default expanding policy. In this mode, there are no special expansion rules.

Filler Policy

The Filler policy allows you to to fill a given area with a single object during the expansion of a parcel.

Possible filler objects that can be used as fillers include:

  • Meshes
  • Materials
  • Decals
  • Subparcels
  • Other parcels (in the form of parcel links that link to a second parcel pathway)

If you select this policy, you will be asked to choose both the child index and the only complete option.

Indexes

The child index refers to the list order of the filler object in the hierarchy tree, or Layers window.

If 3 different objects were listed within a parcel or sub parcel, they would have child index 1, child index 2, and child index 3 respectively.

Here, you see that a parcel link to the cars.gcf parcel will be used to fill the parking_lot sub parcel:

_images/ofd_14.png

As it is the first and only object listed within the sub parcel, it will have a child index of 1.

Only Complete

The only complete option refers to whether or not you want the filler object to be placed if it cannot fill the entire space to be filled. There may be cases where the sub parcel or parcel area is not large enough to accomodate a filler object or multiple recurring filler objects.

In this example, parcel_link_cars has been assigned to fill the small_parking_lot sub parcel. As you can see, it does not rest entirely inside the parking lot:

_images/exp_1.png

Checking only complete means that parcel_link_cars will not be placed, since it cannot fill the area as a complete object:

_images/exp_2.png _images/exp_3.png

Unchecking only complete removes the requirement that the parcel link be completely placed inside the space to be filled. Parcel_link_cars can therefore be placed as a filler.

_images/exp_4.png _images/exp_5.png

In this simple example, you want the regenerator to attempt to place another instance of the object in this case, unclick only complete.

Unchecking only complete allows the filler object to fill the subparcel.

Select

Use the Select Expanding Policy to tell Parcel Editor to choose randomly between one or more meshes.

In this example, we have added the Select Expanding Policy to the parcel by right-clicking in the top parcel line, selecting Edit, and clicking the Policies tab, where we choose Select Expanding Policy.

We now add eight different colored cars to the parcel.

_images/ofd_3.png

With each regeneration of the parcel, the generator will randomly select one of the car colors. This introduces variety into your parcel template by randomizing the appearance of the space.

Sequence

The sequence expanding policy defines the desired sequence of building elements and how often, and in what order, they should be repeated.

To use the sequence expanding polilcy successfully, you will have to define the desired sequence of meshes in the Pattern line.

These children are separated by different symbols, such as ., ?, +. Each symbol defines how the child will behave either alone or with relation to the other children.

Patterns

The sequence expanding policy places elements according to patterns defined by symbols such as +, *, and ?.

The following is a complete list of the various pattern symbols and how they work:

. marks the separation between two sequence elements. Example: 1.2.3 means that child 1, then 2 and then 3, will be added to the line.

? means that there is a 50% possibility of the preceding element appearing. For example, 1?.2.3? means that child 1 may appear, child 2 will definitely appear, and child 3 may appear.

+ repeats the preceding element a maximum number of times. Example: 1+.2.3+ means that child 1 will be placed, then child 2, then child 3. If there is enough space left, the sequence will start over again (child 1 at the beginning and 3 at the end), repeating until the line is complete. There will will be as many child 1s as child 3s.

* repeats (or not) the preceding element a maximum number of times. It is the combination of ? and +. Example: 1*.2.3* will try to put child 1 first (50% chance), then 2, then 3. Then, if there is enough space, Vertical Line will try to put one child 1 at the beginning and one child 3 at the end, repeating until the line is complete. The number of child 1s and child 2s can be totally different.

. marks the separation between two sequence elements. Example: 1.2.3 means that child 1, then 2 and then 3, will be added to the line.

? means that there is a 50% possibility of the preceding element appearing. Example: 1?.2.3? means that child 1 may appear, child 2 will definitely appear, and child 3 may appear.

+ repeats the preceding element a maximum number of times. Example: 1+.2.3+ means that child 1 will be placed, then child 2, then child 3. If there is enough space left, the sequence will start over again (Child 1 at the beginning and 3 at the end), repeating until the line is complete. There will will be as many Child 1s as Child 3s.

* repeats (or not) the preceding element a maximum number of times. It is the combination of ? and +. Example: 1*.2.3* will try to put child 1 first (50% chance), then 2, then 3. Then, if there is enough space, Vertical Line will try to put one child 1 at the beginning and one child 3 at the end, over and over until the line is complete. The number of child 1s and child 2s can be totally different.

[a-d|f]: Placing brackets around a series of items forces the generator to choose an element of the series at random. The | symbol separates elements. Example: Placing [1|2|3|4] in a series means that the selected child will be one of the four, randomly selected.

The symbol indicates a range between the elements. Example: [1-4] is equivalent to [1|2|3|4]. The two can be combined: [1-4|7] will choose at random an element between [1,2,3,4,7].

Additional example: [1|2] .3 will display either child 1 or child 2, and then child 3.

{N} adds the preceding element N times. Example: 1{2}.2.3 will add Child 1 two times, then Child 2, then Child 3.

{X,Y} syntax will add the preceding element N times, with the value of N being between X and Y. Example: 1{2,5}.2.3 will add child 1 between 2 and 5 times, then child 2, and then child 3.

Invalid Pattern Syntax

The operators * , + , and ? cannot be combined. Example: 1.2?+n is not valid. Syntactically, this ie equivalent to 1.2*.

In the same way, the repetitions cannot be combined with each other. 1.2{2}{2,3} is not valid.

For random selection, two consecutive ranges cannot be specified. [1-5-8] is not valid.

The operators * , + , and ? must be placed at the very end of the element, just before the . marking the beginning of the following element. 1.2{3}* is valid, but not 1.2*{3}

It is possible to write the following combinations:

2*.3{1,3}.1.2* , or 1.2.1*.3?.1* or [1|2|3] {1,2}*