Game Dev Studio
 Тема закреплена. Скорее всего, здесь есть важная информация.
sрy  [Разработчик] 12 сен. 2018 г. в 6:56
Basic Workshop Info
Hello! This thread is meant to be a general introduction to the Steam Workshop functionality of Game Dev Studio.
The game features full modding support, and therefore can have changes done to it from head to toe.
For full documentation on all the available classes, libraries, and objects, please head to: http://gamedevstudiogame.com/
For general info on Lua, please read through the Lua 5.1 documentation[www.lua.org], and look into LuaJIT 2.0.5[luajit.org].
As for text editors, I can personally recommend either Notepad++[notepad-plus-plus.org] or Sublime Text[www.sublimetext.com].

Sprite sheet packer
If your mod is going to be using custom textures, use the following tool to pack textures into spritesheets.
https://github.com/nickgravelyn/SpriteSheetPacker

IMPORTANT!
The game is using the 0.10.2 version of LOVE2D at the time of writing this. An update to the latest version (11.1) is planned for one of the future updates. For the time being, please refer to the documentation of LOVE2D specific to version 0.10.2.

Mod folder structure
Correct mod folder structure should look like this:
myMod/files/
Here's an example of a properly set-up mod folder.[i.imgur.com] Please note the directory at the top.

Within the 'files' folder, only one file will be loaded, and that file is main.lua.
Here's an example of the main.lua file, the entry point of every mod.[i.imgur.com]
From there on you will need to load other files on your own with the use of the require function.

Every mod is contained within its own environment, and one mod can not see another mod, meaning that mod A can't access mod B. The only way for mod A to access mod B, is if mod B sets up a reference to some variables that it has to a library/class that is exposed to every mod (all the documented libraries on the game's site). Keep that in mind when writing your mod code.

Local mods
Local mods can be loaded by placing a mod folder inside the 'mods' folder, found at the root of the game's folder. You can check which mods are loaded (and which failed to load) by checking the "Local mods" menu in the "Modding" menu.

Submitting a mod to Steam Workshop
In order to submit a mod to Steam Workshop, you will need to place the folder of the mod you wish to upload inside the 'mods_staging' folder, and the image you wish to use as the preview in the mod's root folder. (not inside the 'files' folder!) You can place multiple images to choose from.
You will then be able to choose the image you wish to use as the preview from the images found in the mod's root folder.
Keep in mind, you can change the preview image of your addon at any given time by updating your mod.
Here's an example of a properly set-up Workshop-ready mod folder[i.imgur.com]
With the folder set-up properly, you can start up the game, click on the Modding button in the main menu (the suitcase), and select the Steam Workshop menu. From there on, simply click on 'Publish new...' and follow the steps.
A properly set-up mod folder, ready for upload.[i.imgur.com] In case something is wrong with the folder set-up, the game will let you know.

Things to know before submitting an addon
* Your preview image should not exceed 1MB in filesize
* Preview images look best when they are of a square aspect ratio (ie. 256x256, 512x512, etc.)

Updating a mod
In order to update a Workshop mod you've made, simply open the Steam Workshop menu, navigate to the 'Created Mods' tab, click on the item you wish to update, select 'Update mod...', and follow the steps given to you. Updating a mod is exactly the same as publishing a new one, so make sure you select the right folder!

Subscribed mod folder location
I highly encourage you to download the example mods and take a look through the Lua files, as well as the general layout of mods to learn how it all works. The mod folders can be found in Steam/steamapps/workshop/content/773580/. Here's an example of where they are located on my system.[i.imgur.com] Note that the folders seen on that screenshot are the actual mod folders. The number folder name is the workshop mod ID.

General tips
Read up on object-oriented programming.
Avoid declaring a lot of global variables.

Feel free to ask any questions.
Отредактировано sрy; 30 сен. 2019 г. в 8:52
< >
Сообщения 110 из 10
Any way to turn on the console by default? I'm trying to debug a script that runs when the mod is loaded. Thanks!
sрy  [Разработчик] 7 окт. 2018 г. в 1:17 
do you mean on start of the game?
as in, even before the game window finishes loading fully?
Отредактировано sрy; 7 окт. 2018 г. в 1:18
Exactly. I believe love2d has a configuration option for starting the console as soon as you start the game. It's something you would do on a conf.lua file, and would look something like this:

function love.conf(t)
t.console = true
end

Does this help? :)
sрy  [Разработчик] 7 окт. 2018 г. в 7:44 
yeah, I'll make a mental note for that for the next update
Отредактировано sрy; 7 окт. 2018 г. в 7:44
Thank you!

A suggestion on how to implement this, if doable: make it a startup parameter. To start the game with the console turned on:
game_dev_studio.exe -console
sрy  [Разработчик] 7 окт. 2018 г. в 9:52 
yep, just did that, next time I push an update to the develop branch (in a couple of days/a week hopefully) this change will be there
Отредактировано sрy; 7 окт. 2018 г. в 9:53
sрy  [Разработчик] 14 окт. 2018 г. в 12:45 
quick heads up, you can start the game with --console to enable the console instantly
Tested and working. Thanks for the quick turnaround, you've made debugging a tiny bit more pleasant.

FYI I've been working on a mod to add an annual "Video Game Awards" event. I see you're working to include it in the game, as well. My version will definitely not be as glamorous as yours.

Are you planning to release the annual awards any time soon? If yes, I'll redirect my efforts to other mod ideas.

Thank you!
sрy  [Разработчик] 15 окт. 2018 г. в 13:34 
yeah, the annual game awards feature will be released soon, I'm mostly just waiting on the assets to integrate at the moment
Отредактировано sрy; 15 окт. 2018 г. в 13:34
Thanks. I guess now the challenge is to come up with new ideas :)
< >
Сообщения 110 из 10
Показывать на странице: 1530 50