Post your modding questions here
- RealGoldenHart
- Member
- Posts: 59
- Joined: Fri Dec 23, 2016 23:27
- GitHub: GoldenHart
- IRC: GoldenHart
- In-game: GoldenHart
- Location: Here, and not there.
Re: Post your modding questions here
Alright thanks guys. I will try a different mod. Thanks for teaching me. I thought if you could move a vehicle around in a vehicles mod, that maybe you could move an air transport or something up. Ttyl
K. I'm bored with signatures.
- orwell
- Member
- Posts: 958
- Joined: Wed Jun 24, 2015 18:45
- GitHub: orwell96
- IRC: orwell96_mt
- In-game: orwell
- Location: Raxacoricofallapatorius
Re: Post your modding questions here
I, personally, have no idea of mapgen stuff of any kind.RealGoldenHart wrote: 3. How would I go about generating a realm in the sky? For example, rather than in caverealms where the realms are spawned underground, is it possible to do that in the sky?
Now...I realize this makes the mod impossible for servers to add, because they would have to make a new world for this addition. Is there any alternative that achieves the same goal?
- Mapgen v7 has floatlands. they are disabled but can be enabled
- Terrain gets generated in 3d cubes of 80 nodes in diameter, not in 2d chunks like in Minecraft. So, if no one ever flew up to the heights you want the sky realm to be generated, an existing world is no problem, because the sky terrain has not yet been generated.
Re: Post your modding questions here
What is the best way to put the names of all files (folders) which are in one folder into a table?
(I want to get a table which contains the name of all existing texture packs (path = /.minetest/textures ))
(I want to get a table which contains the name of all existing texture packs (path = /.minetest/textures ))
Can your read this?
Re: Post your modding questions here
How can I debug lua code? I need to run a code step by step to check variables, but I don't know how. I tried to use player controls (key input), but that doesn't work, however
Code: Select all
local function stepkey()
local player = minetest.get_player_by_name("singleplayer")
repeat
until player:get_player_control().aux1
repeat
until not player:get_player_control().aux1
end
Re: Post your modding questions here
You can write print("variable") in every line.
Can your read this?
- orwell
- Member
- Posts: 958
- Joined: Wed Jun 24, 2015 18:45
- GitHub: orwell96
- IRC: orwell96_mt
- In-game: orwell
- Location: Raxacoricofallapatorius
Re: Post your modding questions here
Can't you use print() instructions to print values after each step?
Minetest is not multithreaded, whenever a event function blocks (such as running an infinite loop) the server can't do anything else, it can't even update the player control status. So you may not wait inside callback functions using loops.
You might achieve something like you want using coroutines, but these are broken inside the callbacks for some reason
Minetest is not multithreaded, whenever a event function blocks (such as running an infinite loop) the server can't do anything else, it can't even update the player control status. So you may not wait inside callback functions using loops.
You might achieve something like you want using coroutines, but these are broken inside the callbacks for some reason
Re: Post your modding questions here
That's too fast and too much. I need to stop the code to analyse the datacx384 wrote:You can write print("variable") in every line.
- orwell
- Member
- Posts: 958
- Joined: Wed Jun 24, 2015 18:45
- GitHub: orwell96
- IRC: orwell96_mt
- In-game: orwell
- Location: Raxacoricofallapatorius
Re: Post your modding questions here
maybe print just everything...
print(dump(table_of_all_relevant_data))
There is no other way
print(dump(table_of_all_relevant_data))
There is no other way
Re: Post your modding questions here
As I said, too fast and too much for console output. I write to a file noworwell wrote:maybe print just everything...
print(dump(table_of_all_relevant_data))
There is no other way
- orwell
- Member
- Posts: 958
- Joined: Wed Jun 24, 2015 18:45
- GitHub: orwell96
- IRC: orwell96_mt
- In-game: orwell
- Location: Raxacoricofallapatorius
Re: Post your modding questions here
Maybe (but only maybe) this is useful for you. It's a simple ring buffer. I used it to debug a problem in my advtrains mod, because I couldn't reproduce the bug but only detect when it was happening, so I needed to let some trains run and let them trigger the dump when some component recognized that something was wrong
Code: Select all
local ringbuflen=200
local ringbufs={}
local ringbufcnt={}
function advtrains.drb_record(tid, msg)
if not ringbufs[tid] then
ringbufs[tid]={}
ringbufcnt[tid]=0
end
ringbufs[tid][ringbufcnt[tid]]=msg
ringbufcnt[tid]=ringbufcnt[tid]+1
if ringbufcnt[tid] > ringbuflen then
ringbufcnt[tid]=0
end
end
function advtrains.drb_dump_and_exit(pts, tid)
print("Train "..tid.." dumping ringbuffer at pos:", pts)
local stopcnt=ringbufcnt[tid]
repeat
minetest.log("action", ringbufcnt[tid]..ringbufs[tid][ringbufcnt[tid]])
ringbufcnt[tid]=ringbufcnt[tid]+1
if ringbufcnt[tid] > ringbuflen then
ringbufcnt[tid]=0
end
until ringbufcnt[tid]==stopcnt
minetest.log("action", dump(advtrains.trains[tid]))
error("Successfully dumped stuff")
end
Re: Post your modding questions here
Well, I changed my pathfinder from voxelmanip to get_node. I just can say that get_node is extremely fast. Only for reading some nodes voxelmanip is much to slow since it always loads a whole mapblocksofar wrote:yes and no. It can sometimes mean only doing a single lua-to-C call, which is likely cheaper than two get_node() calls. But if it's not performance critical, you shouldn't worry too much.burli wrote:Is voxelmanip always faster than get_node? I noticed that the hopper mod uses voxelmanip just to get two neighbour nodes.
Is this really better?
Edit: I measured a time of 7ms for the whole pathfinder run which includes around 3000 get_node calls
- Tmanyo
- Member
- Posts: 196
- Joined: Mon Sep 29, 2014 01:20
- GitHub: Tmanyo
- IRC: Tmanyo
- In-game: tmanyo
- Location: United States
- Contact:
Re: Post your modding questions here
I am wondering if it is possible to take a table with player names as keys such as this one:
Then formatting each key into a string such as:
Or something like that.
I guess the real question is, What if you don't know the key, how do you index the value and description? Once I have gotten past that roadblock, how do I list these strings one after another in a formspec? I don't want the same person's results to come up every time. I want "tmanyo - value description" \n "cow - value description" \n ect...
Code: Select all
{["description"] = {["tmanyo"] = "Really bad", ["cow"] = "Really great server!", ["singleplayer"] = "This server is really bad!"}, ["value"] = {["tmanyo"] = 2.1, ["cow"] = 5, ["singleplayer"] = 2}}
Code: Select all
"Rating: " .. value[key] .. "\n\"" .. description[key] .. "\""
I guess the real question is, What if you don't know the key, how do you index the value and description? Once I have gotten past that roadblock, how do I list these strings one after another in a formspec? I don't want the same person's results to come up every time. I want "tmanyo - value description" \n "cow - value description" \n ect...
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
Re: Post your modding questions here
Tmanyo wrote:I am wondering if it is possible to take a table with player names as keys
If I'm properly understand question so answer is http://dev.minetest.net/minetest.serialize
Look into my mod for ptTbl(a,tNm) function. (If I'm properly understand question)Tmanyo wrote: What if you don't know the key, how do you index the value and description?
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
- Tmanyo
- Member
- Posts: 196
- Joined: Mon Sep 29, 2014 01:20
- GitHub: Tmanyo
- IRC: Tmanyo
- In-game: tmanyo
- Location: United States
- Contact:
Re: Post your modding questions here
Thank you for trying, but I know how to use minetest.serialize. The main question is, How does one "iterate" through a table and get all the information to be able to place into individual strings that can then be listed in a form?Nyarg wrote:Tmanyo wrote:I am wondering if it is possible to take a table with player names as keys
If I'm properly understand question so answer is http://dev.minetest.net/minetest.serialize
Look into my mod for ptTbl(a,tNm) function. (If I'm properly understand question)Tmanyo wrote: What if you don't know the key, how do you index the value and description?
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
Re: Post your modding questions here
From the Lua Manual:Tmanyo wrote:The main question is, How does one "iterate" through a table and get all the information to be able to place into individual strings that can then be listed in a form?
Is that what you want?pairs (t)
Returns three values: the next function, the table t, and nil, so that the construction
for k,v in pairs(t) do body end
will iterate over all key–value pairs of table t.
See function next for the caveats of modifying the table during its traversal.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
- Tmanyo
- Member
- Posts: 196
- Joined: Mon Sep 29, 2014 01:20
- GitHub: Tmanyo
- IRC: Tmanyo
- In-game: tmanyo
- Location: United States
- Contact:
Re: Post your modding questions here
Somewhat, I will keep trying new things to see different results. Thank you.kaeza wrote:From the Lua Manual:Tmanyo wrote:The main question is, How does one "iterate" through a table and get all the information to be able to place into individual strings that can then be listed in a form?Is that what you want?pairs (t)
Returns three values: the next function, the table t, and nil, so that the construction
for k,v in pairs(t) do body end
will iterate over all key–value pairs of table t.
See function next for the caveats of modifying the table during its traversal.
Edit--
I was able to figure out a solution! Thank you to everyone who helped. :)
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Post your modding questions here
I am so horrible with Lua : (
So, for a while now I have been trying to add the smoke particles from Homedecor's fake fire mod to default torches.
I gave up after a few tries back about a couple months ago.
I decided to try again the other day and still just have not been able to learn/understand Lua enough to achieve this goal.
Could someone look at how I attempted it this time and tell me where I am going wrong?
I'm sorry to keep bugging people, but it is embarrassing for me because I just don't seem to be able to grasp coding at all, and does not help that I have some issues which are making it near impossible for me to try to learn anything new these days
My plan was to at least get the function working first, and then get to redoing the smoke texture to fit for torches. Then apply it to the other torch varients (i.e. wall mount, floor, ceiling etc)
I already added the smoke texture to default textures folder, and the sounds as well to the sounds folder.
But I just have no idea where or how to add the code I copy/pasted, and just edited "chimney" with "torch" : /
I commented out the on_destruct code as it kept throwing errors for me
<edit> I did just realise I commented out at the "end" of the function and edited that to just before on_destruct now. sorry about that mistake. It still throws an error though, because my code is botched.
Here is my circus code :P
So, for a while now I have been trying to add the smoke particles from Homedecor's fake fire mod to default torches.
I gave up after a few tries back about a couple months ago.
I decided to try again the other day and still just have not been able to learn/understand Lua enough to achieve this goal.
Could someone look at how I attempted it this time and tell me where I am going wrong?
I'm sorry to keep bugging people, but it is embarrassing for me because I just don't seem to be able to grasp coding at all, and does not help that I have some issues which are making it near impossible for me to try to learn anything new these days
My plan was to at least get the function working first, and then get to redoing the smoke texture to fit for torches. Then apply it to the other torch varients (i.e. wall mount, floor, ceiling etc)
I already added the smoke texture to default textures folder, and the sounds as well to the sounds folder.
But I just have no idea where or how to add the code I copy/pasted, and just edited "chimney" with "torch" : /
I commented out the on_destruct code as it kept throwing errors for me
<edit> I did just realise I commented out at the "end" of the function and edited that to just before on_destruct now. sorry about that mistake. It still throws an error though, because my code is botched.
Here is my circus code :P
Code: Select all
local function start_smoke(pos, node, clicker, torch)
local this_spawner_meta = minetest.get_meta(pos)
local id = this_spawner_meta:get_int("smoky")
local s_handle = this_spawner_meta:get_int("sound")
local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
if id ~= 0 then
if s_handle then
minetest.after(0, function(handle)
minetest.sound_stop(handle)
end, s_handle)
end
minetest.delete_particlespawner(id)
this_spawner_meta:set_int("smoky", nil)
this_spawner_meta:set_int("sound", nil)
return
end
if above == "air" and (not id or id == 0) then
id = minetest.add_particlespawner({
amount = 4, time = 0, collisiondetection = true,
minpos = {x=pos.x-0.25, y=pos.y+0.4, z=pos.z-0.25},
maxpos = {x=pos.x+0.25, y=pos.y+5, z=pos.z+0.25},
minvel = {x=-0.2, y=0.3, z=-0.2}, maxvel = {x=0.2, y=1, z=0.2},
minacc = {x=0,y=0,z=0}, maxacc = {x=0,y=0.5,z=0},
minexptime = 1, maxexptime = 3,
minsize = 4, maxsize = 8,
texture = "smoke_particle.png",
})
if chimney == 1 then
this_spawner_meta:set_int("smoky", id)
this_spawner_meta:set_int("sound", nil)
else
s_handle = minetest.sound_play("fire_small", {
pos = pos,
max_hear_distance = 5,
loop = true
})
this_spawner_meta:set_int("smoky", id)
this_spawner_meta:set_int("sound", s_handle)
end
end
end
local function stop_smoke(pos)
local this_spawner_meta = minetest.get_meta(pos)
local id = this_spawner_meta:get_int("smoky")
local s_handle = this_spawner_meta:get_int("sound")
if id ~= 0 then
minetest.delete_particlespawner(id)
end
if s_handle then
minetest.after(0, function(handle)
minetest.sound_stop(handle)
end, s_handle)
end
this_spawner_meta:set_int("smoky", nil)
this_spawner_meta:set_int("sound", nil)
end
minetest.register_node("default:torch", {
description = "Torch",
drawtype = "mesh",
mesh = "torch_floor.obj",
inventory_image = "default_torch_on_floor.png",
wield_image = "default_torch_on_floor.png",
tiles = {{
name = "default_torch_on_floor_animated.png",
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
}},
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
liquids_pointable = false,
light_source = 13,
groups = {choppy=2, dig_immediate=3, flammable=1, attached_node=1, torch=1},
drop = "default:torch",
selection_box = {
type = "wallmounted",
wall_bottom = {-1/8, -1/2, -1/8, 1/8, 2/16, 1/8},
},
sounds = default.node_sound_wood_defaults(),
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local torch = 1
start_smoke(pos, node, clicker, torch)
return itemstack
--[[end,
on_destruct = function (pos)
stop_smoke(pos)]]--
end
on_place = function(itemstack, placer, pointed_thing)
local under = pointed_thing.under
local node = minetest.get_node(under)
local def = minetest.registered_nodes[node.name]
if def and def.on_rightclick and
((not placer) or (placer and not placer:get_player_control().sneak)) then
return def.on_rightclick(under, node, placer, itemstack,
pointed_thing) or itemstack
end
A Wonderful World
Re: Post your modding questions here
I replace for exampleTumeniNodes wrote:I commented out the on_destruct code as it kept throwing errors for me
Code: Select all
minetest.register_node("default:torch
...
with your code then edit part
Code: Select all
minetest.register_node("default:torch", {
description = "Torch",
--- drawtype = "mesh",
drawtype = "torchlike",
--- mesh = "torch_floor.obj",
inventory_image = "default_torch_on_floor.png",
wield_image = "default_torch_on_floor.png",
tiles = {{
name = "default_torch_on_floor_animated.png",
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
}},
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
liquids_pointable = false,
light_source = 13,
groups = {choppy=2, dig_immediate=3, flammable=1, attached_node=1, torch=1},
drop = "default:torch",
selection_box = {
type = "wallmounted",
wall_bottom = {-1/8, -1/2, -1/8, 1/8, 2/16, 1/8},
},
sounds = default.node_sound_wood_defaults(),
on_destruct = function (pos)
stop_smoke(pos)
end ,
on_place = function(itemstack, placer, pointed_thing)
local under = pointed_thing.under
local node = minetest.get_node(under)
local def = minetest.registered_nodes[node.name]
local torch = 1
start_smoke(pointed_thing.above, node, clicker, torch)
start_smoke(under, node, clicker, torch)
local stack = ItemStack("default:torch")
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("default:torch " ..
itemstack:get_count() - (1 - ret:get_count()))
end
})
Code: Select all
local function stop_smoke(pos)
local this_spawner_meta = minetest.get_meta(pos)
local id = this_spawner_meta:get_int("smoky")
local s_handle = this_spawner_meta:get_int("sound")
print("======DESTRUCT id + pos "..id, minetest.serialize(pos))
...
Why ?
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Post your modding questions here
The code I edited is from 0.4.15 (stable) torch.lua, not sure if that is causing that issue.
But, tried your edit and no luck, no results. Thank you though.
You say the effect is working for you though, editing this into 0.4.14? Well that's pretty cool : )
That is step #1 forward I guess :D
But, tried your edit and no luck, no results. Thank you though.
You say the effect is working for you though, editing this into 0.4.14? Well that's pretty cool : )
That is step #1 forward I guess :D
A Wonderful World
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Post your modding questions here
Nyarg,
I have to apologize.
Your edit does, in fact work. I'm a goof, and had the torches mod enabled, which overrode the code :P
So, I will need to implement this function for that mod as well, to add it to that.
Thank you.
Now I will start tweaking the smoke texture and the particle's size and positions, so they look better with torches.
And to find a better suited sound file for them. : )
I have to apologize.
Your edit does, in fact work. I'm a goof, and had the torches mod enabled, which overrode the code :P
So, I will need to implement this function for that mod as well, to add it to that.
Thank you.
Now I will start tweaking the smoke texture and the particle's size and positions, so they look better with torches.
And to find a better suited sound file for them. : )
A Wonderful World
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Post your modding questions here
Is there someplace I can add inventory and wield images for various materials in this code?
the self-generated images look horrible.
the self-generated images look horrible.
Code: Select all
function angledglass.register_glass(subname, recipeitem, groups, images, description, sounds)
groups.glass = 1
minetest.register_node(":angledglass:glass" .. subname, {
description = description,
drawtype = "mesh",
mesh = "angled_glass.obj",
tiles = images,
use_texture_alpha = true,
paramtype = "light",
sunlight_propogates = true,
paramtype2 = "facedir",
is_ground_content = false,
groups = groups,
sounds = sounds,
collision_box = {
type = "fixed",
fixed = {
{0.375, -0.5, 0.375, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.5, -0.375, 0.5, -0.375},
{-0.4375, -0.5, -0.4375, -0.3125, 0.5, -0.3125},
{0.3125, -0.5, 0.3125, 0.4375, 0.5, 0.4375},
{0.25, -0.5, 0.25, 0.375, 0.5, 0.375},
{-0.375, -0.5, -0.375, -0.25, 0.5, -0.25},
{0.1875, -0.5, 0.1875, 0.3125, 0.5, 0.3125},
{-0.3125, -0.5, -0.3125, -0.1875, 0.5, -0.1875},
{0.125, -0.5, 0.125, 0.25, 0.5, 0.25},
{-0.25, -0.5, -0.25, -0.125, 0.5, -0.125},
{0.0625, -0.5, 0.0625, 0.1875, 0.5, 0.1875},
{-0.1875, -0.5, -0.1875, -0.0625, 0.5, -0.0625},
{0, -0.5, 0, 0.125, 0.5, 0.125},
{-0.125, -0.5, -0.125, 0, 0.5, 0},
{-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625},
}
},
on_place = angledglass.angled_place
})
end
-- Register glass types
angledglass.register_glass("_acacia_wood_glass", "default:acacia_wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
{"default_glass.png", "default_acacia_wood.png"},
"Acacia Wood Glass",
default.node_sound_glass_defaults())
angledglass.register_glass("_acacia_wood_obsidian_glass", "default:acacia_wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
{"default_obsidian_glass.png", "default_acacia_wood.png"},
"Acacia Wood Obsidian Glass",
default.node_sound_glass_defaults())
A Wonderful World
Re: Post your modding questions here
You can add:TumeniNodes wrote:Is there someplace I can add inventory and wield images for various materials in this code?
the self-generated images look horrible.
Code: Select all
function angledglass.register_glass(subname, recipeitem, groups, images, description, sounds) groups.glass = 1 minetest.register_node(":angledglass:glass" .. subname, { description = description, drawtype = "mesh", mesh = "angled_glass.obj", tiles = images, use_texture_alpha = true, paramtype = "light", sunlight_propogates = true, paramtype2 = "facedir", is_ground_content = false, groups = groups, sounds = sounds, collision_box = { type = "fixed", fixed = { {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, {-0.4375, -0.5, -0.4375, -0.3125, 0.5, -0.3125}, {0.3125, -0.5, 0.3125, 0.4375, 0.5, 0.4375}, {0.25, -0.5, 0.25, 0.375, 0.5, 0.375}, {-0.375, -0.5, -0.375, -0.25, 0.5, -0.25}, {0.1875, -0.5, 0.1875, 0.3125, 0.5, 0.3125}, {-0.3125, -0.5, -0.3125, -0.1875, 0.5, -0.1875}, {0.125, -0.5, 0.125, 0.25, 0.5, 0.25}, {-0.25, -0.5, -0.25, -0.125, 0.5, -0.125}, {0.0625, -0.5, 0.0625, 0.1875, 0.5, 0.1875}, {-0.1875, -0.5, -0.1875, -0.0625, 0.5, -0.0625}, {0, -0.5, 0, 0.125, 0.5, 0.125}, {-0.125, -0.5, -0.125, 0, 0.5, 0}, {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.0625}, } }, on_place = angledglass.angled_place }) end -- Register glass types angledglass.register_glass("_acacia_wood_glass", "default:acacia_wood", {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, {"default_glass.png", "default_acacia_wood.png"}, "Acacia Wood Glass", default.node_sound_glass_defaults()) angledglass.register_glass("_acacia_wood_obsidian_glass", "default:acacia_wood", {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, {"default_obsidian_glass.png", "default_acacia_wood.png"}, "Acacia Wood Obsidian Glass", default.node_sound_glass_defaults())
Code: Select all
wield_image = "myimage.png",
Can your read this?
- TumeniNodes
- Member
- Posts: 2943
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Post your modding questions here
Thanks cx,
I know of those but, just not where I can place it in this code so it will work
Nothing I have tried has worked.
I have tried using wield_image and inventory_image in both the node registration, and type registration codes.
The problem is, I have used them before but don;t know how when using the subname structure in code
I know of those but, just not where I can place it in this code so it will work
Nothing I have tried has worked.
I have tried using wield_image and inventory_image in both the node registration, and type registration codes.
The problem is, I have used them before but don;t know how when using the subname structure in code
A Wonderful World
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: Post your modding questions here
I edited the texture for the nyancat sword (nyancatsplus mod) in windows Paint and in the game there's white in the place of the transparent background I was aiming for. I've been able to get transparent backrounds with paint before (Making a skin for MineBlocks). Any suggestions?
Re: Post your modding questions here
Use gimp!Lone_Wolf wrote:I edited the texture for the nyancat sword (nyancatsplus mod) in windows Paint and in the game there's white in the place of the transparent background I was aiming for. I've been able to get transparent backrounds with paint before (Making a skin for MineBlocks). Any suggestions?
https://www.gimp.org/
Can your read this?
Who is online
Users browsing this forum: No registered users and 8 guests