Hey folks, So I've been playing around with the cityrules file, to try and get better looking and more organized cities( lets be real here, cities in simutrans are terrible).
I know this is sort of pak set specific but, it seems most paks use similar, not to say exactly same cityrule files.
So sorry if this is wrong of me to suggest or in the wrong place.
So my main aim here was to enable bigger blocks, more straighter roads, 2x2 roads were easy to do but looked very ugly and crummy ( I'll try to do them again and pictures later).
I was able to get some 3x3 blocks more or less with straight roads, and some small variations.
3x3 straight blocks I think would be easy, however I tried to add some variation by creating round-abouts in between blocks, these however rarely work, but at least give some diagonal variations.
Its kind of impossible to get exact blocks, the cityrules system is quite limited and allow for very complex hard to predict scenarios, also monument placement simply ruin any predictability, building roads all around it.
Description of the pictures:
1 | Somewhat performed with a very specific rules for the round about, works all right but still has lots of unpredictability, nice variations though. |
2 | With the current set of rules creates nice blocks with good predictability, needed a helping hand on the round-about though. |
3 | This is also nice and almost worked, but still needed a helping hand. |
4 | This finally was all natural, and is the perfect example on how the monuments( cathedrals) borked the whole system. But still looks nice |
This still definitely needs some working, what you guys think?
Personally I will only make something simpler for myself since I tend to build cities myself.
Do you guys think this could be used a default in some pakset?
The actual cityrules.dat (also annexed)
# cityrules.tab
#
###############################################
## C I T Y B U I L D I N G R U L E S ##
###############################################
#
# ver. 0.3
# More or less done settings for avarage 3x3 blocks with some variation.
# Still needs work, takes forever to initialize map with cities.
#
# author: Gfurst
#
# relative affinities for certain building types which can lead to clustering of certain building types
#
# avoid building next to industry
res_start_score = 8
res_near_ind = -8
res_near_com = 0
res_near_res = 8
# everywhere is good, next to com best
com_start_score = 0
com_near_ind = 0
com_near_com = 8
com_near_res = 2
# next to res means expensive filters and no truck after 10 pm => avoid this ...
ind_start_score = 0
ind_near_ind = 8
ind_near_com = 2
ind_near_res = -8
#
# now the actual building rules. They can be up to 7x7.
# allowed sizes are 3x3 5x5 and 7x7!
#
#
# Symbols in rules:
# S = must not be road
# s = must be road
# n = must be bare land
# H = must not be house
# h = must be house
# T = must not be a stop
# t = must be a stop
# . = anything matches
# SPACE = next row
#
# Each row must have EXACTLY the same number of members!
#
#
## HOUSES
#
## Block corner house
# . . . . .
# . . S s .
# . S n s S
# . s s s .
# . . S . .
house_1 = ..... ..Ss. .SnsS .sss. ..S..
house_1.chance = -4
## One tile from corner house
# . . . . .
# . . . . .
# s S n S s
# s s s s s
# . . S . .
house_2 = ..... ..... .SnS. .sss. ..S..
house_2.chance = -4
## House on diagonal
# . . . . .
# . . . . .
# . . n s s
# . s s s S
# . . . . .
house_3 = ..... ..... ..nss .sssS .....
house_4 = ..... ..... ssnss Ssss. .....
house_3.chance = 0
house_4.chance = 0
#
## Block 3x3 set
#
## Straigh road with at least 2 spacing
# . . . . . . .
# . . . H . . .
# . . S H S . .
# . S S n S S .
# . . S s S . .
# . . . s . . .
# . . . . . . .
road_1 = ..H.. .SHS. SSnSS .SsS. ..s..
road_1.chance = 0
## turning after block complete
# . . . . . . .
# . . . . . . .
# . S . S S . .
# . . s n H H .
# . S s S S . .
# . S s S . . .
# . S s S . . .
road_2 = ....... ....... .S.SS.. ..snHH. .SsSS.. .SsS... .SsS...
road_3 = ....... ....... ..SS.S. .HHns.. ..SSsS. ...SsS. ...SsS.
road_2.chance = -4
road_3.chance = -4
## forking off a corner
# . . . . . . .
# . . . H . . .
# . . S H S . .
# . . S n S S S
# . . . s s s s
# . . S s S S S
# . . S s S . .
# technically same as the previous, higher chance
road_4 = ....... ...H... ..SHS.. ..SnSSS ...ssss ..SsSSS ..SsS..
road_5 = ....... ...H... ..SHS.. SSSnS.. ssss... SSSsS.. ..SsS..
road_4.chance = -4
road_5.chance = -4
## forking off a crossing
# . . . . . . .
# . . . H . . .
# . . S H S . .
# . S S n S S .
# s s s s s s s
# . S S s S S .
# . . S s S . .
# not needed, same as above
#
## Connecting roads
#
## connecting corners
# . . . . . . .
# . . . . . . .
# . S S . . . .
# s s s n . . .
# . S S s S . .
# . . S s S . .
# . . . s . . .
road_6 = ....... ....... .SS.... sssn... .SSsS.. ..SsS.. ...s...
road_6.chance = -6
## connecting multiple corners
# . . . . . . .
# . . . . . . .
# S S S . S S S
# s s s n s s s
# S S S s S S S
# . . S s S . .
# . . S s S . .
# not needed same as above
## connecting midblock
# . . . . . . .
# . . . . . . .
# . . S S S . .
# . s s n s s .
# . s S S S s .
# . s S . S s .
# . s . . . s .
road_7 = ....... ....... ..SSS.. .ssnss. .sSSSs. .sS.Ss. .s...s.
road_7.chance = -6
## connecting near crossing
# . . . . . . .
# S S S . . . .
# s s s H . . .
# S S S n S . .
# . . S s S . .
# . . S s S . .
# . . . s . . .
road_8 = ....... SSS.... sssH... SSSnS.. ..SsS.. ..SsS.. ...s...
road_9 = ....... ....SSS ...Hsss ..SnSSS ..SsS.. ..SsS.. ...s...
road_8.chance = -6
road_9.chance = -6
## diagonal connecting
# . . . . s . .
# . . . . s . .
# . . S S s S .
# . . S n H S .
# . . S s S S .
# . . . s . . .
# . . . s . . .
# in the rare case non straight roads meet
road_10 = ....s.. ....s.. ..SSsS. ..SnHS. ..SsSS. ...s... ...s...
road_11 = ..s.... ..s.... .SsSS.. .SHnS.. .SSsS.. ...s... ...s...
road_10.chance = -6
road_11.chance = -6
#
# Rounds
#
## connecting as round-about
# S S H S S . .
# S H H H S S .
# H H S s s s s
# S H s n S S .
# S S s S S . .
# . S s S . . .
# . . s . . . .
road_12 = SSHSS.. SHHHSS. HHSssss SHsnSS. SSsSS.. .SsS... ..s....
road_13 = ..SSHSS .SSHHHS ssssSHH .SSnsHS ..SSsSS ...SsS. ....s..
road_12.chance = -4
road_13.chance = -4
## continuing round-about
# S S H S S . .
# S H H H S S .
# s s S H H H H
# S s s n S S .
# S S s S S . .
# . S s S . . .
# . . s . . . .
# close to above, but higher chance
road_14 = SSHSS.. SHHHSS. ssSHHHH SssnSS. SSsSS.. .SsS... ..s....
road_15 = ..SSHSS .SSHHHS HHHHSss .SSnssS ..SSsSS ...SsS. ....s..
road_14.chance = -6
road_15.chance = -6
## completing round-about
# . . . H . . .
# . . S H S . .
# . S S H S S .
# S S s n s S S
# s s s S s s s
# S S s s s S S
# . S S s S S .
# definite chance
road_16 = ...H... ..SHS.. .SSHSS. SSsnsSS sssSsss SSsssSS .SSsSS.
road_16.chance = -7
## connecting off round-about
# . . . . . . .
# . . H H H . .
# . S S H S S .
# . S S n S S .
# S S s s s S S
# s s s S s s s
# S S s s s S S
road_17 = ....... ..HHH.. .SSHSS. .SSnSS. SSsssSS sssSsss SSsssSS
road_17.chance = -7
## Fail-safe straigh road
# . . . . .
# . . H . .
# . S n S .
# . S s S .
# . . s . .
# very low chance for fail-safe
# this is supposed to happen only when no other works
# but still may bork existing set
road_18 = ..... ..H.. .SnS. .SsS. ..s..
road_18.chance = 8
## Rounds
# These were the previous round logic
# supposed to be very specific with a step by step work
# has more chances of creating round abouts but still lots of fail
## starting round about
# S S H S S S H
# S H H H S S H
# H H S H H H H
# S H s n S S H
# S S s S S S H
# S S s S S S H
# H H s H H H H
#road_8 = SSHSSSH SHHHSSH HHSHHHH SHsnSSH SSsSSSH SSsSSSH HHsHHHH
#road_9 = HSSSHSS HSSHHHS HHHHSHH HSSnsHS HSSSsSS HSSSsSS HHHHsHH
#road_8.chance = -4
#road_9.chance = -4
## round about phase two
# S S H S S S H
# S S H S S S H
# S H H H S S H
# H H S n H H H
# S H s s S S H
# S S s S S S H
# S S s S S S H
#road_10 = SSHSSSH SSHSSSH SHHHSSH HHSnHHH SHssSSH SSsSSSH SSsSSSH
#road_11 = HSSSHSS HSSSHSS HSSHHHS HHHnSHH HSSssHS HSSSsSS HSSSsSS
#road_10.chance = -7
#road_11.chance = -7
## round about phase three
# H H H H H H H
# S S H S S S H
# S S H S S S H
# S H H n S S H
# H H S s H H H
# S H s s S S H
# S S s S S S H
#road_12 = HHHHHHH SSHSSSH SSHSSSH SHHnSSH HHSsHHH SHssSSH SSsSSSH
#road_13 = HHHHHHH HSSSHSS HSSSHSS HSSnHHS HHHsSHH HSSssHS HSSSsSS
#road_12.chance = -7
#road_13.chance = -7
## completing round about
# . H H H H H .
# S S S H S S S
# S S S H S S S
# S S s n s S S
# H H s S s H H
# S S s s s S S
# S S S s S S S
#road_14 = .HHHHH. SSSHSSS SSSHSSS SSsnsSS HHsSsHH SSsssSS SSSsSSS
#road_14.chance = -7
## forking out of round about
# S S s s s S S
# H H s S s H H
# S S s s s S S
# S S S n S S S
# S S S H S S S
# . H H H H H .
# . . . . . . .
#road_15 = SSsssSS HHsSsHH SSsssSS SSSnSSS SSSHSSS .HHHHH. .......
#road_15.chance = -4
## connecting to other blocks
# H H s S s H H
# S S s s s S S
# S S S s S S S
# S S S n S S S
# H H H H H H H
# . . . . . . .
# . . . . . . .
#road_16 = HHsSsHH SSsssSS SSSsSSS SSSnSSS HHHHHHH ....... .......
#road_16.chance = -4
## connecting round about with other blocks
# H S S s s s S
# H S S S s S S
# H S S S s S .
# H H H n s . .
# . S S S . . .
# . . . . . . .
# . . . . . . .
#road_17 = HSSsssS HSSSsSS HSSSsS. HHHns.. .SSS... ....... .......
#road_18 = SsssSSH SSsSSSH .SsSSSH ..snHHH ...SSS. ....... .......
#road_17.chance = -4
#road_18.chance = -4
## connecting to other blocks
# S S s s s S S
# S S S s S S S
# . S S s S S .
# . H H n H H .
# . S S H S S .
# . . S H S . .
# . . . . . . .
#
### End of file
#