Mobkit - Entity API [mobkit][alpha]

User avatar
Andrey01
Member
 
Posts: 2352
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Mobkit - Entity API [mobkit][alpha]

by Andrey01 » Tue Dec 24, 2019 17:56

I`m making a head rotation API and I don`t know how to fix those horrible rotations represented on the video below (maybe pretty of low resolution, but I couldn`t do else):
Image
zombies_head_rotation.gif
(921.98 KiB) Not downloaded yet


Why does a head become to rotate in the spiral-like direction around the one`s torso and even being changed along 'y' axis if I change only the current rotation?

Mobkit and zombiestrd github sources:
https://github.com/Andrey2470T/mobkit
https://github.com/Andrey2470T/zombiestrd
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha]

by Termos » Fri Dec 27, 2019 20:25

First guess, I'd check alignment of the head model. All rotations pivot around model's 0,0,0, so if the model is way up it would move like a hammer instead of rotating.
The zero point should be roughly around the bottom face of that cuboid.
 

User avatar
GamingAssociation39
Member
 
Posts: 825
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Re: Mobkit - Entity API [mobkit][alpha]

by GamingAssociation39 » Sat Dec 28, 2019 00:39

Is it possible to make a mob stay put but still move and bite passing players?
Jesus Is Lord and Savior!!!
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha]

by Termos » Sat Dec 28, 2019 14:42

GamingAssociation39 wrote:Is it possible to make a mob stay put but still move and bite passing players?

Sure.
Actually such a behavior should be very simple, as it doesn't even involve moving around. Just turn towards the player, play an attack animation and punch if still in range.
 

Gundul
Member
 
Posts: 734
Joined: Thu Aug 27, 2015 10:55
Location: Europe/Asia
GitHub: berengma
IRC: Gundul

Re: Mobkit - Entity API [mobkit][alpha]

by Gundul » Mon Jan 13, 2020 09:01

Your eagle now flies with radar :)

viewtopic.php?f=9&t=23436&p=365285#p365285
My servers: Jungle, Lilly in the valley, ZombieTest
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha]

by Termos » Mon Jan 13, 2020 19:57

Gundul wrote:Your eagle now flies with radar :)
viewtopic.php?f=9&t=23436&p=365285#p365285

I tried releasing eagles in a sparse forest, most of them managed to slalom between trees and gain altitude. Nicely done!
 

User avatar
ElCeejo
Member
 
Posts: 62
Joined: Thu Feb 28, 2019 23:29
Location: The darkest corner in your house
In-game: ElCeejo

Re: Mobkit - Entity API [mobkit][alpha]

by ElCeejo » Sat Feb 01, 2020 05:40

I've noticed while working on large hitbox support that mobs seem to have issues with snow. Just thought I'd tell you in case you didn't notice.
 

User avatar
runs
Member
 
Posts: 1200
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Mobkit - Entity API [mobkit][alpha]

by runs » Sat Feb 01, 2020 12:21

Hi
how could I check a mob not moving?
And not jumping? self.isonground?
Day 3 of the quarantine
 

Gundul
Member
 
Posts: 734
Joined: Thu Aug 27, 2015 10:55
Location: Europe/Asia
GitHub: berengma
IRC: Gundul

Re: Mobkit - Entity API [mobkit][alpha]

by Gundul » Sat Feb 01, 2020 12:40

runs wrote:Hi
how could I check a mob not moving?
And not jumping? self.isonground?

not jumping: self.isongorund
not moving: check length of velocity vector
My servers: Jungle, Lilly in the valley, ZombieTest
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha]

by Termos » Sat Feb 01, 2020 16:47

ElCeejo wrote:I've noticed while working on large hitbox support that mobs seem to have issues with snow. Just thought I'd tell you in case you didn't notice.

Yes, that's an artifact from 4.17 where nodes didn't have separate collision boxes. This bug is kinda fun and harmless so I don't feel hard pressed to fix it.

As to large box support, I am working on it, but in the meantime I got bored by working around various engine issues so now I'm trying to fix some of them and that will be the priority for some time. If I succeed it will make things better for everyone.
 

Gundul
Member
 
Posts: 734
Joined: Thu Aug 27, 2015 10:55
Location: Europe/Asia
GitHub: berengma
IRC: Gundul

Re: Mobkit - Entity API [mobkit][alpha]

by Gundul » Tue Feb 04, 2020 05:42

Is there a special reason why hq_goto target stops 3 nodes in front of target ?

Code: Select all
function mobkit.hq_goto(self,prty,tpos)
   [...]
         if vector.distance(pos,tpos) > 3 then
   [...]
   end
   mobkit.queue_high(self,func,prty)
end
My servers: Jungle, Lilly in the valley, ZombieTest
 

User avatar
runs
Member
 
Posts: 1200
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Mobkit - Entity API [mobkit][alpha]

by runs » Tue Feb 04, 2020 20:59

Termos wrote:As to large box support, I am working on it, but in the meantime I got bored by working around various engine issues so now I'm trying to fix some of them and that will be the priority for some time. If I succeed it will make things better for everyone.


Yes, engine bugs firstly :-)
Day 3 of the quarantine
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha]

by Termos » Tue Feb 04, 2020 23:51

Gundul wrote:Is there a special reason why hq_goto target stops 3 nodes in front of target ?

Haven't found any use for that one. Iirc it's just a general area, also if you send more than one mob to the same spot they won't be fighting for the exact location.

It's a simple behavior, just copy it and modify as needed.
 

Gundul
Member
 
Posts: 734
Joined: Thu Aug 27, 2015 10:55
Location: Europe/Asia
GitHub: berengma
IRC: Gundul

Re: Mobkit - Entity API [mobkit][alpha]

by Gundul » Wed Feb 05, 2020 04:42

Termos wrote:
Gundul wrote:Is there a special reason why hq_goto target stops 3 nodes in front of target ?

Haven't found any use for that one. Iirc it's just a general area, also if you send more than one mob to the same spot they won't be fighting for the exact location.

It's a simple behavior, just copy it and modify as needed.

That's what I always do :)
Only, it took some time until I figured out why it was not working from the beginning, documentation says:
Code: Select all
function mobkit.hq_goto(self,prty,tpos)
   -- go to tpos position
   -- returns on arrival

I was wondering why my deers all starved. But they never reached their food, stopping 3 nodes in front of it XD
My servers: Jungle, Lilly in the valley, ZombieTest
 

User avatar
ElCeejo
Member
 
Posts: 62
Joined: Thu Feb 28, 2019 23:29
Location: The darkest corner in your house
In-game: ElCeejo

Re: Mobkit - Entity API [mobkit][alpha]

by ElCeejo » Sun Feb 09, 2020 20:51

I've come across a problem, for some reason my mobs give me an error saying "lastvelocity" is nil at line 939 in mobkits init file. Any idea what would cause this?
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha]

by Termos » Sun Feb 09, 2020 22:28

ElCeejo wrote:I've come across a problem, for some reason my mobs give me an error saying "lastvelocity" is nil at line 939 in mobkits init file. Any idea what would cause this?

The most common cause would be them not using mobkit.actfunc() in their on_activate callback.
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha] - a request

by Termos » Mon Feb 10, 2020 14:05

Just got a request for those who want better mobs in Minetest and can be bothered to compile MT from source.

Please consider helping me test this PR: https://github.com/minetest/minetest/pull/9343
 

User avatar
runs
Member
 
Posts: 1200
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Mobkit - Entity API [mobkit][alpha] - a request

by runs » Mon Feb 10, 2020 17:06

Termos wrote:Just got a request for those who want better mobs in Minetest and can be bothered to compile MT from source.

Please consider helping me test this PR: https://github.com/minetest/minetest/pull/9343


I have 5.1.1. Can I compile that?
Day 3 of the quarantine
 

User avatar
runs
Member
 
Posts: 1200
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Mobkit - Entity API [mobkit][alpha]

by runs » Tue Feb 11, 2020 17:56

can 'mobkit.get_spawn_pos_abr' get a span pos into water?
Day 3 of the quarantine
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha] - a request

by Termos » Tue Feb 11, 2020 18:45

Yes, besides a position it returns liquidflag which indicates if the node at pos is covered in liquid.
If it's false try to spawn a land creature, if it's true an aquatic one.

runs wrote:I have 5.1.1. Can I compile that?

The PR is based on master which is currently 5.2. dev
 

User avatar
runs
Member
 
Posts: 1200
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Mobkit - Entity API [mobkit][alpha]

by runs » Thu Feb 13, 2020 01:45

A user of my petz mod reported me that aquatic animals spawn so rarely, and in shallows. Can be caused by the player rarely face the oceans?
Day 3 of the quarantine
 

Termos
Member
 
Posts: 299
Joined: Sun Dec 16, 2018 12:50

Re: Mobkit - Entity API [mobkit][alpha]

by Termos » Thu Feb 13, 2020 18:30

runs wrote:Can be caused by the player rarely face the oceans?

Technically yes, but then they have to get near water to be able to tell spawn rate is low, so I'd look elsewhere.

Try checking your spawn chances, and oh, the function only tells you if there's any water, so if you don't want them to spawn in shallows, you should check if it's deep enough.
 

User avatar
ElCeejo
Member
 
Posts: 62
Joined: Thu Feb 28, 2019 23:29
Location: The darkest corner in your house
In-game: ElCeejo

Re: Mobkit - Entity API [mobkit][alpha]

by ElCeejo » Wed Feb 19, 2020 05:07

Is there a way of letting mobs freely roam through water as if they were on land aside from rewriting half of mobkit?
 

User avatar
Lone_Wolf
Member
 
Posts: 2296
Joined: Sun Apr 09, 2017 05:50
Location: Not there, THERE!
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf

Re: Mobkit - Entity API [mobkit][alpha]

by Lone_Wolf » Wed Feb 19, 2020 05:34

ElCeejo wrote:Is there a way of letting mobs freely roam through water as if they were on land aside from rewriting half of mobkit?

Can't just make them sink 100% and remove/offset the drown checks?
 

Gundul
Member
 
Posts: 734
Joined: Thu Aug 27, 2015 10:55
Location: Europe/Asia
GitHub: berengma
IRC: Gundul

Re: Mobkit - Entity API [mobkit][alpha]

by Gundul » Wed Feb 19, 2020 05:43

ElCeejo wrote:Is there a way of letting mobs freely roam through water as if they were on land aside from rewriting half of mobkit?

What kind of mobs, do you mean like fish and swimming ? Or walking underwater, or floating on the surface ?
My servers: Jungle, Lilly in the valley, ZombieTest
 

PreviousNext

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 1 guest