[Mod] Mobs Redo [1.61] [mobs]

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

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

by jwmhjwmh » Post

I like the new design, but perhaps you could add some setting to let people use the old model.

User avatar
j0j0n4th4n
Member
Posts: 249
Joined: Tue Jan 26, 2021 06:45

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

by j0j0n4th4n » Post

I like the newer design, it ties better with the Mese Dragon from NSSM
cdb_894a100ddd76

User avatar
CrazyMinetestGuy
New member
Posts: 5
Joined: Sun Dec 20, 2020 01:39
IRC: MarisaKirisame
In-game: MarisaKirisame
Location: Gensokyo, Japan
Contact:

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

by CrazyMinetestGuy » Post

Now imagine this: a mob in Mobs Monster that's similar to this:
Image
The warden. (sorry for the huge image)
16 years old. He/him in real life, any pronouns online.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

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

by sirrobzeroone » Post

CrazyMinetestGuy wrote:
Sun Jul 24, 2022 18:54
Now imagine this: a mob in Mobs Monster that's similar to this:
The warden. (sorry for the huge image)
I had to go find him, but the Dungeon master is about the same concept and been around in one form or another for years - although I'd actually place him as worse than the warden - fireballs hitting you in the back out of the dark unexpectedly certainly makes you jump/or die...link to mod:

https://github.com/AntumMT/mod-mob_dungeon_master

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

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

by TenPlus1 » Post

The Dungeon Master in mobs_mobster does look similar and could easily be tweaked to be more dangerous the lower you dig to be on-par with the warden :)

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

Update to Mobs_NPC:

by TenPlus1 » Post

- simplified mob definitions by adding functions.lua for additional code
- npc and igor can be right-clicked with a stick to open control gui (wander, stay, follow)
- right-clicking both with gold uses mobs_npc.drop_trade() function and drops random item
- right-clicking trader uses mobs_npc.shop_trade() function and opens store
- right-clicking with anything else has npc/igor show idle chatter or open simple_dialog gui if available
- added trader block (8x stone with 1x diamond centre and 1x tin block bottom middle)
- added mobs_npc.add_trader_list() so 3rd party mods can add their own trader with custom items, textures and name

Note: Punch trader block to spawn trader in front of logo, special blocks can be placed below where trader appears for custom shops (try putting a tin block for test trader).

User avatar
FreeLikeGNU
Member
Posts: 280
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

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

by FreeLikeGNU » Post

Nice update! I'm trying to have a witch spawn in each cottage that is generated. Thing is, the cottages are generated along with dungeons and are not close to the player. The mobs fail to spawn with mobs:add_mob but there is no reason given (it would be nice if the function could return the reason for fail condition :). Should I use some kind of self-destructing spawner node to spawn a single witch instead? Thanks for everything!

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

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

by TenPlus1 » Post

@FreeLikeGNU - How are you currently trying to spawn a witch, and with what settings ?

User avatar
FreeLikeGNU
Member
Posts: 280
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

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

by FreeLikeGNU » Post

@TenPlus1 from line 1253 of cottages.lua in witches mod.
The cottages have a chance of generating on minetest.set_gen_notify("dungeon") and when they are built an attempt is made to spawn witches in the cottage where the witches chest is (if there is one in the cottage). Mobs settings are default.
There is a debug option for witches that will allow you to see the failed spawn messages. Thanks!

Code: Select all

 if witch_spawn_pos and mobs:add_mob(witch_spawn_pos,{
        name = "witches:witch_cottage",
        ignore_count = true 
        }) 
        then
            witches.debug("SUCCESS: spawning cottage witch")     
        else
            witches.debug("FAILED: spawning cottage witch"..minetest.pos_to_string(witch_spawn_pos))
            
    end

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

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

by TenPlus1 » Post

@FeelLikeGNU - mobs:spawn() has an on_map_load feature to handle spawning once only on generation:

Code: Select all

mobs:spawn({
	name = "witches:witch",
	node = {"default:wood"}, -- spawn on wooden floor of hut
	neighbors = {"witches:witch_chest"}, -- near witch chest
	chance = 1, -- 1:1 chance
	on_map_load = true, -- on map generation
	on_spawn = function(self, pos)
		print("-- witch spawned at " .. minetest.pos_to_string(pos))
	end
})

User avatar
FreeLikeGNU
Member
Posts: 280
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

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

by FreeLikeGNU » Post

@TenPlus1 well this looked liked the solution, but still no spawning. I put a

Code: Select all

print("mobs LBM:"..dump(name,pos,nodes,node))
in your map_load condition and I never saw output from it after registering the mob or when the cottage and its chest were placed.
here are the arguments I'm spawning with:

Code: Select all

nodes = {"group:wood","group:choppy","default:cobble"},
        neighbors = {"witches:chest_locked", "doors:wood_witch_a"},
        --min_light = 5,
        --max_light = 15,
        --interval = 30,
        chance = 1, -- 1:1 chance
        on_map_load = true, -- on map generation
        active_object_count = 5,
        min_height = -10,
        max_height = 200,
        day_toggle = nil,
        on_spawn = function(self)
            local pos = self.object:get_pos()
            witches.debug(self.secret_name .. " spawned at " ..
                              minetest.pos_to_string(vector.round(pos)))
        end
Thank you for the help, it's been a while since I was actively modding and the gears are a bit rusty

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

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

by TenPlus1 » Post

Can you show me the witch hut schematic you want the witch to spawn inside.

User avatar
FreeLikeGNU
Member
Posts: 280
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

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

by FreeLikeGNU » Post

@TenPlus1, the witches cottages are not a schematic but procedurally generated...

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

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

by TenPlus1 » Post

@FreeLineGNU - Ah, in that case could you upload your mod code to a git page and link me in a private message, we can sort it out there :)

User avatar
FreeLikeGNU
Member
Posts: 280
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

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

by FreeLikeGNU » Post

I think I got it now. One thing I did wrong was try to have the witch spawn before the nodes had actually been placed. Now I have a method that works well enough:
  • aliased a new node to air
  • placed that node in the cottage
  • set the witch to spawn from that node with a chance of 1:1
  • have the witch remove the node on spawn
Last edited by FreeLikeGNU on Mon Sep 05, 2022 23:37, edited 1 time in total.

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

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

by TenPlus1 » Post

@FeelLikeGNU - Was thinking about that too, glad you found a method that works well :)

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

Update:

by TenPlus1 » Post

- Mobs NPC updated with new skins for NPC and Trader (thanks Astrobe)

Papang
Member
Posts: 19
Joined: Sun Jul 10, 2022 17:28
IRC: Papang
In-game: Papang

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

by Papang » Post

Hello,
I was wondering why my little cute lambs were dying when growing ? I've observed that when the sheep grows, it spawns in the node underneath and then it gets damages and die. I've tried with dirt/dirt_with_grass, bricks, glass, ...
This behavior happens only with sheeps, i don't have so many losses with cows, cats, etc.

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

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

by TenPlus1 » Post

@Papang - I've updated the API so have mobs jump slightly when they grow up, to avoid becoming stuck in floor.

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

Update:

by TenPlus1 » Post

- mobs:boom function now has damage_radius and texture added for custom explosions, even when tnt mod not active.

Bla
New member
Posts: 5
Joined: Tue Jul 19, 2022 07:09
GitHub: blaboing

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

by Bla » Post

Is there an example on how to use mobs:spawn_abm_check?
couldnt find any mod using it and as a Lua noob also can´t figure it out myself.
I want to restrict spawn to an area and not "just" by height.

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

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

by TenPlus1 » Post

The mobs:spawn_abm_check(pos, node, name) is a global function that is called before a mob is spawned, so any mod can customize it to add additional checks for any mob that spawns and by returning true (dont spawn) or false/nil (spawn).

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

Update:

by TenPlus1 » Post

- Mobs_Animal mod has custom function added to spawn sheep in herds.

BlueTangs Rock
Member
Posts: 204
Joined: Sun Jul 10, 2016 05:00
Location: Under Le' Sea

Re: Update:

by BlueTangs Rock » Post

TenPlus1 wrote:
Tue Oct 11, 2022 10:16
- Mobs_Animal mod has custom function added to spawn sheep in herds.
Is this function able to be applied for the spawning of other animals?
Look at that, a signiture box! To bad I have nothing to put in i-... Wait...

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

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

by TenPlus1 » Post

@BlueTangs Rock - Nope, it's just a test function I put in there for sheep to show modders how to do herds using the on_spawn() feature inside mobs:spawn()

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 18 guests