Mobkit - Entity API [mobkit][alpha]
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: Mobkit - Entity API [mobkit][alpha]
Could also wait until 5.4 releases to drop support
Re: Mobkit - Entity API [mobkit][alpha]
No support, just having a branch on github or a release in ContentDB to download if you accidentally deleted your outdated mobkit :)
Re: Mobkit - Entity API [mobkit][alpha]
That is what I meant. Me, and maybe others too, might need a source to download an outdated mobkit for minetest < 5.3. That is all. No support needed.
Re: Mobkit - Entity API [mobkit][alpha]
Not necessarily outdated. The core is already stable and functional. Even the new version would be more instable, cos new features/improvements.
Re: Mobkit - Entity API [mobkit][alpha]
Thermos, the new minetest.get_objects_in_area function was merged for 5.4.
I think that this would be an improvement for the mobkit's "sensors" function (self.nearby_objects). For terrestrial mobs would be more suitable a rectangle area than a sphere = less nodes to check (?) and more relevant ones (not much higher nodes to check). Maybe self.view_range (now only a horizontal range) in conjunction with self.jump_height too to flatten the rectangle.
For aerial ones not, I guess. And either not suitable for aerial-terrestrial predator-preys.
Best Regards.
I think that this would be an improvement for the mobkit's "sensors" function (self.nearby_objects). For terrestrial mobs would be more suitable a rectangle area than a sphere = less nodes to check (?) and more relevant ones (not much higher nodes to check). Maybe self.view_range (now only a horizontal range) in conjunction with self.jump_height too to flatten the rectangle.
For aerial ones not, I guess. And either not suitable for aerial-terrestrial predator-preys.
Best Regards.
Re: Mobkit - Entity API [mobkit][alpha]
Actually, at first I assumed get_objects_inside_radius() worked that way, wouldn't expect anybody to go the trouble of making it a proper spherical radius.
Yes, I'll probably make use of it some time after 5.4 is out and widely adopted.
Re: Mobkit - Entity API [mobkit][alpha]
Update 210105
mobkit
mobkit
- moved all example behaviors to a separate file example_behaviors.lua so it's clear what is part of the core library and what's not.
- added the file behaviors2override.lua. It's basicly a copy of example_behaviors.lua with the prefix 'mobkit' replaced with the string '[yournamespace]' where needed, so to start using modified example behaviors just copy all the contents to your mod/game and replace all occurences of '[yournamespace]' to your namespace of choice.
- mobkit.get_spawn_pos_abr() - fixed the bug when spawns happened more often than intended on very laggy servers with dtime comparable to a second.
- added mobkit.get_box_intersect_cols()
returns all {x=,z=} columns that a box intersects with.
- added mobkit.get_box_displace_cols()
returns all {x=,z=} columns that a box would enter if it moved by a specified vector
this is the basis for large box movement support (whales, dinos etc.). I'm going to elaborate here later.
- [experimental] added mobkit integrity control
gets a checksum of mobkit global table contents and issues an error if modified by another mod.
This uses undocumented features of minetest.serialize so we'll see how it goes
- mobkit now makes use of collision info, it should also be available from inside logic and behaviors via 'colinfo' variable (MT 5.3.0 and later)
- various fixes and possibly new bugs. This one might be a bit rushed but I'm not sure when I'll get some time to work on this again
Re: Mobkit - Entity API [mobkit][alpha]
Thanks.
I get "mobkit namespace inconsistent", I mean even with mobkit alone (no more mobkit related stuff). I've checked it putting mobkit in the "devtest game" and the same problem.
Do calculate the hash with the "devtest" game.
On the other hand, I've fixed my Petz mod cos it was some namespace functions taken.
I get "mobkit namespace inconsistent", I mean even with mobkit alone (no more mobkit related stuff). I've checked it putting mobkit in the "devtest game" and the same problem.
Do calculate the hash with the "devtest" game.
On the other hand, I've fixed my Petz mod cos it was some namespace functions taken.
Re: Mobkit - Entity API [mobkit][alpha]
Yeah I might have to remove that one. minetest.serialize adds some machine specific bits and I might not have been able to remove all of them.
Maybe the output is also os specific, are you using linux?
Maybe the output is also os specific, are you using linux?
Re: Mobkit - Entity API [mobkit][alpha]
Yes, Linux. In my system, with "devtest" and only mobkit, crc is "3e94b7e61cec2ed13b96be0425c24b8e4697e654"
Re: Mobkit - Entity API [mobkit][alpha]
Other thing, in 5.4-dev, a warning:
2021-01-06 12:14:16: WARNING[Server]: Call to deprecated function 'get_player_velocity', please use 'get_velocity' at /opt/minetest/bin/../games/juanchi/mods/mobkit/init.lua:233
https://github.com/minetest/minetest/pull/10173
2021-01-06 12:14:16: WARNING[Server]: Call to deprecated function 'get_player_velocity', please use 'get_velocity' at /opt/minetest/bin/../games/juanchi/mods/mobkit/init.lua:233
https://github.com/minetest/minetest/pull/10173
Re: Mobkit - Entity API [mobkit][alpha]
Runs can you please output something like minetest.serialize(mobkit.turn2yaw) and post me the result string?
I dont have access to a linux machine at the moment
I dont have access to a linux machine at the moment
Re: Mobkit - Entity API [mobkit][alpha]
If I do "minetest.log(minetest.serialize(mobkit.turn2yaw))", it gives me an error on the screen: "<Invalid UTF-8 STRING>"
The result is:
The result is:
Code: Select all
2021-01-06 19:41:40: [Server]: return loadstring("\27LJ\2\0008@/opt/minetest/bin/../games/juanchi/mods/mobkit/init.luaµ\3\0\3\
\3\4\3A|\2\17\14\0\1\0X\3\1)\1\0\0\14\0\2\0X\3\1)\2\6\0009\3\0\0\18\4\3\0009\3\1\3B\3\2\2-\4\0\0 \3\4\3-\4\0\0 \4\4\1-\5\0\0\24\5\0\5$\1\5\4-\4\1\0009\5\2\0\"\5\2\5-\6\2\0!\7\3\1B\6\2\2-\7\0\0\24\7\0\7$\6\7\6B\4\3\2-\5\2\0!\6\3\1B\5\2\2-\6\0\0\1\6\5\0X\5\2)\5ÿÿX\6\1)\5\1\0\1\3\1\0X\6\3\24\6\1\5\12\5\6\0X\7\1\24\5\2\5\"\6\5\4 \6\6\3-\7\0\0\24\7\0\7$\6\7\0069\7\0\0\18\8\7\0009\7\3\7-\9\0\0!\9\9\6B\7\3\1\5\6\1\0X\7\5+\7\2\0-\8\0\0!\8\8\6J\7\3\0X\7\4+\7\1\0-\8\0\0!\8\8\6J\7\3\0K\0\1\0\1À\7À\0À\12set_yaw\
dtime\12get_yaw\11object\4\2þÿÿÿ\31\1\1\1\2\2\2\3\3\3\3\4\4\5\5\5\5\5\7\7\7\7\7\7\7\7\7\7\9\9\9\9\9\9\9\9\9\
\
\
\
\
\
\12\12\12\12\12\13\13\13\13\13\13\15\15\15\15\15\15\15\16\16\16\16\17pi\0min\0abs\0self\0\0Btyaw\0\0Brate\0\0Byaw\0\0117step\0\17&dir\0\9\29nyaw\0\11\18\0\0")
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: Mobkit - Entity API [mobkit][alpha]
minetest.serialize() is for tables, and will probably break like that given any other input. Try dump()runs wrote: ↑Wed Jan 06, 2021 18:45If I do "minetest.log(minetest.serialize(mobkit.turn2yaw))", it gives me an error on the screen: "<Invalid UTF-8 STRING>"
The result is:
Code: Select all
2021-01-06 19:41:40: [Server]: return loadstring("\27LJ\2\0008@/opt/minetest/bin/../games/juanchi/mods/mobkit/init.luaµ\3\0\3\ \3\4\3A|\2\17\14\0\1\0X\3\1)\1\0\0\14\0\2\0X\3\1)\2\6\0009\3\0\0\18\4\3\0009\3\1\3B\3\2\2-\4\0\0 \3\4\3-\4\0\0 \4\4\1-\5\0\0\24\5\0\5$\1\5\4-\4\1\0009\5\2\0\"\5\2\5-\6\2\0!\7\3\1B\6\2\2-\7\0\0\24\7\0\7$\6\7\6B\4\3\2-\5\2\0!\6\3\1B\5\2\2-\6\0\0\1\6\5\0X\5\2)\5ÿÿX\6\1)\5\1\0\1\3\1\0X\6\3\24\6\1\5\12\5\6\0X\7\1\24\5\2\5\"\6\5\4 \6\6\3-\7\0\0\24\7\0\7$\6\7\0069\7\0\0\18\8\7\0009\7\3\7-\9\0\0!\9\9\6B\7\3\1\5\6\1\0X\7\5+\7\2\0-\8\0\0!\8\8\6J\7\3\0X\7\4+\7\1\0-\8\0\0!\8\8\6J\7\3\0K\0\1\0\1À\7À\0À\12set_yaw\ dtime\12get_yaw\11object\4\2þÿÿÿ\31\1\1\1\2\2\2\3\3\3\3\4\4\5\5\5\5\5\7\7\7\7\7\7\7\7\7\7\9\9\9\9\9\9\9\9\9\ \ \ \ \ \ \12\12\12\12\12\13\13\13\13\13\13\15\15\15\15\15\15\15\16\16\16\16\17pi\0min\0abs\0self\0\0Btyaw\0\0Brate\0\0Byaw\0\0117step\0\17&dir\0\9\29nyaw\0\11\18\0\0")
Re: Mobkit - Entity API [mobkit][alpha]
Dump does not work, the result is: '<function>"Lone_Wolf wrote: ↑Thu Jan 07, 2021 05:15minetest.serialize() is for tables, and will probably break like that given any other input. Try dump()runs wrote: ↑Wed Jan 06, 2021 18:45If I do "minetest.log(minetest.serialize(mobkit.turn2yaw))", it gives me an error on the screen: "<Invalid UTF-8 STRING>"
The result is:
Code: Select all
2021-01-06 19:41:40: [Server]: return loadstring("\27LJ\2\0008@/opt/minetest/bin/../games/juanchi/mods/mobkit/init.luaµ\3\0\3\ \3\4\3A|\2\17\14\0\1\0X\3\1)\1\0\0\14\0\2\0X\3\1)\2\6\0009\3\0\0\18\4\3\0009\3\1\3B\3\2\2-\4\0\0 \3\4\3-\4\0\0 \4\4\1-\5\0\0\24\5\0\5$\1\5\4-\4\1\0009\5\2\0\"\5\2\5-\6\2\0!\7\3\1B\6\2\2-\7\0\0\24\7\0\7$\6\7\6B\4\3\2-\5\2\0!\6\3\1B\5\2\2-\6\0\0\1\6\5\0X\5\2)\5ÿÿX\6\1)\5\1\0\1\3\1\0X\6\3\24\6\1\5\12\5\6\0X\7\1\24\5\2\5\"\6\5\4 \6\6\3-\7\0\0\24\7\0\7$\6\7\0069\7\0\0\18\8\7\0009\7\3\7-\9\0\0!\9\9\6B\7\3\1\5\6\1\0X\7\5+\7\2\0-\8\0\0!\8\8\6J\7\3\0X\7\4+\7\1\0-\8\0\0!\8\8\6J\7\3\0K\0\1\0\1À\7À\0À\12set_yaw\ dtime\12get_yaw\11object\4\2þÿÿÿ\31\1\1\1\2\2\2\3\3\3\3\4\4\5\5\5\5\5\7\7\7\7\7\7\7\7\7\7\9\9\9\9\9\9\9\9\9\ \ \ \ \ \ \12\12\12\12\12\13\13\13\13\13\13\15\15\15\15\15\15\15\16\16\16\16\17pi\0min\0abs\0self\0\0Btyaw\0\0Brate\0\0Byaw\0\0117step\0\17&dir\0\9\29nyaw\0\11\18\0\0")
- LRV
- Helper
- Posts: 378
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Mooncarguy
Re: Mobkit - Entity API [mobkit][alpha]
Is there/will there be the ability to set movement and viewing direction independantly from each other?
This is a cool signature. :)
Re: Mobkit - Entity API [mobkit][alpha]
Thanks runs.
dump() is a minetest utility, i guess LW meant string.dump()
Looks like in case of functions minetest.serialize() returns same thing as dump except nondisplayable characters are converted to displayable representation.
dump() is a minetest utility, i guess LW meant string.dump()
Looks like in case of functions minetest.serialize() returns same thing as dump except nondisplayable characters are converted to displayable representation.
Re: Mobkit - Entity API [mobkit][alpha]
Mobkit doesn't enforce the concept of viewing direction. Entities have access to all objects in range and it's up to the modder to decide which of them they can notice.
zombiestrd for example. Zombies can see in the front arc only, but they can 'hear' sounds coming from all directions.
Re: Mobkit - Entity API [mobkit][alpha]
Hmm, the string is identical on my end, except the header containing the path which is being stripped so it doesn't matter.
I've got two ideas: sort order and line breaks.
I'd like to make it work, some means of control of libraries integrity could bring some order to this mess.
Can anyone else confirm they get the red error message despite mobkit being the only mod enabled?
ps. runs could you try the dev version here https://github.com/TheTermos/mobkit/archive/dev.zip ?
It works on a sorted array and line breaks are stripped from the strings.
Re: Mobkit - Entity API [mobkit][alpha]
I got the same error:Termos wrote: ↑Thu Jan 07, 2021 19:59Hmm, the string is identical on my end, except the header containing the path which is being stripped so it doesn't matter.
I've got two ideas: sort order and line breaks.
I'd like to make it work, some means of control of libraries integrity could bring some order to this mess.
Can anyone else confirm they get the red error message despite mobkit being the only mod enabled?
ps. runs could you try the dev version here https://github.com/TheTermos/mobkit/archive/dev.zip ?
It works on a sorted array and line breaks are stripped from the strings.
- Attachments
-
- error.png (49.6 KiB) Viewed 946 times
Re: Mobkit - Entity API [mobkit][alpha]
I get the same message in a freshly generated world with only mobkit, water_life and unified_inventory as mods.
Minetest5.3.0 stable on arch linux
Minetest5.3.0 stable on arch linux
Re: Mobkit - Entity API [mobkit][alpha]
Thanks guys.
I've updated the dev branch with the atomic option.
If you'd be so kind to help me out more, please run it and PM me the part of the log starting with "WARNING[Main]: namespace dump:" and the following warnings as a file.
I've updated the dev branch with the atomic option.
If you'd be so kind to help me out more, please run it and PM me the part of the log starting with "WARNING[Main]: namespace dump:" and the following warnings as a file.
Re: Mobkit - Entity API [mobkit][alpha]
Update 210109
mobkit
mobkit
- removed the integrity check error message
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: Mobkit - Entity API [mobkit][alpha]
No I meant for him to use dump(). It shows that mobkit.turn2yaw is a function. Which I guess makes sense now that I look at it again. There is no () at the end turning it into a function call instead of a 'function pointer'
Re: Mobkit - Entity API [mobkit][alpha]
what dump() seems to do to functions is return the string "<function>" so all functions look identical to it.
minetest.serialize() does serialize functions, just the specifics of that process aren't documented.
Who is online
Users browsing this forum: No registered users and 26 guests