Add sounds. Creative: Use new trash icon. Split 'base' into 'gui' and 'textures' mods
18
README.txt
|
@ -1,9 +1,23 @@
|
|||
minipeli 0.1.0 by paramat.
|
||||
minipeli 0.1.1 by paramat.
|
||||
A game for Minetest Engine 5.0.0 and later.
|
||||
See README.txt in each mod directory for more author credits.
|
||||
|
||||
Authors of media (textures)
|
||||
---------------------------
|
||||
paramat (CC BY-SA 3.0):
|
||||
header.png
|
||||
icon.png
|
||||
|
||||
About Minipeli
|
||||
--------------
|
||||
'Peli' is the Finnish word for 'game'.
|
||||
|
||||
This game is intended to be an example of the minimal requirements for a Minetest game, to help others create their own games.
|
||||
This also suggests a good mod structure, as opposed to the problematic structure of the game called 'Minetest Game', which has most content in one large mod called 'default'. It is better to split the content into many mods.
|
||||
|
||||
This game is not as minimal as it could be, the 'creative' mod is not necessary. However, i consider it as probably desirable for most games as freely building without it is very awkward. So the 'creative' mod from Minetest Game has been included, and therefore also 'sfinv' on which it depends, they are almost completely unmodified.
|
||||
|
||||
Because creating animated meshes is difficult the player model from Minetest Game is used, it seems suitable for many games.
|
||||
The player API of Minetest Game is quite fundamental.
|
||||
So, the 'player_api' mod from Minetest Game is included in a simplified form.
|
||||
|
||||
See the 'development.txt' document for details of how this game was created and other useful information.
|
||||
|
|
|
@ -16,30 +16,37 @@ How this game was created
|
|||
-------------------------
|
||||
|
||||
MTG mods used unmodified:
|
||||
creative (but optional-depend on 'hand' mod instead of default)
|
||||
creative (but optional-depend on 'hand' mod instead of default, and use new trash icon)
|
||||
sfinv
|
||||
|
||||
|
||||
MTG mods used modified:
|
||||
default (becomes 'base' and 'hand' mods)
|
||||
default (becomes 'hand', 'gui' and 'textures' mods)
|
||||
player_api
|
||||
|
||||
|
||||
default mod changes:
|
||||
Move hand out to a separate mod 'hand'.
|
||||
Rename remainder to 'base' mod, now only contains:
|
||||
Split into 3 mods:
|
||||
|
||||
'hand', contains:
|
||||
Textures:
|
||||
wieldhand.png
|
||||
Code:
|
||||
minetest.register_item
|
||||
|
||||
'gui', contains:
|
||||
Textures:
|
||||
bubble
|
||||
crack_anylength
|
||||
gui_formbg
|
||||
gui_furnace_arrow_bg
|
||||
gui_hb_bg
|
||||
heart
|
||||
|
||||
Code:
|
||||
minetest.register_on_joinplayer player:set_formspec_prepend
|
||||
base.get_hotbar_bg
|
||||
|
||||
'textures', contains:
|
||||
Textures:
|
||||
bubble
|
||||
crack_anylength
|
||||
heart
|
||||
|
||||
|
||||
player_api mod changes:
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
player_api?
|
|
@ -1,26 +0,0 @@
|
|||
base = {}
|
||||
|
||||
|
||||
-- Formspec prepend
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player:set_formspec_prepend([[
|
||||
bgcolor[#080808BB;true]
|
||||
background[5,5;1,1;gui_formbg.png;true]
|
||||
background[5,5;1,1;gui_formbg.png;true;10]
|
||||
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]])
|
||||
end)
|
||||
|
||||
|
||||
-- Get hotbar background global function
|
||||
|
||||
-- Not currently used by this game, but is often used by node inventory
|
||||
-- formspecs such as chests, furnace, bones, bookshelves.
|
||||
|
||||
function base.get_hotbar_bg(x, y)
|
||||
local out = ""
|
||||
for i = 0, 7 do
|
||||
out = out .."image[" .. x + i .. "," .. y .. ";1,1;gui_hb_bg.png]"
|
||||
end
|
||||
return out
|
||||
end
|
|
@ -14,4 +14,4 @@ paramat (CC BY-SA 3.0):
|
|||
* creative_next_icon.png
|
||||
* creative_search_icon.png
|
||||
* creative_clear_icon.png
|
||||
* creative_trash_icon.png derived from a texture by kilbith (CC BY-SA 3.0)
|
||||
* creative_trash_icon.png
|
||||
|
|
|
@ -54,6 +54,9 @@ if creative_mode_cache then
|
|||
snappy = caps,
|
||||
choppy = caps,
|
||||
oddly_breakable_by_hand = caps,
|
||||
-- dig_immediate group doesn't use value 1. Value 3 is instant dig
|
||||
dig_immediate =
|
||||
{times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256},
|
||||
},
|
||||
damage_groups = {fleshy = 10},
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 1.5 KiB |
|
@ -1,5 +1,5 @@
|
|||
Minipeli mod: base
|
||||
==================
|
||||
Minipeli mod: gui
|
||||
=================
|
||||
See license.txt for license information.
|
||||
Derived by paramat from Minetest Game 'default' mod.
|
||||
|
||||
|
@ -10,4 +10,9 @@ Various Minetest developers and contributors (LGPL 2.1)
|
|||
|
||||
Authors of media
|
||||
----------------
|
||||
All textures by paramat (CC BY-SA 3.0).
|
||||
BlockMen (CC BY-SA 3.0):
|
||||
gui_formbg.png
|
||||
gui_hb_bg.png
|
||||
|
||||
paramat (CC BY-SA 3.0):
|
||||
gui_furnace_arrow_bg.png
|
|
@ -0,0 +1,9 @@
|
|||
-- Formspec prepend
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player:set_formspec_prepend([[
|
||||
bgcolor[#080808BB;true]
|
||||
background[5,5;1,1;gui_formbg.png;true]
|
||||
background[5,5;1,1;gui_formbg.png;true;10]
|
||||
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]])
|
||||
end)
|
|
@ -21,6 +21,7 @@ License of media
|
|||
----------------
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
Copyright (C) 2019 BlockMen
|
||||
Copyright (C) 2019 paramat
|
||||
|
||||
You are free to:
|
Before Width: | Height: | Size: 971 B After Width: | Height: | Size: 971 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 98 B After Width: | Height: | Size: 98 B |
|
@ -3,3 +3,26 @@ Minipeli mod: mapgen
|
|||
See license.txt for license information.
|
||||
Source code by paramat (MIT).
|
||||
All textures by paramat (CC BY-SA 3.0).
|
||||
|
||||
All sounds from Minetest Game:
|
||||
|
||||
Mito551 (sounds) (CC BY-SA 3.0):
|
||||
dig_cracky.ogg
|
||||
dig_crumbly.ogg
|
||||
place_node.1.ogg
|
||||
place_node.2.ogg
|
||||
place_node.3.ogg
|
||||
place_node_hard.1.ogg
|
||||
place_node_hard.2.ogg
|
||||
hard_footstep.1.ogg
|
||||
hard_footstep.2.ogg
|
||||
hard_footstep.3.ogg
|
||||
dirt_footstep.1.ogg
|
||||
dirt_footstep.2.ogg
|
||||
|
||||
AGFX (CC BY 3.0):
|
||||
https://www.freesound.org/people/AGFX/packs/1253/
|
||||
water_footstep.1.ogg
|
||||
water_footstep.2.ogg
|
||||
water_footstep.3.ogg
|
||||
(water_footstep.4.ogg is silent)
|
||||
|
|
|
@ -1,16 +1,70 @@
|
|||
-- Nodes
|
||||
-- Sound tables
|
||||
|
||||
local hard_sounds = {
|
||||
footstep = {name = "hard_footstep", gain = 0.3},
|
||||
dig = {name = "dig_cracky", gain = 0.5},
|
||||
dug = {name = "hard_footstep", gain = 1.0},
|
||||
place = {name = "place_node_hard", gain = 1.0},
|
||||
}
|
||||
|
||||
local hard_sounds_digimm = {
|
||||
footstep = {name = "hard_footstep", gain = 0.3},
|
||||
dig = {name = "dig_dig_immediate", gain = 0.5},
|
||||
dug = {name = "hard_footstep", gain = 1.0},
|
||||
place = {name = "place_node_hard", gain = 1.0},
|
||||
}
|
||||
|
||||
local soft_sounds = {
|
||||
footstep = {name = "dirt_footstep", gain = 0.4},
|
||||
dig = {name = "dig_crumbly", gain = 0.5},
|
||||
dug = {name = "dirt_footstep", gain = 1.0},
|
||||
place = {name = "place_node", gain = 1.0},
|
||||
}
|
||||
|
||||
local water_sounds = {
|
||||
footstep = {name = "water_footstep", gain = 0.2},
|
||||
}
|
||||
|
||||
|
||||
-- Terrain nodes
|
||||
|
||||
minetest.register_node("mapgen:stone", {
|
||||
description = "Stone",
|
||||
tiles = {"mapgen_stone.png"},
|
||||
groups = {cracky = 3},
|
||||
sounds = hard_sounds,
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:grass", {
|
||||
description = "Grass",
|
||||
tiles = {"mapgen_grass.png"},
|
||||
groups = {crumbly = 3},
|
||||
sounds = soft_sounds,
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:dirt", {
|
||||
description = "Dirt",
|
||||
tiles = {"mapgen_dirt.png"},
|
||||
groups = {crumbly = 3},
|
||||
sounds = soft_sounds,
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:sand", {
|
||||
description = "Sand",
|
||||
tiles = {"mapgen_sand.png"},
|
||||
groups = {crumbly = 3},
|
||||
sounds = soft_sounds,
|
||||
})
|
||||
|
||||
|
||||
-- Dungeon nodes
|
||||
|
||||
minetest.register_node("mapgen:stone_block", {
|
||||
description = "Stone Block",
|
||||
tiles = {"mapgen_stone_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {dig_immediate = 2},
|
||||
sounds = hard_sounds_digimm,
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:stone_block_stair", {
|
||||
|
@ -32,25 +86,9 @@ minetest.register_node("mapgen:stone_block_stair", {
|
|||
{-0.5, 0.0, 0.0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
sounds = hard_sounds_digimm,
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:grass", {
|
||||
description = "Grass",
|
||||
tiles = {"mapgen_grass.png"},
|
||||
groups = {crumbly = 3},
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:dirt", {
|
||||
description = "Dirt",
|
||||
tiles = {"mapgen_dirt.png"},
|
||||
groups = {crumbly = 3},
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:sand", {
|
||||
description = "Sand",
|
||||
tiles = {"mapgen_sand.png"},
|
||||
groups = {crumbly = 3},
|
||||
})
|
||||
|
||||
-- Water
|
||||
|
||||
|
@ -81,6 +119,7 @@ minetest.register_node("mapgen:water_source", {
|
|||
liquid_alternative_source = "mapgen:water_source",
|
||||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
||||
sounds = water_sounds,
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:water_flowing", {
|
||||
|
@ -113,8 +152,10 @@ minetest.register_node("mapgen:water_flowing", {
|
|||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
sounds = water_sounds,
|
||||
})
|
||||
|
||||
|
||||
-- River water
|
||||
|
||||
-- This is an alternative water node required by mapgens with sloping rivers.
|
||||
|
@ -150,6 +191,7 @@ minetest.register_node("mapgen:river_water_source", {
|
|||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
|
||||
sounds = water_sounds,
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:river_water_flowing", {
|
||||
|
@ -184,8 +226,10 @@ minetest.register_node("mapgen:river_water_flowing", {
|
|||
liquid_range = 2,
|
||||
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
sounds = water_sounds,
|
||||
})
|
||||
|
||||
|
||||
-- Lava
|
||||
|
||||
minetest.register_node("mapgen:lava_source", {
|
||||
|
@ -256,8 +300,6 @@ minetest.register_node("mapgen:lava_flowing", {
|
|||
|
||||
-- Aliases for map generators
|
||||
|
||||
-- Only 3 needed because cave liquids and dungeon nodes are defined in biomes
|
||||
|
||||
minetest.register_alias("mapgen_stone", "mapgen:stone")
|
||||
minetest.register_alias("mapgen_water_source", "mapgen:water_source")
|
||||
minetest.register_alias("mapgen_river_water_source", "mapgen:river_water_source")
|
||||
|
|
|
@ -24,11 +24,12 @@ For more details:
|
|||
https://opensource.org/licenses/MIT
|
||||
|
||||
|
||||
License of media (textures)
|
||||
---------------------------
|
||||
License of media
|
||||
----------------
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
Copyright (C) 2019 paramat
|
||||
Copyright (C) 2019 Mito551
|
||||
|
||||
You are free to:
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
Minipeli mod: textures
|
||||
======================
|
||||
See license.txt for license information.
|
||||
Derived by paramat from Minetest Game 'default' mod.
|
||||
|
||||
Authors of media
|
||||
----------------
|
||||
All textures by paramat (CC BY-SA 3.0).
|
|
@ -0,0 +1 @@
|
|||
-- Necessary empty file
|
|
@ -0,0 +1,37 @@
|
|||
License of media
|
||||
----------------
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
Copyright (C) 2019 paramat
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even
|
||||
commercially.
|
||||
|
||||
The licensor cannot revoke these freedoms as long as you follow the license
|
||||
terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license,
|
||||
and indicate if changes were made. You may do so in any reasonable manner, but
|
||||
not in any way that suggests the licensor endorses you or your use.
|
||||
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must
|
||||
distribute your contributions under the same license as the original.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological
|
||||
measures that legally restrict others from doing anything the license permits.
|
||||
|
||||
Notices:
|
||||
|
||||
You do not have to comply with the license for elements of the material in the
|
||||
public domain or where your use is permitted by an applicable exception or
|
||||
limitation.
|
||||
No warranties are given. The license may not give you all of the permissions
|
||||
necessary for your intended use. For example, other rights such as publicity,
|
||||
privacy, or moral rights may limit how you use the material.
|
||||
|
||||
For more details:
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 117 B |
After Width: | Height: | Size: 971 B |
After Width: | Height: | Size: 739 B |
After Width: | Height: | Size: 98 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 112 B |