You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Note: The above X/Y/Zs are the coordinates of the start and end turfs, the locate() simply finds the turf for the code
93
-
94
-
6. Call yourMapGeneratorType.generate(), this will cause all the modules in the generator to build within the map bounds
95
-
96
-
Option Suggestions:
97
-
98
-
* Have separate modules for Turfs and Atoms, this is not enforced, but it is how I have structured my nature example.
99
-
* If your map doesn't look quite to your liking, simply jiggle with the variables on your modules and the type probabilities
100
-
* You can mix and map premade areas with the procedural generation, for example mapping an entire flat land but having code generate just the grass tufts
101
-
102
-
103
-
Using the Modules list
104
-
105
-
Simply think of it like each module is a layer in a graphics editing program!
106
-
To help you do this templates such as /mapGeneratorModule/bottomLayer have been provided with appropriate default settings.
107
-
These are located near the bottom of mapGeneratorModule.dm
108
-
you would order your list left to right, top to bottom, e.g:
109
-
modules = list(bottomLayer,nextLayer,nextNextLayer) etc.
110
-
111
-
112
-
Variable Breakdown (For Mappers):
113
-
114
-
mapGenerator
115
-
map - INTERNAL, do not touch
116
-
modules - A list of typepaths of mapGeneratorModules
117
-
118
-
mapGeneratorModule
119
-
mother - INTERNAL, do not touch
120
-
spawnableAtoms - A list of typepaths and their probability to spawn, eg: spawnableAtoms = list(/obj/structure/flora/tree/pine = 30)
121
-
spawnableTurfs - A list of typepaths and their probability to spawn, eg: spawnableTurfs = list(/turf/unsimulated/floor/grass = 100)
122
-
clusterMax - The max range to check for something being "too close" for this atom/turf to spawn, the true value is random between clusterMin and clusterMax
123
-
clusterMin - The min range to check for something being "too close" for this atom/turf to spawn, the true value is random between clusterMin and clusterMax
124
-
clusterCheckFlags - A Bitfield that controls how the cluster checks work, All based on clusterMin and clusterMax guides
125
-
allowAtomsOnSpace - A Boolean for if we allow atoms to spawn on space tiles
126
-
127
-
clusterCheckFlags flags:
128
-
CLUSTER_CHECK_NONE 0 //No checks are done, cluster as much as possible
129
-
CLUSTER_CHECK_DIFFERENT_TURFS 2 //Don't let turfs of DIFFERENT types cluster
130
-
CLUSTER_CHECK_DIFFERENT_ATOMS 4 //Don't let atoms of DIFFERENT types cluster
131
-
CLUSTER_CHECK_SAME_TURFS 8 //Don't let turfs of the SAME type cluster
132
-
CLUSTER_CHECK_SAME_ATOMS 16 //Don't let atoms of the SAME type cluster
133
-
134
-
CLUSTER_CHECK_SAMES 24 //Don't let any of the same type cluster
135
-
CLUSTER_CHECK_DIFFERENTS 6 //Don't let any different types cluster
136
-
CLUSTER_CHECK_ALL_TURFS 10 //Don't let ANY turfs cluster same and different types
137
-
CLUSTER_CHECK_ALL_ATOMS 20 //Don't let ANY atoms cluster same and different types
138
-
139
-
CLUSTER_CHECK_ALL 30 //Don't let anything cluster, like, at all
140
-
</code></pre>
141
-
<h1id="procedural-mapping">Procedural Mapping</h1><h3id="with-regards-to-remierichards"><em>With Regards To RemieRichards</em></h3>
1
+
<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><basehref="../../"><linkrel="stylesheet" href="dmdoc.css"><title>code/modules/procedural_mapping/README.md - /tg/ Station 13</title></head><body><header><ahref="index.html">/tg/ Station 13</a> - <ahref="index.html#modules">Modules</a> - <ahref="index.html#types">Types</a></header><main><h1>Procedural Mapping <aside>code/modules/procedural_mapping/README.md</aside><ahref="https://github.com/MrMelbert/MapleStationCode/blob/ba9d9dc68e323b6cce774e4ed8505dd533ebf14a/code/modules/procedural_mapping/README.md"><imgsrc="git.png" width="16" height="16" title="code/modules/procedural_mapping/README.md"></a></h1><tableclass="summary" cellspacing="0"><tr><tdcolspan="2"><h3id="with-regards-to-remierichards"><em>With Regards To RemieRichards</em></h3>
#Note: The above X/Y/Zs are the coordinates of the start and end turfs, the locate() simply finds the turf for the code
233
+
234
+
6. Call yourMapGeneratorType.generate(), this will cause all the modules in the generator to build within the map bounds
235
+
236
+
Option Suggestions:
237
+
238
+
* Have separate modules for Turfs and Atoms, this is not enforced, but it is how I have structured my nature example.
239
+
* If your map doesn't look quite to your liking, simply jiggle with the variables on your modules and the type probabilities
240
+
* You can mix and map premade areas with the procedural generation, for example mapping an entire flat land but having code generate just the grass tufts
241
+
242
+
243
+
Using the Modules list
244
+
245
+
Simply think of it like each module is a layer in a graphics editing program!
246
+
To help you do this templates such as /mapGeneratorModule/bottomLayer have been provided with appropriate default settings.
247
+
These are located near the bottom of mapGeneratorModule.dm
248
+
you would order your list left to right, top to bottom, e.g:
249
+
modules = list(bottomLayer,nextLayer,nextNextLayer) etc.
250
+
251
+
252
+
Variable Breakdown (For Mappers):
253
+
254
+
mapGenerator
255
+
map - INTERNAL, do not touch
256
+
modules - A list of typepaths of mapGeneratorModules
257
+
258
+
mapGeneratorModule
259
+
mother - INTERNAL, do not touch
260
+
spawnableAtoms - A list of typepaths and their probability to spawn, eg: spawnableAtoms = list(/obj/structure/flora/tree/pine = 30)
261
+
spawnableTurfs - A list of typepaths and their probability to spawn, eg: spawnableTurfs = list(/turf/unsimulated/floor/grass = 100)
262
+
clusterMax - The max range to check for something being "too close" for this atom/turf to spawn, the true value is random between clusterMin and clusterMax
263
+
clusterMin - The min range to check for something being "too close" for this atom/turf to spawn, the true value is random between clusterMin and clusterMax
264
+
clusterCheckFlags - A Bitfield that controls how the cluster checks work, All based on clusterMin and clusterMax guides
265
+
allowAtomsOnSpace - A Boolean for if we allow atoms to spawn on space tiles
266
+
267
+
clusterCheckFlags flags:
268
+
CLUSTER_CHECK_NONE 0 //No checks are done, cluster as much as possible
269
+
CLUSTER_CHECK_DIFFERENT_TURFS 2 //Don't let turfs of DIFFERENT types cluster
270
+
CLUSTER_CHECK_DIFFERENT_ATOMS 4 //Don't let atoms of DIFFERENT types cluster
271
+
CLUSTER_CHECK_SAME_TURFS 8 //Don't let turfs of the SAME type cluster
272
+
CLUSTER_CHECK_SAME_ATOMS 16 //Don't let atoms of the SAME type cluster
273
+
274
+
CLUSTER_CHECK_SAMES 24 //Don't let any of the same type cluster
275
+
CLUSTER_CHECK_DIFFERENTS 6 //Don't let any different types cluster
276
+
CLUSTER_CHECK_ALL_TURFS 10 //Don't let ANY turfs cluster same and different types
277
+
CLUSTER_CHECK_ALL_ATOMS 20 //Don't let ANY atoms cluster same and different types
278
+
279
+
CLUSTER_CHECK_ALL 30 //Don't let anything cluster, like, at all
0 commit comments