[Mod] D00Med mobs [dmobs]
- Grossam
- Member
- Posts: 39
- Joined: Sun Apr 02, 2017 07:21
- GitHub: Grossam
- IRC: Grossam
- In-game: Grossam
- Location: Bourges
- Contact:
Re: [Mod] D00Med mobs [dmobs]
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.
Se borne à ne pas trop emmerder ses voisins.
Re: [Mod] D00Med mobs [dmobs]
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.
- Grossam
- Member
- Posts: 39
- Joined: Sun Apr 02, 2017 07:21
- GitHub: Grossam
- IRC: Grossam
- In-game: Grossam
- Location: Bourges
- Contact:
Re: [Mod] D00Med mobs [dmobs]
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.
Se borne à ne pas trop emmerder ses voisins.
Re: [Mod] D00Med mobs [dmobs]
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
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.
- FreeGamers
- Member
- Posts: 651
- Joined: Sat May 25, 2019 00:15
- GitHub: is proprietary I use NotABug
- Location: United States
- Contact:
Re: [Mod] D00Med mobs [dmobs]
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.
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
Re: [Mod] D00Med mobs [dmobs]
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)
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)
Re: [Mod] D00Med mobs [dmobs]
wow nice pixel art in this golem, did you make the texture?D00Med wrote:Next in line will be tiny dragons.d00med we have to talk of which animals should be big and not.
Bronze golem:
- FreeGamers
- Member
- Posts: 651
- Joined: Sat May 25, 2019 00:15
- GitHub: is proprietary I use NotABug
- Location: United States
- Contact:
Re: [Mod] D00Med mobs [dmobs]
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:
Here is the API
Here is the code you are using:
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
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)
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)
Code: Select all
mobs:spawn_specific("dmobs:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000)
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft
Re: [Mod] D00Med mobs [dmobs]
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)
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 19 times
-
- cut.png
- (16.28 KiB) Not downloaded yet
- 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]
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
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~
Re: [Mod] D00Med mobs [dmobs]
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...).
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...).
-
- Member
- Posts: 239
- Joined: Sun Feb 16, 2020 21:06
- GitHub: MisterE123
- IRC: MisterE
- In-game: MisterE
Re: [Mod] D00Med mobs [dmobs]
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.
Re: [Mod] D00Med mobs [dmobs]
I am getting a crash in my server from eggs.lua, this is the log:
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):
I will test this on my server and tell you what happens
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:
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
)
Re: [Mod] D00Med mobs [dmobs]
This happens when I shoot another mob
ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'dmobs' in callback luaentity_Step(): ...est/games/minetest_game/mods/dmobs/arrows/dragonfire.lua:50: attempt to index local 'apos' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: ...est/games/minetest_game/mods/dmobs/arrows/dragonfire.lua:50: in function <...est/games/minetest_game/mods/dmobs/arrows/dragonfire.lua:9>
ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'dmobs' in callback luaentity_Step(): ...est/games/minetest_game/mods/dmobs/arrows/dragonfire.lua:50: attempt to index local 'apos' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: ...est/games/minetest_game/mods/dmobs/arrows/dragonfire.lua:50: in function <...est/games/minetest_game/mods/dmobs/arrows/dragonfire.lua:9>
UPDATE:
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
- 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
Re: UPDATE:
thanks, had a error that was my fault so i removed bug report.TenPlus1 wrote: ↑Mon Feb 01, 2021 08:35Since 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
works great, no longer crashes when i shoot stuff. 10+2
Re: UPDATE:
Nice.TenPlus1 wrote: ↑Mon Feb 01, 2021 08:35Since 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
Could you add it to contentdb?
Who is online
Users browsing this forum: No registered users and 3 guests