[Mod] D00Med mobs [dmobs]

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod] D00Med mobs [dmobs]

by D00Med » Post

Yes
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

Astrobe
Member
Posts: 568
Joined: Sun Apr 01, 2018 10:46

Re: [Mod] D00Med mobs [dmobs]

by Astrobe » Post

If you lack inspiration, a hostile water mob that would spawn in cave lakes would be nice to have ;-).
My game? It's Minefall.

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod] D00Med mobs [dmobs]

by D00Med » Post

Yeah that would be good :) the problem with water mobs is that they can spawn in very small ponds, or in player's farms. And they get stuck a lot.
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] D00Med mobs [dmobs]

by texmex » Post

D00Med wrote:Yeah that would be good :) the problem with water mobs is that they can spawn in very small ponds, or in player's farms. And they get stuck a lot.
What about spawning them on a maximum Y level of say -15 in order to drastically increase the chance of the water mass being quite large?

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod] D00Med mobs [dmobs]

by D00Med » Post

That would certainly help
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

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

Re: [Mod] D00Med mobs [dmobs]

by azekill_DIABLO » Post

taikedz wrote: Giant phytoplankton.
Sorry I didn't saw this earlier. WTF
D00Med wrote:What about giant phytoplankton...that eat whales.
WTF intensifies
texmex wrote: What about spawning them on a maximum Y level of say -15 in order to drastically increase the chance of the water mass being quite large?
This is an excellent idea. This person is too clever.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Astrobe
Member
Posts: 568
Joined: Sun Apr 01, 2018 10:46

Re: [Mod] D00Med mobs [dmobs]

by Astrobe » Post

texmex wrote:
D00Med wrote:Yeah that would be good :) the problem with water mobs is that they can spawn in very small ponds, or in player's farms. And they get stuck a lot.
What about spawning them on a maximum Y level of say -15 in order to drastically increase the chance of the water mass being quite large?
That's what I did for sharks when I switched to Valleys MG (sharks in rivers!?). Not perfect, but that's an improvement.
My game? It's Minefall.

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

Re: [Mod] D00Med mobs [dmobs]

by SAMIAMNOT » Post

This mod looks cool, I'll check it out.
I test mines.

User avatar
grecaandreievich
Member
Posts: 11
Joined: Fri Aug 31, 2018 17:35

Re: [Mod] D00Med mobs [dmobs]

by grecaandreievich » Post

Hi, I am trying to use this mod but everytime I activate it on the game, I can see a tiny window that says there were an error to activate this mod because it has non allowed characters. Only the a-z 0-9 characters are permitted.
Can you help me with that?
Hola, papu.

User avatar
Krock
Developer
Posts: 4648
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] D00Med mobs [dmobs]

by Krock » Post

grecaandreievich wrote:Only the a-z 0-9 characters are permitted.
Rename the mod directory to "dmobs". https://wiki.minetest.net/Installing_Mo ... ling_a_mod
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

timdorohin
New member
Posts: 7
Joined: Mon Sep 03, 2018 09:47
IRC: timdorohin

Re: [Mod] D00Med mobs [dmobs]

by timdorohin » Post

Got this error when trying to use saddle on tamed dragon (red):

Code: Select all

2018-09-03 12:54:22: ACTION[Server]: singleplayer right-clicks object 28: LuaEntitySAO at (63.2976,186.586,-22.8375)
2018-09-03 12:54:22: WARNING[Server]: Undeclared global variable "set_animation" accessed at /home/tim/.minetest/mods/dmobs/api.lua:201
2018-09-03 12:54:22: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'dmobs' in callback luaentity_Step(): /home/tim/.minetest/mods/dmobs/api.lua:201: attempt to call global 'set_animation' (a nil value)
2018-09-03 12:54:22: ERROR[Main]: stack traceback:
2018-09-03 12:54:22: ERROR[Main]:       /home/tim/.minetest/mods/dmobs/api.lua:201: in function 'object_fly'
2018-09-03 12:54:22: ERROR[Main]:       /home/tim/.minetest/mods/dmobs/dragons/piloting.lua:52: in function 'do_custom'
2018-09-03 12:54:22: ERROR[Main]:       /home/tim/.minetest/mods/mobs_redo/api.lua:2934: in function </home/tim/.minetest/mods/mobs_redo/api.lua:2816>
It's a bug or i do something wrong?
UPD:fixed by using mobs:set_animation instead of set_animation in dmobs/api.lua
UPD2:ZOMG UBERLOL - wrong nest material - server crash
Question: how to heal my dragon?

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: [Mod] D00Med mobs [dmobs]

by wziard » Post

Hi.

First, thanks for the wonderful mobs.

But... We have a true infestation of dragons badgers and pandas now :D

Is there an easy way to decrease the spawn rate (especially for the dragons?) somewhat?

And maybe increase the elephants :-)

edit: Hm, I looked in the code and the spawn rate of dragons is set to 64000, which seems very low. but still there's loads of them around. Maybe I need to update my mobs_redo? I'll experiment.

Beam993
New member
Posts: 3
Joined: Mon May 20, 2019 12:42
GitHub: Beam
IRC: Beam
In-game: Beam

Re: [Mod] D00Med mobs [dmobs]

by Beam993 » Post

Whale swimming backward

piet
Member
Posts: 40
Joined: Mon May 06, 2019 10:16
In-game: piet

Re: [Mod] D00Med mobs [dmobs]

by piet » Post

its a nice mod but only some questions:

when i spawn the elephant i see that the feets off the elephant are underground

is it possible to sit on a tame dragon?

the kamikaze pig and the flying pig are the same why?

User avatar
Grossam
Member
Posts: 63
Joined: Sun Apr 02, 2017 07:21
GitHub: Grossam
IRC: Grossam
In-game: Grossam
Location: Bourges
Contact:

Re: [Mod] D00Med mobs [dmobs]

by Grossam » Post

I browsed the code quickly, and I can't find anything about the specific dragon gem (fire, ice and so on…). Are they a drop or a craft ?
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

User avatar
Grossam
Member
Posts: 63
Joined: Sun Apr 02, 2017 07:21
GitHub: Grossam
IRC: Grossam
In-game: Grossam
Location: Bourges
Contact:

Re: [Mod] D00Med mobs [dmobs]

by Grossam » Post

Hi ! I'm trying to modify dmobs. It's the first time I deal with the mobs_redo API, and I've several questions.


In dragon_normal.lua, I find this spawning rule :

Code: Select all

mobs:spawn_specific("dmobs:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)
According to this : https://notabug.org/TenPlus1/mobs_redo/ ... er/api.txt min_light is greater than max_light, so the dragon can't spawn. Is it a mistake (argument order is not the same in register_spawn and spawn_specifis) or is it on purpose ?

-------

Every spawning rules are gathered in spawn.lua except some dragons. Once again, is it on purpose, or is it a 'TODO' ?

-------

I want the mobs to spawn in ethereal biomes. Should I add a second register_spawn call to create a second rule if ethereal is loaded, or should I modify the 'nodes' argument and have only one rule if ethereal is loaded ?

--------

About this part of egg_hatch function :

Code: Select all

local dragonpairs = {
	fire = {colour="red",nest="default:lava_source"},
	lightning = {colour="black",nest="default:obsidian"},
	poison = {colour="green",nest="default:cactus"},
	ice = {colour="blue",nest="default:ice"},
	great = {colour="great",nest=""},
}

--

for nature,details in pairs(dragonpairs) do
		if ( wield_item == "dmobs:dragon_gem_"..nature and eggnode:find(nature) ) or
		   ( wield_item == "dmobs:dragon_gem" and eggnode == "dmobs:dragon_egg_great" ) then -- special case... because inconsiderate/inconsistent naming
		   
		   	minetest.chat_send_player(clicker:get_player_name(), " ... it ... swallowed the gem...")
		   	
			minetest.after(dmobs.eggtimer,
				function(pos, dragon, pname)
					local neweggnode = minetest.get_node(pos).name
					if eggnode ~= neweggnode then return end -- prevent infinite hatchings

					minetest.remove_node(pos)

					local thedragon = "dmobs:dragon_"..details.colour
					if eggnode == "dmobs:dragon_egg_great" then
						thedragon = "dmobs:dragon_great"
					end

					local ent = minetest.add_entity(pos, thedragon)
					minetest.sound_play("dmobs_chirrup",{pos=pos,max_hear_distance=20})
					
					local obj = ent:get_luaentity()
					if eggnode ~= "dmobs:dragon_egg_great" then
						ent:set_properties({
							textures = {"dmobs_dragon_young.png"},
							visual_size = {x=1, y=1},
						})
					end
					obj.tamed = true
					obj.owner = clicker:get_player_name()
				end,
				pos, clicker:get_player_name()
			)
			item:take_item()
			break
		end
	end -- for loop
It will try to spawn entities named dragon_black, dragon_blue and so on, but the registered mods are name dragon1, dragon2… this won't work, isn't it ?

Thank you !
Last edited by Grossam on Sun Jul 28, 2019 05:57, edited 2 times in total.
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] D00Med mobs [dmobs]

by TenPlus1 » Post

Grossam, try using the new mob spawning function instead, it's a lot easier to use and understand:

Code: Select all

mobs:spawn({
            name = "dmobs:dragon",
            nodes = {"air"},
            neighbor = {"default:stone"},
            min_light = 10,
            max_light = 15,
            interval = 300,
            chance = 15000,
            active_object_count = 2,
            min_height = -100,
            max_height = 11000,
})
... as for Ethereal nodes, this is what I use when spawning Hogs:

https://notabug.org/TenPlus1/mobs_anima ... og.lua#L62

User avatar
Grossam
Member
Posts: 63
Joined: Sun Apr 02, 2017 07:21
GitHub: Grossam
IRC: Grossam
In-game: Grossam
Location: Bourges
Contact:

Re: [Mod] D00Med mobs [dmobs]

by Grossam » Post

A single call of spawn with a variable for nodes and neighbours. Very simple ! Thank you !


