[Mod] Mobs Redo [1.53] [mobs]

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

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

by TenPlus1 » Post

It sounds like farming and mobs need to be added as a soft dependency to hbhunger to work properly... Add these lines to the depends.txt file in the hbhunger mod:

mobs?
farming?

User avatar
v-rob
Developer
Posts: 793
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

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

by v-rob » Post

Are there any blend files for the stone monsters? They would be very useful for something I'm working on.
GUI Core Developer | My Best Mods: Bridger - Slats - Stained Glass | To contact me, send a PM

dawgdoc
Member
Posts: 253
Joined: Mon Feb 27, 2017 01:10
GitHub: dawgdoc

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

by dawgdoc » Post

TenPlus1 wrote:It sounds like farming and mobs need to be added as a soft dependency to hbhunger to work properly... Add these lines to the depends.txt file in the hbhunger mod:

mobs?
farming?
Thank you TenPlus1

And my apologies to you and Wuzzy. I went to follow your instructions and found that several files were missing from my hbhunger folder, one of them depends.txt. I corrected the file structure and on a cursory peek in my established world all seems well.
Give a man a fish, feed him for a day. Give a kid a fish, it's going to die.

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

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

by TenPlus1 » Post

Updated:

- Added 'explosion_timer' to mob registry, defaults to 3 if not set.
- Explosion style mobs start counting down when inside reach and continue until out of view range.

nvrsbr
Member
Posts: 57
Joined: Fri Jun 05, 2015 19:42

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

by nvrsbr » Post

Rabbits are crashing my game?

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

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

by TenPlus1 » Post

rabbits seem to work fine here, show the console error please.

User avatar
maikerumine
Member
Posts: 1392
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

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

by maikerumine » Post

TenPlus1 wrote:rabbits seem to work fine here, show the console error please.
Here:

Code: Select all

2017-10-27 09:19:23: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_mc' in callback LuaABM::trigger(): ...etest-0.5.0-3cea7a3-win64\bin\..\mods\mobs_mc/rabbit.lua:147: attempt to call method 'get_luaentity' (a nil value)
2017-10-27 09:19:23: ERROR[Main]: stack traceback:
2017-10-27 09:19:23: ERROR[Main]: 	...etest-0.5.0-3cea7a3-win64\bin\..\mods\mobs_mc/rabbit.lua:147: in function 'on_spawn'
2017-10-27 09:19:23: ERROR[Main]: 	...netest-0.5.0-3cea7a3-win64\bin\..\mods\mobs_redo/api.lua:2939: in function <...netest-0.5.0-3cea7a3-win64\bin\..\mods\mobs_redo/api.lua:2839>
Sigh... Everytime you update the api, all older mobs break every now and again. LOL


Ten, can you tell me the difference between these snippits?


NEW API:

Code: Select all

			if minetest.registered_entities[name] then

				local mob = minetest.add_entity(pos, name)
--[[
				print ("[mobs] Spawned " .. name .. " at "
				.. minetest.pos_to_string(pos) .. " on "
				.. node.name .. " near " .. neighbors[1])
]]
				if on_spawn then

					local ent = mob:get_luaentity()

					on_spawn(ent, pos)
				end
			else
				minetest.log("warning", string.format("[mobs] %s failed to spawn at %s",
					name, minetest.pos_to_string(pos)))
			end


OLD API:

Code: Select all

			local mob = minetest.add_entity(pos, name)

			if mob and mob:get_luaentity() then
--				print ("[mobs] Spawned " .. name .. " at "
--				.. minetest.pos_to_string(pos) .. " on "
--				.. node.name .. " near " .. neighbors[1])
				if on_spawn and not on_spawn(mob, pos) then
					return
				end
			else
				minetest.log("warning", string.format("[mobs] %s failed to spawn at %s",
					name, minetest.pos_to_string(pos)))
			end
For some reason our bunnies now are incompatible with the new spawning in the new api because we used this:

Code: Select all

-- Mob spawning rules.
-- Different skins depending on spawn location

local spawn = {
	name = "mobs_mc:rabbit",
	neighbors = {"air"},
	chance = 15000,
	active_object_count = 99,
	min_light = 0,
	max_light = minetest.LIGHT_MAX+1,
	min_height = mobs_mc.spawn_height.overworld_min,
	max_height = mobs_mc.spawn_height.overworld_max,
}

local spawn_desert = table.copy(spawn)
spawn_desert.nodes = mobs_mc.spawn.desert
local on_spawn = function(self, pos)
	local ent = self:get_luaentity()
	local texture = "mobs_mc_rabbit_gold.png"
	ent.base_texture = { "mobs_mc_rabbit_gold.png" }
	self:set_properties({textures = ent.base_texture})
end
mobs:spawn(spawn_desert)

local spawn_snow = table.copy(spawn)
spawn_snow.nodes = mobs_mc.spawn.snow
spawn_snow.on_spawn = function(self, pos)
	local ent = self:get_luaentity()
	local texture
	local r = math.random(1, 100)
	-- 80% white fur
	if r <= 80 then
		texture = "mobs_mc_rabbit_white.png"
	-- 20% black and white fur
	else
		texture = "mobs_mc_rabbit_white_splotched.png"
	end
	ent.base_texture = { texture }
	self:set_properties({textures = ent.base_texture})
end
mobs:spawn(spawn_snow)

local spawn_grass = table.copy(spawn)
spawn_grass.nodes = mobs_mc.spawn.grassland
spawn_grass.on_spawn = function(self, pos)
	local ent = self:get_luaentity()
	local texture
	local r = math.random(1, 100)
	-- 50% brown fur
	if r <= 50 then
		texture = "mobs_mc_rabbit_brown.png"
	-- 40% salt fur
	elseif r <= 90 then
		texture = "mobs_mc_rabbit_salt.png"
	-- 10% black fur
	else
		texture = "mobs_mc_rabbit_black.png"
	end
	ent.base_texture = { texture }
	self:set_properties({textures = ent.base_texture})
end
mobs:spawn(spawn_grass)
Extreme Survival Minetest-->viewtopic.php?f=10&t=12959

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

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

by TenPlus1 » Post

on_spawn doesn't need a get_luaentity, that is already passed in 'self'

User avatar
Wuzzy
Member
Posts: 4088
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

TenPlus1: You should clearly state in API docs that “self” refers to the LuaEntitiy, not the object.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
paramat
Developer
Posts: 3699
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

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

by paramat » Post

Please could you tell me the licenses for the skin textures in mobs_npc?
Any objection to any of these being used in a skins mod for MTGame?

User avatar
PolySaken
Member
Posts: 652
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

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

by PolySaken » Post

you need to add mod.conf to make the horses work.
i did it on mine, and they work just fine.

jon
New member
Posts: 3
Joined: Sun Nov 12, 2017 15:36

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

by jon » Post

Can somebody help a total n00b?

I have trouble loading this mod.
All i get is "api.lua:27: attempt to index field 'settings' (a nil value)"
The offending line is: local creative_mode_cache = minetest.settings:get_bool("creative_mode")
I'm using 0.4.13.

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

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

by Lone_Wolf » Post

jon wrote:Can somebody help a total n00b?

I have trouble loading this mod.
All i get is "api.lua:27: attempt to index field 'settings' (a nil value)"
The offending line is: local creative_mode_cache = minetest.settings:get_bool("creative_mode")
I'm using 0.4.13.
Get the latest version here

jon
New member
Posts: 3
Joined: Sun Nov 12, 2017 15:36

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

by jon » Post

Yup. Of course. 5 minutes after posting this I figured out I had an old version. Too slow to delete. :)

paradigm
Member
Posts: 10
Joined: Mon Nov 13, 2017 12:53

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

by paradigm » Post

Is there a way to keep mobs away from an area? I've only been at this for a few days, but I managed to install the mobs_scifi mod, and I went to the house my son and I build and there was a giant robot in it. LOL It was stuck so I tried to kill it and it blew up my house. hahaha. I know some mobs are afraid of light. Is there a way to globally keep all mobs from all packs away from a certain area? I want to make a safe place for my son to run back to when he dies or is scared. (he's 7)

Thanks

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

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

by Lone_Wolf » Post

Maybe prevent them from spawning in a protected area? Or is that already a feature?

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

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

by TenPlus1 » Post

Add this line to your minetest.conf file to stop mobs spawning inside protected areas:

mobs_spawn_protected = false

paradigm
Member
Posts: 10
Joined: Mon Nov 13, 2017 12:53

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

by paradigm » Post

Ahhh! That is perfect. Thank you!

User avatar
DancingWombat
Member
Posts: 14
Joined: Tue Nov 14, 2017 12:53

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

by DancingWombat » Post

Help, I'm being invaded by unknown creepy headless mobs since the last update. They spawn right in front of you, and walk towards you but if you attack them they disappear, more appear in their place and sometimes are replaced with TNT which then explodes. They spawn even if only mobs redo is enabled, I have no clue what they are.

Image
Creepymobs.png
(630.93 KiB) Not downloaded yet

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

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

by TenPlus1 » Post

You must have a mod enabled that supplies the creepy no-head dudes, check to see which one it is so I can assist.

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

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

by Lone_Wolf » Post

How would I make only 5 ghosts spawn at a time in any light condition? Not sure which of the highlighted numbers applies to what
mobs:register_spawn("ghost:ghost", {"default:cloud","nyanland:cloudstone"}, 1, 0, 7000, 10, 31000)
Non highlighted version:

Code: Select all

mobs:register_spawn("ghost:ghost", {"default:cloud","nyanland:cloudstone"}, 1, 0, 7000, 10, 31000)

User avatar
DancingWombat
Member
Posts: 14
Joined: Tue Nov 14, 2017 12:53

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

by DancingWombat » Post

After a thorough investigation, I think I've fixed it, seems it was some experimental mob code in this old mod (which I'd completely forgotten was even installed), viewtopic.php?f=13&t=7321 I removed the offending code, so far so good.

User avatar
azekill_DIABLO
Member
Posts: 7497
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

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

by azekill_DIABLO » Post

They looked cheerful maybe they only wanted hugs :D

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

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

by Lone_Wolf » Post

When that fireball hits the protection logo the item I am currently holding will disappear. Think you could fix this?
Image

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

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

by hajo » Post

For mobs-animal, can you add a donkey,
eg. as a 'new' horse with gray texture ?

Edit: I just noticed that horses are in mob-horse.
Maybe the donkey doesn't need horseshoes.
Last edited by hajo on Tue Nov 28, 2017 20:49, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests