[Mod] Mobs Redo [1.61] [mobs]

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: [Mod] Mobs Redo [1.52] [mobs]

by maikerumine » Post

I am not sure why this is happening.

2020-08-18 14:13:05: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_redo' in callback luaentity_Step(): Invalid position (expected table got nil).
2020-08-18 14:13:05: ERROR[Main]: stack traceback:
2020-08-18 14:13:05: ERROR[Main]: [C]: in function 'get_objects_inside_radius'
2020-08-18 14:13:05: ERROR[Main]: D:\MT\500\minetest-5.3.0-win64\bin\..\mods\mobs_redo/api.lua:1386: in function 'general_attack'
2020-08-18 14:13:05: ERROR[Main]: D:\MT\500\minetest-5.3.0-win64\bin\..\mods\mobs_redo/api.lua:2950: in function <D:\MT\500\minetest-5.3.0-win64\bin\..\mods\mobs_redo/api.lua:2822>



The only thing I can think of is an object was created without the meta.

EDIT: It happened again, and we need a nil check for line 114 in API:

-- calculate distance
local get_distance = function(a, b)

local x, y, z = a.x - b.x, a.y - b.y, a.z - b.z

return square(x * x + y * y + z * z)
end
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

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

Re: [Mod] Mobs Redo [1.52] [mobs]

by TenPlus1 » Post

@maikerumine - I've checked the lines from the error above and they seeml wrong, what version of the Mobs Redo API are you running as it's not the latest ?

Duvalon
Member
Posts: 46
Joined: Thu Jun 18, 2020 00:32
Location: Canada

Re: [Mod] Mobs Redo [1.52] [mobs]

by Duvalon » Post

Hi @TenPlus1,

I'm trying to debug a translation issue I'm having with most (if not all, I think) of your mods like mobs_redo, mobs_animals, and farming_redo among others.

I'm a little out of my depth in Lua--still learning--and I was wondering if you could take a look or at least point me in the right direction.

I have a server machine (Ubuntu Linux 20.04) which is setup with English locale, and a few client machines setup in French (Win10 laptop, Linux desktop and Android tablet). When I play on the server, the translations for your mods stay in English, the most obvious one being food items like potatoes. Some items are in French, notably the ones from MTG (default, doors, stairs, etc.)

I use a world created in the Whynot game which by default provides mobs_redo, mobs_monsters, mobs_animals, and farming_redo. However, all your mods are overridden and taken directly from your notabug repositories and at the latest revision of the master branch. The game also contains intllib; I use this one as is.

I copied the world and the mods folders over to my desktop, tried both in single player and server mode, and I get all the translations in French there.

Could it have something to do with the use of intllib (and/or local fallback) instead of the minetest translator? (v5 only?) If that's the case, and you're interested, I wouldn't mind converting everything over and submitting PRs. Would this might break backwards compatibility with v4 though?

Thanks.

Duvalon
Member
Posts: 46
Joined: Thu Jun 18, 2020 00:32
Location: Canada

Re: [Mod] Mobs Redo [1.52] [mobs]

by Duvalon » Post

Please correct me if I'm wrong, but it seems like the intllib module translates server-side, using the server's locale, whereas the v5 minetest translator translates client-side, using the client's locale accordingly.

mobs_redo has an unusual translation file format, but farming uses the v5 format. I was able to make it work easily by renaming the translation file from fr.txt to farming.fr.tr, and then changing the one line:

Code: Select all

diff --git a/init.lua b/init.lua
index 68d134c..8116868 100644
--- a/init.lua
+++ b/init.lua
@@ -27,7 +27,7 @@ end
 local statistics = dofile(farming.path .. "/statistics.lua")

 -- Intllib
-local S = dofile(farming.path .. "/intllib.lua")
+local S = minetest.get_translator(minetest.get_current_modname())
 farming.intllib = S

As mentioned in my previous post, I would be willing to make the necessary corrections to several of your mods and submit pull requests. If you would like, that is. Please let me know.

Thanks!

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

Re: [Mod] Mobs Redo [1.52] [mobs]

by TenPlus1 » Post

I will be making a move to convert all of my mods' translation files across to the new 5.x .tr format as those are much easier to keep up-to-date :)

Duvalon
Member
Posts: 46
Joined: Thu Jun 18, 2020 00:32
Location: Canada

Re: [Mod] Mobs Redo [1.52] [mobs]

by Duvalon » Post

@TenPlus1, you'll probably notice I have submitted a pull request to you for mobs_redo to update the translation files to v5 format. I have a script now that automates all the conversion. I will run it on other mods of yours unless you stop me :D

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

Re: [Mod] Mobs Redo [1.52] [mobs]

by TenPlus1 » Post

Thanks Duvalon, all help is appreciated :)

All mods have been updated with your new translations, thank you :P

Duvalon
Member
Posts: 46
Joined: Thu Jun 18, 2020 00:32
Location: Canada

Re: [Mod] Mobs Redo [1.52] [mobs]

by Duvalon » Post

You're very welcome! Glad to be of assistance.

If I may make a suggestion: when merging pull requests, would it be possible to use either 3-way or fast-forward merge instead of squash merge? I'm not very familiar with notabug.org so I'm not sure how to do that. I can't see any option for it in the settings of my repositories...

The main advantage for me would be to make merging and keeping track of upstream changes easier. As it is I end up with the following:

Code: Select all

 ~/devel/games/minetest/mods/ethereal$ git lg
* 88aacef - (il y a 14 minutes) mt5.x translations added/updated (thanks dacmot) - tenplus1 (upstream/master)
| * 626ab90 - (il y a 3 heures) Added french translation - Olivier Dragon (HEAD -> master, origin/master, origin/HEAD)
| * bbb7806 - (il y a 12 heures) Normalize translations - Olivier Dragon
|/  
* b229e2b - (il y a 4 jours) light staff works on all nodes with {stone=1} group - tenplus1
* 60ef937 - (il y a 4 jours) added 5.x translations - tenplus1
...
which means I need to reset my commits in order to cleanly merge your new squash merge, and then force push my master branch to keep in sync with yours.

In addition, not that I mind too much, especially not for translations, it would also keep the original commits author info.
Last edited by Duvalon on Sun Aug 30, 2020 02:31, edited 2 times in total.

isaiah658
Member
Posts: 171
Joined: Sun Jan 24, 2016 14:58
Contact:

Re: [Mod] Mobs Redo [1.52] [mobs]

by isaiah658 » Post

Is there any way to control the distance that the name tag can be seen by the player? I wish I could have it only show up either when hovering over a mob or when the player is within X amount of blocks.

User avatar
Wuzzy
Member
Posts: 4800
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Buggy kitten sound

by Wuzzy » Post

Bug report: mobs_kitten.ogg (from mobs_animal) is a stereo sound. This is a bug because positional sounds must be in mono, not stereo (see lua_api.txt). If a positional sound is in stereo, players will always hear it play at full volume, no matter the distance.

EDIT: Other stereo sound: mobs_fireball.ogg (from mobs_monster)

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

Updated to Version 1.53:

by TenPlus1 » Post

- Added 'on_map_load' setting to mobs:spawn function, spawning mobs on new areas of map only.

Kitten and fireball sound converted to mono, thanks Wuzzy :P

User avatar
TheQuantumMechanic1
New member
Posts: 2
Joined: Fri Aug 14, 2020 14:39
GitHub: TheQuantumMechanic
IRC: TheToothless
In-game: TheQuantumMechanic_or_ToothlessTheDragon
Location: In A State Of Craziness
Contact:

Re: [Mod] Mobs Redo [1.53] [mobs]

by TheQuantumMechanic1 » Post

Sorry, Didn't mean to post twice.
Last edited by TheQuantumMechanic1 on Mon Sep 14, 2020 19:19, edited 1 time in total.
gV2G4FyaM0j4Y1UF4bMxXliqpvCmOFyb

User avatar
TheQuantumMechanic1
New member
Posts: 2
Joined: Fri Aug 14, 2020 14:39
GitHub: TheQuantumMechanic
IRC: TheToothless
In-game: TheQuantumMechanic_or_ToothlessTheDragon
Location: In A State Of Craziness
Contact:

Re: [Mod] Mobs Redo [1.53] [mobs]

by TheQuantumMechanic1 » Post

What is an NPC? I was given one on a server and do not know what to do with it. What does NPC's do? All I can figure out is that when you right click the mob, the either stand or follow.

Bit confused.

-TheQuantumMechanic
gV2G4FyaM0j4Y1UF4bMxXliqpvCmOFyb

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Mod] Mobs Redo [1.53] [mobs]

by TumeniNodes » Post

TheQuantumMechanic1 wrote:
Mon Sep 14, 2020 19:18
What is an NPC? I was given one on a server and do not know what to do with it. What does NPC's do? All I can figure out is that when you right click the mob, the either stand or follow.

Bit confused.

-TheQuantumMechanic
https://en.wikipedia.org/wiki/Non-player_character
A Wonderful World

User avatar
sorcerykid
Member
Posts: 1847
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [Mod] Mobs Redo [1.53] [mobs]

by sorcerykid » Post

Thank you for fixing the kitten sound. I just applied it to my server. I was wondering for the longest time why it sounded like kittens were near me. At least it was a simple fix.

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

Re: [Mod] Mobs Redo [1.53] [mobs]

by TenPlus1 » Post

Sounds like one of red-fox's ninja kittens may have been stalking you :)

timsoft
Member
Posts: 58
Joined: Sat Jun 04, 2016 20:38
GitHub: timsoftgit

Re: [Mod] Mobs Redo [1.53] [mobs]

by timsoft » Post

hi, I am getting an error with mobs_monsters when using it with hamlets quest.
the dungeon master when he spits fire at you, when it hits, it looks like it tries to place a tnt:tnt block and explode it but this fails (on hamlets quest). It worked fine with earlier versions when the mobs were included, but now I have to add them manually it crashes.
AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_monster' in callback luaentity_Step(): Unknown node: tnt:tnt
stack traceback:
[C]: in function 'get_content_id'
...64\bin\..\games\hamlets_quest\mods\MTG_MODS\tnt\init.lua:302: in function 'tnt_explode'
...64\bin\..\games\hamlets_quest\mods\MTG_MODS\tnt\init.lua:417: in function 'boom'
C:\games\minetest-5.3.0-win64\bin\..\mods\mobs/api.lua:4132: in function 'boom'
...-5.3.0-win64\bin\..\mods\mobs_monster/dungeon_master.lua:137: in function 'hit_node'
C:\games\minetest-5.3.0-win64\bin\..\mods\mobs/api.lua:4036: in function <C:\games\minetest-5.3.0-win64\bin\..\mods\mobs/api.lua:4002>
i'm not sure if it is your mod or hamlet's that has changed since the udpate to minetest 5.3, so appologies in advance if this should be directed at hamlets quest. tnt appears to be enabled.

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

Re: [Mod] Mobs Redo [1.53] [mobs]

by Linuxdirk » Post

It happens on Minetest Game, too. I disabled the dungeon master in the mod's code.

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

Re: [Mod] Mobs Redo [1.53] [mobs]

by TenPlus1 » Post

this is an error in tnt mod which was fixed in dev version, failing that you can use my version of tnt mod from notabug.org/tenplus1

User avatar
Steamed_Punk
Member
Posts: 156
Joined: Sat Aug 10, 2019 13:31
GitHub: steamed-punk

Re: [Mod] Mobs Redo [1.53] [mobs]

by Steamed_Punk » Post

Hi TP1
Just enquiring here, I couldn't find the 'Mods_Animals' section only content.minetest.
I been having a hard time looking for animals and for more than 2 hours now, on foot, on a boat from land to land or just standing still and waiting and hoping and almost nothing. I have crossed 1 kitten and 1 cow in 2 hours and that's all. If i rarely find one cow on an the odd Island this may become a breeding problem.
What can i do (not creative spawn) to see more cows and sheep.
This is part of my hunt for buffalo which I still haven't seen yet (but that's another story).

cheers
The sky is not the limit - It's my playground

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

Re: [Mod] Mobs Redo [1.53] [mobs]

by TenPlus1 » Post

I have deliberately set spawn rates low for older machines and mobile devices but can be easily increased by going into settings -> mods -> mobs -> and setting mobs_chance_multiplier to a higher value eg. 2 doubles spawn rate, 3 triples it etc.

User avatar
Steamed_Punk
Member
Posts: 156
Joined: Sat Aug 10, 2019 13:31
GitHub: steamed-punk

Re: [Mod] Mobs Redo [1.53] [mobs]

by Steamed_Punk » Post

TenPlus1 wrote:
Sun Sep 20, 2020 15:53
I have deliberately set spawn rates low for older machines and mobile devices but can be easily increased by going into settings -> mods -> mobs -> and setting mobs_chance_multiplier to a higher value eg. 2 doubles spawn rate, 3 triples it etc.
OK, cool! Good idea taking older machines into consideration. I'll play with the setting now.
cheers and thanks for the 2 speedy replies.
The sky is not the limit - It's my playground

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

Re: [Mod] Mobs Redo [1.53] [mobs]

by TenPlus1 » Post

You can also add custom spawn rates to the minetest.conf file for particular mods:

mobs_animal:cow = 5000,4

... this changes cows to spawn 1 in 5000 with 4 in every map block :)

User avatar
Steamed_Punk
Member
Posts: 156
Joined: Sat Aug 10, 2019 13:31
GitHub: steamed-punk

Re: [Mod] Mobs Redo [1.53] [mobs]

by Steamed_Punk » Post

Haha, that's good to know. I will have a look.

On the other hand I am creating and starting new maps (checking mods are enabled) as I augment the count and now have the 'mobs_chance_multiplier' at 20. I haven't crossed any animal since i last saw the kitten and a cow i mentioned before.
1) Do you have a suggested 'ideal' count for this?
2) I have a sort of sea-life mod that adds stuff (no name) and can see the beasts that come with it, even if they are far and few between. Are there known conflicts between you animals and other mods that have animals?
3)Does the mobs_chance_multiplier you mentioned up spawn rates for all mobs on all mods or just yours? I ask because I see no trace of my mod in there, but can see a couple of others I installed. Obviously I am wondering if there would be to many buffalo running around (If ever I find them) and how to get my mod in there for users to finely control stuff!
The sky is not the limit - It's my playground

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

Re: [Mod] Mobs Redo [1.53] [mobs]

by TenPlus1 » Post

The mob_chance_multiplier affects the ABM used to spawn all mobs (usually every 30 seconds) and divides it's base chance setting by the multiplier, so if a cow is 1 in 9000 spawn, setting the multiplier to 2 makes it 1 in 4500, but is still requires the spawn node and neighbor nodes to be present for this to happen.

All mobs mods should play well together so long as they use different mob names (which they do), we use quite a few on Xanadu server and spawning is set to normal while using the Ethereal mapgen and mobs spawn quite regularly depending on biome e.g. cows and sheep spawn on green grass neighbouring grass plant, hogs spawn on mushroom soil.

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests