[mod] Stripped tree trunks [stripped_tree]
[mod] Stripped tree trunks [stripped_tree]
Hi, this is my first mod. it allows to remove tree bark. (Now it work with axe)
How to use: Just right clic with an axe at tree trunk.(Default axes only. but you can easily add support for other mods.)
In survival you can get tree bark that you can use as fuel.
License
Code
by minefaco GPLv3.0 (License for code and media)
contributed to by wsor4035
Depends: Default.
Optional depends: moretrees
Download zip: https://github.com/minefaco/chisel_tree ... e/main.zip
Github: https://github.com/minefaco/chisel_tree
How to use: Just right clic with an axe at tree trunk.(Default axes only. but you can easily add support for other mods.)
In survival you can get tree bark that you can use as fuel.
License
Code
by minefaco GPLv3.0 (License for code and media)
contributed to by wsor4035
Depends: Default.
Optional depends: moretrees
Download zip: https://github.com/minefaco/chisel_tree ... e/main.zip
Github: https://github.com/minefaco/chisel_tree
Last edited by 1faco on Wed Dec 23, 2020 17:12, edited 7 times in total.
Re: [mod] Chisel for tree trunks [chisel_tree]
Really like the textures.
Re: [mod] Chisel for tree trunks [chisel_tree]
looks very nice
are the textures GPL-3.0 as well?
are the textures GPL-3.0 as well?
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o
Re: [mod] Chisel for tree trunks [chisel_tree]
Edit: Now it is.
Last edited by 1faco on Sat Nov 07, 2020 23:28, edited 1 time in total.
Re: [mod] Chisel for tree trunks [chisel_tree]
I forked the repo and added a few features you may be interested in, submitted a PR request
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [mod] Chisel for tree trunks [chisel_tree]
Nice! Perhaps you could also carve things in trees, i.e. a heart or just a landmark? And the bark might be useful for some things as well, though probably not without further changes in the game (bowls, ships, first house..).
A list of my mods can be found here.
Re: [mod] Chisel for tree trunks [chisel_tree]
I was thinking of getting paper from bark, you can craft bowls if you have the farming_redo, carving sounds exciting, maybe I'll add it
Re: [mod] Stripped tree trunks [stripped_tree]
I play with HDX textures. This won't do for me or people with texture packs other than default.I guess it would be possible to generate textures at run time, but that would be much work.
Re: [mod] Stripped tree trunks [stripped_tree]
Or maybe you can do a hd textures and add it to your hdx textures, so it will be applied at runtime.
Re: [mod] Stripped tree trunks [stripped_tree]
Cool idea. A few things:
1. Can't do anything with the stripped logs. You need to add the recipe for planks. Easiest way I saw while retaining your base code was:
2. One of the students decided that tree bark would be a great source of farming:string. It's hard to justify filling an inventory slot for just an additional 15 seconds of burn time.
3. If you still have the original chisel code and art, might want to option that. We already have right-click assigned to something else. It would solve a lot of issues to just craft the bark from the trunks, similar to how TenPlus1's Farming Redo does pineapple tops.
4. Why did you choose to add it to default instead of chisel_tree? Makes it more difficult for players to figure out what was added.
5. Need to make it a function call (API) so other mod's trees can be supported.
1. Can't do anything with the stripped logs. You need to add the recipe for planks. Easiest way I saw while retaining your base code was:
Code: Select all
...
local trunk_names = {
"tree", "jungletree", "aspen_tree", "acacia_tree", "pine_tree",
}
local plank_names = {"wood","junglewood","aspen_wood","acacia_wood","pine_wood"}
local i, name
for i=1, #trunk_names do
name=trunk_names[i]
minetest.register_node(":default:stripped_" .. name, {
description = "Stripped "..trunk_names[i],
tiles = {
"stripped_"..name.."_top.png",
"stripped_"..name.."_top.png",
"stripped_"..name..".png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, not_in_creative_inventory = 1},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
minetest.register_craft({
output = "default:"..plank_names[i].." 4",
recipe = {
{"default:stripped_" ..name},
}
})
end
...
3. If you still have the original chisel code and art, might want to option that. We already have right-click assigned to something else. It would solve a lot of issues to just craft the bark from the trunks, similar to how TenPlus1's Farming Redo does pineapple tops.
4. Why did you choose to add it to default instead of chisel_tree? Makes it more difficult for players to figure out what was added.
5. Need to make it a function call (API) so other mod's trees can be supported.
Re: [mod] Stripped tree trunks [stripped_tree]
@ThorinnS what do you have right click assigned to? i.e. what mod?
also can submit a PR to add support for other mods, probably better as it can avoid circular dependencies if support for that mod is added in the future
also can submit a PR to add support for other mods, probably better as it can avoid circular dependencies if support for that mod is added in the future
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o
Re: [mod] Stripped tree trunks [stripped_tree]
Place torch, assuming there's one in inventory. It's a work in progress one of the students is working on, so there's no code uploaded anywhere yet.
Re: API, I was just suggesting that it be handled like stairs and farming redo and most of the other popular mods do -- the person who creates the new node just calls the function and doesn't require PRs or anything else. Alternatively, it also makes it possible for individual users to make tweak mods for their particular server.
I'll see if I can talk one of the kids into making the textures for [cool_trees] and maybe [moretrees]. I think [add_trees] just uses default nodes, but I can check.
Re: API, I was just suggesting that it be handled like stairs and farming redo and most of the other popular mods do -- the person who creates the new node just calls the function and doesn't require PRs or anything else. Alternatively, it also makes it possible for individual users to make tweak mods for their particular server.
I'll see if I can talk one of the kids into making the textures for [cool_trees] and maybe [moretrees]. I think [add_trees] just uses default nodes, but I can check.
Re: [mod] Stripped tree trunks [stripped_tree]
Interesting... probably in the next update, now i'm working and i don't have too many free time. you can make a PR.ThorfinnS wrote: ↑Sat Dec 05, 2020 10:51Cool idea. A few things:
1. Can't do anything with the stripped logs. You need to add the recipe for planks. Easiest way I saw while retaining your base code was:Code: Select all
... local trunk_names = { "tree", "jungletree", "aspen_tree", "acacia_tree", "pine_tree", } local plank_names = {"wood","junglewood","aspen_wood","acacia_wood","pine_wood"} local i, name for i=1, #trunk_names do name=trunk_names[i] minetest.register_node(":default:stripped_" .. name, { description = "Stripped "..trunk_names[i], tiles = { "stripped_"..name.."_top.png", "stripped_"..name.."_top.png", "stripped_"..name..".png" }, groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, not_in_creative_inventory = 1}, sounds = default.node_sound_wood_defaults(), paramtype2 = "facedir", on_place = minetest.rotate_node, }) minetest.register_craft({ output = "default:"..plank_names[i].." 4", recipe = { {"default:stripped_" ..name}, } }) end ...
That's a nice idea, maybe 8 tree barks and 1 water bucket for paper and just 6 tree barks for 3 strings. :D.
i was thinking about that, i mean that i can make optional the use of axes or a chisel. althought the code just rewrite the axes, it don't affects other tools, and if you don't have an axe in hands the right clic is free to use for any mod.ThorfinnS wrote: ↑Sat Dec 05, 2020 10:513. If you still have the original chisel code and art, might want to option that. We already have right-click assigned to something else. It would solve a lot of issues to just craft the bark from the trunks, similar to how TenPlus1's Farming Redo does pineapple tops.
to allow add any trees mod easily. you don't need to make functions to register each node, just create your stripped tree.
You only need to register your stripped trees with this format:
Code: Select all
...
minetest.register_node("mod_name:stripped_trunkname", {
description = "Stripped trunk name.",
tiles = {
"stripped_mod_name_trunkname_top.png",
"stripped_mod_name_trunkname_top.png"
"stripped_mod_name_trunkname.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, not_in_creative_inventory = 1},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
trunkname = your trunk.
Is so easy. In the stripped_trees/textures folder you can find a base.png and base_top.png that you can use to make your own stripped textures, you only need to colorize.
If you want add support directly in the stripped_trees mod folder you can see the moretrees.lua, ethereal.lua and just need to replace the mod name and add the textures to the stripped_tree/textures folder. save the file as mod_name.lua and add it to init.lua. but i think is more easy only create the stripped trees in your mod. you don't need to make functions or calls for the stripped tree, this mod adds automaticly any node with the <stripped_> format, so... maybe you would add a
Code: Select all
if minetest.get_modpath("stripped_tree") then
--register your stripped tree trunks.
End
Last edited by 1faco on Mon Dec 07, 2020 00:19, edited 1 time in total.
Re: [mod] Stripped tree trunks [stripped_tree]
moretrees is already supported. update from contentDB please.ThorfinnS wrote: ↑Sun Dec 06, 2020 16:38Place torch, assuming there's one in inventory. It's a work in progress one of the students is working on, so there's no code uploaded anywhere yet.
Re: API, I was just suggesting that it be handled like stairs and farming redo and most of the other popular mods do -- the person who creates the new node just calls the function and doesn't require PRs or anything else. Alternatively, it also makes it possible for individual users to make tweak mods for their particular server.
I'll see if I can talk one of the kids into making the textures for [cool_trees] and maybe [moretrees]. I think [add_trees] just uses default nodes, but I can check.
Re: [mod] Stripped tree trunks [stripped_tree]
I knew it was easy, as we'd already put a beta together for [cool_trees] and some of the unreleased trees one of the students here made. It's actually two steps, though. Register the node, then register the recipe to make planks from stripped. Three, since we use [round_trunks] in most servers.
The update script I use to grab the most recent gits for everything the mods directory must have crashed or something, because I've now run it at least twice since your last git update. Sometimes happens, but usually it's because someone moved his repo. In any event, I must have missed seeing the error message.
Incidentally, going to the repo, I see you've already done exactly what I was suggesting. Well, all except to add the recipe for crafting planks. It could be done with a lot of conditionals to account for the inconsistent naming schemes, but it's probably best to just pass in a third array with the plank_names.
The update script I use to grab the most recent gits for everything the mods directory must have crashed or something, because I've now run it at least twice since your last git update. Sometimes happens, but usually it's because someone moved his repo. In any event, I must have missed seeing the error message.
Incidentally, going to the repo, I see you've already done exactly what I was suggesting. Well, all except to add the recipe for crafting planks. It could be done with a lot of conditionals to account for the inconsistent naming schemes, but it's probably best to just pass in a third array with the plank_names.
- LRV
- Helper
- Posts: 378
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Mooncarguy
Re: [mod] Stripped tree trunks [stripped_tree]
Moved to Mod Releases since this follows the guidelines.
This is a cool signature. :)
- LRV
- Helper
- Posts: 378
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Mooncarguy
Re: [mod] Stripped tree trunks [stripped_tree]
Nice mod. I included it in my W.I.P. subgame Mcg Minetest Game.
This is a cool signature. :)
Re: [mod] Stripped tree trunks [stripped_tree]
I would like to see support for the trees in the ebiome mod! :)
Hello! I'm just some random person with an ancient 7 year old potato that is my laptop :)
Re: [mod] Stripped tree trunks [stripped_tree]
I disabled the chisel, but when I try to strip a trunk with an axe, I get this error:
Code: Select all
AsyncErr: Lua: Runtime error from mod 'default' in callback item_OnPlace(): ...test-5.6.1-win64\bin\..\mods\stripped_tree/functions.lua:17: attempt to concatenate global 'node_name' (a nil value)
stack traceback:
...test-5.6.1-win64\bin\..\mods\stripped_tree/functions.lua:17: in function 'swap_node'
...test-5.6.1-win64\bin\..\mods\stripped_tree/functions.lua:79: in function <...test-5.6.1-win64\bin\..\mods\stripped_tree/functions.lua:65>
Hello! I'm just some random person with an ancient 7 year old potato that is my laptop :)
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [mod] Stripped tree trunks [stripped_tree]
Had a quick look at this and then spotted "HeyITGuyFixIt" had already raised an issue for this and added a note on that issue and then done a patch fix pull request:
https://github.com/HeyITGuyFixIt/stripp ... ee/patch-1
He's actually done 4 patches from what I can tell all 4 fix issues but patch-1 branch would be a good start. download, unzip, copy functions.lua across to existing mods folder.
https://github.com/HeyITGuyFixIt/stripp ... ee/patch-1
He's actually done 4 patches from what I can tell all 4 fix issues but patch-1 branch would be a good start. download, unzip, copy functions.lua across to existing mods folder.
Who is online
Users browsing this forum: No registered users and 36 guests