[Mod] D00Med mobs [dmobs]

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 made some changes in scifi_nodes too. You may have a look at them here : https://git.fwhost.eu/Grossam/scifi_nodes
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

klera
Member
Posts: 23
Joined: Tue Mar 03, 2020 12:18

Re: [Mod] D00Med mobs [dmobs]

by klera » Post

What do i have to change that Dragons spawn only at higher locations (30+) ? Don't like them in Woods or at Grasland when i spawn first. Thanks.

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

All is in the spawn.lua file. You have to twead sime parameters of the mobs:spawn function. You 'll find some details in the mobs_redo API documentation.
Gloire à qui, n'ayant pas d'idéal sacro-saint,
Se borne à ne pas trop emmerder ses voisins.

klera
Member
Posts: 23
Joined: Tue Mar 03, 2020 12:18

Re: [Mod] D00Med mobs [dmobs]

by klera » Post

no idead where the documentation is, sorry.

This ist from the spawn.lua

-- dragons

mobs:register_spawn("dmobs:dragon", {"default:leaves","default:dirt_with_grass"}, 20, 10, 64000, 2, 31000)


Isnt the 2nd number the height? 20, ->10<-, 64000, 2, 31000
Last edited by klera on Mon Mar 30, 2020 01:44, edited 1 time in total.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] D00Med mobs [dmobs]

by FreeGamers » Post

Read the api.txt included in the mobs_redo mod, which is the mod that dmobs uses to define mobs.

Read the section about spawn functions and tweak the height parameter to what you desire.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

klera
Member
Posts: 23
Joined: Tue Mar 03, 2020 12:18

Re: [Mod] D00Med mobs [dmobs]

by klera » Post

I am so stupid. always looked at the api in the dmobs folder.
But now i have read the entire file and still don't know what to change.

Maybe i am looking at the wrong file?

The first file was the spawn.lua file (dmod)
mobs:register_spawn("dmobs:dragon", {"default:leaves","default:dirt_with_grass"}, 20, 10, 64000, 2, 31000)

