[Mod] Goblins [goblins]

jlamothe
New member
Posts: 4
Joined: Tue Oct 18, 2022 23:23
In-game: jlamothe

Re: [Mod] Goblins [goblins]

by jlamothe » Post

I'm helping a friend to debug a minetest server that seems to be having this issue. It's unclear what version of the mod he's using but he seems to be running into this problem. I'm a bit of a Lua novice and don't know the Minetest API that well, but based on the stack trace and some poking around in the code, the problem appears to be in the goblins.lua file (line 339):

Code: Select all

goblins.tool_attach(self, goblins.comp.default.sword_bronze)
In this case, goblins.comp.default.sword_bronze appears to be passing a nil value for some reason.

It's probably also worth looking at items.lua line 96:

Code: Select all

local tool_table = string.split(tool, ":")
to ensure that the value of tool is actually a string.

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

jlamothe wrote:
Tue Oct 03, 2023 23:57

It's probably also worth looking at items.lua line 96:

Code: Select all

local tool_table = string.split(tool, ":")
to ensure that the value of tool is actually a string.
Hi jlamothe,
I've added the check and updated the mod. Apologies for the long wait.
Edit 12/14: I also noticed some other issues with behaviors and minetest settings parsing and have posted another update last night.

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

Improvements for trading and goblin chest loot mainly affecting Mineclone2 users. Much more variety (particularly foodstuffs) is now tradable with goblins but there are some limits for each kind of item for better immersion. Some node fixes for MC2 as well.

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Update [Mod] Goblins [goblins]

by FreeLikeGNU » Post

Made some visual cues (emotive particles) for trading with the goblins to rely less on text.
edit: Also fixed some text issues. Goblins should be working as well with Mineclonia as Mineclone2.
Image
Image

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Update: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

  • Update 2024/01/15: Fix settings (again) and special gift description check
  • Update 2024/01/13:
    • Fix incorrect dates in changelog :P
    • Added "pushable" property for mob collisions when using Mobs Redo.
    • Reduced goblin same item acceptance
    • Added enchanted goblin gifts support for Mineclone/Mineclonia (MTG enchanting mod support may come later)

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

  • Update 2024/08/22: Fixed crashing for Mineclonia game support!

adikalon
Member
Posts: 31
Joined: Fri Jul 26, 2024 07:37

Re: [Mod] Goblins [goblins]

by adikalon » Post

FreeLikeGNU wrote:
Fri Aug 23, 2024 05:19
  • Update 2024/08/22: Fixed crashing for Mineclonia game support!
First of all thanks for this mod.

Could you please remove the goblins from the nether?

And by the way, when I dig this block, I get an unknown item default:flint1
https://i.postimg.cc/JnqSf67V/screensho ... 112700.png

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

adikalon wrote:
Fri Aug 23, 2024 08:35
Could you please remove the goblins from the nether?
Are they actually appearing there? I've cleaned up the spawning def (lots of unused commented stuff) regardless.
adikalon wrote:
Fri Aug 23, 2024 08:35
And by the way, when I dig this block, I get an unknown item default:flint1
Thank you for catching this! It should be fixed now.
Glad you enjoy the goblins!

adikalon
Member
Posts: 31
Joined: Fri Jul 26, 2024 07:37

Re: [Mod] Goblins [goblins]

by adikalon » Post

FreeLikeGNU wrote:
Fri Aug 23, 2024 12:13
Are they actually appearing there?
I just met him, but didn’t have time to take a screenshot, he was killed :(
Maybe it’s worth using global variables nether? nether.DEPTH_FLOOR and nether.DEPTH_CEILING ?

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

Interesting I'm using the global var for overworld depth (-128) as the lowest spawn depth.
https://gitlab.com/freelikegnu/goblins/ ... type=heads

Code: Select all

local min_height       = tonumber( mcl_vars.mg_overworld_min ) -- they should be found to the depths of the overworld, MC2 and Mineclonia also differ in this :P
local max_height       = -10

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

Re: [Mod] Goblins [goblins]

by TenPlus1 » Post

@FreeLikeGNU - Had a similar issue with mobs_water and sharks spawning in rivers even though spawn max_height was set to 0.

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

@TenPlus1 - the gobs use any of the overworld underground and deep_undergound biomes (found in MCLA) now. I also noticed that any of their max_height values are decreased by 10. I wonder if biome assignment does something to min or max height on MCLA?

I pushed a new release that fixes database entries for goblin spawning in and also fixed an old gobdog crashing bug in MTG, MC2, and MCLA. Also modified the speed of goblins in MC2 / MCLA. Hopefully spawning is behaving better now in MCLA.

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

Latest update allows Goblins to learn about and accept food from (probably) any food or farming mod such as TenPlus1's Farming Redo. If you are near a goblin when you eat something, it may become curious and accept it as a gift. Maybe it will give you something back if you are kind and persistent with gifts! Other goblins from the same territory will want the newly discovered food as well. This will make it easier to befriend a large number of them!

adikalon
Member
Posts: 31
Joined: Fri Jul 26, 2024 07:37

Re: [Mod] Goblins [goblins]

by adikalon » Post

FreeLikeGNU wrote:
Mon Sep 02, 2024 21:14
Latest update allows Goblins to learn about and accept food from (probably) any food or farming mod such as TenPlus1's Farming Redo. If you are near a goblin when you eat something, it may become curious and accept it as a gift. Maybe it will give you something back if you are kind and persistent with gifts! Other goblins from the same territory will want the newly discovered food as well. This will make it easier to befriend a large number of them!
Always this error:
https://i.postimg.cc/jqQjRx3q/2024-09-04-05-30-49.png

Fauxtonic
Member
Posts: 19
Joined: Sat Jan 20, 2018 03:59

Re: [Mod] Goblins [goblins]

by Fauxtonic » Post

This mod had been working fine, but as of late, it is crashing Minetest with the following error:

AsyncErr: Lua: Runtime error from mod 'goblins' in callback luaentity_Step(): ... 5.4.1 -win64\minetest\bin\..\mods\goblins/behaviors.lua:105: attempt to call field 'objects_inside_radius' (a nil value)
stack traceback:
... 5.4.1 -win64\minetest\bin\..\mods\goblins/behaviors.lua:105: in function 'attack'
... 5.4.1 -win64\minetest\bin\..\mods\goblins/behaviors.lua:1126: in function 'goblin_dog_behaviors'
...st 5.4.1 -win64\minetest\bin\..\mods\goblins/animals.lua:171: in function 'do_custom'
D:\Minetest 5.4.1 -win64\minetest\bin\..\mods\mobs/api.lua:3333: in function <D:\Minetest 5.4.1 -win64\minetest\bin\..\mods\mobs/api.lua:3232>

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

I added nil checks to this function to mitigate crashing. What version minetest are you using?
nvm it appears you are using 5.4 and I stated that the mod is compatible.

There was a change to API in July that added the function I'm now using which breaks goblins for older MT versions.

https://github.com/minetest/minetest/pull/14769

I will revert this change to goblins tonight. Very sorry about the breakage!

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

Pushed new release with 5.4 compatibility fixes and really stupid vector math crashes. I don't know how this was even working on my dev machine. Thank you all for the error reports and kindly let me know if all is well now!

adikalon
Member
Posts: 31
Joined: Fri Jul 26, 2024 07:37

Re: [Mod] Goblins [goblins]

by adikalon » Post

FreeLikeGNU wrote:
Thu Sep 05, 2024 01:22
kindly let me know if all is well now!
Everything seems to be fine now

hutson
New member
Posts: 1
Joined: Sat Sep 07, 2024 19:52

Re: [Mod] Goblins [goblins]

by hutson » Post

I recently switched from playing Minetest Game to playing VoxeLibre (formerly MineClone2). I am using Minetest 5.6.1 installed on a Debian 12 (Bookworm) system.

The Goblins mod worked well using Minetest 5.6.1 and the Minetest Game. However, an exception is raised while playing VoxelLibre. It appears VoxeLibre causes the

Code: Select all

mc2_compat.lua
file to be invoked, which calls a function not defined in Minetest 5.6.1. It appears

Code: Select all

get_game_info
was added in Minetest 5.7.

Code: Select all

2024-09-07 20:07:45: ERROR[Main]: ModError: Failed to load and run script from /var/games/minetest-server/.minetest/mods/goblins/init.lua:
2024-09-07 20:07:45: ERROR[Main]: ...es/minetest-server/.minetest/mods/goblins/mc2_compat.lua:163: attempt to call field 'get_game_info' (a nil value)
2024-09-07 20:07:45: ERROR[Main]: stack traceback:
2024-09-07 20:07:45: ERROR[Main]:       ...es/minetest-server/.minetest/mods/goblins/mc2_compat.lua:163: in function 'spawn'
2024-09-07 20:07:45: ERROR[Main]:       ...mes/minetest-server/.minetest/mods/goblins/utilities.lua:100: in function 'generate'
2024-09-07 20:07:45: ERROR[Main]:       /var/games/minetest-server/.minetest/mods/goblins/init.lua:137: in main chunk
It looks like

Code: Select all

get_game_info
was added about ~2 weeks ago.

Is Minetest 5.6 or lower intended to be supported with VoxeLibre?

As a simple test, I was able to place the following line above the call to the function mentioned above:

Code: Select all

minetest.log("action", "[HUTSON] The setting 'default_game' is: " .. minetest.settings:get("default_game"))
In minetest.log the output is:
2024-09-07 20:51:54: ACTION[Main]: [HUTSON] The setting 'default_game' is: mineclone2

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

@hutson I posted a version omitting this function for checking to remediate the crashing. Something seems odd about VL spawning that is not fully compatible with Goblins. I would recommend using Mineclonia over VL at this point.

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

Image


Goblins now generate lairs if dungeons are enabled in the mapgen! These will only appear in newly generated areas of a map. This can be used with Mineclonia if Minetest native dungeons are enabled in the games settings.

mineclonia_dungeons-2024-09-06_15-30.png
mineclonia_dungeons-2024-09-06_15-30.png (17.11 KiB) Viewed 310 times

adikalon
Member
Posts: 31
Joined: Fri Jul 26, 2024 07:37

Re: [Mod] Goblins [goblins]

by adikalon » Post

Code: Select all

ModError: Failed to load and run script from /home/adikalon/.minetest/mods/goblins/init.lua:
/home/adikalon/.minetest/mods/goblins/content.lua:14: attempt to index field 'comp' (a nil value)
stack traceback:
	/home/adikalon/.minetest/mods/goblins/content.lua:14: in main chunk
	[C]: in function 'dofile'
	/home/adikalon/.minetest/mods/goblins/init.lua:117: in main chunk
Подробности в debug.txt.

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

@adikalon my apologies for breaking this! I just released a fix. Thank you for reporting!

User avatar
FreeLikeGNU
Member
Posts: 299
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [Mod] Goblins [goblins]

by FreeLikeGNU » Post

Support for Hades Revisited and Repixture (with Mobs Redo) games added!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest