2019-11-28 05:21:59 +00:00
# CTF Map - Map maker
2019-03-17 14:43:31 +00:00
2019-02-24 05:11:16 +00:00
## Creating a new map
2017-12-27 17:36:45 +00:00
2020-09-28 16:16:45 +00:00
### Youtube tutorial
https://youtu.be/orBsC9wViUw
2019-02-24 05:11:16 +00:00
### 1. Dependencies
2017-12-27 17:36:45 +00:00
2019-11-28 05:21:59 +00:00
* Minetest 5.0.0 or later.
* `ctf_map` modpack (by copying the folder from this game to `minetest/mods` )
* `worldedit` and `worldedit_commands` .
2017-12-27 17:36:45 +00:00
2019-02-24 05:11:16 +00:00
### 2. Find an area
2017-12-27 17:36:45 +00:00
* Can use Minetest Game and any mapgen.
* It must be a cube, and the barrier will be in the exact center.
2019-11-28 05:21:59 +00:00
* It should be around 230x230 in surface area, but this can be lesser.
2017-12-27 17:36:45 +00:00
* Feel free to modify the area to your needs.
2019-02-24 05:11:16 +00:00
### 3. Select the area
2017-12-27 17:36:45 +00:00
2019-11-28 05:21:59 +00:00
There are multiple ways do this, this is the simplest in most cases.
2017-12-27 17:36:45 +00:00
* If you haven't modified the map at all, do the following to speed up barrier placement:
2019-02-24 05:11:16 +00:00
* Stop Minetest.
* Open up the world's world.mt
* Set backend to "dummy".
* Save.
2017-12-27 17:36:45 +00:00
* Using worldedit, select the area.
2020-09-28 16:16:45 +00:00
* Type `/gui` , and click `Player pos` then `From WE` and then `To WE` .
2017-12-27 17:36:45 +00:00
* Check that the center location is the right place for the barrier to go.
* Check that the bounds extend far enough.
2019-02-24 05:11:16 +00:00
### 4. Place barriers
2017-12-27 17:36:45 +00:00
2021-02-15 04:53:41 +00:00
* The barrier is a plane defined by co-ordinate (=0).
* If you choose `X=0` the barrier will be placed having the X co-ordinate as 0. But from a few months, the `X=0` co-ordinate creates bugs and errors. It's better if you choose `Z=0` for creating your map.
* If you choose `Z=0` The barrier will be placed having the Z co-ordinate as 0.
2017-12-27 17:36:45 +00:00
* Click "place barrier". Note that this command does not have an undo.
2020-09-28 16:16:45 +00:00
* After placing barriers you should place 2 flags where you want bases to be. You get flags in `/gui` --> `Giveme flags`
2017-12-27 17:36:45 +00:00
2019-02-24 05:11:16 +00:00
### 5. Meta data
2017-12-27 17:36:45 +00:00
* Set the meta data
2019-02-24 05:11:16 +00:00
### 6. Export
2017-12-27 17:36:45 +00:00
* Click export, and wait until completion.
2021-02-15 04:53:41 +00:00
* Copy the resultant folder from `worlddir/schems/` into `games/capturetheflag/mods/ctf/ctf_map/ctf_map_core/maps/` .
2017-12-27 17:36:45 +00:00
* Profit!
2019-02-24 05:11:16 +00:00
2020-09-28 16:16:45 +00:00
2019-02-24 05:11:16 +00:00
## Documentation
### Map meta
2021-02-15 04:53:41 +00:00
Each map's metadata is stored in an accompanying `map.conf` file containing the following data:
2019-02-24 05:11:16 +00:00
* `name` : Name of map.
* `author` : Author of the map.
* `hint` : [Optional] Helpful hint or tip for unique maps, to help players understand the map.
* `rotation` : Rotation of the schem. [`x`|`z`]
2019-12-07 09:23:02 +00:00
* `r` : Radius of the map.
* `h` : Height of the map.
* `team.i` : Name of team `i` .
* `team.i.color` : Color of team `i` .
* `team.i.pos` : Position of team `i` 's flag, relative to center of schem.
* `chests.i.from` , `chests.i.to` : [Optional] Positions of diagonal corners of custom chest
zone `i` , relative to the center of the schem.
* `chests.i.n` : [Optional] Number of chests to place in custom chest zone `i` .
2019-10-09 06:21:09 +00:00
* `license` : Name of the license of the map.
* `other` : [Optional] Misc. information about the map. This is displayed in the maps catalog.
2019-10-09 06:16:51 +00:00
* `base_node` : [Optional] Technical name of node to be used for the team base.
2019-03-17 14:43:31 +00:00
* `initial_stuff` : [Optional] Comma-separated list of itemstacks to be given to the player
on join and on respawn.
* `treasures` : [Optional] List of treasures to be registered for the map, in a serialized
format. Refer to the `treasures` sub-section for more details.
2019-10-17 05:18:06 +00:00
* `start_time` : [Optional] Time at start of match. Defaults to `0.4` [`0` - `1` ].
* `time_speed` : [Optional] Time speed multiplier. Accepts any valid number. Defaults to 1.
2019-12-07 09:23:02 +00:00
* `phys_speed` : [Optional] Player speed multiplier. Accepts any valid number. Defaults to 1.
* `phys_jump` : [Optional] Player jump multiplier. Accepts any valid number. Defaults to 1.
* `phys_gravity` : [Optional] Player gravity multiplier. Accepts any valid number. Defaults to 1.
2019-02-24 05:11:16 +00:00
2020-04-21 07:33:00 +00:00
#### `license`
2021-02-15 04:53:41 +00:00
* Every map must have its own license. Once you've chosen your license, simply add the following line to the `map.conf` file:
2020-04-21 07:33:00 +00:00
2021-02-15 04:53:41 +00:00
```properties
2020-04-21 07:33:00 +00:00
license = < name >
```
* If attribution is required (for example if you modify other's map and you have to tell who is author of the original map), that has to be appended to the `license` field.
If you want to tell more infomation, you can use:
2021-02-15 04:53:41 +00:00
```properties
2020-04-21 07:33:00 +00:00
others = < description >
```
* If you don't know which license to use, [this list of CC licenses ](https://creativecommons.org/use-remix/cc-licenses/ ) can help you.
* We can only accept Free Software licenses, e.g.`CC BY-SA 4.0`.
* Please know what you are doing when choosing a certain license. For example, you can read information about various licenses and/or consult a lawyer.
2019-02-24 05:11:16 +00:00
#### `treasures`
`treasures` is a list of treasures to be registered for this map in serialized format.
An example `treasures` value that registers steel pick, shotgun, and grenade:
2021-02-15 04:53:41 +00:00
```properties
2019-02-24 05:11:16 +00:00
treasures = default:pick_steel,0.5,5,1,10;shooter:shotgun,0.04,2,1;shooter:grenade,0.08,2,1
```
2019-11-28 05:21:59 +00:00
(See [here ](../../../other/treasurer/README.md ) to understand the magic numbers)
2020-04-21 07:33:00 +00:00
2021-02-15 04:53:41 +00:00
#### `initial_stuff`
`initial_stuff` are the items given to players at their (re)spawn. The `initial_stuff` field is located in the `map.conf` file. At least a pickaxe and some torches should be given in the map's `initial_stuff` .
An example of `initial_stuff` value that registers a stone pickaxe, 30 cobblestones, 5 torches and a pistol is given below.
```properties
initial_stuff = default:pick_stone,default:cobble 30,default:torch 5,shooter:pistol
```
2020-04-21 07:33:00 +00:00
### `screenshot`
Every map must have its own screenshot in map's folder. It should have an aspect ratio of 3:2 (screenshot 600x400px is suggested).
It should be named `screenshot.png` .
### `skybox` [Optional]
Six images which should be in map's folder.
* `skybox_1.png` - up
* `skybox_2.png` - down
* `skybox_3.png` - east
* `skybox_4.png` - west
* `skybox_5.png` - south
* `skybox_6.png` - north
2021-02-15 04:53:41 +00:00
You have to include skybox license in `license` in `map.conf` file. We can only accept Free Software licenses, e.g. `CC0` , `CC BY 3.0` , `CC BY 4.0` , `CC BY-SA 3.0` , `CC BY-SA 4.0` .
Before you test your skybox images in local CTF game, run the `update.sh` file in the `games/capturetheflag/` folder.
2020-04-21 07:33:00 +00:00
2021-02-15 04:53:41 +00:00
You can find some good skyboxes with suitable licenses at [opengameart.org ](https://opengameart.org/art-search-advanced?field_art_tags_tid=skybox ) or [www.humus.name ](https://www.humus.name/index.php?page=Textures ).
2020-04-21 07:33:00 +00:00
## Editing exported map
The easiest way to edit exported maps is the following:
* Create a world using `singlenode` mapgen. Enable `WorldEdit` and `ctf_map` mod,
2021-02-15 04:53:41 +00:00
* Go in the world's folder, create a folder named `schems` , and place the `map.mts` file inside,
2020-04-21 07:33:00 +00:00
* Start the game, `/grantme all` and enable `fly` (there is no ground in singlenode mapgen),
* Do `//1` to set the position where you will generate the map,
2021-02-15 04:53:41 +00:00
* Do `//mtschemplace map` (where `map` is the name of the mts file without `.mts` ).
2020-04-21 07:33:00 +00:00
When you finish:
* Place `//1` and `//2` exactly in opposite corners of map (cube),
* Do `//mtschemcreate <new_name>` to create new edited `.mts` file. It will be saved in `schems` folder.