• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Design Modding in GMS games

G

Guest User

Guest
hey y'all, was wondering about GMS games that support modding. basically, i'm curious that if you chose to support modding of your game what is/was your experience with it.

did anyone even use it? has a player ever create something of significance (as in, not just "gun that does 9999 damage" or "make dirt to diamond") that really added to the game? what was your motivation to add the capability? etc.

or, if you've just happened across a GMS game that supported modding, did you create anything yourself or perhaps add anything created by other players?


oh. one thing i'd like to note. i'm not talking about de-compiling or w/e Undertale to make custom boss fights but more rather deliberate systems created by the developers. that's all still interesting, but its less a "mod" (in the sense i'm using it here) so much as it is a hack. thanks. :)

E: changed title from "moddibility" to "modding" because i don't think "moddibility" is a word... :oops:
 
Last edited by a moderator:
I don't personally know much about this. But I'm curious about this topic anyways.

I suspect it'd be possible to build a system that read all the game data and objects and stuff from .json or something. At the very least items in a limited sense. You could then let players add files in to add items. I've definitely seen map editors, systems of which could be probably used for general modding purposes like enemies and items, heck, even custom sprites, or whatever. But probably not at the level of MC, unless you make the project open source.
 
G

Guest User

Guest
I don't personally know much about this. But I'm curious about this topic anyways.
ah well don't worry about all that i aint asking ya how to make my game moddable (there are a few threads on this already). i'm just curious about the experiences people have had with modding and GMS. :p

but your mention of level editors does make me recall there being an interesting asset in the marketplace, that worked kinda like how you'd make rooms for a game in curses/libtcod where levels look like this:
Code:
##########
#   #X# e#
#e# # ## #
### #    #
# e ###  #
#X    e  #
##########
where 'e' is enemy, '#' is wall, and 'X' is stairway.

these would then be loaded in where 1 character = 1 tile and the symbols are mapped to certain objects (so '#' is mapped to obj_wall or w/e) and the room is created from these text files.

i can't find the asset in the marketplace anymore, but i wonder if anyone ever used sit for their game? and if they allowed players to put in their own levels if so. :)
 
I've made mod support for my games... I just don't publicize it. Plus, my games may not have the player base. Some have asked me for Workshop support. I fear what allowing that customization would lead to. :)

I think Dust Force DX allows for mods with a third party map editor.

With a lot of my games, you can pull in external levels from a .png format and swap out most art with .png file sheets. My artist would hand me giant .png sprite sheets and I'd have to cut them up and make them sprites. Then he'd be like woops everything is misaligned by 1 pixel and I'd need to do it allllll over again. So the easiest way was to make a system to pull in an external sprite sheet and chop it up and make it sprites when the game begins. It takes a bit of time to do this and as I've mentioned several times before, ensure that its done only once so when you reset the game, it doesn't do it over again because it makes a memory leak that in time will crash your game.

As for the .png map system, its the same thing. I'd constantly tweak levels when playing a game. With the last version of my platformer engine its at the point where I can refresh / load level without having to restart the entire game. All that music takes so long to load. In the case of the maps, the maps are infinite. I also have a non .png system for raw data in a .txt file which is FAR faster. So I made a converter to convert from .png to .txt because the .txt file will save time every time.

I've also done loading music externally and using it when the game needs to. It makes the games load so much faster and I suppose that would make the music modable as you just replace the external .ogg files with new ones.

It would be easy enough to load in variables from external files for enemies, players and stuff like that. I already have methods to load in stats, controls and settings.
 
Last edited:
G

Guest User

Guest
Plus, my games may not have the player base. Some have asked me for Workshop support. I fear what allowing that customization would lead to. :)
what ever could you mean...
lack of playerbase is definitely an issue tbh, especially with Steam Workshop since it's like...so visible.

even though it's not really the dev's fault, it still looks really, really bad when 90% of the mods available for your game are trash b/c there's not enough players to create and upvote good ones. :confused:

i never thought about loading level from .pngs. kind of reminds me of Spore storing data for levels/creatures/etc. in the color of exported .pngs, but way more human-workable. it's interesting for sure.

