[Mod] Mobs Redo [1.53] [mobs]

User avatar
TenPlus1
Member
Posts: 2891
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

22i has made and released all of the Minecraft mobs pack for Mobs Redo which is amazing :)

Get it here: https://github.com/22i/amc/

User avatar
cHyper
Member
Posts: 908
Joined: Fri May 06, 2011 08:49
GitHub: cHyper-0815OL
IRC: cHyper cHyper_de
In-game: cHyper cHyper_0815
Location: Austria
Contact:

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

by cHyper » Post

Chibi ghost wrote:Image
Monty python is very awesome. +1 nice.

Punk
Member
Posts: 158
Joined: Sun Dec 25, 2016 06:52

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

by Punk » Post

hahahahaha, classic movie...

I really couldn't cook the rat.
And the rabbit didn't accept grass.
I tried normal grass, jungle grass, dry grass, and other plants, nothing happened.

But I haven't tried to feed with a lava bucket yet ... :P

User avatar
Andrey01
Member
Posts: 2444
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

cHyper wrote:
Chibi ghost wrote:Image
Monty python is very awesome. +1 nice.
This is a knight, he is from The middle ages directly.

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

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

by azekill_DIABLO » Post

Chibi ghost wrote:Image
awesome killer bunnies.

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

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

by Chibi ghost » Post

I wish we could have those in mobs redo
if only a 1 in 1000 chance that the bunny spawned will be a totally innocent white rabbit that like won't try to totally hunt you down and kill you

User avatar
Lone_Wolf
Member
Posts: 2412
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

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

by Lone_Wolf » Post

Chibi ghost wrote:I wish we could have those in mobs redo
if only a 1 in 1000 chance that the bunny spawned will be a totally innocent white rabbit that like won't try to totally hunt you down and kill you
Feed a bunny a lava orb and it goes rabid ;)

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

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

by Chibi ghost » Post

just tested that out and you're right
tee hee
Image
Attachments
screenshot_20170522_210114.png
(102.5 KiB) Not downloaded yet

User avatar
Lone_Wolf
Member
Posts: 2412
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

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

by Lone_Wolf » Post

Chibi ghost wrote:just tested that out and you're right
tee hee
Image
The eyes go back to normal after a while :(
(Up their dmg to 20 and you'll have a nice time ;) )

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

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

by Chibi ghost » Post

lava orbs are hard to get so it seems like a waste
to use them like this
I only just manage to get enough legitimately get a orb pickaxe

User avatar
maikerumine
Member
Posts: 1392
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

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

by maikerumine » Post

TenPlus1 wrote:22i has made and released all of the Minecraft mobs pack for Mobs Redo which is amazing :)

Get it here: https://github.com/22i/amc/
And NOW they are playable!:
https://github.com/maikerumine/mobs_mc
I have organised them and coded all the spawning and behaviours.

ALSO:

I have a few mob mobs that work with mobs_redo api, please add these to the front page. :)
https://github.com/maikerumine/mobs_fallout Fallout themed mobs

https://github.com/maikerumine/mobs_badplayer PVP type npc mobs

https://github.com/maikerumine/mobs_esmobs A full set of mobs for the ES subgame
Extreme Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Wuzzy
Member
Posts: 4089
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Maikerumine, would you mind opening a new thread for your mobs_mc mod, please? The mod is quite big.
Also, can you please clarify the licensing, especially that of sounds? “Freesound” is not a license, it is the name of a website.

Random comments about Mobs Redo:

- Thanks for making health display disabable. :-)

