capturetheflag/mods/ctf/ctf_map
ANAND 5df1a7d260 ctf_map: Auto-replace stone with ind_stone_red when placing barriers
Also make the c_id variable names more explicit
2019-11-10 07:15:22 +05:30
..
maps@9210b4c623 Update maps submodule 2019-11-07 12:36:17 +05:30
textures Increase capacity of team-chest (#380) 2019-06-23 12:34:15 +05:30
barrier.lua ctf_map: Auto-replace stone with ind_stone_red when placing barriers 2019-11-10 07:15:22 +05:30
base.lua ctf_map/base.lua: Fix code-style 2019-10-09 20:20:14 +05:30
chest.lua Increase capacity of team-chest (#380) 2019-06-23 12:34:15 +05:30
emerge.lua Reorganise game into modpacks 2019-01-11 15:52:47 +00:00
give_initial_stuff.lua Completely remove wooden tools (#331) 2019-03-19 22:24:43 +05:30
init.lua Add per-map skybox support 2019-10-29 12:30:35 +05:30
map_maker.lua Map maker: Fix crash when submitting fields in /gui 2019-11-09 08:59:44 +05:30
maps_catalog.lua Improve log messages (#422) 2019-10-18 11:22:18 +05:30
mod.conf Use mod.conf and modpack.conf 2019-08-31 10:31:14 +05:30
nodes.lua Make snow non-slippery again (#484) 2019-11-05 13:25:49 +01:00
README.md Add support for optionally setting start time and time speed per-map (#478) 2019-10-17 10:48:06 +05:30
schem_map.lua Fix crash upon invoking /maps_reload (#486) 2019-10-31 10:49:34 +01:00
time_sky.lua ctf_map: Move on_joinplayer callback for skybox mgmt. into time_sky.lua 2019-10-29 15:23:15 +05:30

CTF Map

This mod handles creating and loading maps.

Attributions

  • Indestructible nodes adapted from various mods in minetest_game.

Creating a new map

1. Dependencies

  • Minetest 0.4.16 or later.
  • Mods
    • ctf_map (by copying the folder from this game to minetest/mods)
    • worldedit and worldedit_commands.

2. Find an area

  • Can use Minetest Game and any mapgen.
  • It must be a cube, and the barrier will be in the exact center.
  • It should be around 230x230 in surface area, but this can vary.
  • Feel free to modify the area to your needs.

3. Select the area

There are multiple ways do this, this is the simplist in most cases.

  • If you haven't modified the map at all, do the following to speed up barrier placement:
    • Stop Minetest.
    • Open up the world's world.mt
    • Set backend to "dummy".
    • Save.
  • Using worldedit, select the area.
  • Type /gui, and click "From WE" then "To WE".
  • Check that the center location is the right place for the barrier to go.
  • Check that the bounds extend far enough.

4. Place barriers

  • Set the middle barrier direction. The barrier is a plane defined by a co-ordinate = 0. If the barrier is X=0, then it will placed with every node of the barrier having X=0. If the barrier is Z=0, then it will placed with every node of the barrier having Z=0.
  • Click "place barrier". Note that this command does not have an undo.

5. Meta data

  • Set the meta data

6. Export

  • Click export, and wait until completion.
  • Copy the two files from worlddir/schems/ to ctf_map/maps/.
  • Rename the files so the two prefixed numbers are consistent to existing maps.
  • Profit!

Documentation

Map meta

Each map's metadata is stored in an accompanying .conf file containing the following data:

  • 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]
  • screenshot: File name of screenshot of the map; should include file extension.
  • license: Name of the license of the map.
  • other: [Optional] Misc. information about the map. This is displayed in the maps catalog.
  • base_node: [Optional] Technical name of node to be used for the team base.
  • schematic: Name of the map's schematic.
  • 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.
  • 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.
  • 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.

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:

treasures = default:pick_steel,0.5,5,1,10;shooter:shotgun,0.04,2,1;shooter:grenade,0.08,2,1

(See here to understand the magic numbers)

Indestructible nodes

  • ctf_map provides indestructible nodes for most nodes from default, and all nodes from stairs.

  • All indestructible nodes have the same item name with the mod prefix being ctf_map: instead of their original prefixes (e.g. default:stone -> ctf_map:stone and stairs:stair_stone -> ctf_map:stair_stone) with the exception of wool, whose indestructible nodes have slightly different names from the original node names - ctf_map:wool_<color>. This is because the original nomenclature becomes meaningless if the modname prefix is changed.