[Mod] i3 [1.16] [i3]

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.3.3] [i3]

by jp » Post

Update: i3 1.3.3 released.

Nothing shiny there. This version contains a few bugfixes.

Get it on ContentDB.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] i3 [1.3.3] [i3]

by MisterE » Post

There is a significant bug: quick crafting never returns the "returns" field in a crafting recipe

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.3.3] [i3]

by jp » Post

What is the "returns" field?

User avatar
Ghaydn
Member
Posts: 54
Joined: Sat Sep 26, 2020 11:58
In-game: ghaydn
Location: Moscow, Russia

Re: [Mod] i3 [1.3.3] [i3]

by Ghaydn » Post

The "techage" modpack does not support i3, it only support unified_inventory. But I more like i3. And here I tried to fix that problem. For that I've made a small mod "micr" that handles crafts and craft types registration in one single call. This is full code:

Code: Select all

--[[-----------------------------------------------------------------------------||--
--|------MICR is a Multi-Interface Craft Registrator. With it you don't have to  -|--
--|-support many craft-guiding interfaces. Or maybe tomorrow someone will create -|--
--|-another fancy inventory interface? Don't worry! Since now you have one guide -|--
--|-for all of them. Of course, it won't add tabs or pages. These things must be -|--
--|-defined individually for each UI. But if craft recipes is the only thing that-|--
--|-you need, then why not?                                                      -|--
--]]-----------------------------------------------------------------------------||--

micr = {}

local has_i3 = minetest.get_modpath("i3")
local has_ui = minetest.get_modpath("unified_inventory")
local has_cg = minetest.get_modpath("crafguide")

local function format_i3(input)
	local output = {}
	for _, entry in ipairs(input) do
		local secondput = ""
		if type(entry) == "table" then
			for _, secondtry in ipairs(entry) do
				secondput = secondput..secondtry..","
			end
			table.insert(output, secondput)
		else
			table.insert(output, entry)
		end
	end
	return output
end

micr.register_craft_type = function(name, def)
	if has_cg then
		local cg_def = {
			description = def.description,
			icon = def.icon,
		}
		craftguide.register_craft_type(name, cg_def)
	end
	if has_i3 then
		local i3_def = {
			description = def.description,
			icon = def.icon,
			width = def.width or 3,
			height = def.height or 3,
			dynamic_display_size = def.dynamic_display_size or nil,
			uses_crafting_grid = def.uses_crafting_grid,
		}
		i3.register_craft_type(name, i3_def)
	end
	if has_ui then
		local ui_def = {
			description = def.description,
			icon = def.icon,
			width = def.width or 3,
			height = def.height or 3,
			dynamic_display_size = def.dynamic_display_size or nil,
			uses_crafting_grid = def.uses_crafting_grid,
		}
		unified_inventory.register_craft_type(name, ui_def)
	end
end

micr.register_craft = function(def)
	if not def.items then
		if def.input then
			def.items = table.copy(def.input)
		elseif def.recipe then
			def.items = table.copy(def.recipe)
		end
	end
	if not def.result then
		if def.output then def.result = def.output end
	end

	if has_cg then
		local cg_def = {
			result = def.result,
			type = def.type,
			items = def.items,
		}
		craftguide.register_craft(cg_def)
	end
	if has_i3 then

		local i3_def = {
			result = def.result,
			type = def.type,
			items = format_i3(def.items),
			width = def.width or 3,
		}
		i3.register_craft(i3_def)
	end
	if has_ui then
		local ui_def = {
			output = def.result,
			type = def.type,
			items = def.items,
			width = def.width or 3,
			height = def.height or 3,
		}
		unified_inventory.register_craft(ui_def)
	end