- The code is quite extremely polluting the global namespace with variables:
luacheck wrote: api.lua:28:15: accessing undefined variable invisibility
api.lua:76:1: setting non-standard global variable mob_sound
api.lua:89:1: setting non-standard global variable do_attack
api.lua:99:3: accessing undefined variable mob_sound
api.lua:105:1: setting non-standard global variable set_velocity
api.lua:118:1: setting non-standard global variable get_velocity
api.lua:127:1: setting non-standard global variable set_yaw
api.lua:140:1: setting non-standard global variable set_animation
api.lua:172:10: setting non-standard global variable line_of_sight
api.lua:268:10: setting non-standard global variable effect
api.lua:294:10: setting non-standard global variable update_tag
api.lua:320:10: setting non-standard global variable check_for_death
api.lua:332:3: accessing undefined variable mob_sound
api.lua:349:4: accessing undefined variable update_tag
api.lua:379:2: accessing undefined variable mob_sound
api.lua:401:3: accessing undefined variable set_velocity
api.lua:402:3: accessing undefined variable set_animation
api.lua:411:2: accessing undefined variable effect
api.lua:418:10: setting non-standard global variable within_limits
api.lua:478:1: setting non-standard global variable do_env_damage
api.lua:491:3: accessing undefined variable update_tag
api.lua:499:9: accessing undefined variable within_limits
api.lua:513:3: accessing undefined variable effect
api.lua:540:4: accessing undefined variable effect
api.lua:550:4: accessing undefined variable effect
api.lua:563:2: accessing undefined variable check_for_death
api.lua:568:1: setting non-standard global variable do_jump
api.lua:579:6: accessing undefined variable get_velocity
api.lua:625:3: accessing undefined variable set_animation
api.lua:629:3: accessing undefined variable mob_sound
api.lua:639:10: setting non-standard global variable entity_physics
api.lua:666:10: setting non-standard global variable follow_holding
api.lua:745:3: accessing undefined variable effect
api.lua:831:10: setting non-standard global variable replace
api.lua:874:10: setting non-standard global variable day_docile
api.lua:890:10: setting non-standard global variable smart_mobs
api.lua:943:3: accessing undefined variable do_attack
api.lua:1039:4: accessing undefined variable mob_sound
api.lua:1042:4: accessing undefined variable mob_sound
api.lua:1044:4: accessing undefined variable set_velocity
api.lua:1079:5: accessing undefined variable day_docile
api.lua:1131:8: accessing undefined variable line_of_sight
api.lua:1142:3: accessing undefined variable do_attack
api.lua:1167:4: setting non-standard global variable p
api.lua:1169:4: setting non-standard global variable dist
api.lua:1169:24: accessing undefined variable p
api.lua:1171:7: accessing undefined variable dist
api.lua:1172:16: accessing undefined variable dist
api.lua:1179:3: accessing undefined variable do_attack
api.lua:1224:7: accessing undefined variable follow_holding
api.lua:1262:11: accessing undefined variable set_yaw
api.lua:1268:6: accessing undefined variable set_velocity
api.lua:1271:7: accessing undefined variable set_animation
api.lua:1274:6: accessing undefined variable set_velocity
api.lua:1275:6: accessing undefined variable set_animation
api.lua:1291:4: accessing undefined variable set_animation
api.lua:1366:10: accessing undefined variable set_yaw
api.lua:1369:3: accessing undefined variable set_velocity
api.lua:1370:3: accessing undefined variable set_animation
api.lua:1380:5: accessing undefined variable set_velocity
api.lua:1382:5: accessing undefined variable set_animation
api.lua:1439:13: accessing undefined variable set_yaw
api.lua:1440:7: accessing undefined variable do_jump
api.lua:1441:7: accessing undefined variable set_velocity
api.lua:1458:10: accessing undefined variable set_yaw
api.lua:1465:10: accessing undefined variable set_yaw
api.lua:1474:4: accessing undefined variable set_velocity
api.lua:1476:4: accessing undefined variable set_animation
api.lua:1478:4: accessing undefined variable set_velocity
api.lua:1484:5: accessing undefined variable set_animation
api.lua:1486:5: accessing undefined variable set_animation
api.lua:1499:4: accessing undefined variable set_velocity
api.lua:1501:4: accessing undefined variable set_animation
api.lua:1503:4: accessing undefined variable set_velocity
api.lua:1504:4: accessing undefined variable set_animation
api.lua:1524:4: accessing undefined variable set_velocity
api.lua:1525:4: accessing undefined variable set_animation
api.lua:1545:10: accessing undefined variable set_yaw
api.lua:1552:6: accessing undefined variable set_velocity
api.lua:1559:6: accessing undefined variable set_velocity
api.lua:1562:5: accessing undefined variable set_animation
api.lua:1564:5: accessing undefined variable set_velocity
api.lua:1565:5: accessing undefined variable set_animation
api.lua:1592:7: accessing undefined variable mob_sound
api.lua:1596:7: accessing undefined variable effect
api.lua:1599:7: accessing undefined variable entity_physics
api.lua:1610:6: accessing undefined variable entity_physics
api.lua:1705:10: accessing undefined variable set_yaw
api.lua:1714:6: accessing undefined variable smart_mobs
api.lua:1719:6: accessing undefined variable set_velocity
api.lua:1720:6: accessing undefined variable set_animation
api.lua:1724:7: accessing undefined variable set_velocity
api.lua:1726:7: accessing undefined variable set_velocity
api.lua:1729:6: accessing undefined variable set_animation
api.lua:1738:5: accessing undefined variable set_velocity
api.lua:1748:8: accessing undefined variable set_animation
api.lua:1750:8: accessing undefined variable set_animation
api.lua:1759:10: accessing undefined variable line_of_sight
api.lua:1762:8: accessing undefined variable mob_sound
api.lua:1804:10: accessing undefined variable set_yaw
api.lua:1806:4: accessing undefined variable set_velocity
api.lua:1813:5: accessing undefined variable set_animation
api.lua:1816:5: accessing undefined variable mob_sound
api.lua:1894:5: accessing undefined variable effect
api.lua:1896:8: accessing undefined variable check_for_death
api.lua:2014:4: accessing undefined variable effect
api.lua:2021:6: accessing undefined variable check_for_death
api.lua:2080:9: accessing undefined variable set_yaw
api.lua:2097:3: accessing undefined variable do_attack
api.lua:2114:6: accessing undefined variable do_attack
api.lua:2119:6: accessing undefined variable do_attack
api.lua:2271:2: accessing undefined variable set_yaw
api.lua:2272:2: accessing undefined variable update_tag
api.lua:2309:4: accessing undefined variable effect
api.lua:2358:2: accessing undefined variable replace
api.lua:2362:3: accessing undefined variable mob_sound
api.lua:2373:3: accessing undefined variable do_env_damage
api.lua:2386:2: accessing undefined variable do_jump
api.lua:2734:9: accessing undefined variable within_limits
api.lua:2749:8: accessing undefined variable vector
api.lua:2752:38: accessing undefined variable vector
api.lua:2752:68: accessing undefined variable vector
api.lua:2782:64: empty if branch
api.lua:2797:7: accessing undefined variable effect
api.lua:2843:11: accessing undefined variable within_limits
api.lua:2966:8: accessing undefined variable within_limits
api.lua:3014:8: accessing undefined variable within_limits
api.lua:3205:5: accessing undefined variable follow_holding
api.lua:3236:3: accessing undefined variable update_tag
api.lua:3274:4: accessing undefined variable mob_sound
api.lua:3330:3: accessing undefined variable update_tag
And that was only api.lua. Please make everything which is not part of the official API local. Use Luacheck to find the global variables. Just use the keyword “local” more often. Polluting global namespace is an endless source of sneaky bugs.


mount.lua, line 29:

Code: Select all

if minetest.get_item_group(node.name, "walkable") ~= 0 then
I have never seen this group in the wild. Did you maybe mean the node definition field? Then you need to use minetest.registered_nodes[node.name].walkable. Otherwise, this code will probably never evaluate to true.

I have not tested the ridable mobs API yet. But it sounds interesting, so maybe I will.


Requests:

- Please add the group “spawn_egg=1” to spawn eggs. It will come in handy, I guess. :-)

- Can you please add item help for your items? (for doc_items from the Help modpack) Just a few sentences which explain what an item does and how to use it. The items are somewhat obscure and there are some gotchas (e.g. you can't use name tag on non-tamed animals, etc.)

(doc_items support)
Simply add _doc_items_longdesc and _doc_items_usagehelp as fiels to the item definition. Simple example:
item_definition = {
description = "Spawn Egg",
_doc_items_longdesc = "So called “spawn eggs” are items which are used to spawn a single monster or animal.",
_doc_items_usagehelp = "Place the spawn egg on any block to make a creature appear at this position.",
groups = {not_in_creative_inventory=1},
-- …
}
I think that's all what needed and your items will then have nice help pages in the Help system.
There are more features in the Help modpack, but I doubt they are needed here.

Read here for more information on doc_items:
http://repo.or.cz/minetest_doc_items.gi ... AD:/API.md
viewtopic.php?f=9&t=15912&p=240152
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
maikerumine
Member
Posts: 1392
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

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

by maikerumine » Post

Wuzzy , will do! As well as tidy code and license etc.
Extreme Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Lone_Wolf
Member
Posts: 2412
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

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

by Lone_Wolf » Post

Lone_Wolf wrote:Could you add a 'Lava sword' that auto-smelts (if possible) the drops of mobs?
Anyone see this?

User avatar
TenPlus1
Member
Posts: 2891
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

I saw... will be working on that next time I'm off work.

User avatar
Lone_Wolf
Member
Posts: 2412
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

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

by Lone_Wolf » Post

TenPlus1 wrote:I saw... will be working on that next time I'm off work.
Ok cool! I'm looking forward to it!

User avatar
Linuxdirk
Member
Posts: 2673
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

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

by Linuxdirk » Post

Wuzzy wrote:The code is quite extremely polluting the global namespace with variables: [...]
Please make everything which is not part of the official API local
And a lot of them are quite generic and could be used by Minetest itself, too.

Wasn't it consensus to prefix all global variables and custom metadata with an underscore? Even then, this is just too much!

For stuff I want to use in multiple mods of my modpack I created one single global underscore-prefixed table named after the my modpack. So I can use a lot of variables "global" without having them individually global. So for the system the oinly thing of my mod that is global is one single table.

User avatar
TenPlus1
Member
Posts: 2891
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

Updated to version 1.36:

- Death check added, if mob dies in lava or fire then drops are cooked
- If mob killed with lava pick then drops are cooked also
- Added mobs.version global

User avatar
Wuzzy
Member
Posts: 4089
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Cooked drops? Awesome! I will add this feature to MCL2 as soon as I can!
Wasn't it consensus to prefix all global variables and custom metadata with an underscore? Even then, this is just too much!
No. The consensus was to prefix custom attributes of item and entities definitions with an underscore to distinguish them from the engine ones. Right, this is also something which Mobs Redo doen't do, the entities have many custom attributes. But I fear it is hard to change now that so many mods depend on Mobs Redo. It's no drama as this is only a convention which was much later added than Mobs Redo.

But FYI, Minetest Game developers wrote down somewhere (in Lua code style guide) to “avoid global variables like the pest”. I coudln't agree more. I will never understand why the hell the global scope is the default scope in Lua, this is wrong on so many levels.

I think every mod should only have one global variable at maximum. This can be a table with all the required variables and (usually) has the same name as the mod itself.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
Wuzzy
Member
Posts: 4089
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Sorry, but 1.36 crashes for me sometimes when a mob dies.

Specifically, it crashes sometimes in the function item_drop on the last line in this snippet:

Code: Select all

                       -- add item if it exists
                       obj = minetest.add_item(pos, ItemStack(item .. " " .. num))
                       ent = obj:get_luaentity()
2017-05-27 14:05:21: ERROR[Main]: ServerError: Lua: Runtime error from mod 'mobs_mc' in callback luaentity_Step(): Runtime error from mod 'mobs_mc' in callback luaentity_Punch(): ...zy/.minetest/games/mineclone2/mods/ENTITIES/mobs/api.lua:348: attempt to index local 'obj' (a nil value)
2017-05-27 14:05:21: ERROR[Main]: stack traceback:
2017-05-27 14:05:21: ERROR[Main]: ...zy/.minetest/games/mineclone2/mods/ENTITIES/mobs/api.lua:348: in function 'item_drop'
2017-05-27 14:05:21: ERROR[Main]: ...zy/.minetest/games/mineclone2/mods/ENTITIES/mobs/api.lua:406: in function 'check_for_death'
2017-05-27 14:05:21: ERROR[Main]: ...zy/.minetest/games/mineclone2/mods/ENTITIES/mobs/api.lua:2064: in function 'func'
2017-05-27 14:05:21: ERROR[Main]: /usr/share/minetest/builtin/profiler/instrumentation.lua:105: in function </usr/share/minetest/builtin/profiler/instrumentation.lua:99>
2017-05-27 14:05:21: ERROR[Main]: [C]: in function 'punch'
2017-05-27 14:05:21: ERROR[Main]: ...etest/games/mineclone2/mods/ITEMS/mcl_throwing/arrow.lua:89: in function 'func'
2017-05-27 14:05:21: ERROR[Main]: /usr/share/minetest/builtin/profiler/instrumentation.lua:105: in function </usr/share/minetest/builtin/profiler/instrumentation.lua:99>
2017-05-27 14:05:21: ERROR[Main]: stack traceback:
2017-05-27 14:05:21: ERROR[Main]: [C]: in function 'punch'
2017-05-27 14:05:21: ERROR[Main]: ...etest/games/mineclone2/mods/ITEMS/mcl_throwing/arrow.lua:89: in function 'func'
2017-05-27 14:05:21: ERROR[Main]: /usr/share/minetest/builtin/profiler/instrumentation.lua:105: in function </usr/share/minetest/builtin/profiler/instrumentation.lua:99>
(line numbers are slightly off)

Long story short, after calling minetest.add_item, obj may still be nil, but you didn't check for that.

Maybe this is related to the fact that minetest.add_item is broken:
https://github.com/minetest/minetest/issues/4759


Possible bugfix (not tested): Probably just check if obj is not nil and only proceed then.

Also, many of my animals started making idle noises repeatedly after I updated Mobs Redo in MineClone 2. Not sure if it was my fault.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
TenPlus1
Member
Posts: 2891
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

Update:

- Changed many functions to local only
- Added globl for mobs:set_animation(self, anim_name)
- Mobs will only ever float in water
- Nodes with damage_per_second will hurt mobs

wuzzy - obj nil check added, never managed to duplicate the error though.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

I "think" I got the horse from one of the many replies on this thread. I put it on our server (HOMETOWN) and was getting crashes when riders right clicked to dismount. If the players inventory is full the saddle should drop rather than being added to inventory. There's a tiny typo.
Original code:

Code: Select all

                               -- add saddle back to inventory
                                if inv:room_for_item("main", "mobs:saddle") then
                                        inv:add_item("main", "mobs:saddle")
                                else
                                        minetest.add_item(clicker.getpos(), "mobs:saddle")
                                end
minetest.add_item(clicker.getpos(), "mobs:saddle")
There's a dot between clicker and getpos. It should be a colon.
Code should be:

Code: Select all

                               -- add saddle back to inventory
                                if inv:room_for_item("main", "mobs:saddle") then
                                        inv:add_item("main", "mobs:saddle")
                                else
                                        minetest.add_item(clicker:getpos(), "mobs:saddle")
                                end

User avatar
TenPlus1
Member
Posts: 2891
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

Thanks ExeterDad :) good find...

User avatar
Lone_Wolf
Member
Posts: 2412
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

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

by Lone_Wolf » Post

Could you make them protectable?
(I play HOMETOWN and had my horse murdered by a player)

User avatar
Wuzzy
Member
Posts: 4089
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

One question:
Why do you use Dijkstra for pathfinding instead of A*_noprefetch? Dijkstra's algorithm is older and less performant.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests