[Modpack] TechPack [techpack]

SlavaArduino12345
New member
Posts: 8
Joined: Sun Jan 17, 2021 09:48
In-game: SlavaArduino12345 RomeoRomeo

Re: [Modpack] TechPack [techpack]

by SlavaArduino12345 » Post

Your mod is so good! I really want to see it in minecraft)))

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

:) This is not on my ToDo list
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

SlavaArduino12345
New member
Posts: 8
Joined: Sun Jan 17, 2021 09:48
In-game: SlavaArduino12345 RomeoRomeo

Re: [Modpack] TechPack [techpack]

by SlavaArduino12345 » Post

joe7575 wrote:
Sun Jul 03, 2022 14:09
:) This is not on my ToDo list
I am already know that xD

ronoaldo
Member
Posts: 177
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: [Modpack] TechPack [techpack]

by ronoaldo » Post

Hi! We have this mod on our server, Mercurio, and it is awesome!

One of our players made a HUGE build around the mechanics, which I loved, but seems to be affecting performance a bit in some cases, but I unfortunately could not precisely diagnose what it was. The effect we observe is that the server steps takes longer when the machines are running.

Are there any recommendations for performance tuning it? I believe I have all the defaults right now, but any suggestions to reduce the impact on server step lag for larger builds would be awesome.
Servers: Mercurio | Tools: ContentDB CLI | Mods: minenews

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: [Modpack] TechPack [techpack]

by Festus1965 » Post

ignored
Last edited by Festus1965 on Fri Jul 15, 2022 00:26, edited 1 time in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

Are there any recommendations for performance tuning it?
Unfortunately, not.

- But what is "HUGE" in your case?
- Is the lag cause really the mod TechPack?

You should check the server CPU load in the following cases:
1) No player is nearby,
2) the owner is nearby (so that the whole map area is loaded),
3) any other player is nearby.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

Bigger than that?
Attachments
techpack_v2.png
techpack_v2.png (946.77 KiB) Viewed 3811 times
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

ronoaldo
Member
Posts: 177
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: [Modpack] TechPack [techpack]

by ronoaldo » Post

joe7575 wrote:
Tue Jul 12, 2022 10:36
Are there any recommendations for performance tuning it?
Unfortunately, not.

- But what is "HUGE" in your case?
- Is the lag cause really the mod TechPack?

You should check the server CPU load in the following cases:
1) No player is nearby,
2) the owner is nearby (so that the whole map area is loaded),
3) any other player is nearby.
I am not sure if the techpack is the cause, unfortunately... I have enabled the monitoring mod, and it is available here, and these numbers are without the farm running (the player disabled for us to check if it was indeed the root cause):
Monitoring stats for the past 2 days.
Monitoring stats for the past 2 days.
Screenshot_20220713_110325.png (196.91 KiB) Viewed 3772 times
I'm not sure how to properly analyze that with the tooling I have. I have both the monitoring mod and the built-in profiler enabled, but I'm unsure for how long I should have them running and how to read the numbers when I get them. I see the raw number but I could not relate which mods/parts of the server are actually consuming more resources.
joe7575 wrote:
Tue Jul 12, 2022 16:41
Bigger than that?
Potentially bigger, yes. I'll try to grab some updated screenshots!
Servers: Mercurio | Tools: ContentDB CLI | Mods: minenews

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: [Modpack] TechPack [techpack]

by Festus1965 » Post

ignored
Last edited by Festus1965 on Fri Jul 15, 2022 00:26, edited 1 time in total.
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

I'm not sure how to properly analyze that with the tooling I have.
I do not know it either.

But I know that TechPack has no globalsteb and no ABM. So you can't measure anything meaningful here.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

ronoaldo
Member
Posts: 177
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: [Modpack] TechPack [techpack]

by ronoaldo » Post

joe7575 wrote:
Thu Jul 14, 2022 18:50
I'm not sure how to properly analyze that with the tooling I have.
I do not know it either.

But I know that TechPack has no globalsteb and no ABM. So you can't measure anything meaningful here.
That is great to know then, thanks! The issue then resides elsewhere probably! Out of curiosity, how is the machines executing their jobs? Node timers?
Servers: Mercurio | Tools: ContentDB CLI | Mods: minenews

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