end
My next move was to simply find and replace all "unified_inventory.register_craft" to "micr.register_craft" in all TA files. And it worked! Now i3 shows all TA recipes. But there is a problem with recipes that have 4 components, see screenshot. How to fix this? What did I do wrong? What did I miss?
Attachments
screenshot_20210918_021704.png
screenshot_20210918_021704.png (363.84 KiB) Viewed 4402 times
Nobody understands me... — вРН БШ ЯЙЮГЮКХ?

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.3.3] [i3]

by jp » Post

Ghaydn wrote:
Fri Sep 17, 2021 23:38
But there is a problem with recipes that have 4 components, see screenshot. How to fix this? What did I do wrong? What did I miss?
You didn't do anything wrong. That was a bug which is now fixed. By the way, you don't need to specify width and height in the recipe registration. These are automatically calculated in i3.

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.3.4] [i3]

by jp » Post

I just released i3 1.3.4 and it'll be the last i3 release with me. Krock is the one in charge of maintaining this mod from now on.

It's been a while I'm not hooked with Minetest anymore, and I feel very tired. Time to transition to something that make me feel better after 8 straight years of contributions.

User avatar
luizsab
Member
Posts: 41
Joined: Mon Jan 16, 2017 13:49

Re: [Mod] i3 [1.3.4] [i3]

by luizsab » Post

Hello! It's a great inventory, congratulations!
Luiz
[luizsab]
cdb_20c854aafd61

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.4] [i3]

by jp » Post

Update: i3 1.4 released!

Get it on ContentDB.

Calling it "1.4" is almost an understatement — it is a full refactor of the codebase. Calling it "2.0" would make more sense.

Changelog:
  • The bag system has been revised. It no longer extends the main inventory, it opens a separate storage for items with the bag = <1-4> group in their definition.

    Image
  • Added a "Settings" popup where you can set a home position and fine-tune your inventory sorting mechanics (compression, reverse mode, automation, hotbar ignoring, etc.).

    Image
  • Some API methods have been removed or modified (namely i3.new_tab, i3.get_tabs, etc.).
    Please consult the API documentation to update your mods.
  • A lot of polish including new sounds.
Warning: this release is not backward compatible with older versions. Delete the <myworld>/mod_storage/i3 file if some problems arise.

Enjoy!

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: [Mod] i3 [1.4] [i3]

by Minix » Post

Good to see jp back at it.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] i3 [1.4.1] [i3]

by MisterE » Post

thank you jp!
if I delete the mod storage, is it possible that my players will lose anything that I should be aware of ?

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.4.1] [i3]

by jp » Post

MisterE wrote:
Wed Nov 24, 2021 00:41
if I delete the mod storage, is it possible that my players will lose anything that I should be aware of ?
All they will lose are the waypoints, bag content and inventory progress (if progressive mode is enabled).

Do note that frequent backward compatibility breaking might happen on the next releases as i3 is not widely adopted on the servers yet. It is recommended to delete the mod storage file if a crash occurs.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] i3 [1.4.1] [i3]

by MisterE » Post

ok, thank you. i3 is on my server. if it would help with development I can make you an admin on my server, I can even give you code access, and enable automatic updates. Pm me if interested

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] i3 [1.4.1] [i3]

by Linuxdirk » Post

jp wrote:
Wed Nov 24, 2021 01:57
MisterE wrote:
Wed Nov 24, 2021 00:41
if I delete the mod storage, is it possible that my players will lose anything that I should be aware of ?
All they will lose are the waypoints, bag content and inventory progress (if progressive mode is enabled).
Why isn't this stored as player meta data? Wouldn't it be much more logical keeping player-related date "within the player"?

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.4.1] [i3]

by jp » Post

Player metadata savings were actually used in the past but mod storage requires less data processing, it isn't exposed to conflicts/corruptions, and it is easier for a server admin to perform some modifications directly to the data. Also, it's better to keep these data in a centralized place.

I'm eagerly waiting #11763 to be merged as there's lots of data to serialize and a JSON file is no longer appropriate for that.

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.4.1] [i3]

by jp » Post

An additional note for server admins: I'm proposing paid services to develop some modules to i3, designed for your specific needs. They could be proprietary or open-source, at your convenience.

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] i3 [1.4.1] [i3]

by MisterE » Post

what would be the fee schedule?

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.4.1] [i3]

by jp » Post

MisterE wrote:
Thu Nov 25, 2021 15:13
what would be the fee schedule?
This is to be discussed in PM only but this would depend on the project dimensions. A proprietary software would cost obviously more than an open-source counterpart.

wsor4035
Member
Posts: 182
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: [Mod] i3 [1.4.1] [i3]

by wsor4035 » Post

with this mod now updating to not have a changeable inventory size (something im still conflicted on if I like), guess support for it in chests is no longer needed
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] i3 [1.4.1] [i3]

by MisterE » Post

wsor4035 wrote:
Thu Nov 25, 2021 19:27
with this mod now updating to not have a changeable inventory size (something im still conflicted on if I like), guess support for it in chests is no longer needed
what do you mean? the hotbar is still 9 slots with i3, so chest inventories with only 7 slots dont display properly still. Its something that can be lived with until getting around to editing all the chest mods...

wsor4035
Member
Posts: 182
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: [Mod] i3 [1.4.1] [i3]

by wsor4035 » Post

MisterE wrote:
Thu Nov 25, 2021 20:12
what do you mean? the hotbar is still 9 slots with i3, so chest inventories with only 7 slots dont display properly still. Its something that can be lived with until getting around to editing all the chest mods...
mtg chests are actually 8 slots, i was referring to games/mods that supported i3 adapting size inventory dont have to anymore
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.4.1] [i3]

by jp » Post

[News] Nathan has reviewed i3 on his YouTube channel: https://www.youtube.com/watch?v=Xd14BCdEZ3o

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.5] [i3]

by jp » Post

Update: i3 1.5 has been released!

Get it on ContentDB.

Changelog:
  • Bags can be renamed.
  • API: added i3.hud_notif (displays a Steam-like HUD notification on the corner of the screen).
  • Waypoints get an isometric map preview.

    Image

User avatar
debiankaios
Member
Posts: 910
Joined: Thu Dec 03, 2020 12:48
IRC: debiankaios
In-game: debiankaios Nowe
Location: germany
Contact:

Re: [Mod] i3 [1.5] [i3]

by debiankaios » Post

i can't go to home. I missing the privilege "home". If i do /grantme all i don't get this priv.

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [Mod] i3 [1.5.1] [i3]

by jp » Post

Update: i3 1.5.1 released!

Get it on ContentDB.

Changelog:
  • Added i3_legacy_inventory setting which convert the inventory to 8x4 slots (disabled by default).
  • Improved isometric preview of waypoints.
  • Hide items without any recipe/usage in survival mode.
  • Fixed a security issue related to the HTTP API.

esel4alles
Member
Posts: 28
Joined: Thu Jul 22, 2021 12:26

Re: [Mod] i3 [1.5.1] [i3]

by esel4alles » Post

2021-12-13 05:15:20: ACTION[Main]: Server: Shutting down
2021-12-13 05:15:20: ERROR[Main]: ModError: Failed to load and run script from /home/mt_server/minetest/bin/../mods/i3/init.lua:
2021-12-13 05:15:20: ERROR[Main]: /home/mt_server/minetest/bin/../mods/i3/init.lua:18: assertion failed!
2021-12-13 05:15:20: ERROR[Main]: stack traceback:
2021-12-13 05:15:20: ERROR[Main]: [C]: in function 'assert'
2021-12-13 05:15:20: ERROR[Main]: /home/mt_server/minetest/bin/../mods/i3/init.lua:18: in function 'lf'
2021-12-13 05:15:20: ERROR[Main]: /home/mt_server/minetest/bin/../mods/i3/init.lua:72: in main chunk


What is the problem, and how can i fix it?

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests