aboutsummaryrefslogtreecommitdiff
path: root/lib/lua/src/lgc.c
blob: e909c79a9696dd316aba56af686725b724189497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
/*
** $Id: lgc.c,v 2.38.1.2 2011/03/18 18:05:38 roberto Exp $
** Garbage Collector
** See Copyright Notice in lua.h
*/

#include <string.h>

#define lgc_c
#define LUA_CORE

#include "lua.h"

#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"


#define GCSTEPSIZE	1024u
#define GCSWEEPMAX	40
#define GCSWEEPCOST	10
#define GCFINALIZECOST	100


#define maskmarks	cast_byte(~(bitmask(BLACKBIT)|WHITEBITS))

#define makewhite(g,x)	\
   ((x)->gch.marked = cast_byte(((x)->gch.marked & maskmarks) | luaC_white(g)))

#define white2gray(x)	reset2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT)
#define black2gray(x)	resetbit((x)->gch.marked, BLACKBIT)

#define stringmark(s)	reset2bits((s)->tsv.marked, WHITE0BIT, WHITE1BIT)


#define isfinalized(u)		testbit((u)->marked, FINALIZEDBIT)
#define markfinalized(u)	l_setbit((u)->marked, FINALIZEDBIT)


#define KEYWEAK         bitmask(KEYWEAKBIT)
#define VALUEWEAK       bitmask(VALUEWEAKBIT)



#define markvalue(g,o) { checkconsistency(o); \
  if (iscollectable(o) && iswhite(gcvalue(o))) reallymarkobject(g,gcvalue(o)); }

#define markobject(g,t) { if (iswhite(obj2gco(t))) \
		reallymarkobject(g, obj2gco(t)); }


#define setthreshold(g)  (g->GCthreshold = (g->estimate/100) * g->gcpause)


static void removeentry (Node *n) {
  lua_assert(ttisnil(gval(n)));
  if (iscollectable(gkey(n)))
    setttype(gkey(n), LUA_TDEADKEY);  /* dead key; remove it */
}


static void reallymarkobject (global_State *g, GCObject *o) {
  lua_assert(iswhite(o) && !isdead(g, o));
  white2gray(o);
  switch (o->gch.tt) {
    case LUA_TSTRING: {
      return;
    }
    case LUA_TUSERDATA: {
      Table *mt = gco2u(o)->metatable;
      gray2black(o);  /* udata are never gray */
      if (mt) markobject(g, mt);
      markobject(g, gco2u(o)->env);
      return;
    }
    case LUA_TUPVAL: {
      UpVal *uv = gco2uv(o);
      markvalue(g, uv->v);
      if (uv->v == &uv->u.value)  /* closed? */
        gray2black(o);  /* open upvalues are never black */
      return;
    }
    case LUA_TFUNCTION: {
      gco2cl(o)->c.gclist = g->gray;
      g->gray = o;
      break;
    }
    case LUA_TTABLE: {
      gco2h(o)->gclist = g->gray;
      g->gray = o;
      break;
    }
    case LUA_TTHREAD: {
      gco2th(o)->gclist = g->gray;
      g->gray = o;
      break;
    }
    case LUA_TPROTO: {
      gco2p(o)->gclist = g->gray;
      g->gray = o;
      break;
    }
    default: lua_assert(0);
  }
}


static void marktmu (global_State *g) {
  GCObject *u = g->tmudata;
  if (u) {
    do {
      u = u->gch.next;
      makewhite(g, u);  /* may be marked, if left from previous GC */
      reallymarkobject(g, u);
    } while (u != g->tmudata);
  }
}


/* move `dead' udata that need finalization to list `tmudata' */
size_t luaC_separateudata (lua_State *L, int all) {
  global_State *g = G(L);
  size_t deadmem = 0;
  GCObject **p = &g->mainthread->next;
  GCObject *curr;
  while ((curr = *p) != NULL) {
    if (!(iswhite(curr) || all) || isfinalized(gco2u(curr)))
      p = &curr->gch.next;  /* don't bother with them */
    else if (fasttm(L, gco2u(curr)->metatable, TM_GC) == NULL) {
      markfinalized(gco2u(curr));  /* don't need finalization */
      p = &curr->gch.next;
    }
    else {  /* must call its gc method */
      deadmem += sizeudata(gco2u(curr));
      markfinalized(gco2u(curr));
      *p = curr->gch.next;
      /* link `curr' at the end of `tmudata' list */
      if (g->tmudata == NULL)  /* list is empty? */
        g->tmudata = curr->gch.next = curr;  /* creates a circular list */
      else {
        curr->gch.next = g->tmudata->gch.next;
        g->tmudata->gch.next = curr;
        g->tmudata = curr;
      }
    }
  }
  return deadmem;
}


static int traversetable (global_State *g, Table *h) {
  int i;
  int weakkey = 0;
  int weakvalue = 0;
  const TValue *mode;
  if (h->metatable)
    markobject(g, h->metatable);
  mode = gfasttm(g, h->metatable, TM_MODE);
  if (mode && ttisstring(mode)) {  /* is there a weak mode? */
    weakkey = (strchr(svalue(mode), 'k') != NULL);
    weakvalue = (strchr(svalue(mode), 'v') != NULL);
    if (weakkey || weakvalue) {  /* is really weak? */
      h->marked &= ~(KEYWEAK | VALUEWEAK);  /* clear bits */
      h->marked |= cast_byte((weakkey << KEYWEAKBIT) |
                             (weakvalue << VALUEWEAKBIT));
      h->gclist = g->weak;  /* must be cleared after GC, ... */
      g->weak = obj2gco(h);  /* ... so put in the appropriate list */
    }
  }
  if (weakkey && weakvalue) return 1;
  if (!weakvalue) {
    i = h->sizearray;
    while (i--)
      markvalue(g, &h->array[i]);
  }
  i = sizenode(h);
  while (i--) {
    Node *n = gnode(h, i);
    lua_assert(ttype(gkey(n)) != LUA_TDEADKEY || ttisnil(gval(n)));
    if (ttisnil(gval(n)))
      removeentry(n);  /* remove empty entries */
    else {
      lua_assert(!ttisnil(gkey(n)));
      if (!weakkey) markvalue(g, gkey(n));
      if (!weakvalue) markvalue(g, gval(n));
    }
  }
  return weakkey || weakvalue;
}


/*
** All marks are conditional because a GC may happen while the
** prototype is still being created
*/
static void traverseproto (global_State *g, Proto *f) {
  int i;
  if (f->source) stringmark(f->source);
  for (i=0; i<f->sizek; i++)  /* mark literals */
    markvalue(g, &f->k[i]);
  for (i=0; i<f->sizeupvalues; i++) {  /* mark upvalue names */
    if (f->upvalues[i])
      stringmark(f->upvalues[i]);
  }
  for (i=0; i<f->sizep; i++) {  /* mark nested protos */
    if (f->p[i])
      markobject(g, f->p[i]);
  }
  for (i=0; i<f->sizelocvars; i++) {  /* mark local-variable names */
    if (f->locvars[i].varname)
      stringmark(f->locvars[i].varname);
  }
}



static void traverseclosure (global_State *g, Closure *cl) {
  markobject(g, cl->c.env);
  if (cl->c.isC) {
    int i;
    for (i=0; i<cl->c.nupvalues; i++)  /* mark its upvalues */
      markvalue(g, &cl->c.upvalue[i]);
  }
  else {
    int i;
    lua_assert(cl->l.nupvalues == cl->l.p->nups);
    markobject(g, cl->l.p);
    for (i=0; i<cl->l.nupvalues; i++)  /* mark its upvalues */
      markobject(g, cl->l.upvals[i]);
  }
}


static void checkstacksizes (lua_State *L, StkId max) {
  int ci_used = cast_int(L->ci - L->base_ci);  /* number of `ci' in use */
  int s_used = cast_int(max - L->stack);  /* part of stack in use */
  if (L->size_ci > LUAI_MAXCALLS)  /* handling overflow? */
    return;  /* do not touch the stacks */
  if (4*ci_used < L->size_ci && 2*BASIC_CI_SIZE < L->size_ci)
    luaD_reallocCI(L, L->size_ci/2);  /* still big enough... */
  condhardstacktests(luaD_reallocCI(L, ci_used + 1));
  if (4*s_used < L->stacksize &&
      2*(BASIC_STACK_SIZE+EXTRA_STACK) < L->stacksize)
    luaD_reallocstack(L, L->stacksize/2);  /* still big enough... */
  condhardstacktests(luaD_reallocstack(L, s_used));
}


static void traversestack (global_State *g, lua_State *l) {
  StkId o, lim;
  CallInfo *ci;
  markvalue(g, gt(l));
  lim = l->top;
  for (ci = l->base_ci; ci <= l->ci; ci++) {
    lua_assert(ci->top <= l->stack_last);
    if (lim < ci->top) lim = ci->top;
  }
  for (o = l->stack; o < l->top; o++)
    markvalue(g, o);
  for (; o <= lim; o++)
    setnilvalue(o);
  checkstacksizes(l, lim);
}


/*
** traverse one gray object, turning it to black.
** Returns `quantity' traversed.
*/
static l_mem propagatemark (global_State *g) {
  GCObject *o = g->gray;
  lua_assert(isgray(o));
  gray2black(o);
  switch (o->gch.tt) {
    case LUA_TTABLE: {
      Table *h = gco2h(o);
      g->gray = h->gclist;
      if (traversetable(g, h))  /* table is weak? */
        black2gray(o);  /* keep it gray */
      return sizeof(Table) + sizeof(TValue) * h->sizearray +
                             sizeof(Node) * sizenode(h);
    }
    case LUA_TFUNCTION: {
      Closure *cl = gco2cl(o);
      g->gray = cl->c.gclist;
      traverseclosure(g, cl);
      return (cl->c.isC) ? sizeCclosure(cl->c.nupvalues) :
                           sizeLclosure(cl->l.nupvalues);
    }
    case LUA_TTHREAD: {
      lua_State *th = gco2th(o);
      g->gray = th->gclist;
      th->gclist = g->grayagain;
      g->grayagain = o;
      black2gray(o);
      traversestack(g, th);
      return sizeof(lua_State) + sizeof(TValue) * th->stacksize +
                                 sizeof(CallInfo) * th->size_ci;
    }
    case LUA_TPROTO: {
      Proto *p = gco2p(o);
      g->gray = p->gclist;
      traverseproto(g, p);
      return sizeof(Proto) + sizeof(Instruction) * p->sizecode +
                             sizeof(Proto *) * p->sizep +
                             sizeof(TValue) * p->sizek + 
                             sizeof(int) * p->sizelineinfo +
                             sizeof(LocVar) * p->sizelocvars +
                             sizeof(TString *) * p->sizeupvalues;
    }
    default: lua_assert(0); return 0;
  }
}


static size_t propagateall (global_State *g) {
  size_t m = 0;
  while (g->gray) m += propagatemark(g);
  return m;
}


/*
** The next function tells whether a key or value can be cleared from
** a weak table. Non-collectable objects are never removed from weak
** tables. Strings behave as `values', so are never removed too. for
** other objects: if really collected, cannot keep them; for userdata
** being finalized, keep them in keys, but not in values
*/
static int iscleared (const TValue *o, int iskey) {
  if (!iscollectable(o)) return 0;
  if (ttisstring(o)) {
    stringmark(rawtsvalue(o));  /* strings are `values', so are never weak */
    return 0;
  }
  return iswhite(gcvalue(o)) ||
    (ttisuserdata(o) && (!iskey && isfinalized(uvalue(o))));
}


/*
** clear collected entries from weaktables
*/
static void cleartable (GCObject *l) {
  while (l) {
    Table *h = gco2h(l);
    int i = h->sizearray;
    lua_assert(testbit(h->marked, VALUEWEAKBIT) ||
               testbit(h->marked, KEYWEAKBIT));
    if (testbit(h->marked, VALUEWEAKBIT)) {
      while (i--) {
        TValue *o = &h->array[i];
        if (iscleared(o, 0))  /* value was collected? */
          setnilvalue(o);  /* remove value */
      }
    }
    i = sizenode(h);
    while (i--) {
      Node *n = gnode(h, i);
      if (!ttisnil(gval(n)) &&  /* non-empty entry? */
          (iscleared(key2tval(n), 1) || iscleared(gval(n), 0))) {
        setnilvalue(gval(n));  /* remove value ... */
        removeentry(n);  /* remove entry from table */
      }
    }
    l = h->gclist;
  }
}


static void freeobj (lua_State *L, GCObject *o) {
  switch (o->gch.tt) {
    case LUA_TPROTO: luaF_freeproto(L, gco2p(o)); break;
    case LUA_TFUNCTION: luaF_freeclosure(L, gco2cl(o)); break;
    case LUA_TUPVAL: luaF_freeupval(L, gco2uv(o)); break;
    case LUA_TTABLE: luaH_free(L, gco2h(o)); break;
    case LUA_TTHREAD: {
      lua_assert(gco2th(o) != L && gco2th(o) != G(L)->mainthread);
      luaE_freethread(L, gco2th(o));
      break;
    }
    case LUA_TSTRING: {
      G(L)->strt.nuse--;
      luaM_freemem(L, o, sizestring(gco2ts(o)));
      break;
    }
    case LUA_TUSERDATA: {
      luaM_freemem(L, o, sizeudata(gco2u(o)));
      break;
    }
    default: lua_assert(0);
  }
}



#define sweepwholelist(L,p)	sweeplist(L,p,MAX_LUMEM)


static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) {
  GCObject *curr;
  global_State *g = G(L);
  int deadmask = otherwhite(g);
  while ((curr = *p) != NULL && count-- > 0) {
    if (curr->gch.tt == LUA_TTHREAD)  /* sweep open upvalues of each thread */
      sweepwholelist(L, &gco2th(curr)->openupval);
    if ((curr->gch.marked ^ WHITEBITS) & deadmask) {  /* not dead? */
      lua_assert(!isdead(g, curr) || testbit(curr->gch.marked, FIXEDBIT));
      makewhite(g, curr);  /* make it white (for next cycle) */
      p = &curr->gch.next;
    }
    else {  /* must erase `curr' */
      lua_assert(isdead(g, curr) || deadmask == bitmask(SFIXEDBIT));
      *p = curr->gch.next;
      if (curr == g->rootgc)  /* is the first element of the list? */
        g->rootgc = curr->gch.next;  /* adjust first */
      freeobj(L, curr);
    }
  }
  return p;
}


static void checkSizes (lua_State *L) {
  global_State *g = G(L);
  /* check size of string hash */
  if (g->strt.nuse < cast(lu_int32, g->strt.size/4) &&
      g->strt.size > MINSTRTABSIZE*2)
    luaS_resize(L, g->strt.size/2);  /* table is too big */
  /* check size of buffer */
  if (luaZ_sizebuffer(&g->buff) > LUA_MINBUFFER*2) {  /* buffer too big? */
    size_t newsize = luaZ_sizebuffer(&g->buff) / 2;
    luaZ_resizebuffer(L, &g->buff, newsize);
  }
}


static void GCTM (lua_State *L) {
  global_State *g = G(L);
  GCObject *o = g->tmudata->gch.next;  /* get first element */
  Udata *udata = rawgco2u(o);
  const TValue *tm;
  /* remove udata from `tmudata' */
  if (o == g->tmudata)  /* last element? */
    g->tmudata = NULL;
  else
    g->tmudata->gch.next = udata->uv.next;
  udata->uv.next = g->mainthread->next;  /* return it to `root' list */
  g->mainthread->next = o;
  makewhite(g, o);
  tm = fasttm(L, udata->uv.metatable, TM_GC);
  if (tm != NULL) {
    lu_byte oldah = L->allowhook;
    lu_mem oldt = g->GCthreshold;
    L->allowhook = 0;  /* stop debug hooks during GC tag method */
    g->GCthreshold = 2*g->totalbytes;  /* avoid GC steps */
    setobj2s(L, L->top, tm);
    setuvalue(L, L->top+1, udata);
    L->top += 2;
    luaD_call(L, L->top - 2, 0);
    L->allowhook = oldah;  /* restore hooks */
    g->GCthreshold = oldt;  /* restore threshold */
  }
}


/*
** Call all GC tag methods
*/
void luaC_callGCTM (lua_State *L) {
  while (G(L)->tmudata)
    GCTM(L);
}


void luaC_freeall (lua_State *L) {
  global_State *g = G(L);
  int i;
  g->currentwhite = WHITEBITS | bitmask(SFIXEDBIT);  /* mask to collect all elements */
  sweepwholelist(L, &g->rootgc);
  for (i = 0; i < g->strt.size; i++)  /* free all string lists */
    sweepwholelist(L, &g->strt.hash[i]);
}


static void markmt (global_State *g) {
  int i;
  for (i=0; i<NUM_TAGS; i++)
    if (g->mt[i]) markobject(g, g->mt[i]);
}


/* mark root set */
static void markroot (lua_State *L) {
  global_State *g = G(L);
  g->gray = NULL;
  g->grayagain = NULL;
  g->weak = NULL;
  markobject(g, g->mainthread);
  /* make global table be traversed before main stack */
  markvalue(g, gt(g->mainthread));
  markvalue(g, registry(L));
  markmt(g);
  g->gcstate = GCSpropagate;
}


static void remarkupvals (global_State *g) {
  UpVal *uv;
  for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) {
    lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv);
    if (isgray(obj2gco(uv)))
      markvalue(g, uv->v);
  }
}


static void atomic (lua_State *L) {
  global_State *g = G(L);
  size_t udsize;  /* total size of userdata to be finalized */
  /* remark occasional upvalues of (maybe) dead threads */
  remarkupvals(g);
  /* traverse objects cautch by write barrier and by 'remarkupvals' */
  propagateall(g);
  /* remark weak tables */
  g->gray = g->weak;
  g->weak = NULL;
  lua_assert(!iswhite(obj2gco(g->mainthread)));
  markobject(g, L);  /* mark running thread */
  markmt(g);  /* mark basic metatables (again) */
  propagateall(g);
  /* remark gray again */
  g->gray = g->grayagain;
  g->grayagain = NULL;
  propagateall(g);
  udsize = luaC_separateudata(L, 0);  /* separate userdata to be finalized */
  marktmu(g);  /* mark `preserved' userdata */
  udsize += propagateall(g);  /* remark, to propagate `preserveness' */
  cleartable(g->weak);  /* remove collected objects from weak tables */
  /* flip current white */
  g->currentwhite = cast_byte(otherwhite(g));
  g->sweepstrgc = 0;
  g->sweepgc = &g->rootgc;
  g->gcstate = GCSsweepstring;
  g->estimate = g->totalbytes - udsize;  /* first estimate */
}


static l_mem singlestep (lua_State *L) {
  global_State *g = G(L);
  /*lua_checkmemory(L);*/
  switch (g->gcstate) {
    case GCSpause: {
      markroot(L);  /* start a new collection */
      return 0;
    }
    case GCSpropagate: {
      if (g->gray)
        return propagatemark(g);
      else {  /* no more `gray' objects */
        atomic(L);  /* finish mark phase */
        return 0;
      }
    }
    case GCSsweepstring: {
      lu_mem old = g->totalbytes;
      sweepwholelist(L, &g->strt.hash[g->sweepstrgc++]);
      if (g->sweepstrgc >= g->strt.size)  /* nothing more to sweep? */
        g->gcstate = GCSsweep;  /* end sweep-string phase */
      lua_assert(old >= g->totalbytes);
      g->estimate -= old - g->totalbytes;
      return GCSWEEPCOST;
    }
    case GCSsweep: {
      lu_mem old = g->totalbytes;
      g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX);
      if (*g->sweepgc == NULL) {  /* nothing more to sweep? */
        checkSizes(L);
        g->gcstate = GCSfinalize;  /* end sweep phase */
      }
      lua_assert(old >= g->totalbytes);
      g->estimate -= old - g->totalbytes;
      return GCSWEEPMAX*GCSWEEPCOST;
    }
    case GCSfinalize: {
      if (g->tmudata) {
        GCTM(L);
        if (g->estimate > GCFINALIZECOST)
          g->estimate -= GCFINALIZECOST;
        return GCFINALIZECOST;
      }
      else {
        g->gcstate = GCSpause;  /* end collection */
        g->gcdept = 0;
        return 0;
      }
    }
    default: lua_assert(0); return 0;
  }
}


void luaC_step (lua_State *L) {
  global_State *g = G(L);
  l_mem lim = (GCSTEPSIZE/100) * g->gcstepmul;
  if (lim == 0)
    lim = (MAX_LUMEM-1)/2;  /* no limit */
  g->gcdept += g->totalbytes - g->GCthreshold;
  do {
    lim -= singlestep(L);
    if (g->gcstate == GCSpause)
      break;
  } while (lim > 0);
  if (g->gcstate != GCSpause) {
    if (g->gcdept < GCSTEPSIZE)
      g->GCthreshold = g->totalbytes + GCSTEPSIZE;  /* - lim/g->gcstepmul;*/
    else {
      g->gcdept -= GCSTEPSIZE;
      g->GCthreshold = g->totalbytes;
    }
  }
  else {
    setthreshold(g);
  }
}


void luaC_fullgc (lua_State *L) {
  global_State *g = G(L);
  if (g->gcstate <= GCSpropagate) {
    /* reset sweep marks to sweep all elements (returning them to white) */
    g->sweepstrgc = 0;
    g->sweepgc = &g->rootgc;
    /* reset other collector lists */
    g->gray = NULL;
    g->grayagain = NULL;
    g->weak = NULL;
    g->gcstate = GCSsweepstring;
  }
  lua_assert(g->gcstate != GCSpause && g->gcstate != GCSpropagate);
  /* finish any pending sweep phase */
  while (g->gcstate != GCSfinalize) {
    lua_assert(g->gcstate == GCSsweepstring || g->gcstate == GCSsweep);
    singlestep(L);
  }
  markroot(L);
  while (g->gcstate != GCSpause) {
    singlestep(L);
  }
  setthreshold(g);
}


void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v) {
  global_State *g = G(L);
  lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o));
  lua_assert(g->gcstate != GCSfinalize && g->gcstate != GCSpause);
  lua_assert(ttype(&o->gch) != LUA_TTABLE);
  /* must keep invariant? */
  if (g->gcstate == GCSpropagate)
    reallymarkobject(g, v);  /* restore invariant */
  else  /* don't mind */
    makewhite(g, o);  /* mark as white just to avoid other barriers */
}


void luaC_barrierback (lua_State *L, Table *t) {
  global_State *g = G(L);
  GCObject *o = obj2gco(t);
  lua_assert(isblack(o) && !isdead(g, o));
  lua_assert(g->gcstate != GCSfinalize && g->gcstate != GCSpause);
  black2gray(o);  /* make table gray (again) */
  t->gclist = g->grayagain;
  g->grayagain = o;
}


void luaC_link (lua_State *L, GCObject *o, lu_byte tt) {
  global_State *g = G(L);
  o->gch.next = g->rootgc;
  g->rootgc = o;
  o->gch.marked = luaC_white(g);
  o->gch.tt = tt;
}


void luaC_linkupval (lua_State *L, UpVal *uv) {
  global_State *g = G(L);
  GCObject *o = obj2gco(uv);
  o->gch.next = g->rootgc;  /* link upvalue into `rootgc' list */
  g->rootgc = o;
  if (isgray(o)) { 
    if (g->gcstate == GCSpropagate) {
      gray2black(o);  /* closed upvalues need barrier */
      luaC_barrier(L, uv, uv->v);
    }
    else {  /* sweep phase: sweep it (turning it into white) */
      makewhite(g, o);
      lua_assert(g->gcstate != GCSfinalize && g->gcstate != GCSpause);
    }
  }
}

own a joystick button combination. # type: float min: 0.001 # repeat_joystick_button_time = 0.17 # The sensitivity of the joystick axes for moving the # ingame view frustum around. # type: float # joystick_frustum_sensitivity = 170 # Key for moving the player forward. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_forward = KEY_KEY_W # Key for moving the player backward. # Will also disable autoforward, when active. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_backward = KEY_KEY_S # Key for moving the player left. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_left = KEY_KEY_A # Key for moving the player right. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_right = KEY_KEY_D # Key for jumping. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_jump = KEY_SPACE # Key for sneaking. # Also used for climbing down and descending in water if aux1_descends is disabled. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_sneak = KEY_LSHIFT # Key for opening the inventory. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_inventory = KEY_KEY_I # Key for moving fast in fast mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_special1 = KEY_KEY_E # Key for opening the chat window. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_chat = KEY_KEY_T # Key for opening the chat window to type commands. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_cmd = / # Key for opening the chat window to type local commands. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_cmd_local = . # Key for toggling unlimited view range. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_rangeselect = KEY_KEY_R # Key for toggling flying. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_freemove = KEY_KEY_K # Key for toggling pitch move mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_pitchmove = KEY_KEY_P # Key for toggling fast mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_fastmove = KEY_KEY_J # Key for toggling noclip mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_noclip = KEY_KEY_H # Key for selecting the next item in the hotbar. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_hotbar_next = KEY_KEY_N # Key for selecting the previous item in the hotbar. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_hotbar_previous = KEY_KEY_B # Key for muting the game. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_mute = KEY_KEY_M # Key for increasing the volume. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_increase_volume = # Key for decreasing the volume. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_decrease_volume = # Key for toggling autoforward. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_autoforward = # Key for toggling cinematic mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_cinematic = # Key for toggling display of minimap. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_minimap = KEY_F9 # Key for taking screenshots. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_screenshot = KEY_F12 # Key for dropping the currently selected item. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_drop = KEY_KEY_Q # Key to use view zoom when possible. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_zoom = KEY_KEY_Z # Key for selecting the first hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot1 = KEY_KEY_1 # Key for selecting the second hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot2 = KEY_KEY_2 # Key for selecting the third hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot3 = KEY_KEY_3 # Key for selecting the fourth hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot4 = KEY_KEY_4 # Key for selecting the fifth hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot5 = KEY_KEY_5 # Key for selecting the sixth hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot6 = KEY_KEY_6 # Key for selecting the seventh hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot7 = KEY_KEY_7 # Key for selecting the eighth hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot8 = KEY_KEY_8 # Key for selecting the ninth hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot9 = KEY_KEY_9 # Key for selecting the tenth hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot10 = KEY_KEY_0 # Key for selecting the 11th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot11 = # Key for selecting the 12th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot12 = # Key for selecting the 13th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot13 = # Key for selecting the 14th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot14 = # Key for selecting the 15th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot15 = # Key for selecting the 16th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot16 = # Key for selecting the 17th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot17 = # Key for selecting the 18th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot18 = # Key for selecting the 19th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot19 = # Key for selecting the 20th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot20 = # Key for selecting the 21st hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot21 = # Key for selecting the 22nd hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot22 = # Key for selecting the 23rd hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot23 = # Key for selecting the 24th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot24 = # Key for selecting the 25th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot25 = # Key for selecting the 26th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot26 = # Key for selecting the 27th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot27 = # Key for selecting the 28th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot28 = # Key for selecting the 29th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot29 = # Key for selecting the 30th hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot30 = # Key for selecting the 31st hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot31 = # Key for selecting the 32nd hotbar slot. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_slot32 = # Key for toggling the display of the HUD. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_toggle_hud = KEY_F1 # Key for toggling the display of chat. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_toggle_chat = KEY_F2 # Key for toggling the display of the large chat console. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_console = KEY_F10 # Key for toggling the display of fog. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_toggle_force_fog_off = KEY_F3 # Key for toggling the camera update. Only used for development # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_toggle_update_camera = # Key for toggling the display of debug info. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_toggle_debug = KEY_F5 # Key for toggling the display of the profiler. Used for development. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_toggle_profiler = KEY_F6 # Key for switching between first- and third-person camera. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_camera_mode = KEY_F7 # Key for increasing the viewing range. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_increase_viewing_range_min = + # Key for decreasing the viewing range. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 # type: key # keymap_decrease_viewing_range_min = - # # Graphics # ## In-Game ### Basic # Enable VBO # type: bool # enable_vbo = true # Whether to fog out the end of the visible area. # type: bool # enable_fog = true # Leaves style: # - Fancy: all faces visible # - Simple: only outer faces, if defined special_tiles are used # - Opaque: disable transparency # type: enum values: fancy, simple, opaque # leaves_style = fancy # Connects glass if supported by node. # type: bool # connected_glass = false # Enable smooth lighting with simple ambient occlusion. # Disable for speed or for different looks. # type: bool # smooth_lighting = true # Clouds are a client side effect. # type: bool # enable_clouds = true # Use 3D cloud look instead of flat. # type: bool # enable_3d_clouds = true # Method used to highlight selected object. # type: enum values: box, halo, none # node_highlighting = box # Adds particles when digging a node. # type: bool # enable_particles = true ### Filtering # Use mip mapping to scale textures. May slightly increase performance, # especially when using a high resolution texture pack. # Gamma correct downscaling is not supported. # type: bool # mip_map = false # Use anisotropic filtering when viewing at textures from an angle. # type: bool # anisotropic_filter = false # Use bilinear filtering when scaling textures. # type: bool # bilinear_filter = false # Use trilinear filtering when scaling textures. # type: bool # trilinear_filter = false # Filtered textures can blend RGB values with fully-transparent neighbors, # which PNG optimizers usually discard, sometimes resulting in a dark or # light edge to transparent textures. Apply this filter to clean that up # at texture load time. # type: bool # texture_clean_transparent = false # When using bilinear/trilinear/anisotropic filters, low-resolution textures # can be blurred, so automatically upscale them with nearest-neighbor # interpolation to preserve crisp pixels. This sets the minimum texture size # for the upscaled textures; higher values look sharper, but require more # memory. Powers of 2 are recommended. Setting this higher than 1 may not # have a visible effect unless bilinear/trilinear/anisotropic filtering is # enabled. # This is also used as the base node texture size for world-aligned # texture autoscaling. # type: int # texture_min_size = 64 # Experimental option, might cause visible spaces between blocks # when set to higher number than 0. # type: enum values: 0, 1, 2, 4, 8, 16 # fsaa = 0 # Undersampling is similar to using a lower screen resolution, but it applies # to the game world only, keeping the GUI intact. # It should give a significant performance boost at the cost of less detailed image. # Higher values result in a less detailed image. # type: int min: 1 max: 8 # undersampling = 1 ### Shaders # Shaders allow advanced visual effects and may increase performance on some video # cards. # This only works with the OpenGL video backend. # type: bool # enable_shaders = true # Path to shader directory. If no path is defined, default location will be used. # type: path # shader_path = #### Tone Mapping # Enables filmic tone mapping # type: bool # tone_mapping = false #### Bumpmapping # Enables bumpmapping for textures. Normalmaps need to be supplied by the texture pack # or need to be auto-generated. # Requires shaders to be enabled. # type: bool # enable_bumpmapping = false # Enables on the fly normalmap generation (Emboss effect). # Requires bumpmapping to be enabled. # type: bool # generate_normalmaps = false # Strength of generated normalmaps. # type: float # normalmaps_strength = 0.6 # Defines sampling step of texture. # A higher value results in smoother normal maps. # type: int min: 0 max: 2 # normalmaps_smooth = 0 #### Parallax Occlusion # Enables parallax occlusion mapping. # Requires shaders to be enabled. # type: bool # enable_parallax_occlusion = false # 0 = parallax occlusion with slope information (faster). # 1 = relief mapping (slower, more accurate). # type: int min: 0 max: 1 # parallax_occlusion_mode = 1 # Strength of parallax. # type: float # 3d_paralax_strength = 0.025 # Number of parallax occlusion iterations. # type: int # parallax_occlusion_iterations = 4 # Overall scale of parallax occlusion effect. # type: float # parallax_occlusion_scale = 0.08 # Overall bias of parallax occlusion effect, usually scale/2. # type: float # parallax_occlusion_bias = 0.04 #### Waving Nodes # Set to true enables waving water. # Requires shaders to be enabled. # type: bool # enable_waving_water = false # type: float # water_wave_height = 1.0 # type: float # water_wave_length = 20.0 # type: float # water_wave_speed = 5.0 # Set to true enables waving leaves. # Requires shaders to be enabled. # type: bool # enable_waving_leaves = false # Set to true enables waving plants. # Requires shaders to be enabled. # type: bool # enable_waving_plants = false ### Advanced # Arm inertia, gives a more realistic movement of # the arm when the camera moves. # type: bool # arm_inertia = true # If FPS would go higher than this, limit it by sleeping # to not waste CPU power for no benefit. # type: int min: 1 # fps_max = 60 # Maximum FPS when game is paused. # type: int min: 1 # pause_fps_max = 20 # Open the pause menu when the window's focus is lost. Does not pause if a formspec is # open. # type: bool # pause_on_lost_focus = false # View distance in nodes. # type: int min: 20 max: 4000 # viewing_range = 100 # Camera 'near clipping plane' distance in nodes, between 0 and 0.5. # Most users will not need to change this. # Increasing can reduce artifacting on weaker GPUs. # 0.1 = Default, 0.25 = Good value for weaker tablets. # type: float min: 0 max: 0.5 # near_plane = 0.1 # Width component of the initial window size. # type: int min: 1 # screen_w = 1024 # Height component of the initial window size. # type: int min: 1 # screen_h = 600 # Save window size automatically when modified. # type: bool # autosave_screensize = true # Fullscreen mode. # type: bool # fullscreen = false # Bits per pixel (aka color depth) in fullscreen mode. # type: int # fullscreen_bpp = 24 # Vertical screen synchronization. # type: bool # vsync = false # Field of view in degrees. # type: int min: 45 max: 160 # fov = 72 # Adjust the gamma encoding for the light tables. Higher numbers are brighter. # This setting is for the client only and is ignored by the server. # type: float min: 0.5 max: 10 # display_gamma = 1.0 # Gradient of light curve at minimum light level. # type: float min: 0 max: 4 # lighting_alpha = 0.0 # Gradient of light curve at maximum light level. # type: float min: 0 max: 4 # lighting_beta = 1.5 # Strength of light curve mid-boost. # type: float min: 0 max: 1 # lighting_boost = 0.2 # Center of light curve mid-boost. # type: float min: 0 max: 1 # lighting_boost_center = 0.5 # Spread of light curve mid-boost. # Standard deviation of the mid-boost gaussian. # type: float min: 0 max: 1 # lighting_boost_spread = 0.2 # Path to texture directory. All textures are first searched from here. # type: path # texture_path = # The rendering back-end for Irrlicht. # A restart is required after changing this. # Note: On Android, stick with OGLES1 if unsure! App may fail to start otherwise. # On other platforms, OpenGL is recommended, and it’s the only driver with # shader support currently. # type: enum values: null, software, burningsvideo, direct3d8, direct3d9, opengl, ogles1, ogles2 # video_driver = opengl # Radius of cloud area stated in number of 64 node cloud squares. # Values larger than 26 will start to produce sharp cutoffs at cloud area corners. # type: int # cloud_radius = 12 # Enable view bobbing and amount of view bobbing. # For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double. # type: float # view_bobbing_amount = 1.0 # Multiplier for fall bobbing. # For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double. # type: float # fall_bobbing_amount = 0.03 # 3D support. # Currently supported: # - none: no 3d output. # - anaglyph: cyan/magenta color 3d. # - interlaced: odd/even line based polarisation screen support. # - topbottom: split screen top/bottom. # - sidebyside: split screen side by side. # - crossview: Cross-eyed 3d # - pageflip: quadbuffer based 3d. # Note that the interlaced mode requires shaders to be enabled. # type: enum values: none, anaglyph, interlaced, topbottom, sidebyside, crossview, pageflip # 3d_mode = none # In-game chat console height, between 0.1 (10%) and 1.0 (100%). # type: float min: 0.1 max: 1 # console_height = 0.6 # In-game chat console background color (R,G,B). # type: string # console_color = (0,0,0) # In-game chat console background alpha (opaqueness, between 0 and 255). # type: int min: 0 max: 255 # console_alpha = 200 # Formspec full-screen background opacity (between 0 and 255). # type: int min: 0 max: 255 # formspec_fullscreen_bg_opacity = 140 # Formspec full-screen background color (R,G,B). # type: string # formspec_fullscreen_bg_color = (0,0,0) # Formspec default background opacity (between 0 and 255). # type: int min: 0 max: 255 # formspec_default_bg_opacity = 140 # Formspec default background color (R,G,B). # type: string # formspec_default_bg_color = (0,0,0) # Selection box border color (R,G,B). # type: string # selectionbox_color = (0,0,0) # Width of the selection box lines around nodes. # type: int min: 1 max: 5 # selectionbox_width = 2 # Crosshair color (R,G,B). # type: string # crosshair_color = (255,255,255) # Crosshair alpha (opaqueness, between 0 and 255). # type: int min: 0 max: 255 # crosshair_alpha = 255 # Maximum number of recent chat messages to show # type: int min: 2 max: 20 # recent_chat_messages = 6 # Whether node texture animations should be desynchronized per mapblock. # type: bool # desynchronize_mapblock_texture_animation = true # Maximum proportion of current window to be used for hotbar. # Useful if there's something to be displayed right or left of hotbar. # type: float # hud_hotbar_max_width = 1.0 # Modifies the size of the hudbar elements. # type: float # hud_scaling = 1.0 # Enables caching of facedir rotated meshes. # type: bool # enable_mesh_cache = false # Delay between mesh updates on the client in ms. Increasing this will slow # down the rate of mesh updates, thus reducing jitter on slower clients. # type: int min: 0 max: 50 # mesh_generation_interval = 0 # Size of the MapBlock cache of the mesh generator. Increasing this will # increase the cache hit %, reducing the data being copied from the main # thread, thus reducing jitter. # type: int min: 0 max: 1000 # meshgen_block_cache_size = 20 # Enables minimap. # type: bool # enable_minimap = true # Shape of the minimap. Enabled = round, disabled = square. # type: bool # minimap_shape_round = true # True = 256 # False = 128 # Useable to make minimap smoother on slower machines. # type: bool # minimap_double_scan_height = true # Make fog and sky colors depend on daytime (dawn/sunset) and view direction. # type: bool # directional_colored_fog = true # The strength (darkness) of node ambient-occlusion shading. # Lower is darker, Higher is lighter. The valid range of values for this # setting is 0.25 to 4.0 inclusive. If the value is out of range it will be # set to the nearest valid value. # type: float min: 0.25 max: 4 # ambient_occlusion_gamma = 2.2 # Enables animation of inventory items. # type: bool # inventory_items_animations = false # Fraction of the visible distance at which fog starts to be rendered # type: float min: 0 max: 0.99 # fog_start = 0.4 # Makes all liquids opaque # type: bool # opaque_water = false # Textures on a node may be aligned either to the node or to the world. # The former mode suits better things like machines, furniture, etc., while # the latter makes stairs and microblocks fit surroundings better. # However, as this possibility is new, thus may not be used by older servers, # this option allows enforcing it for certain node types. Note though that # that is considered EXPERIMENTAL and may not work properly. # type: enum values: disable, enable, force_solid, force_nodebox # world_aligned_mode = enable # World-aligned textures may be scaled to span several nodes. However, # the server may not send the scale you want, especially if you use # a specially-designed texture pack; with this option, the client tries # to determine the scale automatically basing on the texture size. # See also texture_min_size. # Warning: This option is EXPERIMENTAL! # type: enum values: disable, enable, force # autoscale_mode = disable # Show entity selection boxes # type: bool # show_entity_selectionbox = true ## Menus # Use a cloud animation for the main menu background. # type: bool # menu_clouds = true # Scale GUI by a user specified value. # Use a nearest-neighbor-anti-alias filter to scale the GUI. # This will smooth over some of the rough edges, and blend # pixels when scaling down, at the cost of blurring some # edge pixels when images are scaled by non-integer sizes. # type: float min: 0.001 # gui_scaling = 1.0 # When gui_scaling_filter is true, all GUI images need to be # filtered in software, but some images are generated directly # to hardware (e.g. render-to-texture for nodes in inventory). # type: bool # gui_scaling_filter = false # When gui_scaling_filter_txr2img is true, copy those images # from hardware to software for scaling. When false, fall back # to the old scaling method, for video drivers that don't # properly support downloading textures back from hardware. # type: bool # gui_scaling_filter_txr2img = true # Delay showing tooltips, stated in milliseconds. # type: int # tooltip_show_delay = 400 # Append item name to tooltip. # type: bool # tooltip_append_itemname = false # Whether FreeType fonts are used, requires FreeType support to be compiled in. # type: bool # freetype = true # Path to TrueTypeFont or bitmap. # type: filepath # font_path = fonts/liberationsans.ttf # type: int min: 1 # font_size = 16 # Font shadow offset, if 0 then shadow will not be drawn. # type: int # font_shadow = 1 # Font shadow alpha (opaqueness, between 0 and 255). # type: int min: 0 max: 255 # font_shadow_alpha = 127 # type: filepath # mono_font_path = fonts/liberationmono.ttf # type: int min: 1 # mono_font_size = 15 # This font will be used for certain languages. # type: filepath # fallback_font_path = fonts/DroidSansFallbackFull.ttf # type: int min: 1 # fallback_font_size = 15 # type: int # fallback_font_shadow = 1 # type: int min: 0 max: 255 # fallback_font_shadow_alpha = 128 # Path to save screenshots at. # type: path # screenshot_path = # Format of screenshots. # type: enum values: png, jpg, bmp, pcx, ppm, tga # screenshot_format = png # Screenshot quality. Only used for JPEG format. # 1 means worst quality; 100 means best quality. # Use 0 for default quality. # type: int min: 0 max: 100 # screenshot_quality = 0 ## Advanced # Adjust dpi configuration to your screen (non X11/Android only) e.g. for 4k screens. # type: int min: 1 # screen_dpi = 72 # Windows systems only: Start Minetest with the command line window in the background. # Contains the same information as the file debug.txt (default name). # type: bool # enable_console = false # # Sound # # type: bool # enable_sound = true # type: float min: 0 max: 1 # sound_volume = 0.7 # type: bool # mute_sound = false # # Client # ## Network # Address to connect to. # Leave this blank to start a local server. # Note that the address field in the main menu overrides this setting. # type: string # address = # Port to connect to (UDP). # Note that the port field in the main menu overrides this setting. # type: int min: 1 max: 65535 # remote_port = 30000 # Save the map received by the client on disk. # type: bool # enable_local_map_saving = false # Enable usage of remote media server (if provided by server). # Remote servers offer a significantly faster way to download media (e.g. textures) # when connecting to the server. # type: bool # enable_remote_media_server = true # Enable Lua modding support on client. # This support is experimental and API can change. # type: bool # enable_client_modding = false # URL to the server list displayed in the Multiplayer Tab. # type: string # serverlist_url = servers.minetest.net # File in client/serverlist/ that contains your favorite servers displayed in the # Multiplayer Tab. # type: string # serverlist_file = favoriteservers.txt # Maximum size of the out chat queue. # 0 to disable queueing and -1 to make the queue size unlimited. # type: int # max_out_chat_queue_size = 20 # Enable register confirmation when connecting to server. # If disabled, new account will be registered automatically. # type: bool # enable_register_confirmation = true ## Advanced # Timeout for client to remove unused map data from memory. # type: int # client_unload_unused_data_timeout = 600 # Maximum number of mapblocks for client to be kept in memory. # Set to -1 for unlimited amount. # type: int # client_mapblock_limit = 5000 # Whether to show the client debug info (has the same effect as hitting F5). # type: bool # show_debug = false # # Server / Singleplayer # # Name of the server, to be displayed when players join and in the serverlist. # type: string # server_name = Minetest server # Description of server, to be displayed when players join and in the serverlist. # type: string # server_description = mine here # Domain name of server, to be displayed in the serverlist. # type: string # server_address = game.minetest.net # Homepage of server, to be displayed in the serverlist. # type: string # server_url = https://minetest.net # Automatically report to the serverlist. # type: bool # server_announce = false # Announce to this serverlist. # type: string # serverlist_url = servers.minetest.net # Remove color codes from incoming chat messages # Use this to stop players from being able to use color in their messages # type: bool # strip_color_codes = false ## Network # Network port to listen (UDP). # This value will be overridden when starting from the main menu. # type: int # port = 30000 # The network interface that the server listens on. # type: string # bind_address = # Enable to disallow old clients from connecting. # Older clients are compatible in the sense that they will not crash when connecting # to new servers, but they may not support all new features that you are expecting. # type: bool # strict_protocol_version_checking = false # Specifies URL from which client fetches media instead of using UDP. # $filename should be accessible from $remote_media$filename via cURL # (obviously, remote_media should end with a slash). # Files that are not present will be fetched the usual way. # type: string # remote_media = # Enable/disable running an IPv6 server. # Ignored if bind_address is set. # type: bool # ipv6_server = false ### Advanced # Maximum number of blocks that are simultaneously sent per client. # The maximum total count is calculated dynamically: # max_total = ceil((#clients + max_users) * per_client / 4) # type: int # max_simultaneous_block_sends_per_client = 40 # To reduce lag, block transfers are slowed down when a player is building something. # This determines how long they are slowed down after placing or removing a node. # type: float # full_block_send_enable_min_time_from_building = 2.0 # Maximum number of packets sent per send step, if you have a slow connection # try reducing it, but don't reduce it to a number below double of targeted # client number. # type: int # max_packets_per_iteration = 1024 ## Game # Default game when creating a new world. # This will be overridden when creating a world from the main menu. # type: string # default_game = minetest # Message of the day displayed to players connecting. # type: string # motd = # Maximum number of players that can be connected simultaneously. # type: int # max_users = 15 # World directory (everything in the world is stored here). # Not needed if starting from the main menu. # type: path # map-dir = # Time in seconds for item entity (dropped items) to live. # Setting it to -1 disables the feature. # type: int # item_entity_ttl = 900 # Enable players getting damage and dying. # type: bool # enable_damage = false # Enable creative mode for new created maps. # type: bool # creative_mode = false # A chosen map seed for a new map, leave empty for random. # Will be overridden when creating a new world in the main menu. # type: string # fixed_map_seed = # New users need to input this password. # type: string # default_password = # The privileges that new users automatically get. # See /privs in game for a full list on your server and mod configuration. # type: string # default_privs = interact, shout # Privileges that players with basic_privs can grant # type: string # basic_privs = interact, shout # Whether players are shown to clients without any range limit. # Deprecated, use the setting player_transfer_distance instead. # type: bool # unlimited_player_transfer_distance = true # Defines the maximal player transfer distance in blocks (0 = unlimited). # type: int # player_transfer_distance = 0 # Whether to allow players to damage and kill each other. # type: bool # enable_pvp = true # Enable mod channels support. # type: bool # enable_mod_channels = false # If this is set, players will always (re)spawn at the given position. # type: string # static_spawnpoint = # If enabled, new players cannot join with an empty password. # type: bool # disallow_empty_password = false # If enabled, disable cheat prevention in multiplayer. # type: bool # disable_anticheat = false # If enabled, actions are recorded for rollback. # This option is only read when server starts. # type: bool # enable_rollback_recording = false # Format of player chat messages. The following strings are valid placeholders: # @name, @message, @timestamp (optional) # type: string # chat_message_format = <@name> @message # A message to be displayed to all clients when the server shuts down. # type: string # kick_msg_shutdown = Server shutting down. # A message to be displayed to all clients when the server crashes. # type: string # kick_msg_crash = This server has experienced an internal error. You will now be disconnected. # Whether to ask clients to reconnect after a (Lua) crash. # Set this to true if your server is set up to restart automatically. # type: bool # ask_reconnect_on_crash = false # From how far clients know about objects, stated in mapblocks (16 nodes). # # Setting this larger than active_block_range will also cause the server # to maintain active objects up to this distance in the direction the # player is looking. (This can avoid mobs suddenly disappearing from view) # type: int # active_object_send_range_blocks = 4 # The radius of the volume of blocks around every player that is subject to the # active block stuff, stated in mapblocks (16 nodes). # In active blocks objects are loaded and ABMs run. # This is also the minimum range in which active objects (mobs) are maintained. # This should be configured together with active_object_range. # type: int # active_block_range = 3 # From how far blocks are sent to clients, stated in mapblocks (16 nodes). # type: int # max_block_send_distance = 10 # Maximum number of forceloaded mapblocks. # type: int # max_forceloaded_blocks = 16 # Interval of sending time of day to clients. # type: int # time_send_interval = 5 # Controls length of day/night cycle. # Examples: # 72 = 20min, 360 = 4min, 1 = 24hour, 0 = day/night/whatever stays unchanged. # type: int # time_speed = 72 # Time of day when a new world is started, in millihours (0-23999). # type: int min: 0 max: 23999 # world_start_time = 6125 # Interval of saving important changes in the world, stated in seconds. # type: float # server_map_save_interval = 5.3 # Set the maximum character length of a chat message sent by clients. # type: int # chat_message_max_size = 500 # Amount of messages a player may send per 10 seconds. # type: float # chat_message_limit_per_10sec = 10.0 # Kick players who sent more than X messages per 10 seconds. # type: int # chat_message_limit_trigger_kick = 50 ### Physics # Horizontal and vertical acceleration on ground or when climbing, # in nodes per second per second. # type: float # movement_acceleration_default = 3 # Horizontal acceleration in air when jumping or falling, # in nodes per second per second. # type: float # movement_acceleration_air = 2 # Horizontal and vertical acceleration in fast mode, # in nodes per second per second. # type: float # movement_acceleration_fast = 10 # Walking and flying speed, in nodes per second. # type: float # movement_speed_walk = 4 # Sneaking speed, in nodes per second. # type: float # movement_speed_crouch = 1.35 # Walking, flying and climbing speed in fast mode, in nodes per second. # type: float # movement_speed_fast = 20 # Vertical climbing speed, in nodes per second. # type: float # movement_speed_climb = 3 # Initial vertical speed when jumping, in nodes per second. # type: float # movement_speed_jump = 6.5 # Decrease this to increase liquid resistence to movement. # type: float # movement_liquid_fluidity = 1 # Maximum liquid resistence. Controls deceleration when entering liquid at # high speed. # type: float # movement_liquid_fluidity_smooth = 0.5 # Controls sinking speed in liquid. # type: float # movement_liquid_sink = 10 # Acceleration of gravity, in nodes per second per second. # type: float # movement_gravity = 9.81 ### Advanced # Handling for deprecated lua api calls: # - legacy: (try to) mimic old behaviour (default for release). # - log: mimic and log backtrace of deprecated call (default for debug). # - error: abort on usage of deprecated call (suggested for mod developers). # type: enum values: legacy, log, error # deprecated_lua_api_handling = legacy # Number of extra blocks that can be loaded by /clearobjects at once. # This is a trade-off between sqlite transaction overhead and # memory consumption (4096=100MB, as a rule of thumb). # type: int # max_clearobjects_extra_loaded_blocks = 4096 # How much the server will wait before unloading unused mapblocks. # Higher value is smoother, but will use more RAM. # type: int # server_unload_unused_data_timeout = 29 # Maximum number of statically stored objects in a block. # type: int # max_objects_per_block = 64 # See https://www.sqlite.org/pragma.html#pragma_synchronous # type: enum values: 0, 1, 2 # sqlite_synchronous = 2 # Length of a server tick and the interval at which objects are generally updated over # network. # type: float # dedicated_server_step = 0.09 # Length of time between active block management cycles # type: float # active_block_mgmt_interval = 2.0 # Length of time between Active Block Modifier (ABM) execution cycles # type: float # abm_interval = 1.0 # Length of time between NodeTimer execution cycles # type: float # nodetimer_interval = 0.2 # If enabled, invalid world data won't cause the server to shut down. # Only enable this if you know what you are doing. # type: bool # ignore_world_load_errors = false # Max liquids processed per step. # type: int # liquid_loop_max = 100000 # The time (in seconds) that the liquids queue may grow beyond processing # capacity until an attempt is made to decrease its size by dumping old queue # items. A value of 0 disables the functionality. # type: int # liquid_queue_purge_time = 0 # Liquid update interval in seconds. # type: float # liquid_update = 1.0 # At this distance the server will aggressively optimize which blocks are sent to # clients. # Small values potentially improve performance a lot, at the expense of visible # rendering glitches (some blocks will not be rendered under water and in caves, # as well as sometimes on land). # Setting this to a value greater than max_block_send_distance disables this # optimization. # Stated in mapblocks (16 nodes). # type: int min: 2 # block_send_optimize_distance = 4 # If enabled the server will perform map block occlusion culling based on # on the eye position of the player. This can reduce the number of blocks # sent to the client 50-80%. The client will not longer receive most invisible # so that the utility of noclip mode is reduced. # type: bool # server_side_occlusion_culling = true # Restricts the access of certain client-side functions on servers. # Combine the byteflags below to restrict client-side features, or set to 0 # for no restrictions: # LOAD_CLIENT_MODS: 1 (disable loading client-provided mods) # CHAT_MESSAGES: 2 (disable send_chat_message call client-side) # READ_ITEMDEFS: 4 (disable get_item_def call client-side) # READ_NODEDEFS: 8 (disable get_node_def call client-side) # LOOKUP_NODES_LIMIT: 16 (limits get_node call client-side to # csm_restriction_noderange) # READ_PLAYERINFO: 32 (disable get_player_names call client-side) # type: int # csm_restriction_flags = 62 # If the CSM restriction for node range is enabled, get_node calls are limited # to this distance from the player to the node. # type: int # csm_restriction_noderange = 0 ## Security # Prevent mods from doing insecure things like running shell commands. # type: bool # secure.enable_security = true # Comma-separated list of trusted mods that are allowed to access insecure # functions even when mod security is on (via request_insecure_environment()). # type: string # secure.trusted_mods = # Comma-separated list of mods that are allowed to access HTTP APIs, which # allow them to upload and download data to/from the internet. # type: string # secure.http_mods = ## Advanced ### Profiling # Load the game profiler to collect game profiling data. # Provides a /profiler command to access the compiled profile. # Useful for mod developers and server operators. # type: bool # profiler.load = false # The default format in which profiles are being saved, # when calling `/profiler save [format]` without format. # type: enum values: txt, csv, lua, json, json_pretty # profiler.default_report_format = txt # The file path relative to your worldpath in which profiles will be saved to. # type: string # profiler.report_path = "" #### Instrumentation # Instrument the methods of entities on registration. # type: bool # instrument.entity = true # Instrument the action function of Active Block Modifiers on registration. # type: bool # instrument.abm = true # Instrument the action function of Loading Block Modifiers on registration. # type: bool # instrument.lbm = true # Instrument chatcommands on registration. # type: bool # instrument.chatcommand = true # Instrument global callback functions on registration. # (anything you pass to a minetest.register_*() function) # type: bool # instrument.global_callback = true ##### Advanced # Instrument builtin. # This is usually only needed by core/builtin contributors # type: bool # instrument.builtin = false # Have the profiler instrument itself: # * Instrument an empty function. # This estimates the overhead, that instrumentation is adding (+1 function call). # * Instrument the sampler being used to update the statistics. # type: bool # instrument.profiler = false # # Client and Server # # Name of the player. # When running a server, clients connecting with this name are admins. # When starting from the main menu, this is overridden. # type: string # name = # Set the language. Leave empty to use the system language. # A restart is required after changing this. # type: enum values: , be, ca, cs, da, de, dv, en, eo, es, et, fr, he, hu, id, it, ja, jbo, ko, ky, lt, ms, nb, nl, pl, pt, pt_BR, ro, ru, sl, sr_Cyrl, sv, sw, tr, uk, zh_CN, zh_TW # language = # Level of logging to be written to debug.txt: # - <nothing> (no logging) # - none (messages with no level) # - error # - warning # - action # - info # - verbose # type: enum values: , none, error, warning, action, info, verbose # debug_log_level = action # If the file size of debug.txt exceeds the number of megabytes specified in # this setting when it is opened, the file is moved to debug.txt.1, # deleting an older debug.txt.1 if it exists. # debug.txt is only moved if this setting is positive. # type: int # debug_log_size_max = 50 # IPv6 support. # type: bool # enable_ipv6 = true ## Advanced # Default timeout for cURL, stated in milliseconds. # Only has an effect if compiled with cURL. # type: int # curl_timeout = 5000 # Limits number of parallel HTTP requests. Affects: # - Media fetch if server uses remote_media setting. # - Serverlist download and server announcement. # - Downloads performed by main menu (e.g. mod manager). # Only has an effect if compiled with cURL. # type: int # curl_parallel_limit = 8 # Maximum time in ms a file download (e.g. a mod download) may take. # type: int # curl_file_download_timeout = 300000 # Makes DirectX work with LuaJIT. Disable if it causes troubles. # type: bool # high_precision_fpu = true # Changes the main menu UI: # - Full: Multiple singleplayer worlds, game choice, texture pack chooser, etc. # - Simple: One singleplayer world, no game or texture pack choosers. May be # necessary for smaller screens. # type: enum values: full, simple # main_menu_style = full # Replaces the default main menu with a custom one. # type: string # main_menu_script = # Print the engine's profiling data in regular intervals (in seconds). # 0 = disable. Useful for developers. # type: int # profiler_print_interval = 0 # # Mapgen # # Name of map generator to be used when creating a new world. # Creating a world in the main menu will override this. # Current mapgens in a highly unstable state: # - The optional floatlands of v7 (disabled by default). # type: enum values: v7, valleys, carpathian, v5, flat, fractal, singlenode, v6 # mg_name = v7 # Water surface level of the world. # type: int # water_level = 1 # From how far blocks are generated for clients, stated in mapblocks (16 nodes). # type: int # max_block_generate_distance = 8 # Limit of map generation, in nodes, in all 6 directions from (0, 0, 0). # Only mapchunks completely within the mapgen limit are generated. # Value is stored per-world. # type: int min: 0 max: 31000 # mapgen_limit = 31000 # Global map generation attributes. # In Mapgen v6 the 'decorations' flag controls all decorations except trees # and junglegrass, in all other mapgens this flag controls all decorations. # type: flags possible values: caves, dungeons, light, decorations, biomes, nocaves, nodungeons, nolight, nodecorations, nobiomes # mg_flags = caves,dungeons,light,decorations,biomes ## Biome API temperature and humidity noise parameters # Temperature variation for biomes. # type: noise_params_2d # mg_biome_np_heat = { # offset = 50, # scale = 50, # spread = (1000, 1000, 1000), # seed = 5349, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # Small-scale temperature variation for blending biomes on borders. # type: noise_params_2d # mg_biome_np_heat_blend = { # offset = 0, # scale = 1.5, # spread = (8, 8, 8), # seed = 13, # octaves = 2, # persistence = 1.0, # lacunarity = 2.0, # flags = eased # } # Humidity variation for biomes. # type: noise_params_2d # mg_biome_np_humidity = { # offset = 50, # scale = 50, # spread = (1000, 1000, 1000), # seed = 842, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # Small-scale humidity variation for blending biomes on borders. # type: noise_params_2d # mg_biome_np_humidity_blend = { # offset = 0, # scale = 1.5, # spread = (8, 8, 8), # seed = 90003, # octaves = 2, # persistence = 1.0, # lacunarity = 2.0, # flags = eased # } ## Mapgen V5 # Map generation attributes specific to Mapgen v5. # type: flags possible values: caverns, nocaverns # mgv5_spflags = caverns # Controls width of tunnels, a smaller value creates wider tunnels. # type: float # mgv5_cave_width = 0.09 # Y of upper limit of large caves. # type: int # mgv5_large_cave_depth = -256 # Deprecated, define and locate cave liquids using biome definitions instead. # Y of upper limit of lava in large caves. # type: int # mgv5_lava_depth = -256 # Y-level of cavern upper limit. # type: int # mgv5_cavern_limit = -256 # Y-distance over which caverns expand to full size. # type: int # mgv5_cavern_taper = 256 # Defines full size of caverns, smaller values create larger caverns. # type: float # mgv5_cavern_threshold = 0.7 # Lower Y limit of dungeons. # type: int # mgv5_dungeon_ymin = -31000 # Upper Y limit of dungeons. # type: int # mgv5_dungeon_ymax = 31000 ### Noises # Variation of biome filler depth. # type: noise_params_2d # mgv5_np_filler_depth = { # offset = 0, # scale = 1, # spread = (150, 150, 150), # seed = 261, # octaves = 4, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # Variation of terrain vertical scale. # When noise is < -0.55 terrain is near-flat. # type: noise_params_2d # mgv5_np_factor = { # offset = 0, # scale = 1, # spread = (250, 250, 250), # seed = 920381, # octaves = 3, # persistence = 0.45, # lacunarity = 2.0, # flags = eased # } # Y-level of average terrain surface. # type: noise_params_2d # mgv5_np_height = { # offset = 0, # scale = 10, # spread = (250, 250, 250), # seed = 84174, # octaves = 4, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # First of two 3D noises that together define tunnels. # type: noise_params_3d # mgv5_np_cave1 = { # offset = 0, # scale = 12, # spread = (61, 61, 61), # seed = 52534, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # Second of two 3D noises that together define tunnels. # type: noise_params_3d # mgv5_np_cave2 = { # offset = 0, # scale = 12, # spread = (67, 67, 67), # seed = 10325, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # 3D noise defining giant caverns. # type: noise_params_3d # mgv5_np_cavern = { # offset = 0, # scale = 1, # spread = (384, 128, 384), # seed = 723, # octaves = 5, # persistence = 0.63, # lacunarity = 2.0, # flags = # } # 3D noise defining terrain. # type: noise_params_3d # mgv5_np_ground = { # offset = 0, # scale = 40, # spread = (80, 80, 80), # seed = 983240, # octaves = 4, # persistence = 0.55, # lacunarity = 2.0, # flags = eased # } # 3D noise that determines number of dungeons per mapchunk. # type: noise_params_3d # mgv5_np_dungeons = { # offset = 0.9, # scale = 0.5, # spread = (500, 500, 500), # seed = 0, # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, # flags = # } ## Mapgen V6 # Map generation attributes specific to Mapgen v6. # The 'snowbiomes' flag enables the new 5 biome system. # When the 'snowbiomes' flag is enabled jungles are automatically enabled and # the 'jungles' flag is ignored. # type: flags possible values: jungles, biomeblend, mudflow, snowbiomes, flat, trees, nojungles, nobiomeblend, nomudflow, nosnowbiomes, noflat, notrees # mgv6_spflags = jungles,biomeblend,mudflow,snowbiomes,noflat,trees # Deserts occur when np_biome exceeds this value. # When the 'snowbiomes' flag is enabled, this is ignored. # type: float # mgv6_freq_desert = 0.45 # Sandy beaches occur when np_beach exceeds this value. # type: float # mgv6_freq_beach = 0.15 # Lower Y limit of dungeons. # type: int # mgv6_dungeon_ymin = -31000 # Upper Y limit of dungeons. # type: int # mgv6_dungeon_ymax = 31000 ### Noises # Y-level of lower terrain and seabed. # type: noise_params_2d # mgv6_np_terrain_base = { # offset = -4, # scale = 20, # spread = (250, 250, 250), # seed = 82341, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Y-level of higher terrain that creates cliffs. # type: noise_params_2d # mgv6_np_terrain_higher = { # offset = 20, # scale = 16, # spread = (500, 500, 500), # seed = 85039, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Varies steepness of cliffs. # type: noise_params_2d # mgv6_np_steepness = { # offset = 0.85, # scale = 0.5, # spread = (125, 125, 125), # seed = -932, # octaves = 5, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # Defines distribution of higher terrain. # type: noise_params_2d # mgv6_np_height_select = { # offset = 0.5, # scale = 1, # spread = (250, 250, 250), # seed = 4213, # octaves = 5, # persistence = 0.69, # lacunarity = 2.0, # flags = eased # } # Varies depth of biome surface nodes. # type: noise_params_2d # mgv6_np_mud = { # offset = 4, # scale = 2, # spread = (200, 200, 200), # seed = 91013, # octaves = 3, # persistence = 0.55, # lacunarity = 2.0, # flags = eased # } # Defines areas with sandy beaches. # type: noise_params_2d # mgv6_np_beach = { # offset = 0, # scale = 1, # spread = (250, 250, 250), # seed = 59420, # octaves = 3, # persistence = 0.50, # lacunarity = 2.0, # flags = eased # } # Temperature variation for biomes. # type: noise_params_2d # mgv6_np_biome = { # offset = 0, # scale = 1, # spread = (500, 500, 500), # seed = 9130, # octaves = 3, # persistence = 0.50, # lacunarity = 2.0, # flags = eased # } # Variation of number of caves. # type: noise_params_2d # mgv6_np_cave = { # offset = 6, # scale = 6, # spread = (250, 250, 250), # seed = 34329, # octaves = 3, # persistence = 0.50, # lacunarity = 2.0, # flags = eased # } # Humidity variation for biomes. # type: noise_params_2d # mgv6_np_humidity = { # offset = 0.5, # scale = 0.5, # spread = (500, 500, 500), # seed = 72384, # octaves = 3, # persistence = 0.50, # lacunarity = 2.0, # flags = eased # } # Defines tree areas and tree density. # type: noise_params_2d # mgv6_np_trees = { # offset = 0, # scale = 1, # spread = (125, 125, 125), # seed = 2, # octaves = 4, # persistence = 0.66, # lacunarity = 2.0, # flags = eased # } # Defines areas where trees have apples. # type: noise_params_2d # mgv6_np_apple_trees = { # offset = 0, # scale = 1, # spread = (100, 100, 100), # seed = 342902, # octaves = 3, # persistence = 0.45, # lacunarity = 2.0, # flags = eased # } ## Mapgen V7 # Map generation attributes specific to Mapgen v7. # 'ridges' enables the rivers. # type: flags possible values: mountains, ridges, floatlands, caverns, nomountains, noridges, nofloatlands, nocaverns # mgv7_spflags = mountains,ridges,nofloatlands,caverns # Y of mountain density gradient zero level. Used to shift mountains vertically. # type: int # mgv7_mount_zero_level = 0 # Controls width of tunnels, a smaller value creates wider tunnels. # type: float # mgv7_cave_width = 0.09 # Y of upper limit of large caves. # type: int # mgv7_large_cave_depth = -33 # Deprecated, define and locate cave liquids using biome definitions instead. # Y of upper limit of lava in large caves. # type: int # mgv7_lava_depth = -256 # Controls the density of mountain-type floatlands. # Is a noise offset added to the 'mgv7_np_mountain' noise value. # type: float # mgv7_float_mount_density = 0.6 # Typical maximum height, above and below midpoint, of floatland mountains. # type: float # mgv7_float_mount_height = 128.0 # Alters how mountain-type floatlands taper above and below midpoint. # type: float # mgv7_float_mount_exponent = 0.75 # Y-level of floatland midpoint and lake surface. # type: int # mgv7_floatland_level = 1280 # Y-level to which floatland shadows extend. # type: int # mgv7_shadow_limit = 1024 # Y-level of cavern upper limit. # type: int # mgv7_cavern_limit = -256 # Y-distance over which caverns expand to full size. # type: int # mgv7_cavern_taper = 256 # Defines full size of caverns, smaller values create larger caverns. # type: float # mgv7_cavern_threshold = 0.7 # Lower Y limit of dungeons. # type: int # mgv7_dungeon_ymin = -31000 # Upper Y limit of dungeons. # type: int # mgv7_dungeon_ymax = 31000 ### Noises # Y-level of higher terrain that creates cliffs. # type: noise_params_2d # mgv7_np_terrain_base = { # offset = 4, # scale = 70, # spread = (600, 600, 600), # seed = 82341, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Y-level of lower terrain and seabed. # type: noise_params_2d # mgv7_np_terrain_alt = { # offset = 4, # scale = 25, # spread = (600, 600, 600), # seed = 5934, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Varies roughness of terrain. # Defines the 'persistence' value for terrain_base and terrain_alt noises. # type: noise_params_2d # mgv7_np_terrain_persist = { # offset = 0.6, # scale = 0.1, # spread = (2000, 2000, 2000), # seed = 539, # octaves = 3, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Defines distribution of higher terrain and steepness of cliffs. # type: noise_params_2d # mgv7_np_height_select = { # offset = -8, # scale = 16, # spread = (500, 500, 500), # seed = 4213, # octaves = 6, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # Variation of biome filler depth. # type: noise_params_2d # mgv7_np_filler_depth = { # offset = 0, # scale = 1.2, # spread = (150, 150, 150), # seed = 261, # octaves = 3, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # Variation of maximum mountain height (in nodes). # type: noise_params_2d # mgv7_np_mount_height = { # offset = 256, # scale = 112, # spread = (1000, 1000, 1000), # seed = 72449, # octaves = 3, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Defines large-scale river channel structure. # type: noise_params_2d # mgv7_np_ridge_uwater = { # offset = 0, # scale = 1, # spread = (1000, 1000, 1000), # seed = 85039, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Defines areas of floatland smooth terrain. # Smooth floatlands occur when noise > 0. # type: noise_params_2d # mgv7_np_floatland_base = { # offset = -0.6, # scale = 1.5, # spread = (600, 600, 600), # seed = 114, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Variation of hill height and lake depth on floatland smooth terrain. # type: noise_params_2d # mgv7_np_float_base_height = { # offset = 48, # scale = 24, # spread = (300, 300, 300), # seed = 907, # octaves = 4, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # 3D noise defining mountain structure and height. # Also defines structure of floatland mountain terrain. # type: noise_params_3d # mgv7_np_mountain = { # offset = -0.6, # scale = 1, # spread = (250, 350, 250), # seed = 5333, # octaves = 5, # persistence = 0.63, # lacunarity = 2.0, # flags = # } # 3D noise defining structure of river canyon walls. # type: noise_params_3d # mgv7_np_ridge = { # offset = 0, # scale = 1, # spread = (100, 100, 100), # seed = 6467, # octaves = 4, # persistence = 0.75, # lacunarity = 2.0, # flags = # } # 3D noise defining giant caverns. # type: noise_params_3d # mgv7_np_cavern = { # offset = 0, # scale = 1, # spread = (384, 128, 384), # seed = 723, # octaves = 5, # persistence = 0.63, # lacunarity = 2.0, # flags = # } # First of two 3D noises that together define tunnels. # type: noise_params_3d # mgv7_np_cave1 = { # offset = 0, # scale = 12, # spread = (61, 61, 61), # seed = 52534, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # Second of two 3D noises that together define tunnels. # type: noise_params_3d # mgv7_np_cave2 = { # offset = 0, # scale = 12, # spread = (67, 67, 67), # seed = 10325, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # 3D noise that determines number of dungeons per mapchunk. # type: noise_params_3d # mgv7_np_dungeons = { # offset = 0.9, # scale = 0.5, # spread = (500, 500, 500), # seed = 0, # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, # flags = # } ## Mapgen Carpathian # Map generation attributes specific to Mapgen Carpathian. # type: flags possible values: caverns, rivers, nocaverns, norivers # mgcarpathian_spflags = caverns,norivers # Defines the base ground level. # type: float # mgcarpathian_base_level = 12.0 # Defines the width of the river channel. # type: float # mgcarpathian_river_width = 0.05 # Defines the depth of the river channel. # type: float # mgcarpathian_river_depth = 24.0 # Defines the width of the river valley. # type: float # mgcarpathian_valley_width = 0.25 # Controls width of tunnels, a smaller value creates wider tunnels. # type: float # mgcarpathian_cave_width = 0.09 # Y of upper limit of large caves. # type: int # mgcarpathian_large_cave_depth = -33 # Deprecated, define and locate cave liquids using biome definitions instead. # Y of upper limit of lava in large caves. # type: int # mgcarpathian_lava_depth = -256 # Y-level of cavern upper limit. # type: int # mgcarpathian_cavern_limit = -256 # Y-distance over which caverns expand to full size. # type: int # mgcarpathian_cavern_taper = 256 # Defines full size of caverns, smaller values create larger caverns. # type: float # mgcarpathian_cavern_threshold = 0.7 # Lower Y limit of dungeons. # type: int # mgcarpathian_dungeon_ymin = -31000 # Upper Y limit of dungeons. # type: int # mgcarpathian_dungeon_ymax = 31000 ### Noises # Variation of biome filler depth. # type: noise_params_2d # mgcarpathian_np_filler_depth = { # offset = 0, # scale = 1, # spread = (128, 128, 128), # seed = 261, # octaves = 3, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # First of 4 2D noises that together define hill/mountain range height. # type: noise_params_2d # mgcarpathian_np_height1 = { # offset = 0, # scale = 5, # spread = (251, 251, 251), # seed = 9613, # octaves = 5, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # Second of 4 2D noises that together define hill/mountain range height. # type: noise_params_2d # mgcarpathian_np_height2 = { # offset = 0, # scale = 5, # spread = (383, 383, 383), # seed = 1949, # octaves = 5, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # Third of 4 2D noises that together define hill/mountain range height. # type: noise_params_2d # mgcarpathian_np_height3 = { # offset = 0, # scale = 5, # spread = (509, 509, 509), # seed = 3211, # octaves = 5, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # Fourth of 4 2D noises that together define hill/mountain range height. # type: noise_params_2d # mgcarpathian_np_height4 = { # offset = 0, # scale = 5, # spread = (631, 631, 631), # seed = 1583, # octaves = 5, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # 2D noise that controls the size/occurrence of rolling hills. # type: noise_params_2d # mgcarpathian_np_hills_terrain = { # offset = 1, # scale = 1, # spread = (1301, 1301, 1301), # seed = 1692, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # 2D noise that controls the size/occurrence of ridged mountain ranges. # type: noise_params_2d # mgcarpathian_np_ridge_terrain = { # offset = 1, # scale = 1, # spread = (1889, 1889, 1889), # seed = 3568, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # 2D noise that controls the size/occurrence of step mountain ranges. # type: noise_params_2d # mgcarpathian_np_step_terrain = { # offset = 1, # scale = 1, # spread = (1889, 1889, 1889), # seed = 4157, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # 2D noise that controls the shape/size of rolling hills. # type: noise_params_2d # mgcarpathian_np_hills = { # offset = 0, # scale = 3, # spread = (257, 257, 257), # seed = 6604, # octaves = 6, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # 2D noise that controls the shape/size of ridged mountains. # type: noise_params_2d # mgcarpathian_np_ridge_mnt = { # offset = 0, # scale = 12, # spread = (743, 743, 743), # seed = 5520, # octaves = 6, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # 2D noise that controls the shape/size of step mountains. # type: noise_params_2d # mgcarpathian_np_step_mnt = { # offset = 0, # scale = 8, # spread = (509, 509, 509), # seed = 2590, # octaves = 6, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # 2D noise that locates the river valleys and channels. # type: noise_params_2d # mgcarpathian_np_rivers = { # offset = 0, # scale = 1, # spread = (1000, 1000, 1000), # seed = 85039, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # 3D noise for mountain overhangs, cliffs, etc. Usually small variations. # type: noise_params_3d # mgcarpathian_np_mnt_var = { # offset = 0, # scale = 1, # spread = (499, 499, 499), # seed = 2490, # octaves = 5, # persistence = 0.55, # lacunarity = 2.0, # flags = # } # First of two 3D noises that together define tunnels. # type: noise_params_3d # mgcarpathian_np_cave1 = { # offset = 0, # scale = 12, # spread = (61, 61, 61), # seed = 52534, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # Second of two 3D noises that together define tunnels. # type: noise_params_3d # mgcarpathian_np_cave2 = { # offset = 0, # scale = 12, # spread = (67, 67, 67), # seed = 10325, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # 3D noise defining giant caverns. # type: noise_params_3d # mgcarpathian_np_cavern = { # offset = 0, # scale = 1, # spread = (384, 128, 384), # seed = 723, # octaves = 5, # persistence = 0.63, # lacunarity = 2.0, # flags = # } # 3D noise that determines number of dungeons per mapchunk. # type: noise_params_3d # mgcarpathian_np_dungeons = { # offset = 0.9, # scale = 0.5, # spread = (500, 500, 500), # seed = 0, # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, # flags = # } ## Mapgen Flat # Map generation attributes specific to Mapgen flat. # Occasional lakes and hills can be added to the flat world. # type: flags possible values: lakes, hills, nolakes, nohills # mgflat_spflags = nolakes,nohills # Y of flat ground. # type: int # mgflat_ground_level = 8 # Y of upper limit of large caves. # type: int # mgflat_large_cave_depth = -33 # Deprecated, define and locate cave liquids using biome definitions instead. # Y of upper limit of lava in large caves. # type: int # mgflat_lava_depth = -256 # Controls width of tunnels, a smaller value creates wider tunnels. # type: float # mgflat_cave_width = 0.09 # Terrain noise threshold for lakes. # Controls proportion of world area covered by lakes. # Adjust towards 0.0 for a larger proportion. # type: float # mgflat_lake_threshold = -0.45 # Controls steepness/depth of lake depressions. # type: float # mgflat_lake_steepness = 48.0 # Terrain noise threshold for hills. # Controls proportion of world area covered by hills. # Adjust towards 0.0 for a larger proportion. # type: float # mgflat_hill_threshold = 0.45 # Controls steepness/height of hills. # type: float # mgflat_hill_steepness = 64.0 # Lower Y limit of dungeons. # type: int # mgflat_dungeon_ymin = -31000 # Upper Y limit of dungeons. # type: int # mgflat_dungeon_ymax = 31000 ### Noises # Defines location and terrain of optional hills and lakes. # type: noise_params_2d # mgflat_np_terrain = { # offset = 0, # scale = 1, # spread = (600, 600, 600), # seed = 7244, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Variation of biome filler depth. # type: noise_params_2d # mgflat_np_filler_depth = { # offset = 0, # scale = 1.2, # spread = (150, 150, 150), # seed = 261, # octaves = 3, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # First of two 3D noises that together define tunnels. # type: noise_params_3d # mgflat_np_cave1 = { # offset = 0, # scale = 12, # spread = (61, 61, 61), # seed = 52534, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # Second of two 3D noises that together define tunnels. # type: noise_params_3d # mgflat_np_cave2 = { # offset = 0, # scale = 12, # spread = (67, 67, 67), # seed = 10325, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # 3D noise that determines number of dungeons per mapchunk. # type: noise_params_3d # mgflat_np_dungeons = { # offset = 0.9, # scale = 0.5, # spread = (500, 500, 500), # seed = 0, # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, # flags = # } ## Mapgen Fractal # Map generation attributes specific to Mapgen flat. # 'terrain' enables the generation of non-fractal terrain: # ocean, islands and underground. # type: flags possible values: terrain, noterrain # mgfractal_spflags = terrain # Controls width of tunnels, a smaller value creates wider tunnels. # type: float # mgfractal_cave_width = 0.09 # Y of upper limit of large caves. # type: int # mgfractal_large_cave_depth = -33 # Deprecated, define and locate cave liquids using biome definitions instead. # Y of upper limit of lava in large caves. # type: int # mgfractal_lava_depth = -256 # Lower Y limit of dungeons. # type: int # mgfractal_dungeon_ymin = -31000 # Upper Y limit of dungeons. # type: int # mgfractal_dungeon_ymax = 31000 # Selects one of 18 fractal types. # 1 = 4D "Roundy" mandelbrot set. # 2 = 4D "Roundy" julia set. # 3 = 4D "Squarry" mandelbrot set. # 4 = 4D "Squarry" julia set. # 5 = 4D "Mandy Cousin" mandelbrot set. # 6 = 4D "Mandy Cousin" julia set. # 7 = 4D "Variation" mandelbrot set. # 8 = 4D "Variation" julia set. # 9 = 3D "Mandelbrot/Mandelbar" mandelbrot set. # 10 = 3D "Mandelbrot/Mandelbar" julia set. # 11 = 3D "Christmas Tree" mandelbrot set. # 12 = 3D "Christmas Tree" julia set. # 13 = 3D "Mandelbulb" mandelbrot set. # 14 = 3D "Mandelbulb" julia set. # 15 = 3D "Cosine Mandelbulb" mandelbrot set. # 16 = 3D "Cosine Mandelbulb" julia set. # 17 = 4D "Mandelbulb" mandelbrot set. # 18 = 4D "Mandelbulb" julia set. # type: int min: 1 max: 18 # mgfractal_fractal = 1 # Iterations of the recursive function. # Increasing this increases the amount of fine detail, but also # increases processing load. # At iterations = 20 this mapgen has a similar load to mapgen V7. # type: int # mgfractal_iterations = 11 # (X,Y,Z) scale of fractal in nodes. # Actual fractal size will be 2 to 3 times larger. # These numbers can be made very large, the fractal does # not have to fit inside the world. # Increase these to 'zoom' into the detail of the fractal. # Default is for a vertically-squashed shape suitable for # an island, set all 3 numbers equal for the raw shape. # type: v3f # mgfractal_scale = (4096.0, 1024.0, 4096.0) # (X,Y,Z) offset of fractal from world center in units of 'scale'. # Can be used to move a desired point to (0, 0) to create a # suitable spawn point, or to allow 'zooming in' on a desired # point by increasing 'scale'. # The default is tuned for a suitable spawn point for mandelbrot # sets with default parameters, it may need altering in other # situations. # Range roughly -2 to 2. Multiply by 'scale' for offset in nodes. # type: v3f # mgfractal_offset = (1.79, 0.0, 0.0) # W coordinate of the generated 3D slice of a 4D fractal. # Determines which 3D slice of the 4D shape is generated. # Alters the shape of the fractal. # Has no effect on 3D fractals. # Range roughly -2 to 2. # type: float # mgfractal_slice_w = 0.0 # Julia set only. # X component of hypercomplex constant. # Alters the shape of the fractal. # Range roughly -2 to 2. # type: float # mgfractal_julia_x = 0.33 # Julia set only. # Y component of hypercomplex constant. # Alters the shape of the fractal. # Range roughly -2 to 2. # type: float # mgfractal_julia_y = 0.33 # Julia set only. # Z component of hypercomplex constant. # Alters the shape of the fractal. # Range roughly -2 to 2. # type: float # mgfractal_julia_z = 0.33 # Julia set only. # W component of hypercomplex constant. # Alters the shape of the fractal. # Has no effect on 3D fractals. # Range roughly -2 to 2. # type: float # mgfractal_julia_w = 0.33 ### Noises # Y-level of seabed. # type: noise_params_2d # mgfractal_np_seabed = { # offset = -14, # scale = 9, # spread = (600, 600, 600), # seed = 41900, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Variation of biome filler depth. # type: noise_params_2d # mgfractal_np_filler_depth = { # offset = 0, # scale = 1.2, # spread = (150, 150, 150), # seed = 261, # octaves = 3, # persistence = 0.7, # lacunarity = 2.0, # flags = eased # } # First of two 3D noises that together define tunnels. # type: noise_params_3d # mgfractal_np_cave1 = { # offset = 0, # scale = 12, # spread = (61, 61, 61), # seed = 52534, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # Second of two 3D noises that together define tunnels. # type: noise_params_3d # mgfractal_np_cave2 = { # offset = 0, # scale = 12, # spread = (67, 67, 67), # seed = 10325, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # 3D noise that determines number of dungeons per mapchunk. # type: noise_params_3d # mgfractal_np_dungeons = { # offset = 0.9, # scale = 0.5, # spread = (500, 500, 500), # seed = 0, # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, # flags = # } ## Mapgen Valleys # Map generation attributes specific to Mapgen Valleys. # 'altitude_chill': Reduces heat with altitude. # 'humid_rivers': Increases humidity around rivers. # 'vary_river_depth': If enabled, low humidity and high heat causes rivers # to become shallower and occasionally dry. # 'altitude_dry': Reduces humidity with altitude. # type: flags possible values: altitude_chill, humid_rivers, vary_river_depth, altitude_dry, noaltitude_chill, nohumid_rivers, novary_river_depth, noaltitude_dry # mgvalleys_spflags = altitude_chill,humid_rivers,vary_river_depth,altitude_dry # The vertical distance over which heat drops by 20 if 'altitude_chill' is # enabled. Also the vertical distance over which humidity drops by 10 if # 'altitude_dry' is enabled. # type: int # mgvalleys_altitude_chill = 90 # Depth below which you'll find large caves. # type: int # mgvalleys_large_cave_depth = -33 # Deprecated, define and locate cave liquids using biome definitions instead. # Y of upper limit of lava in large caves. # type: int # mgvalleys_lava_depth = 1 # Depth below which you'll find giant caverns. # type: int # mgvalleys_cavern_limit = -256 # Y-distance over which caverns expand to full size. # type: int # mgvalleys_cavern_taper = 192 # Defines full size of caverns, smaller values create larger caverns. # type: float # mgvalleys_cavern_threshold = 0.6 # How deep to make rivers. # type: int # mgvalleys_river_depth = 4 # How wide to make rivers. # type: int # mgvalleys_river_size = 5 # Controls width of tunnels, a smaller value creates wider tunnels. # type: float # mgvalleys_cave_width = 0.09 # Lower Y limit of dungeons. # type: int # mgvalleys_dungeon_ymin = -31000 # Upper Y limit of dungeons. # type: int # mgvalleys_dungeon_ymax = 63 ### Noises # First of two 3D noises that together define tunnels. # type: noise_params_3d # mgvalleys_np_cave1 = { # offset = 0, # scale = 12, # spread = (61, 61, 61), # seed = 52534, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # Second of two 3D noises that together define tunnels. # type: noise_params_3d # mgvalleys_np_cave2 = { # offset = 0, # scale = 12, # spread = (67, 67, 67), # seed = 10325, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = # } # The depth of dirt or other biome filler node. # type: noise_params_2d # mgvalleys_np_filler_depth = { # offset = 0, # scale = 1.2, # spread = (256, 256, 256), # seed = 1605, # octaves = 3, # persistence = 0.5, # lacunarity = 2.0, # flags = eased # } # 3D noise defining giant caverns. # type: noise_params_3d # mgvalleys_np_cavern = { # offset = 0, # scale = 1, # spread = (768, 256, 768), # seed = 59033, # octaves = 6, # persistence = 0.63, # lacunarity = 2.0, # flags = # } # Defines large-scale river channel structure. # type: noise_params_2d # mgvalleys_np_rivers = { # offset = 0, # scale = 1, # spread = (256, 256, 256), # seed = -6050, # octaves = 5, # persistence = 0.6, # lacunarity = 2.0, # flags = eased # } # Base terrain height. # type: noise_params_2d # mgvalleys_np_terrain_height = { # offset = -10, # scale = 50, # spread = (1024, 1024, 1024), # seed = 5202, # octaves = 6, # persistence = 0.4, # lacunarity = 2.0, # flags = eased # } # Raises terrain to make valleys around the rivers. # type: noise_params_2d # mgvalleys_np_valley_depth = { # offset = 5, # scale = 4, # spread = (512, 512, 512), # seed = -1914, # octaves = 1, # persistence = 1.0, # lacunarity = 2.0, # flags = eased # } # Slope and fill work together to modify the heights. # type: noise_params_3d # mgvalleys_np_inter_valley_fill = { # offset = 0, # scale = 1, # spread = (256, 512, 256), # seed = 1993, # octaves = 6, # persistence = 0.8, # lacunarity = 2.0, # flags = # } # Amplifies the valleys. # type: noise_params_2d # mgvalleys_np_valley_profile = { # offset = 0.6, # scale = 0.5, # spread = (512, 512, 512), # seed = 777, # octaves = 1, # persistence = 1.0, # lacunarity = 2.0, # flags = eased # } # Slope and fill work together to modify the heights. # type: noise_params_2d # mgvalleys_np_inter_valley_slope = { # offset = 0.5, # scale = 0.5, # spread = (128, 128, 128), # seed = 746, # octaves = 1, # persistence = 1.0, # lacunarity = 2.0, # flags = eased # } # 3D noise that determines number of dungeons per mapchunk. # type: noise_params_3d # mgvalleys_np_dungeons = { # offset = 0.9, # scale = 0.5, # spread = (500, 500, 500), # seed = 0, # octaves = 2, # persistence = 0.8, # lacunarity = 2.0, # flags = # } ## Advanced # Size of mapchunks generated by mapgen, stated in mapblocks (16 nodes). # WARNING!: There is no benefit, and there are several dangers, in # increasing this value above 5. # Reducing this value increases cave and dungeon density. # Altering this value is for special usage, leaving it unchanged is # recommended. # type: int # chunksize = 5 # Dump the mapgen debug information. # type: bool # enable_mapgen_debug_info = false # Maximum number of blocks that can be queued for loading. # type: int # emergequeue_limit_total = 512 # Maximum number of blocks to be queued that are to be loaded from file. # Set to blank for an appropriate amount to be chosen automatically. # type: int # emergequeue_limit_diskonly = 64 # Maximum number of blocks to be queued that are to be generated. # Set to blank for an appropriate amount to be chosen automatically. # type: int # emergequeue_limit_generate = 64 # Number of emerge threads to use. # WARNING: Currently there are multiple bugs that may cause crashes when # 'num_emerge_threads' is larger than 1. Until this warning is removed it is # strongly recommended this value is set to the default '1'. # Value 0: # - Automatic selection. The number of emerge threads will be # - 'number of processors - 2', with a lower limit of 1. # Any other value: # - Specifies the number of emerge threads, with a lower limit of 1. # WARNING: Increasing the number of emerge threads increases engine mapgen # speed, but this may harm game performance by interfering with other # processes, especially in singleplayer and/or when running Lua code in # 'on_generated'. For many users the optimum setting may be '1'. # type: int # num_emerge_threads = 1 # # Online Content Repository # # The URL for the content repository # type: string # contentdb_url = https://content.minetest.net # Comma-separated list of flags to hide in the content repository. # "nonfree" can be used to hide packages which do not qualify as 'free software', # as defined by the Free Software Foundation. # You can also specify content ratings. # These flags are independent from Minetest versions, # so see a full list at https://content.minetest.net/help/content_flags/ # type: string # contentdb_flag_blacklist = nonfree, desktop_default