This is an example about how to set up and use a population and its classes.
The basic workflow is:
1. Create customizable objects (Covered in other tutorials).
2. Create a population class, defining which values its parameters can take, and how often. Repeat to create differnet classes from the same or different Customizable objects.
3. Create a population choosing which population classes appear in it, and how often.
4. Use a population at runtime to generate randomized characters according to the properties defined in the population.
= 1. Customizable Instance creation
TODO: Refer to existing documentation.
= 2. Population class creation
This example covers the "Poor" CO
---==== 2.1. Name the Population class
==== 2.1. Define the general clothing aspect ofFor this type of character by choosing global tags:example: Poor.
2.1.1. Define what choices will be randomly fit by adding the tags to the global whitelist. When choosing integer random parameters, only COs containing both tags will appear. If an integer parameter does not have some of the tags in any of its options, that tag will be ignored.
2.1.2. Define what clothes should never randomly show up even when they contain the whitelisted tags by adding the tags to the global blacklist.
> For this example, whitelist the tags "Poor" and "Winter".
> Then, blacklist the tags "Armor" and "Urban".
WARNING: Tags can be added to CO groups so the "None" option can happen among the random options. For example, the "Hats" and "Jacket" group should have a "Summer" tag added, to have characters randomly chose to not use hats and jackets on summer. Or to be able to blacklist "Summer" on a head slot to make sure everyone is wearing warm head covers on nordic populations.
==== 2.2. Precisely tune the random output by selecting on of the parameters of the CO at the "Toggle" dropdown, "Numeric" dropdown or "Enumeration" dropdown.
2.2.a. When a "Toggle" type parameter is selectes, to define the chances simply fill the weight boxes in that parameter. That's their relative chance to appear. If you want only one option to show on the generated characters, simply put a 0 on the option you don't want to ever apply, and a value larger than zero at the other.
WARNING: The interface won't allow two 0 values. At least one option has to be larger than 0. If what you want is to leave that parameter unaltered, simply remove this parameter from this list by clicking the "X" button.
2.2.b. When defining a "Numeric" parameter, you can choose between two modes: Range or Curve.Choose a Customizable Object to base the class on
2.2.b.a.1. For "Numeric" parameters defined as Ranges, add as many ranges as needed by clicking the "Add range" buttonFor this example: Bandit_forRPG.
2.2.b.a.2. For each range,==== 2.3. fillAdd tags to the "from" and "to" boxes.Customizable Object
2.2.b.a.3. Finally, fill the "weight" box, to define how often this range will be used in relation to the others ranges defined in this parameterIf it does not have them already.
2.2.b.b.1.For this example: Cheap, For "Numeric" parameters defined as CurvesExpensive, choose a curve asset from the searchbox.
2.2.b.b.2.Noble, If the curve has more than one channelOld, you can choose which one is read from the dropdown box.
2.2.c. When defining a "Enumeration" parameter, you define multiple weighted options. Each option can be either a handpicked option, a tag list or the "as global" option,==== 2.4. which can only appear once.Add tags to the parameter options
2.2.c.a.1. To define a singular option, just choose one among the "Options" dropdown. This will be an option for this particular parameter even if it violates the global tag list constraint.For this example:
2.2.c.a.2.4.1. Select the parameter "Hair"; add "Old" and "Cheap" to "None"; add "Noble" to "Backwards"; add "Cheap" to "Greek"; add "Cheap" and "Summer" to "Handkerchief"; Assign a weight to choose how often this option will be chosen for this parameteradd "Old" and "Noble" to "Sir".
2.4.2.c.b.1. Select the parameter "Shirts"; add "Summer" and "Cheap" to "None"; add "Cheap" to "Basic"; add "Cheap" to "Poor"; To define a tag list as an option,add "Expensive" to "2nd"; click the button "Add tag list""Expensive" and "Noble" to "3rd".
2.2.c.b.2.4.3. Select the parameter "Shoes"; add "Summer" and "Cheap" to "None"; add "Summer" to "Simple"; add "Expensive", Assign a weight to choose how often this tag list will be used"Noble" and "Winter" to define this parameter"Boots".
2.2.c.b.3. Fill the whitelist and blacklist4.4. As withSelect the global tag lists,parameter "Trousers"; the whitelist chooses only options that have all the tags and the blacklist vetoes any option that has any of its tags.add "Winter" to "Leggins"; The global tag list still applies,add "Expensive" and "Winter" to "Leggins Officer"; no need to repeat yourself.add "Cheap" and "Winter" to Long; To overwrite a tag defined in the global tag list,add "Summer" to "Pirate"; just write it in the opposite list in this parameteradd "Cheap" and "Summer" to "Short Farmer".
2.2.c.c.4.5. Select the parameter "Bandage Left Hand"; To give chances of none of the other options applying by choosing the "as global" option,add "Cheap" to "None"; just give this option a weight larger than 0.
> For this example,add "Cheap", "Winter" and "Old" to "Forearm L"; add the boolean parameter "Wrinkles"Cheap" and set the weight of yes"Old" to 4 and leave the weight of no at 1"Hand L".
> Then,2.4.6. Select the parameter "Bandage Right Hand"; add "Cheap" to "None"; add "Cheap", "Winter" and "Old" to "Forearm R"; add the numeric parameter "Height" in mode Curve"Cheap" and select the curve "Normal distribution""Old" to "Hand R".
> Then, add the numeric parameter "Fatness" in mode Range,2.4.7. from 0.45 to 0.75 and leave the weight to 1,Select the parameter "Wrist Cover Left"; add "Cheap" to "None"; as we're only defining one rangeadd "Winter" to "Basic Wrist L".
> Then, add the numeric parameter "Skin Tone" in mode Range,2.4.8. from 0.3 to 0.65 and set the weight to 6,Select the parameter "Wrist Cover Right"; and add a second range from 0.87 to 0.93 and leave the weight to 1add "Cheap" to "None"; add "Winter" to "Basic Wrist R".
> Then,2.4.9. Select the parameter "Moustaches"; add "Cheap" to "None"; add the enumeration parameter "Belt" with the "as global" weight to 1."Old" and "Cheap" to "Dupond"; Add a tag list option,add "Noble" and "Old" to "Sire"; whitelist "Armoradd "Noble" and leave the weight to 1"Expensive" to "Tiny".
> Then, add the enumeration parameter "Jacket" with the "as global" weight to 1. Add the singular option "Raw Sheepskin" with a weight of 3. Add a tag list option, and whitelist "Hide" and blacklist "Poor" and "Rich", leave the weight to 1. (With this, both Poor and non-Rich hide jackets are an option for the shepherd. If poor was to be completely forbidden,==== 2.5. you'd needAdd tags to add a second "Poor" to the blackthe class wide population tag list)s
> Finally, add the enumeration parameter "Hat" with the "as global" weight to 0. Add a tag list option, blacklist "None" and leave the weight to 1.
= 3.For this example: add "Cheap" to the White List, Population creation"Expensive" and "Noble" to the Black List.
==== 3.1At this stage, when you are at your own, it's recommended to start using the "Test Population Class" button. Each constraint added reduces the randomness but gives more personality to the class. It's a balance act that depends on the variety of your customizable object. Create a new population:
Name the population (something representative and specific is ideal)
For this example: "High Mountain Herd"
---In this tutorial, if you execute it now, you'll see that the poor folks have proper (miserable) clothing, but the other details don't match the image we are looking for.
==== 3.22.6. Add new or excharacteristing classes by following one of the three options below:cs for specific parameters
3.2.a.1. Add a new class by clicking the "Add new" button.
3.2.a.2. Name the new class. (something representative and specific is ideal)
3.2.a.3. Choose the root CO of this class.
3.2.b. Add an existing class by choosing one from the "Add existing" dropdown.
WARNING: Changes to a class are shared among all uses of the same class. See next section [2.c.1.] if you want this new class to be separate from the existing one.
3.2.c.1. Add a new class based on an existing class by clicking one from the "Add existing" dropdown.
3.2.c.2. Press the button "New class from this".
3.2.c.3. The new class will have "_clone" appended to the name, and optionally a number if clones already existed. (I'ts better to change the name to something more representative and specific.)
3.2.c.4. Optionally, change the CO this class is based on. This is useful to create classes of the opposite gender, when the female and male have different CO.
WARNING: Constraints applied to parameters that don't exist in the new class will be marked as erroneous and simply be ignored.
> For this example, create four classes following the process 2.a.: "Sheep" and "Ram" from the CO "Sheep"; "Shepherd" from the CO "Human Male" and "Shepherd Dog" from the CO "Dog".
> Then, once the class "Shepherd" has been configured, follow the process 2.c. and name the new class "Shepherdess" and changes its CO to "Human Female".
==== 3.3. Select how often each class will spawn in this population by assigning weights
> For this example, set the weights of "Shepherdess" and "Shepherd" to 1,= 3. the weight of "Shepherd Dog" and "Ram" to 2 and the weight of "Sheep" to 70.Population creation
= 4. Population usage