Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

GMEdit

A high-end code editor for all things GameMaker · By YellowAfterlife

Custom dialect not detecting/working?

A topic by Nekonesse created Jul 03, 2024 Views: 170 Replies: 5
Viewing posts 1 to 2

Hey! im trying to make a custom dialect for my game, and im having issues with GMEdit detecting it with my .gml files. it shows up correctly in the project backups section of Preferences, but trying to reload GMEdit or open my gml file in general doesnt seem to be doing anything.

What could i be doing wrong??

{
"parent": "gml2",
"name": "Boll Deluxe",
"additionalKeywords": ["#region", "#endregion", "try", "catch", "throw"],
"indexingMode": "local",
"projectRegex": "^(.+?)\\.gml$",
"apiFiles": ["api.gml"],
"assetFiles": []
}
Developer

Hello! You’d want to use your own extension for a “project” file that you open - for example, "^(.+?)\\.boll$". Standard file extensions like GML/YYP/GMX are handled by GMEdit itself.

ah, alright, thank you!

hm.... after trying this im getting an error message after trying to open it in gmedit, drag and dropping it into the app does nothing.

This file does not have an app associated with it for performing this action. Please install an app, or if one is already installed, create an association in the Default Apps Settings page.

Oh wait i see the problem here, it is a *project* file so it isnt handled by gmedit, in which case, im assuming there is no way to override the default dialect without a config.ini? which kind of sucks because i already have a configuration file but its called something completely different, so i would have to make completely empy ini files to make the dialect work.

Developer

When a file is opened with or dragged and dropped onto GMEdit, it will first try to open it with existing means (as there’s already a bunch of code for figuring out what to do when you open a .project.gmx vs .object.gmx, for example) and then it’ll go over each installed dialect until it finds one where projectRegex matches the provided path. If nothing matches, it asks Windows to open the file.

For example, Nuclear Throne matches (slightly ambiguously named) main.txt / main.cfg files, but also anything with .ntgml extension.

This is not a perfect system, but it is the only one that allows GMEdit to be set as the app for opening mod files without asking the user for dialect / GM version on open.