Ah, I understand now, walk_speed is max_speed :-DTermos wrote:I'm surprised it doesn't crash, set_properties() is supposed to take a table as parameter, not strings.runs wrote:I think my problem is with 'self.object:set_properties':Code: Select all
self.object:set_properties("textures", "texture.png") end
maybe try something like:
local props = self.object:get_properties()
props.textures = {'texture.png'}
self.object:set_properties(props)
Dat look good! ;)runs wrote: I mean that current run speed or follow is fast a lot.
Check it:
https://streamable.com/qlu0z
You mean their follow speed is too fast?
hq_follow uses maximum speed for mobs to try and keep up with the player. I you feel it's too fast, you might want to modify hq_follow, or just reduce entity walk_speed overall.
Mobkit - Entity API [mobkit][alpha]
Re: Mobkit - Entity API [mobkit][alpha]
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: Mobkit - Entity API [mobkit][alpha]
IIRC you could just do this too: self.object:set_properties({textures = {"texture.png"}})Termos wrote: I'm surprised it doesn't crash, set_properties() is supposed to take a table as parameter, not strings.
maybe try something like:
local props = self.object:get_properties()
props.textures = {'texture.png'}
self.object:set_properties(props)
Re: Mobkit - Entity API [mobkit][alpha]
This is probably the case, in fact, 'zombies' uses it this way to set collisionbox alone.Lone_Wolf wrote: IIRC you could just do this too: self.object:set_properties({textures = {"texture.png"}})
One problem I noticed, it makes models blink white when set_properties is called, but only in 5.0.0
Re: Mobkit - little Testserver
Thanks Man, this is super cool!Gundul wrote: i set up a little server for testing in multi player enviroment:
gundul.ddnss.de Port 39155
I don't have an opportunity to set up my own server and test it online.
I was afraid it might be unplayable due to lag, but checked it out and it seems to work surprisingly well.
Unfortunately, i forgot to remove some last minute diag messages again, sorry for that.
I'm gonna fix it for the next time, if you want to get rid of them sooner
comment out the line 1028 in mobkit\init.lua, it says minetest.chat_send...
Re: Mobkit - Entity API [mobkit][alpha]
That was the solution
self.object:set_properties({textures = {"texture.png"}})
Now it works!
https://streamable.com/5yppe
self.object:set_properties({textures = {"texture.png"}})
Now it works!
https://streamable.com/5yppe
Re: Mobkit - little Testserver
You're welcome. I first tested your wildlife mod and that was really convincing. I have mobs_redo running on my bigger server "Jungle". It runs also on "lilly in the valley" but very restricted. But the behaviour of your mobTermos wrote: Thanks Man, this is super cool!
I don't have an opportunity to set up my own server and test it online.
I was afraid it might be unplayable due to lag, but checked it out and it seems to work surprisingly well.
brains is much more natural. I still remember the wolve chasing the deers. That would be a very nice addition to Lilly's world :)
Thanks, found it.Termos wrote: Unfortunately, i forgot to remove some last minute diag messages again, sorry for that.
I'm gonna fix it for the next time, if you want to get rid of them sooner
comment out the line 1028 in mobkit\init.lua, it says minetest.chat_send...
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: Mobkit - little Testserver
It was a lot of fun to play on. Although it could probably use some apple trees and the endless_apples mod :PGundul wrote:I like that mobkit api very much already :) wildlife and zombies do show
very good what already is possible.
i set up a little server for testing in multi player enviroment:
gundul.ddnss.de Port 39155
kill as many zombies as you can and enter the leaderboard
type /score to see it.
No rules, just go crazy and kill them all, any chrashes will be reported here.
Minetest version is 5.1.0 dev
Re: Mobkit - Entity API [mobkit][alpha]
I wonder why you put the 100 value assigned to 'death', instead of 0?
:-)
:-)
Re: Mobkit - Entity API [mobkit][alpha]
When hp goes zero entities are instantly removed by the engine, and an ugly ass snowflake is displayed in their place.runs wrote:I wonder why you put the 100 value assigned to 'death', instead of 0?
There seems to be no way around this.
Treating a higher number as death is a quick and dirty workaround. Setting armor_groups to 'immortal' seems neater, but it requires custom handling all damage, also objects stop flashing when hit and that's kinda cool.
Wildlife and zombies
Your wildlife mod is not working with your current mobkit api ?
I was thinking like wildlife would be a nice addition to zombieworld and to
see what will happen if wolves, zombies and deers live together :)
But what happens is this :
I was thinking like wildlife would be a nice addition to zombieworld and to
see what will happen if wolves, zombies and deers live together :)
But what happens is this :
Code: Select all
2019-06-08 11:29:55: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'wildlife' in callback luaentity_Step(): .minetest/mods/mobkit/init.lua:434: attempt to compare number with userdata
2019-06-08 11:29:55: ERROR[Main]: stack traceback:
2019-06-08 11:29:55: ERROR[Main]: .minetest/mods/mobkit/init.lua:434: in function 'queue_high'
2019-06-08 11:29:55: ERROR[Main]: .minetest/mods/mobkit/init.lua:862: in function 'hq_hunt'
2019-06-08 11:29:55: ERROR[Main]: .minetest/mods/wildlife/init.lua:28: in function 'brainfunc'
2019-06-08 11:29:55: ERROR[Main]: .minetest/mods/mobkit/init.lua:1147: in function </home/admin/.minetest/mods/mobkit/init.lua:1040>
2019-06-08 11:29:56: ACTION[Server]: Gundul leaves game. List of players:
2019-06-08 11:29:56: ACTION[Main]: Server: Shutting down
Re: Mobkit - little Testserver
There are apple trees now, and also a tiny treasure island :)Lone_Wolf wrote:It was a lot of fun to play on. Although it could probably use some apple trees and the endless_apples mod :PGundul wrote: kill as many zombies as you can and enter the leaderboard
type /score to see it.
No rules, just go crazy and kill them all, any chrashes will be reported here.
Minetest version is 5.1.0 dev
viewtopic.php?f=10&t=22667#p348945
Re: Wildlife and zombies
No it isn't compatible, I haven't gotten around to it yet, but since there's demand, I'm on it.Gundul wrote:Your wildlife mod is not working with your current mobkit api ?
I was thinking like wildlife would be a nice addition to zombieworld and to
see what will happen if wolves, zombies and deers live together :)
Punching wolves when they're busy chasing their prey are we? ;)Gundul wrote: 2019-06-08 11:29:55: ERROR[Main]: .minetest/mods/mobkit/init.lua:862: in function 'hq_hunt'
Re: Wildlife and zombies
No, honestly :) I was just watching. Server crashed a few seconds after I logged in.Termos wrote:Punching wolves when they're busy chasing their prey are we? ;)Gundul wrote: 2019-06-08 11:29:55: ERROR[Main]: .minetest/mods/mobkit/init.lua:862: in function 'hq_hunt'
Re: Mobkit - Entity API [mobkit][alpha]
Some requests:
several random animations for stand, walk, run...
Behaviours for aquatic and flying mobs
:-)
several random animations for stand, walk, run...
Behaviours for aquatic and flying mobs
:-)
Re: Mobkit - Entity API [mobkit][alpha]
You mean something similar to what minetest api does with sounds, like having 'walk1', 'walk2' etc. and when you use 'walk' it picks one randomly?runs wrote: several random animations for stand, walk, run...
Haven't considered this before, typical MT models have two animations at the most.
I'll think about it.
I have something planned out for the near future, no revealing yet though ;)runs wrote: Behaviours for aquatic and flying mobs
Re: Mobkit - Entity API [mobkit][alpha]
Like mobs_redo does. Usually, walk and run have only one animation and is enough. But when the mobs remain still, it would be cool to have more animations, this makes feel the mob more alive.Termos wrote:You mean something similar to what minetest api does with sounds, like having 'walk1', 'walk2' etc. and when you use 'walk' it picks one randomly?runs wrote: several random animations for stand, walk, run...
Haven't considered this before, typical MT models have two animations at the most.
I'll think about it
Re: Mobkit - Entity API [mobkit][alpha]
Allrighty then. It already can be done using custom behaviors, but having this on entity definition is much better.runs wrote: But when the mobs remain still, it would be cool to have more animations, this makes feel the mob more alive.
I came up with something like this:
Code: Select all
animation = {
walk={range={x=41,y=101},speed=30,loop=true},
idle={
{range={x=0,y=9},speed=1,loop=true},
{range={x=10,y=19},speed=2,loop=true},
{range={x=20,y=29},speed=30,loop=true},
},
}
In the example, 'idle' animation will be chosen randomly out of the three.
mobkit.animate function call remains unchanged.
Please let me know if this is more or less what you had in mind.
Re: Mobkit - Entity API [mobkit][alpha]
Yes, it was my idea.Termos wrote:Allrighty then. It already can be done using custom behaviors, but having this on entity definition is much better.runs wrote: But when the mobs remain still, it would be cool to have more animations, this makes feel the mob more alive.
I came up with something like this:
variant animation must be an array of tables.Code: Select all
animation = { walk={range={x=41,y=101},speed=30,loop=true}, idle={ {range={x=0,y=9},speed=1,loop=true}, {range={x=10,y=19},speed=2,loop=true}, {range={x=20,y=29},speed=30,loop=true}, }, }
In the example, 'idle' animation will be chosen randomly out of the three.
mobkit.animate function call remains unchanged.
Please let me know if this is more or less what you had in mind.
Re: Mobkit - Entity API [mobkit][alpha]
Release 0.10.1
A minor update.
changes:
- both xample mods: zombies and wildlife are now bundled in
- wildlife: spawn parameters can be modified via the settings menu
- wildlife: new herbivore sounds added
- zombies: spawn parameters can be modified via the settings menu
- mobkit: fixed crash when 'unknown objects' present
- mobkit: walk_speed renamed to max_speed
- mobkit: random variant animations support added
- mobkit: dir_to_rot() function added
A minor update.
changes:
- both xample mods: zombies and wildlife are now bundled in
- wildlife: spawn parameters can be modified via the settings menu
- wildlife: new herbivore sounds added
- zombies: spawn parameters can be modified via the settings menu
- mobkit: fixed crash when 'unknown objects' present
- mobkit: walk_speed renamed to max_speed
- mobkit: random variant animations support added
- mobkit: dir_to_rot() function added
- handy for aquatic and flying animals, projectiles etc.
- May not seem like much, but this function is quite helpful
and essential for moving big entities
(think like 2 by 3 meters collisionbox, dinosaurs etc.)
- An abstraction of example mod spawn algorithm
Also can be used alongside other mods instead of inefficient ABM spawning method.
Re: Mobkit - Entity API [mobkit][alpha]
Cool. How mobkit: dir_to_rot() works?
Re: Mobkit - Entity API [mobkit][alpha]
Cool thanks, Server software is updated. Now with deers and wolves, too :)Termos wrote:Release 0.10.1
A minor update.
viewtopic.php?f=10&t=22667
Re: Mobkit - Entity API [mobkit][alpha]
I think like predators and prey should be able to swim through little rivers. Especially if prey is
fleeing and predators are hunting like in the situation in the picture below.
Maybe prey would avoid rivers if fleeing, but the wolve like in the picture would swim to get his
food.
fleeing and predators are hunting like in the situation in the picture below.
Maybe prey would avoid rivers if fleeing, but the wolve like in the picture would swim to get his
food.
Re: Mobkit - Entity API [mobkit][alpha]
I concur ;) It would be nice if there were more behaviors. Priorities, priorities...Gundul wrote:I think like predators and prey should be able to swim through little rivers. Especially if prey is
fleeing and predators are hunting like in the situation in the picture below.
A behavior as described is possible, but it's probably more tricky than it sounds,
for example, the problem with rivers generated by Valleys mapgen is they are often impassable, so a mob would have to find a viable landing spot on the other side before they decide to jump in.
Re: Mobkit - Entity API [mobkit][alpha]
It converts a 3d vector into another that corresponds to an entity facing that vector, and can be passed to minetest.set_rotation()runs wrote:Cool. How mobkit: dir_to_rot() works?
obj:set_rotation(mobkit.dir_to_rot(v,rot))
- v - a 3d vector (velocity for example)
- rot - Current rotation (optional). Pass it if you want to preserve entity rotation in case some v components go zero (e.g. entity stops). Ignore if you want to make the check yourself beforehand or you don't care.
Re: Mobkit - Entity API [mobkit][alpha]
I have an issue when a mob dies, lays one node above ground.
Who is online
Users browsing this forum: No registered users and 58 guests