VariationalAction2/Towns: Difference between revisions

From GRFSpecs
Jump to navigation Jump to search
Content deleted Content added
m 7 revisions
Terkhen (talk | contribs)
Fix style and format
Line 1: Line 1:
==Introduction==


==Variables==
'''''Variational Action 2 Variables for Cities'''''


{| |-
=Variational Action 2 Variables for Cities=
!Variable!!Size!!Content
|-
|40||B||Larger town effect on this town
|-
|41||B||Town index
|-
|82||W||Population
|-
|94..9C||W*5||5 WORD values of the town zone radii
|-
|B6||W||number of buildings
|}


These are accessed by using a type 82/86/8A action 2 for stations, town buildings, or industries.
These are accessed by using a type 82/86/8A action 2 for stations, town buildings, or industries.

||Variable|Size|Content

40|B|Larger town effect on this town

41|B|Town index

82|W|Population

94..9C|W*5|5 WORD values of the town zone radii

B6|W|number of buildings||


For other 80+x variables confer the [http://marcin.ttdpatch.net/sv1codec/TTD-locations.html#_TownArray|TTD town structure].
For other 80+x variables confer the [http://marcin.ttdpatch.net/sv1codec/TTD-locations.html#_TownArray|TTD town structure].


==Description==
==Larger town effect (40)==
===Larger town effect (40)===


This returns how the "largertowns" switch affects this town:
This returns how the "largertowns" switch affects this town:


{| |-
||Value|Meaning
!Value!!Meaning
|-
|0||largertowns is enabled, but it won't allow this town to grow larger than usual
|-
|1||largertowns is enabled, and it allows to grow this town larger
|-
|2||largertowns is disabled, so no towns are allowed to grow larger
|}


===Town index (41)===
0|largertowns is enabled, but it won't allow this town to grow larger than usual


This returns the index of the town in the town array. This value is between 0 and 69 (inclusive). You can use this value to treat some towns specially. (For example, the first town on the map can be considered the capital and you can allow a Parliament to be built there, but nowhere else)
1|largertowns is enabled, and it allows to grow this town larger


==Example==
2|largertowns is disabled, so no towns are allowed to grow larger||

==Town index (41)==

This returns the index of the town in the town array. This value is between 0 and 69 (inclusive). You can use this value to treat some towns specially. (For example, the first town on the map can be considered the capital and you can allow a Parliament to be built there, but nowhere else)

Revision as of 13:28, 14 June 2011

Introduction

Variables

Variable Size Content
40 B Larger town effect on this town
41 B Town index
82 W Population
94..9C W*5 5 WORD values of the town zone radii
B6 W number of buildings

These are accessed by using a type 82/86/8A action 2 for stations, town buildings, or industries.

For other 80+x variables confer the town structure.

Description

Larger town effect (40)

This returns how the "largertowns" switch affects this town:

Value Meaning
0 largertowns is enabled, but it won't allow this town to grow larger than usual
1 largertowns is enabled, and it allows to grow this town larger
2 largertowns is disabled, so no towns are allowed to grow larger

Town index (41)

This returns the index of the town in the town array. This value is between 0 and 69 (inclusive). You can use this value to treat some towns specially. (For example, the first town on the map can be considered the capital and you can allow a Parliament to be built there, but nowhere else)

Example