roger that! i really hate the forum
[Mod] Mobs Redo [1.61] [mobs]
-
- Member
- Posts: 129
- Joined: Tue Mar 05, 2019 17:37
- GitHub: mckaygerhard
- IRC: mckaygerhard
- In-game: mckaygerhard
-
- New member
- Posts: 3
- Joined: Mon Jun 19, 2023 13:07
Re: [Mod] Mobs Redo [1.57] [mobs]
Is there a function similar to creatura's move function, or does that all have to be handled in do_custom if you want custom move behavior/ai?
-
- Member
- Posts: 204
- Joined: Sun Jul 10, 2016 05:00
- Location: Under Le' Sea
Re: [Mod] Mobs Redo [1.57] [mobs]
Greetings, if I wanted to edit mob drops in the mod configs folder, how would I do this? (For example, having the bonemeal mod's bone item dropping from creatures)
Look at that, a signiture box! To bad I have nothing to put in i-... Wait...
Re: [Mod] Mobs Redo [1.57] [mobs]
Editing the mob .lua file is the easiest methor unless you override the mob on_spawn to detect the bonemeal mod and use table.insert to insert a bone drop to the self.drops table.
Re: [Mod] Mobs Redo [1.57] [mobs]
@sockmit2007 - So far pathfinding only comes into play when a mob is attacking a player or another mob and it hunts it down, so using that theory here's a quick tool you can use on any block to make a local npc go to that spot:
Code: Select all
minetest.register_entity("mymod:pathfind_entity", {
physical = false, static_save = false,
armor = 200, hp_max = 1, _cmi_is_mob = true,
})
minetest.register_craftitem("mymod:pathfind_axe", {
description = "Pathfind Axe",
inventory_image = "default_tool_steelaxe.png",
range = 10,
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then return end
local pos = pointed_thing.above
local attack_obj = minetest.add_entity(pos, "mymod:pathfind_entity")
local player_name = user:get_player_name()
local objs = minetest.get_objects_inside_radius(pos, 30)
for _, obj in pairs(objs) do
if obj then
local ent = obj:get_luaentity()
if ent and ent._cmi_is_mob and ent.owner == player_name then
ent:do_attack(attack_obj)
end
end
end
end,
})
-
- New member
- Posts: 3
- Joined: Mon Jun 19, 2023 13:07
Re: [Mod] Mobs Redo [1.57] [mobs]
@TenPlus1 Thanks.
Update:
- "immune_to" table can now have entity names e.g. {"mobs_monster:mese_arrow", 0} -- no damage
Re: Update:
Very good, this will be very useful, it would be interesting an option for animals to follow the owner as Npcs, or follow another animal :)
- Nininik
- Member
- Posts: 585
- Joined: Thu Apr 06, 2023 01:55
- GitHub: nininik0
- IRC: nininik
- In-game: nininik
- Location: CA, Team thunderstrike headquarters
- Contact:
Re: Question:
I HAVE THE OLD MESE MONSTER MODEL AND TEXTURE >:) do u need it?
↯Glory to Team Thunderstrike!↯
↯T.T.S.↯
↯T.T.S.↯
- Neuromancer
- Member
- Posts: 964
- Joined: Tue Jun 12, 2012 22:28
- GitHub: Neuromancer56
Re: [Mod] Mobs Redo [1.57] [mobs]
I'm working on a mod called hardcore_farming https://content.minetest.net/packages/N ... e_farming/. It creates a bunch of pests that ravenously devour your crops. I wanted to use the runaway_from parameter to make them stay away from crops that have an x_farming:scarecrow nearby, but since the scarecrow isn't a mob this doesn't appear to be working. Either that or the is overriding the runaway_from. Do you know which of these are the problem, and is this something that could be added to the functionality of this api?
Code: Select all
runaway_from = {"animalworld:bear","x_farming:scarecrow","x_farming:scarecrow_2"},
Code: Select all
stay_near = {{"group:crop"}, 4},
Re: [Mod] Mobs Redo [1.57] [mobs]
@Neuromancer - The 'runaway_from' table only works for mobs, so that chickens runaway from wolves and the like. I will however see how easy it is to tie it into surrounding nodes as well.
Update:
- Can now add nodes and groups to the 'runaway_from' table.
Classic Mob
Quite a few players have asked to bring back the classic Mese Monster, so here you go :)
https://content.minetest.net/packages/T ... r_classic/
https://content.minetest.net/packages/T ... r_classic/
- Neuromancer
- Member
- Posts: 964
- Joined: Tue Jun 12, 2012 22:28
- GitHub: Neuromancer56
Update:
- Better support for MineClone2 in API
- Recipes have MineClone2 alternatives
- Better player detection
- Ability to ride Mobs Redo mobs in MineClone2
- Added 'mob_log_spawn' setting to log mob spawn positions
- Velocity tweaks (thanks Savilli)
- Recipes have MineClone2 alternatives
- Better player detection
- Ability to ride Mobs Redo mobs in MineClone2
- Added 'mob_log_spawn' setting to log mob spawn positions
- Velocity tweaks (thanks Savilli)
Update:
- Added settings to enable/disable animals in mobs_animal.
- Added settings to enable/disable monsters in mobs_monster.
- Mobs can be registered with mod names differing from actual mod it uses.
- Translations updated (thanks Niklp)
- Non-passive animals defend themselves when attacked by other mobs (thanks Fluxionary)
- Added settings to enable/disable monsters in mobs_monster.
- Mobs can be registered with mod names differing from actual mod it uses.
- Translations updated (thanks Niklp)
- Non-passive animals defend themselves when attacked by other mobs (thanks Fluxionary)
Update and Request:
I've updated Mobs Redo API to use initial_properties (init_WIP.lua) and would ask if some players would kindly download the update from my notabug page and give it a whirl to help me test things out before I upload to ContentDB for all :) Many thanks!
https://notabug.org/TenPlus1/mobs_redo
https://notabug.org/TenPlus1/mobs_redo
Update:
Many thanks for the testing you guys did with the WIP initial_properties changes. It seems that changing at present will break too many things, so for now the latest stable API will only backup important variables for each mob into the initial_properties table, that way we still have compatibility for future changes.
Re: [Mod] Mobs Redo [1.57] [mobs]
New to this forum.
How can someone request a feature? I was hoping to see functionality to have the mob's head rotate and follow certain things with their gaze. Like maybe follow an animal, the player, or another object of interest depending on how close it is to the mob. The mobs api for Mineclone 2 has this, to a degree.
If I need to post this somewhere else, please provide guidance.
R,
C
How can someone request a feature? I was hoping to see functionality to have the mob's head rotate and follow certain things with their gaze. Like maybe follow an animal, the player, or another object of interest depending on how close it is to the mob. The mobs api for Mineclone 2 has this, to a degree.
If I need to post this somewhere else, please provide guidance.
R,
C
Re: [Mod] Mobs Redo [1.57] [mobs]
@Chungus - It's a nice feature to have although I cannot promise anything as I work on this mod myself with player contributions at times.
Update:
- Now using set/get_properties()
- Added self.backup_properties to backup important vars for future compatibility
- Changed nametags from self.nametag to self._nametag with backwards compatibility check
- Updated api_WIP.lua for anyone testing move to initial_properties.
- Added self.backup_properties to backup important vars for future compatibility
- Changed nametags from self.nametag to self._nametag with backwards compatibility check
- Updated api_WIP.lua for anyone testing move to initial_properties.
Updated to Version 1.60:
* Move mob and arrow entities to use initial_properties
* Spawn eggs check if mob is available when creating
* Used get/set_properties() within API for mob properties
* Moved nametag variable to self._nametag
* Tidied breeding function
* Better MineClone2 / MineClonia support added
* Tweaked and tidied code in places
Important: When updating Mobs Redo API, remember to also update Mobs_Monster, Mobs_Animal, Mobs_horse as well.
* Spawn eggs check if mob is available when creating
* Used get/set_properties() within API for mob properties
* Moved nametag variable to self._nametag
* Tidied breeding function
* Better MineClone2 / MineClonia support added
* Tweaked and tidied code in places
Important: When updating Mobs Redo API, remember to also update Mobs_Monster, Mobs_Animal, Mobs_horse as well.
Last edited by TenPlus1 on Sun Oct 08, 2023 05:37, edited 1 time in total.
Re: [Mod] Mobs Redo [1.60] [mobs]
After installing Version 1.60 I suddenly got this Error:
2023-10-08 02:07:08: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'mobs_monster' in callback luaentity_Step(): ...etest-5.6.1/minetest/bin/../mods/mobs_monster/spider.lua:174: attempt to index field 'collisionbox' (a nil value)
2023-10-08 02:07:08: ERROR[Main]: stack traceback:
2023-10-08 02:07:08: ERROR[Main]: ...etest-5.6.1/minetest/bin/../mods/mobs_monster/spider.lua:174: in function 'do_custom'
2023-10-08 02:07:08: ERROR[Main]: .../roland/minetest-5.6.1/minetest/bin/../mods/mobs/api.lua:3529: in function <.../roland/minetest-5.6.1/minetest/bin/../mods/mobs/api.lua:3421>
Riding a horse of mob_horse it stops in front of every block it has to step up. Even in front of snow layers.
2023-10-08 02:07:08: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'mobs_monster' in callback luaentity_Step(): ...etest-5.6.1/minetest/bin/../mods/mobs_monster/spider.lua:174: attempt to index field 'collisionbox' (a nil value)
2023-10-08 02:07:08: ERROR[Main]: stack traceback:
2023-10-08 02:07:08: ERROR[Main]: ...etest-5.6.1/minetest/bin/../mods/mobs_monster/spider.lua:174: in function 'do_custom'
2023-10-08 02:07:08: ERROR[Main]: .../roland/minetest-5.6.1/minetest/bin/../mods/mobs/api.lua:3529: in function <.../roland/minetest-5.6.1/minetest/bin/../mods/mobs/api.lua:3421>
Riding a horse of mob_horse it stops in front of every block it has to step up. Even in front of snow layers.
CFS - still widely unknown
Re: [Mod] Mobs Redo [1.60] [mobs]
@Nordal - Did you also update mobs_monster, mob_animal, mob_horse alongside mobs_redo api ?
Update and Advisory:
- Mob API updated to fix nil issue.
- Added mobs:node_ok(pos, fallback) function.
- Tweaked and tidied code.
The Simple Way
Before when using entities we could simply read values straight from the self. table and grab things like collisionbox and stepheight or even textures with ease (local sh = self.stepheight).
The New Way
Now with the work on the latest Minetest dev they are deprecating the old way and throwing up a multitude of warnings and errors to make modders use the new initial_properties table instead.
So now a simple self.collisionbox will now become self.object:get_properties().collisionbox instead.
Final Word
As you probably have guessed Mobs Redo has moved to using the new initial_properties table and a few glitches have creeped in along the way which should now be fixed. Sorry to anyone using my mod on a server that may have caused downtime.
If updating to the latest Mobs Redo, please be sure also update mobs_animal, mobs_monster, mob_horse as well, these have also been changed to work with the new API.
- Added mobs:node_ok(pos, fallback) function.
- Tweaked and tidied code.
The Simple Way
Before when using entities we could simply read values straight from the self. table and grab things like collisionbox and stepheight or even textures with ease (local sh = self.stepheight).
The New Way
Now with the work on the latest Minetest dev they are deprecating the old way and throwing up a multitude of warnings and errors to make modders use the new initial_properties table instead.
So now a simple self.collisionbox will now become self.object:get_properties().collisionbox instead.
Final Word
As you probably have guessed Mobs Redo has moved to using the new initial_properties table and a few glitches have creeped in along the way which should now be fixed. Sorry to anyone using my mod on a server that may have caused downtime.
If updating to the latest Mobs Redo, please be sure also update mobs_animal, mobs_monster, mob_horse as well, these have also been changed to work with the new API.
Who is online
Users browsing this forum: No registered users and 58 guests