Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to add *full* mod support to my game?

Discussion in 'Editor & General Support' started by Flofoof, Apr 23, 2022.

  1. Flofoof

    Flofoof

    Joined:
    Mar 2, 2020
    Posts:
    9
    Adding full mod support without the playeers need to install additional sdk
    Hey, i've had this simple small idea of a game.
    The basic concept of it is: nothing. Yes the game literally contains nothing. But with mods everything can be changed. For example you want a procedually generated world with random npc's that talk with you and health, hunger etc... just install the mods that do this and done!

    I dont even know if this is possible, but im sure it can be done somehow.

    I've started with Unity-lua and moonsharp, but stopped due lack of tutorials/documentation, so is there any alternative?

    My goals: i want to create a simple API for everything in the game to be changed. And also add some events like onPlayerWalk and onWorldTick for example. I also want the modder to be able to export or build the mod, so that the player dosn't need to have something link .net core for realtime c# building installed.

    Best case: The modder is able to do anything and even access some cores or libs that other users created. Anything can be done!


    Thanks for reading :)

    EDIT: it would be great if the developer could use the using UnityEngine; namespace and the build the cs files and textures, models etc. into some file that my game understands
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,690
    This already exists and is called... any game engine.

    would you care to elaborate how is this different from Unity or any other engine?
     
    waishan and Joe-Censored like this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,946
    Wow, I guarantee you will NEVER get anywhere with that approach!!!!!!

    Holy berries man, you need to throw yourself at this stuff.

    And as arkano points out, you're trying to make an entire game engine, and yet you seem not to even have made anything so far. Start small, iterate up, build, build, build. Making a game is easy. Making a game engine is hard.

    The question you should be asking yourself constantly is:

    "Can I...?"

    And keep learning, every day a little bit better, just like this guy does:

    Imphenzia: How Did I Learn To Make Games:

     
  4. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,690
    To elaborate on this: the idea you had is to basically make a game engine. You can attach all sorts of adjectives to this, but "simple" or "small" aren't appropriate.

    While it may seem something simple at first (after all the game does *nothing* unless you start adding mods, right?), you do need to provide the means for "modders" to write their mods for your game, and means for your game to read and understand those mods:

    - So that modders can actually write mods, you want them to either have access to a compiler, or your game to include an interpreter. The former means your mods contain already compiled code (text that has been converted to assembly/binary that the computer can work with) and the game only needs to run it, the latter means mods contain code as raw text and the game converts the code to instructions the computer can understand on the fly.

    - You also want your game to be able to understand at least one file format for each of these: meshes, animations, images, audio, etc. Then, it needs to be able to do something meaningful with the data in these files, such as rendering meshes and animating them.

    - Want your modders to be able to create some UI? then you need to create tools for them to define what the UI looks like and what it does, a format to store that data, and a way for your game to understand that data and do something with it.

    Same with AI, audio, physics, etc. After literally years of work you could get this all working, and by the end you'd have: Unity -or something similar to it- which also does nothing at first: just a completely empty space, unless you start writing code, importing models, audio, etc.

    If you've played Dreams by Media Molecule (PS4), it's basically that: a game about creating games for other players to play. To do that, it contains a variety of (very simple/limited) tools for all I listed above. It could be understood as an empty game & set of mod tools or a very beginner-friendly game engine, easy enough to be used by almost anyone.

    My advice would be to start simple: begin making your own games, at first of your favorite genre, then as you get experience experiment with different genres/approaches. Over time you'll accumulate enough knowledge to tackle the project you describe.
     
    Last edited: Apr 27, 2022
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I just want to point out that using Unity to create a game engine is likely considered a violation of the Unity license terms. I Am Not A Lawyer

    https://unity3d.com/legal/terms-of-service/software

     
    CodeSmile and Kurt-Dekker like this.
  6. Ones_And_Zeros92

    Ones_And_Zeros92

    Joined:
    Jan 15, 2022
    Posts:
    1
    If you are really determined you could just have a folder of unity supported file types with some metadata along with every file defining it, that can be loaded in runtime; Along with some scripts that can be loaded and run; for multi modding you could have a root folder that the mod folders go into. you would also have to have a way of identifying different mods dependencies, and stopping errors and out-dated mods from crashing the game.
     
  7. Gotmachine

    Gotmachine

    Joined:
    Sep 26, 2019
    Posts:
    30
    This conceptually doesn't work.

    For (skilled) modders to pour thousands of unpaid hours in complex mods, you need to have a game that at least has a significant playerbase and some base gameplay implementation so mods can extend it in a cooperative way.

    What you're describing is just a game engine, and nobody will ever choose a dumbed down redistributed version of Unity over the original. At best, what you're describing is a framework asset for a specific type of game.