Basic Modding Examples (2024)

Other languages:

  • English
  • español
  • русский

This page was last verified for Vintage Story version 1.19.

Contents

  • 1 Keep your contents upon death
  • 2 Changing sleep duration in beds
  • 3 Making wolves less dangerous
  • 4 Playing around with world generation
  • 5 Playing around with blocks

A large amount of game content is freely modifiable through editing text files. If you feel like tinkering around, just open your assets folder, which is located in your Vintage Story install location. If installed in the default location, and using Windows, you can quickly open your assets folder. Hit Winkey+R to open the 'run' window, paste in the line: %appdata%/Vintagestory/assets, and hit enter.

Protip:
Starting from Version 1.6 you should enable the error reporter by running the chat command /errorreporter 1 when you modify json files. With this, if you made any mistakes while changing the asset files, the game will display a dialog showing you all the errors it found.In earlier versions of the game you need to manually check out the log files in %appdata%/VintageStoryData/Logs/server-main.txt and client-main.txt

Keep your contents upon death

Open the file assets/game/entities/humanoid/player.json, find the line that begins with server: {, below that insert attributes: { keepContents: true },

This should prevent the player from dropping its inventory upon death.

Changing sleep duration in beds

Beds in the Vanilla game are pretty limited, as they let you only sleep a set number of hours every night. More often than not players prefer to skip the whole night. To achieve that open the file assets/survival/blocktypes/wood/bed.json

Line 8-11 should contain these lines:

"sleepEfficiencyByType": {"bed-wood-*": 0.70833333,"bed-hay-*": 0.58333333,"bed-woodaged-*": 0.79166666},

The sleepEfficiency attribute is specific to the bed. Note the use of the ByType suffix to specify values for each type of bed. In this case a value of 1 means the player can sleep half the day. The hay bed has a value of 0.58333333, which means the player can sleep for 12 * 0.58333333 = ~7 in-game hours. Change the value to anything between 0...1 and start the game or leave and re-enter your singleplayer world. Next time you sleep in the bed you will be skipping that amount of time.

Making wolves less dangerous

Our favorite arch enemy the wolf. If you don't like the silent horror of the winterlands, we can tame him with a few tweaks.Open the file assets/survival/entities/land/wolf-male.json

Line 116-129 should contain this:

{"code": "meleeattack","entityCodes": ["player", "chicken-rooster", "chicken-hen", "chicken-baby", "hare-*", "deer-*-baby", "deer-pudu-*-adult", "deer-water-*-adult", "deer-pampas-*-adult", "deer-redbrocket-*-adult"],"priority": 2,"damage": 8,"damageTier": 2,"damageType": "SlashingAttack","slot": 1,"mincooldown": 1500, "maxcooldown": 1500, "attackDurationMs": 800,"damagePlayerAtMs": 500,"animation": "Attack","animationSpeed": 2.5,"sound": "creature/wolf/attack"},

This is the configuration for the wolves ai task to induce damage to nearby enemies. By default, the wolf deals 8 damage, which means any unprotected player dies in 2-3 attacks. If you change the damage property to 5, the wolf has to attack you up to 3-4 times before a fully healed player dies.

Right below is the enemy seeking task

{"code": "seekentity","entityCodes": ["player", "chicken-rooster", "chicken-hen", "chicken-baby", "hare-*"],"priority": 1.5,"movespeed": 0.045,"seekingRange": 15,"belowTempSeekingRange": 25,"belowTempThreshold": -5,"animation": "Run","leapAtTarget": true,"leapAnimation": null,"animationSpeed": 2.2,"leapChance": 0.01,"sound": "creature/wolf/growl","whenNotInEmotionState": "saturated"},

You can perhaps read out that the wolf has a seeking range of 15 blocks. This means if the wolf finds a player within a radius of 15 blocks, it will start walking towards that player. Changing that to something lower, like 5 blocks, means you can get much closer to a wolf before he begins to chase you.

Be sure to also apply the changes to the female wolf in wolf-female.json!

Playing around with world generation

Inside the assets folder, navigate to the assets/survival/worldgen/ folder. Copy aside the landforms.json so you have a backup, then open the landforms.json. Remove everything in this file and paste in the following text:

{"code": "landforms","variants": [{"code": "humongous mountain","comment": "humongous mountains with caverns in them","hexcolor": "#5BC184","weight": 1.5,"useClimateMap": false,"terrainOctaves": [0, 0, 0, 1, 1, 1, 1, 0.6, 0.15],"terrainOctaveThresholds": [0, 0, 0, 0.5, 0, 0, 0, 0, 0],"terrainYKeyPositions": [0.000, 0.330, 0.370, 0.420, 0.430, 0.500, 0.600, 0.700, 1.000],"terrainYKeyThresholds": [1.000, 1.000, 0.870, 0.840, 0.700, 0.940, 1.000, 1.000, 0.000]},]}

Now next time you create a new survival world, the entire world is made of humongous mountains. Congratulations, you can now officially call yourself a modder! To revert these changes, simply delete the modified file, and rename your backed-up landforms file back to landforms.json.

Very shortly explained, this file defines the list of land forms that may appear in the world. Each section enclosed in { ... } is one landform. If you feel like, you can play around with the values for terrainYKeyPositions and terrainYKeyThresholds and see what happens (they have to be values between 0 and 1). These numbers basically determine the shape of the landform at certain elevations.

More info on on that is available on the World Generation page.

Playing around with blocks

You can tweak, add, or remove almost any block you want, including their shape. Inside the assets/survival folder:

  • The blocks themselves are all in the subfolder blocktypes
  • The block textures in textures/blocks
  • The shapes of the blocks are in blockshapes/ -- these you can open up with our custom model creator


For example, let's make the fire pit emit a red light and huge particles:

  • Open up survival/blocktypes/wood/firepit.json. Use Ctrl+F to find the following line:
    "firepit-lit": [7, 7, 16],
  • These are the Hue, Saturation and Brightness values according to the VS Light Wheel (hold your mouse over any pixel to see it's HSV Value). The brightness is how far the light will spread. I'll take [0, 7, 20]:
    "firepit-lit": [0, 7, 20],
  • On line 68 you should see this:
    size: { avg: 0.4, var: 0 },
  • This determines the size of the cubic glowing particles the fire pit emits, let's up the size 5 times and add some randomness to it:
    size: { avg: 2, var: 0.5 },
  • Save the file and restart the your singleplayer world, place your lit fire pit and you should see this:
    Content Modding
    Basics Content ModsDeveloping a Content Mod
    Tutorials
    Basic Basic Tutorials1. Content Essentials2. Simple Item3. Simple Block4. Simple Recipes
    Intermediate Intermediate Tutorials5. Item Variants6. Block Variants7. Complex Grid Recipes8. Further Recipes9. Simple World Generation
    Advanced Advanced Tutorials
    Other Other TutorialsDebugging Content
    Concepts Modding ConceptsVariantsDomainsPatchingRemappingWorld Properties
    Uncategorized
    Basics Basic ExamplesAsset SystemTexturesItemsRecipesBlocksEntitiesModel CreatorAnimationModinfo
    Advanced Advanced JSON ItemCompatibility with other mods
    Worldgen WorldGen ConceptsTerrainOresTreesJson Random Generator

    Wondering where some links have gone?
    The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.

    Modding
    Modding Introduction Getting StartedTheme Pack
    Content Modding Content ModsDeveloping a Content ModBasic TutorialsIntermediate TutorialsAdvanced TutorialsContent Mod Concepts
    Code Modding Code ModsSetting up your Development Environment
    Property Overview ItemEntityBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsWorld properties
    Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
    Additional Resources Community ResourcesModding API UpdatesProgramming LanguagesList of server commandsList of client commandsClient startup parametersServer startup parameters
    Example ModsAPIDocsGitHubRepository
Basic Modding Examples (2024)

FAQs

Is game modding illegal? ›

Legal status of mods

In the United States context, the mechanisms of how the modder gets into the code of the game to mod it may violate the Digital Millennium Copyright Act or the Computer Fraud and Abuse Act or even simply the end-user license agreement (EULA). Most EULAs forbid modders from selling their mods.

Is game modding hard? ›

Game mods can be simple or highly complex. For example, creating a skin for a Minecraft character can be done in a 2D editor with no coding knowledge, whereas total conversion of a game will take years of work and require the collaboration of a team of creators.

Are mods fair use? ›

This means that mods are “legal” only insofar as game developers suffer them to be so; the moment a developer finds a mod distasteful, it can be found to infringe copyright. Mods, no matter how well-respected or validated by developers, can also be found to infringe copyright through statute.

What is modding in gaming? ›

Video game modding refers to the process of altering or modifying a game's original content, features, or assets by players or third-party developers.

Can you be sued for mods? ›

Summary: Using Officially Approved MODs is Safe

If it turns out to be illegal, there is a risk of being sued for a large amount of damages. Therefore, if you want to use MODs, it is safest to use those that are officially approved.

Is it safe to mod a game? ›

Generally, game mods are legal if they do not infringe on a product's copyrights. However, they can be illegal depending on the game studio and country laws. Studios can allow fan-generated content, while others treat it as an infringement of the legal rights of the copyright owner.

Is GTA 5 easy to mod? ›

Although Rockstar has enabled community modding, the process isn't all that easy. Games such as Skyrim had dedicated tools for adding mods to the game. However, with GTA 5, modders have to work a bit harder and use third-party applications to apply the mods to the game.

What is the easiest game to start modding? ›

  • Minecraft - The game that was the entry point to gaming itself for so many, is also a great place to start when it comes to modding. ...
  • Skyrim - The Bethesda Elder Scrolls series has a history of strong mod options and Skyrim is no different.

Can mods corrupt your game? ›

Yes, using mods can potentially lead to file corruption in games. Mods alter the game's code or assets, and if they are not properly developed or installed, conflicts can arise, causing instability that might corrupt game files or save data.

Is Minecraft OK with mods? ›

While not officially supported by Mojang, Minecraft mods are allowed to be created and shared online, and the game's development team has an informal relationship with many modders. Some developers have gone on to work at Mojang after publishing popular mods.

Do mods cost money? ›

Each mod author decides whether they think there is enough customer interest in their mod to list it for sale. Just like buying a game, paying for a mod helps to support and reward the team (sometimes consisting of just one person) who have worked hard to create that new content.

Are Among Us mods legal? ›

While modded Among Us is not allowed in official Among Us servers, you can play Among Us mods in dedicated public, custom or private servers.

Is modding a console illegal? ›

For example, it is entirely legal to physically modify your gaming consoles as long as whatever you do does not alter or tamper with the console's firmware's code or circumvent any security measures.

How do people create mods? ›

Game mods can be done in a variety of ways such as unpacking files or modifying the code of a game to manipulate it. The game modding is largely done using open source methods. This means that the code and instructions are put into online repositories where anyone can use and implement them.

Are game mods paid? ›

99.9% of them don't. Its a hobby - they enjoy making things in their spare time and giving back to the game/community. Some of them manage to get advertising revenue but it is pretty rare. An extremely small amount of people either get their mod purchased by the company or get a job offer.

Can you go to jail for illegally downloading games? ›

Penalties for Piracy

Maximum penalties for misdemeanor copyright infringement are one year in prison and a $100,000 fine. Maximum penalties for felony copyright infringement generally are: Commercial advantage or private financial gain: five years in prison and a $250,000 fine.

Is modding a game cheating? ›

According to a recent Capcom developer conference held for their research and development team, mods are essentially the same as cheating, especially ones that “violate public order and morals,” such as nude mods, which is why older games are being updated with DRM that tends to break mods that are already installed or ...

Is it legal to use mod? ›

Yes, mods legal. However, it`s important to note that the legality of mods can vary depending on the specific game and the type of mod being used. Some mods may violate the terms of service of the game, which could lead to legal consequences.

Is using modded apps illegal? ›

Since mod APKs often infringe upon the intellectual property rights of original developers, distributing or using them may be considered illegal in many jurisdictions. Engaging in such activities can result in legal actions, including fines or even criminal charges.

Top Articles
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 6669

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.