How to make modding system for my game

hi, i wanna add modding system to my game, how can i made it? i heard that i need to make custom “interpreter language” for scripts, how to do it?

2 Likes

explain, but in-depth please so we can all understand and help you as best as we can

describe “modding”? I am not sure what you mean by that

allow players to make custom maps, custom ui based on in-game events, for example show part of ui when some event happened

This sounds incredibly complicated. Though I could throw my two cents in on what you could conceptually do for the things you mentioned:

  • You could make the map editor tile based with every tile holding a value corresponding to an object in the map: exporting it would spit out a list of values that you can copy and paste, similar to how they did it in (Super) Meat Boy (the Flash version specifically)

  • The custom UI could just be a settings GUI where the player can input an ID for the decal and position, it saves this data and uses it to modify the players PlayerGUI.

Idk what crazy optimization you will use, but my advice is to keen on storing data as int16 or even int8 when needed, also if you want map editor, gui editor ect. you can use OOP to let’s say store object’s connected event, i managed to do something similar with electronic system simulation, i’ve stored connections between specific objects ect.