The 2nd file is the main.lua (dmod)
-- mobs:spawn_specific("dmobs:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)

The 3rd dragons_normal.lua
mobs:spawn_specific("dmobs:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)

If the Api is the solution:

'interval' is same as in register_abm() (default is 30)
'chance' is same as in register_abm() (default is 5000)
'min_light' is the minimum light level (default is 0)
'max_light' is the maximum light (default is 15)
'min_height' is the minimum height a mob can spawn (default: -31000)
'max_height' is the maximum height a mob can spawn (default is 31000)

6 option for 7 values..so I'm guessing:

20 (inverall), 10 (chance), 300, 15000, 2, -100 (min_height), 11000 (max_height)

User avatar
Melkor
Member
Posts: 369
Joined: Sat Sep 24, 2011 01:03
Location: Underground

Re: [Mod] D00Med mobs [dmobs]

by Melkor » Post

D00Med wrote:
d00med we have to talk of which animals should be big and not.
Next in line will be tiny dragons.

Bronze golem:
Image
wow nice pixel art in this golem, did you make the texture?

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] D00Med mobs [dmobs]

by FreeGamers » Post

klera, I find it helpful to keep definition templates near the API's themselves.
Here is a spawn function for a zombie in my server:

Code: Select all

--Spawn Functions
mobs:spawn_specific("mobs_creatures:zombie", {"default:dirt_with_grass","default:dirt","default:stone"}, {"air"}, 0, 7, 120, 2000, 2, -500 ,100)
Here is the API

Code: Select all

mobs:spawn_specfic(name, nodes, neighbors, min_light, max_light, interval,
   chance, active_object_count, min_height, max_height, day_toggle, on_spawn)
Here is the code you are using:

Code: Select all

mobs:spawn_specific("dmobs:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)
you are spawning on air (which is very CPU intensive, you will run this ABM on all air nodes I think) near stone. min light required to spawn is 20 (which is the max value for light this is wrong and should be something like 0 or 2, etc. Its the lower range for light. 10 = max light, this should be like 16 if you want it to spawn in sun and bright areas. 300 is the interval that we will run this abm. chance is the 1 in X chance that it spawns on one of the nodes you specified. active object count is max amount of these entities at any time. -100 is your lower height limit. max height is upper height limit. day_toggle, true/false for if you want it to be day only, night only, or anytime. Your mobs arent spawning because they have to be between a range of 20 minimum light and 10 maximum to spawn, which is not a valid value. try 3-16 range instead. 3 min 16 max
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

klera
Member
Posts: 23
Joined: Tue Mar 03, 2020 12:18

Re: [Mod] D00Med mobs [dmobs]

by klera » Post

OK, thanks for your help!
And which files should I change? All values in all files?
or is it: .minetest/mods/dmobs/spawn.lua ? (attachment)
Attachments
spawn.lua.zip
(688 Bytes) Downloaded 60 times
cut.png
cut.png (16.28 KiB) Viewed 2635 times

User avatar
ObsidianBlade12
Member
Posts: 32
Joined: Sun Dec 08, 2019 21:18
IRC: Obsidian
In-game: Darkstalker
Location: Dark's Private Island Resort

Re: [Mod] D00Med mobs [dmobs]

by ObsidianBlade12 » Post

Hey guys! I have a question.
I am trying to disable the mobs only so that dragons spawn (and no other), but I don't really know how to do it. I am trying to work on it for an Admin on Wild Wild West as a replacement for the Draconis Mod, since the Draconis Mod was causing problems. Could someone tell me what I need to do to disable the mobs, or just send me the "dragon edit"? Thank you so much! Very appreciated. :D
~Darkstalker/Obsidian~

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

Re: [Mod] D00Med mobs [dmobs]

by Astrobe » Post

Add the line "dmobs.regulars=false" in your minetest.conf. If it does not work, you can use violence and edit directly the variable in init.lua (line 16).

However, it might cause these mobs to appear as "unknown entities" (pink rectangles) in your world (because the mod doesn't load their definitions anymore; this should be reversible, just undo the edit).

Another method that should avoid the issue is to use a bit less violence and go to the file spawn.lua and change the first line with "if false then".

Maybe wait for someone else to confirm this will work as expected (or has more "gentle" methods), as I did not test any of this suggestions.

In any case, the change will not be retroactive - the mobs that were spawned before will still be there - we only prevent them from spawning. They'll probably vanish one by one (poor panda...).

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] D00Med mobs [dmobs]

by MisterE » Post

I seem to be having some trouble with the dragons. When the different types of dragons are enables, the arrows shot by the ice dragon and the sea dragons (and possibly the lightning dragon) are unknown objects. I had to set dmobs.dragons = false until this is fixed.

User avatar
Minix
Member
Posts: 144
Joined: Thu Nov 12, 2020 13:51
In-game: Minix

Re: [Mod] D00Med mobs [dmobs]

by Minix » Post

I am getting a crash in my server from eggs.lua, this is the log:

Code: Select all

ServerError: AsyncErr: environment_Step: Runtime error from mod 'dmobs' in callback environment_Step(): ...ers/running/FreedomTest/worldmods/dmobs/dragons/eggs.lua:49: attempt to concatenate upvalue 'dragon_type' (a nil value)
2020-11-13 11:39:30: ERROR[Main]: stack traceback:
2020-11-13 11:39:30: ERROR[Main]:       ...ers/running/FreedomTest/worldmods/dmobs/dragons/eggs.lua:49: in function 'func'
2020-11-13 11:39:30: ERROR[Main]:       /usr/share/games/minetest/builtin/common/after.lua:20: in function </usr/share/games/minetest/builtin/common/after.lua:5>
2020-11-13 11:39:30: ERROR[Main]:       /usr/share/games/minetest/builtin/game/register.lua:429: in function </usr/share/games/minetest/builtin/game/register.lua:413>
2020-11-13 11:39:30: ERROR[Main]: stack traceback:
Before that happened a player placed a normal dragon egg, but I'm not sure what where the nodes surrounding the egg.

I added a conditional to check for nil values (I don't know if that's gonna work):

Code: Select all

minetest.after(dmobs.eggtimer,
                        function(pos, dragon, pname)
                                if dragon_type ~= nil then
                                        minetest.set_node(pos, {name="dmobs:dragon_egg_"..dragon_type})
                                end
                        end,
                        pos
                )
I will test this on my server and tell you what happens

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

UPDATE:

by TenPlus1 » Post

Since this mod has been abandoned I've created a fork and:

- Tweaked and Tidied code to be 5.x compliant
- Fixed a few bugs and features

The new download can be found here: https://notabug.org/TenPlus1/dmobs

User avatar
daret
Member
Posts: 136
Joined: Tue Nov 12, 2019 20:36
GitHub: daretmavi
In-game: Daretmavi

Re: UPDATE:

by daret » Post

TenPlus1 wrote:
Mon Feb 01, 2021 08:35
Since this mod has been abandoned I've created a fork and:

- Tweaked and Tidied code to be 5.x compliant
- Fixed a few bugs and features

The new download can be found here: https://notabug.org/TenPlus1/dmobs
Nice.
Could you add it to contentdb?

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

Update:

by TenPlus1 » Post

Added to ContentDB.

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

Glad someone else picked up the mod. Thanks for that.
I was in the process of changing all of the models to a style that fits minetest better (maybe I already did and forgot?), it's a shame but I don't think I bothered to keep them.
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

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

Good to see you back though D00Med :)

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

Re: [Mod] D00Med mobs [dmobs]

by Astrobe » Post

Seconded !

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

Oh I just check up on things every now and then. Lost interest in minetest since I started getting motion sickness :^)
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

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 wrote:
Sun May 02, 2021 21:24
Oh I just check up on things every now and then. Lost interest in minetest since I started getting motion sickness :^)
How did that happen?

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

I have no idea, maybe something to do with not finding the perfect aspect ratio and fov.
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

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

I have no idea, maybe something to do with not finding the perfect aspect ratio and fov.
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] D00Med mobs [dmobs]

by ShadMOrdre » Post

That happened to me until I got a widescreen monitor. Something about the square box made it so unnatural, whereas the wider screen seems to help with aspect ratio. Also consider whether you use true full screen or Windows less than with the start bar still visible. Those things seemed to upset my vision also.

It doesn't happen anymore. I still play significantly, and those are the only real things that have changed.

I also give my eyes a good rest from time to time, eat a better diet, and stopped staying up all night playing. Maybe that also helped. ;)

Shad

louisecm
New member
Posts: 2
Joined: Fri Jul 30, 2021 01:05
In-game: Lilybelle

Re: [Mod] D00Med mobs [dmobs] - dragon healing

by louisecm » Post

Hello, I am pretty new to Minetest so may be missing something obvious aha, but how do I heal my great dragon? She lost some hp when we ran into a wasp nest. :( (I'm not a purist, I don't mind a 'cheat' way lol.) I tried adapting the code from some of the other dmobs but couldn't quite get it to work.

Post Reply

Who is online

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