ronoaldo wrote:
Thu Jul 14, 2022 20:57
...Out of curiosity, how is the machines executing their jobs? Node timers?
Yes, all machines use node timers.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

Midnight Sapphire
Member
Posts: 16
Joined: Sun Jun 30, 2019 23:06

Re: [Modpack] TechPack [techpack]

by Midnight Sapphire » Post

could you add support for mineclone2?

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

Unfortunately not.

According to this description (viewtopic.php?p=332806#p332806), this is too complicated for me and brings too much unrest into the mod
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

0siribix
Member
Posts: 123
Joined: Tue Nov 17, 2020 20:54
GitHub: 0siribix
In-game: 0siribix

Re: [Modpack] TechPack [techpack]

by 0siribix » Post

We're having an issue with some corrupted storage data and wonder if you could maybe
1. determine how to prevent it
2. show the best way to recover from it

I don't quite understand the structure and usage of number2pos in mod_storage\tubelib
I found this

Code: Select all

;=(4664,21,-1204);
and later in the same save file I found

Code: Select all

, [\"4664,21,-1204\"] = {[\"number\"] = \"\", [\"pos\"] = {[\"y\"] = 21, [\"x\"] = 4664, [\"z\"] = -1204},
This was causing server to crash as follows
2022-08-25 17:17:45: [Main]: TL-ERROR Number2Pos pos is nil
2022-08-25 17:17:45: [Main]: num: (4664,21,-1204)
2022-08-25 17:17:45: [Main]: ITEM:
2022-08-25 17:17:45: [Main]: _ = {}

2022-08-25 17:17:45: ERROR[Main]: ModError: Failed to load and run script from worldmods/techpack_0siribix/tubelib/init.lua:
2022-08-25 17:17:45: ERROR[Main]: ../builtin/common/misc_helpers.lua:412: attempt to index local 'pos' (a nil value)
2022-08-25 17:17:45: ERROR[Main]: stack traceback:
2022-08-25 17:17:45: ERROR[Main]: ../builtin/common/misc_helpers.lua:412: in function 'pos_to_string'
2022-08-25 17:17:45: ERROR[Main]: worldmods/techpack_0siribix/tubelib/command.lua:120: in function 'get_key_str'
2022-08-25 17:17:45: ERROR[Main]: worldmods/techpack_0siribix/tubelib/command.lua:161: in function 'generate_Key2Number'
2022-08-25 17:17:45: ERROR[Main]: worldmods/techpack_0siribix/tubelib/command.lua:712: in main chunk
2022-08-25 17:17:45: ERROR[Main]: [C]: in function 'dofile'
2022-08-25 17:17:45: ERROR[Main]: worldmods/techpack_0siribix/tubelib/init.lua:105: in main chunk
This is my fork of techpack so I understand if you don't want to look at it but the changes I've made are in other parts of techpack, nothing with save data. I believe the data was corrupted maybe during a server crash?

FWIW, I advise people who use my fork to come to me for support

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

I think this can happen when the server crashes due to an out of memory error.
What is the file size of "mod_storage/tubelib2"?
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

0siribix
Member
Posts: 123
Joined: Tue Nov 17, 2020 20:54
GitHub: 0siribix
In-game: 0siribix

Re: [Modpack] TechPack [techpack]

by 0siribix » Post

joe7575 wrote:
Sat Aug 27, 2022 13:17
The file is generated by Minetest (mod storage). I have no impact to the file structure.
I think this can happen when the server crashes due to an out of memory error.
What is the file size of "mod_storage/tubelib2"?
The file is approx 740 MB
When i say structure I mean the variables. The file is a serialization of the variables you save to mod storage. To me it looks like the num2pos table contains one entry that is either "" = (4664,21,-1204) or nil = (4664,21,-1204)

So, I understand what num2pos contains and how most of that table looks. I don't understand exactly how this table is used by other fuctions. Does this simply hold ID numbers and their coordinates? If so, are there and Nums that point to a pos that has no block?

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

num2pos is the correlation between node numbers and their positions, like:
"1234" = (4664,21,-1204)

If so, are there and Nums that point to a pos that has no block?
Yes, possible, and vice versa. You should delete all pairs with invalid data (number or position).
But this should already be done in the function serialize

something like (untested):

Code: Select all

local function serialize(data)
	local tbl = {}
	for k,v in pairs(data) do
		if k ~= nil and k ~= "" and v.pos ~= nil then
			tbl[#tbl+1] = k.."="..minetest.pos_to_string(v.pos)
		end
	end
	return table.concat(tbl, ";")
end
and possibly the same in deserialize
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

0siribix
Member
Posts: 123
Joined: Tue Nov 17, 2020 20:54
GitHub: 0siribix
In-game: 0siribix

Re: [Modpack] TechPack [techpack]

by 0siribix » Post

Ok, I did some more digging and the second reference to that pos exists in TemporaryRemovedNodes

Code: Select all

, [\"4664,21,-1204\"] = {[\"number\"] = \"\", [\"pos\"] = {[\"y\"] = 21, [\"x\"] = 4664, [\"z\"] = -1204},
Also the save file is 739 KiB, not MB

Previously I manually incremented NextNumber and assigned the new number to the missing index in num2pos. Server started without issue but when I shut it down, it removed it and saved as nil again
So these were the steps
  1. Server crash loop while trying to read tubelib storage file
  2. Manually edited tubelib storage file and assigned NextNumber as index to the missing index
  3. Incremented NextNumber
  4. Restarted server with no errors
  5. Shut down server
  6. Restarted server and again crash loop because tubelib storage file has nil index again
I wonder if this is some bug with storage serialization/deserialization?

Next I will try to remove the invalid element in num2pos by manually editing the storage file. If the element is re-created, then I will try to manually remove the above element

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

TemporaryRemovedNodes is mainly used for doors. See function "tubelib.temporary_remove_node".
This could be the reason, why the number is nil.

The function "data_maintenance" checks after server start, if the data in Number2Pos is valid. If not, the data will be deleted.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

0siribix
Member
Posts: 123
Joined: Tue Nov 17, 2020 20:54
GitHub: 0siribix
In-game: 0siribix

Re: [Modpack] TechPack [techpack]

by 0siribix » Post

That helps alot. TYVM

User avatar
j0j0n4th4n
Member
Posts: 249
Joined: Tue Jan 26, 2021 06:45

Re: [Modpack] TechPack [techpack]

by j0j0n4th4n » Post

I see you made both Techpack and Tech Age, could you give more details about the differences between the two? I'm kind split of which mod to use and the sound very similar.
cdb_894a100ddd76

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Modpack] TechPack [techpack]

by joe7575 » Post

For TechPack you should read this
For Techage, you should read this and this

Differences between the modpack TechPack and the modpack Techage
  • TechPack has less than 100 inventory items, Techage has more than 500 inventory items
  • TechPack is more a normal mod. If it's on a server, it can be ignored. Techage can't. It is more like a game. You have to use it, is difficult to circumvent.
  • Techage is much more difficult. You have to keep track of many more resources (oil, power, liquids, powders, ores, ...)
  • Techage has huge multi-block machines like the steam engine, distillation tower, collider, fusion reactor,...
  • Techage has it's own transport systems like Minecart, Hyperloop, Jetpack, Paraglider
  • TechPack can be used in creative mode, Techage should only be played in survival mode. Therefore, Techage should be played on a public server :)
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
j0j0n4th4n
Member
Posts: 249
Joined: Tue Jan 26, 2021 06:45

Re: [Modpack] TechPack [techpack]

by j0j0n4th4n » Post

Thanks, that was very helpful =)
cdb_894a100ddd76

Alatarius
Member
Posts: 28
Joined: Mon Apr 24, 2023 03:38
GitHub: Alatarius

Re: [Modpack] TechPack [techpack]

by Alatarius » Post

I would like to make a suggestion to make this compatible with MoreOres and MoreBlocks. The quarry will only mine basic blocks but if you have moreblocks and moreores, as I have found that most players do, that the quarry will not mine these nodes.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 21 guests