Author Topic: The Minor JSON Questions Thread  (Read 2701 times)

Offline pisskop

  • Survivor
  • ***
  • Posts: 3288
  • Closet Brute
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #90 on: April 13, 2017, 10:06:03 PM »
Is it possible to confer a trait upon somebody using effects?

Lets say, for example, I gave human flesh a 1% chance of granting the cannibal mutation.  Yes, no?

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3544
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #91 on: April 13, 2017, 11:31:49 PM »
Currently no

Offline pisskop

  • Survivor
  • ***
  • Posts: 3288
  • Closet Brute
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #92 on: April 20, 2017, 09:39:59 PM »
How do I add my own builtins?

I tried adding new caves; for instance it was a few minutes of work to make a 'dusk horror' cave.  but the game wont read it or I dont know how to properly add it as a builtin.

The src mentions:
mapgen_functions_big.cpp

but no such file exists?

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3544
    • View Profile
Re: The Minor JSON Questions Thread
« Reply #93 on: April 21, 2017, 09:35:46 AM »
Nowadays it's just mapgen_functions.cpp

To add a builtin, you need to add a function in mapgen_functions.cpp and bind it to a name in init_mapgen_builtin_functions function in the same file.
Then, of course, recompile the game.