Function: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
 
(237 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{learned|what functions are|how functions relate to the Tygron Engine|where functions are used|how to change existing functions|how to create your own functions}}
[[File:Api_current_situation_building.png|thumb|right|400px|[[Function]] related to [[Building]]s and [[Function Override]]s]]
Functions are the blueprints for [[Building]]s in your projects. They describe the purpose and basic [[Function Value|properties]] of [[Building]]s. A Function also references which model sets and colors are used in the 2D and 3D visualization. A Function is effectively a "type of Building".


==Functions==
The properties associated with a Function are known as [[Function Value]]s
A function is a purpose or destination for something. In the context of spatial planning, a function specifically indicates the purpose of a building or other type of construction. A corporate skyscraper has an "office" function. A house has a residential function. A park has a leisure function.


==How functions relate to the Tygron Engine==
A Building in a Project is always based on one Function. Buildings with the same Function may have different locations, different heights, and different owners. But Buildings with the same Function will have the same set of [[Function Value|properties]] defining their economic, environmental, and spatial effect.
In the Tygron Engine, functions are used to refer to specific types of building. Every [[constructions|construction]] has assigned to it what type of construction it is, in the form of a function. Functions can also exist separately from constructions, as a definition of a type of building. Although many functions may exist in a game, not all functions need to be used.


==Function usage==
During a session, a Function can also be applied as an action by a Stakeholder. Combining it with selection polygons and a specific number of floors places a Building of that function in your project.
There are two ways functions can be used. Primarily, a function is used


The {{software}} contains [[List of Functions|several hundred Functions]].


==Changing functions==
''This section deals with changing the values of the function itself. For changing the function of a construction, see [[Constructions#How to change constructions in a game|changing constructions]].''


{{Editor location|||Indicators|Function Values}}
==Function Properties==
Each function consists of the following properties:
* A unique name, a description and an image.
* A Region, construction period and [[Api session items functions#Api Model PlacementType|placement type]].
* Links to 3D [[Model Set]]s, Textures and decals.
* [[Function Value]]s, [[Category Value]]s and custom [[Attribute]]s.


[[File:Function_values_screen.jpg|framed|none|The function values editing screen.]]
===Function values===
{{main|Function Value}}
[[File:Function_value_table.png|thumb|right|[[Function Values Table]] in the [[editor]].]]
Functions are composed of a collection of properties called [[Function Value]]s. These provide the numeric definitions applied to Buildings of that function. In principle, when such a value of a Building is required for a calculation, the value set in the Function is used.


===Adding functions for editing===
A complete list of all available Function Values can be found on the [[Function Value]]s page.
{{Editor location|||Indicators|Function Values}}
{{Editor steps|title=add a function for editing|Click "Add".|Select the desired function in the [[function selection]] window.|Find the function in the list in the "Function Values" panel.}}


===Adding new functions===
===Category values===
{{Editor location|||Indicators|Function Values}}
{{main|Category Value}}
{{Editor steps|title=add a new function|Select a function from the list to use as template.|Press "Duplicate".|Find the duplicated function at the bottom of the list.}}
Some numeric properties of a Function are [[Category]] specific. These are known as [[Category Value]]s and are handled differently compared to Function Values. The attribute name of a Category Value always starts with the Category name, followed by an underscore and the name of the Category Value.


===Changing function===
===Regions===
{{Editor location|||Indicators|Function Values}}
[[File:Region_selection.jpg|framed|right|The region selector, to filter the available functions.]]
{{Editor steps|title=change the properties of functions|If the desired function is not yet present in the list, [[#adding functions for editing|add the function]] to the list.|Find the column with the property you wish to change.|Change the value in the row of the function and the column of the property.}}
To further help with finding the appropriate Function, they are also divided into regions. Based on the location of the Project, the region for the Project is set automatically. Some Functions are only available in certain regions. This is based on what region of the world the Function would be most appropriate for.


[[File:Function_values_screen_edit_value.jpg|framed|left|Editing the floor area of Social Housing.]]<br clear=all>
When selecting a Function, it is possible to change the region of the Project to gain access to the Functions of other regions. It is possible to mix Functions of various regions freely.
There are many properties to be edited.


====Changing effects on custom indicators====
Currently the {{software}} distinguishes the following regions:
* Africa
* Asia
* North America
* Northwestern Europe
* Other
{{clear}}


{{Editor location|||Indicators|Custom function scores}}
==Function Categories==


{{Editor steps|title=change the effect of functions on custom indicators|If the desired function is not yet present in the list, [[#adding functions for editing|add the function]] to the list of function values| Find the column with the indicator for which you wish to change the effects| Change the value in the row of the function and the column of the property value}}
[[File:Function-selector.jpg|300px|thumb|left|The function selection window. This will appear whenever you need to a select a function.]]
Functions are divided into Function Categories. Where a Function itself may be "Old Warehouses", such a Function may belong to a Function Category "Industry". This categorization helps when trying to select a specific Function among the full collection of Functions. It also makes it easier to [[Tygron Query Language|query]] Buildings in a Project by filtering on the purposes of the Building. Rather than creating individual queries for each Function which matches a broad usage for Buildings, a single query for a Function Category can be used.


[[File:Custom_function_values_screen_edit_value.jpg|framed|left|Changing the effect of offices on the economy indicator.]]<br clear=all>
Functions are always part of at least one Category, but can also be part of multiple categories. An example is a Function for a Building with shops at a bottom floor, but residences on floors above it. Or flats which contain a mix of both social and luxury housing. In these cases, the Function's Categories each have a respective weight. While the Building remains a single Function, it is treated as 'divided' among its Categories for performed queries (e.g., for floor size).{{clear}}
 
====Function Category====
{{:Category}}
The table above also indicates which Categories can be combined with others within a Function. To add, remove and change Categories of a Function, see the [[#How-to's|How-to's section]].
 
{{article end
|howtos=
* [[How to add Functions for editing]]
* [[How to create Functions]]
* [[How to change Function Values for a Function]]
* [[How to add an Attribute to a Function]]
* [[How to change Attributes for a Function]]
* [[How to add a Category to a Function]]
* [[How to remove a Category from a Function]]
* [[How to change the Category of a Function]]
* [[How to adjust Building Costs]]
|seealso=
*[[Building]]
*[[Function Override]]
*[[Function Values Table]]
*[[Geo Link]]
*[[Upgrade Type]]
*[[Function Value]]
*[[Category Value]]
*[[Category]]
*[[List of Functions]]
|api=
*[[Api session items functions]]
*[[Api session items functionoverrides]]
*[[Api session event editor functionoverride]]
}}
 
{{Editor_current_situation_nav}}
 
[[Category:Items]]

Latest revision as of 11:31, 13 July 2026

Function related to Buildings and Function Overrides

Functions are the blueprints for Buildings in your projects. They describe the purpose and basic properties of Buildings. A Function also references which model sets and colors are used in the 2D and 3D visualization. A Function is effectively a "type of Building".

The properties associated with a Function are known as Function Values

A Building in a Project is always based on one Function. Buildings with the same Function may have different locations, different heights, and different owners. But Buildings with the same Function will have the same set of properties defining their economic, environmental, and spatial effect.

During a session, a Function can also be applied as an action by a Stakeholder. Combining it with selection polygons and a specific number of floors places a Building of that function in your project.

The Tygron Platform contains several hundred Functions.


Function Properties

Each function consists of the following properties:

Function values

Main article: Function Value
Function Values Table in the editor.

Functions are composed of a collection of properties called Function Values. These provide the numeric definitions applied to Buildings of that function. In principle, when such a value of a Building is required for a calculation, the value set in the Function is used.

A complete list of all available Function Values can be found on the Function Values page.

Category values

Main article: Category Value

Some numeric properties of a Function are Category specific. These are known as Category Values and are handled differently compared to Function Values. The attribute name of a Category Value always starts with the Category name, followed by an underscore and the name of the Category Value.

Regions

The region selector, to filter the available functions.

To further help with finding the appropriate Function, they are also divided into regions. Based on the location of the Project, the region for the Project is set automatically. Some Functions are only available in certain regions. This is based on what region of the world the Function would be most appropriate for.

When selecting a Function, it is possible to change the region of the Project to gain access to the Functions of other regions. It is possible to mix Functions of various regions freely.

Currently the Tygron Platform distinguishes the following regions:

  • Africa
  • Asia
  • North America
  • Northwestern Europe
  • Other

Function Categories

The function selection window. This will appear whenever you need to a select a function.

Functions are divided into Function Categories. Where a Function itself may be "Old Warehouses", such a Function may belong to a Function Category "Industry". This categorization helps when trying to select a specific Function among the full collection of Functions. It also makes it easier to query Buildings in a Project by filtering on the purposes of the Building. Rather than creating individual queries for each Function which matches a broad usage for Buildings, a single query for a Function Category can be used.

Functions are always part of at least one Category, but can also be part of multiple categories. An example is a Function for a Building with shops at a bottom floor, but residences on floors above it. Or flats which contain a mix of both social and luxury housing. In these cases, the Function's Categories each have a respective weight. While the Building remains a single Function, it is treated as 'divided' among its Categories for performed queries (e.g., for floor size).

Function Category

Currently the Tygron Platform distinguishes the following Categories for Functions:

Category TQL Term Combinable Layer Description
Affordable housing SOCIAL yes Surface Includes various types of flats and social housing.
Agriculture AGRICULTURE no Surface Includes farmhouses, barns, and floating crop fields.
Bridge BRIDGE no Bridge Includes bridges of asphalt roads (various types), bicycle paths, cobblestone roads and train tracks.
Education EDUCATION yes Surface Includes basic educational buildings, emergency classrooms, labs and primary schools.
Gardens GARDEN no Surface Includes standard and fenced gardens.
Healthcare HEALTHCARE yes Surface Includes hospitals, clinics, healthcare farms and healthcare hotels.
Industry INDUSTRY yes Surface Includes small and heavy industry, bio-refineries, silos, warehouses and chimneys.
Intersection INTERSECTION no Surface Includes intersections of asphalt roads (various types), bicycle paths, cobblestone roads and train tracks.
Leisure LEISURE no Surface Includes sports centers, swimming pools, theatres and tennis courts.
Market housing NORMAL yes Surface Includes various types of housing, apartments and shops with houses.
Nature NATURE no Surface Includes trees, orchards and reeds.
Offices OFFICES yes Surface Includes classic, luxurious, old offices and offices with shops.
Other OTHER no Surface Includes miscellaneous items such as cemeteries, trash bins, and windmills.
Parks PARK no Surface Includes city parks, fountains, pocket parks and vegetable gardens.
Roads ROAD no Surface Includes asphalt roads (various types), bicycle paths, cobblestone roads and train tracks.
Senior housing SENIOR yes Surface Includes standard and luxurious senior housing.
Shops and restaurants SHOPPING yes Surface Includes convenience stores, offices with shops and houses with shops.
Squares PAVED_AREA no Surface Includes parking spaces, playgrounds, watersquares and skate parks.
Student housing STUDENT yes Surface Includes affordable student housing, various other student housing types, and student containers.
Top market housing LUXE yes Surface Includes luxury apartments, modern villas, old villas and monumental houses.
Underground UNDERGROUND no Underground Includes culverts, pumps and inlets.


The table above also indicates which Categories can be combined with others within a Function. To add, remove and change Categories of a Function, see the How-to's section.