[Mod] Creatures [git] [minetest_mods_creatures]

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Mon Sep 29, 2014 22:02

It seems pathfinding hasn't brought much excitement to this mod in the last 24 hours. So let's ramp things up a bit, with another exciting new feature for mobs:

Mobs would previously roam only when idle, by selecting a random position within their line of sight. This all changed today with the new node targeting system. You can now define a list of nodes or node groups, a minimum and maximum light level, whether to follow or avoid the node, and a target priority. Multiple entries are possible, and each uses one slot in the target list (previously used only for following / attacking / avoiding players and mobs). This also means that a high priority node can make mobs interested in walking toward that node rather than following or attacking another creature. For each entry, a random node is selected per execution, and only one node is handled at once.

The only visible change for the default creature set is that humans and sheep will only roam in areas which are lit, while some monsters will only wander around dark places. This means that during the day, people roam freely while monsters will retreat in caves or under the shades of trees... whereas during the night, monsters will walk everywhere while people will gather around areas lit by torches. This fully allows the behavior villagers have in Minecraft, where each villager goes outside during the day but in a house during the night... with the only exception that mobs can't open and close doors on their own yet.

Potential use cases include making sheep walk toward planted grass... as well as implementing a mob repellant node which makes monsters run away from it, that people can place in their homes to scare monsters away. Later on, mobs can be made to walk to chests and furnaces, and even manipulate their contents someday. For now however, the most intriguing use case is tempting people to walk into houses, or gather around specific objects.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Creatures [minetest_mods_creatures]

by Sokomine » Tue Sep 30, 2014 02:16

Even thouch I didn't write anything here, and hardly get around testing mods recently, this is a very intresting development, and I'll need part of that later on.

MirceaKitsune wrote:This means that during the day, people roam freely while monsters will retreat in caves or under the shades of trees... whereas during the night, monsters will walk everywhere while people will gather around areas lit by torches.

Sounds fine. I'd love it if sheep where to roam around during the day, but would try to seek other sheep during the night. Other animals might also seek a tree and gather below that. Or - more practical perhaps - animals gathering at night at a hen house or at their feeding place. Though farm animals would be diffrent insofar as they'd be far more stupid than other mobs and would not require an intelligent movement algorithm. For those farm animals, fast execution and extremly low load for a server are the most important factors. Plus beeing protected from griefers (=players who want to kill/pick them up). Guess I'll eventually have to write such a mod.

MirceaKitsune wrote: This fully allows the behavior villagers have in Minecraft, where each villager goes outside during the day but in a house during the night... with the only exception that mobs can't open and close doors on their own yet.

I don't want to duplicate MC behaviour as such. The ideal behaviour for villagers might be to walk around randomly during the day, gather in the church or pub in the evening, and then go to their respective homes. I've got the villages as such mostly ready, the data structure of the villages is stored (it is known where each house is and what type it is; the road system is known), and the trading functionality is implemented in mobf_trader. These traders so far only know how to stand around all day. I'm not sure if there's a good way to handle a larger village where the mob might get too far away from his home and beeing unloaded. Or in how far simulation of villager behaviour is beneficial to gameplay as such. Pathfinding can even be pretty easy in that case as the area is flat and the village structure known.

Any ideas or perhaps even implementations regarding villagers are highly welcomed.
A list of my mods can be found here.
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Tue Sep 30, 2014 11:17

Sokomine wrote:Sounds fine. I'd love it if sheep where to roam around during the day, but would try to seek other sheep during the night. Other animals might also seek a tree and gather below that. Or - more practical perhaps - animals gathering at night at a hen house or at their feeding place. Though farm animals would be diffrent insofar as they'd be far more stupid than other mobs and would not require an intelligent movement algorithm. For those farm animals, fast execution and extremly low load for a server are the most important factors. Plus beeing protected from griefers (=players who want to kill/pick them up). Guess I'll eventually have to write such a mod.


With yesterday's changes, sheep will also roam during the day only, and look for lit areas during the night. Mobs following other mobs at a specific daytime isn't possible yet, and not something I see a point in implementing. However, friendly mobs tend to follow each other all the time... so if one sheep walks to safety as night falls, nearby sheep should follow it.

Sokomine wrote:I don't want to duplicate MC behaviour as such. The ideal behaviour for villagers might be to walk around randomly during the day, gather in the church or pub in the evening, and then go to their respective homes. I've got the villages as such mostly ready, the data structure of the villages is stored (it is known where each house is and what type it is; the road system is known), and the trading functionality is implemented in mobf_trader. These traders so far only know how to stand around all day. I'm not sure if there's a good way to handle a larger village where the mob might get too far away from his home and beeing unloaded. Or in how far simulation of villager behaviour is beneficial to gameplay as such. Pathfinding can even be pretty easy in that case as the area is flat and the village structure known.


I don't seek to duplicate MC either, just saying the same behavior is possible now. What you described is possible too, but with two notes: First of all, each type of building (church, pub, etc) should have an unique node as the floor, since the node name / group to walk on is currently used in detection. And second, only the actual light value is currently scanned, not daytime itself... so mobs can't tell between sunlight and the light in a house. I might consider adding a daytime check as well, but I don't wish to over-complicate things so I need to think about it.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Creatures [minetest_mods_creatures]

by Sokomine » Tue Sep 30, 2014 13:56

MirceaKitsune wrote:However, friendly mobs tend to follow each other all the time... so if one sheep walks to safety as night falls, nearby sheep should follow it.

Sounds good. Except that I'm not sure weather animals would seek light at night.

MirceaKitsune wrote:First of all, each type of building (church, pub, etc) should have an unique node as the floor, since the node name / group to walk on is currently used in detection.

Unique floors would be a bit difficult. It's easier in this case to supply the mob with coordinates directly. It's probably a diffrent way of application of movement/pathfinding. I hope to get far enough soon so that mobs can be placed into the villages and experiments regarding their behaviour beeing conducted. The requirements may be diffrent from free-moving mobs such as these here.
A list of my mods can be found here.
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Tue Sep 30, 2014 15:57

Sokomine wrote:Unique floors would be a bit difficult. It's easier in this case to supply the mob with coordinates directly. It's probably a diffrent way of application of movement/pathfinding. I hope to get far enough soon so that mobs can be placed into the villages and experiments regarding their behaviour beeing conducted. The requirements may be diffrent from free-moving mobs such as these here.


That would complicate the mod a lot more than I'd like it to be by default, even if I could think of a possible way to begin with. Buildings can be created in realtime, so without advanced computing you can't determine the indoor perimeter nor what that building represents.

There is however an easier way, already possible with yesterday's implementation: Just place a specific node inside each building. For example, if it's a house it will have a bed, so people mobs can simply walk to beds if they don't find a bright enough node. Note however that currently, a node must have an empty space (air) above it to be considered an objective, which I might change later.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: [Mod] Creatures [minetest_mods_creatures]

by twoelk » Tue Sep 30, 2014 16:19

So mobs could be enabled to search for certain freely chosen nodes, be it to seek them or to avoid them? NPC/Villagers could seek for certain new custom nodes that look like shop signs or maybe even be able to parse text from the textable signs to find the next place called pub ;-) MC villagers looked for doors and then checked for a roof or ceiling iirc, that would be an example of a behaviour I wouldn't mind if we copied. That is if doors could be convinced to accept certain mobs to interact with them.

As for mobs searching each other, I think that has much potential for convincing behaviour scripting such as making animals moving in herds or predators seeking for prey or even strategic hunting and attacking.

So if the mobs examine the nodes under or near their feet they will not step into plain air anymore and fall of cliffs? They also notice when in water and can be told to search the next coast?

(This has been edited several times because each time I read in the thread I noticed something else I had missed or understood wrong)

Guess I should play with this mod a little more so that I might know all it's possabilities, ... , ..., hmm, playing with electronic sheep, ... , that reminds me of something, ... , do they dream?
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Creatures [minetest_mods_creatures]

by Sokomine » Thu Oct 02, 2014 02:02

twoelk wrote:That is if doors could be convinced to accept certain mobs to interact with them.

Afaik the mobs based on jordan4ibanez' mobs (peaceful mobs as well?) are capable of handling doors. Those from npcf might do so as well.

twoelk wrote:So if the mobs examine the nodes under or near their feet they will not step into plain air anymore and fall of cliffs? They also notice when in water and can be told to search the next coast?

Trying to avoid falling from cliffs may be expensive. It's one of the reasons why mobf is more complex (and occasionally slower) than simple mobs.

twoelk wrote:Guess I should play with this mod a little more so that I might know all it's possabilities, ... , ..., hmm, playing with electronic sheep, ... , that reminds me of something, ... , do they dream?

Only when the server's turned off.
A list of my mods can be found here.
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Tue Jan 20, 2015 02:04

It's time for the mod to receive new updates: I improved the formspec definition system, and wrote a formspec for all the default creatures. It's now designed to handle all player -> mob interaction... including possession, which was previously automated when right-clicking a mob while being a ghost. The formspec for the default creatures lists various data about that individual... including all personality traits, in case the creature is an ally.

+ Spoiler


In the meantime, I'm still looking for more people to test this mod with. Are any servers runnig it? Have other people tried it in the meantime, and did anyone find any issues I should look into?
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Wed Jan 21, 2015 00:25

Today I implemented another plan I've had for a while: Mobs now have names, which are attributed randomly per individual! They are defined as nested tables, meaning that the first name and last name will each be random. Only the human mobs use this so far. An example of how they appear in the mob's formspec menu:

+ Spoiler
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Creatures [minetest_mods_creatures]

by Sokomine » Fri Jan 23, 2015 03:03

MirceaKitsune wrote:Today I implemented another plan I've had for a while: Mobs now have names, which are attributed randomly per individual! They are defined as nested tables, meaning that the first name and last name will each be random. Only the human mobs use this so far.

Sounds fine! They ought to have names. Mobs kept as farm animals/pets might also warrant a name.
A list of my mods can be found here.
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Sat Feb 21, 2015 22:50

I admit I'm a bit disappointed at the lack of activity this has. Was hoping to get more attention and testers by now, since I think the mod can be used for a large variety of worlds and ideas.

I'd like to hear if any servers currently use this so I can try it out online as well. If not, and anyone here runs a server where they do want mobs, please let me know why not and if / why you prefer other mob mods over this. If I'm missing any important features or improvements, I can look into it and see. I want to take this mod far and make it usable at a large scale.
 

TeTpaAka
Member
 
Posts: 131
Joined: Sat Dec 28, 2013 21:54

Re: [Mod] Creatures [minetest_mods_creatures]

by TeTpaAka » Sun Feb 22, 2015 19:10

First of all, this is a very interessting mod. It adds a new aspect to the gameplay.

But in the current version you cannot possess a sheep or a rat. The sheep drops wool and the rat gets picked up. I think this has to do with the change of the default behavior to possess. All other creatures show a formspec in the code, except for these two.

Also I wonder if it would be possible to change the visual abilities of the creatures, so mobs that live in the dark would see better in caves, for example? Just for curiosity.

TeTpaAka
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Mon Feb 23, 2015 00:07

TeTpaAka wrote:First of all, this is a very interessting mod. It adds a new aspect to the gameplay.

But in the current version you cannot possess a sheep or a rat. The sheep drops wool and the rat gets picked up. I think this has to do with the change of the default behavior to possess. All other creatures show a formspec in the code, except for these two.

Also I wonder if it would be possible to change the visual abilities of the creatures, so mobs that live in the dark would see better in caves, for example? Just for curiosity.

TeTpaAka


Rat and sheep possession is indeed currently broken. I wasn't sure if to try enabling them again actually... but since it's a crazier aspect that people like the mod for, I'll think of a way in which it could be done.

Mob vision currently doesn't depend on brightness. It's a detail I might consider adding later on. Thanks for the idea.
 

User avatar
afflatus
Member
 
Posts: 302
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus

Re: [Mod] Creatures [minetest_mods_creatures]

by afflatus » Tue Mar 10, 2015 04:03

I run a server and I like the idea of this mod, however I'm wary because it will radically change gameplay and I don't want to upset my existing players. I will download it, have a play in singleplayer and see if I can come up with some clear explanation of what I perceive the potential problems to be.
Grailtest is sleeping ...
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Sun Mar 15, 2015 22:31

Just fixed several bugs in GIT. Including the player being able to hold down the left mouse button to continuously punch a mob, which spammed damage / attack sounds and target calculations... they now only happen if the punch is older than a second. Do let me know if you try this on a server :)
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Mon Mar 16, 2015 19:56

Even more changes today. The inventory formspec and creature possession are now entirely defined by the creature set instead of hardcoded, and can be scripted to work in any way desired.

Further more, people complained that you could no longer possess mice and sheep, an ability which was lost when the right-click menu was implemented. This has been solved, and the player can become a mouse or sheep once again! If you right-click any creature as a ghost, the special button will say "Possess"... but if you click sheep or mice as a living creature, the special button will instead say "Take" or "Shear / Breed".

+ Spoiler


While I was at it, I also implemented grey and black sheep via the skin system. Obviously you will get the right type of wool when shearing each.

+ Spoiler


NOTE: You should do a /clearobjects on worlds which already contain creatures after you update from GIT.
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Tue Mar 17, 2015 21:29

Reworked much of the targeting logics again, and balanced the default creatures better. Mobs scan for nodes / creatures differently, and have more intelligent and optimal behaviors. The 'determination' trait now acts as randomization between targets within a priority threshold, making mobs who are low on this trait more likely to go back and forth between different tasks and act undecided.

More importantly, mobs can now dig nodes! This is achieved by simply giving a node target the 'attack' objective, whereas 'follow' and 'avoid' do the previous behaviors. Currently this is only enabled for sheep, which will eat grass when they get close to it.

Human mobs will now prefer going between man-made objects, such as furnaces / chests / etc. They will also prefer roaming around farmed fields in broad daylight, to do farming :) People will also stick to beds when it is dark. Screenshots of me testing mobs indoor:

+ Spoiler
 

User avatar
GingerHunter797
Member
 
Posts: 144
Joined: Sun Oct 13, 2013 15:36
In-game: GingerHunter797

Re: [Mod] Creatures [minetest_mods_creatures]

by GingerHunter797 » Wed Mar 18, 2015 00:41

Wow, looks very nice cant wait to try it! :D
http://i.imgur.com/gqXXUaI.png

3DS Friend Code: 2122-7173-2797
Add me as a friend! :D

Want to play a fun game? http://voxelands.com/
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Creatures [minetest_mods_creatures]

by Don » Thu Mar 19, 2015 04:48

Nice work!
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Thu Mar 19, 2015 15:40

As of now, GIT master includes a new addition: Bunnies! I adapted and included the model and texture ExeterDad kindly created and allowed me to integrate. As with all creatures, they will spawn as mobs around the world, and the player can possess one as a ghost to become one. Get the mod and try it out! Screenshots:

+ Spoiler
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Creatures [minetest_mods_creatures]

by Don » Thu Mar 19, 2015 16:30

I call it Exeterbunny
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Creatures [minetest_mods_creatures]

by ExeterDad » Thu Mar 19, 2015 17:23

Don wrote:I call it Exeterbunny

Lol nice manly name. Thanks Buddy!
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Fri May 15, 2015 23:16

So I hope everyone here likes furries... because that's a thing that just got added to the mod! More precisely, there is now an anthropomorphic fox in the default creature set, with related species planned. This is primarily for a Minetest game I'm planning to design, but since I made one to begin with I saw no reason not to include it in the mainstream mod as well. Screenshots at the bottom of this post.

The model is based on the existing human model, to which I simply added a muzzle and ears and a tail... meaning it's technically compatible with all player skins but textures should seriously be designed for it to look okay. The textures were made by me and are also licensed WTFPL. Functionality wise, anthropomorphics have the same features as humans (such as inventory sizes) and the mobs behave in a similar fashion.

I also introduced the concept of neutrality in the mob logics. When the relationship between two mobs is too close to 0 (by default between -0.1 and 0.1), mobs will never take actions toward the other creature idly, although they might still attack if provoked (punched). When you are neutral toward another creature, the alliance text will appear yellow in the right-click menu. Humans and anthropomorphics are neutral toward each other in the world.

+ Spoiler
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua

Re: [Mod] Creatures [minetest_mods_creatures]

by Ivà » Sat May 16, 2015 16:08

Nice job MirceaKitsune. Lovely creatures those anthropomorphics fox :-)
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Sat May 16, 2015 23:28

Thank you! I spent the day texturing the other species I plan to include: Wolf, leopard, rabbit, squirrel. The textures are ready and committed, but the creature definitions will be in tomorrow since they still need tweaking. Never the less, here are the screenshots:

+ Spoiler
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Sun May 17, 2015 21:40

Busy day for the mod today. First of all, I added settings for all of the new species: Foxes will spawn in all biomes but more rarely, wolves will only spawn in snow biomes, rabbits on grass, leopards in desert biomes, and squirrels in trees. Foxes have no special traits, wolves are heavier than other mobs, rabbits can jump much higher, leopards can walk faster, and squirrels are lighter. Also, all monsters will now spawn at night while people will spawn during the day... this model is a lot more consistent at this stage.

I also refractored the register_spawn function, so it is defined easily and cleanly through fields like other functions. There are also a few new settings you can customize... such as the ability to specify which neighbors the node must have in order to spawn mobs, the ABM interval, and a minimum height (previously there was only a maximum).

I lastly tried to improve pathfinding. Haven't gotten far, but mob movement now uses a hybrid system: If pathfinding fails to generate a path, the classic system is used instead. Therefore it's safe to add "pathfinding=true" in minetest.conf, and let it work only when it happens to work.
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Wed May 20, 2015 21:20

Added builtin damage particles, which act similar to the dig particles on nodes (pieces of the texture flying out). I managed to achieve this effect with the minetest.add_particlespawner function by using the "[combine" function to randomly select pieces of the texture, which obey the selected skin as well as multiple materials (it will select one randomly). The feature works for both players and mobs. Screenshots below.

Additionally, mob HP is now persisted. Upon restarting the server, mobs will retain the health you left them with.

+ Spoiler
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Fri May 22, 2015 15:13

Crazy new changes were added to the mod during the last two days, and are currently still being worked on. To begin with, the human skins were replaced with the NPC textures from Lord of the Test, given that both quality theme and license are better. Now for the important stuff:

Creatures is now the first mob mod for Minetest to support texture overlays and scripted color definitions. A new function lets you define multiple layers in a table, each containing any number of texture sets and colors. The textures and colors are merged into all possible combinations and output to a single table, which is applied directly to the textures field and used by the existing skin system. The magic is done through texture modifiers... specifically "^" to combine the textures, "(" and ")" to separate colored layers in one go, and "^[colorize" to apply the colors. Here's an exact example of such a definition:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local colors_fur = {
   "#ff0000", -- red
   "#ffcc00", -- orange
   "#ffff00", -- yellow
   "#ffffff", -- white
   "#cccccc", -- gray
   "#000000", -- black
}

local colors_eyes = {
   "#ff0000", -- red
   "#ffff00", -- yellow
   "#00ff00", -- green
   "#00ffff", -- cyan
   "#0000ff", -- blue
   "#cc00ff", -- purple
}

local colors_hair = {
   "#ff0000", -- red
   "#ffcc00", -- orange
   "#ffff00", -- yellow
   "#00ffff", -- cyan
   "#0000ff", -- blue
   "#ff00ff", -- pink
   "#ffffff", -- white
   "#000000", -- black
}

local outfit_fox_female = creatures:outfit({
   {
      textures = {{"mobs_anthro_fox_fur.png"},},
      colors = colors_fur,
      colors_ratio = 96,
   },
   {
      textures = {{"mobs_anthro_fox_detail.png"},},
   },
   {
      textures = {{"mobs_anthro_fox_eyes.png"},},
      colors = colors_eyes,
      colors_ratio = 128,
   },
   {
      textures = {{"mobs_anthro_fox_hair.png"},},
      colors = colors_hair,
      colors_ratio = 192,
   },
})


For the time being, only anthros were adapted to use the new system. They will have random fur, eye, and hair colors. Colored textures obviously contain an alpha channel, and were saved as grayscale images to further reduce file size. Screenshots of code colored mobs:

+ Spoiler
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Creatures [minetest_mods_creatures]

by Sokomine » Fri May 22, 2015 15:37

MirceaKitsune wrote:Creatures is now the first mob mod for Minetest to support texture overlays and scripted color definitions. A new function lets you define multiple layers in a table, each containing any number of texture sets and colors. The textures and colors are merged into all possible combinations and output to a single table, which is applied directly to the textures field and used by the existing skin system. The magic is done through texture modifiers... specifically "^" to combine the textures, "(" and ")" to separate colored layers in one go, and "^[colorize" to apply the colors. Here's an exact example of such a definition:

That is very good to hear! It ought to allow easy application of clothes, without them having to be treated like armor. That loom from the wardrobe mod may finally be put to gut use! Does it have any effect on connection time? I havn't checked, but I guess the combined textures are generated on the fly by the client when needed?

MirceaKitsune wrote:Human mobs will now prefer going between man-made objects, such as furnaces / chests / etc. They will also prefer roaming around farmed fields in broad daylight, to do farming :) People will also stick to beds when it is dark. Screenshots of me testing mobs indoor:

That's something that'd be very nice for the village inhabitants as well. Right now, my traders just stand around. Can you isolate the behavioural parts so that they may be used in combination with other mods?
A list of my mods can be found here.
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by MirceaKitsune » Fri May 22, 2015 21:00

Sokomine wrote:That is very good to hear! It ought to allow easy application of clothes, without them having to be treated like armor. That loom from the wardrobe mod may finally be put to gut use! Does it have any effect on connection time? I havn't checked, but I guess the combined textures are generated on the fly by the client when needed?


Not at all. Textures are combined client-side (in tile.cpp), so the server only needs to transfer the original images. Outfits created this way are composed of smaller textures, and my mod was actually reduced by a few dozen Kb after I converted the skins.

I'm not sure however if each resulting texture is copied in the memory, meaning that too many large textures could result in a heavy RAM increase client-side. Wouldn't be noticeable in this case of course, since each texture is way under 10 Kb.

Sokomine wrote:That's something that'd be very nice for the village inhabitants as well. Right now, my traders just stand around. Can you isolate the behavioural parts so that they may be used in combination with other mods?


Isolate in what way?I don't think so however: You simply define lists of nodes, what type of targets they are, and under what circumstances they become targets. Here's the definition for the default human mobs, which uses all possible parameters:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local nodes_human = {
   -- go to bed if it's dark
   {nodes = {"group:bed"},
   light_min = 0,
   light_max = 7,
   objective = "follow",
   stay = true,
   priority = 0.75,},
   -- interact with functional nodes (chests, furnaces, etc) if it's not midday
   {nodes = {"default:chest", "default:chest_locked", "default:furnace", "default:furnace_active", "default:sign_wall", "default:bookshelf", "group:door"},
   light_min = 7,
   light_max = 14,
   objective = "follow",
   priority = 0.5,},
   -- do some farming if it's midday
   {nodes = {"group:field"},
   light_min = 15,
   light_max = 15,
   objective = "follow",
   priority = 0.5,},
   -- wander around idly
   {nodes = {"group:crumbly", "group:cracky", "group:choppy"},
   light_min = 7,
   light_max = 15,
   objective = "follow",
   priority = 0.1,},
}


Anyway: I finished porting the human skins to the new system. Each human gets a randomized body design, hair (including facial hair), clothing, and eye colors. Although all possible combinations are theoretically pre-defined, I think we can call them randomly generated outfits... and I like how different people now look from one another!

+ Spoiler
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 24 guests

cron