[Mod] i3 [1.16] [i3]

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

Re: [Mod] i3 [1.10] [i3]

by MisterE » Post

as he said, this is a hobby project. so your options are: 1) implement compatability yourself (very doable at the expense of loss of features), or 2)pay to have him support your usecase. IIRC, he was open to the possibility of being hired to expand i3.

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

Re: [Mod] i3 [1.11] [i3]

by jp » Post

Update: i3 1.11 released

Get it on ContentDB.

Two new options have been added to the Style settings:
  • Legacy inventory, which is now per-player and saved after restart.
  • HUD description, which show the wielded item description in the HUD.
Image

EDIT: I've released 1.11.3 as a hotfix release.

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

Re: [Mod] i3 [1.15] [i3]

by jp » Post

Update: i3 1.15 released

Get it on ContentDB.

Changelog:
  • Added a slots field to the tabs API to show the inventory slots in custom tabs. Check the documentation.
  • The UI now shows you what materials you miss in your inventory in order to craft something.
  • Various fixes & QoL updates.
Last edited by jp on Sun Feb 05, 2023 18:11, edited 1 time in total.

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

Re: [Mod] i3 [1.12] [i3]

by jp » Post

Update: i3 1.12.2 released

Get it on ContentDB.

It's a bugfix and QoL release.

L-Dog
Member
Posts: 481
Joined: Sat Jun 19, 2021 12:49
GitHub: N-nec
In-game: L-Dog

Re: [Mod] i3 [1.12] [i3]

by L-Dog » Post

i love this invi... i use it on server.

but i have a question... is there a way to slow down the clicks?

every DB recall upon search entry or click-to-craft draws server lag a little

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] i3 [1.12] [i3]

by ShadMOrdre » Post

jp,

How can I implement support for my 3d_armor compatible custom armor?

I've only found 2 references to 3d_armor in the code, (callbacks and gui), and my modifications to those at least let me know that i3 says my custom armor mod is not loaded, when it is.

Shad

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

Re: [Mod] i3 [1.12] [i3]

by jp » Post

Your fork must have the same namespace than upstream mod.

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

Re: [Mod] i3 [1.13] [i3]

by jp » Post

Update: i3 1.13 released.

Get it on ContentDB.

This release adds an API to manage waypoints.

User avatar
false_chicken
Member
Posts: 53
Joined: Wed Feb 04, 2015 23:41
GitHub: falsechicken
In-game: false_chicken
Location: Florida, USA

Re: [Mod] i3 [1.13] [i3]

by false_chicken » Post

jp wrote:
Mon Jan 09, 2023 11:03
Update: i3 1.13 released.

Get it on ContentDB.

This release adds an API to manage waypoints.
Wow I requested this a few days ago. Great turnaround time! Thanks!
DISCLAIMER: I am probably wrong.

Peril
Member
Posts: 40
Joined: Sun Feb 10, 2019 14:11

Re: [Mod] i3 [1.13] [i3]

by Peril » Post

JP, I have a pretty large world inventory (96 pages+) is there any way we could hide the "not yet discovered" items entirely?

I'm unsure if I'm missing a setting somewhere or whether I should make a feature request.
Forgot my old username/email, it's been a number of years please bear with.
Stats: OS: Manjaro Linux; Using minetest-git via AUR

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

Re: [Mod] i3 [1.14] [i3]

by jp » Post

Update: i3 1.14 released

Get it on ContentDB.

Changelog:
  • Added an API to manage the tabs on the right panel (the item lists). More infos on the API documentation (§Minitabs).
  • The Progressive Mode will now show only two tabs. The "Unlocked" tab only shows the unlocked items to address @Peril issue.
  • HUD and Quick Crafting bugfixes.

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

Re: [Mod] i3 [1.15] [i3]

by jp » Post

Update: i3 1.15 released

Get it on ContentDB.

Changelog:
  • Added a slots field to the tabs API to show the inventory slots in custom tabs. Check the documentation.
  • The UI now shows you what materials you miss in your inventory in order to craft something.
  • Various fixes & QoL updates.

User avatar
TestificateMods
Member
Posts: 88
Joined: Sat Apr 11, 2020 02:09
GitHub: t-affeldt
In-game: Testificate

Re: [Mod] i3 [1.15] [i3]

by TestificateMods » Post

Conflict with animation mods

I noticed my game would consistently crash after adding i3 to it whereas adding it to an unmodded MTG world would work just fine. I was able to narrow it down to a combination of the following mods:
Any two of those mods work just fine but using all three causes the game to shutdown.
I understand that the two animation mods probably shouldn't be used together, anyways, but figured I'd let you know just in case there's some undetected bug.

Relevant parts of the debug.txt:
Spoiler

Code: Select all

2023-03-06 19:26:10: ACTION[Server]: singleplayer [127.0.0.1] joins game. List of players: singleplayer
2023-03-06 19:26:10: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback environment_Step(): (load):739: bad argument #2 to 'fmt' (number expected, got nil)
2023-03-06 19:26:10: ERROR[Main]: stack traceback:
2023-03-06 19:26:10: ERROR[Main]: 	[C]: in function 'fmt'
2023-03-06 19:26:10: ERROR[Main]: 	(load):739: in function 'formspec'
2023-03-06 19:26:10: ERROR[Main]: 	(load):1770: in function 'make_fs'
2023-03-06 19:26:10: ERROR[Main]: 	(load):177: in function 'func'
2023-03-06 19:26:10: ERROR[Main]: 	...ing\minetest-5.6.0-win64\bin\..\builtin\common\after.lua:20: in function <...ing\minetest-5.6.0-win64\bin\..\builtin\common\after.lua:5>
2023-03-06 19:26:10: ERROR[Main]: 	...ng\minetest-5.6.0-win64\bin\..\builtin\game\register.lua:431: in function <...ng\minetest-5.6.0-win64\bin\..\builtin\game\register.lua:417>
2023-03-06 19:26:10: ACTION[Server]: singleplayer leaves game. List of players: 
2023-03-06 19:26:10: ACTION[Main]: Server: Shutting down

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

Re: [Mod] i3 [1.15] [i3]

by jp » Post

Fixed for the next release.

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

Re: [Mod] i3 [1.16] [i3]

by jp » Post

Update: i3 1.16 released

Get it on ContentDB.

Changelog:
  • New tooltip color.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] i3 [1.16] [i3]

by TenPlus1 » Post

I3 is looking amazing, you've put in a ton of work jp :)

User avatar
Xerenogan
Member
Posts: 14
Joined: Thu May 11, 2023 15:27
GitHub: Xerenogan
IRC: awells
In-game: Xerenogan

Re: [Mod] i3 [1.16] [i3]

by Xerenogan » Post

Hiya!
This is my favorite inventory mod. Thanks for making it JP!

I do have some things I've been trying to do with it that I was hoping to get some help with.
I'm trying to get the sfinv tab for XPro(an experience and leveling mod) to display in i3.
I've converted most of the sfinv formspec over to i3 and it's looking pretty good
i3-tab.png
i3-tab.png (89.39 KiB) Viewed 1931 times
, but I can't get three things to work.

I just can't figure out the line that scales the progress bar, and I can't figure out how to pass the sfinv calls, via the two buttons to sfinv. I know it may not be possible to get it to work that way.

Here is the code I'm working with.

Code: Select all

formspec = function (player, data, fs)
		-- Pulls data to local variables
		local name = player:get_player_name()
		local my_xp = xpro.get_player_xp(name)
		local my_lvl = xpro.get_player_lvl(name)
		local xp_cost = player:get_attribute("xpro_xp_gasto")
		local xp_disp = my_xp-xp_cost
			if xp_disp < 0 then xp_disp = 0 end
		
		-- Calculate Bar Progress
		local progress = 1
		if (my_lvl+1) ~= nil then
			local xp = my_lvl - my_xp
			local xp_t = my_lvl - (my_lvl+1)
			progress = xp/xp_t
		end
			
		-- Basic info (level, etc)
		fs("label", .5, 1, "Level: ")
		fs("label", 1.5, 1, my_lvl)
		fs("label", .5, 1.5, "Score: ")
		fs("label", 1.5, 1.5, my_xp)
		fs("label", .5, 2, "XP Cash: ")
		fs("label", 2, 2, xp_disp)
		
		-- Buttons
		fs("image",  .2, 2.5, 2.8, 1, "i3_btn9.png")
		fs("button", .6, 2.5, 2, 1, "store", " Awards Store ")
		fs("image",  .2, 3.7, 2.8, 1, "i3_btn9.png")
		fs("button", .6, 3.7, 2, 1, "rankings", " Global Ranking ")
		
		-- Leage Badge and Rank
		fs("image", 5, 1, 4, 4, "xpro_liga_bg.png")
		fs("image", 5.5, 1.5, 3, 3, (xpro.ligas[my_lvl].img))
		fs("label", 3, 1, "League:")
		fs("label", 4.2, 1, (xpro.ligas[my_lvl].name))
		
		-- Progress Bar
		fs("label", .5, 5, "Progress")
		
		fs("image", .5, 6, 9, .5, "xpro_xp_bar_grade.png"..math.ceil(progress*100).."xpro_xp_bar.png")
		--fs"image[0,3.8;9.65,0.8;xpro_xp_bar_grade.png^[transformR90^[lowpart:"..math.ceil(progress*100)..":xpro_xp_bar.png^[transformR270]" Original line.
		fs("image", .5, 5.5, 9, .5, "xpro_xp_bar_grade.png")
And here is the calls to sfinv popouts.

Code: Select all

fields = function (player, data, fields)
		if fields.store then
			xpro.acessar_shop(player:get_player_name())
		elseif fields.rankings then
			minetest.show_formspec(get_player_name(), "xpro:ranking", xpro.ranking_formspec)
		end
I just can't seem to get it to work. I know it is a lack of knowledge on my part.
Still, I got the rest of it working.

here's the link to Xpro -viewtopic.php?t=20499

Any help would be appreciated,
Thanks

edit: if this is the wrong place for this, or I'm out of line somehow, feel free to delete.
edit2:I've abandoned this approach. Working on something different in the post below.

User avatar
Xerenogan
Member
Posts: 14
Joined: Thu May 11, 2023 15:27
GitHub: Xerenogan
IRC: awells
In-game: Xerenogan

Re: [Mod] i3 [1.16] [i3]

by Xerenogan » Post

Hiya, me again.
I've changed up which mod I'm trying to get integrated into i3.
I ended up switching over to xp_redo. I got it to do everything I wanted to do.
Here's how it looks.
good.png
good.png (85.3 KiB) Viewed 1842 times

That said, I discovered something that xp_redo broke. After the first refresh (3 seconds), the armor slots in the armor tab lose their background and become unusable.
problem.png
problem.png (39.43 KiB) Viewed 1842 times
I believe the problem lies in the function that updates the hud, but I can't figure out how.

Code: Select all

xp_redo.update_hud = function(player, xp, rank, next_rank)

	local playername = player:get_player_name()
	local data = hud[playername]

	if not data or not rank then
		return
	end

	local infoTxt = "XP: " .. xp_redo.format_thousand(xp)
	local progress = 100

	if next_rank ~= nil then
		infoTxt = infoTxt .. "/" .. xp_redo.format_thousand(next_rank.xp)
		if next_rank.xp > xp then
			-- progress from 0 to 100
			progress = tonumber((xp - rank.xp) / (next_rank.xp - rank.xp) * 100)
		end
	end

	player:hud_change(data.info, "text", infoTxt)

	local color = xp_redo.rgb_to_int(rank.color.r, rank.color.g, rank.color.b)

	player:hud_change(data.rank, "number", color)
	player:hud_change(data.rank, "text", rank.name)

	player:hud_change(data.rankimg, "text", rank.icon)

	if has_hudbars then
		hb.change_hudbar(player, "xp_progress", progress)
	else
		player:hud_change(data.progressimg, "scale", { x=progress, y=1 })
	end

	if not xp_redo.disable_nametag then
		local is_admin = minetest.check_player_privs(playername, {privs=true})
		local is_hidden = minetest.check_player_privs(playername, {hide_nametag=true})
		local text

		if is_hidden then
			-- hidden player
			text = ""

		elseif is_admin then
			-- player is an admin
			text = minetest.colorize("#ff0000", playername)

		else
			-- normal player
			text = minetest.colorize(get_hex_color(rank.color), rank.name) .. " " .. playername

		end

		player:set_nametag_attributes({ text = text })
	end
end
I've tried hunting for non-local variable, same-named things, and messing around with globalstep. I just can't crack it.
Any idea what I'm doing wrong? Thanks in advance.

ps: I'm using the latest git version of xp_redo, and the latest release of i3.

edit: This is the error that is going into the debug.log.

Code: Select all

2023-05-18 10:45:17: WARNING[Main]: GUIInventoryList::draw(): The inventory location "detached:(c@#ff0000)singleplayer(c@#ffffff)_armor" doesn't exist

User avatar
Xerenogan
Member
Posts: 14
Joined: Thu May 11, 2023 15:27
GitHub: Xerenogan
IRC: awells
In-game: Xerenogan

Re: [Mod] i3 [1.16] [i3]

by Xerenogan » Post

Aha! Figured it out. It was exporting a player attribute under a generic name "text" that is making it's way into place it's not supposed to be. The offending code is for disabling/colorizing a nametag, but ends up disabling the armor interface elements. Whew. Why didn't I check the debug.log sooner?

To anyone else who has this problem, the problem is in xp_pro/hud.lua:202-222. Removing or commenting it out removes the admin segregation, but fixes the i3 armor tab.

lazerbeak12345
Member
Posts: 47
Joined: Sun Dec 12, 2021 01:55
GitHub: lazerbeak12345
In-game: lazerbeak12345

Re: [Mod] i3 [1.16] [i3]

by lazerbeak12345 » Post

Hi jp!

Thanks for your work on this mod, and to your continued contributions to MT in general over the years.

I'm sorry to hear that you aren't currently maintaining this mod. I can't pick up the project myself as I'm quite busy, but I thought I'd post something so people are aware that this project might need some help.

Again, thanks! Love your work.
Chocolate armor is tasty :)

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Mod] i3 [1.16] [i3]

by Imk » Post

*** version 5.8.0-dev-98f097d-dirty ***

2023-08-22 03:00:52: ERROR[Main]: ModError: Runtime error from mod 'i3' in callback on_mods_loaded(): (load):126: attempt to compare number with string
2023-08-22 03:00:52: ERROR[Main]: stack traceback:
2023-08-22 03:00:52: ERROR[Main]: (load):126: in function 'drop_table'
2023-08-22 03:00:52: ERROR[Main]: (load):167: in function 'cache_drops'
2023-08-22 03:00:52: ERROR[Main]: (load):286: in function 'init_recipes'
2023-08-22 03:00:52: ERROR[Main]: (load):337: in function 'fill_caches'
2023-08-22 03:00:52: ERROR[Main]: (load):183: in function <(load):182>
2023-08-22 03:00:52: ERROR[Main]: /home/mt888/minetest/bin/../builtin/common/register.lua:26: in function </home/mt888/minetest/bin/../builtin/common/register.lua:12>

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

Re: [Mod] i3 [1.16] [i3]

by Blockhead » Post

Imk wrote:
Tue Aug 22, 2023 03:03
*** version 5.8.0-dev-98f097d-dirty ***

2023-08-22 03:00:52: ERROR[Main]: ModError: Runtime error from mod 'i3' in callback on_mods_loaded(): (load):126: attempt to compare number with string
2023-08-22 03:00:52: ERROR[Main]: stack traceback:
2023-08-22 03:00:52: ERROR[Main]: (load):126: in function 'drop_table'
2023-08-22 03:00:52: ERROR[Main]: (load):167: in function 'cache_drops'
2023-08-22 03:00:52: ERROR[Main]: (load):286: in function 'init_recipes'
2023-08-22 03:00:52: ERROR[Main]: (load):337: in function 'fill_caches'
2023-08-22 03:00:52: ERROR[Main]: (load):183: in function <(load):182>
2023-08-22 03:00:52: ERROR[Main]: /home/mt888/minetest/bin/../builtin/common/register.lua:26: in function </home/mt888/minetest/bin/../builtin/common/register.lua:12>
Couldn't reproduce with vanilla Minetest Game 9e77e00c, i3 9437545 (1.16.2) & Minetest 5.8.0-dev-7b3ed3200. I suspect you have a mod that registers a drop table where an entry for rarity is erroneously a string. Search your mods for items that have a custom drop table entry (reference) and fix the error in that mod instead of i3.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Mod] i3 [1.16] [i3]

by Imk » Post

it's a mod bug!!
sfinv works fine

unified inventory after working 3 days began to give an error was replaced by i3
gave above error

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

Re: [Mod] i3 [1.16] [i3]

by Blockhead » Post

Imk wrote:
Tue Aug 22, 2023 17:27
it's a mod bug!!
If you knew exactly where the bug was you would have more than a stack trace, you'd have a patch. Please use a tool like grep and look for nodes with custom drop tables in your mod set, and look for strings where there should be integers. Or here's another way: debug the mod to check for the crash condition and instead of crashing, print out the item name that would cause the crash. Here's a patch for i3 to detect the crash condition and tell you what item is causing the problem, apply it it to i3/src/caches.lua (170 = line 170, in case you are uncomfortable with UNIX patch command).

Code: Select all

167c167,170
< 		local result = drop_table(name, drop)
---
> 		local result = pcall(drop_table, name, drop)
> 		if not result then
> 			minetest.log("error", "[i3] invalid drop table: " .. name .. "table="..dump(drop))
> 		end
sfinv works fine
Because unlike i3 and Unified Inventory, sfinv's recipe guide doesn't tell you how to get nodes by digging other nodes, it just lists the normal recipes.
unified inventory after working 3 days began to give an error was replaced by i3
gave above error
Running in a server or singleplayer environment? Were any other mods added after Unified Inventory was added?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Mod] i3 [1.16] [i3]

by Imk » Post

IP 20.38.43.9:30888
[Server] Armageddon{МегаДон}
viewtopic.php?f=23&t=29321

on the contrary, some mods were disabled after turning on steel glitches
then make a wipe of the world did not help

I think i3 he must be silly to such behavior (
should be a filter

2023-08-22 23:26:01: WARNING[Main]: Undeclared global variable "server" accessed at ...test/bin/../mods/grunds/grundsmg/commands/find_biome.lua:22
2023-08-22 23:26:01: WARNING[Main]: Undeclared global variable "server" accessed at ...8/minetest/bin/../mods/grunds/grundsmg/commands/grow.lua:26
white
green
red
yellow
blue

Powered by

██╗██████╗
██║╚════██╗
██║ █████╔╝
██║ ╚═══██╗
██║██████╔╝
╚═╝╚═════╝

2023-08-22 23:26:02: WARNING[Main]: Undeclared global variable "name" accessed at (load):170
2023-08-22 23:26:02: WARNING[Main]: Undeclared global variable "drop" accessed at (load):170
2023-08-22 23:26:02: ACTION[Main]: Server: Shutting down
2023-08-22 23:26:02: ERROR[Main]: ModError: Failed to load and run script from /home/mt888/minetest/bin/../mods/i3/init.lua:
2023-08-22 23:26:02: ERROR[Main]: (load):118: attempt to index local 'drop' (a nil value)
2023-08-22 23:26:02: ERROR[Main]: stack traceback:
2023-08-22 23:26:02: ERROR[Main]: (load):118: in function 'drop_table'
2023-08-22 23:26:02: ERROR[Main]: (load):170: in function 'caches'
2023-08-22 23:26:02: ERROR[Main]: (load):3: in function 'callbacks'
2023-08-22 23:26:02: ERROR[Main]: /home/mt888/minetest/bin/../mods/i3/init.lua:118: in main chunk

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests