Windows Modding support in GMS2 Games?

BlueBot5000

Member
I know there are questions like this before but the first post i saw about was for GMS and not GMS2 and those 2 are quite different hence i still ask this question

Y'know for games like Minecraft where you can play as Steve or Alex or your own CAC without an ingame creator and change texture packs it makes a GMS2 Programmer wonder How could i add Modding support to my game? and when i mean modding support i mean simple things like just changing sprites for the player character, tilesets, items, and maybe even other entities or maybe even modding character variables (I will need to add a counter measure for setting player health to 100000)

I've seen GMS2 export a game and my expectations were WAY to high i expected changeable sprites variables you could edit but that wasn't quite the case

So in short: How could i program changeable sprites and variables with the exported game files? (Sorry if my post is a little amateur i don't really know how to write stuff like this)
 

c023-DeV

Member
There is a video on this somewhere in the interweb (I can't remember where).

(Keep in mind that I only remember this refering to Windows Targets)

As far as I remember it was something like:
Yes, you can let the player load textures, but it takes up a bit of extra processing power since each texture you load in will use a seperate texture page and you will be creating surfaces from that texture that also use their own texture pages.
So if you do it, it would be best to have all customizeable sprites in a pre defined layout, then you load that texture and generate your surfaces from that...

The variable editing is easier since you could just load up any textfile (JSON, Ini etc.) ...

edit: look into the File Handling pages of the manual for further info:

(as for the textures: I have a custom script to load BMP files that found and modifiyed...)
 
Last edited:

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Loading textures: sprite_add, sprite_replace, etc.
Loading audio: audio_create_stream (for OGG), wavload (for WAV)
Loading code: my Tiny Expression Runtime (and associated tutorial on making your own languages), Lua (my extension, Rousr extension), etc.

Rivals of Aether is a pretty good example of a GameMaker game with advanced user-generated content support.
 

Yal

🐧 *penguin noises*
GMC Elder
Usually it's the data aspect that gets tricky with modding, not the asset parts. Things like invalid values, connecting elements that act together to form a larger whole, etc are easy to overlook and then the game instantly breaks down once modders start pushing the limits. (I mean, just watching regular test players try something for the first time usually involves them breaking stuff in new interesting and esoteric ways)

My recommendation would be to make your own editor for things you want to be moddable (with custom metadata formats for things like player animations, level format etc) and then use that to create all the official stuff, then you can offer players the ability to do everything the official game can (+ you have a cool editor that speeds up your workflow, and you're forced to deal with enforcing a lot of limitations first-hand as you discover them).
 
Top