User Tools

Site Tools

Urban Games

modding:names

Table of Contents

Names

There are several types of objects which get random names assigned by the game. It is possible to define lists of names for several regions and to translate them in severals languages. The list files are located in res/config/name2/<region>/<language>/ where the default regions are:

  • asia or one of the subregions korea or russia.
  • europe or one of the subregions england, france, germany, italy, netherlands, norway, spain or sweden.
  • asia.

It depends on the users choice and game language setting in the game preferences which list is used.

Persons

The possible names for residents depend on the gender of the person. Thus, the persons.lua file returns a property makeName that is a function with a boolean parameter. If the parameter male is true, the list should only contain male names. Otherwise the list should contain female names.

function data()
return {
  makeName = function (male)
    ...
  end
}
end

The names usually are random combinations of first and last names. A personnameutil.lua in the res/scripts/ folder contains several lists of name parts which can be referenced and concatenated to form the full names.

Streets

The possible street names are in the streets.lua file. It is a simple data function without parameters:

function data()
return {
  "High Street",
  "Main Street",
  "Park Road",
  ...
}
end

Towns

The possible town names are in the towns.lua file. It is a simple data function without parameters:

function data()
return {
  "Abingdon",
  "Accrington",
  "Acle",
  ...
}
end

It is recommended to provide a sufficient amount of town names to prevent several towns with the same name on the map.


modding/names.txt · Last modified: 2020/06/13 16:57 by yoshi