the whole art swapping thing sparked a realization that GMS makes it ridiculously easy to allow players to create their own tilesets and art for items/NPCs/etc. for a traditional roguelike though. o_O
(its kind of obvious now, but i ain't ever claim to be a genius here. :p)

all you need to do is make the actual sprite containing every single character externally loaded. so long as it's in b&w the game can then make sprites for every object at the start, blending it to whatever color is specified in the .cvs/.json/whatever you're loading object data from, and that's it...players can literally add as many items as they want with whatever tiles &colors they want and change the look of the whole game however they please.

considering most traditional roguelikes either have their tilesets hardcoded, make you fiddle around with the games settings to switch between ASCII/ANSI and tiles, or have to make entirely separate releases, one with ASCII symbols and one with tiles....i think GMS leaves us with a lot of potential there.
so that's actually pretty cool. :D
 
Last edited by a moderator:
Last I recall Turbo Pug DX's big hook was user generated content. Last I checked it was 5 - 8 items of Workshop content. Maybe things have changed.

.pngs are for me as a human. Its just far easier. Then convert them to data. It was also helpful to see generated and in game editor levels in micro .png format.

Here is a micro .png file:


The down side is you need to remember the color combinations or just copy / paste.

I've used the black + white + image blend. It looks a little ugly without some hue shifting too.
 
S

Sam (Deleted User)

Guest
If by modding you mean swapping out graphics and audio, you can easily do this by copying the files in and out of the sandbox as needed, with extensions such as this one. :)
 
G

Guest User

Guest
Last I recall Turbo Pug DX's big hook was user generated content. Last I checked it was 5 - 8 items of Workshop content. Maybe things have changed.
hrm i think it doesn't even have a workshop anymore as i couldn't find one for either Turbo Pug or Turbo Pug DX when i looked just now. maybe i'm blind tho. o:

.pngs are for me as a human. Its just far easier. Then convert them to data. It was also helpful to see generated and in game editor levels in micro .png format.
oh now that just looks lovely.
you just can't beat the ability for literally anyone to open up an image editor and create their own levels.

i think, in particular, it shows a lot of potential for games that just pull levels at random from a list (like Stardew Valley and, to a degree, Dungeon Crawl SS). this would make dungeons-delvers, in particular, more interesting because then you can simply have people making packs of custom-built levels to throw into the mix and be pulled from.

There is a user @Seabass (The Human) I believe who has setup modding for his Steam title Project Explore - he may be a valuable person to talk to about modding with GMS.
if they'd like to, sure. anyone can come and share their experience.

If by modding you mean swapping out graphics and audio, you can easily do this by copying the files in and out of the sandbox as needed, with extensions such as this one. :)
well if anyone's used something like this to bring in custom sprites for modded NPCs, items, etc. that'd be interesting to hear about.
 
Seabass is selling the source code for his Project Explore.

As for my .png map system its super simple to create the maps. Get a skeleton of a map in about 15 minutes. Detailing the map can then take like 4 hours. No one wants to do that part... I did create it so my friends could make maps and I'd pay them. It was a struggle.
 

Fern

Member
Hi, I was mentioned. If you want a modding system that passes in values, sprites, and utilizes all this with a mod loader, you should check out the source code I've posted on the marketplace. If you are willing to dive in and do it yourself I'd recommend Braffolk's image system for starters.
 
G

Guest User

Guest
Hi, I was mentioned. If you want a modding system that passes in values, sprites, and utilizes all this with a mod loader, you should check out the source code I've posted on the marketplace. If you are willing to dive in and do it yourself I'd recommend Braffolk's image system for starters.
oh i'm not looking for a modding system, i'm just interesting in hearing how your (or any dev that supports modding in their games) players have used that system (if at all!).

perhaps if someone who is looking into adding modding to their game, though, these would be very good examples so thank you. :)
 

Fern

Member
I'd share the code for how I loaded up images but it's like, 600 lines and I load up the pages in a multi-step process which involves multiple pages, external files stored via data structures, offsetting of sprites, and a few other tid-bits. So I can't provide a simple example.
 
As I mentioned in a different, yet similar thread... the first step to mod support is:

spr = sprite_add("player_5.png", 16, true, true, 0, 0);
 
M

MishMash

Guest
If you really want to be able to add meaningful and true modding, then you will need some sort of scripting interface that allows people to create custom logic. Not only that, but you also need your games interface/systems to be well-designed so that other mods can directly make use of your engine. There are a few scripting marketplace assets, though I imagine it would take a larger amount of work if you wanted to achieve them yourselves.

Personally, I always have mixed opinions on mods. I feel that asset replacement is generally pointless for the most part and that people will often get bored of that very quickly, as even if you do support some amounts of behaviour modification, it will always be limited and bound by content rules that already exist within your game, content rules that most mod creators would strive to extend upon or change.

Secondly, I personally that if modding is added early on to a game, then controversially, it shows a lack of foresight on the developers part. Whilst it might seem like a great idea to allow people to extend the game, I think it is somewhat missing the point if a game necessitates mods from the get go. I always feel that if a modding system is necessary, then you haven't done enough as a developer to make the base game compelling. Otherwise, a modding system can be a reasonable addition to a game, but I don't think its worth most developers implementing it early on. it's something that I believe should only be focused on once the game has been released and you have slowed down your progress on the game.

If however, you are purely making one out of interest, in order to achieve a FULL modding system, you need to be able to do the following:

  • Have some form of scripting system. Allow players to write a script in a high level language like lua, and have those scripts executed within your game.
  • Have a means of bundling scripts and assets together into a data format that your game can recognise and load.
  • Create a mod-manager that keeps track of which mods the player wants to load, and is also responsible for firing off scripts that are associated with that mod.
  • Structure your games system code in a way that allows external scripts to make use of your gameplay systems, much like existing objects in your game already would. This means having clean systems for things like the creation of inventories, the firing of projectiles, the application of damage to another instanec via a function. These functions will need to be exposed to the scripting language you are using so that the scripting language back-system can make subsequent calls to your own game functions.
  • Have a number of set events in-game that external scripts can hook into to modify/add content throughout specific stages of the game. This may for example be finding the place where all of your weapon stats are defined, and allowing an external script to run a few functions to add weapons of its own.
  • Have a resource management system (similar to what others have talked about in this thread) which can allow for the loading and use of external game assets.
  • Use YYC as you'll need every ounce of performance you can get when using a scripting language on top of another engine :p
Naturally, all of this is rather complicated though it is definitely possible. Though unfortunately it requires rather in-depth knowledge from a number of different areas, most importantly, having a really clean and well-documented project which is designed in a modular fashion. Even if you have the building blocks to make modding possible, it is still a very involved process. No one could create a general modding architecture that could work for all games as each game will have different demands as to what level of access users may have to different aspects of the game.

What would be very neat however, is if somehow, GameMaker could allow developers to publish mod builds of their game. What that would be is a partially open-source version of the project which exposes all of the games internal scripts and allows users to add new objects to that game (However would not show object code, unless specified for specific objects). It would then export those objects as standalone compiled units which could be imported and merged with the main game. It would be a bit of a one-way relationship though, in that the mod could perform events like any object, and the mod objects could use and access any of the games functions, however the game itself would not be able to interact with the mod object. Someone smart enough could probably somehow cheese this, by making use of function addresses.

In the past, for older versions of GM, there used to be a C++ library called GMAPI, which would allow a DLL to make use of any GameMaker function. In this, you could essentially allow mods to be made in C++, because you could just expose that api to a DLL, and have your game arbitrarily load DLLs which followed a given structure.
 
Oh yeah. I did make a few in game level editors, but those aren't really mods so much as user generated content. Instead of adjusting stats, you can give enemies super powers.

 

Tulloch

Member
The concept that I understand-- If you want to create a truly moddable game, you must be able to create the game using your own level editor / script editor.

Essentially you would be using GMS to create the framework for your tools in order for you to create the game.
 
G

Guest User

Guest
hey y'all. so i don't have a ton of time today but at a quick glance...i feel like i should point out that i'm not asking how to make my game moddable. there are a few good topics on this already so that's not really something i'm struggling with tbh.

it's wonderful to see people sharing ideas and y'all are welcome to keep doing so, but tbh i'm having trouble coming up with replies because if i don't really have much to say on that particular matter. so unfortunately i may not really be able to reply to everyone posting. :(

thank you all, though! :)
 

hogwater

Member
I think if a game has a high enough profile/ community interest a lot of people will start doing all sorts of weird/cool things. One great example is how Derek Yu released the GM source for the original Spelunky (still available to download and dig through btw), and since then people have made a ton of mods that do all sorts of things. Someone from this forum (Yellowafterlife? I forget) even added in online multiplayer.

And recently Brazilian fans swapped a ton of the sprites from the Wonder Boy remake for new versions based on a weird foreign version of the original game.
 
Top