I spend some times correcting several small bugs this morning, but I'm stuck with one : ice and water dragon arrows appear as 'unknown' objects instead of awaited dmobs:ice.

Here's the arrow registration routine :

Code: Select all

for _,arrowtype in pairs( {"ice","lightning","poison"} ) do
	base_arrow.textures = {"dmobs_"..arrowtype..".png"},
	mobs:register_arrow("dmobs:"..arrowtype, dmobs.deepclone(base_arrow) )
end
What's strange is that lightning and poison seem to work just fine. So I suspected a mispell in the mobs def themselves, bu they seem okay :

Code: Select all

-- Ice dragon

local dragondef = {
   type = "monster",
   passive = false,
   attacks_monsters = true,
   damage = 4,
   reach = 3,
   attack_type = "dogshoot",
   shoot_interval = 2.5,
	dogshoot_switch = 2,
	dogshoot_count = 0,
	dogshoot_count_max =5,
   arrow = "dmobs:ice", -- and so on…


-- Waterdragon (Hydra)

mobs:register_mob("dmobs:waterdragon", {
	type = "monster",
	passive = false,
	attack_type = "dogshoot",
	dogshoot_switch = 2,
	dogshoot_count = 0,
	dogshoot_count_max =5,
	shoot_interval = 2.5,
	arrow = "dmobs:ice", -- and so on…
Can someone spot what's wrong ?
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

User avatar
Grossam
Member
Posts: 63
Joined: Sun Apr 02, 2017 07:21
GitHub: Grossam
IRC: Grossam
In-game: Grossam
Location: Bourges
Contact:

Re: [Mod] D00Med mobs [dmobs]

by Grossam » Post

I'm made some tests with the spawn() function : I inserted nodes from unloaded mods in nodes and neighbor tables. It didn't raise any error, the unloaded nodes just seem to be ignored. So it seems that testing the presence of the mod isn't event necessary ?
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

User avatar
Grossam
Member
Posts: 63
Joined: Sun Apr 02, 2017 07:21
GitHub: Grossam
IRC: Grossam
In-game: Grossam
Location: Bourges
Contact:

Re: [Mod] D00Med mobs [dmobs]

by Grossam » Post

I finally found the arrow bug :

Code: Select all

for _,arrowtype in pairs( {"ice","lightning","poison"} ) do
   base_arrow.textures = {"dmobs_"..arrowtype..".png"},
   mobs:register_arrow("dmobs:"..arrowtype, dmobs.deepclone(base_arrow) )
end
The coma at the end of the base_arrow.texture line seems to mess the loop. I'm a coding beginner so if someone could explain why ? Seems to me it ends the loop, as an 'end' would do ?
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [Mod] D00Med mobs [dmobs]

by taikedz » Post

This is likely an artifact from my refactor of that code. This is quite an obscure bug - the following code

Code: Select all

function y()
  print("Hi")
end

-- This is like in the loop
x = 5,
y()
print(x)
Will print

Code: Select all

Hello
5
The comma just separates statements, in theory

So I would have expected the above to still work.

Nonetheless, it is still more correct to remove the comma.

You are welcome to make a pull request on D00med's repo, or to its clone here https://github.com/minetest-mobs-mods/dmobs , since D00med has said they are no longer maintaining the mod...

User avatar
Grossam
Member
Posts: 63
Joined: Sun Apr 02, 2017 07:21
GitHub: Grossam
IRC: Grossam
In-game: Grossam
Location: Bourges
Contact:

Re: [Mod] D00Med mobs [dmobs]

by Grossam » Post

Thank you taikedz.

I'd like to make a pull request later, but as my repo is not on github, I'm not sure how to do it.


Edit : finaly I just add to think a bit and I fou,d the way : adding yet another remote ! My piece of advice : test it a lot before accepting the request ;-)

New changes are coming, mainly creating more interesting drops for the mobs and change some of their caracteristics (stronger ogres, weake skeletons…). This will imply a revision of spawn frequencies.
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

Astrobe
Member
Posts: 568
Joined: Sun Apr 01, 2018 10:46

Re: [Mod] D00Med mobs [dmobs]

by Astrobe » Post

Lua in this case the comma separates expressions in a multiple assignment statement. As in:

Code: Select all

x, y = 5, 10 -- so x=5 and y=10
There is a similar thing happening in the code you are working on:

Code: Select all

for _,arrowtype in pairs( {"ice","lightning","poison"} ) do
pairs() returns two values (yes, in Lua you can) which are assigned to the variable "_" and the variable "arrowtype".

Nice catch BTW.

User avatar
Grossam
Member
Posts: 63
Joined: Sun Apr 02, 2017 07:21
GitHub: Grossam
IRC: Grossam
In-game: Grossam
Location: Bourges
Contact:

Re: [Mod] D00Med mobs [dmobs]

by Grossam » Post

OK, so the code was probably trying to perform an inexistant second assignement.

I spotted it while rewritting a part of the loop (to make yet another test). What my eyes couldn't see, my fingers detected !
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] D00Med mobs [dmobs]

by Inocudom » Post

D00Med has some other mods. Are you interested in those too? The one with the horror theme is one of his best.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 8 guests