[mod] Creatura (API) [0.2.8-beta] [creatura]

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

[mod] Creatura (API) [0.2.8-beta] [creatura]

by ElCeejo » Post

Image

Creatura aims to be a Animal focused API, with features to make advanced mobs without extra effort.

Notable Features:

A and Theta Pathfinding
Performant simple physics
Multiple useful entity methods
Simple built-in mob registration

Planned Features:

Sight API
Improved Tracking API
Improved Terrain Traversal API

License: MIT
Download
Source

Documentation is not currently finished.
Last edited by ElCeejo on Wed Mar 15, 2023 03:07, edited 10 times in total.

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.1.2-beta

by ElCeejo » Post

A number of changes have been made to fix issues encountered in dependent mods, as well multiple warnings.

- Fixed pathfinder warning
- Fixed mobs freezing
- Fixed multiple crashes (Thanks LMD)
- Improved mob:get_wander_pos()
- Improved damage indication handling (Thanks JordanL2)
- Improved spawn handling (Thanks JordanL2)

(All of the above changes are from 0.1 -> 0.1.1 -> 0.1.2)

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.1.3-beta

by ElCeejo » Post

Just a small improvement to mob:get_wander_pos_3d() but improves Draconis behavior.

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.1.4-beta

by ElCeejo » Post

This update brings some improvements and fixes across the board and will greatly improve behavior for dependent mods.

- Fixed bugs with damage indication (Thanks JordanL2)
- Fixed false-negatives in creatura.is_pos_moveable
- Fixed potential spawning bug
- Improved boid seperation
- Improved all bundled movement methods
- Added creatura.register_on_spawn (documentation soon)
- Moved damage indication to luaentity methods

Animalia announcement incoming

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

Re: [mod] Creatura (API) [0.1.3-beta] [creatura]

by TenPlus1 » Post

@Elceejo - Mobs Redo does indeed allow custom variables to be used as well as many other custom functions.

blocker
Member
Posts: 42
Joined: Fri Jan 08, 2021 06:14
Location: Germany

Re: [mod] Creatura (API) [0.1.3-beta] [creatura]

by blocker » Post

2022-04-03 15:16:58: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'animalia' in callback luaentity_Step(): ...est-5.4.1/bin/../worlds/world/worldmods/creatura/api.lua:145: attempt to index a nil value
2022-04-03 15:16:58: ERROR[Main]: stack traceback:
2022-04-03 15:16:58: ERROR[Main]: ...est-5.4.1/bin/../worlds/world/worldmods/creatura/api.lua:145: in function 'moveable'
2022-04-03 15:16:58: ERROR[Main]: ...est-5.4.1/bin/../worlds/world/worldmods/creatura/api.lua:209: in function 'get_next_move'
2022-04-03 15:16:58: ERROR[Main]: ...5.4.1/bin/../worlds/world/worldmods/creatura/methods.lua:251: in function 'func'
2022-04-03 15:16:58: ERROR[Main]: ....4.1/bin/../worlds/world/worldmods/creatura/mob_meta.lua:1047: in function '_move'
2022-04-03 15:16:58: ERROR[Main]: ....4.1/bin/../worlds/world/worldmods/creatura/mob_meta.lua:829: in function <....4.1/bin/../worlds/world/worldmods/creatura/mob_meta.lua:805>

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.1.5-beta

by ElCeejo » Post

Fixed the crash reported above.

blocker
Member
Posts: 42
Joined: Fri Jan 08, 2021 06:14
Location: Germany

Re: [mod] Creatura (API) [0.1.5-beta] [creatura]

by blocker » Post

Thank you.

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.1.6-beta

by ElCeejo » Post

Update 0.1.6-beta is public!

- Fixed a potential crash
- Fixed a crash when using Fancy Step setting
- Fixed a namespace issue
- Fixed issues with collision while riding mobs

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.1.7-beta

by ElCeejo » Post

Update 0.1.7-beta is public!

- Added mob:try_initiate_utility (Thanks MrRar) and mob:clear_utility
- Improved obstacle detection
- Improved "creatura:obstacle_avoidance" movement method
- Reduced pathfinding calls in "creatura:pathfind" movement method

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.1.8-beta

by ElCeejo » Post

Update 0.1.8-beta is public!

- Added creatura.register_spawn_item()
- Improvements to stability and performance
- fancy_collide can be set to false in mob def to disable pushing

creatura.register_spawn_item() gives full control over the item definition outside of on_place. creatura.register_spawn_egg will be removed soon.

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.2-beta

by ElCeejo » Post

Creatura's biggest update yet!

- Improved API Documentation
- Complete Recode of the Movement API
- Added creatura.get_ground_level()
- Added creatura.get_collision()
- Added support for Step Delay (performance feature)
- Added a faster LVM Pathfinder
- Various Performance Improvements
- Obstacle Avoidance has been improved
- Builtin Punch adds wear

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Patch 0.2.3

by ElCeejo » Post

Performance gains and fixes

- Replaced self.properties with self:get_props() (Optimized property caching)
- Boids will only calculate cohesion/separation from boid members that are moving
- Added defaults for Fire/Fall Resistance and Max Breath
- Fixed Issues with ABM spawning

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.2.6

by ElCeejo » Post

Bunch of improvements since the last changelog so I'll condense changes from 0.2.3 - 0.2.6 into one.

- Added Context Based Steering
- New, Optimized Boids API
- Improvements to Collision Avoidance
- Mobs now suffocate in solid blocks
- Improved damage calculation in basic punch
- Improved ABM Spawning API (min/max_time, biomes, block_protected_spawn params)
- New Spawn Item textures
- Minor bug fixes

User avatar
Lupercus
Member
Posts: 30
Joined: Tue Jan 03, 2017 02:08
GitHub: lupercus13
IRC: Lupercus-Server
In-game: Lupercus

Re: [mod] Creatura (API) [0.2.6-beta] [creatura]

by Lupercus » Post

Do you have future plans to add any kind of water or ocean entities? I would love to run a server with creatura mob engine, and it has everything im looking for except water mobs.

User avatar
Lupercus
Member
Posts: 30
Joined: Tue Jan 03, 2017 02:08
GitHub: lupercus13
IRC: Lupercus-Server
In-game: Lupercus

Re: [mod] Creatura (API) [0.2.6-beta] [creatura]

by Lupercus » Post

Also great work. love the engine, draconis, animalia, and spiradilus

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Update 0.2.8

by ElCeejo » Post

Big changes, you may experience issues with dependent mods until they're updated.

- Added support for multiple meshes
- Added proper context based steering API
- Added vertical obstacle avoidance
- Added animation transitions
- Added utility cooldown
- Improved obstacle avoidance
- Various crash fixes
- Fixed mob fall damage accumulating

Documentation is still needed but I just wanted to get this update out, Animalia should be out tomorrow (Wednesday my dudes)

machoo
New member
Posts: 3
Joined: Fri Mar 24, 2023 13:55

Re: [mod] Creatura (API) [0.2.8-beta] [creatura]

by machoo » Post

Hi, is there any documentation available for this API? I would like to try implementing some basic hostile mobs with it (spawn in dark, wanders around like Animal mobs, spots players when they are in a certain radius and move towards them, deals damage on contact). Would something like this be difficult to implement?

touchatonku
Member
Posts: 16
Joined: Sun Feb 27, 2022 14:56

Re: [mod] Creatura (API) [0.2.8-beta] [creatura]

by touchatonku » Post

Hi
2023-04-26 18:14:14: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'animalia' in callback luaentity_Step(): ...e/minetest/.minetest/mods/animalia/api/behaviors.lua:530: bad argument #2 to 'random' (interval is empty)
2023-04-26 18:14:14: ERROR[Main]: stack traceback:
2023-04-26 18:14:14: ERROR[Main]: [C]: ?
2023-04-26 18:14:14: ERROR[Main]: [C]: in function 'random'
2023-04-26 18:14:14: ERROR[Main]: ...e/minetest/.minetest/mods/animalia/api/behaviors.lua:530: in function 'action_wander_walk'
2023-04-26 18:14:14: ERROR[Main]: ...e/minetest/.minetest/mods/animalia/api/behaviors.lua:891: in function 'func'
2023-04-26 18:14:14: ERROR[Main]: /home/minetest/.minetest/mods/creatura/mob_meta.lua:1233: in function '_execute_utilities'
2023-04-26 18:14:14: ERROR[Main]: /home/minetest/.minetest/mods/creatura/mob_meta.lua:937: in function </home/minetest/.minetest/mods/creatura/mob_meta.lua:902>

User avatar
Neuromancer
Member
Posts: 958
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

Re: [mod] Creatura (API) [0.2.8-beta] [creatura]

by Neuromancer » Post

Is there any way to make mobs only spawn and exist only during the day or night? I'm creating a mod that maps mobs to biomes, and would like bats to spawn and exist only at night. Mobs Redo API takes a parameter called day_toggle. true means spawn only during the day, false means spawn only at night. But when I try that parm for creatura it doesn't work. Bats spawn during the day and hang around all day.
creatura.register_abm_spawn("animalia:bat", {
chance = ambient_spawn_chance,
interval = 30,
min_light = 0,
min_height = -31000,
max_height = 1000,
min_group = 3,
max_group = 5,
spawn_cap = 6,
day_toggle = false,
nodes = {"group:cursed_ground"; "group:cave_floor"}
})

User avatar
ElCeejo
Member
Posts: 210
Joined: Thu Feb 28, 2019 23:29
GitHub: ElCeejo
In-game: ElCeejo
Location: Your Mother's house

Re: [mod] Creatura (API) [0.2.8-beta] [creatura]

by ElCeejo » Post

There is. Use min_time and max_time, and set them to 19500 and 4500 respectively to make the mob only spawn at night.

User avatar
Neuromancer
Member
Posts: 958
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

Re: [mod] Creatura (API) [0.2.8-beta] [creatura]

by Neuromancer » Post

Ah thanks, the min time being "larger" than the max time tricked me into thinking it wasn't possible :)

User avatar
Neuromancer
Member
Posts: 958
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

Re: [mod] Creatura (API) [0.2.8-beta] [creatura]

by Neuromancer » Post

I'm helping someone add mobs to the BackRooms game https://content.minetest.net/packages/S ... kroomtest/. However, when I create make spawn calls into creatura for particular nodes like I have done dozens of times before, the mobs just don't spawn. I'm wondering if its because BackRooms doesn't contain MinetestGame mods, and Creatura depends on those to work? Any idea on how to get Creatura mobs to spawn in BackRooms Game?
Edit: I got it working sort of. If you fly, you can see that the game is divided into many layers. You start at the bottom layer. I was able to get animalia working, and saw bats spawning because I was "underground". I also did see rats and owls higher up. So as long as the mob mod doesn't depend on other minetest game mods, I think it will work if I spawn the mods at heights that the game is played in.

User avatar
MirceaKitsune
Member
Posts: 924
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

Re: [mod] Creatura (API) [0.2.8-beta] [creatura]

by MirceaKitsune » Post

This is an incredible mob API! I compared it with Mobs Redo, and while each has its uses this definitely seems like the superior choice. Everything animates naturally and smoothly, very responsive unlike most mob mods where creatures often travel in straight lines and get stuck walking into walls before snapping to a different rotation. The code looks clean simple and easy to understand: Developers can schedule actions and events using scores to pick the most important, giving external mods that define their own creatures the ability to easily inject custom mechanics using a short function. Creatures that walk on land or swim in water or fly in the air (or any mixture of the 3) are all supported, as is the ability to give them special attacks and targets so they may attack other creatures... the boids system that makes birds flock together is absolutely superb! Performance is itself remarkable considering all those features, even with a lot of creatures at once I didn't see a huge CPU increase I can attribute to the entities... it's worth noting that pathfinding is being used which makes this all the more remarkable.

Feature wise it already feels complete at least in regard to basics. I'd only love to see this used for villagers as well: I know the description says "animal focused" but the difference is typically minor. If support and development is guaranteed I'm likely to use this in my own game or develop custom creatures for it, in which case I definitely wouldn't want a second mob API just for villagers. Hope a villager mod for this API with examples of characters that trade and use different items in the world may also be developed in time!

In terms of concrete features that would be needed, maybe check if it's possible to support weapons / armor that modify defense / attack stats? Visually armor would be just a texture change like the 3D armor mod uses, the weapon instead would be a separate entity attached to the hand bone. Ideally this can be designed to work with trading and a mob inventory: The player can give an ally a weapon after which they will appear holding it and attack enemies such as monsters using that weapon, or food which they can use to heal if hurt. I presume custom actions like going to a bed and laying down to sleep at night are already possible using the custom utilities.

User avatar
edwinfox
New member
Posts: 6
Joined: Thu Jul 20, 2023 19:26
GitHub: edwin-fox

Re: [mod] Creatura (API) [0.2.8-beta] [creatura]

by edwinfox » Post

My first interaction here in the forum!

First of all, I'd like to say I am totally in love with your mod. I've played it on Minetest and it is just amazing. So gorgeous, it adds life dynamics to the environment!

I am now making a Dwarf Fortress-inspired world, this time using Mineclone2. Sadly though, I've been getting this error whenever someone (even me as creative/survival) punches the mod-related entities (foxes, fishes, any animal)

I've tested both Creatura and Animalia on a fresh MC2 world, and the error persists even having just the two mods activated.

What can be done? Is it possible for me to fix some string in .lua?

EDIT¹: The crash doesn't occur when checking the 'Creative Mode' and hosting the game

Code: Select all

AsyncErr: Lua: Runtime error from mod '??' in callback luaentity_Punch(): ...inetest/games/mineclone2/mods/HUD/mcl_inventory/init.lua:186: bad argument #1 to 'get_player_by_name' (string expected, got userdata)
stack traceback:
	[C]: in function 'get_player_by_name'
	...inetest/games/mineclone2/mods/HUD/mcl_inventory/init.lua:186: in function 'is_creative_enabled'
	/home/edwin/.minetest/mods/creatura/api.lua:448: in function 'basic_punch_func'
	/home/edwin/.minetest/mods/animalia/api/api.lua:605: in function </home/edwin/.minetest/mods/animalia/api/api.lua:603>

Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 13 guests