Gambit wrote:How do I make grass cover more ground? The grass I'm talking about is the one that grows, not the grass_on_dirt kind. It's just the fields feel too flat and grass really helps make it look better but there is so little of them that spawns.
-- Determine grass amount from perlin noise
local grass_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 3 * 9)"
thefamilygrog66 wrote:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
-- Determine grass amount from perlin noise
local grass_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 3 * 9)"
I'm not sure what to change exactly, but that's where you'd change it!
philipbenr wrote:does anyone know how to make a crafting table, but with different properties? I want to make an anvil to forge armor and crossbows in castles+
EDIT: When you place a chest-like item, can you make it so it already contains a set of steel tools.
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec",default.chest_formspec)
meta:set_string("infotext", "Chest")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
end,
fairiestoy wrote:philipbenr wrote:does anyone know how to make a crafting table, but with different properties? I want to make an anvil to forge armor and crossbows in castles+
EDIT: When you place a chest-like item, can you make it so it already contains a set of steel tools.
Do you mean something like mentioned here:
The RealTest Game
( you have to scroll nearly to the end of the first post ). Maybe a look into the source of this could help you.
Edit:
To your second question. If you take the code from the default chest:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec",default.chest_formspec)
meta:set_string("infotext", "Chest")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
end,
And insert something like inv:add_item( 'main', ItemStack ) (where ItemStack is your defined Itemstack respectively), it should work i think (untested)
19:46:34: ERROR[main]: ...opy\bin\..\games\minetest_game\mods\castle/town_item.lua:46: '=' expected near '::'
19:46:34: ERROR[main]: stack traceback:
19:46:34: ERROR[main]: [C]: in function 'dofile'
19:46:34: ERROR[main]: ...7 - Copy\bin\..\games\minetest_game\mods\castle\init.lua:6: in main chunk
minetest.register_node("castle:workbench",{
description = "Workbench",
tiles = {"castle_workbench_top.png", "default_wood.png", "castle_workbench_1.png", "castle_workbench_1.png", "castle_workbench_2.png", "castle_workbench_2.png"},
paramtype2 = "facedir",
paramtype = "light",
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2},
drawtype = "normal",
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec",
"size[8,9]"..
"list[current_name;main;0,1;8,4;]"..
"list[current_player;main;0,5;8,4;]")
meta:set_string("infotext", "Workbench")
local inv = meta:get_inventory()
inv:set_size("main", 8*3)
inv::add_item( 'main', "default:steel_pickaxe" )
inv::add_item( 'main', "default:steel_axe" )
inv::add_item( 'main', "default:steel_shovel" )
inv::add_item( 'main', "default:steel_sword" )
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
return inv:is_empty("main")
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", player:get_player_name()..
" moves stuff in workbench at "..minetest.pos_to_string(pos))
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" moves stuff to workbench at "..minetest.pos_to_string(pos))
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name()..
" takes stuff from workbench at "..minetest.pos_to_string(pos))
end,
})
local function has_locked_chest_privilege(meta, player)
if player:get_player_name() ~= meta:get_string("owner") then
return false
end
return true
end
inv::add_item( 'main', "default:steel_sword" )
19:46:34: ERROR[main]: ...opy\bin\..\games\minetest_game\mods\castle/town_item.lua:46: '=' expected near '::'
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec",
"size[8,9]"..
"list[current_name;main;0,0;8,4;]"..
"list[current_player;main;0,5;8,4;]")
meta:set_string("infotext", "Chest")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
local IStack = ItemStack( 'default:pick_steel 1' )
inv:add_item( 'main', IStack )
end,
It's either Blender or GTFO. There is no other option with entity mesh creation.super_tnt wrote:What's a good programme for making animated entities? I looked at blender but it looks way too advanced, considering I only want to create basic objects (Made out of rectangles and lines) and also I have a limited knowledge of creating 3d objects.
super_tnt wrote:What's a good programme for making animated entities? I looked at blender but it looks way too advanced, considering I only want to create basic objects (Made out of rectangles and lines) and also I have a limited knowledge of creating 3d objects.
Element wrote:i have a mod called worldedit and when i try to make a hollow sphere, it shuts down my server...i put "//hollowsphere 5 dirt" (minus the quotes)...am i doing anything wrong
//pos1
//hollowsphere 5 default:dirt
if fields.exit_button then
--ongoing code
end
Wuzzy wrote:Thanks this answers my question. :-)
Now for the next question:
There are methods for InvRef but I don’t get my head around the documentation. There is always this parameter called “listname” and the fact that it is written in double quotes in the wiki suggests that this must be a string.
Where does this strange “listname” come from? What name of which list? I have no idea what to put there. This is true for all InvRef methods.
PilzAdam wrote:The default player has 3 lists:
"main": this is the main inventory, where the first 8 slots are displayed in the hotbar; the size is 8×4
"craft": the 3×3 crafting grid
"craftresult": the single slot for the craft result; has a special handling by the engine.
I'm not sure, but I could probably make one pretty easily. How far down should it be?Element wrote:is there a bed rock mod
Evergreen wrote:I'm not sure, but I could probably make one pretty easily. How far down should it be?Element wrote:is there a bed rock mod
Casimir wrote:In the commits I read that it is possible to play a soundfile in the main menu. Is this possible per gamemode? Does it loop?
Element wrote:i somehow lost the mod called item_drop...does anyone know where it is
Users browsing this forum: No registered users and 9 guests