1 - Getting Started, Italian translation added
This commit is contained in:
parent
96d6447281
commit
f408689104
@ -9,185 +9,175 @@ redirect_from:
|
|||||||
- /en/basics/folders.html
|
- /en/basics/folders.html
|
||||||
---
|
---
|
||||||
|
|
||||||
## Introduction <!-- omit in toc -->
|
## Introduzione <!-- omit in toc -->
|
||||||
|
|
||||||
Understanding the basic structure of a mod's folder is an essential skill when
|
Capire la struttura base della cartella di una mod è un requisito essenziale per creare mod.
|
||||||
creating mods.
|
|
||||||
|
|
||||||
- [What are Games and Mods?](#what-are-games-and-mods)
|
- [Cosa sono i giochi e le mod?](#cosa-sono-i-giochi-e-le-mod)
|
||||||
- [Where are mods stored?](#where-are-mods-stored)
|
- [Dove vengono salvate le mod?](#dove-vengono-salvate-le-mod)
|
||||||
- [Mod Directory](#mod-directory)
|
- [Cartella mod](#cartella-mod)
|
||||||
- [Dependencies](#dependencies)
|
- [Dipendenze](#dipendenze)
|
||||||
- [mod.conf](#modconf)
|
- [mod.conf](#modconf)
|
||||||
- [depends.txt](#dependstxt)
|
- [depends.txt](#dependstxt)
|
||||||
- [Mod Packs](#mod-packs)
|
- [Pacchetti mod](#pacchetti-mod-mod-pack)
|
||||||
- [Example](#example)
|
- [Esempio](#esempio)
|
||||||
- [Mod Folder](#mod-folder)
|
- [Cartella mod](#cartella-mod-1)
|
||||||
- [depends.txt](#dependstxt-1)
|
- [depends.txt](#dependstxt-1)
|
||||||
- [init.lua](#initlua)
|
- [init.lua](#initlua)
|
||||||
- [mod.conf](#modconf-1)
|
- [mod.conf](#modconf-1)
|
||||||
|
|
||||||
|
|
||||||
## What are Games and Mods?
|
## Cosa sono i giochi e le mod?
|
||||||
|
|
||||||
The power of Minetest is the ability to easily develop games without the need
|
Il punto forte di Minetest è l'abilità di sviluppare facilmente giochi senza il bisogno
|
||||||
to create your own voxel graphics, voxel algorithms, or fancy networking code.
|
di crearti da zero il motore grafico, gli algoritmi voxel o tutta la parte network.
|
||||||
|
|
||||||
In Minetest, a game is a collection of modules which work together to provide the
|
In Minetest, un gioco è una collezione di moduli che lavorano insieme per fornire il contenuto
|
||||||
content and behaviour of a game.
|
e il comportamento di un gioco.
|
||||||
A module, commonly known as a mod, is a collection of scripts and resources.
|
Un modulo, solitamente conosciuto come "mod" (femminile), è una collezione di script e risorse.
|
||||||
It's possible to make a game using only one mod, but this is rarely done because it
|
È possibile creare un gioco usando semplicemente una mod, ma questo non accade spesso perché
|
||||||
reduces the ease by which parts of the game can be adjusted and replaced
|
riduce la comodità di poter sostituire o calibrare alcune parti del gioco in maniera indipendente
|
||||||
independently of others.
|
dalle altre.
|
||||||
|
|
||||||
It's also possible to distribute mods outside of a game, in which case they
|
È anche possibile distribuire le mod al di fuori di un gioco, nel qual caso sono sempre mod
|
||||||
are also *mods* in the more traditional sense - modifications. These mods adjust
|
nel senso più tradizionale del termine: modifiche. Queste mod calibrano o espandono le proprietà
|
||||||
or extend the features of a game.
|
di un gioco.
|
||||||
|
|
||||||
Both the mods contained in a game and third-party mods use the same API.
|
Sia le mod presenti in un gioco che quelle a sé stanti usano la stessa API.
|
||||||
|
|
||||||
This book will cover the main parts of the Minetest API,
|
Questo libro coprirà le parti principali della API di Minetest,
|
||||||
and is applicable for both game developers and modders.
|
ed è applicabile sia per gli sviluppatori che per i creatori di mod.
|
||||||
|
|
||||||
|
|
||||||
## Where are mods stored?
|
## Dove vengono salvate le mod?
|
||||||
|
|
||||||
<a name="mod-locations"></a>
|
<a name="mod-locations"></a>
|
||||||
|
|
||||||
Each mod has its own directory where its Lua code, textures, models, and
|
Ogni mod ha la sua cartella personale dove viene messo il suo codice in Lua, le sue texture,
|
||||||
sounds are placed. Minetest checks in a number of different locations for
|
i suoi modelli e i suoi file audio. Minetest fa un check in più punti per le mod. Questi punti
|
||||||
mods. These locations are commonly called *mod load paths*.
|
sono generalmente chiamati *percorsi di caricamento mod* (in inglese *mod load paths*).
|
||||||
|
|
||||||
For a given world/save game, three mod locations are checked.
|
Per un dato mondo/salvataggio, vengono controllati tre punti.
|
||||||
They are, in order:
|
Essi sono, in ordine:
|
||||||
|
|
||||||
1. Game mods. These are the mods that form the game that the world is running.
|
1. Mod di gioco. Queste sono le mod che compongono il gioco che il mondo sta eseguendo.
|
||||||
Eg: `minetest/games/minetest_game/mods/`, `/usr/share/minetest/games/minetest/`
|
Es: `minetest/games/minetest_game/mods/`, `/usr/share/minetest/games/minetest/`
|
||||||
2. Global mods, the location to which mods are nearly always installed to.
|
2. Mod globali. Il luogo dove le mod vengono quasi sempre installate. Se si è in dubbio,
|
||||||
If in doubt, place them here.
|
le si metta qui.
|
||||||
Eg: `minetest/mods/`
|
Es: `minetest/mods/`
|
||||||
3. World mods, the location to store mods which are specific to a
|
3. Mod del mondo. Il luogo dove mettere le mod che sono specifiche di un dato mondo.
|
||||||
particular world.
|
Es: `minetest/worlds/world/worldmods/`
|
||||||
Eg: `minetest/worlds/world/worldmods/`
|
|
||||||
|
|
||||||
Minetest will check the locations in the order given above. If it encounters a mod
|
Minetest controllerà questi punti nell'ordine sopraelencato. Se incontra una mod con lo
|
||||||
with a name the same as one found previously, the later mod will be loaded in place
|
stesso nome di una incontrata in precedenza, l'ultima verrà caricata al posto della prima.
|
||||||
of the earlier mod.
|
Questo significa che si può sovrascrivere le mod di gioco piazzando una mod con lo stesso
|
||||||
This means that you can override game mods by placing a mod with the same name
|
nome nella cartella delle mod globali.
|
||||||
in the global mod location.
|
|
||||||
|
|
||||||
The actual location of each mod load path depends on what operating system you're
|
La posizione di ogni percorso di caricamento mod dipende da quale sistema operativo si sta
|
||||||
using, and how you installed Minetest.
|
usando, e come è stato installato Minetest.
|
||||||
|
|
||||||
* **Windows:**
|
* **Windows:**
|
||||||
* For portable builds, ie: from a .zip file, just go to the directory where
|
* Per le build portatili, per esempio da un file .zip, vai dove hai estratto lo zip e
|
||||||
you extracted the zip and look for the `games`, `mods`, and `worlds`
|
cerca le cartelle `games`, `mods` e `worlds`.
|
||||||
directories.
|
* Per le build installate, per esempio da un setup.exe,
|
||||||
* For installed builds, ie: from a setup.exe,
|
guarda in C:\\\\Minetest o C:\\\\Games\\Minetest.
|
||||||
look in C:\\\\Minetest or C:\\\\Games\\Minetest.
|
|
||||||
* **GNU/Linux:**
|
* **GNU/Linux:**
|
||||||
* For system-wide installs, look in `~/.minetest`.
|
* Per le installazioni di sistema, guarda in `~/.minetest`.
|
||||||
Note that `~` means the user home directory, and that files and directories
|
Attenzione che `~` equivale alla cartella home dell'utente, e che i file e le cartelle
|
||||||
starting with a dot (`.`) are hidden.
|
che iniziano con un punto (`.`) sono nascosti di default.
|
||||||
* For portable installs, look in the build directory.
|
* Per le installazioni portatili, guarda nella cartella di build.
|
||||||
* For Flatpak installs, look in `~/.var/app/net.minetest.Minetest/.minetest/mods/`.
|
* Per installazioni Flatpak, guarda in `~/.var/app/net.minetest.Minetest/.minetest/mods/`.
|
||||||
* **MacOS**
|
* **MacOS**
|
||||||
* Look in `~/Library/Application Support/minetest/`.
|
* Guarda in `~/Library/Application Support/minetest/`.
|
||||||
Note that `~` means the user home, ie: `/Users/USERNAME/`.
|
Attenzione che `~` equivale alla cartella home dell'utente, per esempio `/Users/USERNAME/`.
|
||||||
|
|
||||||
## Mod Directory
|
## Cartella mod
|
||||||
|
|
||||||
![Find the mod's directory]({{ page.root }}/static/folder_modfolder.jpg)
|
![Find the mod's directory]({{ page.root }}/static/folder_modfolder.jpg)
|
||||||
|
|
||||||
A *mod name* is used to refer to a mod. Each mod should have a unique name.
|
Il *nome mod* è usato per riferirsi a una mod. Ogni mod dovrebbe avere un nome unico.
|
||||||
Mod names can include letters, numbers, and underscores. A good name should
|
I nomi mod possono includere lettere, numeri e trattini bassi. Un buon nome dovrebbe
|
||||||
describe what the mod does, and the directory which contains the components of a mod
|
descrivere cosa fa la mod, e la cartella che contiene i componenti di una mod deve avere
|
||||||
must have the same name as the mod name.
|
lo stesso nome del nome mod.
|
||||||
To find out if a mod name is available, try searching for it on
|
Per scoprire se un nome mod è disponibile, prova a cercarlo su
|
||||||
[content.minetest.net](https://content.minetest.net).
|
[content.minetest.net](https://content.minetest.net).
|
||||||
|
|
||||||
|
|
||||||
mymod
|
mymod
|
||||||
├── init.lua (required) - Runs when the game loads.
|
├── init.lua (necessario) - Viene eseguito al lancio del gioco.
|
||||||
├── mod.conf (recommended) - Contains description and dependencies.
|
├── mod.conf (consigliato) - Contiene la descrizione e le dipendneze.
|
||||||
├── textures (optional)
|
├── textures (opzionale)
|
||||||
│ └── ... any textures or images
|
│ └── ... qualsiasi texture o immagine
|
||||||
├── sounds (optional)
|
├── sounds (opzionale)
|
||||||
│ └── ... any sounds
|
│ └── ... qualsiasi file audio
|
||||||
└── ... any other files or directories
|
└── ... qualsiasi altro tipo di file o cartelle
|
||||||
|
|
||||||
Only the init.lua file is required in a mod for it to run on game load;
|
Solo il file init.lua è necessario in una mod per eseguirla al lanciare un gioco;
|
||||||
however, mod.conf is recommended and other components may be needed
|
tuttavia, mod.conf è consigliato e altri componenti potrebbero essere richiesti a
|
||||||
depending on the mod's functionality.
|
seconda della funzione della mod.
|
||||||
|
|
||||||
|
## Dipendenze
|
||||||
|
|
||||||
## Dependencies
|
Una dipendenza avviene quando una mod richiede che un'altra mod sia avviata prima di essa.
|
||||||
|
Una mod potrebbe infatti richiedere il codice di quest'ultima, i suoi oggetti o altre risorse.
|
||||||
|
|
||||||
A dependency occurs when a mod requires another mod to be loaded before itself.
|
Ci sono due tipi di dipendenze: forti e opzionali.
|
||||||
One mod may require another mod's code, items, or other resources to be available
|
Entrambe richiedono che la mod richiesta venga caricata prima, con la differenza che se la
|
||||||
for it to use.
|
dipendenza è forte e la mod non viene trovata, l'altra fallirà nel caricare, mentre se è opzionale,
|
||||||
|
verranno semplicemente caricate meno feature.
|
||||||
|
|
||||||
There are two types of dependencies: hard and optional dependencies.
|
Una dipendenza opzionale è utile se si vuole integrare opzionalmente un'altra mod; può abilitare
|
||||||
Both require the mod to be loaded first. If the mod being depended on isn't
|
contenuti extra se l'utente desidera usare entrambe le mod in contemporanea.
|
||||||
available, a hard dependency will cause the mod to fail to load, while an optional
|
|
||||||
dependency might lead to fewer features being enabled.
|
|
||||||
|
|
||||||
An optional dependency is useful if you want to optionally support another mod; it can
|
Le dipendenze vanno elencate in mod.conf.
|
||||||
enable extra content if the user wishes to use both the mods at the same time.
|
|
||||||
|
|
||||||
Dependencies should be listed in mod.conf.
|
|
||||||
|
|
||||||
### mod.conf
|
### mod.conf
|
||||||
|
|
||||||
This file is used for mod metadata including the mod's name, description, and other
|
Questo file è utilizzato per i metadati della mod, che includono il suo nome, la descrizione e
|
||||||
information. For example:
|
altre informazioni. Per esempio:
|
||||||
|
|
||||||
name = mymod
|
name = lamiamod
|
||||||
description = Adds foo, bar, and bo.
|
description = Aggiunge X, Y, e Z.
|
||||||
depends = modone, modtwo
|
depends = mod1, mod2
|
||||||
optional_depends = modthree
|
optional_depends = mod3
|
||||||
|
|
||||||
### depends.txt
|
### depends.txt
|
||||||
|
|
||||||
For compatibility with 0.4.x versions of Minetest, instead of only specifying
|
Per questioni di compatibilità con le versioni 0.4.x di Minetest, al posto di specificare le
|
||||||
dependencies in mod.conf, you need to provide a depends.txt file in which
|
dipendenze solamente in mod.conf, c'è bisogno di fornire un file depends.txt nel quale vanno
|
||||||
you list all dependencies:
|
elencate tutte le dipendenze:
|
||||||
|
|
||||||
modone
|
mod1
|
||||||
modtwo
|
mod2
|
||||||
modthree?
|
mod3?
|
||||||
|
|
||||||
Each mod name is on its own line, and mod names with a question mark
|
Ogni nome mod occupa una riga, e i nomi mod seguiti da un punto di domanda indicano una dipendenza
|
||||||
following them are optional dependencies.
|
opzionale.
|
||||||
If an optional dependency is installed, it is loaded before the mod;
|
|
||||||
however, if the dependency is not installed, the mod still loads.
|
|
||||||
This is in contrast to normal dependencies which will cause the current
|
|
||||||
mod not to work if the dependency is not installed.
|
|
||||||
|
|
||||||
## Mod Packs
|
## Pacchetti mod (mod pack)
|
||||||
|
|
||||||
Mods can be grouped into mod packs which allow multiple mods to be packaged
|
Le mod possono essere raggruppate in pacchetti che permettono a più mod di essere confezionate
|
||||||
and moved together. They are useful if you want to supply multiple mods to
|
e spostate insieme. Sono comodi se si vogliono fornire più mod al giocatore, ma non si vuole al
|
||||||
a player, but don't want to make them download each one individually.
|
tempo stesso fargliele scaricare una per una.
|
||||||
|
|
||||||
modpack1
|
pacchettomod1
|
||||||
├── modpack.lua (required) - signals that this is a mod pack
|
├── modpack.lua (necessario) - segnala che è un pacchetto mod
|
||||||
├── mod1
|
├── mod1
|
||||||
│ └── ... mod files
|
│ └── ... file mod
|
||||||
└── mymod (optional)
|
└── mymod (opzionale)
|
||||||
└── ... mod files
|
└── ... file mod
|
||||||
|
|
||||||
Please note that a modpack is not a *game*.
|
Attenzione che un pacchetto mod non equivale a un *gioco*.
|
||||||
Games have their own organisational structure which will be explained in the
|
I giochi hanno una propria struttura organizzativa che verrà spiegata nel loro apposito capitolo.
|
||||||
Games chapter.
|
|
||||||
|
|
||||||
## Example
|
## Esempio
|
||||||
|
|
||||||
Here is an example which puts all of this together:
|
Here is an example which puts all of this together:
|
||||||
|
|
||||||
### Mod Folder
|
### Cartella mod
|
||||||
mymod
|
lamiamod
|
||||||
├── textures
|
├── textures
|
||||||
│ └── mymod_node.png files
|
│ └── lamiamod_nodo.png
|
||||||
├── depends.txt
|
├── depends.txt
|
||||||
├── init.lua
|
├── init.lua
|
||||||
└── mod.conf
|
└── mod.conf
|
||||||
@ -197,25 +187,22 @@ Here is an example which puts all of this together:
|
|||||||
|
|
||||||
### init.lua
|
### init.lua
|
||||||
```lua
|
```lua
|
||||||
print("This file will be run at load time!")
|
print("Questo file parte al caricamento!")
|
||||||
|
|
||||||
minetest.register_node("mymod:node", {
|
minetest.register_node("mymod:nodo", {
|
||||||
description = "This is a node",
|
description = "Questo è un nodo",
|
||||||
tiles = {"mymod_node.png"},
|
tiles = {"mymod_nodo.png"},
|
||||||
groups = {cracky = 1}
|
groups = {cracky = 1}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
### mod.conf
|
### mod.conf
|
||||||
name = mymod
|
name = lamiamod
|
||||||
descriptions = Adds a node
|
descriptions = Aggiunge un nodo
|
||||||
depends = default
|
depends = default
|
||||||
|
|
||||||
This mod has the name "mymod". It has three text files: init.lua, mod.conf,
|
Questa mod ha il nome "lamiamod". Ha tre file di testo: init.lua, mod.conf e depends.txt.\\
|
||||||
and depends.txt.\\
|
Lo script stampa un messaggio e poi registra un nodo – che sarà spiegato nel prossimo capitolo.\\
|
||||||
The script prints a message and then registers a node –
|
C'è una sola dipendenza, la [mod default](https://content.minetest.net/metapackages/default/), che
|
||||||
which will be explained in the next chapter.\\
|
si trova solitamente nel Minetest Game.\\
|
||||||
There's a single dependency, the
|
C'è anche una texture in textures/ per il nodo.
|
||||||
[default mod](https://content.minetest.net/metapackages/default/), which is
|
|
||||||
usually found in Minetest Game.\\
|
|
||||||
There is also a texture in textures/ for the node.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user