Table of Contents

People

To make the game world more lively passengers, pedestrians and drivers are simulated as animated characters. The standard character models are located in content/characters/ and identified by a special metadata struct.

Metadata

The model files consist of the following parts:

function data()
return {
  -- bounding box
  -- collider
  -- levels of detail
  metadata = {
    availability = {
      yearFrom = 1850,
      yearTo = 1920,
    },
    colorConfig = {
      configs = {
	{
	  { 0.72, 0.70, 0.65, },
	  { 0.40, 0.36, 0.34, },
	  { 0.62, 0.60, 0.58, },
	  { 0.81, 0.67, 0.63, },
	},
        ...
      },
    },
    person = {
      drivingLicenses = { "WATER", },
      gender = "FEMALE",
    },
  },
  version = 2,
}
end

The availability struct restricts the character to be available in a certain era only. yearFrom and/or yearTo can be left out or set to zero to define an indefinite start respectively end year.

Character models can be recolored to get more diversity in the game world. The colorConfig struct contains a list named configs that consists of a list of configuration structs. As the character models use a material with a four channel color blend map, each of the structs has a set of 4 different colors with three values for the three color channels red, green and blue in a range of 0 to 1.

The person struct is the unique identifyer for character models. It contains two properties:

Events

The character models support various animation events to reflect the current state of the people: