User:Icebrain/Modding/ko: Difference between revisions
(Created page with "{{Languages}} 이 페이지는 모드를 어떻게 다운로드하고 설치하는 방법에 대해 알려주고, 또한 모드를 만들때 알아두어야할 사항들에...") |
m (Bilka moved page Modding/ko to User:Icebrain:Modding/ko without leaving a redirect: WIP pages must be in your userspace) |
Revision as of 11:29, 15 February 2019
이 페이지는 모드를 어떻게 다운로드하고 설치하는 방법에 대해 알려주고, 또한 모드를 만들때 알아두어야할 사항들에 대한 내용들에 대하여 다루게 될것이다. 모드를 만드는 방법에 대한 더 자세한 방법은 [모딩-튜토리얼 페이지|모딩:튜토리얼]을 참고하면 될 것이다. 만약 모딩 API를 찾고 있다면 official Factorio Lua API documentation 사이트를 참고할 것. 만약 압축형식으로 모드를 설치하고 싶다면 application directory 페이지의 지시에 따르면 된다.
모드의 다운로드 & 설치
아래의 링크에서 모드를 다운받을 수 있다.
You can download the mods from the following places:
- Mod portal (website)
- Mod portal (in-game)
- Mod subforum
Mod portal (website)
Factorio's developers created the mod portal (website) to allow the players to share mods. A mod you download from the website comes in the form of a zipped file. To install the mod, you need to copy the zipped file into the mods directory located under the user data directory without unzipping it. You can verify whether or not you installed it correctly by viewing the mods list which you can access through the game's main menu.
Mod portal (in-game)
The mods displayed on the mod portal (website) should show in the in-game mod portal which you can access through the game's main menu. The differences in the in-game mod portal are that you can use it to both automatically download and install mods, and to enable or disable the mods.
Mod subforum
Some mod creators upload their mods to the official mod subforum to showcase their work without submitting to the mod portal or to get feedbacks from the community on their mods before updating or sending them to the mod portal. An uploaded mod should show as an attachment. Occasionally, a mod you download from the subforum comes in the form of a zipped file. You need to copy it into the mods directory located under the user data directory to install it — you do not have to unzip it. You can verify whether or not you installed it correctly by viewing the mods list which you can access through the game's main menu.
Dependencies
Many mods use Factorio's base mod as their only dependency which you do not have to install separately. However, some mods may require you to install other mods for them to work and can also make suggestions for you to install other mods for them to extend their functionality.
Required dependency
When a mod you installed requires you to install another mod for it to work, the other mod, in this case, is a required dependency.
Optional dependency
When a mod makes a suggestion to install another mod, but if it does not need that other mod for it to work, the other mod, in this case, is an optional dependency. You can install the optional dependencies which extend the functionality of a mod to enhance your gaming experience with the mod.
Sidenote
Currently, the in-game mod portal does not automatically download neither required nor optional dependencies; therefore, it is up to the user to find and install them. However, such process is expected to be made automatic in the future.
Creating mods
- See also: Tutorial:Modding
API documentation
- Prototype documentation — What prototypes can be added to the game, and what are their properties
- Documentation of the runtime API — Hook into events and change the world around the player.
- Factorio data github repository — Tracks changes of the lua prototype definitions in factorio in between releases.
- Data.raw — Lists the names and types of all built-in prototypes
Lua scripting
You need to use the Lua programming language (version 5.2.1) to create any mods in Factorio. The game's mod system injects your code into the startup and to the data construction stage of the game. You can use any text editor to write the code for your mod. Well-known text editors that offer syntax highlighting for Lua are Notepad++ and Sublime Text.
Useful resources for Lua:
- Lua tutorial
- Lua reference manual
- Lua REPL : A Lua read-eval-print-loop, essentially a sandbox.
Basic structure of a mod
Factorio's mods are distributed in ZIP archives and contain several important files that Factorio looks for when loading mods. These files are listed below, and the required files are colored red.
- ExampleMod_0.0.1.zip
- info.json
- control.lua
- data.lua
- data-updates.lua
- data-final-fixes.lua
Licensing
Every mod requires a license since Factorio v0.11. If a mod has no license, it is assumed to have a Creative Commons license — Attribution-Noncommercial 4.0 International (CC BY-NC 4.0). However, it is possible to purposely make the mod unlicensed, to allow the code within it to be available to the public domain. The most popular distribution licenses for Factorio mods are the MIT license and the GPLv3 license.
Other useful legal links include:
See also
- Category:Technical — Documentation of technical formats and API's not related to modding