[Mod] Technic [0.4.16-dev] [technic]

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

Re: [Mod] Technic [0.4.16-dev] [technic]

by Maverick2797 » Post

The lua-tube's event.item can tell you a lot about an item(s) that pass through it. I often use it to determine what unknown items are. Paste this in and pass an item through to see what I mean:

Code: Select all

if event.type=="item" then
	local text = ""
	for k,v in pairs(event.item) do
		text = text..k..": "
		if type(v)=="table" then text = text.."{"..table.concat(v," ~ ").."}" else text = text.."\""..tostring(v).."\"" end
		text = text.."\n"
	end
	digiline_send("lcd",text)
end
NP: you route items by using eg: return "green"
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
CLtheman1
New member
Posts: 4
Joined: Thu Aug 09, 2018 18:41
GitHub: CLtheman1

Re: [Mod] Technic [0.4.16-dev] [technic]

by CLtheman1 » Post

The metal blocks and steel override in this mod still use the old MT metal block style. How were Technic's metal blocks recolored? I'd like to use color filters to update those textures to the current MT metal textures, using the default steel block as a base. Please tell me the hex code to put in a color filter for each block.

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Technic [0.4.16-dev] [technic]

by Blockhead » Post

CLtheman1 wrote:
Tue Mar 15, 2022 14:35
The metal blocks and steel override in this mod still use the old MT metal block style. How were Technic's metal blocks recolored? I'd like to use color filters to update those textures to the current MT metal textures, using the default steel block as a base. Please tell me the hex code to put in a color filter for each block.
They were probably done in a graphics editor like GIMP, given they all use unique textures based on the older metal block style. This does give a bit better control over the output like adjusting brightness curves/levels or using one of many blending modes. Still,

Here's a patch to get you started:

Code: Select all

---
 technic/items.lua          |  2 +-
 technic_worldgen/nodes.lua | 33 +++++++--------------------------
 2 files changed, 8 insertions(+), 27 deletions(-)

diff --git a/technic/items.lua b/technic/items.lua
index d1565d7..45f6475 100644
--- a/technic/items.lua
+++ b/technic/items.lua
@@ -184,7 +184,7 @@ for p = 0, 35 do
 	local radioactivity = math.floor(math.sqrt((1+5.55*p/35) * 18 / (1+5.55*7/35)) + 0.5);
 	(ov or minetest.register_node)(block, {
 		description = string.format(S("%.1f%%-Fissile Uranium Block"), p/10),
-		tiles = {"technic_uranium_block.png"},
+		tiles = { "default_steel_block.png^[colorize:#00EE0055" },
 		is_ground_content = true,
 		groups = {uranium_block=1, not_in_creative_inventory=nici,
 			cracky=1, level=2, radioactive=radioactivity},
diff --git a/technic_worldgen/nodes.lua b/technic_worldgen/nodes.lua
index d4d3e4c..c07d518 100644
--- a/technic_worldgen/nodes.lua
+++ b/technic_worldgen/nodes.lua
@@ -72,7 +72,7 @@ minetest.register_node( ":technic:marble_bricks", {
 
 minetest.register_node(":technic:uranium_block", {
 	description = S("Uranium Block"),
-	tiles = { "technic_uranium_block.png" },
+	tiles = { "default_steel_block.png^[colorize:#00EE0055" },
 	is_ground_content = true,
 	groups = {uranium_block=1, cracky=1, level=2, radioactive=2},
 	sounds = default.node_sound_stone_defaults()
@@ -80,7 +80,7 @@ minetest.register_node(":technic:uranium_block", {
 
 minetest.register_node(":technic:chromium_block", {
 	description = S("Chromium Block"),
-	tiles = { "technic_chromium_block.png" },
+	tiles = { "default_steel_block.png^[colorize:#EEEEFF55" },
 	is_ground_content = true,
 	groups = {cracky=1, level=2},
 	sounds = default.node_sound_stone_defaults()
@@ -88,7 +88,7 @@ minetest.register_node(":technic:chromium_block", {
 
 minetest.register_node(":technic:zinc_block", {
 	description = S("Zinc Block"),
-	tiles = { "technic_zinc_block.png" },
+	tiles = { "default_steel_block.png^[colorize:#00AAFF55" },
 	is_ground_content = true,
 	groups = {cracky=1, level=2},
 	sounds = default.node_sound_stone_defaults()
@@ -106,12 +106,12 @@ minetest.register_alias("technic:wrought_iron_block", "default:steelblock")
 
 minetest.override_item("default:steelblock", {
 	description = S("Wrought Iron Block"),
-	tiles = { "technic_wrought_iron_block.png" },
+	tiles = { "default_steel_block.png" },
 })
 
 minetest.register_node(":technic:cast_iron_block", {
 	description = S("Cast Iron Block"),
-	tiles = { "technic_cast_iron_block.png" },
+	tiles = { "default_steel_block.png^[colorize:#4466BB55" },
 	is_ground_content = true,
 	groups = {cracky=1, level=2},
 	sounds = default.node_sound_stone_defaults()
@@ -119,7 +119,7 @@ minetest.register_node(":technic:cast_iron_block", {
 
 minetest.register_node(":technic:carbon_steel_block", {
 	description = S("Carbon Steel Block"),
-	tiles = { "technic_carbon_steel_block.png" },
+	tiles = { "default_steel_block.png^[colorize:#33559955" },
 	is_ground_content = true,
 	groups = {cracky=1, level=2},
 	sounds = default.node_sound_stone_defaults()
@@ -127,7 +127,7 @@ minetest.register_node(":technic:carbon_steel_block", {
 
 minetest.register_node(":technic:stainless_steel_block", {
 	description = S("Stainless Steel Block"),
-	tiles = { "technic_stainless_steel_block.png" },
+	tiles = { "default_steel_block.png^[colorize:#EEEEEE55" },
 	is_ground_content = true,
 	groups = {cracky=1, level=2},
 	sounds = default.node_sound_stone_defaults()
@@ -165,24 +165,5 @@ for_each_registered_node(function(node_name, node_def)
 		})
 	end
 	local tiles = node_def.tiles or node_def.tile_images
-	if tiles then
-		local new_tiles = {}
-		local do_override = false
-		if type(tiles) == "string" then
-			tiles = {tiles}
-		end
-		for i, t in ipairs(tiles) do
-			if type(t) == "string" and t == "default_steel_block.png" then
-				do_override = true
-				t = "technic_wrought_iron_block.png"
-			end
-			table.insert(new_tiles, t)
-		end
-		if do_override then
-			minetest.override_item(node_name, {
-				tiles = new_tiles
-			})
-		end
-	end
 end)
 
-- 
2.35.1
Make sure you have cloned technic through git, then simply copy that into a file in your technic directory and run git apply <filename> (or copy the marked differences manually if that's too hard for you). The colours are a bit off, but if you're familiar with hexadecimal colour strings you'll get there eventually by tweaking them. That's the hard part from my perspective :P I recommend keeping two Minetest windows open side-by-side: one with the current textures, the other you keep reloading with the new recolours.

For your further reference:
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Midnight
Member
Posts: 168
Joined: Sun Dec 19, 2021 13:56
GitHub: MidnightPhantom
IRC: Dragon
In-game: Dragon_Abysss
Location: Dehradun, India

Re: [Mod] Technic [0.4.16-dev] [technic]

by Midnight » Post

I think that the technic worldgen should have all the technic ores spread above y level -30000, as it is pretty useless to keep the ores where one cannot reach. But truly if technic is enabled and a cavern has to be altered at level -30900 it is really tedious to replace all ores one by one using worldedit or using many brushes at the same time using terraform.

User avatar
T6C
Member
Posts: 119
Joined: Thu May 07, 2020 17:11
In-game: T6C

Re: [Mod] Technic [0.4.16-dev] [technic]

by T6C » Post

Midnight wrote:
Wed Dec 28, 2022 07:12
I think that the technic worldgen should have all the technic ores spread above y level -30000...
There are ores that spawn only at y ≤ –30000? I thought the deepest ore was diamond at y ≤ –1024.

User avatar
Midnight
Member
Posts: 168
Joined: Sun Dec 19, 2021 13:56
GitHub: MidnightPhantom
IRC: Dragon
In-game: Dragon_Abysss
Location: Dehradun, India

Re: [Mod] Technic [0.4.16-dev] [technic]

by Midnight » Post

T6C wrote:
Wed Dec 28, 2022 14:24
There are ores that spawn only at y ≤ –30000? I thought the deepest ore was diamond at y ≤ –1024.
The lowermost limit for ore generation is -31000, but I mean to say that the creator should set the lowermost limit of ore generation to y level -30000.

Glaedr
New member
Posts: 8
Joined: Sun Aug 02, 2020 14:34

Re: [Mod] Technic [0.4.16-dev] [technic]

by Glaedr » Post

Hello, I just want to make a small comment.
The batteries should only be connected from below, except the simple fact of having a cable just next to it not connected is enough to make them work.
cdb_c1db13b67092

User avatar
Irremann
Member
Posts: 50
Joined: Fri Jan 10, 2020 06:03
GitHub: Irremann
Location: Russia, Pereslavl-Zalesskiy

Re: [Mod] Technic [0.4.16-dev] [technic]

by Irremann » Post

I want to make my own cable. But I've already broken my head. I found the functions in API and entered my block there:

technic.register_cable_tier("my_technic:my_lv_cable", "LV")
technic.register_cable("LV", 2/16)


But I get:

Name technic:lv_cable does not follow naming conventions.

What am I doing wrong?

User avatar
Midnight
Member
Posts: 168
Joined: Sun Dec 19, 2021 13:56
GitHub: MidnightPhantom
IRC: Dragon
In-game: Dragon_Abysss
Location: Dehradun, India

Re: [Mod] Technic [0.4.16-dev] [technic]

by Midnight » Post

Does Anyone know why doesn't chainsaw cut down jungle trees.

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

Re: [Mod] Technic [0.4.16-dev] [technic]

by Maverick2797 » Post

Midnight wrote:
Sat Jun 03, 2023 15:39
Does Anyone know why doesn't chainsaw cut down jungle trees.
Have you charged the chainsaw first?
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
Midnight
Member
Posts: 168
Joined: Sun Dec 19, 2021 13:56
GitHub: MidnightPhantom
IRC: Dragon
In-game: Dragon_Abysss
Location: Dehradun, India

Re: [Mod] Technic [0.4.16-dev] [technic]

by Midnight » Post

Maverick2797 wrote:
Sat Jun 03, 2023 23:28
Midnight wrote:
Sat Jun 03, 2023 15:39
Does Anyone know why doesn't chainsaw cut down jungle trees.
Have you charged the chainsaw first?
It showed a green bar with no black spots showing it was completely charged and was perfectly cutting Pine, Aspen, and rubber trees but for some reason, it does not cut apple and jungle every time I use the chainsaw on it. Like sometimes it cut these two trees but many times it does not. And if I try cutting the same tree which the chainsaw could not cut previously it still wouldn't cut it. Could you tell me what is wrong with that tool.

User avatar
Irremann
Member
Posts: 50
Joined: Fri Jan 10, 2020 06:03
GitHub: Irremann
Location: Russia, Pereslavl-Zalesskiy

Re: [Mod] Technic [0.4.16-dev] [technic]

by Irremann » Post

Is there any easy way to find out if the device is connected to the network? I copied the code from the power monitor. But the network only receives "nil" and the code doesn't work.
Spoiler

Code: Select all

minetest.register_abm({
	nodenames = {"technic:power_monitor"},
	label = "Machines: run power monitor",
	interval   = 1,
	chance     = 1,
	action = function(pos, node, active_object_count, active_object_count_wider)
		local meta = minetest.get_meta(pos)
		local network_hash = technic.cables[minetest.hash_node_position(pos)]
		local network = network_hash and minetest.get_position_from_hash(network_hash)
		local sw_pos = network and {x=network.x,y=network.y+1,z=network.z}
		local timeout = 0
		for tier in pairs(technic.machines) do
			timeout = math.max(meta:get_int(tier.."_EU_timeout"),timeout)
		end
		if timeout > 0 and sw_pos and minetest.get_node(sw_pos).name == "technic:switching_station" then
			local sw_meta = minetest.get_meta(sw_pos)
			local supply = sw_meta:get_int("supply")
			local demand = sw_meta:get_int("demand")
			meta:set_string("infotext",
					S("Power Monitor. Supply: @1 Demand: @2",
					technic.EU_string(supply), technic.EU_string(demand)))
		else
			meta:set_string("infotext",S("Power Monitor Has No Network"))
		end
	end,
})

metalgeekzy
New member
Posts: 6
Joined: Thu May 27, 2021 01:06

Re: [Mod] Technic [0.4.16-dev] [technic]

by metalgeekzy » Post

Am i missing something with the quarry?
It seems to need a LOT of babysitting.
First i had to figure out that i needed to get into the config to make it actually dig deeper, and longer. I think.

But now it still randomly "finishes", it has not, and it randomly gets a no network message and i have to take apart the cable and place the switching station again.

Ive had it running on and off, when it behaves, for about 4 days now and its only currently 2711 distance down. And i think thats about roughly a third of the way to the bottom.

Id rather it NOT take a week and a half for a quarry to finish and i have other things i want to do besides babysit this thing.

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: [Mod] Technic [0.4.16-dev] [technic]

by Festus1965 » Post

metalgeekzy wrote:
Sat Jul 22, 2023 07:51
Am i missing something with the quarry?
It seems to need a LOT of babysitting.
try to make sure, the hole config (if energy is nearby) is in one mapblock together, as then the switching station activates the own network (HV) and so over others if ... and keep (still ?) the block with the quarry active.
I didn't play 0.4 a long time, but can't be so different from the 5.x version,

as also depending on the server
* settings (active_block_range = 2-4) map-blocks or 16 nodes from player,
* cache map memory (server_unload_unused_data_timeout = 600 - default = 10 min, U use 24h fE) and
* keep active after player left area -
I have about 30 minutes Real-time on 5.x server to revisit my quarry's again to reactivate the area. If the server has very less ram (memory) for mt server, than the lack of keep active from map-block thrown out of active as of less memory or much other player load and activate other newer active map-blocks and throw out yours.

That behavior was a reason many player used a 2nd nick to let this player stand near the quarry years ago.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

jonadab
Member
Posts: 35
Joined: Tue Mar 24, 2020 04:14
GitHub: tsadok
IRC: jonadab
In-game: jonadab

Re: [Mod] Technic [0.4.16-dev] [technic]

by jonadab » Post

Midnight wrote:
Wed Dec 28, 2022 07:12
it is pretty useless to keep the ores where one cannot reach.
Ores, like everything else, will not actually generate beyond the edges of the world, in any direction, including downward. The code probably specified the lower limit as -31000 because the author was confident that this will generate the ores all the way down to the bottom of the world, as the bottom edge is never lower than that, regardless of technical issues like architecture or version.

In principle, it would be possible to create an engine that can generate all the way down to -32767, using the same world storage format that MT uses, including the same number of bits for coordinates; but then various things in the codebase would have to be careful to check for over-runs every time various things happen, which is not desirable for performance reasons. The Minetest engine stops world generation somewhere between 30000 and 31000 nodes away from the zero point on all three axes, for safety, so that it does NOT have to do all those checks all the time, which allows for better performance, at the cost of a slightly smaller world that is, honestly, still big enough for most players. There are no "inaccessible" ores generating beyond the limit that you are unable to get to. There isn't even stone down there, just void. You aren't missing anything. If the lower-limit for an ore is set too close to zero, then there would be a region at the bottom of the world with no ores at all; the mod author didn't want that.

jonadab
Member
Posts: 35
Joined: Tue Mar 24, 2020 04:14
GitHub: tsadok
IRC: jonadab
In-game: jonadab

Re: [Mod] Technic [0.4.16-dev] [technic]

by jonadab » Post

T6C wrote:
Wed Dec 28, 2022 14:24
There are ores that spawn only at y ≤ –30000? I thought the deepest ore was diamond at y ≤ –1024.
I think whole blocks of mese are the thing that starts deepest in default MTG with default settings.

jonadab
Member
Posts: 35
Joined: Tue Mar 24, 2020 04:14
GitHub: tsadok
IRC: jonadab
In-game: jonadab

Re: [Mod] Technic [0.4.16-dev] [technic]

by jonadab » Post

metalgeekzy wrote:
Sat Jul 22, 2023 07:51
Am i missing something with the quarry?
It seems to need a LOT of babysitting.
It does have some limitations. Notably, it will not remove lava or anything unbreakable (e.g., chests), and it won't dig below any block that it failed to remove, or any block that you place in in the top part where it has already finished. If you restart the thing, it'll start at the top again, but unless you've removed any obstructions (chest, lava, etc.), it'll get stuck again at the same place. If the areas mod is in place (which it usually is on public servers), it'll also get blocked if something it wants to dig is protected by someone else.

Honestly, even digtron won't go through lava or chests or protected areas. Worldedit might.

User avatar
Midnight
Member
Posts: 168
Joined: Sun Dec 19, 2021 13:56
GitHub: MidnightPhantom
IRC: Dragon
In-game: Dragon_Abysss
Location: Dehradun, India

Re: [Mod] Technic [0.4.16-dev] [technic]

by Midnight » Post

jonadab wrote:
Sat Jul 22, 2023 19:48
T6C wrote:
Wed Dec 28, 2022 14:24
There are ores that spawn only at y ≤ –30000? I thought the deepest ore was diamond at y ≤ –1024.
I think whole blocks of mese are the thing that starts deepest in default MTG with default settings.
I wanted to make biomes at that depth, so having ores and stone down there would be idiotic.

jonadab
Member
Posts: 35
Joined: Tue Mar 24, 2020 04:14
GitHub: tsadok
IRC: jonadab
In-game: jonadab

Re: [Mod] Technic [0.4.16-dev] [technic]

by jonadab » Post

Midnight wrote:
Tue Jul 25, 2023 15:40
I wanted to make biomes at that depth, so having ores and stone down there would be idiotic.
That's not a use case that Technic could, or should attempt to, anticipate and accommodate in its default setup. If you're doing something out of the ordinary line like that, you'll need to make some changes to the depth settings.

User avatar
Midnight
Member
Posts: 168
Joined: Sun Dec 19, 2021 13:56
GitHub: MidnightPhantom
IRC: Dragon
In-game: Dragon_Abysss
Location: Dehradun, India

Re: [Mod] Technic [0.4.16-dev] [technic]

by Midnight » Post

jonadab wrote:
Wed Jul 26, 2023 13:20
Midnight wrote:
Tue Jul 25, 2023 15:40
I wanted to make biomes at that depth, so having ores and stone down there would be idiotic.
That's not a use case that Technic could, or should attempt to, anticipate and accommodate in its default setup. If you're doing something out of the ordinary line like that, you'll need to make some changes to the depth settings.
Like what?

User avatar
Walker
Member
Posts: 1814
Joined: Tue Oct 03, 2017 09:22
In-game: Walker
Contact:

Re: [Mod] Technic [0.4.16-dev] [technic]

by Walker » Post

i had to disable the chainsaw lua by commenting it out.

I always got the following error:

Code: Select all

2023-08-03 00:59:54: ERROR[Main]: ModError: Runtime error from mod 'technic' in callback on_mods_loaded(): invalid key to 'next'
2023-08-03 00:59:54: ERROR[Main]: stack traceback:
2023-08-03 00:59:54: ERROR[Main]:       [C]: ?
2023-08-03 00:59:54: ERROR[Main]:       [C]: in function '(for generator)'
2023-08-03 00:59:54: ERROR[Main]:       ...reative/worldmods/technic/technic/tools/chainsaw.lua:80: in function '?'
2023-08-03 00:59:54: ERROR[Main]:       .../ubuntu/minetest570/bin/../builtin/game/register.lua:446: in function <.../ubuntu/minetest570/bin/../builtin/game/register.lua:432>
The problem only started appearing recently, after the server restarted once

what could solve the problem?

User avatar
Midnight
Member
Posts: 168
Joined: Sun Dec 19, 2021 13:56
GitHub: MidnightPhantom
IRC: Dragon
In-game: Dragon_Abysss
Location: Dehradun, India

Re: [Mod] Technic [0.4.16-dev] [technic]

by Midnight » Post

Walker wrote:
Wed Aug 02, 2023 23:13
i had to disable the chainsaw lua by commenting it out.

I always got the following error:

Code: Select all

2023-08-03 00:59:54: ERROR[Main]: ModError: Runtime error from mod 'technic' in callback on_mods_loaded(): invalid key to 'next'
2023-08-03 00:59:54: ERROR[Main]: stack traceback:
2023-08-03 00:59:54: ERROR[Main]:       [C]: ?
2023-08-03 00:59:54: ERROR[Main]:       [C]: in function '(for generator)'
2023-08-03 00:59:54: ERROR[Main]:       ...reative/worldmods/technic/technic/tools/chainsaw.lua:80: in function '?'
2023-08-03 00:59:54: ERROR[Main]:       .../ubuntu/minetest570/bin/../builtin/game/register.lua:446: in function <.../ubuntu/minetest570/bin/../builtin/game/register.lua:432>
The problem only started appearing recently, after the server restarted once

what could solve the problem?
You can post this in the issues in the technic mod.

User avatar
Walker
Member
Posts: 1814
Joined: Tue Oct 03, 2017 09:22
In-game: Walker
Contact:

Re: [Mod] Technic [0.4.16-dev] [technic]

by Walker » Post

Midnight wrote:
Thu Aug 03, 2023 15:33
Walker wrote:
Wed Aug 02, 2023 23:13
i had to disable the chainsaw lua by commenting it out.

I always got the following error:

Code: Select all

2023-08-03 00:59:54: ERROR[Main]: ModError: Runtime error from mod 'technic' in callback on_mods_loaded(): invalid key to 'next'
2023-08-03 00:59:54: ERROR[Main]: stack traceback:
2023-08-03 00:59:54: ERROR[Main]:       [C]: ?
2023-08-03 00:59:54: ERROR[Main]:       [C]: in function '(for generator)'
2023-08-03 00:59:54: ERROR[Main]:       ...reative/worldmods/technic/technic/tools/chainsaw.lua:80: in function '?'
2023-08-03 00:59:54: ERROR[Main]:       .../ubuntu/minetest570/bin/../builtin/game/register.lua:446: in function <.../ubuntu/minetest570/bin/../builtin/game/register.lua:432>
The problem only started appearing recently, after the server restarted once

what could solve the problem?
You can post this in the issues in the technic mod.
https://github.com/minetest-mods/technic/issues/620

done

Damned
Member
Posts: 23
Joined: Sun Sep 25, 2016 03:48

Re: [Mod] Technic [0.4.16-dev] [technic]

by Damned » Post

Something seems to have gone wrong with the quarry machine.

Was using the quarry earlier, no problems.
Went to browse content, noticed there were 2 updates pending, clicked to update (doesn't say what's being updated)
Went back into game, tried using the quarry, didn't work.
It just goes straight to finished.
Tried moving it to a different place, same result. Click enabled, goes straight to finish.
It seems to have stopped checking, or it's not resetting.
There is no protected area, or non removable blocks (water, etc)

Damned
Member
Posts: 23
Joined: Sun Sep 25, 2016 03:48

Re: [Mod] Technic [0.4.16-dev] [technic]

by Damned » Post

Started a new world, and the quarry works fine. Dug down 100, moved it, and it started digging again. Went back to the original world, doesn't work. Moved the quarry again. Clicked enable, comes up as finished.

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests