• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[TFS 1.x] Procedural Cave Generation

Hello everyone.
I'm really happy to see the interest you guys had in this project. and would love to see your implementations.
please share your creations with me ;)


super cool and everything but if I use version 772 the floors of some areas would not load, how do I know which ones I should put exactly? Or could you post one here for lower distribution, though I'm still trying to do it myself.
For those who intend to implement in a version lower than 8.6 the ideal is to create a new Styles table based on the tiles of your version
Lua:
local Styles={
    ["EXEMLE"] = {
        Wall = {919},
        Flor = {103},
        BorderFlor = {103},
        N = 4471,
        W = 4472,
        S = 4469,
        E = 4468,
        cNW = 4475,      --corner
        cNE = 4474,
        cSE = 4470,
        cSW = 4473,
        dNW = 4476,      --diagonal
        dNE = 4478,
        dSE = 4479,
        dSW = 4477,
    }
}
start with simple borders and tiles. and go testing

Lua Script Error: [Scripts Interface]
E:\sssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:callback
...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:736: attempt to index local 't' (a nil value)
stack traceback:
[C]: in function '__index'
...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:736: in function 'RemoveOlderSpawns'
...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:831: in function <...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:825>
Post automatically merged:

TFS 1.3
try to debug a little bit.
put a print before the line 736 showing the infos of the variable "mapLoc"
like this:
Lua:
...
local mapLoc = {x = x + map_select.startX,y = y + map_select.startY,z = map_select.startZ}
print(mapLoc.x,mapLoc.y,mapLoc.z)
local t = Tile(mapLoc)
...
review your configurations. its probably there
 
C++:
881     1127    7
881     1128    7
881     1129    7
881     1130    7
881     1131    7
881     1132    7
881     1133    7
881     1134    7
881     1135    7
881     1136    7
881     1137    7
881     1138    7
881     1139    7
881     1140    7
881     1141    7
881     1142    7
881     1143    7
881     1144    7
881     1145    7
881     1146    7
881     1147    7
881     1148    7
881     1149    7
881     1150    7
881     1151    7
881     1152    7
881     1153    7
881     1154    7
881     1155    7
881     1156    7
881     1157    7
881     1158    7
881     1159    7
881     1160    7
881     1161    7
881     1162    7
881     1163    7
881     1164    7
881     1165    7
881     1166    7
881     1167    7
881     1168    7
881     1169    7
881     1170    7
881     1171    7
881     1172    7
881     1173    7
881     1174    7
881     1175    7
881     1176    7
881     1177    7
881     1178    7
881     1179    7
881     1180    7
881     1181    7
881     1182    7
881     1183    7
881     1184    7
881     1185    7
881     1186    7
881     1187    7
881     1188    7
881     1189    7
881     1190    7
881     1191    7
881     1192    7
881     1193    7
881     1194    7
881     1195    7
881     1196    7
881     1197    7
881     1198    7
881     1199    7
881     1200    7
881     1201    7
881     1202    7
881     1203    7
881     1204    7
881     1205    7
881     1206    7
881     1207    7
881     1208    7
881     1209    7
881     1210    7
881     1211    7
881     1212    7
881     1213    7
881     1214    7
881     1215    7
881     1216    7
881     1217    7
881     1218    7
881     1219    7
881     1220    7
881     1221    7
881     1222    7
881     1223    7
881     1224    7
881     1225    7
881     1226    7
881     1227    7
881     1228    7
881     1229    7
881     1230    7
881     1231    7
881     1232    7
881     1233    7
881     1234    7
881     1235    7
881     1236    7
881     1237    7
881     1238    7
881     1239    7
881     1240    7

Lua Script Error: [Scripts Interface]
E:\sssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:callback
...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:737: attempt to index local 't' (a nil value)
stack traceback:
        [C]: in function '__index'
        ...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:737: in function 'RemoveOlderSpawns'
        ...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:832: in function <...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:826>
still not working.

C++:
1001    1228    7
1001    1229    7
1001    1230    7
1001    1231    7
1001    1232    7
1001    1233    7
1001    1234    7
1001    1235    7
1001    1236    7
1001    1237    7
1001    1238    7
1001    1239    7
1001    1240    7
1001    1241    7
1001    1242    7
1001    1243    7
1001    1244    7
1001    1245    7
1001    1246    7
1001    1247    7

Lua Script Error: [Scripts Interface]
E:\sssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:callback
...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:592: attempt to call method 'remove' (a nil value)
stack traceback:
        [C]: in function 'remove'
        ...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:592: in function 'spawnMap'
        ...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:833: in function <...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:826>
the server loads the map (but nothing changes)
 
Last edited:
C++:
881     1127    7
881     1128    7
881     1129    7
881     1130    7
881     1131    7
881     1132    7
881     1133    7
881     1134    7
881     1135    7
881     1136    7
881     1137    7
881     1138    7
881     1139    7
881     1140    7
881     1141    7
881     1142    7
881     1143    7
881     1144    7
881     1145    7
881     1146    7
881     1147    7
881     1148    7
881     1149    7
881     1150    7
881     1151    7
881     1152    7
881     1153    7
881     1154    7
881     1155    7
881     1156    7
881     1157    7
881     1158    7
881     1159    7
881     1160    7
881     1161    7
881     1162    7
881     1163    7
881     1164    7
881     1165    7
881     1166    7
881     1167    7
881     1168    7
881     1169    7
881     1170    7
881     1171    7
881     1172    7
881     1173    7
881     1174    7
881     1175    7
881     1176    7
881     1177    7
881     1178    7
881     1179    7
881     1180    7
881     1181    7
881     1182    7
881     1183    7
881     1184    7
881     1185    7
881     1186    7
881     1187    7
881     1188    7
881     1189    7
881     1190    7
881     1191    7
881     1192    7
881     1193    7
881     1194    7
881     1195    7
881     1196    7
881     1197    7
881     1198    7
881     1199    7
881     1200    7
881     1201    7
881     1202    7
881     1203    7
881     1204    7
881     1205    7
881     1206    7
881     1207    7
881     1208    7
881     1209    7
881     1210    7
881     1211    7
881     1212    7
881     1213    7
881     1214    7
881     1215    7
881     1216    7
881     1217    7
881     1218    7
881     1219    7
881     1220    7
881     1221    7
881     1222    7
881     1223    7
881     1224    7
881     1225    7
881     1226    7
881     1227    7
881     1228    7
881     1229    7
881     1230    7
881     1231    7
881     1232    7
881     1233    7
881     1234    7
881     1235    7
881     1236    7
881     1237    7
881     1238    7
881     1239    7
881     1240    7

Lua Script Error: [Scripts Interface]
E:\sssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:callback
...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:737: attempt to index local 't' (a nil value)
stack traceback:
        [C]: in function '__index'
        ...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:737: in function 'RemoveOlderSpawns'
        ...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:832: in function <...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:826>
still not working.

C++:
1001    1228    7
1001    1229    7
1001    1230    7
1001    1231    7
1001    1232    7
1001    1233    7
1001    1234    7
1001    1235    7
1001    1236    7
1001    1237    7
1001    1238    7
1001    1239    7
1001    1240    7
1001    1241    7
1001    1242    7
1001    1243    7
1001    1244    7
1001    1245    7
1001    1246    7
1001    1247    7

Lua Script Error: [Scripts Interface]
E:\sssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:callback
...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:592: attempt to call method 'remove' (a nil value)
stack traceback:
        [C]: in function 'remove'
        ...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:592: in function 'spawnMap'
        ...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:833: in function <...ssssssssssssssssssssssss\data\scripts\Procedural_Map.lua:826>
the server loads the map (but nothing changes)

Add this changes to your source. this should work
 
where do i add these files???
Post automatically merged:

Procedural_Map.lua:809: attempt to call global 'CreatureEvent' (a nil value)?
 
Last edited:
I modified the code a little so that this would work in canary 3.1.2 but it takes a long time to generate the map :,c
 
Back
Top