2 ms·
Many games do allow modding and Lua, a popular language for that, is a good starter language that's a lot like JavaScript. Mod.io[0] is good place to find games
by dtagames 4y ago
Many games do allow modding and Lua, a popular language for that, is a good starter language that's a lot like JavaScript. Mod.io[0] is good place to find games that use their excellent modding API which makes it easy for programmers to create mods, easy for the studio to distribute them, and easy for players to install them from within the game.
I say this as an experienced programmer who never modded a game before and was induced to write one [1] by this capability. It also made me learn Lua, and I'm glad I did!
To more directly answer your question, it's a lot of work for developers to permit any kind of UGC (user-generated content) and modding definitely falls in this category. One reason Lua is so popular as a modding language is that it creates an absolute sandbox and can even individually sandbox functions and language elements, making it ideal for allowing users to code against some aspects of the game but not all of them -- and not giving access to any of the game's code itself. These are always factors if you allow any user code.
[0] https://mod.io/g https://mod.io/g
[1] https://mod.io/g/foundation/m/barrel-ofish https://mod.io/g/foundation/m/barrel-ofish
- deleted 4y ago[deleted]
- soverance 4y agoThe biggest example I can think of that (unofficially) supported Lua Final Fantasy XI. Because FFXI was released as a PS2 game, it had a ton of limitations, most notably around gear swaps. In the game, you had 16 gear slots on your character, but hundreds of pieces you could equip in there that would improve various actions, abilities, or spells. The built-in macro system had to be PS2 compliant, so it was only capable of swapping so many gear pieces with any given button press (basically like five pieces, when you really might want to swap all 16). While not supported on the PS2 versions, third-party tools such as Windower allowed folks to install extensions that were Lua programmed that brought a ton of additional functionality to those playing on PC. One of those was the "Gearswap" extension, which allowed you to finally swap all 16 pieces of gear simultaneously, and even do so based on actions that weren't button presses (such as say, if I'm poisoned, equip gear that enhances regen effects). This sort of thing was such a game-changer (literally) that you basically couldn't play the game effectively without it. Square-Enix even sort of turned a blind eye to it, despite breaking their ToS rules against third party tools, simply because most players had started doing it and they knew they weren't able to program around the PS2 limitations. It was definitely my first intro to Lua within FFXI, and it helped foster a great love of programming that I turned into a career. I believe more games should make this sort of thing officially available, it's just plain awesome.