[Mod] Mobs Redo [1.34] [mobs]

turtleman
New member
 
Posts: 7
Joined: Fri Sep 25, 2015 19:20
IRC: turtleman_
In-game: Traveler

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

by turtleman » Sun Sep 27, 2015 15:48

zzantozz wrote:I think this mod is causing crashes in 0.4.13. I'm seeing it cause the error mentioned in viewtopic.php?f=6&t=13177 in a server I'm running at home. One client saw a mobs:mese_monster fly out of the ocean and up into the sky right when this crash happened, and it kept happening and crashing the server when I restarted it. I think I've fixed it by disabling the mod and running the server for a while without it. A client saw an "unknown" flying up into the sky, but it didn't crash this time. I've enabled the mod again, and so far, all is well.


I am also getting a crash. Here is the output:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all

2015-09-27 11:44:06: ERROR[Main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2015-09-27 11:44:06: ERROR[Main]: Lua: Runtime error from mod 'mobs' in callback luaentity_Step(): /home/jason/.minetest/mods/mobs/api.lua:775: attempt to index field 'player' (a nil value)
2015-09-27 11:44:06: ERROR[Main]: stack traceback:
2015-09-27 11:44:06: ERROR[Main]:    /home/jason/.minetest/mods/mobs/api.lua:775: in function </home/jason/.minetest/mods/mobs/api.lua:189>

In thread b62dc740:
/build/minetest-h46uoF/minetest-201509261916/src/server.cpp:505: void Server::step(float): A fatal error occurred: Lua: Runtime error from mod 'mobs' in callback luaentity_Step(): /home/jason/.minetest/mods/mobs/api.lua:775: attempt to index field 'player' (a nil value)
stack traceback:
   /home/jason/.minetest/mods/mobs/api.lua:775: in function </home/jason/.minetest/mods/mobs/api.lua:189>
Debug stacks:
DEBUG STACK FOR THREAD b2fffb40:
#0  virtual void* EmergeThread::run()
#1  MapBlock* ServerMap::loadBlock(v3s16)
#2  MapSector* ServerMap::loadSectorMeta(std::string, bool)
DEBUG STACK FOR THREAD b3999b40:
#0  virtual void* ServerThread::run()
#1  void Server::Receive()
(Leftover data: #2  virtual void Server::deletingPeer(con::Peer*, bool))
(Leftover data: #3  void RemoteClient::GetNextBlocks(ServerEnvironment*, EmergeManager*, float, std::vector<PrioritySortedBlockTransfer>&))
(Leftover data: #4  void Server::SendHP(irr::u16, irr::u8))
(Leftover data: #5  bool getCraftingResult(Inventory*, ItemStack&, std::vector<ItemStack>&, bool, IGameDef*))
DEBUG STACK FOR THREAD b62dc740:
#0  int main(int, char**)
#1  Dedicated server branch
#2  void dedicated_server_loop(Server&, bool&)
#3  void Server::step(float)
(Leftover data: #4  void Server::SendAccessDenied_Legacy(irr::u16, const wstring&))
Aborted



This looks like the same issue:
https://github.com/tenplus1/mobs/issues/35

Except I am getting it with the latest version.
 

heavy gale
Member
 
Posts: 15
Joined: Fri Mar 14, 2014 18:37
GitHub: heavygale
In-game: Max or heavygale

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

by heavy gale » Wed Sep 30, 2015 15:20

What's up with those flying sheep?
Image
They've got 1 hp and don't move.

And it looks like items dropped by cows are placed one block too deep.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Wed Sep 30, 2015 15:32

Those are the old sheep entities which were replaced with the newer coloured sheep one's, they shouldnt move and when right-clicked will give 1 sheep spawn egg.

Update: Old sheep entities now fall down isntead of flying around, also Pumba's (hogs) now spawn in dry grass biomes and mob drops fall higher.
 

Glünggi
Member
 
Posts: 126
Joined: Wed Apr 16, 2014 08:13

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

by Glünggi » Thu Oct 01, 2015 15:21

an example for height dependent Mobs HP
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local highfa = {}
if self.health == 0 then
         -- HP
         -- note: attention: real hp.max = hp.min + hp.max * highfactor
         local highdefi = self.object:getpos().y
         if highdefi >= 0 then highfa = 0.1
         elseif highdefi <= -1 and highdefi >= -99 then highfa = 0.2
         elseif highdefi <= -100 and highdefi >= -249 then highfa = 0.3
         elseif highdefi <= -250 and highdefi >= -499 then highfa = 0.4
         elseif highdefi <= -500 and highdefi >= -749 then highfa = 0.5
         elseif highdefi <= -750 and highdefi >= -999 then highfa = 0.6
         elseif highdefi <= -1000 and highdefi >= -1249 then highfa = 0.7
         elseif highdefi <= -1250 and highdefi >= -1499 then highfa = 0.8
         elseif highdefi <= -1500 and highdefi >= -1749 then highfa = 0.9
         elseif highdefi <= -1750 then highfa = 1.0
         end
         self.health = self.hp_min + math.floor( self.hp_max * highfa )
      end
self.object:set_hp( self.health )
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

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

by duane » Thu Oct 01, 2015 15:56

Glünggi wrote:an example for height dependent Mobs HP


Or you could just say "highfa = math.sqrt(highdefi / -1750)" and call it close enough. : )
 

Glünggi
Member
 
Posts: 126
Joined: Wed Apr 16, 2014 08:13

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

by Glünggi » Thu Oct 01, 2015 16:00

Or you could just say "highfa = math.sqrt(highdefi / -1750)" and call it close enough

Thats the difference between knowlengh and a "math noob" :D

edit: knowlengh and knowledge its the difference between english and noenglish
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Tue Oct 13, 2015 04:29

when i go to eat a porkchop I get a mod "mobs" callback item on use error I can eat apples but porkchops nope. I've messed around with names and what the boar drops but still nothing.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Tue Oct 13, 2015 19:49

Soudon, it's not the mobs redo mod that's at fault, eating a chop raw or cooked works fine and with hudbars, the fault itself is with the hud/hunger mod you are using.
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Wed Oct 14, 2015 01:31

TenPlus1 wrote:Soudon, it's not the mobs redo mod that's at fault, eating a chop raw or cooked works fine and with hudbars, the fault itself is with the hud/hunger mod you are using.


Yea I figured that out I realized I didn't have hunger installed.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Fri Oct 16, 2015 11:45

Mob api has been re-written to be more modular and optimized where possible, also a new feature added to override each mobs spawn chance within the minetest.conf file, like so:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mobs:cow 10000
mobs:sheep 8000
mobs:sand_monster 100


... the lower the value, the more each mob will spawn. Thanks to LordFingle for the idea :)
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

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

by duane » Mon Oct 19, 2015 08:10

Is there supposed to be any way to access the set_velocity and set_animation(2) functions from do_custom anymore? They're very useful for digging functions, or anything where you need to override normal movement.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Mon Oct 19, 2015 20:12

I've made the functions within the mobs api global once again so they can be called from within do_custom, on_death etc. also set_animation2 is not set_animation. updated on github.
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

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

by duane » Tue Oct 20, 2015 00:23

TenPlus1 wrote:I've made the functions within the mobs api global once again so they can be called from within do_custom, on_death etc. also set_animation2 is not set_animation. updated on github.


Thanks. It might be safer to make them methods of mobs or the mob objects, but that's a nit-picky detail.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Tue Oct 20, 2015 20:14

duane: some of the functions were included in the mob function itself but was eventually separated to make code easier to maintain and read.
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Tue Oct 27, 2015 02:47

I want to have hostile mobs come at night a passive during the day, I have edited the light min and max but doesn't seem to work, also I have yet to see a cow spawn I even set the chance to 1 both in the minetest.conf right inside the minetest folder, also minetest.conf inside the game folder and with in the cow.lua still no cows. I just can't seem to figure out how to properly set it that hostiles come at night a passive during the day.

Sorry for rambling on on just I haven't been able to figure this one out.

Cow.lua:
+ Spoiler


Tree Monster.lua
+ Spoiler
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Tue Oct 27, 2015 09:15

We have two ways to spawn mobs in a world, the simple command being:

mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height)

e.g.

mobs:register_spawn("mobs:cow", {"default:dirt_with_grass", "ethereal:green_dirt"}, 15, 0, 5000, 5, 31000)

...and the very specific command:

mobs:spawn_specfic(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height)

e.g.

mobs:spawn_specific("mobs:tree_monster", {"group:leaves", "default:dirt_with_grass"}, {"air"}, 0, 10, 20, 7000, 5, 0, 31000)

Note: active object count is how many mobs, signs, itemframes, dropped items are in the one block area at one time, if it's more than the number specified then a mob will not spawn. Also light levels go from 0 to 15.

Also, having docile mobs during the day is a good idea so they only attack at night time or when the player hits them, thanks.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Tue Oct 27, 2015 10:46

Version 1.18 released, added docile_by_day flag so that mobs will not attack player during the day unless hit first, have applied this to the spider which can now spawn during daytime.
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Tue Oct 27, 2015 15:02

So the time scale 0-15 what is day and what is night, I've never sat down and figured it out. Doing /time 0 or any number up to 15 it stays dark
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

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

by firefox » Tue Oct 27, 2015 15:11

the time scale is far greater than 15.
5000 is shortly before sunrise.

0-15 is the level of light.
0 is darkness and 15 is sunlight.
14 is also registered as max_light to be used by lighting items.
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Tue Oct 27, 2015 15:20

firefox wrote:the time scale is far greater than 15.
5000 is shortly before sunrise.

0-15 is the level of light.
0 is darkness and 15 is sunlight.
14 is also registered as max_light to be used by lighting items.


Hey thanks now I just have to sit down and toy with it till im suited with the darkness level the hostile mobs spawn in. I like the docile flag but would rather the hostile mobs dont spawn period during they day.

Again thank you for the information.
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Tue Oct 27, 2015 17:20

TenPlus1 wrote:Version 1.18 released, added docile_by_day flag so that mobs will not attack player during the day unless hit first, have applied this to the spider which can now spawn during daytime.


awesome work here I just set my settings that all mobs spawn with light of 15, 0 and they all have a 15000 chance 5 object count and idk if it was a typo but I saw you had the height at 71 so I made them all that. cause all I did was copy your new api, and the docile function from the spider and pasted the api in the mobs folder and pasted the docile function in all my hostile mobs.

Now I face a new problem well not really a problem but they spawn way too many mobs lol. doesnt slow my game down at all. just I barely could get two or three to spawn now like 20+ including cows, sheep etc..

Great addition to this mod though it works so much better.
 

AceWill
Member
 
Posts: 30
Joined: Thu Oct 29, 2015 17:11

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

by AceWill » Thu Oct 29, 2015 17:53

Nice mod, however I do want to mention a few things aND make a few requests. First, is there a way to make mobs actually stay inside fences; they seem to mostly work, but my sheep in particular are managing to escape from a pen with a fence that is four blocks tall.
Additionally, is there a way to independently set the number of feedings to be different for taming, breeding, and feeding? So that, for instance, a sheep will regrow wool after one or two feedings while still requiring 8 to breed or tame.

Also, would it be possible to introduce a mechanic that lets sheep regrow wool or cows regenerate milk of their own accord? Not in such a way as to make it free, but give them the ability to feed themselves, at least to replenish wool or milk?


The creatures-MOB-Engine by BlockMen has a mechanic where sheep can regrow wool by eating a block of grass, turning it into just normal dirt. Having a system like that would be nice.

And the last thing on the list of requested features is some way to actually get chickens from eggs.
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

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

by firefox » Thu Oct 29, 2015 18:18

sheep and cows eating grass to replenish their resources sounds great.

i guess the "hatch chicken from egg" thing can be done with an ABM.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Thu Oct 29, 2015 20:28

I will look into having cows and sheep regrow wool or give more milk when eating 2 or 3 grass/wheat on their own, as for chickens from eggs, I could possible make it a throwable item and have a random chance of spawning a baby chick.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Thu Oct 29, 2015 20:54

TenPlus1 wrote:as for chickens from eggs, I could possible make it a throwable item and have a random chance of spawning a baby chick.

You could make an incubator. if you put an egg in then in x amount of time you get a chick.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Fri Oct 30, 2015 17:25

ok I have a new spider texture I would like to use but with the current texture I can't figure out where I should copy and paste the parts from the one I have to replace the one that comes with the mod. If you could just let me know which parts are the face,body,legs etc... im sure I could do the copy paste just fine, at this point if I simply replace it the eyes end up on the front left leg otherwise doesnt look too bad.

Image
Image
Image
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

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

by Ferk » Fri Oct 30, 2015 19:03

Check the current spider texture: https://github.com/tenplus1/mobs/blob/m ... spider.png (download it and zoom it)

It's not hard to see where the legs are, the abdomen is the bottom-left (the whiteish is the side that's facing up and black the side that faced the floor), and right above the abdomen is the head. I guess your texture is from minecraft? I don't expect it will match perfectly, but you could try adapting it.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Fri Oct 30, 2015 19:08

Ferk wrote:Check the current spider texture: https://github.com/tenplus1/mobs/blob/m ... spider.png (download it and zoom it)

It's not hard to see where the legs are, the abdomen is the bottom-left (the whiteish is the side that's facing up and black the side that faced the floor), and right above the abdomen is the head. I guess your texture is from minecraft? I don't expect it will match perfectly, but you could try adapting it.


It will work fine ive done it with the tree sand and dirt monsters was just hard tell with the spider.
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Fri Oct 30, 2015 19:32

Ferk wrote:Check the current spider texture: https://github.com/tenplus1/mobs/blob/m ... spider.png (download it and zoom it)

It's not hard to see where the legs are, the abdomen is the bottom-left (the whiteish is the side that's facing up and black the side that faced the floor), and right above the abdomen is the head. I guess your texture is from minecraft? I don't expect it will match perfectly, but you could try adapting it.


here is my final result I'm ok with it I wasn't trying to make 100% perfect but it works good enough for me.

Image
 

Soudon
Member
 
Posts: 167
Joined: Wed Apr 08, 2015 17:14
In-game: Soudon

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

by Soudon » Fri Oct 30, 2015 19:47

Ok did a little toying around with it I wasn't quite suited with the eyes. So this is now the final result

+ Spoiler
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 39 guests

cron