[Mod] Petz [DEPRECATED] [petz]

The next Petz will be...

Deer (Prince Of The Forest)
10
33%
Vulture (King of the Death)
9
30%
Armadillo (Master in the Defense)
11
37%
 
Total votes: 30

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.0] [petz]

by runs » Post

LMD wrote:runs: I don't think the player size is a Minetest issue. You just have to keep in mind that your model's scale will be multiplied with the visual size of the entity it's attached to. You could see my advanced weapons mod for an example of working around this.
[override]
Last edited by runs on Sun Apr 19, 2020 02:07, edited 1 time in total.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.1] [petz]

by runs » Post

Well, finally I found the error in my code.

After attach I forced detach (visual_size =1 with timer).

So, no Minetest fault, but mine :-D

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.1] [petz]

by runs » Post

V9.2
- Better giant rider fix.

u18398

Re: [Mod] Petz [v9.2] [petz]

by u18398 » Post

crash with magen V6:

Code: Select all

2020-04-19 09:33:18: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'petz' in callback environment_Step(): ....minetest/mods/petz/petz/api/api_spawn.lua:196: attempt to perform arithmetic on local 'abr' (a string value)
2020-04-19 09:33:18: ERROR[Main]: stack traceback:
2020-04-19 09:33:18: ERROR[Main]:       ...minetest/mods/petz/petz/api/api_spawn.lua:196: in function '?'
2020-04-19 09:33:18: ERROR[Main]:       /usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
2020-04-19 09:33:18: ERROR[Main]: stack traceback:
crashed when switching my server from mobs_redo to mobkit and petz.

line 195 is:
local abr = minetest.get_mapgen_setting('active_block_range')

something like this fixes it:
local abr = tonumber(minetest.get_mapgen_setting('active_block_range')) or 2

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.2] [petz]

by runs » Post

Gundul wrote:crash with magen V6:

Code: Select all

2020-04-19 09:33:18: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'petz' in callback environment_Step(): ....minetest/mods/petz/petz/api/api_spawn.lua:196: attempt to perform arithmetic on local 'abr' (a string value)
2020-04-19 09:33:18: ERROR[Main]: stack traceback:
2020-04-19 09:33:18: ERROR[Main]:       ...minetest/mods/petz/petz/api/api_spawn.lua:196: in function '?'
2020-04-19 09:33:18: ERROR[Main]:       /usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
2020-04-19 09:33:18: ERROR[Main]: stack traceback:
crashed when switching my server from mobs_redo to mobkit and petz.

line 195 is:
local abr = minetest.get_mapgen_setting('active_block_range')

something like this fixes it:
local abr = tonumber(minetest.get_mapgen_setting('active_block_range')) or 2
This is very strange, that line is there from months. :-)

Do you use 5.3-dev?

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.2] [petz]

by runs » Post

Anyway, from the docs:

Code: Select all

Gets the active mapgen setting (or nil if none exists) in string format
So I will fix that. But the default Minetest value seems to be '3' not '2'.
Last edited by runs on Sun Apr 19, 2020 11:40, edited 1 time in total.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.3] [petz]

by runs » Post

- v9.3
- Fix: Crash in spawn engine beacuse of 'active_block_range set'.
- Improved flying behaviour when butterflies flying too low.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.3] [petz]

by runs » Post

v9.4

- Fix: Butterflies not set for spawn by default.

Rats!!!
Image
-Agressive mob.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.4] [petz]

by runs » Post

Well, I've made the rat video. I'll be uploading it shortly as a tutorial

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.4] [petz]

by runs » Post

v9.5
- Fix: Blood by default.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.5] [petz]

by runs » Post

v9.6
- You can capture a butterfly with a glass bottle. Decorative. When you break it, the butterfly liberates.

Bastrabun
Member
Posts: 212
Joined: Mon Nov 04, 2019 19:48

Re: [Mod] Petz [v9.6] [petz]

by Bastrabun » Post

A player of mine wondered, where the food comes from in the petz_bowl. Is it possible to give it some inventory and whenever the petz need to eat, take one from that stock?
Whatever I say is CC0

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.6] [petz]

by runs » Post

Bastrabun wrote:A player of mine wondered, where the food comes from in the petz_bowl. Is it possible to give it some inventory and whenever the petz need to eat, take one from that stock?
No, only is a decorative node plus the kitties and puppies stay close to it ... and ...do not need to fed them.

So you have to create a closed area with the bowl, and the petz will be fed. You have not to recharge the bowl. Also if you put the pavement of the kennel or whatever you defined in petz.con (without bowl).

In resume, to the petz to be automatically fed: pavement or bowl or both.

But good idea to charge the bowl with food, more difficulty to the tamaochi mode, I will implement!
Last edited by runs on Mon Apr 20, 2020 21:14, edited 1 time in total.

User avatar
shazen
Member
Posts: 20
Joined: Sat Apr 18, 2020 18:11

Re: [Mod] Petz [v9.4] [petz]

by shazen » Post

runs wrote:v9.5
- Fix: Blood by default.
Yes it works now, thanx

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.4] [petz]

by runs » Post

shazen wrote:
runs wrote:v9.5
- Fix: Blood by default.
Yes it works now, thanx
Yes, children can be traumatized :-)

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: [Mod] Petz [v9.6] [petz]

by CalebJ » Post

You should probably add an API for despawning. All these new little petz, its not worth it to have lots of beautiful butterflies if they take all your bandwidth ;-) That's not a problem for me, I've optimized everything I could: but for other servers it might be a problem. So the little petz (butterflies, ants, rats) could despawn once the player has moved on.

User avatar
LMD
Member
Posts: 1400
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Petz [v9.6] [petz]

by LMD » Post

I don't think despawning is a good idea, managing bandwith, only sending relevant objects and removing those far away ("despawning once the player moved on") is the engine's job.
My stuff: Projects - Mods - Website

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.6] [petz]

by runs » Post

CalebJ wrote:You should probably add an API for despawning. All these new little petz, its not worth it to have lots of beautiful butterflies if they take all your bandwidth ;-) That's not a problem for me, I've optimized everything I could: but for other servers it might be a problem. So the little petz (butterflies, ants, rats) could despawn once the player has moved on.
In my game (singleplayer) beyond 80 blocks the entities and chunks already despawn (well, they are frozen, unloaded until you go through there again.

You can limit in petz the mobs that spawn by area. And a command that when the player invokes it eliminates the mobs within the area. You can also choose which animals to spawn and which not.

If you are talking about better server management, I could enable an algorithm that would run from to to time, to slow down undomesticated animals, to clear areas. That's a good idea.

For example my birds and butterflies are not very intelligent, every 3 seconds they make the flight decisions, by random statistical estimations of movement, they almost don't check their environment. But curiously they are able to keep flying, get out of closed places and climb over mountains (things I didn't foresee when I made the flight behaviour). Could I improve it? Yes, maybe, but at the cost of being slower. What I mean is that sometimes less is more.

What would improve a lot is that the engine incorporates certain functions to make them faster. I think the developers want to do that now. For example, to search for entities close to you, like mobkit does with a function, which would be 100% better if the engine does it.

But yes, I will add an optional cron task to clear areas.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.6] [petz]

by runs » Post

v9.7
- Chnaged license for textures to CC BY-SA 4.0.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.7] [petz]

by runs » Post

v9.8
- Created a mokapi.cron_clear function. In 'petz.conf' set 'clear_mobs_time' (0 by default, disabled) to create a cron task to clear all the petz non-tamed mobs in the closest range of all the server's players from time to time.
Last edited by runs on Thu Apr 23, 2020 16:08, edited 1 time in total.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.6] [petz]

by runs » Post

CalebJ wrote:You should probably add an API for despawning. All these new little petz, its not worth it to have lots of beautiful butterflies if they take all your bandwidth ;-) That's not a problem for me, I've optimized everything I could: but for other servers it might be a problem. So the little petz (butterflies, ants, rats) could despawn once the player has moved on.
Check the last version. If you put the setting 'clear_mobs_time= 5', the non-tamed petz will be cleared each 5 seconds on your server.

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: [Mod] Petz [v9.8] [petz]

by CalebJ » Post

Suggestion: The cron job should be configurable per petz, turned off by default. This would be very useful because while some animals like cows and pigs should be permanent, little animals like rats, bees could be cleared from time to time.

Adnunano
Member
Posts: 43
Joined: Thu Feb 13, 2020 09:28

Re: [Mod] Petz [v9.8] [petz]

by Adnunano » Post

You should add an option to use minetest's damaging system in order to fix compability issues on some weapon mods.Spear's throw ability,Lone_Wolf's grenades and so on.
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: [Mod] Petz [v9.8] [petz]

by CalebJ » Post

Adnunano wrote:You should add an option to use minetest's damaging system in order to fix compability issues on some weapon mods.Spear's throw ability,Lone_Wolf's grenades and so on.
Totally agreed!

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Petz [v9.8] [petz]

by runs » Post

Adnunano wrote:You should add an option to use minetest's damaging system in order to fix compability issues on some weapon mods.Spear's throw ability,Lone_Wolf's grenades and so on.
It already does.

No, it's the other way around, those mods should be compatible with all other mods that add entities. But I'm afraid they only affect players.

Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests