[Mod] Mobs Redo [1.61] [mobs]
Re: [Mod] Mobs Redo [1.56] [mobs]
Pandas will spawn in the bamboo biome when Ethereal mod is active, it's a special mob :) and penguins spawn on snowblocks.
-
- Member
- Posts: 204
- Joined: Sun Jul 10, 2016 05:00
- Location: Under Le' Sea
Re: [Mod] Mobs Redo [1.56] [mobs]
Ah, Thanks for this information!
Look at that, a signiture box! To bad I have nothing to put in i-... Wait...
Update:
- Mob babies can now be picked up by the lasso.
- Fixed a bug when sneak + right-clicking mob.
- Fixed a bug when sneak + right-clicking mob.
Re: [Mod] Mobs Redo [1.56] [mobs]
@TenPlus1 I have a technical question about mobs_redo. I'm making a mod where the goal is to have a bunch of very simple aimlessly roaming mobs. The catch though is that there will be at least 100 unique mobs, potentially 200. From looking at the mobs_redo code, this means every unique mob has an abm for spawning. Would the performance be better if I switched to something like mobkit and used a single spawning timer for all mobs? Something like this: https://github.com/Xanthus1/cube_mobs/b ... spawns.lua I'd obviously need to consider the spawning rates of the different mobs to get similar spawning as the abms, but it should be possible.
Re: [Mod] Mobs Redo [1.56] [mobs]
It is recommended to use github or gitlab, notabug and other code management platforms
Re: [Mod] Mobs Redo [1.56] [mobs]
Use whatever you are comfortable with, I use notabug.org because it's fast and simple :)
- MisterE
- Member
- Posts: 693
- Joined: Sun Feb 16, 2020 21:06
- GitHub: MisterE123
- IRC: MisterE
- In-game: MisterE
Re: [Mod] Mobs Redo [1.56] [mobs]
mobkit does have lower overhead code running anyways, I'm told. but you can write your own custom spawing for mobs too, you would have to anyways with mobkit. for 200+ simple mobs my suggestion at this point in mob api development is just to use mobs redo and write your own spawning useingminetest.add_entityisaiah658 wrote: ↑Tue Oct 05, 2021 11:31@TenPlus1 I have a technical question about mobs_redo. I'm making a mod where the goal is to have a bunch of very simple aimlessly roaming mobs. The catch though is that there will be at least 100 unique mobs, potentially 200. From looking at the mobs_redo code, this means every unique mob has an abm for spawning. Would the performance be better if I switched to something like mobkit and used a single spawning timer for all mobs? Something like this: https://github.com/Xanthus1/cube_mobs/b ... spawns.lua I'd obviously need to consider the spawning rates of the different mobs to get similar spawning as the abms, but it should be possible.
Re: [Mod] Mobs Redo [1.56] [mobs]
I've heard that as well, so I decided to do some testing using the Minetest profiler. I don't know if I'm not using mobkit correctly or if my testing is flawed, but in every test mobs redo did better than mobkit. I attempted to make the tests as comparable as possible. I followed the same steps in every test, used the same world seed, the same base game, etc. I made the same mob that just roams around in mobkit and mobs redo. I also did extra tests where I used my own abm to make the spawning condition identical in both mods. The mobkit on_step function appears to slower than the mobs redo on_step function, at least that's what the results were pointing towards. When I scaled it up to 100 unique mobs and thus 100 abm's, mobs redo was still a lot better than mobkit in the profiler results.MisterE wrote: ↑Tue Oct 05, 2021 23:31mobkit does have lower overhead code running anyways, I'm told. but you can write your own custom spawing for mobs too, you would have to anyways with mobkit. for 200+ simple mobs my suggestion at this point in mob api development is just to use mobs redo and write your own spawning useingminetest.add_entity
The important question though was whether a spawning timer like the one in cube mobs was better than an abm and the tests did show that timer was a bit better. My plan now is make my own spawning code for mobs redo and do more tests.
Re: [Mod] Mobs Redo [1.56] [mobs]
Making custom mobs using Mobs Redo api can easily make use of the do_custom function to bypass most of the api functions or a custom on_step to skip them completely. As for spawning, you could make your own wide checking abm that quick checks conditions and surrounding nodes to spawn one of many mobs (I use such a thing to spawn a ob with different textures or attributes).
https://notabug.org/TenPlus1/mobs_redo/ ... i.txt#L315
https://notabug.org/TenPlus1/mobs_redo/ ... i.txt#L315
horde spawning?
Hello I've just got an idea. But I want to know what other people think about this. How about spawning hordes of monsters? I think it might be fun to fight off groups of monsters but it would mean certain death for me early in the game. I like the idea but I don't know if I would survive.
Re: [Mod] Mobs Redo [1.56] [mobs]
By tweaking the mob api settings (mob_difficulty and mob_chance_multiplier) you can have hourdes appear using current mobs, or you can change the chance and interval settings in a mob:spawn() function to create your own monster hourde.
https://notabug.org/TenPlus1/mobs_redo/ ... gtypes.txt
https://notabug.org/TenPlus1/mobs_redo/ ... gtypes.txt
Re: [Mod] Mobs Redo [1.56] [mobs]
Is it somehow possible to make mobs like horses drowning only in deep water?
Actually, it looks like one node deep water caused the horse to drown. It doesn't look well, because the horse head is still above water in one node deep water.
Actually, it looks like one node deep water caused the horse to drown. It doesn't look well, because the horse head is still above water in one node deep water.
cdb_3P0AYqjEIn68
- Linuxdirk
- Member
- Posts: 3219
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: [Mod] Mobs Redo [1.56] [mobs]
Is there a way to prevent friendly mobs from despawning by default and spawning them based on the "mob density" of an area (i.e. there are 2 cows within an area of 4 blocks but there should be 3, so spawn another one but do not despawn any of them).
Re: [Mod] Mobs Redo [1.56] [mobs]
Mobs should be tamed (by feeding) to prevent despawn.
cdb_3P0AYqjEIn68
- Linuxdirk
- Member
- Posts: 3219
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: [Mod] Mobs Redo [1.56] [mobs]
I know. My question/request is specifically about untamed mobs.
Re: [Mod] Mobs Redo [1.56] [mobs]
Hi.
I've been looking for a way to execute some code when an entity is added to the game by the mobs_redo API. I looked at lua_api.txt but there doesn't seem to be a global callback for minetest.add_entity. The only thing I've found is cmi which looks like it would allow this with register_on_activatemob. Does that sound right?
Thanks for the help.
I've been looking for a way to execute some code when an entity is added to the game by the mobs_redo API. I looked at lua_api.txt but there doesn't seem to be a global callback for minetest.add_entity. The only thing I've found is cmi which looks like it would allow this with register_on_activatemob. Does that sound right?
Thanks for the help.
Re: [Mod] Mobs Redo [1.56] [mobs]
Mob definition has on_spawn, after_activate and do_custom functions that let you do something when a mob spawns:
https://notabug.org/TenPlus1/mobs_redo/ ... i.txt#L294
...also the mobs:spawn function itself has an on_spawn for when it appears in the world:
https://notabug.org/TenPlus1/mobs_redo/ ... i.txt#L406
https://notabug.org/TenPlus1/mobs_redo/ ... i.txt#L294
...also the mobs:spawn function itself has an on_spawn for when it appears in the world:
https://notabug.org/TenPlus1/mobs_redo/ ... i.txt#L406
Re: [Mod] Mobs Redo [1.56] [mobs]
Those appear to be functions for custom mobs. I don't want to make my own, I just want to be notified when one is spawned; in other words, some sort of global callback I can register to. I don't want to be periodically polling all entities and override their notify function either.
It looks like cmi does what I need, and mobs_redo seems to support it. I'll give it a try and see where it takes me.
Thanks.
It looks like cmi does what I need, and mobs_redo seems to support it. I'll give it a try and see where it takes me.
Thanks.
Re: [Mod] Mobs Redo [1.56] [mobs]
Ah ok, I assumed you wanted it to do something specific when a mob spawned :) Yeah cmi will let you know when a mob spawns.
Re: [Mod] Mobs Redo [1.56] [mobs]
hi
i cannot seem to download from notabug, are there any other download sites, i just need the npc and trader mod
i cannot seem to download from notabug, are there any other download sites, i just need the npc and trader mod
Re: [Mod] Mobs Redo [1.56] [mobs]
Use https://content.minetest.net/ for downloads and information, also notabug site was down the other day, it's back online now :)
Update:
- Translations updated
- Added 0.4.x compatibility for older clients
- Bug fixes and tweaks
- Added 0.4.x compatibility for older clients
- Bug fixes and tweaks
-
- Member
- Posts: 195
- Joined: Sun Dec 07, 2014 09:39
- GitHub: auouymous
- IRC: air
- In-game: auouymous
Re: [Mod] Mobs Redo [1.56] [mobs]
Why is acceleration and other velocity modifiers not multiplied by dtime in mobs.drive() in mount.lua? The velocity is being modified at inconsistent rates when dtime jitter is high. Changing entity.accel / 10 to entity.accel * dtime applies the correct amount of acceleration per step. And any other value added to entity.v, such as 0.02 * s and whatever happens to v, should also be multipled by dtime.
The max speed should be enforced by clamping to max speed, not by subtracting 1 from it. If the max forward or reverse speed is only 0.5 with a slow accel, it will ping pong between 0.5 and -0.5. Replacing all of the limiting code with the following would properly clamp it to max forward or reverse velocities.
-- enforce speed limit forward and reverse
if entity.v > entity.max_speed_forward then
entity.v = entity.max_speed_forward
elseif entity.v < -entity.max_speed_reverse then
entity.v = -entity.max_speed_reverse
end
The max speed should be enforced by clamping to max speed, not by subtracting 1 from it. If the max forward or reverse speed is only 0.5 with a slow accel, it will ping pong between 0.5 and -0.5. Replacing all of the limiting code with the following would properly clamp it to max forward or reverse velocities.
-- enforce speed limit forward and reverse
if entity.v > entity.max_speed_forward then
entity.v = entity.max_speed_forward
elseif entity.v < -entity.max_speed_reverse then
entity.v = -entity.max_speed_reverse
end
Update:
- Tweaked mobs.drive() speed (thanks auouymous)
-
- Member
- Posts: 195
- Joined: Sun Dec 07, 2014 09:39
- GitHub: auouymous
- IRC: air
- In-game: auouymous
Re: [Mod] Mobs Redo [1.56] [mobs]
Thank you for making those changes.
Minetest's tick rate appears to be the same as FPS, at least in single player. So players with high FPS would turn, accelerate and decelerate faster than those with low FPS.
The entity.v = entity.v - 0.02 * s should be changed to entity.v = entity.v - CONSTANT * s * dtime, but that 0.02 constant needs to be an actual deceleration drag (m/s/s) value. The constant could also be moved to a variable in entity so mods can tweak it.
There are four velo.y = velo.y ... lines whose constant should be multiplied by dtime. Like the 0.02 drag constant, the 1 and 0.1 must become actual vertical acceleration and deceleration values, and could be moved to entity variables adjustable by mods. There should also be max_speed_up and max_speed_down limits because the vertical velocity is incorrectly clamped to the accel value.
The two horz = horz ... lines should also have the constant an actual turn rate value, multiplied by dtime, and moved to a variable for mods.
The v = v * 0.25 should also use dtime but I'm not sure what it is used for or why the velocity is reduced by 75% per tick, and simply multiplying by dtime would be wrong. It should probably use something like the drag equation, with a much higher drag constant, and clamp to zero if the sign changes.
Minetest's tick rate appears to be the same as FPS, at least in single player. So players with high FPS would turn, accelerate and decelerate faster than those with low FPS.
The entity.v = entity.v - 0.02 * s should be changed to entity.v = entity.v - CONSTANT * s * dtime, but that 0.02 constant needs to be an actual deceleration drag (m/s/s) value. The constant could also be moved to a variable in entity so mods can tweak it.
There are four velo.y = velo.y ... lines whose constant should be multiplied by dtime. Like the 0.02 drag constant, the 1 and 0.1 must become actual vertical acceleration and deceleration values, and could be moved to entity variables adjustable by mods. There should also be max_speed_up and max_speed_down limits because the vertical velocity is incorrectly clamped to the accel value.
The two horz = horz ... lines should also have the constant an actual turn rate value, multiplied by dtime, and moved to a variable for mods.
The v = v * 0.25 should also use dtime but I'm not sure what it is used for or why the velocity is reduced by 75% per tick, and simply multiplying by dtime would be wrong. It should probably use something like the drag equation, with a much higher drag constant, and clamp to zero if the sign changes.
Who is online
Users browsing this forum: No registered users and 10 guests