Jump to content

Custom world options / modifying world gen


Feone Varen
 Share

Recommended Posts

The surface deposit frequences appear to always override customized worldgen if you customize your world using the ingame options after modifying the json files. Would be nice to have the options to use a subset of the customization options like some of the presets.

Slightly related, is there a way to create custom presets? (Survive and Build, Explore etc)

 

 

Link to comment
Share on other sites

Eh, yea that's a bit tricky with the whole modding thing. I can think of 2 workarounds to fix that:

- Delete the file assets/survival/patches/surfacecopper.json
or
- Create a mod from your modified json files using the ModMaker3000 tool, then add to your modinfo that it depends on the survival mod. This way your mod also patches the copper deposit file, after the vanilla game has patched it, hence your change takes precedence
 

> Slightly related, is there a way to create custom presets? (Survive and Build, Explore etc)

Yes that should work. In modinfo.json you should be able to add something like this:

{
  description: ...
  authors: .... 
  (your other modinfo.json stuff here),
  worldConfig: {
    playstyles: [
              {
                  code: "feonessexploration",
                  langcode: "preset-feonesexploration",
                  requestMods: ["game", "survival"],
                  listOrder: 1,
                  worldType: "standard",
                  worldConfig: {
                      worldClimate: "realistic",
                      gameMode: "survival",
                      microblockChiseling: "true",
                      deathPunishment: "keep",
                      creatureHostility: "passive",
                      playerHealthPoints: "20",
                      playerHungerSpeed: "0.5",
                      foodSpoilSpeed: "0.5",
                      toolDurability: "2",
                      saplingGrowthDays: "5",
                      playerMoveSpeed: "1.25"
                  }
              },
    ]
  }
}


You can also add new elements to the customize world screen like this

{
	description: ...
	authors: .... 
	(your other modinfo.json stuff here),
	worldConfig: {
		playstyles: [ (your playstsyles here, if you want to define any) ],
		worldConfigAttributes: [
			{ code: "feonMode", dataType: "dropdown", values: ["off", "on"], names: ["On", "Off"], default: "off" },
		]
	}
}


To apply those configs, you can build a conditional patch

[
  {
    "__comment": "Feon mode makes in-water reeds and papyrus regrow much faster",
    "op": "replace",
    "path": "/attributes/inGameHours",
    "value": 24,
    "file": "blocktypes/plant/reedpapyrus-free.json",
    "condition": { "when": "feonMode", "isValue": "on" }
  }
]





Here's a list of all config options added by the vanilla game, sorry not documented yet, just raw json code right now:

            { code: "gameMode", dataType: "dropdown", values: ["survival", "creative"], names: ["Survival", "Creative"], default: "survival" },
            { code: "worldClimate", dataType: "dropdown", values: ["realistic", "patchy"], names: ["Realistic", "Patchy"], default: "realistic" },

            { code: "globalTemperature", dataType: "dropdown", values: ["4", "2", "1.5", "1", "0.5", "0.25", "0.15"], names: ["Scorching hot", "Very hot", "Hot", "Normal", "Cold", "Very Cold", "Snowball earth"], default: "1" },
            { code: "globalPrecipitation", dataType: "dropdown", values: ["4", "2", "1.5", "1", "0.5", "0.25", "0.1"], names: ["Super humid", "Very humid", "Humid", "Normal", "Semi-Arid", "Arid", "Hyperarid"], default: "1" },
            
            { code: "microblockChiseling", dataType: "bool", default: "false" },
            { code: "deathPunishment", dataType: "dropdown", values: ["drop", "keep"], names: ["Drop inventory contents", "Keep inventory contents"], default: "drop" },
            { code: "graceTimer", dataType: "dropdown", values: ["10", "5", "4", "3", "2", "1", "0"], names: ["10 days before monsters appear", "5 days before monsters appear", "4 days before monsters appear", "3 days before monsters appear", "2 days before monsters appear", "1 day before monsters appear", "No timer. Monsters spawn right away."], default: "5" },
            { code: "creatureHostility", dataType: "dropdown", values: ["aggressive", "passive", "off"], names: ["Aggressive", "Passive", "Never hostile"], default: "aggressive" },
            { code: "creatureStrength", dataType: "dropdown", values: ["4", "2", "1.5", "1", "0.5", "0.25"], names: ["Deadly (400%)", "Very Strong (200%)", "Strong (150%)", "Normal (100%)", "Weak (50%)", "Very weak (25%)"], default: "1" },
            { code: "playerHealthPoints", dataType: "dropdown", values: ["5", "10", "15", "20", "25", "30", "35"], names: ["5 hp", "10 hp", "15 hp", "20 hp", "25 hp", "30 hp", "35 hp"], default: "15" },
            { code: "playerHungerSpeed", dataType: "dropdown", values: ["2", "1.5", "1.25", "1", "0.75", "0.5", "0.25"], names: ["Very fast", "Fast", "Slightly faster", "Normal", "Slightly slower", "Slower", "Much slower"], default: "1" },
            { code: "playerMoveSpeed", dataType: "dropdown", values: ["2", "1.75", "1.5", "1.25", "1", "0.75"], names: ["Fast", "Slightly faster", "Normal", "Slightly slower", "Slower", "Much slower"], default: "1.5" },

            { code: "blockGravity", dataType: "dropdown", values: ["sandgravel", "sandgravelsoil"], names: ["Sand and gravel", "Sand, gravel and soil"], default: "sandgravel" },

            { code: "foodSpoilSpeed", dataType: "dropdown", values: ["4", "3", "2", "1.5", "1.25", "1", "0.75", "0.5", "0.25"], names: ["400%", "300%", "200%", "150%", "125%", "100%", "75%", "50%", "25%"], default: "1" },
            { code: "saplingGrowthDays", dataType: "dropdown", values: ["1.5", "3", "5", "6.5", "8", "10", "12", "24", "48", "96"], names: ["1.5 days", "3 days", "5 days", "6.5 days", "8 days", "10 days", "12 days", "24 days", "48 days", "96 days"], default: "8" },
            { code: "toolDurability", dataType: "dropdown", values: ["4", "3", "2", "1.5", "1.25", "1", "0.75", "0.5"], names: ["400%", "300%", "200%", "150%", "125%", "100%", "75%", "50%"], default: "1" },
            { code: "toolMiningSpeed", dataType: "dropdown", values: ["3", "2", "1.5", "1.25", "1", "0.75", "0.5", "0.25"], names: ["300%", "200%", "150%", "125%", "100%", "75%", "50%", "25%"], default: "1" },

            { code: "allowCoordinateHud", dataType: "bool", default: "true" },
            { code: "allowMap", dataType: "bool", default: "true" },
            { code: "allowLandClaiming", dataType: "bool", default: "true" },
            


            { code: "surfaceCopperDeposits", dataType: "dropdown", values: ["1", "0.5", "0.2", "0.1", "0.05", "0.015", "0"], names: ["Very common", "Common", "Uncommon", "Rare", "Very Rare", "Extremly rare", "Never"], default: "0.2" },
            { code: "surfaceTinDeposits", dataType: "dropdown", values: ["0.5", "0.25", "0.12", "0.03", "0.014", "0.007", "0"], names: ["Very common", "Common", "Uncommon", "Rare", "Very Rare", "Extremly rare", "Never"], default: "0.007" },


Sorry, this was perhaps more information than you bargained for :D

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.